diff --git a/api/cmd.ts b/api/cmd.ts new file mode 100644 index 0000000..8968acc --- /dev/null +++ b/api/cmd.ts @@ -0,0 +1,5394 @@ +// deno-lint-ignore-file no-unused-vars +import { AnyBuffer, anyBuffer } from "./util.ts"; +import { + Result, + Format, + ImageType, + ImageTiling, + SampleCountFlagBits, + PipelineBindPoint, + IndexType, + ImageLayout, + Filter, + PipelineStageFlagBits, + SubpassContents, + PresentModeKHR, + DebugReportObjectTypeEXT, + ExternalMemoryHandleTypeFlagBits, + SurfaceCounterFlagBitsEXT, + ShaderStageFlagBits, + ShaderInfoTypeAMD, + TimeDomainEXT, + DebugUtilsMessageSeverityFlagBitsEXT, + CoarseSampleOrderTypeNV, + CopyAccelerationStructureModeKHR, + QueryType, + AccelerationStructureCompatibilityKHR, + ShaderGroupShaderKHR, + PerformanceParameterTypeINTEL, + FrontFace, + PrimitiveTopology, + CompareOp, + StencilOp, + LogicOp, + TessellationDomainOrigin, + PolygonMode, + ConservativeRasterizationModeEXT, + ProvokingVertexModeEXT, + LineRasterizationModeEXT, + CoverageModulationModeNV, + CoverageReductionModeNV, + ObjectType, + FragmentShadingRateCombinerOpKHR, + FragmentShadingRateNV, + AccelerationStructureBuildTypeKHR, + OpticalFlowSessionBindingPointNV, +} from "./enum.ts"; +import { + Instance, + PhysicalDevice, + Device, + ImageUsageFlags, + ImageCreateFlags, + Queue, + Fence, + DeviceMemory, + DeviceSize, + MemoryMapFlags, + Buffer, + Image, + Bool32, + Semaphore, + Event, + QueryPool, + QueryResultFlags, + BufferView, + ImageView, + ShaderModule, + PipelineCache, + Pipeline, + RenderPass, + PipelineLayout, + Sampler, + DescriptorSetLayout, + DescriptorPool, + DescriptorPoolResetFlags, + DescriptorSet, + Framebuffer, + CommandPool, + CommandPoolResetFlags, + CommandBuffer, + CommandBufferResetFlags, + StencilFaceFlags, + DeviceAddress, + PipelineStageFlags, + DependencyFlags, + QueryControlFlags, + ShaderStageFlags, + SurfaceKHR, + DisplayKHR, + DisplayModeKHR, + SwapchainKHR, + DebugReportCallbackEXT, + DebugReportFlagsEXT, + ExternalMemoryHandleTypeFlagsNV, + IndirectCommandsLayoutNV, + CommandPoolTrimFlags, + PeerMemoryFeatureFlags, + DeviceGroupPresentModeFlagsKHR, + DescriptorUpdateTemplate, + SamplerYcbcrConversion, + ValidationCacheEXT, + SwapchainImageUsageFlagsANDROID, + DebugUtilsMessengerEXT, + DebugUtilsMessageTypeFlagsEXT, + AccelerationStructureNV, + AccelerationStructureKHR, + DeferredOperationKHR, + PerformanceConfigurationINTEL, + CullModeFlags, + SampleMask, + ColorComponentFlags, + PrivateDataSlot, + PipelineStageFlags2, + VideoSessionKHR, + VideoSessionParametersKHR, + CuModuleNVX, + CuFunctionNVX, + BufferCollectionFUCHSIA, + MicromapEXT, + OpticalFlowSessionNV, +} from "./def.ts"; +const lib = Deno.dlopen(Deno.build.os === "windows" ? "vulkan-1" : Deno.build.os === "darwin" ? "libvulkan.dylib.1" : "libvulkan.so.1", { + "vkCreateInstance": { + "parameters": [ + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyInstance": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkEnumeratePhysicalDevices": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkGetDeviceProcAddr": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "function" + }, + "vkGetInstanceProcAddr": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "function" + }, + "vkGetPhysicalDeviceProperties": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceQueueFamilyProperties": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceMemoryProperties": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceFeatures": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceFormatProperties": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceImageFormatProperties": { + "parameters": [ + "pointer", + "u32", + "u32", + "u32", + "u32", + "u32", + "buffer" + ], + "result": "u32" + }, + "vkCreateDevice": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyDevice": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkEnumerateInstanceVersion": { + "parameters": [ + "buffer" + ], + "result": "u32" + }, + "vkEnumerateInstanceLayerProperties": { + "parameters": [ + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkEnumerateInstanceExtensionProperties": { + "parameters": [ + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkEnumerateDeviceLayerProperties": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkEnumerateDeviceExtensionProperties": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkGetDeviceQueue": { + "parameters": [ + "pointer", + "u32", + "u32", + "buffer" + ], + "result": "void" + }, + "vkQueueSubmit": { + "parameters": [ + "pointer", + "u32", + "buffer", + "pointer" + ], + "result": "u32" + }, + "vkQueueWaitIdle": { + "parameters": [ + "pointer" + ], + "result": "u32" + }, + "vkDeviceWaitIdle": { + "parameters": [ + "pointer" + ], + "result": "u32" + }, + "vkAllocateMemory": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkFreeMemory": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkMapMemory": { + "parameters": [ + "pointer", + "pointer", + "u64", + "u64", + "u32", + "buffer" + ], + "result": "u32" + }, + "vkUnmapMemory": { + "parameters": [ + "pointer", + "pointer" + ], + "result": "void" + }, + "vkFlushMappedMemoryRanges": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "u32" + }, + "vkInvalidateMappedMemoryRanges": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "u32" + }, + "vkGetDeviceMemoryCommitment": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetBufferMemoryRequirements": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkBindBufferMemory": { + "parameters": [ + "pointer", + "pointer", + "pointer", + "u64" + ], + "result": "u32" + }, + "vkGetImageMemoryRequirements": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkBindImageMemory": { + "parameters": [ + "pointer", + "pointer", + "pointer", + "u64" + ], + "result": "u32" + }, + "vkGetImageSparseMemoryRequirements": { + "parameters": [ + "pointer", + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceSparseImageFormatProperties": { + "parameters": [ + "pointer", + "u32", + "u32", + "u32", + "u32", + "u32", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkQueueBindSparse": { + "parameters": [ + "pointer", + "u32", + "buffer", + "pointer" + ], + "result": "u32" + }, + "vkCreateFence": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyFence": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkResetFences": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "u32" + }, + "vkGetFenceStatus": { + "parameters": [ + "pointer", + "pointer" + ], + "result": "u32" + }, + "vkWaitForFences": { + "parameters": [ + "pointer", + "u32", + "buffer", + "u32", + "u64" + ], + "result": "u32" + }, + "vkCreateSemaphore": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroySemaphore": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreateEvent": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyEvent": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetEventStatus": { + "parameters": [ + "pointer", + "pointer" + ], + "result": "u32" + }, + "vkSetEvent": { + "parameters": [ + "pointer", + "pointer" + ], + "result": "u32" + }, + "vkResetEvent": { + "parameters": [ + "pointer", + "pointer" + ], + "result": "u32" + }, + "vkCreateQueryPool": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyQueryPool": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetQueryPoolResults": { + "parameters": [ + "pointer", + "pointer", + "u32", + "u32", + "usize", + "buffer", + "u64", + "u32" + ], + "result": "u32" + }, + "vkResetQueryPool": { + "parameters": [ + "pointer", + "pointer", + "u32", + "u32" + ], + "result": "void" + }, + "vkCreateBuffer": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyBuffer": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreateBufferView": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyBufferView": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreateImage": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyImage": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetImageSubresourceLayout": { + "parameters": [ + "pointer", + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkCreateImageView": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyImageView": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreateShaderModule": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyShaderModule": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreatePipelineCache": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyPipelineCache": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetPipelineCacheData": { + "parameters": [ + "pointer", + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkMergePipelineCaches": { + "parameters": [ + "pointer", + "pointer", + "u32", + "buffer" + ], + "result": "u32" + }, + "vkCreateGraphicsPipelines": { + "parameters": [ + "pointer", + "pointer", + "u32", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkCreateComputePipelines": { + "parameters": [ + "pointer", + "pointer", + "u32", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyPipeline": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreatePipelineLayout": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyPipelineLayout": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreateSampler": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroySampler": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreateDescriptorSetLayout": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyDescriptorSetLayout": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreateDescriptorPool": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyDescriptorPool": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkResetDescriptorPool": { + "parameters": [ + "pointer", + "pointer", + "u32" + ], + "result": "u32" + }, + "vkAllocateDescriptorSets": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkFreeDescriptorSets": { + "parameters": [ + "pointer", + "pointer", + "u32", + "buffer" + ], + "result": "u32" + }, + "vkUpdateDescriptorSets": { + "parameters": [ + "pointer", + "u32", + "buffer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCreateFramebuffer": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyFramebuffer": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreateRenderPass": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyRenderPass": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetRenderAreaGranularity": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCreateCommandPool": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyCommandPool": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkResetCommandPool": { + "parameters": [ + "pointer", + "pointer", + "u32" + ], + "result": "u32" + }, + "vkAllocateCommandBuffers": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkFreeCommandBuffers": { + "parameters": [ + "pointer", + "pointer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkBeginCommandBuffer": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "u32" + }, + "vkEndCommandBuffer": { + "parameters": [ + "pointer" + ], + "result": "u32" + }, + "vkResetCommandBuffer": { + "parameters": [ + "pointer", + "u32" + ], + "result": "u32" + }, + "vkCmdBindPipeline": { + "parameters": [ + "pointer", + "u32", + "pointer" + ], + "result": "void" + }, + "vkCmdSetViewport": { + "parameters": [ + "pointer", + "u32", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdSetScissor": { + "parameters": [ + "pointer", + "u32", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdSetLineWidth": { + "parameters": [ + "pointer", + "f32" + ], + "result": "void" + }, + "vkCmdSetDepthBias": { + "parameters": [ + "pointer", + "f32", + "f32", + "f32" + ], + "result": "void" + }, + "vkCmdSetBlendConstants": { + "parameters": [ + "pointer", + "f32" + ], + "result": "void" + }, + "vkCmdSetDepthBounds": { + "parameters": [ + "pointer", + "f32", + "f32" + ], + "result": "void" + }, + "vkCmdSetStencilCompareMask": { + "parameters": [ + "pointer", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdSetStencilWriteMask": { + "parameters": [ + "pointer", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdSetStencilReference": { + "parameters": [ + "pointer", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdBindDescriptorSets": { + "parameters": [ + "pointer", + "u32", + "pointer", + "u32", + "u32", + "buffer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdBindIndexBuffer": { + "parameters": [ + "pointer", + "pointer", + "u64", + "u32" + ], + "result": "void" + }, + "vkCmdBindVertexBuffers": { + "parameters": [ + "pointer", + "u32", + "u32", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkCmdDraw": { + "parameters": [ + "pointer", + "u32", + "u32", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdDrawIndexed": { + "parameters": [ + "pointer", + "u32", + "u32", + "u32", + "i32", + "u32" + ], + "result": "void" + }, + "vkCmdDrawIndirect": { + "parameters": [ + "pointer", + "pointer", + "u64", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdDrawIndexedIndirect": { + "parameters": [ + "pointer", + "pointer", + "u64", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdDispatch": { + "parameters": [ + "pointer", + "u32", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdDispatchIndirect": { + "parameters": [ + "pointer", + "pointer", + "u64" + ], + "result": "void" + }, + "vkCmdCopyBuffer": { + "parameters": [ + "pointer", + "pointer", + "pointer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdCopyImage": { + "parameters": [ + "pointer", + "pointer", + "u32", + "pointer", + "u32", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdBlitImage": { + "parameters": [ + "pointer", + "pointer", + "u32", + "pointer", + "u32", + "u32", + "buffer", + "u32" + ], + "result": "void" + }, + "vkCmdCopyBufferToImage": { + "parameters": [ + "pointer", + "pointer", + "pointer", + "u32", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdCopyImageToBuffer": { + "parameters": [ + "pointer", + "pointer", + "u32", + "pointer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdUpdateBuffer": { + "parameters": [ + "pointer", + "pointer", + "u64", + "u64", + "buffer" + ], + "result": "void" + }, + "vkCmdFillBuffer": { + "parameters": [ + "pointer", + "pointer", + "u64", + "u64", + "u32" + ], + "result": "void" + }, + "vkCmdClearColorImage": { + "parameters": [ + "pointer", + "pointer", + "u32", + "buffer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdClearDepthStencilImage": { + "parameters": [ + "pointer", + "pointer", + "u32", + "buffer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdClearAttachments": { + "parameters": [ + "pointer", + "u32", + "buffer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdResolveImage": { + "parameters": [ + "pointer", + "pointer", + "u32", + "pointer", + "u32", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdSetEvent": { + "parameters": [ + "pointer", + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdResetEvent": { + "parameters": [ + "pointer", + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdWaitEvents": { + "parameters": [ + "pointer", + "u32", + "buffer", + "u32", + "u32", + "u32", + "buffer", + "u32", + "buffer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdPipelineBarrier": { + "parameters": [ + "pointer", + "u32", + "u32", + "u32", + "u32", + "buffer", + "u32", + "buffer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdBeginQuery": { + "parameters": [ + "pointer", + "pointer", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdEndQuery": { + "parameters": [ + "pointer", + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdResetQueryPool": { + "parameters": [ + "pointer", + "pointer", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdWriteTimestamp": { + "parameters": [ + "pointer", + "u32", + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdCopyQueryPoolResults": { + "parameters": [ + "pointer", + "pointer", + "u32", + "u32", + "pointer", + "u64", + "u64", + "u32" + ], + "result": "void" + }, + "vkCmdPushConstants": { + "parameters": [ + "pointer", + "pointer", + "u32", + "u32", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdBeginRenderPass": { + "parameters": [ + "pointer", + "buffer", + "u32" + ], + "result": "void" + }, + "vkCmdNextSubpass": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdEndRenderPass": { + "parameters": [ + "pointer" + ], + "result": "void" + }, + "vkCmdExecuteCommands": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkDestroySurfaceKHR": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceSurfaceSupportKHR": { + "parameters": [ + "pointer", + "u32", + "pointer", + "buffer" + ], + "result": "u32" + }, + "vkGetPhysicalDeviceSurfaceCapabilitiesKHR": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "u32" + }, + "vkGetPhysicalDeviceSurfaceFormatsKHR": { + "parameters": [ + "pointer", + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkGetPhysicalDeviceSurfacePresentModesKHR": { + "parameters": [ + "pointer", + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkCreateSwapchainKHR": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroySwapchainKHR": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetSwapchainImagesKHR": { + "parameters": [ + "pointer", + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkAcquireNextImageKHR": { + "parameters": [ + "pointer", + "pointer", + "u64", + "pointer", + "pointer", + "buffer" + ], + "result": "u32" + }, + "vkQueuePresentKHR": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "u32" + }, + "vkGetPhysicalDeviceFeatures2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceProperties2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceFormatProperties2": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceImageFormatProperties2": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkGetPhysicalDeviceQueueFamilyProperties2": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceMemoryProperties2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceSparseImageFormatProperties2": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkTrimCommandPool": { + "parameters": [ + "pointer", + "pointer", + "u32" + ], + "result": "void" + }, + "vkGetPhysicalDeviceExternalBufferProperties": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceExternalSemaphoreProperties": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetPhysicalDeviceExternalFenceProperties": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkEnumeratePhysicalDeviceGroups": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkGetDeviceGroupPeerMemoryFeatures": { + "parameters": [ + "pointer", + "u32", + "u32", + "u32", + "buffer" + ], + "result": "void" + }, + "vkBindBufferMemory2": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "u32" + }, + "vkBindImageMemory2": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "u32" + }, + "vkCmdSetDeviceMask": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdDispatchBase": { + "parameters": [ + "pointer", + "u32", + "u32", + "u32", + "u32", + "u32", + "u32" + ], + "result": "void" + }, + "vkCreateDescriptorUpdateTemplate": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyDescriptorUpdateTemplate": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkUpdateDescriptorSetWithTemplate": { + "parameters": [ + "pointer", + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetBufferMemoryRequirements2": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetImageMemoryRequirements2": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetImageSparseMemoryRequirements2": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetDeviceBufferMemoryRequirements": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetDeviceImageMemoryRequirements": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetDeviceImageSparseMemoryRequirements": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkCreateSamplerYcbcrConversion": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroySamplerYcbcrConversion": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetDeviceQueue2": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkGetDescriptorSetLayoutSupport": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkCreateRenderPass2": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkCmdBeginRenderPass2": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkCmdNextSubpass2": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkCmdEndRenderPass2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkGetSemaphoreCounterValue": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "u32" + }, + "vkWaitSemaphores": { + "parameters": [ + "pointer", + "buffer", + "u64" + ], + "result": "u32" + }, + "vkSignalSemaphore": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "u32" + }, + "vkCmdDrawIndirectCount": { + "parameters": [ + "pointer", + "pointer", + "u64", + "pointer", + "u64", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdDrawIndexedIndirectCount": { + "parameters": [ + "pointer", + "pointer", + "u64", + "pointer", + "u64", + "u32", + "u32" + ], + "result": "void" + }, + "vkGetBufferOpaqueCaptureAddress": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "u64" + }, + "vkGetBufferDeviceAddress": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "u64" + }, + "vkGetDeviceMemoryOpaqueCaptureAddress": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "u64" + }, + "vkGetPhysicalDeviceToolProperties": { + "parameters": [ + "pointer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkCmdSetCullMode": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetFrontFace": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetPrimitiveTopology": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetViewportWithCount": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdSetScissorWithCount": { + "parameters": [ + "pointer", + "u32", + "buffer" + ], + "result": "void" + }, + "vkCmdBindVertexBuffers2": { + "parameters": [ + "pointer", + "u32", + "u32", + "buffer", + "buffer", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkCmdSetDepthTestEnable": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetDepthWriteEnable": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetDepthCompareOp": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetDepthBoundsTestEnable": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetStencilTestEnable": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetStencilOp": { + "parameters": [ + "pointer", + "u32", + "u32", + "u32", + "u32", + "u32" + ], + "result": "void" + }, + "vkCmdSetRasterizerDiscardEnable": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetDepthBiasEnable": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdSetPrimitiveRestartEnable": { + "parameters": [ + "pointer", + "u32" + ], + "result": "void" + }, + "vkCreatePrivateDataSlot": { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer" + ], + "result": "u32" + }, + "vkDestroyPrivateDataSlot": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkSetPrivateData": { + "parameters": [ + "pointer", + "u32", + "u64", + "pointer", + "u64" + ], + "result": "u32" + }, + "vkGetPrivateData": { + "parameters": [ + "pointer", + "u32", + "u64", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCmdCopyBuffer2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCmdCopyImage2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCmdBlitImage2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCmdCopyBufferToImage2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCmdCopyImageToBuffer2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCmdResolveImage2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCmdSetEvent2": { + "parameters": [ + "pointer", + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCmdResetEvent2": { + "parameters": [ + "pointer", + "pointer", + "u64" + ], + "result": "void" + }, + "vkCmdWaitEvents2": { + "parameters": [ + "pointer", + "u32", + "buffer", + "buffer" + ], + "result": "void" + }, + "vkCmdPipelineBarrier2": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkQueueSubmit2": { + "parameters": [ + "pointer", + "u32", + "buffer", + "pointer" + ], + "result": "u32" + }, + "vkCmdWriteTimestamp2": { + "parameters": [ + "pointer", + "u64", + "pointer", + "u32" + ], + "result": "void" + }, + "vkCmdBeginRendering": { + "parameters": [ + "pointer", + "buffer" + ], + "result": "void" + }, + "vkCmdEndRendering": { + "parameters": [ + "pointer" + ], + "result": "void" + }, +} as const).symbols; + +export class VulkanError extends Error { + constructor(public code: Result) { + super(`Vulkan error: ${code} (${Result[code]})`); + } +} + +/// Commands + +export function CreateInstance( + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pInstance: AnyBuffer, +): Result { + const ret = lib.vkCreateInstance( + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pInstance), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyInstance( + instance: Instance, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyInstance( + instance, + anyBuffer(pAllocator), + ); +} + +export function EnumeratePhysicalDevices( + instance: Instance, + pPhysicalDeviceCount: AnyBuffer, + pPhysicalDevices: AnyBuffer, +): Result { + const ret = lib.vkEnumeratePhysicalDevices( + instance, + anyBuffer(pPhysicalDeviceCount), + anyBuffer(pPhysicalDevices), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetDeviceProcAddr( + device: Device, + pName: AnyBuffer, +): Deno.PointerValue { + const ret = lib.vkGetDeviceProcAddr( + device, + anyBuffer(pName), + ); + return ret; +} + +export function GetInstanceProcAddr( + instance: Instance, + pName: AnyBuffer, +): Deno.PointerValue { + const ret = lib.vkGetInstanceProcAddr( + instance, + anyBuffer(pName), + ); + return ret; +} + +export function GetPhysicalDeviceProperties( + physicalDevice: PhysicalDevice, + pProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceProperties( + physicalDevice, + anyBuffer(pProperties), + ); +} + +export function GetPhysicalDeviceQueueFamilyProperties( + physicalDevice: PhysicalDevice, + pQueueFamilyPropertyCount: AnyBuffer, + pQueueFamilyProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceQueueFamilyProperties( + physicalDevice, + anyBuffer(pQueueFamilyPropertyCount), + anyBuffer(pQueueFamilyProperties), + ); +} + +export function GetPhysicalDeviceMemoryProperties( + physicalDevice: PhysicalDevice, + pMemoryProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceMemoryProperties( + physicalDevice, + anyBuffer(pMemoryProperties), + ); +} + +export function GetPhysicalDeviceFeatures( + physicalDevice: PhysicalDevice, + pFeatures: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceFeatures( + physicalDevice, + anyBuffer(pFeatures), + ); +} + +export function GetPhysicalDeviceFormatProperties( + physicalDevice: PhysicalDevice, + format: Format, + pFormatProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceFormatProperties( + physicalDevice, + format, + anyBuffer(pFormatProperties), + ); +} + +export function GetPhysicalDeviceImageFormatProperties( + physicalDevice: PhysicalDevice, + format: Format, + type: ImageType, + tiling: ImageTiling, + usage: ImageUsageFlags, + flags: ImageCreateFlags, + pImageFormatProperties: AnyBuffer, +): Result { + const ret = lib.vkGetPhysicalDeviceImageFormatProperties( + physicalDevice, + format, + type, + tiling, + usage, + flags, + anyBuffer(pImageFormatProperties), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CreateDevice( + physicalDevice: PhysicalDevice, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pDevice: AnyBuffer, +): Result { + const ret = lib.vkCreateDevice( + physicalDevice, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pDevice), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyDevice( + device: Device, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyDevice( + device, + anyBuffer(pAllocator), + ); +} + +export function EnumerateInstanceVersion( + pApiVersion: AnyBuffer, +): Result { + const ret = lib.vkEnumerateInstanceVersion( + anyBuffer(pApiVersion), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function EnumerateInstanceLayerProperties( + pPropertyCount: AnyBuffer, + pProperties: AnyBuffer, +): Result { + const ret = lib.vkEnumerateInstanceLayerProperties( + anyBuffer(pPropertyCount), + anyBuffer(pProperties), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function EnumerateInstanceExtensionProperties( + pLayerName: AnyBuffer, + pPropertyCount: AnyBuffer, + pProperties: AnyBuffer, +): Result { + const ret = lib.vkEnumerateInstanceExtensionProperties( + anyBuffer(pLayerName), + anyBuffer(pPropertyCount), + anyBuffer(pProperties), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function EnumerateDeviceLayerProperties( + physicalDevice: PhysicalDevice, + pPropertyCount: AnyBuffer, + pProperties: AnyBuffer, +): Result { + const ret = lib.vkEnumerateDeviceLayerProperties( + physicalDevice, + anyBuffer(pPropertyCount), + anyBuffer(pProperties), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function EnumerateDeviceExtensionProperties( + physicalDevice: PhysicalDevice, + pLayerName: AnyBuffer, + pPropertyCount: AnyBuffer, + pProperties: AnyBuffer, +): Result { + const ret = lib.vkEnumerateDeviceExtensionProperties( + physicalDevice, + anyBuffer(pLayerName), + anyBuffer(pPropertyCount), + anyBuffer(pProperties), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetDeviceQueue( + device: Device, + queueFamilyIndex: number, + queueIndex: number, + pQueue: AnyBuffer, +): void { + lib.vkGetDeviceQueue( + device, + queueFamilyIndex, + queueIndex, + anyBuffer(pQueue), + ); +} + +export function QueueSubmit( + queue: Queue, + submitCount: number, + pSubmits: AnyBuffer, + fence: Fence, +): Result { + const ret = lib.vkQueueSubmit( + queue, + submitCount, + anyBuffer(pSubmits), + fence, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function QueueWaitIdle( + queue: Queue, +): Result { + const ret = lib.vkQueueWaitIdle( + queue, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DeviceWaitIdle( + device: Device, +): Result { + const ret = lib.vkDeviceWaitIdle( + device, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function AllocateMemory( + device: Device, + pAllocateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pMemory: AnyBuffer, +): Result { + const ret = lib.vkAllocateMemory( + device, + anyBuffer(pAllocateInfo), + anyBuffer(pAllocator), + anyBuffer(pMemory), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function FreeMemory( + device: Device, + memory: DeviceMemory, + pAllocator: AnyBuffer, +): void { + lib.vkFreeMemory( + device, + memory, + anyBuffer(pAllocator), + ); +} + +export function MapMemory( + device: Device, + memory: DeviceMemory, + offset: DeviceSize, + size: DeviceSize, + flags: MemoryMapFlags, + ppData: AnyBuffer, +): Result { + const ret = lib.vkMapMemory( + device, + memory, + offset, + size, + flags, + anyBuffer(ppData), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function UnmapMemory( + device: Device, + memory: DeviceMemory, +): void { + lib.vkUnmapMemory( + device, + memory, + ); +} + +export function FlushMappedMemoryRanges( + device: Device, + memoryRangeCount: number, + pMemoryRanges: AnyBuffer, +): Result { + const ret = lib.vkFlushMappedMemoryRanges( + device, + memoryRangeCount, + anyBuffer(pMemoryRanges), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function InvalidateMappedMemoryRanges( + device: Device, + memoryRangeCount: number, + pMemoryRanges: AnyBuffer, +): Result { + const ret = lib.vkInvalidateMappedMemoryRanges( + device, + memoryRangeCount, + anyBuffer(pMemoryRanges), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetDeviceMemoryCommitment( + device: Device, + memory: DeviceMemory, + pCommittedMemoryInBytes: AnyBuffer, +): void { + lib.vkGetDeviceMemoryCommitment( + device, + memory, + anyBuffer(pCommittedMemoryInBytes), + ); +} + +export function GetBufferMemoryRequirements( + device: Device, + buffer: Buffer, + pMemoryRequirements: AnyBuffer, +): void { + lib.vkGetBufferMemoryRequirements( + device, + buffer, + anyBuffer(pMemoryRequirements), + ); +} + +export function BindBufferMemory( + device: Device, + buffer: Buffer, + memory: DeviceMemory, + memoryOffset: DeviceSize, +): Result { + const ret = lib.vkBindBufferMemory( + device, + buffer, + memory, + memoryOffset, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetImageMemoryRequirements( + device: Device, + image: Image, + pMemoryRequirements: AnyBuffer, +): void { + lib.vkGetImageMemoryRequirements( + device, + image, + anyBuffer(pMemoryRequirements), + ); +} + +export function BindImageMemory( + device: Device, + image: Image, + memory: DeviceMemory, + memoryOffset: DeviceSize, +): Result { + const ret = lib.vkBindImageMemory( + device, + image, + memory, + memoryOffset, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetImageSparseMemoryRequirements( + device: Device, + image: Image, + pSparseMemoryRequirementCount: AnyBuffer, + pSparseMemoryRequirements: AnyBuffer, +): void { + lib.vkGetImageSparseMemoryRequirements( + device, + image, + anyBuffer(pSparseMemoryRequirementCount), + anyBuffer(pSparseMemoryRequirements), + ); +} + +export function GetPhysicalDeviceSparseImageFormatProperties( + physicalDevice: PhysicalDevice, + format: Format, + type: ImageType, + samples: SampleCountFlagBits, + usage: ImageUsageFlags, + tiling: ImageTiling, + pPropertyCount: AnyBuffer, + pProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceSparseImageFormatProperties( + physicalDevice, + format, + type, + samples, + usage, + tiling, + anyBuffer(pPropertyCount), + anyBuffer(pProperties), + ); +} + +export function QueueBindSparse( + queue: Queue, + bindInfoCount: number, + pBindInfo: AnyBuffer, + fence: Fence, +): Result { + const ret = lib.vkQueueBindSparse( + queue, + bindInfoCount, + anyBuffer(pBindInfo), + fence, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CreateFence( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pFence: AnyBuffer, +): Result { + const ret = lib.vkCreateFence( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pFence), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyFence( + device: Device, + fence: Fence, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyFence( + device, + fence, + anyBuffer(pAllocator), + ); +} + +export function ResetFences( + device: Device, + fenceCount: number, + pFences: AnyBuffer, +): Result { + const ret = lib.vkResetFences( + device, + fenceCount, + anyBuffer(pFences), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetFenceStatus( + device: Device, + fence: Fence, +): Result { + const ret = lib.vkGetFenceStatus( + device, + fence, + ); + if (ret === Result.SUCCESS || ret === Result.NOT_READY) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function WaitForFences( + device: Device, + fenceCount: number, + pFences: AnyBuffer, + waitAll: Bool32, + timeout: number | bigint, +): Result { + const ret = lib.vkWaitForFences( + device, + fenceCount, + anyBuffer(pFences), + waitAll, + timeout, + ); + if (ret === Result.SUCCESS || ret === Result.TIMEOUT) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CreateSemaphore( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pSemaphore: AnyBuffer, +): Result { + const ret = lib.vkCreateSemaphore( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pSemaphore), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroySemaphore( + device: Device, + semaphore: Semaphore, + pAllocator: AnyBuffer, +): void { + lib.vkDestroySemaphore( + device, + semaphore, + anyBuffer(pAllocator), + ); +} + +export function CreateEvent( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pEvent: AnyBuffer, +): Result { + const ret = lib.vkCreateEvent( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pEvent), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyEvent( + device: Device, + event: Event, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyEvent( + device, + event, + anyBuffer(pAllocator), + ); +} + +export function GetEventStatus( + device: Device, + event: Event, +): Result { + const ret = lib.vkGetEventStatus( + device, + event, + ); + if (ret === Result.EVENT_SET || ret === Result.EVENT_RESET) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function SetEvent( + device: Device, + event: Event, +): Result { + const ret = lib.vkSetEvent( + device, + event, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function ResetEvent( + device: Device, + event: Event, +): Result { + const ret = lib.vkResetEvent( + device, + event, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CreateQueryPool( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pQueryPool: AnyBuffer, +): Result { + const ret = lib.vkCreateQueryPool( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pQueryPool), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyQueryPool( + device: Device, + queryPool: QueryPool, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyQueryPool( + device, + queryPool, + anyBuffer(pAllocator), + ); +} + +export function GetQueryPoolResults( + device: Device, + queryPool: QueryPool, + firstQuery: number, + queryCount: number, + dataSize: number | bigint, + pData: AnyBuffer, + stride: DeviceSize, + flags: QueryResultFlags, +): Result { + const ret = lib.vkGetQueryPoolResults( + device, + queryPool, + firstQuery, + queryCount, + dataSize, + anyBuffer(pData), + stride, + flags, + ); + if (ret === Result.SUCCESS || ret === Result.NOT_READY) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function ResetQueryPool( + device: Device, + queryPool: QueryPool, + firstQuery: number, + queryCount: number, +): void { + lib.vkResetQueryPool( + device, + queryPool, + firstQuery, + queryCount, + ); +} + +export function CreateBuffer( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pBuffer: AnyBuffer, +): Result { + const ret = lib.vkCreateBuffer( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pBuffer), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyBuffer( + device: Device, + buffer: Buffer, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyBuffer( + device, + buffer, + anyBuffer(pAllocator), + ); +} + +export function CreateBufferView( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pView: AnyBuffer, +): Result { + const ret = lib.vkCreateBufferView( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pView), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyBufferView( + device: Device, + bufferView: BufferView, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyBufferView( + device, + bufferView, + anyBuffer(pAllocator), + ); +} + +export function CreateImage( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pImage: AnyBuffer, +): Result { + const ret = lib.vkCreateImage( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pImage), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyImage( + device: Device, + image: Image, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyImage( + device, + image, + anyBuffer(pAllocator), + ); +} + +export function GetImageSubresourceLayout( + device: Device, + image: Image, + pSubresource: AnyBuffer, + pLayout: AnyBuffer, +): void { + lib.vkGetImageSubresourceLayout( + device, + image, + anyBuffer(pSubresource), + anyBuffer(pLayout), + ); +} + +export function CreateImageView( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pView: AnyBuffer, +): Result { + const ret = lib.vkCreateImageView( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pView), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyImageView( + device: Device, + imageView: ImageView, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyImageView( + device, + imageView, + anyBuffer(pAllocator), + ); +} + +export function CreateShaderModule( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pShaderModule: AnyBuffer, +): Result { + const ret = lib.vkCreateShaderModule( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pShaderModule), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyShaderModule( + device: Device, + shaderModule: ShaderModule, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyShaderModule( + device, + shaderModule, + anyBuffer(pAllocator), + ); +} + +export function CreatePipelineCache( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pPipelineCache: AnyBuffer, +): Result { + const ret = lib.vkCreatePipelineCache( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pPipelineCache), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyPipelineCache( + device: Device, + pipelineCache: PipelineCache, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyPipelineCache( + device, + pipelineCache, + anyBuffer(pAllocator), + ); +} + +export function GetPipelineCacheData( + device: Device, + pipelineCache: PipelineCache, + pDataSize: AnyBuffer, + pData: AnyBuffer, +): Result { + const ret = lib.vkGetPipelineCacheData( + device, + pipelineCache, + anyBuffer(pDataSize), + anyBuffer(pData), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function MergePipelineCaches( + device: Device, + dstCache: PipelineCache, + srcCacheCount: number, + pSrcCaches: AnyBuffer, +): Result { + const ret = lib.vkMergePipelineCaches( + device, + dstCache, + srcCacheCount, + anyBuffer(pSrcCaches), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CreateGraphicsPipelines( + device: Device, + pipelineCache: PipelineCache, + createInfoCount: number, + pCreateInfos: AnyBuffer, + pAllocator: AnyBuffer, + pPipelines: AnyBuffer, +): Result { + const ret = lib.vkCreateGraphicsPipelines( + device, + pipelineCache, + createInfoCount, + anyBuffer(pCreateInfos), + anyBuffer(pAllocator), + anyBuffer(pPipelines), + ); + if (ret === Result.SUCCESS || ret === Result.PIPELINE_COMPILE_REQUIRED_EXT) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CreateComputePipelines( + device: Device, + pipelineCache: PipelineCache, + createInfoCount: number, + pCreateInfos: AnyBuffer, + pAllocator: AnyBuffer, + pPipelines: AnyBuffer, +): Result { + const ret = lib.vkCreateComputePipelines( + device, + pipelineCache, + createInfoCount, + anyBuffer(pCreateInfos), + anyBuffer(pAllocator), + anyBuffer(pPipelines), + ); + if (ret === Result.SUCCESS || ret === Result.PIPELINE_COMPILE_REQUIRED_EXT) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyPipeline( + device: Device, + pipeline: Pipeline, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyPipeline( + device, + pipeline, + anyBuffer(pAllocator), + ); +} + +export function CreatePipelineLayout( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pPipelineLayout: AnyBuffer, +): Result { + const ret = lib.vkCreatePipelineLayout( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pPipelineLayout), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyPipelineLayout( + device: Device, + pipelineLayout: PipelineLayout, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyPipelineLayout( + device, + pipelineLayout, + anyBuffer(pAllocator), + ); +} + +export function CreateSampler( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pSampler: AnyBuffer, +): Result { + const ret = lib.vkCreateSampler( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pSampler), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroySampler( + device: Device, + sampler: Sampler, + pAllocator: AnyBuffer, +): void { + lib.vkDestroySampler( + device, + sampler, + anyBuffer(pAllocator), + ); +} + +export function CreateDescriptorSetLayout( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pSetLayout: AnyBuffer, +): Result { + const ret = lib.vkCreateDescriptorSetLayout( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pSetLayout), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyDescriptorSetLayout( + device: Device, + descriptorSetLayout: DescriptorSetLayout, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyDescriptorSetLayout( + device, + descriptorSetLayout, + anyBuffer(pAllocator), + ); +} + +export function CreateDescriptorPool( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pDescriptorPool: AnyBuffer, +): Result { + const ret = lib.vkCreateDescriptorPool( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pDescriptorPool), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyDescriptorPool( + device: Device, + descriptorPool: DescriptorPool, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyDescriptorPool( + device, + descriptorPool, + anyBuffer(pAllocator), + ); +} + +export function ResetDescriptorPool( + device: Device, + descriptorPool: DescriptorPool, + flags: DescriptorPoolResetFlags, +): Result { + const ret = lib.vkResetDescriptorPool( + device, + descriptorPool, + flags, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function AllocateDescriptorSets( + device: Device, + pAllocateInfo: AnyBuffer, + pDescriptorSets: AnyBuffer, +): Result { + const ret = lib.vkAllocateDescriptorSets( + device, + anyBuffer(pAllocateInfo), + anyBuffer(pDescriptorSets), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function FreeDescriptorSets( + device: Device, + descriptorPool: DescriptorPool, + descriptorSetCount: number, + pDescriptorSets: AnyBuffer, +): Result { + const ret = lib.vkFreeDescriptorSets( + device, + descriptorPool, + descriptorSetCount, + anyBuffer(pDescriptorSets), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function UpdateDescriptorSets( + device: Device, + descriptorWriteCount: number, + pDescriptorWrites: AnyBuffer, + descriptorCopyCount: number, + pDescriptorCopies: AnyBuffer, +): void { + lib.vkUpdateDescriptorSets( + device, + descriptorWriteCount, + anyBuffer(pDescriptorWrites), + descriptorCopyCount, + anyBuffer(pDescriptorCopies), + ); +} + +export function CreateFramebuffer( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pFramebuffer: AnyBuffer, +): Result { + const ret = lib.vkCreateFramebuffer( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pFramebuffer), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyFramebuffer( + device: Device, + framebuffer: Framebuffer, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyFramebuffer( + device, + framebuffer, + anyBuffer(pAllocator), + ); +} + +export function CreateRenderPass( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pRenderPass: AnyBuffer, +): Result { + const ret = lib.vkCreateRenderPass( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pRenderPass), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyRenderPass( + device: Device, + renderPass: RenderPass, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyRenderPass( + device, + renderPass, + anyBuffer(pAllocator), + ); +} + +export function GetRenderAreaGranularity( + device: Device, + renderPass: RenderPass, + pGranularity: AnyBuffer, +): void { + lib.vkGetRenderAreaGranularity( + device, + renderPass, + anyBuffer(pGranularity), + ); +} + +export function CreateCommandPool( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pCommandPool: AnyBuffer, +): Result { + const ret = lib.vkCreateCommandPool( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pCommandPool), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyCommandPool( + device: Device, + commandPool: CommandPool, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyCommandPool( + device, + commandPool, + anyBuffer(pAllocator), + ); +} + +export function ResetCommandPool( + device: Device, + commandPool: CommandPool, + flags: CommandPoolResetFlags, +): Result { + const ret = lib.vkResetCommandPool( + device, + commandPool, + flags, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function AllocateCommandBuffers( + device: Device, + pAllocateInfo: AnyBuffer, + pCommandBuffers: AnyBuffer, +): Result { + const ret = lib.vkAllocateCommandBuffers( + device, + anyBuffer(pAllocateInfo), + anyBuffer(pCommandBuffers), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function FreeCommandBuffers( + device: Device, + commandPool: CommandPool, + commandBufferCount: number, + pCommandBuffers: AnyBuffer, +): void { + lib.vkFreeCommandBuffers( + device, + commandPool, + commandBufferCount, + anyBuffer(pCommandBuffers), + ); +} + +export function BeginCommandBuffer( + commandBuffer: CommandBuffer, + pBeginInfo: AnyBuffer, +): Result { + const ret = lib.vkBeginCommandBuffer( + commandBuffer, + anyBuffer(pBeginInfo), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function EndCommandBuffer( + commandBuffer: CommandBuffer, +): Result { + const ret = lib.vkEndCommandBuffer( + commandBuffer, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function ResetCommandBuffer( + commandBuffer: CommandBuffer, + flags: CommandBufferResetFlags, +): Result { + const ret = lib.vkResetCommandBuffer( + commandBuffer, + flags, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CmdBindPipeline( + commandBuffer: CommandBuffer, + pipelineBindPoint: PipelineBindPoint, + pipeline: Pipeline, +): void { + lib.vkCmdBindPipeline( + commandBuffer, + pipelineBindPoint, + pipeline, + ); +} + +export function CmdSetViewport( + commandBuffer: CommandBuffer, + firstViewport: number, + viewportCount: number, + pViewports: AnyBuffer, +): void { + lib.vkCmdSetViewport( + commandBuffer, + firstViewport, + viewportCount, + anyBuffer(pViewports), + ); +} + +export function CmdSetScissor( + commandBuffer: CommandBuffer, + firstScissor: number, + scissorCount: number, + pScissors: AnyBuffer, +): void { + lib.vkCmdSetScissor( + commandBuffer, + firstScissor, + scissorCount, + anyBuffer(pScissors), + ); +} + +export function CmdSetLineWidth( + commandBuffer: CommandBuffer, + lineWidth: number, +): void { + lib.vkCmdSetLineWidth( + commandBuffer, + lineWidth, + ); +} + +export function CmdSetDepthBias( + commandBuffer: CommandBuffer, + depthBiasConstantFactor: number, + depthBiasClamp: number, + depthBiasSlopeFactor: number, +): void { + lib.vkCmdSetDepthBias( + commandBuffer, + depthBiasConstantFactor, + depthBiasClamp, + depthBiasSlopeFactor, + ); +} + +export function CmdSetBlendConstants( + commandBuffer: CommandBuffer, + blendConstants: number, +): void { + lib.vkCmdSetBlendConstants( + commandBuffer, + blendConstants, + ); +} + +export function CmdSetDepthBounds( + commandBuffer: CommandBuffer, + minDepthBounds: number, + maxDepthBounds: number, +): void { + lib.vkCmdSetDepthBounds( + commandBuffer, + minDepthBounds, + maxDepthBounds, + ); +} + +export function CmdSetStencilCompareMask( + commandBuffer: CommandBuffer, + faceMask: StencilFaceFlags, + compareMask: number, +): void { + lib.vkCmdSetStencilCompareMask( + commandBuffer, + faceMask, + compareMask, + ); +} + +export function CmdSetStencilWriteMask( + commandBuffer: CommandBuffer, + faceMask: StencilFaceFlags, + writeMask: number, +): void { + lib.vkCmdSetStencilWriteMask( + commandBuffer, + faceMask, + writeMask, + ); +} + +export function CmdSetStencilReference( + commandBuffer: CommandBuffer, + faceMask: StencilFaceFlags, + reference: number, +): void { + lib.vkCmdSetStencilReference( + commandBuffer, + faceMask, + reference, + ); +} + +export function CmdBindDescriptorSets( + commandBuffer: CommandBuffer, + pipelineBindPoint: PipelineBindPoint, + layout: PipelineLayout, + firstSet: number, + descriptorSetCount: number, + pDescriptorSets: AnyBuffer, + dynamicOffsetCount: number, + pDynamicOffsets: AnyBuffer, +): void { + lib.vkCmdBindDescriptorSets( + commandBuffer, + pipelineBindPoint, + layout, + firstSet, + descriptorSetCount, + anyBuffer(pDescriptorSets), + dynamicOffsetCount, + anyBuffer(pDynamicOffsets), + ); +} + +export function CmdBindIndexBuffer( + commandBuffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + indexType: IndexType, +): void { + lib.vkCmdBindIndexBuffer( + commandBuffer, + buffer, + offset, + indexType, + ); +} + +export function CmdBindVertexBuffers( + commandBuffer: CommandBuffer, + firstBinding: number, + bindingCount: number, + pBuffers: AnyBuffer, + pOffsets: AnyBuffer, +): void { + lib.vkCmdBindVertexBuffers( + commandBuffer, + firstBinding, + bindingCount, + anyBuffer(pBuffers), + anyBuffer(pOffsets), + ); +} + +export function CmdDraw( + commandBuffer: CommandBuffer, + vertexCount: number, + instanceCount: number, + firstVertex: number, + firstInstance: number, +): void { + lib.vkCmdDraw( + commandBuffer, + vertexCount, + instanceCount, + firstVertex, + firstInstance, + ); +} + +export function CmdDrawIndexed( + commandBuffer: CommandBuffer, + indexCount: number, + instanceCount: number, + firstIndex: number, + vertexOffset: number, + firstInstance: number, +): void { + lib.vkCmdDrawIndexed( + commandBuffer, + indexCount, + instanceCount, + firstIndex, + vertexOffset, + firstInstance, + ); +} + +export function CmdDrawIndirect( + commandBuffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + drawCount: number, + stride: number, +): void { + lib.vkCmdDrawIndirect( + commandBuffer, + buffer, + offset, + drawCount, + stride, + ); +} + +export function CmdDrawIndexedIndirect( + commandBuffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + drawCount: number, + stride: number, +): void { + lib.vkCmdDrawIndexedIndirect( + commandBuffer, + buffer, + offset, + drawCount, + stride, + ); +} + +export function CmdDispatch( + commandBuffer: CommandBuffer, + groupCountX: number, + groupCountY: number, + groupCountZ: number, +): void { + lib.vkCmdDispatch( + commandBuffer, + groupCountX, + groupCountY, + groupCountZ, + ); +} + +export function CmdDispatchIndirect( + commandBuffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, +): void { + lib.vkCmdDispatchIndirect( + commandBuffer, + buffer, + offset, + ); +} + +export function CmdCopyBuffer( + commandBuffer: CommandBuffer, + srcBuffer: Buffer, + dstBuffer: Buffer, + regionCount: number, + pRegions: AnyBuffer, +): void { + lib.vkCmdCopyBuffer( + commandBuffer, + srcBuffer, + dstBuffer, + regionCount, + anyBuffer(pRegions), + ); +} + +export function CmdCopyImage( + commandBuffer: CommandBuffer, + srcImage: Image, + srcImageLayout: ImageLayout, + dstImage: Image, + dstImageLayout: ImageLayout, + regionCount: number, + pRegions: AnyBuffer, +): void { + lib.vkCmdCopyImage( + commandBuffer, + srcImage, + srcImageLayout, + dstImage, + dstImageLayout, + regionCount, + anyBuffer(pRegions), + ); +} + +export function CmdBlitImage( + commandBuffer: CommandBuffer, + srcImage: Image, + srcImageLayout: ImageLayout, + dstImage: Image, + dstImageLayout: ImageLayout, + regionCount: number, + pRegions: AnyBuffer, + filter: Filter, +): void { + lib.vkCmdBlitImage( + commandBuffer, + srcImage, + srcImageLayout, + dstImage, + dstImageLayout, + regionCount, + anyBuffer(pRegions), + filter, + ); +} + +export function CmdCopyBufferToImage( + commandBuffer: CommandBuffer, + srcBuffer: Buffer, + dstImage: Image, + dstImageLayout: ImageLayout, + regionCount: number, + pRegions: AnyBuffer, +): void { + lib.vkCmdCopyBufferToImage( + commandBuffer, + srcBuffer, + dstImage, + dstImageLayout, + regionCount, + anyBuffer(pRegions), + ); +} + +export function CmdCopyImageToBuffer( + commandBuffer: CommandBuffer, + srcImage: Image, + srcImageLayout: ImageLayout, + dstBuffer: Buffer, + regionCount: number, + pRegions: AnyBuffer, +): void { + lib.vkCmdCopyImageToBuffer( + commandBuffer, + srcImage, + srcImageLayout, + dstBuffer, + regionCount, + anyBuffer(pRegions), + ); +} + +export function CmdUpdateBuffer( + commandBuffer: CommandBuffer, + dstBuffer: Buffer, + dstOffset: DeviceSize, + dataSize: DeviceSize, + pData: AnyBuffer, +): void { + lib.vkCmdUpdateBuffer( + commandBuffer, + dstBuffer, + dstOffset, + dataSize, + anyBuffer(pData), + ); +} + +/** transfer support is only available when VK_KHR_maintenance1 is enabled, as documented in valid usage language in the specification */ +export function CmdFillBuffer( + commandBuffer: CommandBuffer, + dstBuffer: Buffer, + dstOffset: DeviceSize, + size: DeviceSize, + data: number, +): void { + lib.vkCmdFillBuffer( + commandBuffer, + dstBuffer, + dstOffset, + size, + data, + ); +} + +export function CmdClearColorImage( + commandBuffer: CommandBuffer, + image: Image, + imageLayout: ImageLayout, + pColor: AnyBuffer, + rangeCount: number, + pRanges: AnyBuffer, +): void { + lib.vkCmdClearColorImage( + commandBuffer, + image, + imageLayout, + anyBuffer(pColor), + rangeCount, + anyBuffer(pRanges), + ); +} + +export function CmdClearDepthStencilImage( + commandBuffer: CommandBuffer, + image: Image, + imageLayout: ImageLayout, + pDepthStencil: AnyBuffer, + rangeCount: number, + pRanges: AnyBuffer, +): void { + lib.vkCmdClearDepthStencilImage( + commandBuffer, + image, + imageLayout, + anyBuffer(pDepthStencil), + rangeCount, + anyBuffer(pRanges), + ); +} + +export function CmdClearAttachments( + commandBuffer: CommandBuffer, + attachmentCount: number, + pAttachments: AnyBuffer, + rectCount: number, + pRects: AnyBuffer, +): void { + lib.vkCmdClearAttachments( + commandBuffer, + attachmentCount, + anyBuffer(pAttachments), + rectCount, + anyBuffer(pRects), + ); +} + +export function CmdResolveImage( + commandBuffer: CommandBuffer, + srcImage: Image, + srcImageLayout: ImageLayout, + dstImage: Image, + dstImageLayout: ImageLayout, + regionCount: number, + pRegions: AnyBuffer, +): void { + lib.vkCmdResolveImage( + commandBuffer, + srcImage, + srcImageLayout, + dstImage, + dstImageLayout, + regionCount, + anyBuffer(pRegions), + ); +} + +export function CmdSetEvent( + commandBuffer: CommandBuffer, + event: Event, + stageMask: PipelineStageFlags, +): void { + lib.vkCmdSetEvent( + commandBuffer, + event, + stageMask, + ); +} + +export function CmdResetEvent( + commandBuffer: CommandBuffer, + event: Event, + stageMask: PipelineStageFlags, +): void { + lib.vkCmdResetEvent( + commandBuffer, + event, + stageMask, + ); +} + +export function CmdWaitEvents( + commandBuffer: CommandBuffer, + eventCount: number, + pEvents: AnyBuffer, + srcStageMask: PipelineStageFlags, + dstStageMask: PipelineStageFlags, + memoryBarrierCount: number, + pMemoryBarriers: AnyBuffer, + bufferMemoryBarrierCount: number, + pBufferMemoryBarriers: AnyBuffer, + imageMemoryBarrierCount: number, + pImageMemoryBarriers: AnyBuffer, +): void { + lib.vkCmdWaitEvents( + commandBuffer, + eventCount, + anyBuffer(pEvents), + srcStageMask, + dstStageMask, + memoryBarrierCount, + anyBuffer(pMemoryBarriers), + bufferMemoryBarrierCount, + anyBuffer(pBufferMemoryBarriers), + imageMemoryBarrierCount, + anyBuffer(pImageMemoryBarriers), + ); +} + +export function CmdPipelineBarrier( + commandBuffer: CommandBuffer, + srcStageMask: PipelineStageFlags, + dstStageMask: PipelineStageFlags, + dependencyFlags: DependencyFlags, + memoryBarrierCount: number, + pMemoryBarriers: AnyBuffer, + bufferMemoryBarrierCount: number, + pBufferMemoryBarriers: AnyBuffer, + imageMemoryBarrierCount: number, + pImageMemoryBarriers: AnyBuffer, +): void { + lib.vkCmdPipelineBarrier( + commandBuffer, + srcStageMask, + dstStageMask, + dependencyFlags, + memoryBarrierCount, + anyBuffer(pMemoryBarriers), + bufferMemoryBarrierCount, + anyBuffer(pBufferMemoryBarriers), + imageMemoryBarrierCount, + anyBuffer(pImageMemoryBarriers), + ); +} + +export function CmdBeginQuery( + commandBuffer: CommandBuffer, + queryPool: QueryPool, + query: number, + flags: QueryControlFlags, +): void { + lib.vkCmdBeginQuery( + commandBuffer, + queryPool, + query, + flags, + ); +} + +export function CmdEndQuery( + commandBuffer: CommandBuffer, + queryPool: QueryPool, + query: number, +): void { + lib.vkCmdEndQuery( + commandBuffer, + queryPool, + query, + ); +} + +export function CmdResetQueryPool( + commandBuffer: CommandBuffer, + queryPool: QueryPool, + firstQuery: number, + queryCount: number, +): void { + lib.vkCmdResetQueryPool( + commandBuffer, + queryPool, + firstQuery, + queryCount, + ); +} + +export function CmdWriteTimestamp( + commandBuffer: CommandBuffer, + pipelineStage: PipelineStageFlagBits, + queryPool: QueryPool, + query: number, +): void { + lib.vkCmdWriteTimestamp( + commandBuffer, + pipelineStage, + queryPool, + query, + ); +} + +export function CmdCopyQueryPoolResults( + commandBuffer: CommandBuffer, + queryPool: QueryPool, + firstQuery: number, + queryCount: number, + dstBuffer: Buffer, + dstOffset: DeviceSize, + stride: DeviceSize, + flags: QueryResultFlags, +): void { + lib.vkCmdCopyQueryPoolResults( + commandBuffer, + queryPool, + firstQuery, + queryCount, + dstBuffer, + dstOffset, + stride, + flags, + ); +} + +export function CmdPushConstants( + commandBuffer: CommandBuffer, + layout: PipelineLayout, + stageFlags: ShaderStageFlags, + offset: number, + size: number, + pValues: AnyBuffer, +): void { + lib.vkCmdPushConstants( + commandBuffer, + layout, + stageFlags, + offset, + size, + anyBuffer(pValues), + ); +} + +export function CmdBeginRenderPass( + commandBuffer: CommandBuffer, + pRenderPassBegin: AnyBuffer, + contents: SubpassContents, +): void { + lib.vkCmdBeginRenderPass( + commandBuffer, + anyBuffer(pRenderPassBegin), + contents, + ); +} + +export function CmdNextSubpass( + commandBuffer: CommandBuffer, + contents: SubpassContents, +): void { + lib.vkCmdNextSubpass( + commandBuffer, + contents, + ); +} + +export function CmdEndRenderPass( + commandBuffer: CommandBuffer, +): void { + lib.vkCmdEndRenderPass( + commandBuffer, + ); +} + +export function CmdExecuteCommands( + commandBuffer: CommandBuffer, + commandBufferCount: number, + pCommandBuffers: AnyBuffer, +): void { + lib.vkCmdExecuteCommands( + commandBuffer, + commandBufferCount, + anyBuffer(pCommandBuffers), + ); +} + +export function DestroySurfaceKHR( + instance: Instance, + surface: SurfaceKHR, + pAllocator: AnyBuffer, +): void { + lib.vkDestroySurfaceKHR( + instance, + surface, + anyBuffer(pAllocator), + ); +} + +export function GetPhysicalDeviceSurfaceSupportKHR( + physicalDevice: PhysicalDevice, + queueFamilyIndex: number, + surface: SurfaceKHR, + pSupported: AnyBuffer, +): Result { + const ret = lib.vkGetPhysicalDeviceSurfaceSupportKHR( + physicalDevice, + queueFamilyIndex, + surface, + anyBuffer(pSupported), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetPhysicalDeviceSurfaceCapabilitiesKHR( + physicalDevice: PhysicalDevice, + surface: SurfaceKHR, + pSurfaceCapabilities: AnyBuffer, +): Result { + const ret = lib.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( + physicalDevice, + surface, + anyBuffer(pSurfaceCapabilities), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetPhysicalDeviceSurfaceFormatsKHR( + physicalDevice: PhysicalDevice, + surface: SurfaceKHR, + pSurfaceFormatCount: AnyBuffer, + pSurfaceFormats: AnyBuffer, +): Result { + const ret = lib.vkGetPhysicalDeviceSurfaceFormatsKHR( + physicalDevice, + surface, + anyBuffer(pSurfaceFormatCount), + anyBuffer(pSurfaceFormats), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetPhysicalDeviceSurfacePresentModesKHR( + physicalDevice: PhysicalDevice, + surface: SurfaceKHR, + pPresentModeCount: AnyBuffer, + pPresentModes: AnyBuffer, +): Result { + const ret = lib.vkGetPhysicalDeviceSurfacePresentModesKHR( + physicalDevice, + surface, + anyBuffer(pPresentModeCount), + anyBuffer(pPresentModes), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CreateSwapchainKHR( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pSwapchain: AnyBuffer, +): Result { + const ret = lib.vkCreateSwapchainKHR( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pSwapchain), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroySwapchainKHR( + device: Device, + swapchain: SwapchainKHR, + pAllocator: AnyBuffer, +): void { + lib.vkDestroySwapchainKHR( + device, + swapchain, + anyBuffer(pAllocator), + ); +} + +export function GetSwapchainImagesKHR( + device: Device, + swapchain: SwapchainKHR, + pSwapchainImageCount: AnyBuffer, + pSwapchainImages: AnyBuffer, +): Result { + const ret = lib.vkGetSwapchainImagesKHR( + device, + swapchain, + anyBuffer(pSwapchainImageCount), + anyBuffer(pSwapchainImages), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function AcquireNextImageKHR( + device: Device, + swapchain: SwapchainKHR, + timeout: number | bigint, + semaphore: Semaphore, + fence: Fence, + pImageIndex: AnyBuffer, +): Result { + const ret = lib.vkAcquireNextImageKHR( + device, + swapchain, + timeout, + semaphore, + fence, + anyBuffer(pImageIndex), + ); + if (ret === Result.SUCCESS || ret === Result.TIMEOUT || ret === Result.NOT_READY || ret === Result.SUBOPTIMAL_KHR) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function QueuePresentKHR( + queue: Queue, + pPresentInfo: AnyBuffer, +): Result { + const ret = lib.vkQueuePresentKHR( + queue, + anyBuffer(pPresentInfo), + ); + if (ret === Result.SUCCESS || ret === Result.SUBOPTIMAL_KHR) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetPhysicalDeviceFeatures2( + physicalDevice: PhysicalDevice, + pFeatures: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceFeatures2( + physicalDevice, + anyBuffer(pFeatures), + ); +} + +export function GetPhysicalDeviceProperties2( + physicalDevice: PhysicalDevice, + pProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceProperties2( + physicalDevice, + anyBuffer(pProperties), + ); +} + +export function GetPhysicalDeviceFormatProperties2( + physicalDevice: PhysicalDevice, + format: Format, + pFormatProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceFormatProperties2( + physicalDevice, + format, + anyBuffer(pFormatProperties), + ); +} + +export function GetPhysicalDeviceImageFormatProperties2( + physicalDevice: PhysicalDevice, + pImageFormatInfo: AnyBuffer, + pImageFormatProperties: AnyBuffer, +): Result { + const ret = lib.vkGetPhysicalDeviceImageFormatProperties2( + physicalDevice, + anyBuffer(pImageFormatInfo), + anyBuffer(pImageFormatProperties), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetPhysicalDeviceQueueFamilyProperties2( + physicalDevice: PhysicalDevice, + pQueueFamilyPropertyCount: AnyBuffer, + pQueueFamilyProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceQueueFamilyProperties2( + physicalDevice, + anyBuffer(pQueueFamilyPropertyCount), + anyBuffer(pQueueFamilyProperties), + ); +} + +export function GetPhysicalDeviceMemoryProperties2( + physicalDevice: PhysicalDevice, + pMemoryProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceMemoryProperties2( + physicalDevice, + anyBuffer(pMemoryProperties), + ); +} + +export function GetPhysicalDeviceSparseImageFormatProperties2( + physicalDevice: PhysicalDevice, + pFormatInfo: AnyBuffer, + pPropertyCount: AnyBuffer, + pProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceSparseImageFormatProperties2( + physicalDevice, + anyBuffer(pFormatInfo), + anyBuffer(pPropertyCount), + anyBuffer(pProperties), + ); +} + +export function TrimCommandPool( + device: Device, + commandPool: CommandPool, + flags: CommandPoolTrimFlags, +): void { + lib.vkTrimCommandPool( + device, + commandPool, + flags, + ); +} + +export function GetPhysicalDeviceExternalBufferProperties( + physicalDevice: PhysicalDevice, + pExternalBufferInfo: AnyBuffer, + pExternalBufferProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceExternalBufferProperties( + physicalDevice, + anyBuffer(pExternalBufferInfo), + anyBuffer(pExternalBufferProperties), + ); +} + +export function GetPhysicalDeviceExternalSemaphoreProperties( + physicalDevice: PhysicalDevice, + pExternalSemaphoreInfo: AnyBuffer, + pExternalSemaphoreProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceExternalSemaphoreProperties( + physicalDevice, + anyBuffer(pExternalSemaphoreInfo), + anyBuffer(pExternalSemaphoreProperties), + ); +} + +export function GetPhysicalDeviceExternalFenceProperties( + physicalDevice: PhysicalDevice, + pExternalFenceInfo: AnyBuffer, + pExternalFenceProperties: AnyBuffer, +): void { + lib.vkGetPhysicalDeviceExternalFenceProperties( + physicalDevice, + anyBuffer(pExternalFenceInfo), + anyBuffer(pExternalFenceProperties), + ); +} + +export function EnumeratePhysicalDeviceGroups( + instance: Instance, + pPhysicalDeviceGroupCount: AnyBuffer, + pPhysicalDeviceGroupProperties: AnyBuffer, +): Result { + const ret = lib.vkEnumeratePhysicalDeviceGroups( + instance, + anyBuffer(pPhysicalDeviceGroupCount), + anyBuffer(pPhysicalDeviceGroupProperties), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetDeviceGroupPeerMemoryFeatures( + device: Device, + heapIndex: number, + localDeviceIndex: number, + remoteDeviceIndex: number, + pPeerMemoryFeatures: AnyBuffer, +): void { + lib.vkGetDeviceGroupPeerMemoryFeatures( + device, + heapIndex, + localDeviceIndex, + remoteDeviceIndex, + anyBuffer(pPeerMemoryFeatures), + ); +} + +export function BindBufferMemory2( + device: Device, + bindInfoCount: number, + pBindInfos: AnyBuffer, +): Result { + const ret = lib.vkBindBufferMemory2( + device, + bindInfoCount, + anyBuffer(pBindInfos), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function BindImageMemory2( + device: Device, + bindInfoCount: number, + pBindInfos: AnyBuffer, +): Result { + const ret = lib.vkBindImageMemory2( + device, + bindInfoCount, + anyBuffer(pBindInfos), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CmdSetDeviceMask( + commandBuffer: CommandBuffer, + deviceMask: number, +): void { + lib.vkCmdSetDeviceMask( + commandBuffer, + deviceMask, + ); +} + +export function CmdDispatchBase( + commandBuffer: CommandBuffer, + baseGroupX: number, + baseGroupY: number, + baseGroupZ: number, + groupCountX: number, + groupCountY: number, + groupCountZ: number, +): void { + lib.vkCmdDispatchBase( + commandBuffer, + baseGroupX, + baseGroupY, + baseGroupZ, + groupCountX, + groupCountY, + groupCountZ, + ); +} + +export function CreateDescriptorUpdateTemplate( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pDescriptorUpdateTemplate: AnyBuffer, +): Result { + const ret = lib.vkCreateDescriptorUpdateTemplate( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pDescriptorUpdateTemplate), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyDescriptorUpdateTemplate( + device: Device, + descriptorUpdateTemplate: DescriptorUpdateTemplate, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyDescriptorUpdateTemplate( + device, + descriptorUpdateTemplate, + anyBuffer(pAllocator), + ); +} + +export function UpdateDescriptorSetWithTemplate( + device: Device, + descriptorSet: DescriptorSet, + descriptorUpdateTemplate: DescriptorUpdateTemplate, + pData: AnyBuffer, +): void { + lib.vkUpdateDescriptorSetWithTemplate( + device, + descriptorSet, + descriptorUpdateTemplate, + anyBuffer(pData), + ); +} + +export function GetBufferMemoryRequirements2( + device: Device, + pInfo: AnyBuffer, + pMemoryRequirements: AnyBuffer, +): void { + lib.vkGetBufferMemoryRequirements2( + device, + anyBuffer(pInfo), + anyBuffer(pMemoryRequirements), + ); +} + +export function GetImageMemoryRequirements2( + device: Device, + pInfo: AnyBuffer, + pMemoryRequirements: AnyBuffer, +): void { + lib.vkGetImageMemoryRequirements2( + device, + anyBuffer(pInfo), + anyBuffer(pMemoryRequirements), + ); +} + +export function GetImageSparseMemoryRequirements2( + device: Device, + pInfo: AnyBuffer, + pSparseMemoryRequirementCount: AnyBuffer, + pSparseMemoryRequirements: AnyBuffer, +): void { + lib.vkGetImageSparseMemoryRequirements2( + device, + anyBuffer(pInfo), + anyBuffer(pSparseMemoryRequirementCount), + anyBuffer(pSparseMemoryRequirements), + ); +} + +export function GetDeviceBufferMemoryRequirements( + device: Device, + pInfo: AnyBuffer, + pMemoryRequirements: AnyBuffer, +): void { + lib.vkGetDeviceBufferMemoryRequirements( + device, + anyBuffer(pInfo), + anyBuffer(pMemoryRequirements), + ); +} + +export function GetDeviceImageMemoryRequirements( + device: Device, + pInfo: AnyBuffer, + pMemoryRequirements: AnyBuffer, +): void { + lib.vkGetDeviceImageMemoryRequirements( + device, + anyBuffer(pInfo), + anyBuffer(pMemoryRequirements), + ); +} + +export function GetDeviceImageSparseMemoryRequirements( + device: Device, + pInfo: AnyBuffer, + pSparseMemoryRequirementCount: AnyBuffer, + pSparseMemoryRequirements: AnyBuffer, +): void { + lib.vkGetDeviceImageSparseMemoryRequirements( + device, + anyBuffer(pInfo), + anyBuffer(pSparseMemoryRequirementCount), + anyBuffer(pSparseMemoryRequirements), + ); +} + +export function CreateSamplerYcbcrConversion( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pYcbcrConversion: AnyBuffer, +): Result { + const ret = lib.vkCreateSamplerYcbcrConversion( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pYcbcrConversion), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroySamplerYcbcrConversion( + device: Device, + ycbcrConversion: SamplerYcbcrConversion, + pAllocator: AnyBuffer, +): void { + lib.vkDestroySamplerYcbcrConversion( + device, + ycbcrConversion, + anyBuffer(pAllocator), + ); +} + +export function GetDeviceQueue2( + device: Device, + pQueueInfo: AnyBuffer, + pQueue: AnyBuffer, +): void { + lib.vkGetDeviceQueue2( + device, + anyBuffer(pQueueInfo), + anyBuffer(pQueue), + ); +} + +export function GetDescriptorSetLayoutSupport( + device: Device, + pCreateInfo: AnyBuffer, + pSupport: AnyBuffer, +): void { + lib.vkGetDescriptorSetLayoutSupport( + device, + anyBuffer(pCreateInfo), + anyBuffer(pSupport), + ); +} + +export function CreateRenderPass2( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pRenderPass: AnyBuffer, +): Result { + const ret = lib.vkCreateRenderPass2( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pRenderPass), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CmdBeginRenderPass2( + commandBuffer: CommandBuffer, + pRenderPassBegin: AnyBuffer, + pSubpassBeginInfo: AnyBuffer, +): void { + lib.vkCmdBeginRenderPass2( + commandBuffer, + anyBuffer(pRenderPassBegin), + anyBuffer(pSubpassBeginInfo), + ); +} + +export function CmdNextSubpass2( + commandBuffer: CommandBuffer, + pSubpassBeginInfo: AnyBuffer, + pSubpassEndInfo: AnyBuffer, +): void { + lib.vkCmdNextSubpass2( + commandBuffer, + anyBuffer(pSubpassBeginInfo), + anyBuffer(pSubpassEndInfo), + ); +} + +export function CmdEndRenderPass2( + commandBuffer: CommandBuffer, + pSubpassEndInfo: AnyBuffer, +): void { + lib.vkCmdEndRenderPass2( + commandBuffer, + anyBuffer(pSubpassEndInfo), + ); +} + +export function GetSemaphoreCounterValue( + device: Device, + semaphore: Semaphore, + pValue: AnyBuffer, +): Result { + const ret = lib.vkGetSemaphoreCounterValue( + device, + semaphore, + anyBuffer(pValue), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function WaitSemaphores( + device: Device, + pWaitInfo: AnyBuffer, + timeout: number | bigint, +): Result { + const ret = lib.vkWaitSemaphores( + device, + anyBuffer(pWaitInfo), + timeout, + ); + if (ret === Result.SUCCESS || ret === Result.TIMEOUT) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function SignalSemaphore( + device: Device, + pSignalInfo: AnyBuffer, +): Result { + const ret = lib.vkSignalSemaphore( + device, + anyBuffer(pSignalInfo), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CmdDrawIndirectCount( + commandBuffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + countBuffer: Buffer, + countBufferOffset: DeviceSize, + maxDrawCount: number, + stride: number, +): void { + lib.vkCmdDrawIndirectCount( + commandBuffer, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride, + ); +} + +export function CmdDrawIndexedIndirectCount( + commandBuffer: CommandBuffer, + buffer: Buffer, + offset: DeviceSize, + countBuffer: Buffer, + countBufferOffset: DeviceSize, + maxDrawCount: number, + stride: number, +): void { + lib.vkCmdDrawIndexedIndirectCount( + commandBuffer, + buffer, + offset, + countBuffer, + countBufferOffset, + maxDrawCount, + stride, + ); +} + +export function GetBufferOpaqueCaptureAddress( + device: Device, + pInfo: AnyBuffer, +): number | bigint { + const ret = lib.vkGetBufferOpaqueCaptureAddress( + device, + anyBuffer(pInfo), + ); + return ret; +} + +export function GetBufferDeviceAddress( + device: Device, + pInfo: AnyBuffer, +): DeviceAddress { + const ret = lib.vkGetBufferDeviceAddress( + device, + anyBuffer(pInfo), + ); + return ret; +} + +export function GetDeviceMemoryOpaqueCaptureAddress( + device: Device, + pInfo: AnyBuffer, +): number | bigint { + const ret = lib.vkGetDeviceMemoryOpaqueCaptureAddress( + device, + anyBuffer(pInfo), + ); + return ret; +} + +export function GetPhysicalDeviceToolProperties( + physicalDevice: PhysicalDevice, + pToolCount: AnyBuffer, + pToolProperties: AnyBuffer, +): Result { + const ret = lib.vkGetPhysicalDeviceToolProperties( + physicalDevice, + anyBuffer(pToolCount), + anyBuffer(pToolProperties), + ); + if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CmdSetCullMode( + commandBuffer: CommandBuffer, + cullMode: CullModeFlags, +): void { + lib.vkCmdSetCullMode( + commandBuffer, + cullMode, + ); +} + +export function CmdSetFrontFace( + commandBuffer: CommandBuffer, + frontFace: FrontFace, +): void { + lib.vkCmdSetFrontFace( + commandBuffer, + frontFace, + ); +} + +export function CmdSetPrimitiveTopology( + commandBuffer: CommandBuffer, + primitiveTopology: PrimitiveTopology, +): void { + lib.vkCmdSetPrimitiveTopology( + commandBuffer, + primitiveTopology, + ); +} + +export function CmdSetViewportWithCount( + commandBuffer: CommandBuffer, + viewportCount: number, + pViewports: AnyBuffer, +): void { + lib.vkCmdSetViewportWithCount( + commandBuffer, + viewportCount, + anyBuffer(pViewports), + ); +} + +export function CmdSetScissorWithCount( + commandBuffer: CommandBuffer, + scissorCount: number, + pScissors: AnyBuffer, +): void { + lib.vkCmdSetScissorWithCount( + commandBuffer, + scissorCount, + anyBuffer(pScissors), + ); +} + +export function CmdBindVertexBuffers2( + commandBuffer: CommandBuffer, + firstBinding: number, + bindingCount: number, + pBuffers: AnyBuffer, + pOffsets: AnyBuffer, + pSizes: AnyBuffer, + pStrides: AnyBuffer, +): void { + lib.vkCmdBindVertexBuffers2( + commandBuffer, + firstBinding, + bindingCount, + anyBuffer(pBuffers), + anyBuffer(pOffsets), + anyBuffer(pSizes), + anyBuffer(pStrides), + ); +} + +export function CmdSetDepthTestEnable( + commandBuffer: CommandBuffer, + depthTestEnable: Bool32, +): void { + lib.vkCmdSetDepthTestEnable( + commandBuffer, + depthTestEnable, + ); +} + +export function CmdSetDepthWriteEnable( + commandBuffer: CommandBuffer, + depthWriteEnable: Bool32, +): void { + lib.vkCmdSetDepthWriteEnable( + commandBuffer, + depthWriteEnable, + ); +} + +export function CmdSetDepthCompareOp( + commandBuffer: CommandBuffer, + depthCompareOp: CompareOp, +): void { + lib.vkCmdSetDepthCompareOp( + commandBuffer, + depthCompareOp, + ); +} + +export function CmdSetDepthBoundsTestEnable( + commandBuffer: CommandBuffer, + depthBoundsTestEnable: Bool32, +): void { + lib.vkCmdSetDepthBoundsTestEnable( + commandBuffer, + depthBoundsTestEnable, + ); +} + +export function CmdSetStencilTestEnable( + commandBuffer: CommandBuffer, + stencilTestEnable: Bool32, +): void { + lib.vkCmdSetStencilTestEnable( + commandBuffer, + stencilTestEnable, + ); +} + +export function CmdSetStencilOp( + commandBuffer: CommandBuffer, + faceMask: StencilFaceFlags, + failOp: StencilOp, + passOp: StencilOp, + depthFailOp: StencilOp, + compareOp: CompareOp, +): void { + lib.vkCmdSetStencilOp( + commandBuffer, + faceMask, + failOp, + passOp, + depthFailOp, + compareOp, + ); +} + +export function CmdSetRasterizerDiscardEnable( + commandBuffer: CommandBuffer, + rasterizerDiscardEnable: Bool32, +): void { + lib.vkCmdSetRasterizerDiscardEnable( + commandBuffer, + rasterizerDiscardEnable, + ); +} + +export function CmdSetDepthBiasEnable( + commandBuffer: CommandBuffer, + depthBiasEnable: Bool32, +): void { + lib.vkCmdSetDepthBiasEnable( + commandBuffer, + depthBiasEnable, + ); +} + +export function CmdSetPrimitiveRestartEnable( + commandBuffer: CommandBuffer, + primitiveRestartEnable: Bool32, +): void { + lib.vkCmdSetPrimitiveRestartEnable( + commandBuffer, + primitiveRestartEnable, + ); +} + +export function CreatePrivateDataSlot( + device: Device, + pCreateInfo: AnyBuffer, + pAllocator: AnyBuffer, + pPrivateDataSlot: AnyBuffer, +): Result { + const ret = lib.vkCreatePrivateDataSlot( + device, + anyBuffer(pCreateInfo), + anyBuffer(pAllocator), + anyBuffer(pPrivateDataSlot), + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function DestroyPrivateDataSlot( + device: Device, + privateDataSlot: PrivateDataSlot, + pAllocator: AnyBuffer, +): void { + lib.vkDestroyPrivateDataSlot( + device, + privateDataSlot, + anyBuffer(pAllocator), + ); +} + +export function SetPrivateData( + device: Device, + objectType: ObjectType, + objectHandle: number | bigint, + privateDataSlot: PrivateDataSlot, + data: number | bigint, +): Result { + const ret = lib.vkSetPrivateData( + device, + objectType, + objectHandle, + privateDataSlot, + data, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function GetPrivateData( + device: Device, + objectType: ObjectType, + objectHandle: number | bigint, + privateDataSlot: PrivateDataSlot, + pData: AnyBuffer, +): void { + lib.vkGetPrivateData( + device, + objectType, + objectHandle, + privateDataSlot, + anyBuffer(pData), + ); +} + +export function CmdCopyBuffer2( + commandBuffer: CommandBuffer, + pCopyBufferInfo: AnyBuffer, +): void { + lib.vkCmdCopyBuffer2( + commandBuffer, + anyBuffer(pCopyBufferInfo), + ); +} + +export function CmdCopyImage2( + commandBuffer: CommandBuffer, + pCopyImageInfo: AnyBuffer, +): void { + lib.vkCmdCopyImage2( + commandBuffer, + anyBuffer(pCopyImageInfo), + ); +} + +export function CmdBlitImage2( + commandBuffer: CommandBuffer, + pBlitImageInfo: AnyBuffer, +): void { + lib.vkCmdBlitImage2( + commandBuffer, + anyBuffer(pBlitImageInfo), + ); +} + +export function CmdCopyBufferToImage2( + commandBuffer: CommandBuffer, + pCopyBufferToImageInfo: AnyBuffer, +): void { + lib.vkCmdCopyBufferToImage2( + commandBuffer, + anyBuffer(pCopyBufferToImageInfo), + ); +} + +export function CmdCopyImageToBuffer2( + commandBuffer: CommandBuffer, + pCopyImageToBufferInfo: AnyBuffer, +): void { + lib.vkCmdCopyImageToBuffer2( + commandBuffer, + anyBuffer(pCopyImageToBufferInfo), + ); +} + +export function CmdResolveImage2( + commandBuffer: CommandBuffer, + pResolveImageInfo: AnyBuffer, +): void { + lib.vkCmdResolveImage2( + commandBuffer, + anyBuffer(pResolveImageInfo), + ); +} + +export function CmdSetEvent2( + commandBuffer: CommandBuffer, + event: Event, + pDependencyInfo: AnyBuffer, +): void { + lib.vkCmdSetEvent2( + commandBuffer, + event, + anyBuffer(pDependencyInfo), + ); +} + +export function CmdResetEvent2( + commandBuffer: CommandBuffer, + event: Event, + stageMask: PipelineStageFlags2, +): void { + lib.vkCmdResetEvent2( + commandBuffer, + event, + stageMask, + ); +} + +export function CmdWaitEvents2( + commandBuffer: CommandBuffer, + eventCount: number, + pEvents: AnyBuffer, + pDependencyInfos: AnyBuffer, +): void { + lib.vkCmdWaitEvents2( + commandBuffer, + eventCount, + anyBuffer(pEvents), + anyBuffer(pDependencyInfos), + ); +} + +export function CmdPipelineBarrier2( + commandBuffer: CommandBuffer, + pDependencyInfo: AnyBuffer, +): void { + lib.vkCmdPipelineBarrier2( + commandBuffer, + anyBuffer(pDependencyInfo), + ); +} + +export function QueueSubmit2( + queue: Queue, + submitCount: number, + pSubmits: AnyBuffer, + fence: Fence, +): Result { + const ret = lib.vkQueueSubmit2( + queue, + submitCount, + anyBuffer(pSubmits), + fence, + ); + if (ret === Result.SUCCESS) { + return ret; + } else { + throw new VulkanError(ret as Result); + } +} + +export function CmdWriteTimestamp2( + commandBuffer: CommandBuffer, + stage: PipelineStageFlags2, + queryPool: QueryPool, + query: number, +): void { + lib.vkCmdWriteTimestamp2( + commandBuffer, + stage, + queryPool, + query, + ); +} + +export function CmdBeginRendering( + commandBuffer: CommandBuffer, + pRenderingInfo: AnyBuffer, +): void { + lib.vkCmdBeginRendering( + commandBuffer, + anyBuffer(pRenderingInfo), + ); +} + +export function CmdEndRendering( + commandBuffer: CommandBuffer, +): void { + lib.vkCmdEndRendering( + commandBuffer, + ); +} \ No newline at end of file diff --git a/api/constant.ts b/api/constant.ts new file mode 100644 index 0000000..a573601 --- /dev/null +++ b/api/constant.ts @@ -0,0 +1,2107 @@ +/// Constants + +/// API Constants +/// Vulkan hardcoded constants - not an enumerated type, part of the header boilerplate + +export const MAX_PHYSICAL_DEVICE_NAME_SIZE = 256; +export const UUID_SIZE = 16; +export const LUID_SIZE = 8; +export const LUID_SIZE_KHR = undefined; +export const MAX_EXTENSION_NAME_SIZE = 256; +export const MAX_DESCRIPTION_SIZE = 256; +export const MAX_MEMORY_TYPES = 32; +/** The maximum number of unique memory heaps, each of which supporting 1 or more memory types */ +export const MAX_MEMORY_HEAPS = 16; +export const LOD_CLAMP_NONE = 1000.0; +export const REMAINING_MIP_LEVELS = (~0); +export const REMAINING_ARRAY_LAYERS = (~0); +export const WHOLE_SIZE = (~0n); +export const ATTACHMENT_UNUSED = (~0); +export const TRUE = 1; +export const FALSE = 0; +export const QUEUE_FAMILY_IGNORED = (~0); +export const QUEUE_FAMILY_EXTERNAL = (~1); +export const QUEUE_FAMILY_EXTERNAL_KHR = undefined; +export const QUEUE_FAMILY_FOREIGN_EXT = (~2); +export const SUBPASS_EXTERNAL = (~0); +export const MAX_DEVICE_GROUP_SIZE = 32; +export const MAX_DEVICE_GROUP_SIZE_KHR = undefined; +export const MAX_DRIVER_NAME_SIZE = 256; +export const MAX_DRIVER_NAME_SIZE_KHR = undefined; +export const MAX_DRIVER_INFO_SIZE = 256; +export const MAX_DRIVER_INFO_SIZE_KHR = undefined; +export const SHADER_UNUSED_KHR = (~0); +export const SHADER_UNUSED_NV = undefined; +export const MAX_GLOBAL_PRIORITY_SIZE_KHR = 16; +export const MAX_GLOBAL_PRIORITY_SIZE_EXT = undefined; +export const MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT = 32; + +/// vulkan_video_codec_h264std + +export const STD_VIDEO_H264_CPB_CNT_LIST_SIZE = 32; +export const STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS = 6; +export const STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS = 16; +export const STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS = 6; +export const STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS = 64; +export const STD_VIDEO_H264_MAX_NUM_LIST_REF = 32; +export const STD_VIDEO_H264_MAX_CHROMA_PLANES = 2; + +/// vulkan_video_codec_h264std_decode + +export const STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_decode"; +export const STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE = 2; + +/// vulkan_video_codec_h264std_encode + +export const STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_encode"; + +/// vulkan_video_codec_h265std + +export const STD_VIDEO_H265_CPB_CNT_LIST_SIZE = 32; +export const STD_VIDEO_H265_SUBLAYERS_LIST_SIZE = 7; +export const STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS = 6; +export const STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS = 16; +export const STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS = 6; +export const STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS = 64; +export const STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS = 6; +export const STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS = 64; +export const STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS = 2; +export const STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS = 64; +export const STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE = 6; +export const STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE = 19; +export const STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE = 21; +export const STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE = 3; +export const STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE = 128; +export const STD_VIDEO_H265_MAX_NUM_LIST_REF = 15; +export const STD_VIDEO_H265_MAX_CHROMA_PLANES = 2; +export const STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS = 64; +export const STD_VIDEO_H265_MAX_DPB_SIZE = 16; +export const STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS = 32; +export const STD_VIDEO_H265_MAX_LONG_TERM_PICS = 16; +export const STD_VIDEO_H265_MAX_DELTA_POC = 48; + +/// vulkan_video_codec_h265std_decode + +export const STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_decode"; +export const STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE = 8; + +/// vulkan_video_codec_h265std_encode + +export const STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_encode"; + +/// VK_KHR_surface + +export const KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"; + +/// VK_KHR_swapchain + +export const KHR_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_swapchain"; + +/// VK_KHR_display + +export const KHR_DISPLAY_EXTENSION_NAME = "VK_KHR_display"; + +/// VK_KHR_display_swapchain + +export const KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_display_swapchain"; + +/// VK_KHR_xlib_surface + +export const KHR_XLIB_SURFACE_EXTENSION_NAME = "VK_KHR_xlib_surface"; + +/// VK_KHR_xcb_surface + +export const KHR_XCB_SURFACE_EXTENSION_NAME = "VK_KHR_xcb_surface"; + +/// VK_KHR_wayland_surface + +export const KHR_WAYLAND_SURFACE_EXTENSION_NAME = "VK_KHR_wayland_surface"; + +/// VK_KHR_mir_surface + +export const KHR_MIR_SURFACE_EXTENSION_NAME = "VK_KHR_mir_surface"; + +/// VK_KHR_android_surface + +export const KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"; + +/// VK_KHR_win32_surface + +export const KHR_WIN32_SURFACE_EXTENSION_NAME = "VK_KHR_win32_surface"; + +/// VK_ANDROID_native_buffer + +export const ANDROID_NATIVE_BUFFER_NUMBER = 11; +export const ANDROID_NATIVE_BUFFER_EXTENSION_NAME = "VK_ANDROID_native_buffer"; + +/// VK_EXT_debug_report + +export const EXT_DEBUG_REPORT_EXTENSION_NAME = "VK_EXT_debug_report"; + +/// VK_NV_glsl_shader + +export const NV_GLSL_SHADER_EXTENSION_NAME = "VK_NV_glsl_shader"; + +/// VK_EXT_depth_range_unrestricted + +export const EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME = "VK_EXT_depth_range_unrestricted"; + +/// VK_KHR_sampler_mirror_clamp_to_edge + +export const KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME = "VK_KHR_sampler_mirror_clamp_to_edge"; + +/// VK_IMG_filter_cubic + +export const IMG_FILTER_CUBIC_EXTENSION_NAME = "VK_IMG_filter_cubic"; + +/// VK_AMD_extension_17 + +export const AMD_EXTENSION_17_EXTENSION_NAME = "VK_AMD_extension_17"; + +/// VK_AMD_extension_18 + +export const AMD_EXTENSION_18_EXTENSION_NAME = "VK_AMD_extension_18"; + +/// VK_AMD_rasterization_order + +export const AMD_RASTERIZATION_ORDER_EXTENSION_NAME = "VK_AMD_rasterization_order"; + +/// VK_AMD_extension_20 + +export const AMD_EXTENSION_20_EXTENSION_NAME = "VK_AMD_extension_20"; + +/// VK_AMD_shader_trinary_minmax + +export const AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME = "VK_AMD_shader_trinary_minmax"; + +/// VK_AMD_shader_explicit_vertex_parameter + +export const AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME = "VK_AMD_shader_explicit_vertex_parameter"; + +/// VK_EXT_debug_marker + +export const EXT_DEBUG_MARKER_EXTENSION_NAME = "VK_EXT_debug_marker"; + +/// VK_KHR_video_queue + +export const KHR_VIDEO_QUEUE_EXTENSION_NAME = "VK_KHR_video_queue"; + +/// VK_KHR_video_decode_queue + +export const KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_decode_queue"; + +/// VK_AMD_gcn_shader + +export const AMD_GCN_SHADER_EXTENSION_NAME = "VK_AMD_gcn_shader"; + +/// VK_NV_dedicated_allocation + +export const NV_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_NV_dedicated_allocation"; + +/// VK_EXT_extension_28 + +export const EXT_EXTENSION_28_EXTENSION_NAME = "VK_EXT_extension_28"; + +/// VK_EXT_transform_feedback + +export const EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME = "VK_EXT_transform_feedback"; + +/// VK_NVX_binary_import + +export const NVX_BINARY_IMPORT_EXTENSION_NAME = "VK_NVX_binary_import"; + +/// VK_NVX_image_view_handle + +export const NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME = "VK_NVX_image_view_handle"; + +/// VK_AMD_extension_32 + +export const AMD_EXTENSION_32_EXTENSION_NAME = "VK_AMD_extension_32"; + +/// VK_AMD_extension_33 + +export const AMD_EXTENSION_33_EXTENSION_NAME = "VK_AMD_extension_33"; + +/// VK_AMD_draw_indirect_count + +export const AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_AMD_draw_indirect_count"; + +/// VK_AMD_extension_35 + +export const AMD_EXTENSION_35_EXTENSION_NAME = "VK_AMD_extension_35"; + +/// VK_AMD_negative_viewport_height + +export const AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME = "VK_AMD_negative_viewport_height"; + +/// VK_AMD_gpu_shader_half_float + +export const AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME = "VK_AMD_gpu_shader_half_float"; + +/// VK_AMD_shader_ballot + +export const AMD_SHADER_BALLOT_EXTENSION_NAME = "VK_AMD_shader_ballot"; + +/// VK_EXT_video_encode_h264 + +export const EXT_VIDEO_ENCODE_H264_EXTENSION_NAME = "VK_EXT_video_encode_h264"; + +/// VK_EXT_video_encode_h265 + +export const EXT_VIDEO_ENCODE_H265_EXTENSION_NAME = "VK_EXT_video_encode_h265"; + +/// VK_EXT_video_decode_h264 + +export const EXT_VIDEO_DECODE_H264_EXTENSION_NAME = "VK_EXT_video_decode_h264"; + +/// VK_AMD_texture_gather_bias_lod + +export const AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME = "VK_AMD_texture_gather_bias_lod"; + +/// VK_AMD_shader_info + +export const AMD_SHADER_INFO_EXTENSION_NAME = "VK_AMD_shader_info"; + +/// VK_AMD_extension_44 + +export const AMD_EXTENSION_44_EXTENSION_NAME = "VK_AMD_extension_44"; + +/// VK_KHR_dynamic_rendering + +export const KHR_DYNAMIC_RENDERING_EXTENSION_NAME = "VK_KHR_dynamic_rendering"; + +/// VK_AMD_extension_46 + +export const AMD_EXTENSION_46_EXTENSION_NAME = "VK_AMD_extension_46"; + +/// VK_AMD_shader_image_load_store_lod + +export const AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME = "VK_AMD_shader_image_load_store_lod"; + +/// VK_NVX_extension_48 + +export const NVX_EXTENSION_48_EXTENSION_NAME = "VK_NVX_extension_48"; + +/// VK_GOOGLE_extension_49 + +export const GOOGLE_EXTENSION_49_EXTENSION_NAME = "VK_GOOGLE_extension_49"; + +/// VK_GGP_stream_descriptor_surface + +export const GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME = "VK_GGP_stream_descriptor_surface"; + +/// VK_NV_corner_sampled_image + +export const NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME = "VK_NV_corner_sampled_image"; + +/// VK_NV_extension_52 + +export const NV_EXTENSION_52_EXTENSION_NAME = "VK_NV_extension_52"; + +/// VK_NV_extension_53 + +export const NV_EXTENSION_53_EXTENSION_NAME = "VK_NV_extension_53"; + +/// VK_KHR_multiview + +export const KHR_MULTIVIEW_EXTENSION_NAME = "VK_KHR_multiview"; + +/// VK_IMG_format_pvrtc + +export const IMG_FORMAT_PVRTC_EXTENSION_NAME = "VK_IMG_format_pvrtc"; + +/// VK_NV_external_memory_capabilities + +export const NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_NV_external_memory_capabilities"; + +/// VK_NV_external_memory + +export const NV_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_NV_external_memory"; + +/// VK_NV_external_memory_win32 + +export const NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_NV_external_memory_win32"; + +/// VK_NV_win32_keyed_mutex + +export const NV_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_NV_win32_keyed_mutex"; + +/// VK_KHR_get_physical_device_properties2 + +export const KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_physical_device_properties2"; + +/// VK_KHR_device_group + +export const KHR_DEVICE_GROUP_EXTENSION_NAME = "VK_KHR_device_group"; + +/// VK_EXT_validation_flags + +export const EXT_VALIDATION_FLAGS_EXTENSION_NAME = "VK_EXT_validation_flags"; + +/// VK_NN_vi_surface + +export const NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"; + +/// VK_KHR_shader_draw_parameters + +export const KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME = "VK_KHR_shader_draw_parameters"; + +/// VK_EXT_shader_subgroup_ballot + +export const EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME = "VK_EXT_shader_subgroup_ballot"; + +/// VK_EXT_shader_subgroup_vote + +export const EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME = "VK_EXT_shader_subgroup_vote"; + +/// VK_EXT_texture_compression_astc_hdr + +export const EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME = "VK_EXT_texture_compression_astc_hdr"; + +/// VK_EXT_astc_decode_mode + +export const EXT_ASTC_DECODE_MODE_EXTENSION_NAME = "VK_EXT_astc_decode_mode"; + +/// VK_EXT_pipeline_robustness + +export const EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_pipeline_robustness"; + +/// VK_KHR_maintenance1 + +export const KHR_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_maintenance1"; + +/// VK_KHR_device_group_creation + +export const KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME = "VK_KHR_device_group_creation"; + +/// VK_KHR_external_memory_capabilities + +export const KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_memory_capabilities"; + +/// VK_KHR_external_memory + +export const KHR_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_KHR_external_memory"; + +/// VK_KHR_external_memory_win32 + +export const KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32"; + +/// VK_KHR_external_memory_fd + +export const KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME = "VK_KHR_external_memory_fd"; + +/// VK_KHR_win32_keyed_mutex + +export const KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_KHR_win32_keyed_mutex"; + +/// VK_KHR_external_semaphore_capabilities + +export const KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_semaphore_capabilities"; + +/// VK_KHR_external_semaphore + +export const KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_KHR_external_semaphore"; + +/// VK_KHR_external_semaphore_win32 + +export const KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME = "VK_KHR_external_semaphore_win32"; + +/// VK_KHR_external_semaphore_fd + +export const KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME = "VK_KHR_external_semaphore_fd"; + +/// VK_KHR_push_descriptor + +export const KHR_PUSH_DESCRIPTOR_EXTENSION_NAME = "VK_KHR_push_descriptor"; + +/// VK_EXT_conditional_rendering + +export const EXT_CONDITIONAL_RENDERING_EXTENSION_NAME = "VK_EXT_conditional_rendering"; + +/// VK_KHR_shader_float16_int8 + +export const KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME = "VK_KHR_shader_float16_int8"; + +/// VK_KHR_16bit_storage + +export const KHR_16BIT_STORAGE_EXTENSION_NAME = "VK_KHR_16bit_storage"; + +/// VK_KHR_incremental_present + +export const KHR_INCREMENTAL_PRESENT_EXTENSION_NAME = "VK_KHR_incremental_present"; + +/// VK_KHR_descriptor_update_template + +export const KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME = "VK_KHR_descriptor_update_template"; + +/// VK_NVX_device_generated_commands + +export const NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NVX_device_generated_commands"; + +/// VK_NV_clip_space_w_scaling + +export const NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME = "VK_NV_clip_space_w_scaling"; + +/// VK_EXT_direct_mode_display + +export const EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME = "VK_EXT_direct_mode_display"; + +/// VK_EXT_acquire_xlib_display + +export const EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_xlib_display"; + +/// VK_EXT_display_surface_counter + +export const EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME = "VK_EXT_display_surface_counter"; + +/// VK_EXT_display_control + +export const EXT_DISPLAY_CONTROL_EXTENSION_NAME = "VK_EXT_display_control"; + +/// VK_GOOGLE_display_timing + +export const GOOGLE_DISPLAY_TIMING_EXTENSION_NAME = "VK_GOOGLE_display_timing"; + +/// VK_RESERVED_do_not_use_94 + +export const RESERVED_DO_NOT_USE_94_EXTENSION_NAME = "VK_RESERVED_do_not_use_94"; + +/// VK_NV_sample_mask_override_coverage + +export const NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME = "VK_NV_sample_mask_override_coverage"; + +/// VK_NV_geometry_shader_passthrough + +export const NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME = "VK_NV_geometry_shader_passthrough"; + +/// VK_NV_viewport_array2 + +export const NV_VIEWPORT_ARRAY_2_EXTENSION_NAME = "VK_NV_viewport_array2"; + +/// VK_NVX_multiview_per_view_attributes + +export const NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME = "VK_NVX_multiview_per_view_attributes"; + +/// VK_NV_viewport_swizzle + +export const NV_VIEWPORT_SWIZZLE_EXTENSION_NAME = "VK_NV_viewport_swizzle"; + +/// VK_EXT_discard_rectangles + +export const EXT_DISCARD_RECTANGLES_EXTENSION_NAME = "VK_EXT_discard_rectangles"; + +/// VK_NV_extension_101 + +export const NV_EXTENSION_101_EXTENSION_NAME = "VK_NV_extension_101"; + +/// VK_EXT_conservative_rasterization + +export const EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_conservative_rasterization"; + +/// VK_EXT_depth_clip_enable + +export const EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME = "VK_EXT_depth_clip_enable"; + +/// VK_NV_extension_104 + +export const NV_EXTENSION_104_EXTENSION_NAME = "VK_NV_extension_104"; + +/// VK_EXT_swapchain_colorspace + +export const EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME = "VK_EXT_swapchain_colorspace"; + +/// VK_EXT_hdr_metadata + +export const EXT_HDR_METADATA_EXTENSION_NAME = "VK_EXT_hdr_metadata"; + +/// VK_IMG_extension_107 + +export const IMG_EXTENSION_107_EXTENSION_NAME = "VK_IMG_extension_107"; + +/// VK_IMG_extension_108 + +export const IMG_EXTENSION_108_EXTENSION_NAME = "VK_IMG_extension_108"; + +/// VK_KHR_imageless_framebuffer + +export const KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME = "VK_KHR_imageless_framebuffer"; + +/// VK_KHR_create_renderpass2 + +export const KHR_CREATE_RENDERPASS_2_EXTENSION_NAME = "VK_KHR_create_renderpass2"; + +/// VK_IMG_extension_111 + +export const IMG_EXTENSION_111_EXTENSION_NAME = "VK_IMG_extension_111"; + +/// VK_KHR_shared_presentable_image + +export const KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME = "VK_KHR_shared_presentable_image"; + +/// VK_KHR_external_fence_capabilities + +export const KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_fence_capabilities"; + +/// VK_KHR_external_fence + +export const KHR_EXTERNAL_FENCE_EXTENSION_NAME = "VK_KHR_external_fence"; + +/// VK_KHR_external_fence_win32 + +export const KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32"; + +/// VK_KHR_external_fence_fd + +export const KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME = "VK_KHR_external_fence_fd"; + +/// VK_KHR_performance_query + +export const KHR_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_KHR_performance_query"; + +/// VK_KHR_maintenance2 + +export const KHR_MAINTENANCE_2_EXTENSION_NAME = "VK_KHR_maintenance2"; + +/// VK_KHR_extension_119 + +export const KHR_EXTENSION_119_EXTENSION_NAME = "VK_KHR_extension_119"; + +/// VK_KHR_get_surface_capabilities2 + +export const KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME = "VK_KHR_get_surface_capabilities2"; + +/// VK_KHR_variable_pointers + +export const KHR_VARIABLE_POINTERS_EXTENSION_NAME = "VK_KHR_variable_pointers"; + +/// VK_KHR_get_display_properties2 + +export const KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_display_properties2"; + +/// VK_MVK_ios_surface + +export const MVK_IOS_SURFACE_EXTENSION_NAME = "VK_MVK_ios_surface"; + +/// VK_MVK_macos_surface + +export const MVK_MACOS_SURFACE_EXTENSION_NAME = "VK_MVK_macos_surface"; + +/// VK_MVK_moltenvk + +export const MVK_MOLTENVK_EXTENSION_NAME = "VK_MVK_moltenvk"; + +/// VK_EXT_external_memory_dma_buf + +export const EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME = "VK_EXT_external_memory_dma_buf"; + +/// VK_EXT_queue_family_foreign + +export const EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME = "VK_EXT_queue_family_foreign"; + +/// VK_KHR_dedicated_allocation + +export const KHR_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_KHR_dedicated_allocation"; + +/// VK_EXT_debug_utils + +export const EXT_DEBUG_UTILS_EXTENSION_NAME = "VK_EXT_debug_utils"; + +/// VK_ANDROID_external_memory_android_hardware_buffer + +export const ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = "VK_ANDROID_external_memory_android_hardware_buffer"; + +/// VK_EXT_sampler_filter_minmax + +export const EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME = "VK_EXT_sampler_filter_minmax"; + +/// VK_KHR_storage_buffer_storage_class + +export const KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME = "VK_KHR_storage_buffer_storage_class"; + +/// VK_AMD_gpu_shader_int16 + +export const AMD_GPU_SHADER_INT16_EXTENSION_NAME = "VK_AMD_gpu_shader_int16"; + +/// VK_AMD_extension_134 + +export const AMD_EXTENSION_134_EXTENSION_NAME = "VK_AMD_extension_134"; + +/// VK_AMD_extension_135 + +export const AMD_EXTENSION_135_EXTENSION_NAME = "VK_AMD_extension_135"; + +/// VK_AMD_extension_136 + +export const AMD_EXTENSION_136_EXTENSION_NAME = "VK_AMD_extension_136"; + +/// VK_AMD_mixed_attachment_samples + +export const AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME = "VK_AMD_mixed_attachment_samples"; + +/// VK_AMD_shader_fragment_mask + +export const AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME = "VK_AMD_shader_fragment_mask"; + +/// VK_EXT_inline_uniform_block + +export const EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME = "VK_EXT_inline_uniform_block"; + +/// VK_AMD_extension_140 + +export const AMD_EXTENSION_140_EXTENSION_NAME = "VK_AMD_extension_140"; + +/// VK_EXT_shader_stencil_export + +export const EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME = "VK_EXT_shader_stencil_export"; + +/// VK_AMD_extension_142 + +export const AMD_EXTENSION_142_EXTENSION_NAME = "VK_AMD_extension_142"; + +/// VK_AMD_extension_143 + +export const AMD_EXTENSION_143_EXTENSION_NAME = "VK_AMD_extension_143"; + +/// VK_EXT_sample_locations + +export const EXT_SAMPLE_LOCATIONS_EXTENSION_NAME = "VK_EXT_sample_locations"; + +/// VK_KHR_relaxed_block_layout + +export const KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME = "VK_KHR_relaxed_block_layout"; + +/// VK_RESERVED_do_not_use_146 + +export const RESERVED_DO_NOT_USE_146_EXTENSION_NAME = "VK_RESERVED_do_not_use_146"; + +/// VK_KHR_get_memory_requirements2 + +export const KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME = "VK_KHR_get_memory_requirements2"; + +/// VK_KHR_image_format_list + +export const KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME = "VK_KHR_image_format_list"; + +/// VK_EXT_blend_operation_advanced + +export const EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME = "VK_EXT_blend_operation_advanced"; + +/// VK_NV_fragment_coverage_to_color + +export const NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME = "VK_NV_fragment_coverage_to_color"; + +/// VK_KHR_acceleration_structure + +export const KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_KHR_acceleration_structure"; + +/// VK_KHR_ray_tracing_pipeline + +export const KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline"; + +/// VK_KHR_ray_query + +export const KHR_RAY_QUERY_EXTENSION_NAME = "VK_KHR_ray_query"; + +/// VK_NV_extension_152 + +export const NV_EXTENSION_152_EXTENSION_NAME = "VK_NV_extension_152"; + +/// VK_NV_framebuffer_mixed_samples + +export const NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples"; + +/// VK_NV_fill_rectangle + +export const NV_FILL_RECTANGLE_EXTENSION_NAME = "VK_NV_fill_rectangle"; + +/// VK_NV_shader_sm_builtins + +export const NV_SHADER_SM_BUILTINS_EXTENSION_NAME = "VK_NV_shader_sm_builtins"; + +/// VK_EXT_post_depth_coverage + +export const EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME = "VK_EXT_post_depth_coverage"; + +/// VK_KHR_sampler_ycbcr_conversion + +export const KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME = "VK_KHR_sampler_ycbcr_conversion"; + +/// VK_KHR_bind_memory2 + +export const KHR_BIND_MEMORY_2_EXTENSION_NAME = "VK_KHR_bind_memory2"; + +/// VK_EXT_image_drm_format_modifier + +export const EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME = "VK_EXT_image_drm_format_modifier"; + +/// VK_EXT_extension_160 + +export const EXT_EXTENSION_160_EXTENSION_NAME = "VK_EXT_extension_160"; + +/// VK_EXT_validation_cache + +export const EXT_VALIDATION_CACHE_EXTENSION_NAME = "VK_EXT_validation_cache"; + +/// VK_EXT_descriptor_indexing + +export const EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME = "VK_EXT_descriptor_indexing"; + +/// VK_EXT_shader_viewport_index_layer + +export const EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME = "VK_EXT_shader_viewport_index_layer"; + +/// VK_KHR_portability_subset + +export const KHR_PORTABILITY_SUBSET_EXTENSION_NAME = "VK_KHR_portability_subset"; + +/// VK_NV_shading_rate_image + +export const NV_SHADING_RATE_IMAGE_EXTENSION_NAME = "VK_NV_shading_rate_image"; + +/// VK_NV_ray_tracing + +export const NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"; + +/// VK_NV_representative_fragment_test + +export const NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME = "VK_NV_representative_fragment_test"; + +/// VK_NV_extension_168 + +export const NV_EXTENSION_168_EXTENSION_NAME = "VK_NV_extension_168"; + +/// VK_KHR_maintenance3 + +export const KHR_MAINTENANCE_3_EXTENSION_NAME = "VK_KHR_maintenance3"; + +/// VK_KHR_draw_indirect_count + +export const KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_KHR_draw_indirect_count"; + +/// VK_EXT_filter_cubic + +export const EXT_FILTER_CUBIC_EXTENSION_NAME = "VK_EXT_filter_cubic"; + +/// VK_QCOM_render_pass_shader_resolve + +export const QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION_NAME = "VK_QCOM_render_pass_shader_resolve"; + +/// VK_QCOM_extension_173 + +export const QCOM_EXTENSION_173_EXTENSION_NAME = "VK_QCOM_extension_173"; + +/// VK_QCOM_extension_174 + +export const QCOM_EXTENSION_174_EXTENSION_NAME = "VK_QCOM_extension_174"; + +/// VK_EXT_global_priority + +export const EXT_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_EXT_global_priority"; + +/// VK_KHR_shader_subgroup_extended_types + +export const KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME = "VK_KHR_shader_subgroup_extended_types"; + +/// VK_EXT_extension_177 + +export const EXT_EXTENSION_177_EXTENSION_NAME = "VK_EXT_extension_177"; + +/// VK_KHR_8bit_storage + +export const KHR_8BIT_STORAGE_EXTENSION_NAME = "VK_KHR_8bit_storage"; + +/// VK_EXT_external_memory_host + +export const EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME = "VK_EXT_external_memory_host"; + +/// VK_AMD_buffer_marker + +export const AMD_BUFFER_MARKER_EXTENSION_NAME = "VK_AMD_buffer_marker"; + +/// VK_KHR_shader_atomic_int64 + +export const KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME = "VK_KHR_shader_atomic_int64"; + +/// VK_KHR_shader_clock + +export const KHR_SHADER_CLOCK_EXTENSION_NAME = "VK_KHR_shader_clock"; + +/// VK_AMD_extension_183 + +export const AMD_EXTENSION_183_EXTENSION_NAME = "VK_AMD_extension_183"; + +/// VK_AMD_pipeline_compiler_control + +export const AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME = "VK_AMD_pipeline_compiler_control"; + +/// VK_EXT_calibrated_timestamps + +export const EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME = "VK_EXT_calibrated_timestamps"; + +/// VK_AMD_shader_core_properties + +export const AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_AMD_shader_core_properties"; + +/// VK_AMD_extension_187 + +export const AMD_EXTENSION_187_EXTENSION_NAME = "VK_AMD_extension_187"; + +/// VK_EXT_video_decode_h265 + +export const EXT_VIDEO_DECODE_H265_EXTENSION_NAME = "VK_EXT_video_decode_h265"; + +/// VK_KHR_global_priority + +export const KHR_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_KHR_global_priority"; + +/// VK_AMD_memory_overallocation_behavior + +export const AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME = "VK_AMD_memory_overallocation_behavior"; + +/// VK_EXT_vertex_attribute_divisor + +export const EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME = "VK_EXT_vertex_attribute_divisor"; + +/// VK_GGP_frame_token + +export const GGP_FRAME_TOKEN_EXTENSION_NAME = "VK_GGP_frame_token"; + +/// VK_EXT_pipeline_creation_feedback + +export const EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME = "VK_EXT_pipeline_creation_feedback"; + +/// VK_GOOGLE_extension_194 + +export const GOOGLE_EXTENSION_194_EXTENSION_NAME = "VK_GOOGLE_extension_194"; + +/// VK_GOOGLE_extension_195 + +export const GOOGLE_EXTENSION_195_EXTENSION_NAME = "VK_GOOGLE_extension_195"; + +/// VK_GOOGLE_extension_196 + +export const GOOGLE_EXTENSION_196_EXTENSION_NAME = "VK_GOOGLE_extension_196"; + +/// VK_KHR_driver_properties + +export const KHR_DRIVER_PROPERTIES_EXTENSION_NAME = "VK_KHR_driver_properties"; + +/// VK_KHR_shader_float_controls + +export const KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME = "VK_KHR_shader_float_controls"; + +/// VK_NV_shader_subgroup_partitioned + +export const NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME = "VK_NV_shader_subgroup_partitioned"; + +/// VK_KHR_depth_stencil_resolve + +export const KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME = "VK_KHR_depth_stencil_resolve"; + +/// VK_KHR_swapchain_mutable_format + +export const KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME = "VK_KHR_swapchain_mutable_format"; + +/// VK_NV_compute_shader_derivatives + +export const NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME = "VK_NV_compute_shader_derivatives"; + +/// VK_NV_mesh_shader + +export const NV_MESH_SHADER_EXTENSION_NAME = "VK_NV_mesh_shader"; + +/// VK_NV_fragment_shader_barycentric + +export const NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_NV_fragment_shader_barycentric"; + +/// VK_NV_shader_image_footprint + +export const NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME = "VK_NV_shader_image_footprint"; + +/// VK_NV_scissor_exclusive + +export const NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME = "VK_NV_scissor_exclusive"; + +/// VK_NV_device_diagnostic_checkpoints + +export const NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME = "VK_NV_device_diagnostic_checkpoints"; + +/// VK_KHR_timeline_semaphore + +export const KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME = "VK_KHR_timeline_semaphore"; + +/// VK_KHR_extension_209 + +export const KHR_EXTENSION_209_EXTENSION_NAME = "VK_KHR_extension_209"; + +/// VK_INTEL_shader_integer_functions2 + +export const INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME = "VK_INTEL_shader_integer_functions2"; + +/// VK_INTEL_performance_query + +export const INTEL_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_INTEL_performance_query"; + +/// VK_KHR_vulkan_memory_model + +export const KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME = "VK_KHR_vulkan_memory_model"; + +/// VK_EXT_pci_bus_info + +export const EXT_PCI_BUS_INFO_EXTENSION_NAME = "VK_EXT_pci_bus_info"; + +/// VK_AMD_display_native_hdr + +export const AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME = "VK_AMD_display_native_hdr"; + +/// VK_FUCHSIA_imagepipe_surface + +export const FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME = "VK_FUCHSIA_imagepipe_surface"; + +/// VK_KHR_shader_terminate_invocation + +export const KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME = "VK_KHR_shader_terminate_invocation"; + +/// VK_GOOGLE_extension_217 + +export const GOOGLE_EXTENSION_217_EXTENSION_NAME = "VK_GOOGLE_extension_217"; + +/// VK_EXT_metal_surface + +export const EXT_METAL_SURFACE_EXTENSION_NAME = "VK_EXT_metal_surface"; + +/// VK_EXT_fragment_density_map + +export const EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME = "VK_EXT_fragment_density_map"; + +/// VK_EXT_extension_220 + +export const EXT_EXTENSION_220_EXTENSION_NAME = "VK_EXT_extension_220"; + +/// VK_KHR_extension_221 + +export const KHR_EXTENSION_221_EXTENSION_NAME = "VK_KHR_extension_221"; + +/// VK_EXT_scalar_block_layout + +export const EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME = "VK_EXT_scalar_block_layout"; + +/// VK_EXT_extension_223 + +export const EXT_EXTENSION_223_EXTENSION_NAME = "VK_EXT_extension_223"; + +/// VK_GOOGLE_hlsl_functionality1 + +export const GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME = "VK_GOOGLE_hlsl_functionality1"; + +/// VK_GOOGLE_decorate_string + +export const GOOGLE_DECORATE_STRING_EXTENSION_NAME = "VK_GOOGLE_decorate_string"; + +/// VK_EXT_subgroup_size_control + +export const EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME = "VK_EXT_subgroup_size_control"; + +/// VK_KHR_fragment_shading_rate + +export const KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"; + +/// VK_AMD_shader_core_properties2 + +export const AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME = "VK_AMD_shader_core_properties2"; + +/// VK_AMD_extension_229 + +export const AMD_EXTENSION_229_EXTENSION_NAME = "VK_AMD_extension_229"; + +/// VK_AMD_device_coherent_memory + +export const AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME = "VK_AMD_device_coherent_memory"; + +/// VK_AMD_extension_231 + +export const AMD_EXTENSION_231_EXTENSION_NAME = "VK_AMD_extension_231"; + +/// VK_AMD_extension_232 + +export const AMD_EXTENSION_232_EXTENSION_NAME = "VK_AMD_extension_232"; + +/// VK_AMD_extension_233 + +export const AMD_EXTENSION_233_EXTENSION_NAME = "VK_AMD_extension_233"; + +/// VK_AMD_extension_234 + +export const AMD_EXTENSION_234_EXTENSION_NAME = "VK_AMD_extension_234"; + +/// VK_EXT_shader_image_atomic_int64 + +export const EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME = "VK_EXT_shader_image_atomic_int64"; + +/// VK_AMD_extension_236 + +export const AMD_EXTENSION_236_EXTENSION_NAME = "VK_AMD_extension_236"; + +/// VK_KHR_spirv_1_4 + +export const KHR_SPIRV_1_4_EXTENSION_NAME = "VK_KHR_spirv_1_4"; + +/// VK_EXT_memory_budget + +export const EXT_MEMORY_BUDGET_EXTENSION_NAME = "VK_EXT_memory_budget"; + +/// VK_EXT_memory_priority + +export const EXT_MEMORY_PRIORITY_EXTENSION_NAME = "VK_EXT_memory_priority"; + +/// VK_KHR_surface_protected_capabilities + +export const KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME = "VK_KHR_surface_protected_capabilities"; + +/// VK_NV_dedicated_allocation_image_aliasing + +export const NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME = "VK_NV_dedicated_allocation_image_aliasing"; + +/// VK_KHR_separate_depth_stencil_layouts + +export const KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME = "VK_KHR_separate_depth_stencil_layouts"; + +/// VK_INTEL_extension_243 + +export const INTEL_EXTENSION_243_EXTENSION_NAME = "VK_INTEL_extension_243"; + +/// VK_MESA_extension_244 + +export const MESA_EXTENSION_244_EXTENSION_NAME = "VK_MESA_extension_244"; + +/// VK_EXT_buffer_device_address + +export const EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_EXT_buffer_device_address"; + +/// VK_EXT_tooling_info + +export const EXT_TOOLING_INFO_EXTENSION_NAME = "VK_EXT_tooling_info"; + +/// VK_EXT_separate_stencil_usage + +export const EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME = "VK_EXT_separate_stencil_usage"; + +/// VK_EXT_validation_features + +export const EXT_VALIDATION_FEATURES_EXTENSION_NAME = "VK_EXT_validation_features"; + +/// VK_KHR_present_wait + +export const KHR_PRESENT_WAIT_EXTENSION_NAME = "VK_KHR_present_wait"; + +/// VK_NV_cooperative_matrix + +export const NV_COOPERATIVE_MATRIX_EXTENSION_NAME = "VK_NV_cooperative_matrix"; + +/// VK_NV_coverage_reduction_mode + +export const NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME = "VK_NV_coverage_reduction_mode"; + +/// VK_EXT_fragment_shader_interlock + +export const EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME = "VK_EXT_fragment_shader_interlock"; + +/// VK_EXT_ycbcr_image_arrays + +export const EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME = "VK_EXT_ycbcr_image_arrays"; + +/// VK_KHR_uniform_buffer_standard_layout + +export const KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME = "VK_KHR_uniform_buffer_standard_layout"; + +/// VK_EXT_provoking_vertex + +export const EXT_PROVOKING_VERTEX_EXTENSION_NAME = "VK_EXT_provoking_vertex"; + +/// VK_EXT_full_screen_exclusive + +export const EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME = "VK_EXT_full_screen_exclusive"; + +/// VK_EXT_headless_surface + +export const EXT_HEADLESS_SURFACE_EXTENSION_NAME = "VK_EXT_headless_surface"; + +/// VK_KHR_buffer_device_address + +export const KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_KHR_buffer_device_address"; + +/// VK_EXT_extension_259 + +export const EXT_EXTENSION_259_EXTENSION_NAME = "VK_EXT_extension_259"; + +/// VK_EXT_line_rasterization + +export const EXT_LINE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_line_rasterization"; + +/// VK_EXT_shader_atomic_float + +export const EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME = "VK_EXT_shader_atomic_float"; + +/// VK_EXT_host_query_reset + +export const EXT_HOST_QUERY_RESET_EXTENSION_NAME = "VK_EXT_host_query_reset"; + +/// VK_GGP_extension_263 + +export const GGP_EXTENSION_263_EXTENSION_NAME = "VK_GGP_extension_263"; + +/// VK_BRCM_extension_264 + +export const BRCM_EXTENSION_264_EXTENSION_NAME = "VK_BRCM_extension_264"; + +/// VK_BRCM_extension_265 + +export const BRCM_EXTENSION_265_EXTENSION_NAME = "VK_BRCM_extension_265"; + +/// VK_EXT_index_type_uint8 + +export const EXT_INDEX_TYPE_UINT8_EXTENSION_NAME = "VK_EXT_index_type_uint8"; + +/// VK_EXT_extension_267 + +export const EXT_EXTENSION_267_EXTENSION_NAME = "VK_EXT_extension_267"; + +/// VK_EXT_extended_dynamic_state + +export const EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_extended_dynamic_state"; + +/// VK_KHR_deferred_host_operations + +export const KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME = "VK_KHR_deferred_host_operations"; + +/// VK_KHR_pipeline_executable_properties + +export const KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME = "VK_KHR_pipeline_executable_properties"; + +/// VK_INTEL_extension_271 + +export const INTEL_EXTENSION_271_EXTENSION_NAME = "VK_INTEL_extension_271"; + +/// VK_INTEL_extension_272 + +export const INTEL_EXTENSION_272_EXTENSION_NAME = "VK_INTEL_extension_272"; + +/// VK_INTEL_extension_273 + +export const INTEL_EXTENSION_273_EXTENSION_NAME = "VK_INTEL_extension_273"; + +/// VK_EXT_shader_atomic_float2 + +export const EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME = "VK_EXT_shader_atomic_float2"; + +/// VK_KHR_extension_275 + +export const KHR_EXTENSION_275_EXTENSION_NAME = "VK_KHR_extension_275"; + +/// VK_KHR_extension_276 + +export const KHR_EXTENSION_276_EXTENSION_NAME = "VK_KHR_extension_276"; + +/// VK_EXT_shader_demote_to_helper_invocation + +export const EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME = "VK_EXT_shader_demote_to_helper_invocation"; + +/// VK_NV_device_generated_commands + +export const NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands"; + +/// VK_NV_inherited_viewport_scissor + +export const NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME = "VK_NV_inherited_viewport_scissor"; + +/// VK_KHR_extension_280 + +export const KHR_EXTENSION_280_EXTENSION_NAME = "VK_KHR_extension_280"; + +/// VK_KHR_shader_integer_dot_product + +export const KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME = "VK_KHR_shader_integer_dot_product"; + +/// VK_EXT_texel_buffer_alignment + +export const EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME = "VK_EXT_texel_buffer_alignment"; + +/// VK_QCOM_render_pass_transform + +export const QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME = "VK_QCOM_render_pass_transform"; + +/// VK_EXT_extension_284 + +export const EXT_EXTENSION_284_EXTENSION_NAME = "VK_EXT_extension_284"; + +/// VK_EXT_device_memory_report + +export const EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME = "VK_EXT_device_memory_report"; + +/// VK_EXT_acquire_drm_display + +export const EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_drm_display"; + +/// VK_EXT_robustness2 + +export const EXT_ROBUSTNESS_2_EXTENSION_NAME = "VK_EXT_robustness2"; + +/// VK_EXT_custom_border_color + +export const EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME = "VK_EXT_custom_border_color"; + +/// VK_EXT_extension_289 + +export const EXT_EXTENSION_289_EXTENSION_NAME = "VK_EXT_extension_289"; + +/// VK_GOOGLE_user_type + +export const GOOGLE_USER_TYPE_EXTENSION_NAME = "VK_GOOGLE_user_type"; + +/// VK_KHR_pipeline_library + +export const KHR_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_KHR_pipeline_library"; + +/// VK_NV_extension_292 + +export const NV_EXTENSION_292_EXTENSION_NAME = "VK_NV_extension_292"; + +/// VK_NV_present_barrier + +export const NV_PRESENT_BARRIER_EXTENSION_NAME = "VK_NV_present_barrier"; + +/// VK_KHR_shader_non_semantic_info + +export const KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME = "VK_KHR_shader_non_semantic_info"; + +/// VK_KHR_present_id + +export const KHR_PRESENT_ID_EXTENSION_NAME = "VK_KHR_present_id"; + +/// VK_EXT_private_data + +export const EXT_PRIVATE_DATA_EXTENSION_NAME = "VK_EXT_private_data"; + +/// VK_KHR_extension_297 + +export const KHR_EXTENSION_297_EXTENSION_NAME = "VK_KHR_extension_297"; + +/// VK_EXT_pipeline_creation_cache_control + +export const EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME = "VK_EXT_pipeline_creation_cache_control"; + +/// VK_KHR_extension_299 + +export const KHR_EXTENSION_299_EXTENSION_NAME = "VK_KHR_extension_299"; + +/// VK_KHR_video_encode_queue + +export const KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_encode_queue"; + +/// VK_NV_device_diagnostics_config + +export const NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME = "VK_NV_device_diagnostics_config"; + +/// VK_QCOM_render_pass_store_ops + +export const QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME = "VK_QCOM_render_pass_store_ops"; + +/// VK_QCOM_extension_303 + +export const QCOM_EXTENSION_303_EXTENSION_NAME = "VK_QCOM_extension_303"; + +/// VK_QCOM_extension_304 + +export const QCOM_EXTENSION_304_EXTENSION_NAME = "VK_QCOM_extension_304"; + +/// VK_QCOM_extension_305 + +export const QCOM_EXTENSION_305_EXTENSION_NAME = "VK_QCOM_extension_305"; + +/// VK_QCOM_extension_306 + +export const QCOM_EXTENSION_306_EXTENSION_NAME = "VK_QCOM_extension_306"; + +/// VK_QCOM_extension_307 + +export const QCOM_EXTENSION_307_EXTENSION_NAME = "VK_QCOM_extension_307"; + +/// VK_NV_extension_308 + +export const NV_EXTENSION_308_EXTENSION_NAME = "VK_NV_extension_308"; + +/// VK_KHR_extension_309 + +export const KHR_EXTENSION_309_EXTENSION_NAME = "VK_KHR_extension_309"; + +/// VK_QCOM_extension_310 + +export const QCOM_EXTENSION_310_EXTENSION_NAME = "VK_QCOM_extension_310"; + +/// VK_NV_extension_311 + +export const NV_EXTENSION_311_EXTENSION_NAME = "VK_NV_extension_311"; + +/// VK_EXT_metal_objects + +export const EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects"; + +/// VK_EXT_extension_313 + +export const EXT_EXTENSION_313_EXTENSION_NAME = "VK_EXT_extension_313"; + +/// VK_AMD_extension_314 + +export const AMD_EXTENSION_314_EXTENSION_NAME = "VK_AMD_extension_314"; + +/// VK_KHR_synchronization2 + +export const KHR_SYNCHRONIZATION_2_EXTENSION_NAME = "VK_KHR_synchronization2"; + +/// VK_AMD_extension_316 + +export const AMD_EXTENSION_316_EXTENSION_NAME = "VK_AMD_extension_316"; + +/// VK_EXT_descriptor_buffer + +export const EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME = "VK_EXT_descriptor_buffer"; + +/// VK_AMD_extension_318 + +export const AMD_EXTENSION_318_EXTENSION_NAME = "VK_AMD_extension_318"; + +/// VK_AMD_extension_319 + +export const AMD_EXTENSION_319_EXTENSION_NAME = "VK_AMD_extension_319"; + +/// VK_AMD_extension_320 + +export const AMD_EXTENSION_320_EXTENSION_NAME = "VK_AMD_extension_320"; + +/// VK_EXT_graphics_pipeline_library + +export const EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_EXT_graphics_pipeline_library"; + +/// VK_AMD_shader_early_and_late_fragment_tests + +export const AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_EXTENSION_NAME = "VK_AMD_shader_early_and_late_fragment_tests"; + +/// VK_KHR_fragment_shader_barycentric + +export const KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_KHR_fragment_shader_barycentric"; + +/// VK_KHR_shader_subgroup_uniform_control_flow + +export const KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME = "VK_KHR_shader_subgroup_uniform_control_flow"; + +/// VK_KHR_extension_325 + +export const KHR_EXTENSION_325_EXTENSION_NAME = "VK_KHR_extension_325"; + +/// VK_KHR_zero_initialize_workgroup_memory + +export const KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME = "VK_KHR_zero_initialize_workgroup_memory"; + +/// VK_NV_fragment_shading_rate_enums + +export const NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME = "VK_NV_fragment_shading_rate_enums"; + +/// VK_NV_ray_tracing_motion_blur + +export const NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME = "VK_NV_ray_tracing_motion_blur"; + +/// VK_EXT_mesh_shader + +export const EXT_MESH_SHADER_EXTENSION_NAME = "VK_EXT_mesh_shader"; + +/// VK_NV_extension_330 + +export const NV_EXTENSION_330_EXTENSION_NAME = "VK_NV_extension_330"; + +/// VK_EXT_ycbcr_2plane_444_formats + +export const EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME = "VK_EXT_ycbcr_2plane_444_formats"; + +/// VK_NV_extension_332 + +export const NV_EXTENSION_332_EXTENSION_NAME = "VK_NV_extension_332"; + +/// VK_EXT_fragment_density_map2 + +export const EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME = "VK_EXT_fragment_density_map2"; + +/// VK_QCOM_rotated_copy_commands + +export const QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME = "VK_QCOM_rotated_copy_commands"; + +/// VK_KHR_extension_335 + +export const KHR_EXTENSION_335_EXTENSION_NAME = "VK_KHR_extension_335"; + +/// VK_EXT_image_robustness + +export const EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_image_robustness"; + +/// VK_KHR_workgroup_memory_explicit_layout + +export const KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME = "VK_KHR_workgroup_memory_explicit_layout"; + +/// VK_KHR_copy_commands2 + +export const KHR_COPY_COMMANDS_2_EXTENSION_NAME = "VK_KHR_copy_commands2"; + +/// VK_EXT_image_compression_control + +export const EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME = "VK_EXT_image_compression_control"; + +/// VK_EXT_attachment_feedback_loop_layout + +export const EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME = "VK_EXT_attachment_feedback_loop_layout"; + +/// VK_EXT_4444_formats + +export const EXT_4444_FORMATS_EXTENSION_NAME = "VK_EXT_4444_formats"; + +/// VK_EXT_device_fault + +export const EXT_DEVICE_FAULT_EXTENSION_NAME = "VK_EXT_device_fault"; + +/// VK_ARM_rasterization_order_attachment_access + +export const ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_ARM_rasterization_order_attachment_access"; + +/// VK_ARM_extension_344 + +export const ARM_EXTENSION_344_EXTENSION_NAME = "VK_ARM_extension_344"; + +/// VK_EXT_rgba10x6_formats + +export const EXT_RGBA10X6_FORMATS_EXTENSION_NAME = "VK_EXT_rgba10x6_formats"; + +/// VK_NV_acquire_winrt_display + +export const NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME = "VK_NV_acquire_winrt_display"; + +/// VK_EXT_directfb_surface + +export const EXT_DIRECTFB_SURFACE_EXTENSION_NAME = "VK_EXT_directfb_surface"; + +/// VK_KHR_extension_350 + +export const KHR_EXTENSION_350_EXTENSION_NAME = "VK_KHR_extension_350"; + +/// VK_NV_extension_351 + +export const NV_EXTENSION_351_EXTENSION_NAME = "VK_NV_extension_351"; + +/// VK_VALVE_mutable_descriptor_type + +export const VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_VALVE_mutable_descriptor_type"; + +/// VK_EXT_vertex_input_dynamic_state + +export const EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_vertex_input_dynamic_state"; + +/// VK_EXT_physical_device_drm + +export const EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME = "VK_EXT_physical_device_drm"; + +/// VK_EXT_device_address_binding_report + +export const EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME = "VK_EXT_device_address_binding_report"; + +/// VK_EXT_depth_clip_control + +export const EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clip_control"; + +/// VK_EXT_primitive_topology_list_restart + +export const EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME = "VK_EXT_primitive_topology_list_restart"; + +/// VK_KHR_extension_358 + +export const KHR_EXTENSION_358_EXTENSION_NAME = "VK_KHR_extension_358"; + +/// VK_EXT_extension_359 + +export const EXT_EXTENSION_359_EXTENSION_NAME = "VK_EXT_extension_359"; + +/// VK_EXT_extension_360 + +export const EXT_EXTENSION_360_EXTENSION_NAME = "VK_EXT_extension_360"; + +/// VK_KHR_format_feature_flags2 + +export const KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME = "VK_KHR_format_feature_flags2"; + +/// VK_EXT_extension_362 + +export const EXT_EXTENSION_362_EXTENSION_NAME = "VK_EXT_extension_362"; + +/// VK_EXT_extension_363 + +export const EXT_EXTENSION_363_EXTENSION_NAME = "VK_EXT_extension_363"; + +/// VK_FUCHSIA_extension_364 + +export const FUCHSIA_EXTENSION_364_EXTENSION_NAME = "VK_FUCHSIA_extension_364"; + +/// VK_FUCHSIA_external_memory + +export const FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_FUCHSIA_external_memory"; + +/// VK_FUCHSIA_external_semaphore + +export const FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore"; + +/// VK_FUCHSIA_buffer_collection + +export const FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME = "VK_FUCHSIA_buffer_collection"; + +/// VK_FUCHSIA_extension_368 + +export const FUCHSIA_EXTENSION_368_EXTENSION_NAME = "VK_FUCHSIA_extension_368"; + +/// VK_QCOM_extension_369 + +export const QCOM_EXTENSION_369_EXTENSION_NAME = "VK_QCOM_extension_369"; + +/// VK_HUAWEI_subpass_shading + +export const HUAWEI_SUBPASS_SHADING_EXTENSION_NAME = "VK_HUAWEI_subpass_shading"; + +/// VK_HUAWEI_invocation_mask + +export const HUAWEI_INVOCATION_MASK_EXTENSION_NAME = "VK_HUAWEI_invocation_mask"; + +/// VK_NV_external_memory_rdma + +export const NV_EXTERNAL_MEMORY_RDMA_EXTENSION_NAME = "VK_NV_external_memory_rdma"; + +/// VK_EXT_pipeline_properties + +export const EXT_PIPELINE_PROPERTIES_EXTENSION_NAME = "VK_EXT_pipeline_properties"; + +/// VK_NV_extension_374 + +export const NV_EXTENSION_374_EXTENSION_NAME = "VK_NV_extension_374"; + +/// VK_NV_extension_375 + +export const NV_EXTENSION_375_EXTENSION_NAME = "VK_NV_extension_375"; + +/// VK_EXT_extension_376 + +export const EXT_EXTENSION_376_EXTENSION_NAME = "VK_EXT_extension_376"; + +/// VK_EXT_multisampled_render_to_single_sampled + +export const EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME = "VK_EXT_multisampled_render_to_single_sampled"; + +/// VK_EXT_extended_dynamic_state2 + +export const EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME = "VK_EXT_extended_dynamic_state2"; + +/// VK_QNX_screen_surface + +export const QNX_SCREEN_SURFACE_EXTENSION_NAME = "VK_QNX_screen_surface"; + +/// VK_KHR_extension_380 + +export const KHR_EXTENSION_380_EXTENSION_NAME = "VK_KHR_extension_380"; + +/// VK_KHR_extension_381 + +export const KHR_EXTENSION_381_EXTENSION_NAME = "VK_KHR_extension_381"; + +/// VK_EXT_color_write_enable + +export const EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME = "VK_EXT_color_write_enable"; + +/// VK_EXT_primitives_generated_query + +export const EXT_PRIMITIVES_GENERATED_QUERY_EXTENSION_NAME = "VK_EXT_primitives_generated_query"; + +/// VK_EXT_extension_384 + +export const EXT_EXTENSION_384_EXTENSION_NAME = "VK_EXT_extension_384"; + +/// VK_MESA_extension_385 + +export const MESA_EXTENSION_385_EXTENSION_NAME = "VK_MESA_extension_385"; + +/// VK_GOOGLE_extension_386 + +export const GOOGLE_EXTENSION_386_EXTENSION_NAME = "VK_GOOGLE_extension_386"; + +/// VK_KHR_ray_tracing_maintenance1 + +export const KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_ray_tracing_maintenance1"; + +/// VK_EXT_extension_388 + +export const EXT_EXTENSION_388_EXTENSION_NAME = "VK_EXT_extension_388"; + +/// VK_EXT_global_priority_query + +export const EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME = "VK_EXT_global_priority_query"; + +/// VK_EXT_extension_390 + +export const EXT_EXTENSION_390_EXTENSION_NAME = "VK_EXT_extension_390"; + +/// VK_EXT_extension_391 + +export const EXT_EXTENSION_391_EXTENSION_NAME = "VK_EXT_extension_391"; + +/// VK_EXT_image_view_min_lod + +export const EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME = "VK_EXT_image_view_min_lod"; + +/// VK_EXT_multi_draw + +export const EXT_MULTI_DRAW_EXTENSION_NAME = "VK_EXT_multi_draw"; + +/// VK_EXT_image_2d_view_of_3d + +export const EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME = "VK_EXT_image_2d_view_of_3d"; + +/// VK_KHR_portability_enumeration + +export const KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME = "VK_KHR_portability_enumeration"; + +/// VK_KHR_extension_396 + +export const KHR_EXTENSION_396_EXTENSION_NAME = "VK_KHR_extension_396"; + +/// VK_EXT_opacity_micromap + +export const EXT_OPACITY_MICROMAP_EXTENSION_NAME = "VK_EXT_opacity_micromap"; + +/// VK_NV_extension_398 + +export const NV_EXTENSION_398_EXTENSION_NAME = "VK_NV_extension_398"; + +/// VK_JUICE_extension_399 + +export const JUICE_EXTENSION_399_EXTENSION_NAME = "VK_JUICE_extension_399"; + +/// VK_JUICE_extension_400 + +export const JUICE_EXTENSION_400_EXTENSION_NAME = "VK_JUICE_extension_400"; + +/// VK_EXT_load_store_op_none + +export const EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME = "VK_EXT_load_store_op_none"; + +/// VK_FB_extension_402 + +export const FB_EXTENSION_402_EXTENSION_NAME = "VK_FB_extension_402"; + +/// VK_FB_extension_403 + +export const FB_EXTENSION_403_EXTENSION_NAME = "VK_FB_extension_403"; + +/// VK_FB_extension_404 + +export const FB_EXTENSION_404_EXTENSION_NAME = "VK_FB_extension_404"; + +/// VK_HUAWEI_extension_405 + +export const HUAWEI_EXTENSION_405_EXTENSION_NAME = "VK_HUAWEI_extension_405"; + +/// VK_HUAWEI_extension_406 + +export const HUAWEI_EXTENSION_406_EXTENSION_NAME = "VK_HUAWEI_extension_406"; + +/// VK_GGP_extension_407 + +export const GGP_EXTENSION_407_EXTENSION_NAME = "VK_GGP_extension_407"; + +/// VK_GGP_extension_408 + +export const GGP_EXTENSION_408_EXTENSION_NAME = "VK_GGP_extension_408"; + +/// VK_GGP_extension_409 + +export const GGP_EXTENSION_409_EXTENSION_NAME = "VK_GGP_extension_409"; + +/// VK_GGP_extension_410 + +export const GGP_EXTENSION_410_EXTENSION_NAME = "VK_GGP_extension_410"; + +/// VK_GGP_extension_411 + +export const GGP_EXTENSION_411_EXTENSION_NAME = "VK_GGP_extension_411"; + +/// VK_EXT_border_color_swizzle + +export const EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME = "VK_EXT_border_color_swizzle"; + +/// VK_EXT_pageable_device_local_memory + +export const EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME = "VK_EXT_pageable_device_local_memory"; + +/// VK_KHR_maintenance4 + +export const KHR_MAINTENANCE_4_EXTENSION_NAME = "VK_KHR_maintenance4"; + +/// VK_HUAWEI_extension_415 + +export const HUAWEI_EXTENSION_415_EXTENSION_NAME = "VK_HUAWEI_extension_415"; + +/// VK_ARM_extension_416 + +export const ARM_EXTENSION_416_EXTENSION_NAME = "VK_ARM_extension_416"; + +/// VK_KHR_extension_417 + +export const KHR_EXTENSION_417_EXTENSION_NAME = "VK_KHR_extension_417"; + +/// VK_ARM_extension_418 + +export const ARM_EXTENSION_418_EXTENSION_NAME = "VK_ARM_extension_418"; + +/// VK_EXT_extension_419 + +export const EXT_EXTENSION_419_EXTENSION_NAME = "VK_EXT_extension_419"; + +/// VK_EXT_extension_420 + +export const EXT_EXTENSION_420_EXTENSION_NAME = "VK_EXT_extension_420"; + +/// VK_VALVE_descriptor_set_host_mapping + +export const VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME = "VK_VALVE_descriptor_set_host_mapping"; + +/// VK_EXT_depth_clamp_zero_one + +export const EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME = "VK_EXT_depth_clamp_zero_one"; + +/// VK_EXT_non_seamless_cube_map + +export const EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME = "VK_EXT_non_seamless_cube_map"; + +/// VK_ARM_extension_424 + +export const ARM_EXTENSION_424_EXTENSION_NAME = "VK_ARM_extension_424"; + +/// VK_ARM_extension_425 + +export const ARM_EXTENSION_425_EXTENSION_NAME = "VK_ARM_extension_425"; + +/// VK_QCOM_fragment_density_map_offset + +export const QCOM_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME = "VK_QCOM_fragment_density_map_offset"; + +/// VK_NV_copy_memory_indirect + +export const NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_NV_copy_memory_indirect"; + +/// VK_NV_memory_decompression + +export const NV_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_NV_memory_decompression"; + +/// VK_NV_extension_429 + +export const NV_EXTENSION_429_EXTENSION_NAME = "VK_NV_extension_429"; + +/// VK_NV_extension_430 + +export const NV_EXTENSION_430_EXTENSION_NAME = "VK_NV_extension_430"; + +/// VK_NV_linear_color_attachment + +export const NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME = "VK_NV_linear_color_attachment"; + +/// VK_NV_extension_432 + +export const NV_EXTENSION_432_EXTENSION_NAME = "VK_NV_extension_432"; + +/// VK_NV_extension_433 + +export const NV_EXTENSION_433_EXTENSION_NAME = "VK_NV_extension_433"; + +/// VK_GOOGLE_surfaceless_query + +export const GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME = "VK_GOOGLE_surfaceless_query"; + +/// VK_KHR_extension_435 + +export const KHR_EXTENSION_435_EXTENSION_NAME = "VK_KHR_extension_435"; + +/// VK_NV_extension_436 + +export const NV_EXTENSION_436_EXTENSION_NAME = "VK_NV_extension_436"; + +/// VK_EXT_extension_437 + +export const EXT_EXTENSION_437_EXTENSION_NAME = "VK_EXT_extension_437"; + +/// VK_EXT_image_compression_control_swapchain + +export const EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME = "VK_EXT_image_compression_control_swapchain"; + +/// VK_SEC_extension_439 + +export const SEC_EXTENSION_439_EXTENSION_NAME = "VK_SEC_extension_439"; + +/// VK_QCOM_extension_440 + +export const QCOM_EXTENSION_440_EXTENSION_NAME = "VK_QCOM_extension_440"; + +/// VK_QCOM_image_processing + +export const QCOM_IMAGE_PROCESSING_EXTENSION_NAME = "VK_QCOM_image_processing"; + +/// VK_COREAVI_extension_442 + +export const COREAVI_EXTENSION_442_EXTENSION_NAME = "VK_COREAVI_extension_442"; + +/// VK_COREAVI_extension_443 + +export const COREAVI_EXTENSION_443_EXTENSION_NAME = "VK_COREAVI_extension_443"; + +/// VK_COREAVI_extension_444 + +export const COREAVI_EXTENSION_444_EXTENSION_NAME = "VK_COREAVI_extension_444"; + +/// VK_COREAVI_extension_445 + +export const COREAVI_EXTENSION_445_EXTENSION_NAME = "VK_COREAVI_extension_445"; + +/// VK_COREAVI_extension_446 + +export const COREAVI_EXTENSION_446_EXTENSION_NAME = "VK_COREAVI_extension_446"; + +/// VK_COREAVI_extension_447 + +export const COREAVI_EXTENSION_447_EXTENSION_NAME = "VK_COREAVI_extension_447"; + +/// VK_SEC_extension_448 + +export const SEC_EXTENSION_448_EXTENSION_NAME = "VK_SEC_extension_448"; + +/// VK_SEC_extension_449 + +export const SEC_EXTENSION_449_EXTENSION_NAME = "VK_SEC_extension_449"; + +/// VK_SEC_extension_450 + +export const SEC_EXTENSION_450_EXTENSION_NAME = "VK_SEC_extension_450"; + +/// VK_SEC_extension_451 + +export const SEC_EXTENSION_451_EXTENSION_NAME = "VK_SEC_extension_451"; + +/// VK_NV_extension_452 + +export const NV_EXTENSION_452_EXTENSION_NAME = "VK_NV_extension_452"; + +/// VK_ARM_extension_453 + +export const ARM_EXTENSION_453_EXTENSION_NAME = "VK_ARM_extension_453"; + +/// VK_GOOGLE_extension_454 + +export const GOOGLE_EXTENSION_454_EXTENSION_NAME = "VK_GOOGLE_extension_454"; + +/// VK_GOOGLE_extension_455 + +export const GOOGLE_EXTENSION_455_EXTENSION_NAME = "VK_GOOGLE_extension_455"; + +/// VK_EXT_extended_dynamic_state3 + +export const EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME = "VK_EXT_extended_dynamic_state3"; + +/// VK_EXT_extension_457 + +export const EXT_EXTENSION_457_EXTENSION_NAME = "VK_EXT_extension_457"; + +/// VK_EXT_extension_458 + +export const EXT_EXTENSION_458_EXTENSION_NAME = "VK_EXT_extension_458"; + +/// VK_EXT_subpass_merge_feedback + +export const EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME = "VK_EXT_subpass_merge_feedback"; + +/// VK_EXT_extension_460 + +export const EXT_EXTENSION_460_EXTENSION_NAME = "VK_EXT_extension_460"; + +/// VK_EXT_extension_461 + +export const EXT_EXTENSION_461_EXTENSION_NAME = "VK_EXT_extension_461"; + +/// VK_EXT_extension_462 + +export const EXT_EXTENSION_462_EXTENSION_NAME = "VK_EXT_extension_462"; + +/// VK_EXT_shader_module_identifier + +export const EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME = "VK_EXT_shader_module_identifier"; + +/// VK_EXT_rasterization_order_attachment_access + +export const EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_EXT_rasterization_order_attachment_access"; + +/// VK_NV_optical_flow + +export const NV_OPTICAL_FLOW_EXTENSION_NAME = "VK_NV_optical_flow"; + +/// VK_EXT_legacy_dithering + +export const EXT_LEGACY_DITHERING_EXTENSION_NAME = "VK_EXT_legacy_dithering"; + +/// VK_EXT_pipeline_protected_access + +export const EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME = "VK_EXT_pipeline_protected_access"; + +/// VK_EXT_extension_468 + +export const EXT_EXTENSION_468_EXTENSION_NAME = "VK_EXT_extension_468"; + +/// VK_ANDROID_extension_469 + +export const ANDROID_EXTENSION_469_EXTENSION_NAME = "VK_ANDROID_extension_469"; + +/// VK_AMD_extension_470 + +export const AMD_EXTENSION_470_EXTENSION_NAME = "VK_AMD_extension_470"; + +/// VK_AMD_extension_471 + +export const AMD_EXTENSION_471_EXTENSION_NAME = "VK_AMD_extension_471"; + +/// VK_AMD_extension_472 + +export const AMD_EXTENSION_472_EXTENSION_NAME = "VK_AMD_extension_472"; + +/// VK_AMD_extension_473 + +export const AMD_EXTENSION_473_EXTENSION_NAME = "VK_AMD_extension_473"; + +/// VK_AMD_extension_474 + +export const AMD_EXTENSION_474_EXTENSION_NAME = "VK_AMD_extension_474"; + +/// VK_AMD_extension_475 + +export const AMD_EXTENSION_475_EXTENSION_NAME = "VK_AMD_extension_475"; + +/// VK_AMD_extension_476 + +export const AMD_EXTENSION_476_EXTENSION_NAME = "VK_AMD_extension_476"; + +/// VK_AMD_extension_477 + +export const AMD_EXTENSION_477_EXTENSION_NAME = "VK_AMD_extension_477"; + +/// VK_AMD_extension_478 + +export const AMD_EXTENSION_478_EXTENSION_NAME = "VK_AMD_extension_478"; + +/// VK_AMD_extension_479 + +export const AMD_EXTENSION_479_EXTENSION_NAME = "VK_AMD_extension_479"; + +/// VK_EXT_extension_480 + +export const EXT_EXTENSION_480_EXTENSION_NAME = "VK_EXT_extension_480"; + +/// VK_EXT_extension_481 + +export const EXT_EXTENSION_481_EXTENSION_NAME = "VK_EXT_extension_481"; + +/// VK_EXT_extension_482 + +export const EXT_EXTENSION_482_EXTENSION_NAME = "VK_EXT_extension_482"; + +/// VK_EXT_extension_483 + +export const EXT_EXTENSION_483_EXTENSION_NAME = "VK_EXT_extension_483"; + +/// VK_EXT_extension_484 + +export const EXT_EXTENSION_484_EXTENSION_NAME = "VK_EXT_extension_484"; + +/// VK_QCOM_tile_properties + +export const QCOM_TILE_PROPERTIES_EXTENSION_NAME = "VK_QCOM_tile_properties"; + +/// VK_SEC_amigo_profiling + +export const SEC_AMIGO_PROFILING_EXTENSION_NAME = "VK_SEC_amigo_profiling"; + +/// VK_EXT_extension_487 + +export const EXT_EXTENSION_487_EXTENSION_NAME = "VK_EXT_extension_487"; + +/// VK_EXT_extension_488 + +export const EXT_EXTENSION_488_EXTENSION_NAME = "VK_EXT_extension_488"; + +/// VK_QCOM_extension_489 + +export const QCOM_EXTENSION_489_EXTENSION_NAME = "VK_QCOM_extension_489"; + +/// VK_NV_extension_490 + +export const NV_EXTENSION_490_EXTENSION_NAME = "VK_NV_extension_490"; + +/// VK_NV_ray_tracing_invocation_reorder + +export const NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME = "VK_NV_ray_tracing_invocation_reorder"; + +/// VK_NV_extension_492 + +export const NV_EXTENSION_492_EXTENSION_NAME = "VK_NV_extension_492"; + +/// VK_NV_extension_493 + +export const NV_EXTENSION_493_EXTENSION_NAME = "VK_NV_extension_493"; + +/// VK_NV_extension_494 + +export const NV_EXTENSION_494_EXTENSION_NAME = "VK_NV_extension_494"; + +/// VK_EXT_mutable_descriptor_type + +export const EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_EXT_mutable_descriptor_type"; + +/// VK_EXT_extension_496 + +export const EXT_EXTENSION_496_EXTENSION_NAME = "VK_EXT_extension_496"; + +/// VK_EXT_extension_497 + +export const EXT_EXTENSION_497_EXTENSION_NAME = "VK_EXT_extension_497"; + +/// VK_ARM_shader_core_builtins + +export const ARM_SHADER_CORE_BUILTINS_EXTENSION_NAME = "VK_ARM_shader_core_builtins"; + +/// VK_EXT_extension_499 + +export const EXT_EXTENSION_499_EXTENSION_NAME = "VK_EXT_extension_499"; + +/// VK_EXT_extension_500 + +export const EXT_EXTENSION_500_EXTENSION_NAME = "VK_EXT_extension_500"; + +/// VK_EXT_extension_501 + +export const EXT_EXTENSION_501_EXTENSION_NAME = "VK_EXT_extension_501"; + +/// VK_EXT_extension_502 + +export const EXT_EXTENSION_502_EXTENSION_NAME = "VK_EXT_extension_502"; + +/// VK_EXT_extension_503 + +export const EXT_EXTENSION_503_EXTENSION_NAME = "VK_EXT_extension_503"; + +/// VK_NV_extension_504 + +export const NV_EXTENSION_504_EXTENSION_NAME = "VK_NV_extension_504"; \ No newline at end of file diff --git a/api/def.ts b/api/def.ts new file mode 100644 index 0000000..43586b3 --- /dev/null +++ b/api/def.ts @@ -0,0 +1,531 @@ +/// Type definitions + +export type MTLDevice_id = Deno.PointerValue; + +export type MTLCommandQueue_id = Deno.PointerValue; + +export type MTLBuffer_id = Deno.PointerValue; + +export type MTLTexture_id = Deno.PointerValue; + +export type MTLSharedEvent_id = Deno.PointerValue; + +export type IOSurfaceRef = Deno.PointerValue; + +export type SampleMask = number; + +export type Bool32 = number; + +export type Flags = number; + +export type Flags64 = number | bigint; + +export type DeviceSize = number | bigint; + +export type DeviceAddress = number | bigint; + +export type FramebufferCreateFlags = Flags; + +export type QueryPoolCreateFlags = Flags; + +export type RenderPassCreateFlags = Flags; + +export type SamplerCreateFlags = Flags; + +export type PipelineLayoutCreateFlags = Flags; + +export type PipelineCacheCreateFlags = Flags; + +export type PipelineDepthStencilStateCreateFlags = Flags; + +export type PipelineDynamicStateCreateFlags = Flags; + +export type PipelineColorBlendStateCreateFlags = Flags; + +export type PipelineMultisampleStateCreateFlags = Flags; + +export type PipelineRasterizationStateCreateFlags = Flags; + +export type PipelineViewportStateCreateFlags = Flags; + +export type PipelineTessellationStateCreateFlags = Flags; + +export type PipelineInputAssemblyStateCreateFlags = Flags; + +export type PipelineVertexInputStateCreateFlags = Flags; + +export type PipelineShaderStageCreateFlags = Flags; + +export type DescriptorSetLayoutCreateFlags = Flags; + +export type BufferViewCreateFlags = Flags; + +export type InstanceCreateFlags = Flags; + +export type DeviceCreateFlags = Flags; + +export type DeviceQueueCreateFlags = Flags; + +export type QueueFlags = Flags; + +export type MemoryPropertyFlags = Flags; + +export type MemoryHeapFlags = Flags; + +export type AccessFlags = Flags; + +export type BufferUsageFlags = Flags; + +export type BufferCreateFlags = Flags; + +export type ShaderStageFlags = Flags; + +export type ImageUsageFlags = Flags; + +export type ImageCreateFlags = Flags; + +export type ImageViewCreateFlags = Flags; + +export type PipelineCreateFlags = Flags; + +export type ColorComponentFlags = Flags; + +export type FenceCreateFlags = Flags; + +export type SemaphoreCreateFlags = Flags; + +export type FormatFeatureFlags = Flags; + +export type QueryControlFlags = Flags; + +export type QueryResultFlags = Flags; + +export type ShaderModuleCreateFlags = Flags; + +export type EventCreateFlags = Flags; + +export type CommandPoolCreateFlags = Flags; + +export type CommandPoolResetFlags = Flags; + +export type CommandBufferResetFlags = Flags; + +export type CommandBufferUsageFlags = Flags; + +export type QueryPipelineStatisticFlags = Flags; + +export type MemoryMapFlags = Flags; + +export type ImageAspectFlags = Flags; + +export type SparseMemoryBindFlags = Flags; + +export type SparseImageFormatFlags = Flags; + +export type SubpassDescriptionFlags = Flags; + +export type PipelineStageFlags = Flags; + +export type SampleCountFlags = Flags; + +export type AttachmentDescriptionFlags = Flags; + +export type StencilFaceFlags = Flags; + +export type CullModeFlags = Flags; + +export type DescriptorPoolCreateFlags = Flags; + +export type DescriptorPoolResetFlags = Flags; + +export type DependencyFlags = Flags; + +export type SubgroupFeatureFlags = Flags; + +export type IndirectCommandsLayoutUsageFlagsNV = Flags; + +export type IndirectStateFlagsNV = Flags; + +export type GeometryFlagsKHR = Flags; + +export type GeometryInstanceFlagsKHR = Flags; + +export type BuildAccelerationStructureFlagsKHR = Flags; + +export type PrivateDataSlotCreateFlags = Flags; + +export type AccelerationStructureCreateFlagsKHR = Flags; + +export type DescriptorUpdateTemplateCreateFlags = Flags; + +export type PipelineCreationFeedbackFlags = Flags; + +export type PerformanceCounterDescriptionFlagsKHR = Flags; + +export type AcquireProfilingLockFlagsKHR = Flags; + +export type SemaphoreWaitFlags = Flags; + +export type PipelineCompilerControlFlagsAMD = Flags; + +export type ShaderCorePropertiesFlagsAMD = Flags; + +export type DeviceDiagnosticsConfigFlagsNV = Flags; + +export type AccessFlags2 = Flags64; + +export type PipelineStageFlags2 = Flags64; + +export type AccelerationStructureMotionInfoFlagsNV = Flags; + +export type AccelerationStructureMotionInstanceFlagsNV = Flags; + +export type FormatFeatureFlags2 = Flags64; + +export type RenderingFlags = Flags; + +export type MemoryDecompressionMethodFlagsNV = Flags64; + +export type BuildMicromapFlagsEXT = Flags; + +export type MicromapCreateFlagsEXT = Flags; + +export type CompositeAlphaFlagsKHR = Flags; + +export type DisplayPlaneAlphaFlagsKHR = Flags; + +export type SurfaceTransformFlagsKHR = Flags; + +export type SwapchainCreateFlagsKHR = Flags; + +export type DisplayModeCreateFlagsKHR = Flags; + +export type DisplaySurfaceCreateFlagsKHR = Flags; + +export type AndroidSurfaceCreateFlagsKHR = Flags; + +export type ViSurfaceCreateFlagsNN = Flags; + +export type WaylandSurfaceCreateFlagsKHR = Flags; + +export type Win32SurfaceCreateFlagsKHR = Flags; + +export type XlibSurfaceCreateFlagsKHR = Flags; + +export type XcbSurfaceCreateFlagsKHR = Flags; + +export type DirectFBSurfaceCreateFlagsEXT = Flags; + +export type IOSSurfaceCreateFlagsMVK = Flags; + +export type MacOSSurfaceCreateFlagsMVK = Flags; + +export type MetalSurfaceCreateFlagsEXT = Flags; + +export type ImagePipeSurfaceCreateFlagsFUCHSIA = Flags; + +export type StreamDescriptorSurfaceCreateFlagsGGP = Flags; + +export type HeadlessSurfaceCreateFlagsEXT = Flags; + +export type ScreenSurfaceCreateFlagsQNX = Flags; + +export type PeerMemoryFeatureFlags = Flags; + +export type MemoryAllocateFlags = Flags; + +export type DeviceGroupPresentModeFlagsKHR = Flags; + +export type DebugReportFlagsEXT = Flags; + +export type CommandPoolTrimFlags = Flags; + +export type ExternalMemoryHandleTypeFlagsNV = Flags; + +export type ExternalMemoryFeatureFlagsNV = Flags; + +export type ExternalMemoryHandleTypeFlags = Flags; + +export type ExternalMemoryFeatureFlags = Flags; + +export type ExternalSemaphoreHandleTypeFlags = Flags; + +export type ExternalSemaphoreFeatureFlags = Flags; + +export type SemaphoreImportFlags = Flags; + +export type ExternalFenceHandleTypeFlags = Flags; + +export type ExternalFenceFeatureFlags = Flags; + +export type FenceImportFlags = Flags; + +export type SurfaceCounterFlagsEXT = Flags; + +export type PipelineViewportSwizzleStateCreateFlagsNV = Flags; + +export type PipelineDiscardRectangleStateCreateFlagsEXT = Flags; + +export type PipelineCoverageToColorStateCreateFlagsNV = Flags; + +export type PipelineCoverageModulationStateCreateFlagsNV = Flags; + +export type PipelineCoverageReductionStateCreateFlagsNV = Flags; + +export type ValidationCacheCreateFlagsEXT = Flags; + +export type DebugUtilsMessageSeverityFlagsEXT = Flags; + +export type DebugUtilsMessageTypeFlagsEXT = Flags; + +export type DebugUtilsMessengerCreateFlagsEXT = Flags; + +export type DebugUtilsMessengerCallbackDataFlagsEXT = Flags; + +export type DeviceMemoryReportFlagsEXT = Flags; + +export type PipelineRasterizationConservativeStateCreateFlagsEXT = Flags; + +export type DescriptorBindingFlags = Flags; + +export type ConditionalRenderingFlagsEXT = Flags; + +export type ResolveModeFlags = Flags; + +export type PipelineRasterizationStateStreamCreateFlagsEXT = Flags; + +export type PipelineRasterizationDepthClipStateCreateFlagsEXT = Flags; + +export type SwapchainImageUsageFlagsANDROID = Flags; + +export type ToolPurposeFlags = Flags; + +export type SubmitFlags = Flags; + +export type ImageFormatConstraintsFlagsFUCHSIA = Flags; + +export type ImageConstraintsInfoFlagsFUCHSIA = Flags; + +export type GraphicsPipelineLibraryFlagsEXT = Flags; + +export type ImageCompressionFlagsEXT = Flags; + +export type ImageCompressionFixedRateFlagsEXT = Flags; + +export type ExportMetalObjectTypeFlagsEXT = Flags; + +export type DeviceAddressBindingFlagsEXT = Flags; + +export type OpticalFlowGridSizeFlagsNV = Flags; + +export type OpticalFlowUsageFlagsNV = Flags; + +export type OpticalFlowSessionCreateFlagsNV = Flags; + +export type OpticalFlowExecuteFlagsNV = Flags; + +export type VideoCodecOperationFlagsKHR = Flags; + +export type VideoCapabilityFlagsKHR = Flags; + +export type VideoSessionCreateFlagsKHR = Flags; + +export type VideoSessionParametersCreateFlagsKHR = Flags; + +export type VideoBeginCodingFlagsKHR = Flags; + +export type VideoEndCodingFlagsKHR = Flags; + +export type VideoCodingControlFlagsKHR = Flags; + +export type VideoDecodeUsageFlagsKHR = Flags; + +export type VideoDecodeCapabilityFlagsKHR = Flags; + +export type VideoDecodeFlagsKHR = Flags; + +export type VideoDecodeH264PictureLayoutFlagsEXT = Flags; + +export type VideoEncodeFlagsKHR = Flags; + +export type VideoEncodeUsageFlagsKHR = Flags; + +export type VideoEncodeContentFlagsKHR = Flags; + +export type VideoEncodeCapabilityFlagsKHR = Flags; + +export type VideoEncodeRateControlFlagsKHR = Flags; + +export type VideoEncodeRateControlModeFlagsKHR = Flags; + +export type VideoChromaSubsamplingFlagsKHR = Flags; + +export type VideoComponentBitDepthFlagsKHR = Flags; + +export type VideoEncodeH264CapabilityFlagsEXT = Flags; + +export type VideoEncodeH264InputModeFlagsEXT = Flags; + +export type VideoEncodeH264OutputModeFlagsEXT = Flags; + +export type VideoEncodeH265CapabilityFlagsEXT = Flags; + +export type VideoEncodeH265InputModeFlagsEXT = Flags; + +export type VideoEncodeH265OutputModeFlagsEXT = Flags; + +export type VideoEncodeH265CtbSizeFlagsEXT = Flags; + +export type VideoEncodeH265TransformBlockSizeFlagsEXT = Flags; + +export type Instance = Deno.PointerValue; + +export type PhysicalDevice = Deno.PointerValue; + +export type Device = Deno.PointerValue; + +export type Queue = Deno.PointerValue; + +export type CommandBuffer = Deno.PointerValue; + +export type DeviceMemory = Deno.PointerValue; + +export type CommandPool = Deno.PointerValue; + +export type Buffer = Deno.PointerValue; + +export type BufferView = Deno.PointerValue; + +export type Image = Deno.PointerValue; + +export type ImageView = Deno.PointerValue; + +export type ShaderModule = Deno.PointerValue; + +export type Pipeline = Deno.PointerValue; + +export type PipelineLayout = Deno.PointerValue; + +export type Sampler = Deno.PointerValue; + +export type DescriptorSet = Deno.PointerValue; + +export type DescriptorSetLayout = Deno.PointerValue; + +export type DescriptorPool = Deno.PointerValue; + +export type Fence = Deno.PointerValue; + +export type Semaphore = Deno.PointerValue; + +export type Event = Deno.PointerValue; + +export type QueryPool = Deno.PointerValue; + +export type Framebuffer = Deno.PointerValue; + +export type RenderPass = Deno.PointerValue; + +export type PipelineCache = Deno.PointerValue; + +export type IndirectCommandsLayoutNV = Deno.PointerValue; + +export type DescriptorUpdateTemplate = Deno.PointerValue; + +export type DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate; + +export type SamplerYcbcrConversion = Deno.PointerValue; + +export type SamplerYcbcrConversionKHR = SamplerYcbcrConversion; + +export type ValidationCacheEXT = Deno.PointerValue; + +export type AccelerationStructureKHR = Deno.PointerValue; + +export type AccelerationStructureNV = Deno.PointerValue; + +export type PerformanceConfigurationINTEL = Deno.PointerValue; + +export type BufferCollectionFUCHSIA = Deno.PointerValue; + +export type DeferredOperationKHR = Deno.PointerValue; + +export type PrivateDataSlot = Deno.PointerValue; + +export type PrivateDataSlotEXT = PrivateDataSlot; + +export type CuModuleNVX = Deno.PointerValue; + +export type CuFunctionNVX = Deno.PointerValue; + +export type OpticalFlowSessionNV = Deno.PointerValue; + +export type MicromapEXT = Deno.PointerValue; + +export type DisplayKHR = Deno.PointerValue; + +export type DisplayModeKHR = Deno.PointerValue; + +export type SurfaceKHR = Deno.PointerValue; + +export type SwapchainKHR = Deno.PointerValue; + +export type DebugReportCallbackEXT = Deno.PointerValue; + +export type DebugUtilsMessengerEXT = Deno.PointerValue; + +export type VideoSessionKHR = Deno.PointerValue; + +export type VideoSessionParametersKHR = Deno.PointerValue; + +export type GeometryFlagsNV = GeometryFlagsKHR; + +export type GeometryInstanceFlagsNV = GeometryInstanceFlagsKHR; + +export type BuildAccelerationStructureFlagsNV = BuildAccelerationStructureFlagsKHR; + +export type PrivateDataSlotCreateFlagsEXT = PrivateDataSlotCreateFlags; + +export type DescriptorUpdateTemplateCreateFlagsKHR = DescriptorUpdateTemplateCreateFlags; + +export type PipelineCreationFeedbackFlagsEXT = PipelineCreationFeedbackFlags; + +export type SemaphoreWaitFlagsKHR = SemaphoreWaitFlags; + +export type AccessFlags2KHR = AccessFlags2; + +export type PipelineStageFlags2KHR = PipelineStageFlags2; + +export type FormatFeatureFlags2KHR = FormatFeatureFlags2; + +export type RenderingFlagsKHR = RenderingFlags; + +export type PeerMemoryFeatureFlagsKHR = PeerMemoryFeatureFlags; + +export type MemoryAllocateFlagsKHR = MemoryAllocateFlags; + +export type CommandPoolTrimFlagsKHR = CommandPoolTrimFlags; + +export type ExternalMemoryHandleTypeFlagsKHR = ExternalMemoryHandleTypeFlags; + +export type ExternalMemoryFeatureFlagsKHR = ExternalMemoryFeatureFlags; + +export type ExternalSemaphoreHandleTypeFlagsKHR = ExternalSemaphoreHandleTypeFlags; + +export type ExternalSemaphoreFeatureFlagsKHR = ExternalSemaphoreFeatureFlags; + +export type SemaphoreImportFlagsKHR = SemaphoreImportFlags; + +export type ExternalFenceHandleTypeFlagsKHR = ExternalFenceHandleTypeFlags; + +export type ExternalFenceFeatureFlagsKHR = ExternalFenceFeatureFlags; + +export type FenceImportFlagsKHR = FenceImportFlags; + +export type DescriptorBindingFlagsEXT = DescriptorBindingFlags; + +export type ResolveModeFlagsKHR = ResolveModeFlags; + +export type ToolPurposeFlagsEXT = ToolPurposeFlags; + +export type SubmitFlagsKHR = SubmitFlags; \ No newline at end of file diff --git a/api/enum.ts b/api/enum.ts new file mode 100644 index 0000000..abd9bc5 --- /dev/null +++ b/api/enum.ts @@ -0,0 +1,4481 @@ +// deno-lint-ignore-file no-empty-enum + +export enum StdVideoH264ChromaFormatIdc { + MONOCHROME = 0, + VK_420 = 1, + VK_422 = 2, + VK_444 = 3, + INVALID = 2147483647, +} + +export enum StdVideoH264ProfileIdc { + /** Only constrained baseline is supported */ + BASELINE = 66, + MAIN = 77, + HIGH = 100, + HIGH_444_PREDICTIVE = 244, + INVALID = 2147483647, +} + +export enum StdVideoH264LevelIdc { + VK_1_0 = 0, + VK_1_1 = 1, + VK_1_2 = 2, + VK_1_3 = 3, + VK_2_0 = 4, + VK_2_1 = 5, + VK_2_2 = 6, + VK_3_0 = 7, + VK_3_1 = 8, + VK_3_2 = 9, + VK_4_0 = 10, + VK_4_1 = 11, + VK_4_2 = 12, + VK_5_0 = 13, + VK_5_1 = 14, + VK_5_2 = 15, + VK_6_0 = 16, + VK_6_1 = 17, + VK_6_2 = 18, + INVALID = 2147483647, +} + +export enum StdVideoH264PocType { + VK_0 = 0, + VK_1 = 1, + VK_2 = 2, + INVALID = 2147483647, +} + +export enum StdVideoH264AspectRatioIdc { + UNSPECIFIED = 0, + SQUARE = 1, + VK_12_11 = 2, + VK_10_11 = 3, + VK_16_11 = 4, + VK_40_33 = 5, + VK_24_11 = 6, + VK_20_11 = 7, + VK_32_11 = 8, + VK_80_33 = 9, + VK_18_11 = 10, + VK_15_11 = 11, + VK_64_33 = 12, + VK_160_99 = 13, + VK_4_3 = 14, + VK_3_2 = 15, + VK_2_1 = 16, + EXTENDED_SAR = 255, + INVALID = 2147483647, +} + +export enum StdVideoH264WeightedBipredIdc { + DEFAULT = 0, + EXPLICIT = 1, + IMPLICIT = 2, + INVALID = 2147483647, +} + +export enum StdVideoH264ModificationOfPicNumsIdc { + SHORT_TERM_SUBTRACT = 0, + SHORT_TERM_ADD = 1, + LONG_TERM = 2, + END = 3, + INVALID = 2147483647, +} + +export enum StdVideoH264MemMgmtControlOp { + END = 0, + UNMARK_SHORT_TERM = 1, + UNMARK_LONG_TERM = 2, + MARK_LONG_TERM = 3, + SET_MAX_LONG_TERM_INDEX = 4, + UNMARK_ALL = 5, + MARK_CURRENT_AS_LONG_TERM = 6, + INVALID = 2147483647, +} + +export enum StdVideoH264CabacInitIdc { + VK_0 = 0, + VK_1 = 1, + VK_2 = 2, + INVALID = 2147483647, +} + +export enum StdVideoH264DisableDeblockingFilterIdc { + DISABLED = 0, + ENABLED = 1, + PARTIAL = 2, + INVALID = 2147483647, +} + +export enum StdVideoH264SliceType { + P = 0, + B = 1, + I = 2, + INVALID = 2147483647, +} + +export enum StdVideoH264PictureType { + P = 0, + B = 1, + I = 2, + IDR = 5, + INVALID = 2147483647, +} + +export enum StdVideoH264NonVclNaluType { + SPS = 0, + PPS = 1, + AUD = 2, + PREFIX = 3, + END_OF_SEQUENCE = 4, + END_OF_STREAM = 5, + PRECODED = 6, + INVALID = 2147483647, +} + +export enum StdVideoDecodeH264FieldOrderCount { + TOP = 0, + BOTTOM = 1, + INVALID = 2147483647, +} + +export enum StdVideoH265ChromaFormatIdc { + MONOCHROME = 0, + VK_420 = 1, + VK_422 = 2, + VK_444 = 3, + INVALID = 2147483647, +} + +export enum StdVideoH265ProfileIdc { + MAIN = 1, + MAIN_10 = 2, + MAIN_STILL_PICTURE = 3, + FORMAT_RANGE_EXTENSIONS = 4, + SCC_EXTENSIONS = 9, + INVALID = 2147483647, +} + +export enum StdVideoH265LevelIdc { + VK_1_0 = 0, + VK_2_0 = 1, + VK_2_1 = 2, + VK_3_0 = 3, + VK_3_1 = 4, + VK_4_0 = 5, + VK_4_1 = 6, + VK_5_0 = 7, + VK_5_1 = 8, + VK_5_2 = 9, + VK_6_0 = 10, + VK_6_1 = 11, + VK_6_2 = 12, + INVALID = 2147483647, +} + +export enum StdVideoH265SliceType { + B = 0, + P = 1, + I = 2, + INVALID = 2147483647, +} + +export enum StdVideoH265PictureType { + P = 0, + B = 1, + I = 2, + IDR = 3, + INVALID = 2147483647, +} + +export enum StdVideoH265AspectRatioIdc { + UNSPECIFIED = 0, + SQUARE = 1, + VK_12_11 = 2, + VK_10_11 = 3, + VK_16_11 = 4, + VK_40_33 = 5, + VK_24_11 = 6, + VK_20_11 = 7, + VK_32_11 = 8, + VK_80_33 = 9, + VK_18_11 = 10, + VK_15_11 = 11, + VK_64_33 = 12, + VK_160_99 = 13, + VK_4_3 = 14, + VK_3_2 = 15, + VK_2_1 = 16, + EXTENDED_SAR = 255, + INVALID = 2147483647, +} + +export enum ImageLayout { + /** Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) */ + UNDEFINED = 0, + /** General layout when image can be used for any kind of access */ + GENERAL = 1, + /** Optimal layout when image is only used for color attachment read/write */ + COLOR_ATTACHMENT_OPTIMAL = 2, + /** Optimal layout when image is only used for depth/stencil attachment read/write */ + DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, + /** Optimal layout when image is used for read only depth/stencil attachment and shader access */ + DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, + /** Optimal layout when image is used for read only shader access */ + SHADER_READ_ONLY_OPTIMAL = 5, + /** Optimal layout when image is used only as source of transfer operations */ + TRANSFER_SRC_OPTIMAL = 6, + /** Optimal layout when image is used only as destination of transfer operations */ + TRANSFER_DST_OPTIMAL = 7, + /** Initial layout used when the data is populated by the CPU */ + PREINITIALIZED = 8, + DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000, + DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001, + DEPTH_ATTACHMENT_OPTIMAL = 1000241000, + DEPTH_READ_ONLY_OPTIMAL = 1000241001, + STENCIL_ATTACHMENT_OPTIMAL = 1000241002, + STENCIL_READ_ONLY_OPTIMAL = 1000241003, + READ_ONLY_OPTIMAL = 1000314000, + ATTACHMENT_OPTIMAL = 1000314001, + PRESENT_SRC_KHR = 1000001002, + VIDEO_DECODE_DST_KHR = 1000024000, + VIDEO_DECODE_SRC_KHR = 1000024001, + VIDEO_DECODE_DPB_KHR = 1000024002, + SHARED_PRESENT_KHR = 1000111000, + DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000117000, + DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = 1000117001, + SHADING_RATE_OPTIMAL_NV = 1000164003, + FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000, + FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003, + DEPTH_ATTACHMENT_OPTIMAL_KHR = 1000241000, + DEPTH_READ_ONLY_OPTIMAL_KHR = 1000241001, + STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000241002, + STENCIL_READ_ONLY_OPTIMAL_KHR = 1000241003, + VIDEO_ENCODE_DST_KHR = 1000299000, + VIDEO_ENCODE_SRC_KHR = 1000299001, + VIDEO_ENCODE_DPB_KHR = 1000299002, + READ_ONLY_OPTIMAL_KHR = 1000314000, + ATTACHMENT_OPTIMAL_KHR = 1000314001, + ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000, +} + +export enum AttachmentLoadOp { + LOAD = 0, + CLEAR = 1, + DONT_CARE = 2, + NONE_EXT = 1000400000, +} + +export enum AttachmentStoreOp { + STORE = 0, + DONT_CARE = 1, + NONE = 1000301000, + NONE_KHR = 1000301000, + NONE_QCOM = 1000301000, + NONE_EXT = 1000301000, +} + +export enum ImageType { + VK_1D = 0, + VK_2D = 1, + VK_3D = 2, +} + +export enum ImageTiling { + OPTIMAL = 0, + LINEAR = 1, + DRM_FORMAT_MODIFIER_EXT = 1000158000, +} + +export enum ImageViewType { + VK_1D = 0, + VK_2D = 1, + VK_3D = 2, + CUBE = 3, + VK_1D_ARRAY = 4, + VK_2D_ARRAY = 5, + CUBE_ARRAY = 6, +} + +export enum CommandBufferLevel { + PRIMARY = 0, + SECONDARY = 1, +} + +export enum ComponentSwizzle { + IDENTITY = 0, + ZERO = 1, + ONE = 2, + R = 3, + G = 4, + B = 5, + A = 6, +} + +export enum DescriptorType { + SAMPLER = 0, + COMBINED_IMAGE_SAMPLER = 1, + SAMPLED_IMAGE = 2, + STORAGE_IMAGE = 3, + UNIFORM_TEXEL_BUFFER = 4, + STORAGE_TEXEL_BUFFER = 5, + UNIFORM_BUFFER = 6, + STORAGE_BUFFER = 7, + UNIFORM_BUFFER_DYNAMIC = 8, + STORAGE_BUFFER_DYNAMIC = 9, + INPUT_ATTACHMENT = 10, + INLINE_UNIFORM_BLOCK = 1000138000, + INLINE_UNIFORM_BLOCK_EXT = 1000138000, + ACCELERATION_STRUCTURE_KHR = 1000150000, + ACCELERATION_STRUCTURE_NV = 1000165000, + MUTABLE_VALVE = 1000351000, + SAMPLE_WEIGHT_IMAGE_QCOM = 1000440000, + BLOCK_MATCH_IMAGE_QCOM = 1000440001, + MUTABLE_EXT = 1000351000, +} + +export enum QueryType { + OCCLUSION = 0, + /** Optional */ + PIPELINE_STATISTICS = 1, + TIMESTAMP = 2, + RESULT_STATUS_ONLY_KHR = 1000023000, + TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004, + PERFORMANCE_QUERY_KHR = 1000116000, + ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR = 1000150000, + ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001, + ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000, + PERFORMANCE_QUERY_INTEL = 1000210000, + VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR = 1000299000, + MESH_PRIMITIVES_GENERATED_EXT = 1000328000, + PRIMITIVES_GENERATED_EXT = 1000382000, + ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR = 1000386000, + ACCELERATION_STRUCTURE_SIZE_KHR = 1000386001, + MICROMAP_SERIALIZATION_SIZE_EXT = 1000396000, + MICROMAP_COMPACTED_SIZE_EXT = 1000396001, +} + +export enum BorderColor { + FLOAT_TRANSPARENT_BLACK = 0, + INT_TRANSPARENT_BLACK = 1, + FLOAT_OPAQUE_BLACK = 2, + INT_OPAQUE_BLACK = 3, + FLOAT_OPAQUE_WHITE = 4, + INT_OPAQUE_WHITE = 5, + FLOAT_CUSTOM_EXT = 1000287003, + INT_CUSTOM_EXT = 1000287004, +} + +export enum PipelineBindPoint { + GRAPHICS = 0, + COMPUTE = 1, + RAY_TRACING_KHR = 1000165000, + RAY_TRACING_NV = 1000165000, + SUBPASS_SHADING_HUAWEI = 1000369003, +} + +export enum PipelineCacheHeaderVersion { + ONE = 1, +} + +export enum PipelineCacheCreateFlagBits { + EXTERNALLY_SYNCHRONIZED = 1 << 0, + RESERVED_1_BIT_EXT = 1 << 1, + EXTERNALLY_SYNCHRONIZED_BIT_EXT = 1 << 0, + RESERVED_1_BIT_KHR = 1 << 1, + RESERVED_2_BIT_KHR = 1 << 2, +} + +export enum PrimitiveTopology { + POINT_LIST = 0, + LINE_LIST = 1, + LINE_STRIP = 2, + TRIANGLE_LIST = 3, + TRIANGLE_STRIP = 4, + TRIANGLE_FAN = 5, + LINE_LIST_WITH_ADJACENCY = 6, + LINE_STRIP_WITH_ADJACENCY = 7, + TRIANGLE_LIST_WITH_ADJACENCY = 8, + TRIANGLE_STRIP_WITH_ADJACENCY = 9, + PATCH_LIST = 10, +} + +export enum SharingMode { + EXCLUSIVE = 0, + CONCURRENT = 1, +} + +export enum IndexType { + UINT16 = 0, + UINT32 = 1, + NONE_KHR = 1000165000, + NONE_NV = 1000165000, + UINT8_EXT = 1000265000, +} + +export enum Filter { + NEAREST = 0, + LINEAR = 1, + CUBIC_IMG = 1000015000, + CUBIC_EXT = 1000015000, +} + +export enum SamplerMipmapMode { + /** Choose nearest mip level */ + NEAREST = 0, + /** Linear filter between mip levels */ + LINEAR = 1, +} + +export enum SamplerAddressMode { + REPEAT = 0, + MIRRORED_REPEAT = 1, + CLAMP_TO_EDGE = 2, + CLAMP_TO_BORDER = 3, + /** No need to add an extnumber attribute, since this uses a core enum value */ + MIRROR_CLAMP_TO_EDGE = 4, + /** Alias introduced for consistency with extension suffixing rules */ + MIRROR_CLAMP_TO_EDGE_KHR = 4, +} + +export enum CompareOp { + NEVER = 0, + LESS = 1, + EQUAL = 2, + LESS_OR_EQUAL = 3, + GREATER = 4, + NOT_EQUAL = 5, + GREATER_OR_EQUAL = 6, + ALWAYS = 7, +} + +export enum PolygonMode { + FILL = 0, + LINE = 1, + POINT = 2, + FILL_RECTANGLE_NV = 1000153000, +} + +export enum FrontFace { + COUNTER_CLOCKWISE = 0, + CLOCKWISE = 1, +} + +export enum BlendFactor { + ZERO = 0, + ONE = 1, + SRC_COLOR = 2, + ONE_MINUS_SRC_COLOR = 3, + DST_COLOR = 4, + ONE_MINUS_DST_COLOR = 5, + SRC_ALPHA = 6, + ONE_MINUS_SRC_ALPHA = 7, + DST_ALPHA = 8, + ONE_MINUS_DST_ALPHA = 9, + CONSTANT_COLOR = 10, + ONE_MINUS_CONSTANT_COLOR = 11, + CONSTANT_ALPHA = 12, + ONE_MINUS_CONSTANT_ALPHA = 13, + SRC_ALPHA_SATURATE = 14, + SRC1_COLOR = 15, + ONE_MINUS_SRC1_COLOR = 16, + SRC1_ALPHA = 17, + ONE_MINUS_SRC1_ALPHA = 18, +} + +export enum BlendOp { + ADD = 0, + SUBTRACT = 1, + REVERSE_SUBTRACT = 2, + MIN = 3, + MAX = 4, + ZERO_EXT = 1000148000, + SRC_EXT = 1000148001, + DST_EXT = 1000148002, + SRC_OVER_EXT = 1000148003, + DST_OVER_EXT = 1000148004, + SRC_IN_EXT = 1000148005, + DST_IN_EXT = 1000148006, + SRC_OUT_EXT = 1000148007, + DST_OUT_EXT = 1000148008, + SRC_ATOP_EXT = 1000148009, + DST_ATOP_EXT = 1000148010, + XOR_EXT = 1000148011, + MULTIPLY_EXT = 1000148012, + SCREEN_EXT = 1000148013, + OVERLAY_EXT = 1000148014, + DARKEN_EXT = 1000148015, + LIGHTEN_EXT = 1000148016, + COLORDODGE_EXT = 1000148017, + COLORBURN_EXT = 1000148018, + HARDLIGHT_EXT = 1000148019, + SOFTLIGHT_EXT = 1000148020, + DIFFERENCE_EXT = 1000148021, + EXCLUSION_EXT = 1000148022, + INVERT_EXT = 1000148023, + INVERT_RGB_EXT = 1000148024, + LINEARDODGE_EXT = 1000148025, + LINEARBURN_EXT = 1000148026, + VIVIDLIGHT_EXT = 1000148027, + LINEARLIGHT_EXT = 1000148028, + PINLIGHT_EXT = 1000148029, + HARDMIX_EXT = 1000148030, + HSL_HUE_EXT = 1000148031, + HSL_SATURATION_EXT = 1000148032, + HSL_COLOR_EXT = 1000148033, + HSL_LUMINOSITY_EXT = 1000148034, + PLUS_EXT = 1000148035, + PLUS_CLAMPED_EXT = 1000148036, + PLUS_CLAMPED_ALPHA_EXT = 1000148037, + PLUS_DARKER_EXT = 1000148038, + MINUS_EXT = 1000148039, + MINUS_CLAMPED_EXT = 1000148040, + CONTRAST_EXT = 1000148041, + INVERT_OVG_EXT = 1000148042, + RED_EXT = 1000148043, + GREEN_EXT = 1000148044, + BLUE_EXT = 1000148045, +} + +export enum StencilOp { + KEEP = 0, + ZERO = 1, + REPLACE = 2, + INCREMENT_AND_CLAMP = 3, + DECREMENT_AND_CLAMP = 4, + INVERT = 5, + INCREMENT_AND_WRAP = 6, + DECREMENT_AND_WRAP = 7, +} + +export enum LogicOp { + CLEAR = 0, + AND = 1, + AND_REVERSE = 2, + COPY = 3, + AND_INVERTED = 4, + NO_OP = 5, + XOR = 6, + OR = 7, + NOR = 8, + EQUIVALENT = 9, + INVERT = 10, + OR_REVERSE = 11, + COPY_INVERTED = 12, + OR_INVERTED = 13, + NAND = 14, + SET = 15, +} + +export enum InternalAllocationType { + EXECUTABLE = 0, +} + +export enum SystemAllocationScope { + COMMAND = 0, + OBJECT = 1, + CACHE = 2, + DEVICE = 3, + INSTANCE = 4, +} + +export enum PhysicalDeviceType { + OTHER = 0, + INTEGRATED_GPU = 1, + DISCRETE_GPU = 2, + VIRTUAL_GPU = 3, + CPU = 4, +} + +export enum VertexInputRate { + VERTEX = 0, + INSTANCE = 1, +} + +/** Vulkan format definitions */ +export enum Format { + UNDEFINED = 0, + R4G4_UNORM_PACK8 = 1, + R4G4B4A4_UNORM_PACK16 = 2, + B4G4R4A4_UNORM_PACK16 = 3, + R5G6B5_UNORM_PACK16 = 4, + B5G6R5_UNORM_PACK16 = 5, + R5G5B5A1_UNORM_PACK16 = 6, + B5G5R5A1_UNORM_PACK16 = 7, + A1R5G5B5_UNORM_PACK16 = 8, + R8_UNORM = 9, + R8_SNORM = 10, + R8_USCALED = 11, + R8_SSCALED = 12, + R8_UINT = 13, + R8_SINT = 14, + R8_SRGB = 15, + R8G8_UNORM = 16, + R8G8_SNORM = 17, + R8G8_USCALED = 18, + R8G8_SSCALED = 19, + R8G8_UINT = 20, + R8G8_SINT = 21, + R8G8_SRGB = 22, + R8G8B8_UNORM = 23, + R8G8B8_SNORM = 24, + R8G8B8_USCALED = 25, + R8G8B8_SSCALED = 26, + R8G8B8_UINT = 27, + R8G8B8_SINT = 28, + R8G8B8_SRGB = 29, + B8G8R8_UNORM = 30, + B8G8R8_SNORM = 31, + B8G8R8_USCALED = 32, + B8G8R8_SSCALED = 33, + B8G8R8_UINT = 34, + B8G8R8_SINT = 35, + B8G8R8_SRGB = 36, + R8G8B8A8_UNORM = 37, + R8G8B8A8_SNORM = 38, + R8G8B8A8_USCALED = 39, + R8G8B8A8_SSCALED = 40, + R8G8B8A8_UINT = 41, + R8G8B8A8_SINT = 42, + R8G8B8A8_SRGB = 43, + B8G8R8A8_UNORM = 44, + B8G8R8A8_SNORM = 45, + B8G8R8A8_USCALED = 46, + B8G8R8A8_SSCALED = 47, + B8G8R8A8_UINT = 48, + B8G8R8A8_SINT = 49, + B8G8R8A8_SRGB = 50, + A8B8G8R8_UNORM_PACK32 = 51, + A8B8G8R8_SNORM_PACK32 = 52, + A8B8G8R8_USCALED_PACK32 = 53, + A8B8G8R8_SSCALED_PACK32 = 54, + A8B8G8R8_UINT_PACK32 = 55, + A8B8G8R8_SINT_PACK32 = 56, + A8B8G8R8_SRGB_PACK32 = 57, + A2R10G10B10_UNORM_PACK32 = 58, + A2R10G10B10_SNORM_PACK32 = 59, + A2R10G10B10_USCALED_PACK32 = 60, + A2R10G10B10_SSCALED_PACK32 = 61, + A2R10G10B10_UINT_PACK32 = 62, + A2R10G10B10_SINT_PACK32 = 63, + A2B10G10R10_UNORM_PACK32 = 64, + A2B10G10R10_SNORM_PACK32 = 65, + A2B10G10R10_USCALED_PACK32 = 66, + A2B10G10R10_SSCALED_PACK32 = 67, + A2B10G10R10_UINT_PACK32 = 68, + A2B10G10R10_SINT_PACK32 = 69, + R16_UNORM = 70, + R16_SNORM = 71, + R16_USCALED = 72, + R16_SSCALED = 73, + R16_UINT = 74, + R16_SINT = 75, + R16_SFLOAT = 76, + R16G16_UNORM = 77, + R16G16_SNORM = 78, + R16G16_USCALED = 79, + R16G16_SSCALED = 80, + R16G16_UINT = 81, + R16G16_SINT = 82, + R16G16_SFLOAT = 83, + R16G16B16_UNORM = 84, + R16G16B16_SNORM = 85, + R16G16B16_USCALED = 86, + R16G16B16_SSCALED = 87, + R16G16B16_UINT = 88, + R16G16B16_SINT = 89, + R16G16B16_SFLOAT = 90, + R16G16B16A16_UNORM = 91, + R16G16B16A16_SNORM = 92, + R16G16B16A16_USCALED = 93, + R16G16B16A16_SSCALED = 94, + R16G16B16A16_UINT = 95, + R16G16B16A16_SINT = 96, + R16G16B16A16_SFLOAT = 97, + R32_UINT = 98, + R32_SINT = 99, + R32_SFLOAT = 100, + R32G32_UINT = 101, + R32G32_SINT = 102, + R32G32_SFLOAT = 103, + R32G32B32_UINT = 104, + R32G32B32_SINT = 105, + R32G32B32_SFLOAT = 106, + R32G32B32A32_UINT = 107, + R32G32B32A32_SINT = 108, + R32G32B32A32_SFLOAT = 109, + R64_UINT = 110, + R64_SINT = 111, + R64_SFLOAT = 112, + R64G64_UINT = 113, + R64G64_SINT = 114, + R64G64_SFLOAT = 115, + R64G64B64_UINT = 116, + R64G64B64_SINT = 117, + R64G64B64_SFLOAT = 118, + R64G64B64A64_UINT = 119, + R64G64B64A64_SINT = 120, + R64G64B64A64_SFLOAT = 121, + B10G11R11_UFLOAT_PACK32 = 122, + E5B9G9R9_UFLOAT_PACK32 = 123, + D16_UNORM = 124, + X8_D24_UNORM_PACK32 = 125, + D32_SFLOAT = 126, + S8_UINT = 127, + D16_UNORM_S8_UINT = 128, + D24_UNORM_S8_UINT = 129, + D32_SFLOAT_S8_UINT = 130, + BC1_RGB_UNORM_BLOCK = 131, + BC1_RGB_SRGB_BLOCK = 132, + BC1_RGBA_UNORM_BLOCK = 133, + BC1_RGBA_SRGB_BLOCK = 134, + BC2_UNORM_BLOCK = 135, + BC2_SRGB_BLOCK = 136, + BC3_UNORM_BLOCK = 137, + BC3_SRGB_BLOCK = 138, + BC4_UNORM_BLOCK = 139, + BC4_SNORM_BLOCK = 140, + BC5_UNORM_BLOCK = 141, + BC5_SNORM_BLOCK = 142, + BC6H_UFLOAT_BLOCK = 143, + BC6H_SFLOAT_BLOCK = 144, + BC7_UNORM_BLOCK = 145, + BC7_SRGB_BLOCK = 146, + ETC2_R8G8B8_UNORM_BLOCK = 147, + ETC2_R8G8B8_SRGB_BLOCK = 148, + ETC2_R8G8B8A1_UNORM_BLOCK = 149, + ETC2_R8G8B8A1_SRGB_BLOCK = 150, + ETC2_R8G8B8A8_UNORM_BLOCK = 151, + ETC2_R8G8B8A8_SRGB_BLOCK = 152, + EAC_R11_UNORM_BLOCK = 153, + EAC_R11_SNORM_BLOCK = 154, + EAC_R11G11_UNORM_BLOCK = 155, + EAC_R11G11_SNORM_BLOCK = 156, + ASTC_4x4_UNORM_BLOCK = 157, + ASTC_4x4_SRGB_BLOCK = 158, + ASTC_5x4_UNORM_BLOCK = 159, + ASTC_5x4_SRGB_BLOCK = 160, + ASTC_5x5_UNORM_BLOCK = 161, + ASTC_5x5_SRGB_BLOCK = 162, + ASTC_6x5_UNORM_BLOCK = 163, + ASTC_6x5_SRGB_BLOCK = 164, + ASTC_6x6_UNORM_BLOCK = 165, + ASTC_6x6_SRGB_BLOCK = 166, + ASTC_8x5_UNORM_BLOCK = 167, + ASTC_8x5_SRGB_BLOCK = 168, + ASTC_8x6_UNORM_BLOCK = 169, + ASTC_8x6_SRGB_BLOCK = 170, + ASTC_8x8_UNORM_BLOCK = 171, + ASTC_8x8_SRGB_BLOCK = 172, + ASTC_10x5_UNORM_BLOCK = 173, + ASTC_10x5_SRGB_BLOCK = 174, + ASTC_10x6_UNORM_BLOCK = 175, + ASTC_10x6_SRGB_BLOCK = 176, + ASTC_10x8_UNORM_BLOCK = 177, + ASTC_10x8_SRGB_BLOCK = 178, + ASTC_10x10_UNORM_BLOCK = 179, + ASTC_10x10_SRGB_BLOCK = 180, + ASTC_12x10_UNORM_BLOCK = 181, + ASTC_12x10_SRGB_BLOCK = 182, + ASTC_12x12_UNORM_BLOCK = 183, + ASTC_12x12_SRGB_BLOCK = 184, + G8B8G8R8_422_UNORM = 1000156000, + B8G8R8G8_422_UNORM = 1000156001, + G8_B8_R8_3PLANE_420_UNORM = 1000156002, + G8_B8R8_2PLANE_420_UNORM = 1000156003, + G8_B8_R8_3PLANE_422_UNORM = 1000156004, + G8_B8R8_2PLANE_422_UNORM = 1000156005, + G8_B8_R8_3PLANE_444_UNORM = 1000156006, + R10X6_UNORM_PACK16 = 1000156007, + R10X6G10X6_UNORM_2PACK16 = 1000156008, + R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009, + G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010, + B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011, + G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012, + G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013, + G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014, + G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015, + G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016, + R12X4_UNORM_PACK16 = 1000156017, + R12X4G12X4_UNORM_2PACK16 = 1000156018, + R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019, + G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020, + B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021, + G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022, + G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023, + G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024, + G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025, + G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026, + G16B16G16R16_422_UNORM = 1000156027, + B16G16R16G16_422_UNORM = 1000156028, + G16_B16_R16_3PLANE_420_UNORM = 1000156029, + G16_B16R16_2PLANE_420_UNORM = 1000156030, + G16_B16_R16_3PLANE_422_UNORM = 1000156031, + G16_B16R16_2PLANE_422_UNORM = 1000156032, + G16_B16_R16_3PLANE_444_UNORM = 1000156033, + G8_B8R8_2PLANE_444_UNORM = 1000330000, + G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 = 1000330001, + G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 = 1000330002, + G16_B16R16_2PLANE_444_UNORM = 1000330003, + A4R4G4B4_UNORM_PACK16 = 1000340000, + A4B4G4R4_UNORM_PACK16 = 1000340001, + ASTC_4x4_SFLOAT_BLOCK = 1000066000, + ASTC_5x4_SFLOAT_BLOCK = 1000066001, + ASTC_5x5_SFLOAT_BLOCK = 1000066002, + ASTC_6x5_SFLOAT_BLOCK = 1000066003, + ASTC_6x6_SFLOAT_BLOCK = 1000066004, + ASTC_8x5_SFLOAT_BLOCK = 1000066005, + ASTC_8x6_SFLOAT_BLOCK = 1000066006, + ASTC_8x8_SFLOAT_BLOCK = 1000066007, + ASTC_10x5_SFLOAT_BLOCK = 1000066008, + ASTC_10x6_SFLOAT_BLOCK = 1000066009, + ASTC_10x8_SFLOAT_BLOCK = 1000066010, + ASTC_10x10_SFLOAT_BLOCK = 1000066011, + ASTC_12x10_SFLOAT_BLOCK = 1000066012, + ASTC_12x12_SFLOAT_BLOCK = 1000066013, + PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, + PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, + PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, + PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, + PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, + PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, + PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, + PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, + ASTC_4x4_SFLOAT_BLOCK_EXT = 1000066000, + ASTC_5x4_SFLOAT_BLOCK_EXT = 1000066001, + ASTC_5x5_SFLOAT_BLOCK_EXT = 1000066002, + ASTC_6x5_SFLOAT_BLOCK_EXT = 1000066003, + ASTC_6x6_SFLOAT_BLOCK_EXT = 1000066004, + ASTC_8x5_SFLOAT_BLOCK_EXT = 1000066005, + ASTC_8x6_SFLOAT_BLOCK_EXT = 1000066006, + ASTC_8x8_SFLOAT_BLOCK_EXT = 1000066007, + ASTC_10x5_SFLOAT_BLOCK_EXT = 1000066008, + ASTC_10x6_SFLOAT_BLOCK_EXT = 1000066009, + ASTC_10x8_SFLOAT_BLOCK_EXT = 1000066010, + ASTC_10x10_SFLOAT_BLOCK_EXT = 1000066011, + ASTC_12x10_SFLOAT_BLOCK_EXT = 1000066012, + ASTC_12x12_SFLOAT_BLOCK_EXT = 1000066013, + G8B8G8R8_422_UNORM_KHR = 1000156000, + B8G8R8G8_422_UNORM_KHR = 1000156001, + G8_B8_R8_3PLANE_420_UNORM_KHR = 1000156002, + G8_B8R8_2PLANE_420_UNORM_KHR = 1000156003, + G8_B8_R8_3PLANE_422_UNORM_KHR = 1000156004, + G8_B8R8_2PLANE_422_UNORM_KHR = 1000156005, + G8_B8_R8_3PLANE_444_UNORM_KHR = 1000156006, + R10X6_UNORM_PACK16_KHR = 1000156007, + R10X6G10X6_UNORM_2PACK16_KHR = 1000156008, + R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = 1000156009, + G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = 1000156010, + B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = 1000156011, + G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = 1000156012, + G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = 1000156013, + G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = 1000156014, + G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = 1000156015, + G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = 1000156016, + R12X4_UNORM_PACK16_KHR = 1000156017, + R12X4G12X4_UNORM_2PACK16_KHR = 1000156018, + R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = 1000156019, + G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = 1000156020, + B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = 1000156021, + G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = 1000156022, + G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = 1000156023, + G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = 1000156024, + G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = 1000156025, + G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = 1000156026, + G16B16G16R16_422_UNORM_KHR = 1000156027, + B16G16R16G16_422_UNORM_KHR = 1000156028, + G16_B16_R16_3PLANE_420_UNORM_KHR = 1000156029, + G16_B16R16_2PLANE_420_UNORM_KHR = 1000156030, + G16_B16_R16_3PLANE_422_UNORM_KHR = 1000156031, + G16_B16R16_2PLANE_422_UNORM_KHR = 1000156032, + G16_B16_R16_3PLANE_444_UNORM_KHR = 1000156033, + ASTC_3x3x3_UNORM_BLOCK_EXT = 1000288000, + ASTC_3x3x3_SRGB_BLOCK_EXT = 1000288001, + ASTC_3x3x3_SFLOAT_BLOCK_EXT = 1000288002, + ASTC_4x3x3_UNORM_BLOCK_EXT = 1000288003, + ASTC_4x3x3_SRGB_BLOCK_EXT = 1000288004, + ASTC_4x3x3_SFLOAT_BLOCK_EXT = 1000288005, + ASTC_4x4x3_UNORM_BLOCK_EXT = 1000288006, + ASTC_4x4x3_SRGB_BLOCK_EXT = 1000288007, + ASTC_4x4x3_SFLOAT_BLOCK_EXT = 1000288008, + ASTC_4x4x4_UNORM_BLOCK_EXT = 1000288009, + ASTC_4x4x4_SRGB_BLOCK_EXT = 1000288010, + ASTC_4x4x4_SFLOAT_BLOCK_EXT = 1000288011, + ASTC_5x4x4_UNORM_BLOCK_EXT = 1000288012, + ASTC_5x4x4_SRGB_BLOCK_EXT = 1000288013, + ASTC_5x4x4_SFLOAT_BLOCK_EXT = 1000288014, + ASTC_5x5x4_UNORM_BLOCK_EXT = 1000288015, + ASTC_5x5x4_SRGB_BLOCK_EXT = 1000288016, + ASTC_5x5x4_SFLOAT_BLOCK_EXT = 1000288017, + ASTC_5x5x5_UNORM_BLOCK_EXT = 1000288018, + ASTC_5x5x5_SRGB_BLOCK_EXT = 1000288019, + ASTC_5x5x5_SFLOAT_BLOCK_EXT = 1000288020, + ASTC_6x5x5_UNORM_BLOCK_EXT = 1000288021, + ASTC_6x5x5_SRGB_BLOCK_EXT = 1000288022, + ASTC_6x5x5_SFLOAT_BLOCK_EXT = 1000288023, + ASTC_6x6x5_UNORM_BLOCK_EXT = 1000288024, + ASTC_6x6x5_SRGB_BLOCK_EXT = 1000288025, + ASTC_6x6x5_SFLOAT_BLOCK_EXT = 1000288026, + ASTC_6x6x6_UNORM_BLOCK_EXT = 1000288027, + ASTC_6x6x6_SRGB_BLOCK_EXT = 1000288028, + ASTC_6x6x6_SFLOAT_BLOCK_EXT = 1000288029, + G8_B8R8_2PLANE_444_UNORM_EXT = 1000330000, + G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT = 1000330001, + G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT = 1000330002, + G16_B16R16_2PLANE_444_UNORM_EXT = 1000330003, + A4R4G4B4_UNORM_PACK16_EXT = 1000340000, + A4B4G4R4_UNORM_PACK16_EXT = 1000340001, + R16G16_S10_5_NV = 1000464000, +} + +/** Structure type enumerant */ +export enum StructureType { + APPLICATION_INFO = 0, + INSTANCE_CREATE_INFO = 1, + DEVICE_QUEUE_CREATE_INFO = 2, + DEVICE_CREATE_INFO = 3, + SUBMIT_INFO = 4, + MEMORY_ALLOCATE_INFO = 5, + MAPPED_MEMORY_RANGE = 6, + BIND_SPARSE_INFO = 7, + FENCE_CREATE_INFO = 8, + SEMAPHORE_CREATE_INFO = 9, + EVENT_CREATE_INFO = 10, + QUERY_POOL_CREATE_INFO = 11, + BUFFER_CREATE_INFO = 12, + BUFFER_VIEW_CREATE_INFO = 13, + IMAGE_CREATE_INFO = 14, + IMAGE_VIEW_CREATE_INFO = 15, + SHADER_MODULE_CREATE_INFO = 16, + PIPELINE_CACHE_CREATE_INFO = 17, + PIPELINE_SHADER_STAGE_CREATE_INFO = 18, + PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, + PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, + PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, + PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, + PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, + PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, + PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, + PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, + PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, + GRAPHICS_PIPELINE_CREATE_INFO = 28, + COMPUTE_PIPELINE_CREATE_INFO = 29, + PIPELINE_LAYOUT_CREATE_INFO = 30, + SAMPLER_CREATE_INFO = 31, + DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, + DESCRIPTOR_POOL_CREATE_INFO = 33, + DESCRIPTOR_SET_ALLOCATE_INFO = 34, + WRITE_DESCRIPTOR_SET = 35, + COPY_DESCRIPTOR_SET = 36, + FRAMEBUFFER_CREATE_INFO = 37, + RENDER_PASS_CREATE_INFO = 38, + COMMAND_POOL_CREATE_INFO = 39, + COMMAND_BUFFER_ALLOCATE_INFO = 40, + COMMAND_BUFFER_INHERITANCE_INFO = 41, + COMMAND_BUFFER_BEGIN_INFO = 42, + RENDER_PASS_BEGIN_INFO = 43, + BUFFER_MEMORY_BARRIER = 44, + IMAGE_MEMORY_BARRIER = 45, + MEMORY_BARRIER = 46, + /** Reserved for internal use by the loader, layers, and ICDs */ + LOADER_INSTANCE_CREATE_INFO = 47, + /** Reserved for internal use by the loader, layers, and ICDs */ + LOADER_DEVICE_CREATE_INFO = 48, + PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000, + BIND_BUFFER_MEMORY_INFO = 1000157000, + BIND_IMAGE_MEMORY_INFO = 1000157001, + PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000, + MEMORY_DEDICATED_REQUIREMENTS = 1000127000, + MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001, + MEMORY_ALLOCATE_FLAGS_INFO = 1000060000, + DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003, + DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004, + DEVICE_GROUP_SUBMIT_INFO = 1000060005, + DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006, + BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013, + BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014, + PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000, + DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001, + BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000, + IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001, + IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002, + MEMORY_REQUIREMENTS_2 = 1000146003, + SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004, + PHYSICAL_DEVICE_FEATURES_2 = 1000059000, + PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001, + FORMAT_PROPERTIES_2 = 1000059002, + IMAGE_FORMAT_PROPERTIES_2 = 1000059003, + PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004, + QUEUE_FAMILY_PROPERTIES_2 = 1000059005, + PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006, + SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007, + PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008, + PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000, + RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001, + IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002, + PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003, + RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000, + PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001, + PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002, + PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000, + PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = 1000120000, + PROTECTED_SUBMIT_INFO = 1000145000, + PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001, + PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002, + DEVICE_QUEUE_INFO_2 = 1000145003, + SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000, + SAMPLER_YCBCR_CONVERSION_INFO = 1000156001, + BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002, + IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003, + PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004, + SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005, + DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000, + PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000, + EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001, + PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002, + EXTERNAL_BUFFER_PROPERTIES = 1000071003, + PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004, + EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000, + EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001, + EXPORT_MEMORY_ALLOCATE_INFO = 1000072002, + PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000, + EXTERNAL_FENCE_PROPERTIES = 1000112001, + EXPORT_FENCE_CREATE_INFO = 1000113000, + EXPORT_SEMAPHORE_CREATE_INFO = 1000077000, + PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000, + EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001, + PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000, + DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001, + PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000, + PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = 1000063000, + PHYSICAL_DEVICE_VULKAN_1_1_FEATURES = 49, + PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES = 50, + PHYSICAL_DEVICE_VULKAN_1_2_FEATURES = 51, + PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES = 52, + IMAGE_FORMAT_LIST_CREATE_INFO = 1000147000, + ATTACHMENT_DESCRIPTION_2 = 1000109000, + ATTACHMENT_REFERENCE_2 = 1000109001, + SUBPASS_DESCRIPTION_2 = 1000109002, + SUBPASS_DEPENDENCY_2 = 1000109003, + RENDER_PASS_CREATE_INFO_2 = 1000109004, + SUBPASS_BEGIN_INFO = 1000109005, + SUBPASS_END_INFO = 1000109006, + PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES = 1000177000, + PHYSICAL_DEVICE_DRIVER_PROPERTIES = 1000196000, + PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES = 1000180000, + PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES = 1000082000, + PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES = 1000197000, + DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO = 1000161000, + PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES = 1000161001, + PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES = 1000161002, + DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO = 1000161003, + DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT = 1000161004, + PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES = 1000199000, + SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE = 1000199001, + PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES = 1000221000, + IMAGE_STENCIL_USAGE_CREATE_INFO = 1000246000, + PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES = 1000130000, + SAMPLER_REDUCTION_MODE_CREATE_INFO = 1000130001, + PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES = 1000211000, + PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES = 1000108000, + FRAMEBUFFER_ATTACHMENTS_CREATE_INFO = 1000108001, + FRAMEBUFFER_ATTACHMENT_IMAGE_INFO = 1000108002, + RENDER_PASS_ATTACHMENT_BEGIN_INFO = 1000108003, + PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES = 1000253000, + PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES = 1000175000, + PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES = 1000241000, + ATTACHMENT_REFERENCE_STENCIL_LAYOUT = 1000241001, + ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT = 1000241002, + PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES = 1000261000, + PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES = 1000207000, + PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES = 1000207001, + SEMAPHORE_TYPE_CREATE_INFO = 1000207002, + TIMELINE_SEMAPHORE_SUBMIT_INFO = 1000207003, + SEMAPHORE_WAIT_INFO = 1000207004, + SEMAPHORE_SIGNAL_INFO = 1000207005, + PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES = 1000257000, + BUFFER_DEVICE_ADDRESS_INFO = 1000244001, + BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO = 1000257002, + MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO = 1000257003, + DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO = 1000257004, + PHYSICAL_DEVICE_VULKAN_1_3_FEATURES = 53, + PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES = 54, + PIPELINE_CREATION_FEEDBACK_CREATE_INFO = 1000192000, + PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES = 1000215000, + PHYSICAL_DEVICE_TOOL_PROPERTIES = 1000245000, + PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES = 1000276000, + PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES = 1000295000, + DEVICE_PRIVATE_DATA_CREATE_INFO = 1000295001, + PRIVATE_DATA_SLOT_CREATE_INFO = 1000295002, + PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES = 1000297000, + MEMORY_BARRIER_2 = 1000314000, + BUFFER_MEMORY_BARRIER_2 = 1000314001, + IMAGE_MEMORY_BARRIER_2 = 1000314002, + DEPENDENCY_INFO = 1000314003, + SUBMIT_INFO_2 = 1000314004, + SEMAPHORE_SUBMIT_INFO = 1000314005, + COMMAND_BUFFER_SUBMIT_INFO = 1000314006, + PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES = 1000314007, + PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES = 1000325000, + PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES = 1000335000, + COPY_BUFFER_INFO_2 = 1000337000, + COPY_IMAGE_INFO_2 = 1000337001, + COPY_BUFFER_TO_IMAGE_INFO_2 = 1000337002, + COPY_IMAGE_TO_BUFFER_INFO_2 = 1000337003, + BLIT_IMAGE_INFO_2 = 1000337004, + RESOLVE_IMAGE_INFO_2 = 1000337005, + BUFFER_COPY_2 = 1000337006, + IMAGE_COPY_2 = 1000337007, + IMAGE_BLIT_2 = 1000337008, + BUFFER_IMAGE_COPY_2 = 1000337009, + IMAGE_RESOLVE_2 = 1000337010, + PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES = 1000225000, + PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO = 1000225001, + PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES = 1000225002, + PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES = 1000138000, + PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES = 1000138001, + WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK = 1000138002, + DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO = 1000138003, + PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES = 1000066000, + RENDERING_INFO = 1000044000, + RENDERING_ATTACHMENT_INFO = 1000044001, + PIPELINE_RENDERING_CREATE_INFO = 1000044002, + PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES = 1000044003, + COMMAND_BUFFER_INHERITANCE_RENDERING_INFO = 1000044004, + PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES = 1000280000, + PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES = 1000280001, + PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES = 1000281001, + FORMAT_PROPERTIES_3 = 1000360000, + PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES = 1000413000, + PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES = 1000413001, + DEVICE_BUFFER_MEMORY_REQUIREMENTS = 1000413002, + DEVICE_IMAGE_MEMORY_REQUIREMENTS = 1000413003, + SWAPCHAIN_CREATE_INFO_KHR = 1000001000, + PRESENT_INFO_KHR = 1000001001, + DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007, + IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008, + BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009, + ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010, + DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011, + DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012, + DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, + DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, + DISPLAY_PRESENT_INFO_KHR = 1000003000, + XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, + XCB_SURFACE_CREATE_INFO_KHR = 1000005000, + WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, + ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, + WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, + NATIVE_BUFFER_ANDROID = 1000010000, + SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001, + PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002, + DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, + /** Backwards-compatible alias containing a typo */ + DEBUG_REPORT_CREATE_INFO_EXT = 1000011000, + PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, + DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, + DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, + DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, + VIDEO_PROFILE_INFO_KHR = 1000023000, + VIDEO_CAPABILITIES_KHR = 1000023001, + VIDEO_PICTURE_RESOURCE_INFO_KHR = 1000023002, + VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR = 1000023003, + BIND_VIDEO_SESSION_MEMORY_INFO_KHR = 1000023004, + VIDEO_SESSION_CREATE_INFO_KHR = 1000023005, + VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000023006, + VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR = 1000023007, + VIDEO_BEGIN_CODING_INFO_KHR = 1000023008, + VIDEO_END_CODING_INFO_KHR = 1000023009, + VIDEO_CODING_CONTROL_INFO_KHR = 1000023010, + VIDEO_REFERENCE_SLOT_INFO_KHR = 1000023011, + QUEUE_FAMILY_VIDEO_PROPERTIES_KHR = 1000023012, + VIDEO_PROFILE_LIST_INFO_KHR = 1000023013, + PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR = 1000023014, + VIDEO_FORMAT_PROPERTIES_KHR = 1000023015, + QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR = 1000023016, + VIDEO_DECODE_INFO_KHR = 1000024000, + VIDEO_DECODE_CAPABILITIES_KHR = 1000024001, + VIDEO_DECODE_USAGE_INFO_KHR = 1000024002, + DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, + DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, + DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, + PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000, + PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001, + PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002, + CU_MODULE_CREATE_INFO_NVX = 1000029000, + CU_FUNCTION_CREATE_INFO_NVX = 1000029001, + CU_LAUNCH_INFO_NVX = 1000029002, + IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000, + IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001, + VIDEO_ENCODE_H264_CAPABILITIES_EXT = 1000038000, + VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000038001, + VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT = 1000038002, + VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT = 1000038003, + VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT = 1000038004, + VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT = 1000038005, + VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT = 1000038006, + VIDEO_ENCODE_H264_PROFILE_INFO_EXT = 1000038007, + VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT = 1000038008, + VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT = 1000038009, + VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT = 1000038010, + VIDEO_ENCODE_H265_CAPABILITIES_EXT = 1000039000, + VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000039001, + VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT = 1000039002, + VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT = 1000039003, + VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT = 1000039004, + VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT = 1000039005, + VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT = 1000039006, + VIDEO_ENCODE_H265_PROFILE_INFO_EXT = 1000039007, + VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT = 1000039008, + VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT = 1000039009, + VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT = 1000039010, + VIDEO_DECODE_H264_CAPABILITIES_EXT = 1000040000, + VIDEO_DECODE_H264_PICTURE_INFO_EXT = 1000040001, + VIDEO_DECODE_H264_PROFILE_INFO_EXT = 1000040003, + VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000040004, + VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT = 1000040005, + VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT = 1000040006, + TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000, + RENDERING_INFO_KHR = 1000044000, + RENDERING_ATTACHMENT_INFO_KHR = 1000044001, + PIPELINE_RENDERING_CREATE_INFO_KHR = 1000044002, + PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR = 1000044003, + COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR = 1000044004, + RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000044006, + RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT = 1000044007, + ATTACHMENT_SAMPLE_COUNT_INFO_AMD = 1000044008, + ATTACHMENT_SAMPLE_COUNT_INFO_NV = 1000044008, + MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX = 1000044009, + STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP = 1000049000, + PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000, + RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = 1000053000, + PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = 1000053001, + PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = 1000053002, + EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, + EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, + IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, + EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, + WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, + PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, + PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, + FORMAT_PROPERTIES_2_KHR = 1000059002, + IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, + PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, + QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, + PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, + SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, + PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, + MEMORY_ALLOCATE_FLAGS_INFO_KHR = 1000060000, + DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = 1000060003, + DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = 1000060004, + DEVICE_GROUP_SUBMIT_INFO_KHR = 1000060005, + DEVICE_GROUP_BIND_SPARSE_INFO_KHR = 1000060006, + BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060013, + BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060014, + VALIDATION_FLAGS_EXT = 1000061000, + VI_SURFACE_CREATE_INFO_NN = 1000062000, + PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT = 1000066000, + IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000, + PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001, + PIPELINE_ROBUSTNESS_CREATE_INFO_EXT = 1000068000, + PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT = 1000068001, + PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT = 1000068002, + PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = 1000070000, + DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = 1000070001, + PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = 1000071000, + EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = 1000071001, + PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = 1000071002, + EXTERNAL_BUFFER_PROPERTIES_KHR = 1000071003, + PHYSICAL_DEVICE_ID_PROPERTIES_KHR = 1000071004, + EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = 1000072000, + EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = 1000072001, + EXPORT_MEMORY_ALLOCATE_INFO_KHR = 1000072002, + IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000, + EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001, + MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002, + MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003, + IMPORT_MEMORY_FD_INFO_KHR = 1000074000, + MEMORY_FD_PROPERTIES_KHR = 1000074001, + MEMORY_GET_FD_INFO_KHR = 1000074002, + WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000, + PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = 1000076000, + EXTERNAL_SEMAPHORE_PROPERTIES_KHR = 1000076001, + EXPORT_SEMAPHORE_CREATE_INFO_KHR = 1000077000, + IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000, + EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001, + D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002, + SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003, + IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000, + SEMAPHORE_GET_FD_INFO_KHR = 1000079001, + PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, + COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000, + PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001, + CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002, + PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR = 1000082000, + PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = 1000082000, + PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = 1000083000, + PRESENT_REGIONS_KHR = 1000084000, + DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000, + PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, + SURFACE_CAPABILITIES_2_EXT = 1000090000, + /** Backwards-compatible alias containing a typo */ + SURFACE_CAPABILITIES2_EXT = 1000090000, + DISPLAY_POWER_INFO_EXT = 1000091000, + DEVICE_EVENT_INFO_EXT = 1000091001, + DISPLAY_EVENT_INFO_EXT = 1000091002, + SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, + PRESENT_TIMES_INFO_GOOGLE = 1000092000, + PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, + PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, + PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, + PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, + PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000, + PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001, + PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT = 1000102000, + PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT = 1000102001, + HDR_METADATA_EXT = 1000105000, + PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR = 1000108000, + FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR = 1000108001, + FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR = 1000108002, + RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR = 1000108003, + ATTACHMENT_DESCRIPTION_2_KHR = 1000109000, + ATTACHMENT_REFERENCE_2_KHR = 1000109001, + SUBPASS_DESCRIPTION_2_KHR = 1000109002, + SUBPASS_DEPENDENCY_2_KHR = 1000109003, + RENDER_PASS_CREATE_INFO_2_KHR = 1000109004, + SUBPASS_BEGIN_INFO_KHR = 1000109005, + SUBPASS_END_INFO_KHR = 1000109006, + SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000, + PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000, + EXTERNAL_FENCE_PROPERTIES_KHR = 1000112001, + EXPORT_FENCE_CREATE_INFO_KHR = 1000113000, + IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000, + EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001, + FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002, + IMPORT_FENCE_FD_INFO_KHR = 1000115000, + FENCE_GET_FD_INFO_KHR = 1000115001, + PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR = 1000116000, + PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR = 1000116001, + QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR = 1000116002, + PERFORMANCE_QUERY_SUBMIT_INFO_KHR = 1000116003, + ACQUIRE_PROFILING_LOCK_INFO_KHR = 1000116004, + PERFORMANCE_COUNTER_KHR = 1000116005, + PERFORMANCE_COUNTER_DESCRIPTION_KHR = 1000116006, + PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = 1000117000, + RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = 1000117001, + IMAGE_VIEW_USAGE_CREATE_INFO_KHR = 1000117002, + PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = 1000117003, + PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000, + SURFACE_CAPABILITIES_2_KHR = 1000119001, + SURFACE_FORMAT_2_KHR = 1000119002, + PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR = 1000120000, + PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, + DISPLAY_PROPERTIES_2_KHR = 1000121000, + DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001, + DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002, + DISPLAY_PLANE_INFO_2_KHR = 1000121003, + DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004, + IOS_SURFACE_CREATE_INFO_MVK = 1000122000, + MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, + MEMORY_DEDICATED_REQUIREMENTS_KHR = 1000127000, + MEMORY_DEDICATED_ALLOCATE_INFO_KHR = 1000127001, + DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000, + DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001, + DEBUG_UTILS_LABEL_EXT = 1000128002, + DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003, + DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004, + ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000, + ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001, + ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002, + IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003, + MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004, + EXTERNAL_FORMAT_ANDROID = 1000129005, + ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006, + PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000, + SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001, + PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = 1000138000, + PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = 1000138001, + WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = 1000138002, + DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT = 1000138003, + SAMPLE_LOCATIONS_INFO_EXT = 1000143000, + RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001, + PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002, + PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003, + MULTISAMPLE_PROPERTIES_EXT = 1000143004, + BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000, + IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001, + IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002, + MEMORY_REQUIREMENTS_2_KHR = 1000146003, + SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = 1000146004, + IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000, + PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000, + PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001, + PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002, + PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000, + WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR = 1000150007, + ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR = 1000150000, + ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR = 1000150002, + ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR = 1000150003, + ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR = 1000150004, + ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR = 1000150005, + ACCELERATION_STRUCTURE_GEOMETRY_KHR = 1000150006, + ACCELERATION_STRUCTURE_VERSION_INFO_KHR = 1000150009, + COPY_ACCELERATION_STRUCTURE_INFO_KHR = 1000150010, + COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR = 1000150011, + COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR = 1000150012, + PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR = 1000150013, + PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR = 1000150014, + ACCELERATION_STRUCTURE_CREATE_INFO_KHR = 1000150017, + ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR = 1000150020, + PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR = 1000347000, + PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR = 1000347001, + RAY_TRACING_PIPELINE_CREATE_INFO_KHR = 1000150015, + RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR = 1000150016, + RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR = 1000150018, + PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR = 1000348013, + PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000, + PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV = 1000154000, + PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV = 1000154001, + SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = 1000156000, + SAMPLER_YCBCR_CONVERSION_INFO_KHR = 1000156001, + BIND_IMAGE_PLANE_MEMORY_INFO_KHR = 1000156002, + IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = 1000156003, + PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = 1000156004, + SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = 1000156005, + BIND_BUFFER_MEMORY_INFO_KHR = 1000157000, + BIND_IMAGE_MEMORY_INFO_KHR = 1000157001, + DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000, + PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002, + IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003, + IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004, + IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005, + DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT = 1000158006, + VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000, + SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001, + DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = 1000161000, + PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = 1000161001, + PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = 1000161002, + DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = 1000161003, + DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = 1000161004, + PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR = 1000163000, + PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR = 1000163001, + PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV = 1000164000, + PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV = 1000164001, + PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV = 1000164002, + PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV = 1000164005, + RAY_TRACING_PIPELINE_CREATE_INFO_NV = 1000165000, + ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000165001, + GEOMETRY_NV = 1000165003, + GEOMETRY_TRIANGLES_NV = 1000165004, + GEOMETRY_AABB_NV = 1000165005, + BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = 1000165006, + WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = 1000165007, + ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV = 1000165008, + PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV = 1000165009, + RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV = 1000165011, + ACCELERATION_STRUCTURE_INFO_NV = 1000165012, + PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV = 1000166000, + PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV = 1000166001, + PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = 1000168000, + DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = 1000168001, + PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT = 1000170000, + FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001, + DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000, + PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = 1000175000, + PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000, + IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000, + MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, + PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, + PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000, + PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000, + PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000, + CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000, + PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000, + VIDEO_DECODE_H265_CAPABILITIES_EXT = 1000187000, + VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000187001, + VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT = 1000187002, + VIDEO_DECODE_H265_PROFILE_INFO_EXT = 1000187003, + VIDEO_DECODE_H265_PICTURE_INFO_EXT = 1000187004, + VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT = 1000187005, + DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR = 1000174000, + PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR = 1000388000, + QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = 1000388001, + DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000, + PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, + PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001, + PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002, + PRESENT_FRAME_TOKEN_GGP = 1000191000, + PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000192000, + PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = 1000196000, + PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = 1000197000, + PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000, + SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = 1000199001, + PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = 1000201000, + PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000, + PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001, + PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = 1000203000, + PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000, + PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV = 1000205000, + PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002, + CHECKPOINT_DATA_NV = 1000206000, + QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001, + PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = 1000207000, + PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = 1000207001, + SEMAPHORE_TYPE_CREATE_INFO_KHR = 1000207002, + TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = 1000207003, + SEMAPHORE_WAIT_INFO_KHR = 1000207004, + SEMAPHORE_SIGNAL_INFO_KHR = 1000207005, + PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL = 1000209000, + QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL = 1000210000, + /** Backwards-compatible alias containing a typo */ + QUERY_POOL_CREATE_INFO_INTEL = 1000210000, + INITIALIZE_PERFORMANCE_API_INFO_INTEL = 1000210001, + PERFORMANCE_MARKER_INFO_INTEL = 1000210002, + PERFORMANCE_STREAM_MARKER_INFO_INTEL = 1000210003, + PERFORMANCE_OVERRIDE_INFO_INTEL = 1000210004, + PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL = 1000210005, + PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000, + PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000, + DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD = 1000213000, + SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD = 1000213001, + IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000, + PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR = 1000215000, + METAL_SURFACE_CREATE_INFO_EXT = 1000217000, + PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT = 1000218000, + PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT = 1000218001, + RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT = 1000218002, + PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = 1000221000, + PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT = 1000225000, + PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = 1000225001, + PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT = 1000225002, + FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000226000, + PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR = 1000226001, + PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR = 1000226002, + PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR = 1000226003, + PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004, + PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000, + PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000, + PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000, + PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000, + PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000, + MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001, + SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000, + PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV = 1000240000, + PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR = 1000241000, + ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = 1000241001, + ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = 1000241002, + PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000, + PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = 1000244000, + BUFFER_DEVICE_ADDRESS_INFO_EXT = 1000244001, + BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002, + PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = 1000245000, + IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = 1000246000, + VALIDATION_FEATURES_EXT = 1000247000, + PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR = 1000248000, + PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000, + COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001, + PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002, + PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV = 1000250000, + PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV = 1000250001, + FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV = 1000250002, + PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT = 1000251000, + PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT = 1000252000, + PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR = 1000253000, + PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT = 1000254000, + PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT = 1000254001, + PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT = 1000254002, + SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT = 1000255000, + SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002, + SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001, + HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000, + PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR = 1000257000, + BUFFER_DEVICE_ADDRESS_INFO_KHR = 1000244001, + BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = 1000257002, + MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = 1000257003, + DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = 1000257004, + PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = 1000259000, + PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = 1000259001, + PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002, + PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000, + PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = 1000261000, + PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = 1000265000, + /** Not promoted to 1.3 */ + PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000, + PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000, + PIPELINE_INFO_KHR = 1000269001, + PIPELINE_EXECUTABLE_PROPERTIES_KHR = 1000269002, + PIPELINE_EXECUTABLE_INFO_KHR = 1000269003, + PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004, + PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005, + PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000, + PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = 1000276000, + PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV = 1000277000, + GRAPHICS_SHADER_GROUP_CREATE_INFO_NV = 1000277001, + GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV = 1000277002, + INDIRECT_COMMANDS_LAYOUT_TOKEN_NV = 1000277003, + INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV = 1000277004, + GENERATED_COMMANDS_INFO_NV = 1000277005, + GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV = 1000277006, + PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV = 1000277007, + PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV = 1000278000, + COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV = 1000278001, + PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = 1000280000, + PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = 1000280001, + /** Not promoted to 1.3 */ + PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000, + PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT = 1000281001, + COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000, + RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001, + PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT = 1000284000, + DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT = 1000284001, + DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT = 1000284002, + PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT = 1000286000, + PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT = 1000286001, + SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT = 1000287000, + PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT = 1000287001, + PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT = 1000287002, + PIPELINE_LIBRARY_CREATE_INFO_KHR = 1000290000, + PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV = 1000292000, + SURFACE_CAPABILITIES_PRESENT_BARRIER_NV = 1000292001, + SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV = 1000292002, + PRESENT_ID_KHR = 1000294000, + PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001, + PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT = 1000295000, + DEVICE_PRIVATE_DATA_CREATE_INFO_EXT = 1000295001, + PRIVATE_DATA_SLOT_CREATE_INFO_EXT = 1000295002, + PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT = 1000297000, + VIDEO_ENCODE_INFO_KHR = 1000299000, + VIDEO_ENCODE_RATE_CONTROL_INFO_KHR = 1000299001, + VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR = 1000299002, + VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003, + VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004, + PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000, + DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001, + RESERVED_QCOM = 1000309000, + EXPORT_METAL_OBJECT_CREATE_INFO_EXT = 1000311000, + EXPORT_METAL_OBJECTS_INFO_EXT = 1000311001, + EXPORT_METAL_DEVICE_INFO_EXT = 1000311002, + EXPORT_METAL_COMMAND_QUEUE_INFO_EXT = 1000311003, + EXPORT_METAL_BUFFER_INFO_EXT = 1000311004, + IMPORT_METAL_BUFFER_INFO_EXT = 1000311005, + EXPORT_METAL_TEXTURE_INFO_EXT = 1000311006, + IMPORT_METAL_TEXTURE_INFO_EXT = 1000311007, + EXPORT_METAL_IO_SURFACE_INFO_EXT = 1000311008, + IMPORT_METAL_IO_SURFACE_INFO_EXT = 1000311009, + EXPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311010, + IMPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311011, + MEMORY_BARRIER_2_KHR = 1000314000, + BUFFER_MEMORY_BARRIER_2_KHR = 1000314001, + IMAGE_MEMORY_BARRIER_2_KHR = 1000314002, + DEPENDENCY_INFO_KHR = 1000314003, + SUBMIT_INFO_2_KHR = 1000314004, + SEMAPHORE_SUBMIT_INFO_KHR = 1000314005, + COMMAND_BUFFER_SUBMIT_INFO_KHR = 1000314006, + PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR = 1000314007, + QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV = 1000314008, + CHECKPOINT_DATA_2_NV = 1000314009, + PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT = 1000316000, + PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT = 1000316001, + PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT = 1000316002, + DESCRIPTOR_ADDRESS_INFO_EXT = 1000316003, + DESCRIPTOR_GET_INFO_EXT = 1000316004, + BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316005, + IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316006, + IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316007, + SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316008, + OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT = 1000316010, + DESCRIPTOR_BUFFER_BINDING_INFO_EXT = 1000316011, + DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT = 1000316012, + ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316009, + PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT = 1000320000, + PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT = 1000320001, + GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT = 1000320002, + PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD = 1000321000, + PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR = 1000203000, + PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR = 1000322000, + PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR = 1000323000, + PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR = 1000325000, + PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV = 1000326000, + PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV = 1000326001, + PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV = 1000326002, + ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV = 1000327000, + PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV = 1000327001, + ACCELERATION_STRUCTURE_MOTION_INFO_NV = 1000327002, + PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT = 1000328000, + PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT = 1000328001, + PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT = 1000330000, + PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT = 1000332000, + PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT = 1000332001, + COPY_COMMAND_TRANSFORM_INFO_QCOM = 1000333000, + PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT = 1000335000, + PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR = 1000336000, + COPY_BUFFER_INFO_2_KHR = 1000337000, + COPY_IMAGE_INFO_2_KHR = 1000337001, + COPY_BUFFER_TO_IMAGE_INFO_2_KHR = 1000337002, + COPY_IMAGE_TO_BUFFER_INFO_2_KHR = 1000337003, + BLIT_IMAGE_INFO_2_KHR = 1000337004, + RESOLVE_IMAGE_INFO_2_KHR = 1000337005, + BUFFER_COPY_2_KHR = 1000337006, + IMAGE_COPY_2_KHR = 1000337007, + IMAGE_BLIT_2_KHR = 1000337008, + BUFFER_IMAGE_COPY_2_KHR = 1000337009, + IMAGE_RESOLVE_2_KHR = 1000337010, + PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT = 1000338000, + IMAGE_COMPRESSION_CONTROL_EXT = 1000338001, + SUBRESOURCE_LAYOUT_2_EXT = 1000338002, + IMAGE_SUBRESOURCE_2_EXT = 1000338003, + IMAGE_COMPRESSION_PROPERTIES_EXT = 1000338004, + PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT = 1000339000, + PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000, + PHYSICAL_DEVICE_FAULT_FEATURES_EXT = 1000341000, + DEVICE_FAULT_COUNTS_EXT = 1000341001, + DEVICE_FAULT_INFO_EXT = 1000341002, + PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = 1000342000, + PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT = 1000344000, + DIRECTFB_SURFACE_CREATE_INFO_EXT = 1000346000, + PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = 1000351000, + MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = 1000351002, + PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT = 1000352000, + VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000352001, + VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002, + PHYSICAL_DEVICE_DRM_PROPERTIES_EXT = 1000353000, + PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT = 1000354000, + DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT = 1000354001, + PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT = 1000355000, + PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT = 1000355001, + PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT = 1000356000, + FORMAT_PROPERTIES_3_KHR = 1000360000, + IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364000, + MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = 1000364001, + MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364002, + IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365000, + SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365001, + BUFFER_COLLECTION_CREATE_INFO_FUCHSIA = 1000366000, + IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA = 1000366001, + BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA = 1000366002, + BUFFER_COLLECTION_PROPERTIES_FUCHSIA = 1000366003, + BUFFER_CONSTRAINTS_INFO_FUCHSIA = 1000366004, + BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA = 1000366005, + IMAGE_CONSTRAINTS_INFO_FUCHSIA = 1000366006, + IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA = 1000366007, + SYSMEM_COLOR_SPACE_FUCHSIA = 1000366008, + BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA = 1000366009, + SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000, + PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI = 1000369001, + PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI = 1000369002, + PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI = 1000370000, + MEMORY_GET_REMOTE_ADDRESS_INFO_NV = 1000371000, + PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001, + PIPELINE_PROPERTIES_IDENTIFIER_EXT = 1000372000, + PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT = 1000372001, + PIPELINE_INFO_EXT = 1000269001, + PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT = 1000376000, + SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT = 1000376001, + MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT = 1000376002, + /** Not promoted to 1.3 */ + PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT = 1000377000, + SCREEN_SURFACE_CREATE_INFO_QNX = 1000378000, + PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT = 1000381000, + PIPELINE_COLOR_WRITE_CREATE_INFO_EXT = 1000381001, + PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT = 1000382000, + PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR = 1000386000, + PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT = 1000388000, + QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT = 1000388001, + PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT = 1000391000, + IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT = 1000391001, + PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT = 1000392000, + PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT = 1000392001, + PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT = 1000393000, + MICROMAP_BUILD_INFO_EXT = 1000396000, + MICROMAP_VERSION_INFO_EXT = 1000396001, + COPY_MICROMAP_INFO_EXT = 1000396002, + COPY_MICROMAP_TO_MEMORY_INFO_EXT = 1000396003, + COPY_MEMORY_TO_MICROMAP_INFO_EXT = 1000396004, + PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT = 1000396005, + PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT = 1000396006, + MICROMAP_CREATE_INFO_EXT = 1000396007, + MICROMAP_BUILD_SIZES_INFO_EXT = 1000396008, + ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT = 1000396009, + PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000, + SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001, + PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000, + PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR = 1000413000, + PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = 1000413001, + DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = 1000413002, + DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = 1000413003, + PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000, + DESCRIPTOR_SET_BINDING_REFERENCE_VALVE = 1000420001, + DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE = 1000420002, + PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT = 1000421000, + PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT = 1000422000, + PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = 1000425000, + PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = 1000425001, + SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = 1000425002, + PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV = 1000426000, + PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV = 1000426001, + PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV = 1000427000, + PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV = 1000427001, + PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000, + PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000, + PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000, + PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001, + IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM = 1000440002, + PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT = 1000455000, + PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT = 1000455001, + PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT = 1000458000, + RENDER_PASS_CREATION_CONTROL_EXT = 1000458001, + RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000458002, + RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT = 1000458003, + PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT = 1000462000, + PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT = 1000462001, + PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT = 1000462002, + SHADER_MODULE_IDENTIFIER_EXT = 1000462003, + PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT = 1000342000, + PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV = 1000464000, + PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV = 1000464001, + OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV = 1000464002, + OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV = 1000464003, + OPTICAL_FLOW_SESSION_CREATE_INFO_NV = 1000464004, + OPTICAL_FLOW_EXECUTE_INFO_NV = 1000464005, + OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010, + PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000, + PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = 1000466000, + PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM = 1000484000, + TILE_PROPERTIES_QCOM = 1000484001, + PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC = 1000485000, + AMIGO_PROFILING_SUBMIT_INFO_SEC = 1000485001, + PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV = 1000490000, + PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV = 1000490001, + PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT = 1000351000, + MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000351002, + PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000, + PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001, +} + +export enum SubpassContents { + INLINE = 0, + SECONDARY_COMMAND_BUFFERS = 1, +} + +/** API result codes */ +export enum Result { + /** Command completed successfully */ + SUCCESS = 0, + /** A fence or query has not yet completed */ + NOT_READY = 1, + /** A wait operation has not completed in the specified time */ + TIMEOUT = 2, + /** An event is signaled */ + EVENT_SET = 3, + /** An event is unsignaled */ + EVENT_RESET = 4, + /** A return array was too small for the result */ + INCOMPLETE = 5, + /** A host memory allocation has failed */ + ERROR_OUT_OF_HOST_MEMORY = -1, + /** A device memory allocation has failed */ + ERROR_OUT_OF_DEVICE_MEMORY = -2, + /** Initialization of an object has failed */ + ERROR_INITIALIZATION_FAILED = -3, + /** The logical device has been lost. See <> */ + ERROR_DEVICE_LOST = -4, + /** Mapping of a memory object has failed */ + ERROR_MEMORY_MAP_FAILED = -5, + /** Layer specified does not exist */ + ERROR_LAYER_NOT_PRESENT = -6, + /** Extension specified does not exist */ + ERROR_EXTENSION_NOT_PRESENT = -7, + /** Requested feature is not available on this device */ + ERROR_FEATURE_NOT_PRESENT = -8, + /** Unable to find a Vulkan driver */ + ERROR_INCOMPATIBLE_DRIVER = -9, + /** Too many objects of the type have already been created */ + ERROR_TOO_MANY_OBJECTS = -10, + /** Requested format is not supported on this device */ + ERROR_FORMAT_NOT_SUPPORTED = -11, + /** A requested pool allocation has failed due to fragmentation of the pool's memory */ + ERROR_FRAGMENTED_POOL = -12, + /** An unknown error has occurred, due to an implementation or application bug */ + ERROR_UNKNOWN = -13, + ERROR_OUT_OF_POOL_MEMORY = 1000069000, + ERROR_INVALID_EXTERNAL_HANDLE = 1000072003, + ERROR_FRAGMENTATION = 1000161000, + ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS = 1000257000, + PIPELINE_COMPILE_REQUIRED = 1000297000, + ERROR_SURFACE_LOST_KHR = 1000000000, + ERROR_NATIVE_WINDOW_IN_USE_KHR = 1000000001, + SUBOPTIMAL_KHR = 1000001003, + ERROR_OUT_OF_DATE_KHR = 1000001004, + ERROR_INCOMPATIBLE_DISPLAY_KHR = 1000003001, + ERROR_VALIDATION_FAILED_EXT = 1000011001, + ERROR_INVALID_SHADER_NV = 1000012000, + ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR = 1000023000, + ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR = 1000023001, + ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR = 1000023002, + ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR = 1000023003, + ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR = 1000023004, + ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR = 1000023005, + ERROR_OUT_OF_POOL_MEMORY_KHR = 1000069000, + ERROR_INVALID_EXTERNAL_HANDLE_KHR = 1000072003, + ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = 1000158000, + ERROR_FRAGMENTATION_EXT = 1000161000, + ERROR_NOT_PERMITTED_EXT = 1000174001, + ERROR_NOT_PERMITTED_KHR = 1000174001, + ERROR_INVALID_DEVICE_ADDRESS_EXT = 1000257000, + ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = 1000255000, + ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = 1000257000, + THREAD_IDLE_KHR = 1000268000, + THREAD_DONE_KHR = 1000268001, + OPERATION_DEFERRED_KHR = 1000268002, + OPERATION_NOT_DEFERRED_KHR = 1000268003, + PIPELINE_COMPILE_REQUIRED_EXT = 1000297000, + ERROR_PIPELINE_COMPILE_REQUIRED_EXT = 1000297000, + ERROR_COMPRESSION_EXHAUSTED_EXT = 1000338000, +} + +export enum DynamicState { + VIEWPORT = 0, + SCISSOR = 1, + LINE_WIDTH = 2, + DEPTH_BIAS = 3, + BLEND_CONSTANTS = 4, + DEPTH_BOUNDS = 5, + STENCIL_COMPARE_MASK = 6, + STENCIL_WRITE_MASK = 7, + STENCIL_REFERENCE = 8, + CULL_MODE = 1000267000, + FRONT_FACE = 1000267001, + PRIMITIVE_TOPOLOGY = 1000267002, + VIEWPORT_WITH_COUNT = 1000267003, + SCISSOR_WITH_COUNT = 1000267004, + VERTEX_INPUT_BINDING_STRIDE = 1000267005, + DEPTH_TEST_ENABLE = 1000267006, + DEPTH_WRITE_ENABLE = 1000267007, + DEPTH_COMPARE_OP = 1000267008, + DEPTH_BOUNDS_TEST_ENABLE = 1000267009, + STENCIL_TEST_ENABLE = 1000267010, + STENCIL_OP = 1000267011, + RASTERIZER_DISCARD_ENABLE = 1000377001, + DEPTH_BIAS_ENABLE = 1000377002, + PRIMITIVE_RESTART_ENABLE = 1000377004, + VIEWPORT_W_SCALING_NV = 1000087000, + DISCARD_RECTANGLE_EXT = 1000099000, + SAMPLE_LOCATIONS_EXT = 1000143000, + RAY_TRACING_PIPELINE_STACK_SIZE_KHR = 1000347000, + VIEWPORT_SHADING_RATE_PALETTE_NV = 1000164004, + VIEWPORT_COARSE_SAMPLE_ORDER_NV = 1000164006, + EXCLUSIVE_SCISSOR_NV = 1000205001, + FRAGMENT_SHADING_RATE_KHR = 1000226000, + LINE_STIPPLE_EXT = 1000259000, + CULL_MODE_EXT = 1000267000, + FRONT_FACE_EXT = 1000267001, + PRIMITIVE_TOPOLOGY_EXT = 1000267002, + VIEWPORT_WITH_COUNT_EXT = 1000267003, + SCISSOR_WITH_COUNT_EXT = 1000267004, + VERTEX_INPUT_BINDING_STRIDE_EXT = 1000267005, + DEPTH_TEST_ENABLE_EXT = 1000267006, + DEPTH_WRITE_ENABLE_EXT = 1000267007, + DEPTH_COMPARE_OP_EXT = 1000267008, + DEPTH_BOUNDS_TEST_ENABLE_EXT = 1000267009, + STENCIL_TEST_ENABLE_EXT = 1000267010, + STENCIL_OP_EXT = 1000267011, + VERTEX_INPUT_EXT = 1000352000, + /** Not promoted to 1.3 */ + PATCH_CONTROL_POINTS_EXT = 1000377000, + RASTERIZER_DISCARD_ENABLE_EXT = 1000377001, + DEPTH_BIAS_ENABLE_EXT = 1000377002, + /** Not promoted to 1.3 */ + LOGIC_OP_EXT = 1000377003, + PRIMITIVE_RESTART_ENABLE_EXT = 1000377004, + COLOR_WRITE_ENABLE_EXT = 1000381000, + TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002, + DEPTH_CLAMP_ENABLE_EXT = 1000455003, + POLYGON_MODE_EXT = 1000455004, + RASTERIZATION_SAMPLES_EXT = 1000455005, + SAMPLE_MASK_EXT = 1000455006, + ALPHA_TO_COVERAGE_ENABLE_EXT = 1000455007, + ALPHA_TO_ONE_ENABLE_EXT = 1000455008, + LOGIC_OP_ENABLE_EXT = 1000455009, + COLOR_BLEND_ENABLE_EXT = 1000455010, + COLOR_BLEND_EQUATION_EXT = 1000455011, + COLOR_WRITE_MASK_EXT = 1000455012, + RASTERIZATION_STREAM_EXT = 1000455013, + CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014, + EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015, + DEPTH_CLIP_ENABLE_EXT = 1000455016, + SAMPLE_LOCATIONS_ENABLE_EXT = 1000455017, + COLOR_BLEND_ADVANCED_EXT = 1000455018, + PROVOKING_VERTEX_MODE_EXT = 1000455019, + LINE_RASTERIZATION_MODE_EXT = 1000455020, + LINE_STIPPLE_ENABLE_EXT = 1000455021, + DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT = 1000455022, + VIEWPORT_W_SCALING_ENABLE_NV = 1000455023, + VIEWPORT_SWIZZLE_NV = 1000455024, + COVERAGE_TO_COLOR_ENABLE_NV = 1000455025, + COVERAGE_TO_COLOR_LOCATION_NV = 1000455026, + COVERAGE_MODULATION_MODE_NV = 1000455027, + COVERAGE_MODULATION_TABLE_ENABLE_NV = 1000455028, + COVERAGE_MODULATION_TABLE_NV = 1000455029, + SHADING_RATE_IMAGE_ENABLE_NV = 1000455030, + REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031, + COVERAGE_REDUCTION_MODE_NV = 1000455032, +} + +export enum DescriptorUpdateTemplateType { + /** Create descriptor update template for descriptor set updates */ + DESCRIPTOR_SET = 0, + /** Create descriptor update template for pushed descriptor updates */ + PUSH_DESCRIPTORS_KHR = 1, + DESCRIPTOR_SET_KHR = 0, +} + +/** Enums to track objects of various types - also see objtypeenum attributes on type tags */ +export enum ObjectType { + UNKNOWN = 0, + INSTANCE = 1, + PHYSICAL_DEVICE = 2, + DEVICE = 3, + QUEUE = 4, + SEMAPHORE = 5, + COMMAND_BUFFER = 6, + FENCE = 7, + DEVICE_MEMORY = 8, + BUFFER = 9, + IMAGE = 10, + EVENT = 11, + QUERY_POOL = 12, + BUFFER_VIEW = 13, + IMAGE_VIEW = 14, + SHADER_MODULE = 15, + PIPELINE_CACHE = 16, + PIPELINE_LAYOUT = 17, + RENDER_PASS = 18, + PIPELINE = 19, + DESCRIPTOR_SET_LAYOUT = 20, + SAMPLER = 21, + DESCRIPTOR_POOL = 22, + DESCRIPTOR_SET = 23, + FRAMEBUFFER = 24, + COMMAND_POOL = 25, + SAMPLER_YCBCR_CONVERSION = 1000156000, + DESCRIPTOR_UPDATE_TEMPLATE = 1000085000, + PRIVATE_DATA_SLOT = 1000295000, + SURFACE_KHR = 1000000000, + SWAPCHAIN_KHR = 1000001000, + DISPLAY_KHR = 1000002000, + DISPLAY_MODE_KHR = 1000002001, + DEBUG_REPORT_CALLBACK_EXT = 1000011000, + /** VkVideoSessionKHR */ + VIDEO_SESSION_KHR = 1000023000, + /** VkVideoSessionParametersKHR */ + VIDEO_SESSION_PARAMETERS_KHR = 1000023001, + CU_MODULE_NVX = 1000029000, + CU_FUNCTION_NVX = 1000029001, + DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000, + DEBUG_UTILS_MESSENGER_EXT = 1000128000, + ACCELERATION_STRUCTURE_KHR = 1000150000, + SAMPLER_YCBCR_CONVERSION_KHR = 1000156000, + VALIDATION_CACHE_EXT = 1000160000, + ACCELERATION_STRUCTURE_NV = 1000165000, + PERFORMANCE_CONFIGURATION_INTEL = 1000210000, + DEFERRED_OPERATION_KHR = 1000268000, + INDIRECT_COMMANDS_LAYOUT_NV = 1000277000, + PRIVATE_DATA_SLOT_EXT = 1000295000, + /** VkBufferCollectionFUCHSIA */ + BUFFER_COLLECTION_FUCHSIA = 1000366000, + MICROMAP_EXT = 1000396000, + OPTICAL_FLOW_SESSION_NV = 1000464000, +} + +export enum RayTracingInvocationReorderModeNV { + RAY_TRACING_INVOCATION_REORDER_MODE_NONE_NV = 0, + RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_NV = 1, +} + +export enum QueueFlagBits { + /** Queue supports graphics operations */ + GRAPHICS = 1 << 0, + /** Queue supports compute operations */ + COMPUTE = 1 << 1, + /** Queue supports transfer operations */ + TRANSFER = 1 << 2, + /** Queue supports sparse resource memory management operations */ + SPARSE_BINDING = 1 << 3, + /** Queues may support protected operations */ + PROTECTED = 1 << 4, + VIDEO_DECODE_BIT_KHR = 1 << 5, + RESERVED_9_BIT_EXT = 1 << 9, + VIDEO_ENCODE_BIT_KHR = 1 << 6, + RESERVED_7_BIT_QCOM = 1 << 7, + OPTICAL_FLOW_BIT_NV = 1 << 8, +} + +export enum CullModeFlagBits { + NONE = 0, + FRONT = 1 << 0, + BACK = 1 << 1, + FRONT_AND_BACK = 3, +} + +export enum RenderPassCreateFlagBits { + RESERVED_0_BIT_KHR = 1 << 0, + TRANSFORM_BIT_QCOM = 1 << 1, +} + +export enum DeviceQueueCreateFlagBits { + /** Queue is a protected-capable device queue */ + PROTECTED = 1 << 0, + RESERVED_1_BIT_QCOM = 1 << 1, +} + +export enum MemoryPropertyFlagBits { + /** If otherwise stated, then allocate memory on device */ + DEVICE_LOCAL = 1 << 0, + /** Memory is mappable by host */ + HOST_VISIBLE = 1 << 1, + /** Memory will have i/o coherency. If not set, application may need to use vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges to flush/invalidate host cache */ + HOST_COHERENT = 1 << 2, + /** Memory will be cached by the host */ + HOST_CACHED = 1 << 3, + /** Memory may be allocated by the driver when it is required */ + LAZILY_ALLOCATED = 1 << 4, + /** Memory is protected */ + PROTECTED = 1 << 5, + DEVICE_COHERENT_BIT_AMD = 1 << 6, + DEVICE_UNCACHED_BIT_AMD = 1 << 7, + RDMA_CAPABLE_BIT_NV = 1 << 8, +} + +export enum MemoryHeapFlagBits { + /** If set, heap represents device memory */ + DEVICE_LOCAL = 1 << 0, + /** If set, heap allocations allocate multiple instances by default */ + MULTI_INSTANCE = 1 << 1, + MULTI_INSTANCE_BIT_KHR = 1 << 1, + RESERVED_2_BIT_KHR = 1 << 2, +} + +export enum AccessFlagBits { + /** Controls coherency of indirect command reads */ + INDIRECT_COMMAND_READ = 1 << 0, + /** Controls coherency of index reads */ + INDEX_READ = 1 << 1, + /** Controls coherency of vertex attribute reads */ + VERTEX_ATTRIBUTE_READ = 1 << 2, + /** Controls coherency of uniform buffer reads */ + UNIFORM_READ = 1 << 3, + /** Controls coherency of input attachment reads */ + INPUT_ATTACHMENT_READ = 1 << 4, + /** Controls coherency of shader reads */ + SHADER_READ = 1 << 5, + /** Controls coherency of shader writes */ + SHADER_WRITE = 1 << 6, + /** Controls coherency of color attachment reads */ + COLOR_ATTACHMENT_READ = 1 << 7, + /** Controls coherency of color attachment writes */ + COLOR_ATTACHMENT_WRITE = 1 << 8, + /** Controls coherency of depth/stencil attachment reads */ + DEPTH_STENCIL_ATTACHMENT_READ = 1 << 9, + /** Controls coherency of depth/stencil attachment writes */ + DEPTH_STENCIL_ATTACHMENT_WRITE = 1 << 10, + /** Controls coherency of transfer reads */ + TRANSFER_READ = 1 << 11, + /** Controls coherency of transfer writes */ + TRANSFER_WRITE = 1 << 12, + /** Controls coherency of host reads */ + HOST_READ = 1 << 13, + /** Controls coherency of host writes */ + HOST_WRITE = 1 << 14, + /** Controls coherency of memory reads */ + MEMORY_READ = 1 << 15, + /** Controls coherency of memory writes */ + MEMORY_WRITE = 1 << 16, + NONE = 0, + TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 1 << 25, + TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 1 << 26, + TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 1 << 27, + /** read access flag for reading conditional rendering predicate */ + CONDITIONAL_RENDERING_READ_BIT_EXT = 1 << 20, + COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 1 << 19, + ACCELERATION_STRUCTURE_READ_BIT_KHR = 1 << 21, + ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 1 << 22, + SHADING_RATE_IMAGE_READ_BIT_NV = 1 << 23, + ACCELERATION_STRUCTURE_READ_BIT_NV = 1 << 21, + ACCELERATION_STRUCTURE_WRITE_BIT_NV = 1 << 22, + FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 1 << 24, + FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 1 << 23, + COMMAND_PREPROCESS_READ_BIT_NV = 1 << 17, + COMMAND_PREPROCESS_WRITE_BIT_NV = 1 << 18, + NONE_KHR = 0, +} + +export enum BufferUsageFlagBits { + /** Can be used as a source of transfer operations */ + TRANSFER_SRC = 1 << 0, + /** Can be used as a destination of transfer operations */ + TRANSFER_DST = 1 << 1, + /** Can be used as TBO */ + UNIFORM_TEXEL_BUFFER = 1 << 2, + /** Can be used as IBO */ + STORAGE_TEXEL_BUFFER = 1 << 3, + /** Can be used as UBO */ + UNIFORM_BUFFER = 1 << 4, + /** Can be used as SSBO */ + STORAGE_BUFFER = 1 << 5, + /** Can be used as source of fixed-function index fetch (index buffer) */ + INDEX_BUFFER = 1 << 6, + /** Can be used as source of fixed-function vertex fetch (VBO) */ + VERTEX_BUFFER = 1 << 7, + /** Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) */ + INDIRECT_BUFFER = 1 << 8, + SHADER_DEVICE_ADDRESS = 1 << 17, + VIDEO_DECODE_SRC_BIT_KHR = 1 << 13, + VIDEO_DECODE_DST_BIT_KHR = 1 << 14, + TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 1 << 11, + TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 1 << 12, + /** Specifies the buffer can be used as predicate in conditional rendering */ + CONDITIONAL_RENDERING_BIT_EXT = 1 << 9, + RESERVED_25_BIT_AMD = 1 << 25, + ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 1 << 19, + ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 1 << 20, + SHADER_BINDING_TABLE_BIT_KHR = 1 << 10, + RAY_TRACING_BIT_NV = 1 << 10, + RESERVED_18_BIT_QCOM = 1 << 18, + SHADER_DEVICE_ADDRESS_BIT_EXT = 1 << 17, + SHADER_DEVICE_ADDRESS_BIT_KHR = 1 << 17, + VIDEO_ENCODE_DST_BIT_KHR = 1 << 15, + VIDEO_ENCODE_SRC_BIT_KHR = 1 << 16, + SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 1 << 21, + RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 1 << 22, + PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 1 << 26, + MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 1 << 23, + MICROMAP_STORAGE_BIT_EXT = 1 << 24, +} + +export enum BufferCreateFlagBits { + /** Buffer should support sparse backing */ + SPARSE_BINDING = 1 << 0, + /** Buffer should support sparse backing with partial residency */ + SPARSE_RESIDENCY = 1 << 1, + /** Buffer should support constant data access to physical memory ranges mapped into multiple locations of sparse buffers */ + SPARSE_ALIASED = 1 << 2, + /** Buffer requires protected memory */ + PROTECTED = 1 << 3, + DEVICE_ADDRESS_CAPTURE_REPLAY = 1 << 4, + DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 1 << 4, + DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 1 << 4, + DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 5, +} + +export enum ShaderStageFlagBits { + VERTEX = 1 << 0, + TESSELLATION_CONTROL = 1 << 1, + TESSELLATION_EVALUATION = 1 << 2, + GEOMETRY = 1 << 3, + FRAGMENT = 1 << 4, + COMPUTE = 1 << 5, + ALL_GRAPHICS = 31, + ALL = 2147483647, + RAYGEN_BIT_KHR = 1 << 8, + ANY_HIT_BIT_KHR = 1 << 9, + CLOSEST_HIT_BIT_KHR = 1 << 10, + MISS_BIT_KHR = 1 << 11, + INTERSECTION_BIT_KHR = 1 << 12, + CALLABLE_BIT_KHR = 1 << 13, + RAYGEN_BIT_NV = 1 << 8, + ANY_HIT_BIT_NV = 1 << 9, + CLOSEST_HIT_BIT_NV = 1 << 10, + MISS_BIT_NV = 1 << 11, + INTERSECTION_BIT_NV = 1 << 12, + CALLABLE_BIT_NV = 1 << 13, + TASK_BIT_NV = 1 << 6, + MESH_BIT_NV = 1 << 7, + TASK_BIT_EXT = 1 << 6, + MESH_BIT_EXT = 1 << 7, + SUBPASS_SHADING_BIT_HUAWEI = 1 << 14, + RESERVED_19_BIT_HUAWEI = 1 << 19, + EXT_483_RESERVE_15 = 1 << 15, + EXT_483_RESERVE_16 = 1 << 16, + EXT_483_RESERVE_17 = 1 << 17, +} + +export enum ImageUsageFlagBits { + /** Can be used as a source of transfer operations */ + TRANSFER_SRC = 1 << 0, + /** Can be used as a destination of transfer operations */ + TRANSFER_DST = 1 << 1, + /** Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) */ + SAMPLED = 1 << 2, + /** Can be used as storage image (STORAGE_IMAGE descriptor type) */ + STORAGE = 1 << 3, + /** Can be used as framebuffer color attachment */ + COLOR_ATTACHMENT = 1 << 4, + /** Can be used as framebuffer depth/stencil attachment */ + DEPTH_STENCIL_ATTACHMENT = 1 << 5, + /** Image data not needed outside of rendering */ + TRANSIENT_ATTACHMENT = 1 << 6, + /** Can be used as framebuffer input attachment */ + INPUT_ATTACHMENT = 1 << 7, + VIDEO_DECODE_DST_BIT_KHR = 1 << 10, + VIDEO_DECODE_SRC_BIT_KHR = 1 << 11, + VIDEO_DECODE_DPB_BIT_KHR = 1 << 12, + SHADING_RATE_IMAGE_BIT_NV = 1 << 8, + RESERVED_16_BIT_QCOM = 1 << 16, + RESERVED_17_BIT_QCOM = 1 << 17, + FRAGMENT_DENSITY_MAP_BIT_EXT = 1 << 9, + FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 8, + RESERVED_22_BIT_EXT = 1 << 22, + VIDEO_ENCODE_DST_BIT_KHR = 1 << 13, + VIDEO_ENCODE_SRC_BIT_KHR = 1 << 14, + VIDEO_ENCODE_DPB_BIT_KHR = 1 << 15, + ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 1 << 19, + INVOCATION_MASK_BIT_HUAWEI = 1 << 18, + SAMPLE_WEIGHT_BIT_QCOM = 1 << 20, + SAMPLE_BLOCK_MATCH_BIT_QCOM = 1 << 21, +} + +export enum ImageCreateFlagBits { + /** Image should support sparse backing */ + SPARSE_BINDING = 1 << 0, + /** Image should support sparse backing with partial residency */ + SPARSE_RESIDENCY = 1 << 1, + /** Image should support constant data access to physical memory ranges mapped into multiple locations of sparse images */ + SPARSE_ALIASED = 1 << 2, + /** Allows image views to have different format than the base image */ + MUTABLE_FORMAT = 1 << 3, + /** Allows creating image views with cube type from the created image */ + CUBE_COMPATIBLE = 1 << 4, + ALIAS = 1 << 10, + /** Allows using VkBindImageMemoryDeviceGroupInfo::pSplitInstanceBindRegions when binding memory to the image */ + SPLIT_INSTANCE_BIND_REGIONS = 1 << 6, + /** The 3D image can be viewed as a 2D or 2D array image */ + VK_2D_ARRAY_COMPATIBLE = 1 << 5, + BLOCK_TEXEL_VIEW_COMPATIBLE = 1 << 7, + EXTENDED_USAGE = 1 << 8, + /** Image requires protected memory */ + PROTECTED = 1 << 11, + DISJOINT = 1 << 9, + CORNER_SAMPLED_BIT_NV = 1 << 13, + SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 1 << 6, + VK_2D_ARRAY_COMPATIBLE_BIT_KHR = 1 << 5, + BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = 1 << 7, + EXTENDED_USAGE_BIT_KHR = 1 << 8, + SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 1 << 12, + DISJOINT_BIT_KHR = 1 << 9, + ALIAS_BIT_KHR = 1 << 10, + SUBSAMPLED_BIT_EXT = 1 << 14, + RESERVED_19_BIT_EXT = 1 << 19, + DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 16, + MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 1 << 18, + /** Image is created with a layout where individual slices are capable of being used as 2D images */ + VK_2D_VIEW_COMPATIBLE_BIT_EXT = 1 << 17, + FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = 1 << 15, +} + +export enum ImageViewCreateFlagBits { + FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT = 1 << 0, + DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 2, + FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT = 1 << 1, + RESERVED_3_BIT_EXT = 1 << 3, +} + +export enum SamplerCreateFlagBits { + SUBSAMPLED_BIT_EXT = 1 << 0, + SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = 1 << 1, + DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 3, + NON_SEAMLESS_CUBE_MAP_BIT_EXT = 1 << 2, + IMAGE_PROCESSING_BIT_QCOM = 1 << 4, +} + +/** Note that the gap at bitpos 10 is unused, and can be reserved */ +export enum PipelineCreateFlagBits { + DISABLE_OPTIMIZATION = 1 << 0, + ALLOW_DERIVATIVES = 1 << 1, + DERIVATIVE = 1 << 2, + VIEW_INDEX_FROM_DEVICE_INDEX = 1 << 3, + DISPATCH_BASE = 1 << 4, + FAIL_ON_PIPELINE_COMPILE_REQUIRED = 1 << 8, + EARLY_RETURN_ON_FAILURE = 1 << 9, + RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 21, + /** Backwards-compatible alias containing a typo */ + PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 21, + RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 1 << 22, + /** Backwards-compatible alias containing a typo */ + PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 1 << 22, + VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 1 << 3, + DISPATCH_BASE_KHR = DISPATCH_BASE, + RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 1 << 14, + RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 1 << 15, + RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 1 << 16, + RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 1 << 17, + RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 1 << 12, + RAY_TRACING_SKIP_AABBS_BIT_KHR = 1 << 13, + RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 1 << 19, + DEFER_COMPILE_BIT_NV = 1 << 5, + CAPTURE_STATISTICS_BIT_KHR = 1 << 6, + CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 1 << 7, + INDIRECT_BINDABLE_BIT_NV = 1 << 18, + LIBRARY_BIT_KHR = 1 << 11, + FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT = 1 << 8, + EARLY_RETURN_ON_FAILURE_BIT_EXT = 1 << 9, + DESCRIPTOR_BUFFER_BIT_EXT = 1 << 29, + RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 1 << 23, + LINK_TIME_OPTIMIZATION_BIT_EXT = 1 << 10, + RAY_TRACING_ALLOW_MOTION_BIT_NV = 1 << 20, + COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 1 << 25, + DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 1 << 26, + RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 1 << 24, + RESERVED_BIT_28_NV = 1 << 28, + NO_PROTECTED_ACCESS_BIT_EXT = 1 << 27, + PROTECTED_ACCESS_ONLY_BIT_EXT = 1 << 30, +} + +export enum PipelineShaderStageCreateFlagBits { + ALLOW_VARYING_SUBGROUP_SIZE = 1 << 0, + REQUIRE_FULL_SUBGROUPS = 1 << 1, + ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = 1 << 0, + REQUIRE_FULL_SUBGROUPS_BIT_EXT = 1 << 1, + RESERVED_3_BIT_KHR = 1 << 3, +} + +export enum ColorComponentFlagBits { + R = 1 << 0, + G = 1 << 1, + B = 1 << 2, + A = 1 << 3, +} + +export enum FenceCreateFlagBits { + SIGNALED = 1 << 0, +} + +export enum SemaphoreCreateFlagBits { +} + +export enum FormatFeatureFlagBits { + /** Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) */ + SAMPLED_IMAGE = 1 << 0, + /** Format can be used for storage images (STORAGE_IMAGE descriptor type) */ + STORAGE_IMAGE = 1 << 1, + /** Format supports atomic operations in case it is used for storage images */ + STORAGE_IMAGE_ATOMIC = 1 << 2, + /** Format can be used for uniform texel buffers (TBOs) */ + UNIFORM_TEXEL_BUFFER = 1 << 3, + /** Format can be used for storage texel buffers (IBOs) */ + STORAGE_TEXEL_BUFFER = 1 << 4, + /** Format supports atomic operations in case it is used for storage texel buffers */ + STORAGE_TEXEL_BUFFER_ATOMIC = 1 << 5, + /** Format can be used for vertex buffers (VBOs) */ + VERTEX_BUFFER = 1 << 6, + /** Format can be used for color attachment images */ + COLOR_ATTACHMENT = 1 << 7, + /** Format supports blending in case it is used for color attachment images */ + COLOR_ATTACHMENT_BLEND = 1 << 8, + /** Format can be used for depth/stencil attachment images */ + DEPTH_STENCIL_ATTACHMENT = 1 << 9, + /** Format can be used as the source image of blits with vkCmdBlitImage */ + BLIT_SRC = 1 << 10, + /** Format can be used as the destination image of blits with vkCmdBlitImage */ + BLIT_DST = 1 << 11, + /** Format can be filtered with VK_FILTER_LINEAR when being sampled */ + SAMPLED_IMAGE_FILTER_LINEAR = 1 << 12, + /** Format can be used as the source image of image transfer commands */ + TRANSFER_SRC = 1 << 14, + /** Format can be used as the destination image of image transfer commands */ + TRANSFER_DST = 1 << 15, + /** Format can have midpoint rather than cosited chroma samples */ + MIDPOINT_CHROMA_SAMPLES = 1 << 17, + /** Format can be used with linear filtering whilst color conversion is enabled */ + SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER = 1 << 18, + /** Format can have different chroma, min and mag filters */ + SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER = 1 << 19, + SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT = 1 << 20, + SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE = 1 << 21, + /** Format supports disjoint planes */ + DISJOINT = 1 << 22, + /** Format can have cosited rather than midpoint chroma samples */ + COSITED_CHROMA_SAMPLES = 1 << 23, + /** Format can be used with min/max reduction filtering */ + SAMPLED_IMAGE_FILTER_MINMAX = 1 << 16, + /** Format can be filtered with VK_FILTER_CUBIC_IMG when being sampled */ + SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 1 << 13, + VIDEO_DECODE_OUTPUT_BIT_KHR = 1 << 25, + VIDEO_DECODE_DPB_BIT_KHR = 1 << 26, + TRANSFER_SRC_BIT_KHR = 1 << 14, + TRANSFER_DST_BIT_KHR = 1 << 15, + SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 1 << 16, + ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 1 << 29, + MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 1 << 17, + SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 1 << 18, + SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 1 << 19, + SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 1 << 20, + SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 1 << 21, + DISJOINT_BIT_KHR = 1 << 22, + COSITED_CHROMA_SAMPLES_BIT_KHR = 1 << 23, + SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 1 << 13, + FRAGMENT_DENSITY_MAP_BIT_EXT = 1 << 24, + FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 30, + VIDEO_ENCODE_INPUT_BIT_KHR = 1 << 27, + VIDEO_ENCODE_DPB_BIT_KHR = 1 << 28, +} + +export enum QueryControlFlagBits { + /** Require precise results to be collected by the query */ + PRECISE = 1 << 0, +} + +export enum QueryResultFlagBits { + /** Results of the queries are written to the destination buffer as 64-bit values */ + VK_64 = 1 << 0, + /** Results of the queries are waited on before proceeding with the result copy */ + WAIT = 1 << 1, + /** Besides the results of the query, the availability of the results is also written */ + WITH_AVAILABILITY = 1 << 2, + /** Copy the partial results of the query even if the final results are not available */ + PARTIAL = 1 << 3, + WITH_STATUS_BIT_KHR = 1 << 4, +} + +export enum CommandBufferUsageFlagBits { + ONE_TIME_SUBMIT = 1 << 0, + RENDER_PASS_CONTINUE = 1 << 1, + /** Command buffer may be submitted/executed more than once simultaneously */ + SIMULTANEOUS_USE = 1 << 2, +} + +export enum QueryPipelineStatisticFlagBits { + /** Optional */ + INPUT_ASSEMBLY_VERTICES = 1 << 0, + /** Optional */ + INPUT_ASSEMBLY_PRIMITIVES = 1 << 1, + /** Optional */ + VERTEX_SHADER_INVOCATIONS = 1 << 2, + /** Optional */ + GEOMETRY_SHADER_INVOCATIONS = 1 << 3, + /** Optional */ + GEOMETRY_SHADER_PRIMITIVES = 1 << 4, + /** Optional */ + CLIPPING_INVOCATIONS = 1 << 5, + /** Optional */ + CLIPPING_PRIMITIVES = 1 << 6, + /** Optional */ + FRAGMENT_SHADER_INVOCATIONS = 1 << 7, + /** Optional */ + TESSELLATION_CONTROL_SHADER_PATCHES = 1 << 8, + /** Optional */ + TESSELLATION_EVALUATION_SHADER_INVOCATIONS = 1 << 9, + /** Optional */ + COMPUTE_SHADER_INVOCATIONS = 1 << 10, + TASK_SHADER_INVOCATIONS_BIT_EXT = 1 << 11, + MESH_SHADER_INVOCATIONS_BIT_EXT = 1 << 12, +} + +export enum ImageAspectFlagBits { + COLOR = 1 << 0, + DEPTH = 1 << 1, + STENCIL = 1 << 2, + METADATA = 1 << 3, + PLANE_0 = 1 << 4, + PLANE_1 = 1 << 5, + PLANE_2 = 1 << 6, + NONE = 0, + PLANE_0_BIT_KHR = 1 << 4, + PLANE_1_BIT_KHR = 1 << 5, + PLANE_2_BIT_KHR = 1 << 6, + MEMORY_PLANE_0_BIT_EXT = 1 << 7, + MEMORY_PLANE_1_BIT_EXT = 1 << 8, + MEMORY_PLANE_2_BIT_EXT = 1 << 9, + MEMORY_PLANE_3_BIT_EXT = 1 << 10, + NONE_KHR = 0, +} + +export enum SparseImageFormatFlagBits { + /** Image uses a single mip tail region for all array layers */ + SINGLE_MIPTAIL = 1 << 0, + /** Image requires mip level dimensions to be an integer multiple of the sparse image block dimensions for non-tail mip levels. */ + ALIGNED_MIP_SIZE = 1 << 1, + /** Image uses a non-standard sparse image block dimensions */ + NONSTANDARD_BLOCK_SIZE = 1 << 2, +} + +export enum SparseMemoryBindFlagBits { + /** Operation binds resource metadata to memory */ + METADATA = 1 << 0, +} + +export enum PipelineStageFlagBits { + /** Before subsequent commands are processed */ + TOP_OF_PIPE = 1 << 0, + /** Draw/DispatchIndirect command fetch */ + DRAW_INDIRECT = 1 << 1, + /** Vertex/index fetch */ + VERTEX_INPUT = 1 << 2, + /** Vertex shading */ + VERTEX_SHADER = 1 << 3, + /** Tessellation control shading */ + TESSELLATION_CONTROL_SHADER = 1 << 4, + /** Tessellation evaluation shading */ + TESSELLATION_EVALUATION_SHADER = 1 << 5, + /** Geometry shading */ + GEOMETRY_SHADER = 1 << 6, + /** Fragment shading */ + FRAGMENT_SHADER = 1 << 7, + /** Early fragment (depth and stencil) tests */ + EARLY_FRAGMENT_TESTS = 1 << 8, + /** Late fragment (depth and stencil) tests */ + LATE_FRAGMENT_TESTS = 1 << 9, + /** Color attachment writes */ + COLOR_ATTACHMENT_OUTPUT = 1 << 10, + /** Compute shading */ + COMPUTE_SHADER = 1 << 11, + /** Transfer/copy operations */ + TRANSFER = 1 << 12, + /** After previous commands have completed */ + BOTTOM_OF_PIPE = 1 << 13, + /** Indicates host (CPU) is a source/sink of the dependency */ + HOST = 1 << 14, + /** All stages of the graphics pipeline */ + ALL_GRAPHICS = 1 << 15, + /** All stages supported on the queue */ + ALL_COMMANDS = 1 << 16, + NONE = 0, + TRANSFORM_FEEDBACK_BIT_EXT = 1 << 24, + /** A pipeline stage for conditional rendering predicate fetch */ + CONDITIONAL_RENDERING_BIT_EXT = 1 << 18, + ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 1 << 25, + RAY_TRACING_SHADER_BIT_KHR = 1 << 21, + SHADING_RATE_IMAGE_BIT_NV = 1 << 22, + RAY_TRACING_SHADER_BIT_NV = 1 << 21, + ACCELERATION_STRUCTURE_BUILD_BIT_NV = 1 << 25, + TASK_SHADER_BIT_NV = 1 << 19, + MESH_SHADER_BIT_NV = 1 << 20, + FRAGMENT_DENSITY_PROCESS_BIT_EXT = 1 << 23, + FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 22, + COMMAND_PREPROCESS_BIT_NV = 1 << 17, + NONE_KHR = 0, + TASK_SHADER_BIT_EXT = 1 << 19, + MESH_SHADER_BIT_EXT = 1 << 20, +} + +export enum CommandPoolCreateFlagBits { + /** Command buffers have a short lifetime */ + TRANSIENT = 1 << 0, + /** Command buffers may release their memory individually */ + RESET_COMMAND_BUFFER = 1 << 1, + /** Command buffers allocated from pool are protected command buffers */ + PROTECTED = 1 << 2, +} + +export enum CommandPoolResetFlagBits { + /** Release resources owned by the pool */ + RELEASE_RESOURCES = 1 << 0, + RESERVED_1_BIT_COREAVI = 1 << 1, +} + +export enum CommandBufferResetFlagBits { + /** Release resources owned by the buffer */ + RELEASE_RESOURCES = 1 << 0, +} + +export enum SampleCountFlagBits { + /** Sample count 1 supported */ + VK_1 = 1 << 0, + /** Sample count 2 supported */ + VK_2 = 1 << 1, + /** Sample count 4 supported */ + VK_4 = 1 << 2, + /** Sample count 8 supported */ + VK_8 = 1 << 3, + /** Sample count 16 supported */ + VK_16 = 1 << 4, + /** Sample count 32 supported */ + VK_32 = 1 << 5, + /** Sample count 64 supported */ + VK_64 = 1 << 6, +} + +export enum AttachmentDescriptionFlagBits { + /** The attachment may alias physical memory of another attachment in the same render pass */ + MAY_ALIAS = 1 << 0, +} + +export enum StencilFaceFlagBits { + /** Front face */ + FRONT = 1 << 0, + /** Back face */ + BACK = 1 << 1, + /** Front and back faces */ + FRONT_AND_BACK = 3, + /** Backwards-compatible alias containing a typo */ + STENCIL_FRONT_AND_BACK = 3, +} + +export enum DescriptorPoolCreateFlagBits { + /** Descriptor sets may be freed individually */ + FREE_DESCRIPTOR_SET = 1 << 0, + UPDATE_AFTER_BIND = 1 << 1, + UPDATE_AFTER_BIND_BIT_EXT = 1 << 1, + HOST_ONLY_BIT_VALVE = 1 << 2, + HOST_ONLY_BIT_EXT = 1 << 2, +} + +export enum DependencyFlagBits { + /** Dependency is per pixel region */ + BY_REGION = 1 << 0, + /** Dependency is across devices */ + DEVICE_GROUP = 1 << 2, + VIEW_LOCAL = 1 << 1, + VIEW_LOCAL_BIT_KHR = 1 << 1, + DEVICE_GROUP_BIT_KHR = 1 << 2, + /** Dependency may be a feedback loop */ + FEEDBACK_LOOP_BIT_EXT = 1 << 3, +} + +export enum SemaphoreType { + BINARY = 0, + TIMELINE = 1, + BINARY_KHR = 0, + TIMELINE_KHR = 1, +} + +export enum SemaphoreWaitFlagBits { + ANY = 1 << 0, + ANY_BIT_KHR = 1 << 0, +} + +export enum PresentModeKHR { + PRESENT_MODE_IMMEDIATE_KHR = 0, + PRESENT_MODE_MAILBOX_KHR = 1, + PRESENT_MODE_FIFO_KHR = 2, + PRESENT_MODE_FIFO_RELAXED_KHR = 3, + PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, + PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, +} + +export enum ColorSpaceKHR { + COLOR_SPACE_SRGB_NONLINEAR_KHR = 0, + /** Backwards-compatible alias containing a typo */ + COLORSPACE_SRGB_NONLINEAR_KHR = 0, + COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, + COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002, + COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104003, + COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004, + COLOR_SPACE_BT709_LINEAR_EXT = 1000104005, + COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006, + COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007, + COLOR_SPACE_HDR10_ST2084_EXT = 1000104008, + COLOR_SPACE_DOLBYVISION_EXT = 1000104009, + COLOR_SPACE_HDR10_HLG_EXT = 1000104010, + COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, + COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, + COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, + COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014, + /** Backwards-compatible alias containing a typo */ + COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003, + COLOR_SPACE_DISPLAY_NATIVE_AMD = 1000213000, +} + +export enum DisplayPlaneAlphaFlagBitsKHR { + DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 1 << 0, + DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 1 << 1, + DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 1 << 2, + DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 1 << 3, +} + +export enum CompositeAlphaFlagBitsKHR { + COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 1 << 0, + COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 1 << 1, + COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 1 << 2, + COMPOSITE_ALPHA_INHERIT_BIT_KHR = 1 << 3, +} + +export enum SurfaceTransformFlagBitsKHR { + SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 1 << 0, + SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 1 << 1, + SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 1 << 2, + SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 1 << 3, + SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 1 << 4, + SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 1 << 5, + SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 1 << 6, + SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 1 << 7, + SURFACE_TRANSFORM_INHERIT_BIT_KHR = 1 << 8, +} + +export enum SwapchainImageUsageFlagBitsANDROID { + SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_ANDROID = 1 << 0, +} + +export enum TimeDomainEXT { + TIME_DOMAIN_DEVICE_EXT = 0, + TIME_DOMAIN_CLOCK_MONOTONIC_EXT = 1, + TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = 2, + TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = 3, +} + +export enum DebugReportFlagBitsEXT { + DEBUG_REPORT_INFORMATION_BIT_EXT = 1 << 0, + DEBUG_REPORT_WARNING_BIT_EXT = 1 << 1, + DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 1 << 2, + DEBUG_REPORT_ERROR_BIT_EXT = 1 << 3, + DEBUG_REPORT_DEBUG_BIT_EXT = 1 << 4, +} + +export enum DebugReportObjectTypeEXT { + DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, + DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, + DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, + DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, + DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, + DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, + DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, + DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, + DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, + DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, + DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, + DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, + DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, + DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, + DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, + DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, + DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, + DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, + DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, + DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, + DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, + DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, + DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, + DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, + DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, + DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, + DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, + DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, + DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28, + /** Backwards-compatible alias containing a typo */ + DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, + DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, + DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, + DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33, + /** Backwards-compatible alias containing a typo */ + DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = 33, + DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000, + DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000, + DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT = 1000029000, + DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT = 1000029001, + DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000, + DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT = 1000150000, + DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = 1000156000, + DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = 1000165000, + DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT = 1000366000, +} + +export enum DeviceMemoryReportEventTypeEXT { + DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT = 0, + DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT = 1, + DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT = 2, + DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT = 3, + DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT = 4, +} + +export enum RasterizationOrderAMD { + RASTERIZATION_ORDER_STRICT_AMD = 0, + RASTERIZATION_ORDER_RELAXED_AMD = 1, +} + +export enum ExternalMemoryHandleTypeFlagBitsNV { + EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 1 << 0, + EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 1 << 1, + EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 1 << 2, + EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 1 << 3, +} + +export enum ExternalMemoryFeatureFlagBitsNV { + EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 1 << 0, + EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 1 << 1, + EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 1 << 2, +} + +export enum ValidationCheckEXT { + VALIDATION_CHECK_ALL_EXT = 0, + VALIDATION_CHECK_SHADERS_EXT = 1, +} + +export enum ValidationFeatureEnableEXT { + VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = 0, + VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = 1, + VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT = 2, + VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT = 3, + VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT = 4, +} + +export enum ValidationFeatureDisableEXT { + VALIDATION_FEATURE_DISABLE_ALL_EXT = 0, + VALIDATION_FEATURE_DISABLE_SHADERS_EXT = 1, + VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT = 2, + VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT = 3, + VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT = 4, + VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT = 5, + VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT = 6, + VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT = 7, +} + +export enum SubgroupFeatureFlagBits { + /** Basic subgroup operations */ + BASIC = 1 << 0, + /** Vote subgroup operations */ + VOTE = 1 << 1, + /** Arithmetic subgroup operations */ + ARITHMETIC = 1 << 2, + /** Ballot subgroup operations */ + BALLOT = 1 << 3, + /** Shuffle subgroup operations */ + SHUFFLE = 1 << 4, + /** Shuffle relative subgroup operations */ + SHUFFLE_RELATIVE = 1 << 5, + /** Clustered subgroup operations */ + CLUSTERED = 1 << 6, + /** Quad subgroup operations */ + QUAD = 1 << 7, + PARTITIONED_BIT_NV = 1 << 8, +} + +export enum IndirectCommandsLayoutUsageFlagBitsNV { + INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV = 1 << 0, + INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV = 1 << 1, + INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV = 1 << 2, +} + +export enum IndirectStateFlagBitsNV { + INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV = 1 << 0, +} + +export enum IndirectCommandsTokenTypeNV { + INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV = 0, + INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV = 1, + INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV = 2, + INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV = 3, + INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV = 4, + INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV = 5, + INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = 6, + INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = 7, + INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV = 1000328000, +} + +export enum PrivateDataSlotCreateFlagBits { +} + +export enum DescriptorSetLayoutCreateFlagBits { + UPDATE_AFTER_BIND_POOL = 1 << 1, + /** Descriptors are pushed via flink:vkCmdPushDescriptorSetKHR */ + PUSH_DESCRIPTOR_BIT_KHR = 1 << 0, + UPDATE_AFTER_BIND_POOL_BIT_EXT = 1 << 1, + DESCRIPTOR_BUFFER_BIT_EXT = 1 << 4, + EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT = 1 << 5, + RESERVED_3_BIT_AMD = 1 << 3, + HOST_ONLY_POOL_BIT_VALVE = 1 << 2, + HOST_ONLY_POOL_BIT_EXT = 1 << 2, +} + +export enum ExternalMemoryHandleTypeFlagBits { + OPAQUE_FD = 1 << 0, + OPAQUE_WIN32 = 1 << 1, + OPAQUE_WIN32_KMT = 1 << 2, + D3D11_TEXTURE = 1 << 3, + D3D11_TEXTURE_KMT = 1 << 4, + D3D12_HEAP = 1 << 5, + D3D12_RESOURCE = 1 << 6, + OPAQUE_FD_BIT_KHR = 1 << 0, + OPAQUE_WIN32_BIT_KHR = 1 << 1, + OPAQUE_WIN32_KMT_BIT_KHR = 1 << 2, + D3D11_TEXTURE_BIT_KHR = 1 << 3, + D3D11_TEXTURE_KMT_BIT_KHR = 1 << 4, + D3D12_HEAP_BIT_KHR = 1 << 5, + D3D12_RESOURCE_BIT_KHR = 1 << 6, + DMA_BUF_BIT_EXT = 1 << 9, + ANDROID_HARDWARE_BUFFER_BIT_ANDROID = 1 << 10, + HOST_ALLOCATION_BIT_EXT = 1 << 7, + HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 1 << 8, + ZIRCON_VMO_BIT_FUCHSIA = 1 << 11, + RDMA_ADDRESS_BIT_NV = 1 << 12, + RESERVED_13_BIT_NV = 1 << 13, +} + +export enum ExternalMemoryFeatureFlagBits { + DEDICATED_ONLY = 1 << 0, + EXPORTABLE = 1 << 1, + IMPORTABLE = 1 << 2, + DEDICATED_ONLY_BIT_KHR = 1 << 0, + EXPORTABLE_BIT_KHR = 1 << 1, + IMPORTABLE_BIT_KHR = 1 << 2, +} + +export enum ExternalSemaphoreHandleTypeFlagBits { + OPAQUE_FD = 1 << 0, + OPAQUE_WIN32 = 1 << 1, + OPAQUE_WIN32_KMT = 1 << 2, + D3D12_FENCE = 1 << 3, + D3D11_FENCE = 1 << 3, + SYNC_FD = 1 << 4, + OPAQUE_FD_BIT_KHR = 1 << 0, + OPAQUE_WIN32_BIT_KHR = 1 << 1, + OPAQUE_WIN32_KMT_BIT_KHR = 1 << 2, + D3D12_FENCE_BIT_KHR = 1 << 3, + SYNC_FD_BIT_KHR = 1 << 4, + ZIRCON_EVENT_BIT_FUCHSIA = 1 << 7, + RESERVED_5_BIT_NV = 1 << 5, +} + +export enum ExternalSemaphoreFeatureFlagBits { + EXPORTABLE = 1 << 0, + IMPORTABLE = 1 << 1, + EXPORTABLE_BIT_KHR = 1 << 0, + IMPORTABLE_BIT_KHR = 1 << 1, +} + +export enum SemaphoreImportFlagBits { + TEMPORARY = 1 << 0, + TEMPORARY_BIT_KHR = 1 << 0, +} + +export enum ExternalFenceHandleTypeFlagBits { + OPAQUE_FD = 1 << 0, + OPAQUE_WIN32 = 1 << 1, + OPAQUE_WIN32_KMT = 1 << 2, + SYNC_FD = 1 << 3, + OPAQUE_FD_BIT_KHR = 1 << 0, + OPAQUE_WIN32_BIT_KHR = 1 << 1, + OPAQUE_WIN32_KMT_BIT_KHR = 1 << 2, + SYNC_FD_BIT_KHR = 1 << 3, + RESERVED_4_BIT_NV = 1 << 4, + RESERVED_5_BIT_NV = 1 << 5, +} + +export enum ExternalFenceFeatureFlagBits { + EXPORTABLE = 1 << 0, + IMPORTABLE = 1 << 1, + EXPORTABLE_BIT_KHR = 1 << 0, + IMPORTABLE_BIT_KHR = 1 << 1, +} + +export enum FenceImportFlagBits { + TEMPORARY = 1 << 0, + TEMPORARY_BIT_KHR = 1 << 0, +} + +export enum SurfaceCounterFlagBitsEXT { + SURFACE_COUNTER_VBLANK_BIT_EXT = 1 << 0, + /** Backwards-compatible alias containing a typo */ + SURFACE_COUNTER_VBLANK_EXT = 1 << 0, +} + +export enum DisplayPowerStateEXT { + DISPLAY_POWER_STATE_OFF_EXT = 0, + DISPLAY_POWER_STATE_SUSPEND_EXT = 1, + DISPLAY_POWER_STATE_ON_EXT = 2, +} + +export enum DeviceEventTypeEXT { + DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, +} + +export enum DisplayEventTypeEXT { + DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, +} + +export enum PeerMemoryFeatureFlagBits { + /** Can read with vkCmdCopy commands */ + COPY_SRC = 1 << 0, + /** Can write with vkCmdCopy commands */ + COPY_DST = 1 << 1, + /** Can read with any access type/command */ + GENERIC_SRC = 1 << 2, + /** Can write with and access type/command */ + GENERIC_DST = 1 << 3, + COPY_SRC_BIT_KHR = 1 << 0, + COPY_DST_BIT_KHR = 1 << 1, + GENERIC_SRC_BIT_KHR = 1 << 2, + GENERIC_DST_BIT_KHR = 1 << 3, +} + +export enum MemoryAllocateFlagBits { + /** Force allocation on specific devices */ + DEVICE_MASK = 1 << 0, + DEVICE_ADDRESS = 1 << 1, + DEVICE_ADDRESS_CAPTURE_REPLAY = 1 << 2, + DEVICE_MASK_BIT_KHR = 1 << 0, + DEVICE_ADDRESS_BIT_KHR = 1 << 1, + DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 1 << 2, +} + +export enum DeviceGroupPresentModeFlagBitsKHR { + /** Present from local memory */ + DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 1 << 0, + /** Present from remote memory */ + DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 1 << 1, + /** Present sum of local and/or remote memory */ + DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 1 << 2, + /** Each physical device presents from local memory */ + DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 1 << 3, +} + +export enum SwapchainCreateFlagBitsKHR { + /** Allow images with VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT */ + SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 1 << 0, + /** Swapchain is protected */ + SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 1 << 1, + SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR = 1 << 2, + SWAPCHAIN_CREATE_RESERVED_4_BIT_EXT = 1 << 4, + SWAPCHAIN_CREATE_RESERVED_3_BIT_SEC = 1 << 3, +} + +export enum ViewportCoordinateSwizzleNV { + VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, + VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, + VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, + VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, + VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, + VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, + VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, + VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, +} + +export enum DiscardRectangleModeEXT { + DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, + DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, +} + +export enum SubpassDescriptionFlagBits { + PER_VIEW_ATTRIBUTES_BIT_NVX = 1 << 0, + PER_VIEW_POSITION_X_ONLY_BIT_NVX = 1 << 1, + FRAGMENT_REGION_BIT_QCOM = 1 << 2, + SHADER_RESOLVE_BIT_QCOM = 1 << 3, + RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM = 1 << 4, + RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = 1 << 5, + RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = 1 << 6, + RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT = 1 << 4, + RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 1 << 5, + RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 1 << 6, + ENABLE_LEGACY_DITHERING_BIT_EXT = 1 << 7, +} + +export enum PointClippingBehavior { + ALL_CLIP_PLANES = 0, + USER_CLIP_PLANES_ONLY = 1, + ALL_CLIP_PLANES_KHR = 0, + USER_CLIP_PLANES_ONLY_KHR = 1, +} + +export enum SamplerReductionMode { + WEIGHTED_AVERAGE = 0, + MIN = 1, + MAX = 2, + WEIGHTED_AVERAGE_EXT = 0, + MIN_EXT = 1, + MAX_EXT = 2, +} + +export enum TessellationDomainOrigin { + UPPER_LEFT = 0, + LOWER_LEFT = 1, + UPPER_LEFT_KHR = 0, + LOWER_LEFT_KHR = 1, +} + +export enum SamplerYcbcrModelConversion { + RGB_IDENTITY = 0, + /** just range expansion */ + YCBCR_IDENTITY = 1, + /** aka HD YUV */ + YCBCR_709 = 2, + /** aka SD YUV */ + YCBCR_601 = 3, + /** aka UHD YUV */ + YCBCR_2020 = 4, + RGB_IDENTITY_KHR = 0, + YCBCR_IDENTITY_KHR = 1, + YCBCR_709_KHR = 2, + YCBCR_601_KHR = 3, + YCBCR_2020_KHR = 4, +} + +export enum SamplerYcbcrRange { + /** Luma 0..1 maps to 0..255, chroma -0.5..0.5 to 1..255 (clamped) */ + ITU_FULL = 0, + /** Luma 0..1 maps to 16..235, chroma -0.5..0.5 to 16..240 */ + ITU_NARROW = 1, + ITU_FULL_KHR = 0, + ITU_NARROW_KHR = 1, +} + +export enum ChromaLocation { + COSITED_EVEN = 0, + MIDPOINT = 1, + COSITED_EVEN_KHR = 0, + MIDPOINT_KHR = 1, +} + +export enum BlendOverlapEXT { + BLEND_OVERLAP_UNCORRELATED_EXT = 0, + BLEND_OVERLAP_DISJOINT_EXT = 1, + BLEND_OVERLAP_CONJOINT_EXT = 2, +} + +export enum CoverageModulationModeNV { + COVERAGE_MODULATION_MODE_NONE_NV = 0, + COVERAGE_MODULATION_MODE_RGB_NV = 1, + COVERAGE_MODULATION_MODE_ALPHA_NV = 2, + COVERAGE_MODULATION_MODE_RGBA_NV = 3, +} + +export enum CoverageReductionModeNV { + COVERAGE_REDUCTION_MODE_MERGE_NV = 0, + COVERAGE_REDUCTION_MODE_TRUNCATE_NV = 1, +} + +export enum ValidationCacheHeaderVersionEXT { + VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1, +} + +export enum ShaderInfoTypeAMD { + SHADER_INFO_TYPE_STATISTICS_AMD = 0, + SHADER_INFO_TYPE_BINARY_AMD = 1, + SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2, +} + +export enum QueueGlobalPriorityKHR { + QUEUE_GLOBAL_PRIORITY_LOW_KHR = 128, + QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = 256, + QUEUE_GLOBAL_PRIORITY_HIGH_KHR = 512, + QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = 1024, + QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128, + QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256, + QUEUE_GLOBAL_PRIORITY_HIGH_EXT = 512, + QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = 1024, +} + +export enum DebugUtilsMessageSeverityFlagBitsEXT { + DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 1 << 0, + DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 1 << 4, + DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 1 << 8, + DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 1 << 12, +} + +export enum DebugUtilsMessageTypeFlagBitsEXT { + DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 1 << 0, + DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 1 << 1, + DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 1 << 2, + DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT = 1 << 3, +} + +export enum ConservativeRasterizationModeEXT { + CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0, + CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1, + CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2, +} + +export enum DescriptorBindingFlagBits { + UPDATE_AFTER_BIND = 1 << 0, + UPDATE_UNUSED_WHILE_PENDING = 1 << 1, + PARTIALLY_BOUND = 1 << 2, + VARIABLE_DESCRIPTOR_COUNT = 1 << 3, + UPDATE_AFTER_BIND_BIT_EXT = 1 << 0, + UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = 1 << 1, + PARTIALLY_BOUND_BIT_EXT = 1 << 2, + VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = 1 << 3, + RESERVED_4_BIT_QCOM = 1 << 4, +} + +export enum VendorId { + /** Vivante vendor ID */ + VIV = 65537, + /** VeriSilicon vendor ID */ + VSI = 65538, + /** Kazan Software Renderer */ + KAZAN = 65539, + /** Codeplay Software Ltd. vendor ID */ + CODEPLAY = 65540, + /** Mesa vendor ID */ + MESA = 65541, + /** PoCL vendor ID */ + POCL = 65542, +} + +export enum DriverId { + /** Advanced Micro Devices, Inc. */ + AMD_PROPRIETARY = 1, + /** Advanced Micro Devices, Inc. */ + AMD_OPEN_SOURCE = 2, + /** Mesa open source project */ + MESA_RADV = 3, + /** NVIDIA Corporation */ + NVIDIA_PROPRIETARY = 4, + /** Intel Corporation */ + INTEL_PROPRIETARY_WINDOWS = 5, + /** Intel Corporation */ + INTEL_OPEN_SOURCE_MESA = 6, + /** Imagination Technologies */ + IMAGINATION_PROPRIETARY = 7, + /** Qualcomm Technologies, Inc. */ + QUALCOMM_PROPRIETARY = 8, + /** Arm Limited */ + ARM_PROPRIETARY = 9, + /** Google LLC */ + GOOGLE_SWIFTSHADER = 10, + /** Google LLC */ + GGP_PROPRIETARY = 11, + /** Broadcom Inc. */ + BROADCOM_PROPRIETARY = 12, + /** Mesa */ + MESA_LLVMPIPE = 13, + /** MoltenVK */ + MOLTENVK = 14, + /** Core Avionics & Industrial Inc. */ + COREAVI_PROPRIETARY = 15, + /** Juice Technologies, Inc. */ + JUICE_PROPRIETARY = 16, + /** Verisilicon, Inc. */ + VERISILICON_PROPRIETARY = 17, + /** Mesa open source project */ + MESA_TURNIP = 18, + /** Mesa open source project */ + MESA_V3DV = 19, + /** Mesa open source project */ + MESA_PANVK = 20, + /** Samsung Electronics Co., Ltd. */ + SAMSUNG_PROPRIETARY = 21, + /** Mesa open source project */ + MESA_VENUS = 22, + /** Mesa open source project */ + MESA_DOZEN = 23, + /** Mesa open source project */ + MESA_NVK = 24, + AMD_PROPRIETARY_KHR = 1, + AMD_OPEN_SOURCE_KHR = 2, + MESA_RADV_KHR = 3, + NVIDIA_PROPRIETARY_KHR = 4, + INTEL_PROPRIETARY_WINDOWS_KHR = 5, + INTEL_OPEN_SOURCE_MESA_KHR = 6, + IMAGINATION_PROPRIETARY_KHR = 7, + QUALCOMM_PROPRIETARY_KHR = 8, + ARM_PROPRIETARY_KHR = 9, + GOOGLE_SWIFTSHADER_KHR = 10, + GGP_PROPRIETARY_KHR = 11, + BROADCOM_PROPRIETARY_KHR = 12, +} + +export enum ConditionalRenderingFlagBitsEXT { + CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 1 << 0, +} + +export enum ResolveModeFlagBits { + NONE = 0, + SAMPLE_ZERO = 1 << 0, + AVERAGE = 1 << 1, + MIN = 1 << 2, + MAX = 1 << 3, + NONE_KHR = 0, + SAMPLE_ZERO_BIT_KHR = 1 << 0, + AVERAGE_BIT_KHR = 1 << 1, + MIN_BIT_KHR = 1 << 2, + MAX_BIT_KHR = 1 << 3, +} + +export enum ShadingRatePaletteEntryNV { + SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV = 0, + SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV = 1, + SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV = 2, + SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV = 3, + SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV = 4, + SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV = 5, + SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV = 6, + SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV = 7, + SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV = 8, + SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV = 9, + SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV = 10, + SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV = 11, +} + +export enum CoarseSampleOrderTypeNV { + COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV = 0, + COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV = 1, + COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV = 2, + COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV = 3, +} + +export enum GeometryInstanceFlagBitsKHR { + GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 1 << 0, + GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = 1 << 1, + GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 1 << 2, + GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 1 << 3, + GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = 1 << 1, + GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = 1 << 0, + GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR, + GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = 1 << 2, + GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = 1 << 3, + GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT = 1 << 4, + GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT = 1 << 5, +} + +export enum GeometryFlagBitsKHR { + GEOMETRY_OPAQUE_BIT_KHR = 1 << 0, + GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = 1 << 1, + GEOMETRY_OPAQUE_BIT_NV = 1 << 0, + GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = 1 << 1, +} + +export enum BuildAccelerationStructureFlagBitsKHR { + BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 1 << 0, + BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 1 << 1, + BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 1 << 2, + BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 1 << 3, + BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 1 << 4, + BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = 1 << 0, + BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = 1 << 1, + BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = 1 << 2, + BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = 1 << 3, + BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = 1 << 4, + BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 1 << 5, + BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = 1 << 6, + BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = 1 << 7, + BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = 1 << 8, + BUILD_ACCELERATION_STRUCTURE_RESERVED_BIT_9_NV = 1 << 9, + BUILD_ACCELERATION_STRUCTURE_RESERVED_BIT_10_NV = 1 << 10, +} + +export enum AccelerationStructureCreateFlagBitsKHR { + ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 1 << 0, + ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 3, + ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = 1 << 2, +} + +export enum CopyAccelerationStructureModeKHR { + COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR = 0, + COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR = 1, + COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR = 2, + COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR = 3, + COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = 0, + COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = 1, +} + +export enum BuildAccelerationStructureModeKHR { + BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = 0, + BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1, +} + +export enum AccelerationStructureTypeKHR { + ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0, + ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1, + ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2, + ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = 0, + ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = 1, +} + +export enum GeometryTypeKHR { + GEOMETRY_TYPE_TRIANGLES_KHR = 0, + GEOMETRY_TYPE_AABBS_KHR = 1, + GEOMETRY_TYPE_INSTANCES_KHR = 2, + GEOMETRY_TYPE_TRIANGLES_NV = 0, + GEOMETRY_TYPE_AABBS_NV = 1, +} + +export enum AccelerationStructureMemoryRequirementsTypeNV { + ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = 0, + ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = 1, + ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = 2, +} + +export enum AccelerationStructureBuildTypeKHR { + ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0, + ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1, + ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2, +} + +export enum RayTracingShaderGroupTypeKHR { + RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = 0, + RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = 1, + RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = 2, + RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = 0, + RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = 1, + RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = 2, +} + +export enum AccelerationStructureCompatibilityKHR { + ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR = 0, + ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR = 1, +} + +export enum ShaderGroupShaderKHR { + SHADER_GROUP_SHADER_GENERAL_KHR = 0, + SHADER_GROUP_SHADER_CLOSEST_HIT_KHR = 1, + SHADER_GROUP_SHADER_ANY_HIT_KHR = 2, + SHADER_GROUP_SHADER_INTERSECTION_KHR = 3, +} + +export enum MemoryOverallocationBehaviorAMD { + MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0, + MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1, + MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = 2, +} + +export enum FramebufferCreateFlagBits { + IMAGELESS = 1 << 0, + IMAGELESS_BIT_KHR = 1 << 0, +} + +export enum ScopeNV { + SCOPE_DEVICE_NV = 1, + SCOPE_WORKGROUP_NV = 2, + SCOPE_SUBGROUP_NV = 3, + SCOPE_QUEUE_FAMILY_NV = 5, +} + +export enum ComponentTypeNV { + COMPONENT_TYPE_FLOAT16_NV = 0, + COMPONENT_TYPE_FLOAT32_NV = 1, + COMPONENT_TYPE_FLOAT64_NV = 2, + COMPONENT_TYPE_SINT8_NV = 3, + COMPONENT_TYPE_SINT16_NV = 4, + COMPONENT_TYPE_SINT32_NV = 5, + COMPONENT_TYPE_SINT64_NV = 6, + COMPONENT_TYPE_UINT8_NV = 7, + COMPONENT_TYPE_UINT16_NV = 8, + COMPONENT_TYPE_UINT32_NV = 9, + COMPONENT_TYPE_UINT64_NV = 10, +} + +export enum DeviceDiagnosticsConfigFlagBitsNV { + DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV = 1 << 0, + DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV = 1 << 1, + DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV = 1 << 2, + DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV = 1 << 3, +} + +export enum PipelineCreationFeedbackFlagBits { + VALID = 1 << 0, + VALID_BIT_EXT = 1 << 0, + APPLICATION_PIPELINE_CACHE_HIT = 1 << 1, + APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT = 1 << 1, + BASE_PIPELINE_ACCELERATION = 1 << 2, + BASE_PIPELINE_ACCELERATION_BIT_EXT = 1 << 2, +} + +export enum FullScreenExclusiveEXT { + FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0, + FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1, + FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2, + FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3, +} + +export enum PerformanceCounterScopeKHR { + PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0, + PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1, + PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2, + /** Backwards-compatible alias containing a typo */ + QUERY_SCOPE_COMMAND_BUFFER_KHR = 0, + /** Backwards-compatible alias containing a typo */ + QUERY_SCOPE_RENDER_PASS_KHR = 1, + /** Backwards-compatible alias containing a typo */ + QUERY_SCOPE_COMMAND_KHR = 2, +} + +export enum MemoryDecompressionMethodFlagBitsNV { + MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV = 1 << 0, +} + +export enum PerformanceCounterUnitKHR { + PERFORMANCE_COUNTER_UNIT_GENERIC_KHR = 0, + PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR = 1, + PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR = 2, + PERFORMANCE_COUNTER_UNIT_BYTES_KHR = 3, + PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR = 4, + PERFORMANCE_COUNTER_UNIT_KELVIN_KHR = 5, + PERFORMANCE_COUNTER_UNIT_WATTS_KHR = 6, + PERFORMANCE_COUNTER_UNIT_VOLTS_KHR = 7, + PERFORMANCE_COUNTER_UNIT_AMPS_KHR = 8, + PERFORMANCE_COUNTER_UNIT_HERTZ_KHR = 9, + PERFORMANCE_COUNTER_UNIT_CYCLES_KHR = 10, +} + +export enum PerformanceCounterStorageKHR { + PERFORMANCE_COUNTER_STORAGE_INT32_KHR = 0, + PERFORMANCE_COUNTER_STORAGE_INT64_KHR = 1, + PERFORMANCE_COUNTER_STORAGE_UINT32_KHR = 2, + PERFORMANCE_COUNTER_STORAGE_UINT64_KHR = 3, + PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR = 4, + PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR = 5, +} + +export enum PerformanceCounterDescriptionFlagBitsKHR { + PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR = 1 << 0, + /** Backwards-compatible alias containing a typo */ + PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = 1 << 0, + PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR = 1 << 1, + /** Backwards-compatible alias containing a typo */ + PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = 1 << 1, +} + +export enum AcquireProfilingLockFlagBitsKHR { +} + +export enum ShaderCorePropertiesFlagBitsAMD { +} + +export enum PerformanceConfigurationTypeINTEL { + PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL = 0, +} + +export enum QueryPoolSamplingModeINTEL { + QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL = 0, +} + +export enum PerformanceOverrideTypeINTEL { + PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL = 0, + PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL = 1, +} + +export enum PerformanceParameterTypeINTEL { + PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL = 0, + PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL = 1, +} + +export enum PerformanceValueTypeINTEL { + PERFORMANCE_VALUE_TYPE_UINT32_INTEL = 0, + PERFORMANCE_VALUE_TYPE_UINT64_INTEL = 1, + PERFORMANCE_VALUE_TYPE_FLOAT_INTEL = 2, + PERFORMANCE_VALUE_TYPE_BOOL_INTEL = 3, + PERFORMANCE_VALUE_TYPE_STRING_INTEL = 4, +} + +export enum ShaderFloatControlsIndependence { + VK_32_BIT_ONLY = 0, + ALL = 1, + NONE = 2, + VK_32_BIT_ONLY_KHR = 0, + ALL_KHR = 1, + NONE_KHR = 2, +} + +export enum PipelineExecutableStatisticFormatKHR { + PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR = 0, + PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR = 1, + PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR = 2, + PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR = 3, +} + +export enum LineRasterizationModeEXT { + LINE_RASTERIZATION_MODE_DEFAULT_EXT = 0, + LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = 1, + LINE_RASTERIZATION_MODE_BRESENHAM_EXT = 2, + LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = 3, +} + +export enum ShaderModuleCreateFlagBits { +} + +export enum PipelineCompilerControlFlagBitsAMD { +} + +export enum ToolPurposeFlagBits { + VALIDATION = 1 << 0, + VALIDATION_BIT_EXT = 1 << 0, + PROFILING = 1 << 1, + PROFILING_BIT_EXT = 1 << 1, + TRACING = 1 << 2, + TRACING_BIT_EXT = 1 << 2, + ADDITIONAL_FEATURES = 1 << 3, + ADDITIONAL_FEATURES_BIT_EXT = 1 << 3, + MODIFYING_FEATURES = 1 << 4, + MODIFYING_FEATURES_BIT_EXT = 1 << 4, + DEBUG_REPORTING_BIT_EXT = 1 << 5, + DEBUG_MARKERS_BIT_EXT = 1 << 6, +} + +export enum FragmentShadingRateCombinerOpKHR { + FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR = 0, + FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR = 1, + FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR = 2, + FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR = 3, + FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR = 4, +} + +export enum FragmentShadingRateNV { + FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0, + FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 1, + FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 4, + FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 5, + FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 6, + FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 9, + FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 10, + FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 11, + FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 12, + FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 13, + FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 14, + FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV = 15, +} + +export enum FragmentShadingRateTypeNV { + FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV = 0, + FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV = 1, +} + +export enum SubpassMergeStatusEXT { + SUBPASS_MERGE_STATUS_MERGED_EXT = 0, + SUBPASS_MERGE_STATUS_DISALLOWED_EXT = 1, + SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT = 2, + SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT = 3, + SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT = 4, + SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT = 5, + SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT = 6, + SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT = 7, + SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT = 8, + SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT = 9, + SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT = 10, + SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT = 11, + SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT = 12, + SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT = 13, +} + +export enum AccessFlagBits2 { + ACCESS_2_NONE = 0, + ACCESS_2_NONE_KHR = 0, + ACCESS_2_INDIRECT_COMMAND_READ_BIT = 1 << 0, + ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 1 << 0, + ACCESS_2_INDEX_READ_BIT = 1 << 1, + ACCESS_2_INDEX_READ_BIT_KHR = 1 << 1, + ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT = 1 << 2, + ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 1 << 2, + ACCESS_2_UNIFORM_READ_BIT = 1 << 3, + ACCESS_2_UNIFORM_READ_BIT_KHR = 1 << 3, + ACCESS_2_INPUT_ATTACHMENT_READ_BIT = 1 << 4, + ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 1 << 4, + ACCESS_2_SHADER_READ_BIT = 1 << 5, + ACCESS_2_SHADER_READ_BIT_KHR = 1 << 5, + ACCESS_2_SHADER_WRITE_BIT = 1 << 6, + ACCESS_2_SHADER_WRITE_BIT_KHR = 1 << 6, + ACCESS_2_COLOR_ATTACHMENT_READ_BIT = 1 << 7, + ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 1 << 7, + ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT = 1 << 8, + ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 1 << 8, + ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 1 << 9, + ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 1 << 9, + ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 1 << 10, + ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 1 << 10, + ACCESS_2_TRANSFER_READ_BIT = 1 << 11, + ACCESS_2_TRANSFER_READ_BIT_KHR = 1 << 11, + ACCESS_2_TRANSFER_WRITE_BIT = 1 << 12, + ACCESS_2_TRANSFER_WRITE_BIT_KHR = 1 << 12, + ACCESS_2_HOST_READ_BIT = 1 << 13, + ACCESS_2_HOST_READ_BIT_KHR = 1 << 13, + ACCESS_2_HOST_WRITE_BIT = 1 << 14, + ACCESS_2_HOST_WRITE_BIT_KHR = 1 << 14, + ACCESS_2_MEMORY_READ_BIT = 1 << 15, + ACCESS_2_MEMORY_READ_BIT_KHR = 1 << 15, + ACCESS_2_MEMORY_WRITE_BIT = 1 << 16, + ACCESS_2_MEMORY_WRITE_BIT_KHR = 1 << 16, + ACCESS_2_SHADER_SAMPLED_READ_BIT = 1 << 32, + ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 1 << 32, + ACCESS_2_SHADER_STORAGE_READ_BIT = 1 << 33, + ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 1 << 33, + ACCESS_2_SHADER_STORAGE_WRITE_BIT = 1 << 34, + ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 1 << 34, + ACCESS_2_VIDEO_DECODE_READ_BIT_KHR = 1 << 35, + ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR = 1 << 36, + ACCESS_2_RESERVED_46_BIT_EXT = 1 << 46, + ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 1 << 37, + ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 1 << 38, + ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 1 << 25, + ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 1 << 26, + ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 1 << 27, + /** read access flag for reading conditional rendering predicate */ + ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 1 << 20, + ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 1 << 17, + ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 1 << 18, + ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 1 << 23, + ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 1 << 23, + ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 1 << 21, + ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 1 << 22, + ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 1 << 21, + ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 1 << 22, + ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 1 << 24, + ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 1 << 19, + ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT = 1 << 41, + ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI = 1 << 39, + ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR = 1 << 40, + ACCESS_2_MICROMAP_READ_BIT_EXT = 1 << 44, + ACCESS_2_MICROMAP_WRITE_BIT_EXT = 1 << 45, + ACCESS_2_OPTICAL_FLOW_READ_BIT_NV = 1 << 42, + ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV = 1 << 43, +} + +export enum PipelineStageFlagBits2 { + PIPELINE_STAGE_2_NONE = 0, + PIPELINE_STAGE_2_NONE_KHR = 0, + PIPELINE_STAGE_2_TOP_OF_PIPE_BIT = 1 << 0, + PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 1 << 0, + PIPELINE_STAGE_2_DRAW_INDIRECT_BIT = 1 << 1, + PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 1 << 1, + PIPELINE_STAGE_2_VERTEX_INPUT_BIT = 1 << 2, + PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 1 << 2, + PIPELINE_STAGE_2_VERTEX_SHADER_BIT = 1 << 3, + PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 1 << 3, + PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT = 1 << 4, + PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 1 << 4, + PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT = 1 << 5, + PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 1 << 5, + PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT = 1 << 6, + PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 1 << 6, + PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT = 1 << 7, + PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 1 << 7, + PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT = 1 << 8, + PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 1 << 8, + PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT = 1 << 9, + PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 1 << 9, + PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT = 1 << 10, + PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 1 << 10, + PIPELINE_STAGE_2_COMPUTE_SHADER_BIT = 1 << 11, + PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 1 << 11, + PIPELINE_STAGE_2_ALL_TRANSFER_BIT = 1 << 12, + PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 1 << 12, + PIPELINE_STAGE_2_TRANSFER_BIT = PIPELINE_STAGE_2_ALL_TRANSFER_BIT, + PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 1 << 12, + PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT = 1 << 13, + PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 1 << 13, + PIPELINE_STAGE_2_HOST_BIT = 1 << 14, + PIPELINE_STAGE_2_HOST_BIT_KHR = 1 << 14, + PIPELINE_STAGE_2_ALL_GRAPHICS_BIT = 1 << 15, + PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 1 << 15, + PIPELINE_STAGE_2_ALL_COMMANDS_BIT = 1 << 16, + PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 1 << 16, + PIPELINE_STAGE_2_COPY_BIT = 1 << 32, + PIPELINE_STAGE_2_COPY_BIT_KHR = 1 << 32, + PIPELINE_STAGE_2_RESOLVE_BIT = 1 << 33, + PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 1 << 33, + PIPELINE_STAGE_2_BLIT_BIT = 1 << 34, + PIPELINE_STAGE_2_BLIT_BIT_KHR = 1 << 34, + PIPELINE_STAGE_2_CLEAR_BIT = 1 << 35, + PIPELINE_STAGE_2_CLEAR_BIT_KHR = 1 << 35, + PIPELINE_STAGE_2_INDEX_INPUT_BIT = 1 << 36, + PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 1 << 36, + PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT = 1 << 37, + PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 1 << 37, + PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT = 1 << 38, + PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 1 << 38, + PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR = 1 << 26, + PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 1 << 27, + PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 1 << 24, + /** A pipeline stage for conditional rendering predicate fetch */ + PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 1 << 18, + PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 1 << 17, + PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 22, + PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 1 << 22, + PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 1 << 25, + PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 1 << 21, + PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 1 << 21, + PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 1 << 25, + PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 1 << 23, + PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 1 << 19, + PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 1 << 20, + PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT = 1 << 19, + PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT = 1 << 20, + PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI = 1 << 39, + PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI = 1 << 40, + PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR = 1 << 28, + PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT = 1 << 30, + PIPELINE_STAGE_2_RESEVED_41_BIT_HUAWEI = 1 << 41, + PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV = 1 << 29, +} + +export enum SubmitFlagBits { + PROTECTED = 1 << 0, + PROTECTED_BIT_KHR = 1 << 0, +} + +export enum EventCreateFlagBits { + DEVICE_ONLY = 1 << 0, + DEVICE_ONLY_BIT_KHR = 1 << 0, +} + +export enum PipelineLayoutCreateFlagBits { + RESERVED_0_BIT_AMD = 1 << 0, + INDEPENDENT_SETS_BIT_EXT = 1 << 1, +} + +export enum ProvokingVertexModeEXT { + PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT = 0, + PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT = 1, +} + +export enum AccelerationStructureMotionInstanceTypeNV { + ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV = 0, + ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV = 1, + ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV = 2, +} + +export enum PipelineColorBlendStateCreateFlagBits { + RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM = 1 << 0, + RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT = 1 << 0, +} + +export enum PipelineDepthStencilStateCreateFlagBits { + RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = 1 << 0, + RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = 1 << 1, + RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 1 << 0, + RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 1 << 1, +} + +export enum GraphicsPipelineLibraryFlagBitsEXT { + GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT = 1 << 0, + GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT = 1 << 1, + GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT = 1 << 2, + GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT = 1 << 3, +} + +export enum DeviceAddressBindingFlagBitsEXT { + DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT = 1 << 0, +} + +export enum DeviceAddressBindingTypeEXT { + DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT = 0, + DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT = 1, +} + +export enum VideoCodecOperationFlagBitsKHR { + VIDEO_CODEC_OPERATION_NONE_KHR = 0, + VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT = 1 << 16, + VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT = 1 << 17, + VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT = 1 << 0, + VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT = 1 << 1, +} + +/** Vulkan video chroma subsampling definitions */ +export enum VideoChromaSubsamplingFlagBitsKHR { + VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR = 0, + VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR = 1 << 0, + VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR = 1 << 1, + VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR = 1 << 2, + VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR = 1 << 3, +} + +/** Vulkan video component bit depth definitions */ +export enum VideoComponentBitDepthFlagBitsKHR { + VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR = 0, + VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR = 1 << 0, + VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR = 1 << 2, + VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR = 1 << 4, +} + +export enum VideoCapabilityFlagBitsKHR { + VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR = 1 << 0, + VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 1 << 1, +} + +export enum VideoSessionCreateFlagBitsKHR { + VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 1 << 0, +} + +export enum VideoDecodeH264PictureLayoutFlagBitsEXT { + VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT = 0, + VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT = 1 << 0, + VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT = 1 << 1, +} + +export enum VideoCodingControlFlagBitsKHR { + VIDEO_CODING_CONTROL_RESET_BIT_KHR = 1 << 0, + VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 1 << 1, + VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR = 1 << 2, +} + +export enum QueryResultStatusKHR { + QUERY_RESULT_STATUS_ERROR_KHR = -1, + QUERY_RESULT_STATUS_NOT_READY_KHR = 0, + QUERY_RESULT_STATUS_COMPLETE_KHR = 1, +} + +export enum VideoDecodeUsageFlagBitsKHR { + VIDEO_DECODE_USAGE_DEFAULT_KHR = 0, + VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR = 1 << 0, + VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR = 1 << 1, + VIDEO_DECODE_USAGE_STREAMING_BIT_KHR = 1 << 2, +} + +export enum VideoDecodeCapabilityFlagBitsKHR { + VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR = 1 << 0, + VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR = 1 << 1, +} + +export enum VideoEncodeUsageFlagBitsKHR { + VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0, + VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 1 << 0, + VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 1 << 1, + VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 1 << 2, + VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 1 << 3, +} + +export enum VideoEncodeContentFlagBitsKHR { + VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0, + VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 1 << 0, + VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 1 << 1, + VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 1 << 2, +} + +export enum VideoEncodeTuningModeKHR { + VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0, + VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1, + VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2, + VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3, + VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4, +} + +export enum VideoEncodeCapabilityFlagBitsKHR { + VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 1 << 0, +} + +export enum VideoEncodeRateControlModeFlagBitsKHR { + VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR = 0, + VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 1, + VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 2, +} + +export enum VideoEncodeH264CapabilityFlagBitsEXT { + VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT = 1 << 0, + VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT = 1 << 1, + VIDEO_ENCODE_H264_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 1 << 2, + VIDEO_ENCODE_H264_CAPABILITY_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_BIT_EXT = 1 << 3, + VIDEO_ENCODE_H264_CAPABILITY_SCALING_LISTS_BIT_EXT = 1 << 4, + VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 1 << 5, + VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT = 1 << 6, + VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT = 1 << 7, + VIDEO_ENCODE_H264_CAPABILITY_PIC_INIT_QP_MINUS26_BIT_EXT = 1 << 8, + VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 1 << 9, + VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_EXPLICIT_BIT_EXT = 1 << 10, + VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_IMPLICIT_BIT_EXT = 1 << 11, + VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 1 << 12, + VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT = 1 << 13, + VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT = 1 << 14, + VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT = 1 << 15, + VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT = 1 << 16, + VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT = 1 << 17, + VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT = 1 << 18, + VIDEO_ENCODE_H264_CAPABILITY_DISABLE_DIRECT_SPATIAL_MV_PRED_BIT_EXT = 1 << 19, + VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT = 1 << 20, + VIDEO_ENCODE_H264_CAPABILITY_SLICE_MB_COUNT_BIT_EXT = 1 << 21, + VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT = 1 << 22, + VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 1 << 23, + VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 1 << 24, +} + +export enum VideoEncodeH264InputModeFlagBitsEXT { + VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT = 1 << 0, + VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT = 1 << 1, + VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT = 1 << 2, +} + +export enum VideoEncodeH264OutputModeFlagBitsEXT { + VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT = 1 << 0, + VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT = 1 << 1, + VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT = 1 << 2, +} + +export enum VideoEncodeH264RateControlStructureEXT { + VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, + VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1, + VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2, +} + +export enum ImageFormatConstraintsFlagBitsFUCHSIA { +} + +export enum ImageConstraintsInfoFlagBitsFUCHSIA { + IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 1 << 0, + IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 1 << 1, + IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 1 << 2, + IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 1 << 3, + IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 1 << 4, +} + +export enum FormatFeatureFlagBits2 { + FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT = 1 << 0, + FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = 1 << 0, + FORMAT_FEATURE_2_STORAGE_IMAGE_BIT = 1 << 1, + FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = 1 << 1, + FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT = 1 << 2, + FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = 1 << 2, + FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT = 1 << 3, + FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 1 << 3, + FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT = 1 << 4, + FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 1 << 4, + FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 1 << 5, + FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR = 1 << 5, + FORMAT_FEATURE_2_VERTEX_BUFFER_BIT = 1 << 6, + FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR = 1 << 6, + FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT = 1 << 7, + FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR = 1 << 7, + FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT = 1 << 8, + FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR = 1 << 8, + FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT = 1 << 9, + FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 1 << 9, + FORMAT_FEATURE_2_BLIT_SRC_BIT = 1 << 10, + FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR = 1 << 10, + FORMAT_FEATURE_2_BLIT_DST_BIT = 1 << 11, + FORMAT_FEATURE_2_BLIT_DST_BIT_KHR = 1 << 11, + FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 1 << 12, + FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR = 1 << 12, + FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT = 1 << 13, + FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 1 << 13, + FORMAT_FEATURE_2_TRANSFER_SRC_BIT = 1 << 14, + FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR = 1 << 14, + FORMAT_FEATURE_2_TRANSFER_DST_BIT = 1 << 15, + FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR = 1 << 15, + FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 1 << 16, + FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR = 1 << 16, + FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT = 1 << 17, + FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 1 << 17, + FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 1 << 18, + FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 1 << 18, + FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 1 << 19, + FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 1 << 19, + FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 1 << 20, + FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 1 << 20, + FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 1 << 21, + FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 1 << 21, + FORMAT_FEATURE_2_DISJOINT_BIT = 1 << 22, + FORMAT_FEATURE_2_DISJOINT_BIT_KHR = 1 << 22, + FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT = 1 << 23, + FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR = 1 << 23, + FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT = 1 << 31, + FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = 1 << 31, + FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT = 1 << 32, + FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = 1 << 32, + FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT = 1 << 33, + FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = 1 << 33, + FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR = 1 << 25, + FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR = 1 << 26, + FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 1 << 29, + FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 1 << 24, + FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 30, + FORMAT_FEATURE_2_RESERVED_44_BIT_EXT = 1 << 44, + FORMAT_FEATURE_2_RESERVED_45_BIT_EXT = 1 << 45, + FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 1 << 27, + FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 1 << 28, + /** Format support linear image as render target, it cannot be mixed with non linear attachment */ + FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV = 1 << 38, + FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM = 1 << 34, + FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM = 1 << 35, + FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM = 1 << 36, + FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM = 1 << 37, + FORMAT_FEATURE_2_RESERVED_39_BIT_EXT = 1 << 39, + FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV = 1 << 40, + FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV = 1 << 41, + FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV = 1 << 42, +} + +export enum RenderingFlagBits { + CONTENTS_SECONDARY_COMMAND_BUFFERS = 1 << 0, + CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR = 1 << 0, + SUSPENDING = 1 << 1, + SUSPENDING_BIT_KHR = 1 << 1, + RESUMING = 1 << 2, + RESUMING_BIT_KHR = 1 << 2, + ENABLE_LEGACY_DITHERING_BIT_EXT = 1 << 3, +} + +export enum VideoEncodeH265CapabilityFlagBitsEXT { + VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 1 << 0, + VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT = 1 << 1, + VIDEO_ENCODE_H265_CAPABILITY_SAMPLE_ADAPTIVE_OFFSET_ENABLED_BIT_EXT = 1 << 2, + VIDEO_ENCODE_H265_CAPABILITY_PCM_ENABLE_BIT_EXT = 1 << 3, + VIDEO_ENCODE_H265_CAPABILITY_SPS_TEMPORAL_MVP_ENABLED_BIT_EXT = 1 << 4, + VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 1 << 5, + VIDEO_ENCODE_H265_CAPABILITY_INIT_QP_MINUS26_BIT_EXT = 1 << 6, + VIDEO_ENCODE_H265_CAPABILITY_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT = 1 << 7, + VIDEO_ENCODE_H265_CAPABILITY_SIGN_DATA_HIDING_ENABLED_BIT_EXT = 1 << 8, + VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_ENABLED_BIT_EXT = 1 << 9, + VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_DISABLED_BIT_EXT = 1 << 10, + VIDEO_ENCODE_H265_CAPABILITY_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_BIT_EXT = 1 << 11, + VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 1 << 12, + VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_BIPRED_BIT_EXT = 1 << 13, + VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 1 << 14, + VIDEO_ENCODE_H265_CAPABILITY_TRANSQUANT_BYPASS_ENABLED_BIT_EXT = 1 << 15, + VIDEO_ENCODE_H265_CAPABILITY_ENTROPY_CODING_SYNC_ENABLED_BIT_EXT = 1 << 16, + VIDEO_ENCODE_H265_CAPABILITY_DEBLOCKING_FILTER_OVERRIDE_ENABLED_BIT_EXT = 1 << 17, + VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_FRAME_BIT_EXT = 1 << 18, + VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_PER_TILE_BIT_EXT = 1 << 19, + VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_SLICE_BIT_EXT = 1 << 20, + VIDEO_ENCODE_H265_CAPABILITY_SLICE_SEGMENT_CTB_COUNT_BIT_EXT = 1 << 21, + VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT = 1 << 22, + VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT = 1 << 23, + VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 1 << 24, + VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 1 << 25, +} + +export enum VideoEncodeH265InputModeFlagBitsEXT { + VIDEO_ENCODE_H265_INPUT_MODE_FRAME_BIT_EXT = 1 << 0, + VIDEO_ENCODE_H265_INPUT_MODE_SLICE_SEGMENT_BIT_EXT = 1 << 1, + VIDEO_ENCODE_H265_INPUT_MODE_NON_VCL_BIT_EXT = 1 << 2, +} + +export enum VideoEncodeH265OutputModeFlagBitsEXT { + VIDEO_ENCODE_H265_OUTPUT_MODE_FRAME_BIT_EXT = 1 << 0, + VIDEO_ENCODE_H265_OUTPUT_MODE_SLICE_SEGMENT_BIT_EXT = 1 << 1, + VIDEO_ENCODE_H265_OUTPUT_MODE_NON_VCL_BIT_EXT = 1 << 2, +} + +export enum VideoEncodeH265RateControlStructureEXT { + VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, + VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1, + VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2, +} + +export enum VideoEncodeH265CtbSizeFlagBitsEXT { + VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT = 1 << 0, + VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT = 1 << 1, + VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT = 1 << 2, +} + +export enum VideoEncodeH265TransformBlockSizeFlagBitsEXT { + VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT = 1 << 0, + VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT = 1 << 1, + VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT = 1 << 2, + VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT = 1 << 3, +} + +export enum ExportMetalObjectTypeFlagBitsEXT { + EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 1 << 0, + EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 1 << 1, + EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 1 << 2, + EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 1 << 3, + EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 1 << 4, + EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 1 << 5, +} + +export enum InstanceCreateFlagBits { + ENUMERATE_PORTABILITY_BIT_KHR = 1 << 0, +} + +export enum ImageCompressionFlagBitsEXT { + IMAGE_COMPRESSION_DEFAULT_EXT = 0, + IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT = 1 << 0, + IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT = 1 << 1, + IMAGE_COMPRESSION_DISABLED_EXT = 1 << 2, +} + +export enum ImageCompressionFixedRateFlagBitsEXT { + IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT = 0, + IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT = 1 << 0, + IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT = 1 << 1, + IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT = 1 << 2, + IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT = 1 << 3, + IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT = 1 << 4, + IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT = 1 << 5, + IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT = 1 << 6, + IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT = 1 << 7, + IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT = 1 << 8, + IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT = 1 << 9, + IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT = 1 << 10, + IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT = 1 << 11, + IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT = 1 << 12, + IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT = 1 << 13, + IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT = 1 << 14, + IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT = 1 << 15, + IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT = 1 << 16, + IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT = 1 << 17, + IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT = 1 << 18, + IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT = 1 << 19, + IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT = 1 << 20, + IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT = 1 << 21, + IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT = 1 << 22, + IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT = 1 << 23, +} + +export enum PipelineRobustnessBufferBehaviorEXT { + PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT = 0, + PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT = 1, + PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT = 2, + PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT = 3, +} + +export enum PipelineRobustnessImageBehaviorEXT { + PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT = 0, + PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT = 1, + PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT = 2, + PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT = 3, +} + +export enum OpticalFlowGridSizeFlagBitsNV { + OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV = 0, + OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV = 1 << 0, + OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV = 1 << 1, + OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV = 1 << 2, + OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV = 1 << 3, +} + +export enum OpticalFlowUsageFlagBitsNV { + OPTICAL_FLOW_USAGE_UNKNOWN_NV = 0, + OPTICAL_FLOW_USAGE_INPUT_BIT_NV = 1 << 0, + OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV = 1 << 1, + OPTICAL_FLOW_USAGE_HINT_BIT_NV = 1 << 2, + OPTICAL_FLOW_USAGE_COST_BIT_NV = 1 << 3, + OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV = 1 << 4, +} + +export enum OpticalFlowPerformanceLevelNV { + OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV = 0, + OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV = 1, + OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV = 2, + OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV = 3, +} + +export enum OpticalFlowSessionBindingPointNV { + OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV = 0, + OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV = 1, + OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV = 2, + OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV = 3, + OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV = 4, + OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV = 5, + OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV = 6, + OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV = 7, + OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV = 8, +} + +export enum OpticalFlowSessionCreateFlagBitsNV { + OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV = 1 << 0, + OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV = 1 << 1, + OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV = 1 << 2, + OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV = 1 << 3, + OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV = 1 << 4, +} + +export enum OpticalFlowExecuteFlagBitsNV { + OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV = 1 << 0, +} + +export enum MicromapTypeEXT { + MICROMAP_TYPE_OPACITY_MICROMAP_EXT = 0, +} + +export enum BuildMicromapFlagBitsEXT { + BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT = 1 << 0, + BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT = 1 << 1, + BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT = 1 << 2, +} + +export enum MicromapCreateFlagBitsEXT { + MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 1 << 0, +} + +export enum CopyMicromapModeEXT { + COPY_MICROMAP_MODE_CLONE_EXT = 0, + COPY_MICROMAP_MODE_SERIALIZE_EXT = 1, + COPY_MICROMAP_MODE_DESERIALIZE_EXT = 2, + COPY_MICROMAP_MODE_COMPACT_EXT = 3, +} + +export enum BuildMicromapModeEXT { + BUILD_MICROMAP_MODE_BUILD_EXT = 0, +} + +export enum OpacityMicromapFormatEXT { + OPACITY_MICROMAP_FORMAT_2_STATE_EXT = 1, + OPACITY_MICROMAP_FORMAT_4_STATE_EXT = 2, +} + +export enum OpacityMicromapSpecialIndexEXT { + OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT = -1, + OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT = -2, + OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT = -3, + OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT = -4, +} + +export enum DeviceFaultAddressTypeEXT { + /** Currently unused */ + DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT = 0, + DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT = 1, + DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT = 2, + DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT = 3, + DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT = 4, + DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT = 5, + DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT = 6, +} + +export enum DeviceFaultVendorBinaryHeaderVersionEXT { + DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT = 1, +} + +export type PrivateDataSlotCreateFlagBitsEXT = PrivateDataSlotCreateFlagBits + +export type DescriptorUpdateTemplateTypeKHR = DescriptorUpdateTemplateType + +export type PointClippingBehaviorKHR = PointClippingBehavior + +export type QueueGlobalPriorityEXT = QueueGlobalPriorityKHR + +export type ResolveModeFlagBitsKHR = ResolveModeFlagBits + +export type DescriptorBindingFlagBitsEXT = DescriptorBindingFlagBits + +export type SemaphoreTypeKHR = SemaphoreType + +export type GeometryFlagBitsNV = GeometryFlagBitsKHR + +export type GeometryInstanceFlagBitsNV = GeometryInstanceFlagBitsKHR + +export type BuildAccelerationStructureFlagBitsNV = BuildAccelerationStructureFlagBitsKHR + +export type CopyAccelerationStructureModeNV = CopyAccelerationStructureModeKHR + +export type AccelerationStructureTypeNV = AccelerationStructureTypeKHR + +export type GeometryTypeNV = GeometryTypeKHR + +export type RayTracingShaderGroupTypeNV = RayTracingShaderGroupTypeKHR + +export type PipelineCreationFeedbackFlagBitsEXT = PipelineCreationFeedbackFlagBits + +export type SemaphoreWaitFlagBitsKHR = SemaphoreWaitFlagBits + +export type ToolPurposeFlagBitsEXT = ToolPurposeFlagBits + +export type AccessFlagBits2KHR = AccessFlagBits2 + +export type PipelineStageFlagBits2KHR = PipelineStageFlagBits2 + +export type FormatFeatureFlagBits2KHR = FormatFeatureFlagBits2 + +export type RenderingFlagBitsKHR = RenderingFlagBits + +export type ExternalMemoryHandleTypeFlagBitsKHR = ExternalMemoryHandleTypeFlagBits + +export type ExternalMemoryFeatureFlagBitsKHR = ExternalMemoryFeatureFlagBits + +export type ExternalSemaphoreHandleTypeFlagBitsKHR = ExternalSemaphoreHandleTypeFlagBits + +export type ExternalSemaphoreFeatureFlagBitsKHR = ExternalSemaphoreFeatureFlagBits + +export type SemaphoreImportFlagBitsKHR = SemaphoreImportFlagBits + +export type ExternalFenceHandleTypeFlagBitsKHR = ExternalFenceHandleTypeFlagBits + +export type ExternalFenceFeatureFlagBitsKHR = ExternalFenceFeatureFlagBits + +export type FenceImportFlagBitsKHR = FenceImportFlagBits + +export type PeerMemoryFeatureFlagBitsKHR = PeerMemoryFeatureFlagBits + +export type MemoryAllocateFlagBitsKHR = MemoryAllocateFlagBits + +export type TessellationDomainOriginKHR = TessellationDomainOrigin + +export type SamplerYcbcrModelConversionKHR = SamplerYcbcrModelConversion + +export type SamplerYcbcrRangeKHR = SamplerYcbcrRange + +export type ChromaLocationKHR = ChromaLocation + +export type SamplerReductionModeEXT = SamplerReductionMode + +export type ShaderFloatControlsIndependenceKHR = ShaderFloatControlsIndependence + +export type SubmitFlagBitsKHR = SubmitFlagBits + +export type DriverIdKHR = DriverId \ No newline at end of file diff --git a/api/mod.ts b/api/mod.ts new file mode 100644 index 0000000..d08c350 --- /dev/null +++ b/api/mod.ts @@ -0,0 +1,7 @@ +export * from "./constant.ts"; +export * from "./enum.ts"; +export * from "./def.ts"; +export * from "./struct/common.ts"; +export * from "./union.ts"; +export * from "./cmd.ts"; +export * from "./util.ts"; diff --git a/api/struct/AabbPositionsKHR.ts b/api/struct/AabbPositionsKHR.ts new file mode 100644 index 0000000..aca154f --- /dev/null +++ b/api/struct/AabbPositionsKHR.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitAabbPositionsKHR { + minX?: number; + minY?: number; + minZ?: number; + maxX?: number; + maxY?: number; + maxZ?: number; +} + +export class AabbPositionsKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAabbPositionsKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAabbPositionsKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AabbPositionsKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AabbPositionsKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AabbPositionsKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.minX !== undefined) this.minX = data.minX; + if (data.minY !== undefined) this.minY = data.minY; + if (data.minZ !== undefined) this.minZ = data.minZ; + if (data.maxX !== undefined) this.maxX = data.maxX; + if (data.maxY !== undefined) this.maxY = data.maxY; + if (data.maxZ !== undefined) this.maxZ = data.maxZ; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AabbPositionsKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get minX(): number { + return this.#view.getFloat32(0, LE); + } + + set minX(value: number) { + this.#view.setFloat32(0, Number(value), LE); + } + + get minY(): number { + return this.#view.getFloat32(4, LE); + } + + set minY(value: number) { + this.#view.setFloat32(4, Number(value), LE); + } + + get minZ(): number { + return this.#view.getFloat32(8, LE); + } + + set minZ(value: number) { + this.#view.setFloat32(8, Number(value), LE); + } + + get maxX(): number { + return this.#view.getFloat32(12, LE); + } + + set maxX(value: number) { + this.#view.setFloat32(12, Number(value), LE); + } + + get maxY(): number { + return this.#view.getFloat32(16, LE); + } + + set maxY(value: number) { + this.#view.setFloat32(16, Number(value), LE); + } + + get maxZ(): number { + return this.#view.getFloat32(20, LE); + } + + set maxZ(value: number) { + this.#view.setFloat32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AabbPositionsNV.ts b/api/struct/AabbPositionsNV.ts new file mode 100644 index 0000000..e07dd5e --- /dev/null +++ b/api/struct/AabbPositionsNV.ts @@ -0,0 +1,2 @@ + import { AabbPositionsKHR } from "./AabbPositionsKHR.ts"; + export type AabbPositionsNV = AabbPositionsKHR; \ No newline at end of file diff --git a/api/struct/AccelerationStructureBuildGeometryInfoKHR.ts b/api/struct/AccelerationStructureBuildGeometryInfoKHR.ts new file mode 100644 index 0000000..4062b66 --- /dev/null +++ b/api/struct/AccelerationStructureBuildGeometryInfoKHR.ts @@ -0,0 +1,162 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AccelerationStructureGeometryKHR} from "./AccelerationStructureGeometryKHR.ts"; +import { StructureType, AccelerationStructureTypeKHR, BuildAccelerationStructureModeKHR } from "../enum.ts"; +import { BuildAccelerationStructureFlagsKHR, AccelerationStructureKHR } from "../def.ts"; +import { DeviceOrHostAddressKHR } from "../union.ts"; + +export interface InitAccelerationStructureBuildGeometryInfoKHR { + pNext?: AnyPointer; + type?: AccelerationStructureTypeKHR; + flags?: BuildAccelerationStructureFlagsKHR; + mode?: BuildAccelerationStructureModeKHR; + srcAccelerationStructure?: AccelerationStructureKHR; + dstAccelerationStructure?: AccelerationStructureKHR; + geometryCount?: number; + pGeometries?: AnyPointer; + ppGeometries?: AnyPointer; + scratchData?: DeviceOrHostAddressKHR; +} + +export class AccelerationStructureBuildGeometryInfoKHR implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureBuildGeometryInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureBuildGeometryInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureBuildGeometryInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureBuildGeometryInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureBuildGeometryInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.type !== undefined) this.type = data.type; + if (data.flags !== undefined) this.flags = data.flags; + if (data.mode !== undefined) this.mode = data.mode; + if (data.srcAccelerationStructure !== undefined) this.srcAccelerationStructure = data.srcAccelerationStructure; + if (data.dstAccelerationStructure !== undefined) this.dstAccelerationStructure = data.dstAccelerationStructure; + if (data.geometryCount !== undefined) this.geometryCount = data.geometryCount; + if (data.pGeometries !== undefined) this.pGeometries = data.pGeometries; + if (data.ppGeometries !== undefined) this.ppGeometries = data.ppGeometries; + if (data.scratchData !== undefined) this.scratchData = data.scratchData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureBuildGeometryInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get type(): number { + return this.#view.getUint32(16, LE); + } + + set type(value: AccelerationStructureTypeKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(20, LE); + } + + set flags(value: BuildAccelerationStructureFlagsKHR) { + this.#view.setUint32(20, Number(value), LE); + } + + get mode(): number { + return this.#view.getUint32(24, LE); + } + + set mode(value: BuildAccelerationStructureModeKHR) { + this.#view.setUint32(24, Number(value), LE); + } + + get srcAccelerationStructure(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set srcAccelerationStructure(value: AccelerationStructureKHR) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get dstAccelerationStructure(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set dstAccelerationStructure(value: AccelerationStructureKHR) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get geometryCount(): number { + return this.#view.getUint32(48, LE); + } + + set geometryCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pGeometries(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pGeometries(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get ppGeometries(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set ppGeometries(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } + + get scratchData(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set scratchData(value: DeviceOrHostAddressKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureBuildRangeInfoKHR.ts b/api/struct/AccelerationStructureBuildRangeInfoKHR.ts new file mode 100644 index 0000000..f2d7cb4 --- /dev/null +++ b/api/struct/AccelerationStructureBuildRangeInfoKHR.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitAccelerationStructureBuildRangeInfoKHR { + primitiveCount?: number; + primitiveOffset?: number; + firstVertex?: number; + transformOffset?: number; +} + +export class AccelerationStructureBuildRangeInfoKHR implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureBuildRangeInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureBuildRangeInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureBuildRangeInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureBuildRangeInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureBuildRangeInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.primitiveCount !== undefined) this.primitiveCount = data.primitiveCount; + if (data.primitiveOffset !== undefined) this.primitiveOffset = data.primitiveOffset; + if (data.firstVertex !== undefined) this.firstVertex = data.firstVertex; + if (data.transformOffset !== undefined) this.transformOffset = data.transformOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureBuildRangeInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get primitiveCount(): number { + return this.#view.getUint32(0, LE); + } + + set primitiveCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get primitiveOffset(): number { + return this.#view.getUint32(4, LE); + } + + set primitiveOffset(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get firstVertex(): number { + return this.#view.getUint32(8, LE); + } + + set firstVertex(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get transformOffset(): number { + return this.#view.getUint32(12, LE); + } + + set transformOffset(value: number) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureBuildSizesInfoKHR.ts b/api/struct/AccelerationStructureBuildSizesInfoKHR.ts new file mode 100644 index 0000000..cbba9eb --- /dev/null +++ b/api/struct/AccelerationStructureBuildSizesInfoKHR.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitAccelerationStructureBuildSizesInfoKHR { + pNext?: AnyPointer; + accelerationStructureSize?: DeviceSize; + updateScratchSize?: DeviceSize; + buildScratchSize?: DeviceSize; +} + +export class AccelerationStructureBuildSizesInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureBuildSizesInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureBuildSizesInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureBuildSizesInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureBuildSizesInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureBuildSizesInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.accelerationStructureSize !== undefined) this.accelerationStructureSize = data.accelerationStructureSize; + if (data.updateScratchSize !== undefined) this.updateScratchSize = data.updateScratchSize; + if (data.buildScratchSize !== undefined) this.buildScratchSize = data.buildScratchSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureBuildSizesInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get accelerationStructureSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set accelerationStructureSize(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get updateScratchSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set updateScratchSize(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get buildScratchSize(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set buildScratchSize(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureCaptureDescriptorDataInfoEXT.ts b/api/struct/AccelerationStructureCaptureDescriptorDataInfoEXT.ts new file mode 100644 index 0000000..b71c4fe --- /dev/null +++ b/api/struct/AccelerationStructureCaptureDescriptorDataInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AccelerationStructureKHR, AccelerationStructureNV } from "../def.ts"; + +export interface InitAccelerationStructureCaptureDescriptorDataInfoEXT { + pNext?: AnyPointer; + accelerationStructure?: AccelerationStructureKHR; + accelerationStructureNV?: AccelerationStructureNV; +} + +export class AccelerationStructureCaptureDescriptorDataInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureCaptureDescriptorDataInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureCaptureDescriptorDataInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureCaptureDescriptorDataInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; + if (data.accelerationStructureNV !== undefined) this.accelerationStructureNV = data.accelerationStructureNV; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureCaptureDescriptorDataInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get accelerationStructure(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set accelerationStructure(value: AccelerationStructureKHR) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get accelerationStructureNV(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set accelerationStructureNV(value: AccelerationStructureNV) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureCreateInfoKHR.ts b/api/struct/AccelerationStructureCreateInfoKHR.ts new file mode 100644 index 0000000..3ee30f8 --- /dev/null +++ b/api/struct/AccelerationStructureCreateInfoKHR.ts @@ -0,0 +1,130 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, AccelerationStructureTypeKHR } from "../enum.ts"; +import { AccelerationStructureCreateFlagsKHR, Buffer, DeviceSize, DeviceAddress } from "../def.ts"; + +export interface InitAccelerationStructureCreateInfoKHR { + pNext?: AnyPointer; + createFlags?: AccelerationStructureCreateFlagsKHR; + buffer?: Buffer; + offset?: DeviceSize; + size?: DeviceSize; + type?: AccelerationStructureTypeKHR; + deviceAddress?: DeviceAddress; +} + +export class AccelerationStructureCreateInfoKHR implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.createFlags !== undefined) this.createFlags = data.createFlags; + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.offset !== undefined) this.offset = data.offset; + if (data.size !== undefined) this.size = data.size; + if (data.type !== undefined) this.type = data.type; + if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get createFlags(): number { + return this.#view.getUint32(16, LE); + } + + set createFlags(value: AccelerationStructureCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get type(): number { + return this.#view.getUint32(48, LE); + } + + set type(value: AccelerationStructureTypeKHR) { + this.#view.setUint32(48, Number(value), LE); + } + + get deviceAddress(): bigint { + return this.#view.getBigUint64(56, LE); + } + + set deviceAddress(value: DeviceAddress) { + this.#view.setBigUint64(56, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureCreateInfoNV.ts b/api/struct/AccelerationStructureCreateInfoNV.ts new file mode 100644 index 0000000..dd5a912 --- /dev/null +++ b/api/struct/AccelerationStructureCreateInfoNV.ts @@ -0,0 +1,94 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AccelerationStructureInfoNV} from "./AccelerationStructureInfoNV.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitAccelerationStructureCreateInfoNV { + pNext?: AnyPointer; + compactedSize?: DeviceSize; + info?: AccelerationStructureInfoNV; +} + +export class AccelerationStructureCreateInfoNV implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.compactedSize !== undefined) this.compactedSize = data.compactedSize; + if (data.info !== undefined) this.info = data.info; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get compactedSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set compactedSize(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get info(): AccelerationStructureInfoNV { + return new AccelerationStructureInfoNV(this.#data.subarray(24, 24 + AccelerationStructureInfoNV.size)); + } + + set info(value: AccelerationStructureInfoNV) { + if (value[BUFFER].byteLength < AccelerationStructureInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureDeviceAddressInfoKHR.ts b/api/struct/AccelerationStructureDeviceAddressInfoKHR.ts new file mode 100644 index 0000000..38bb452 --- /dev/null +++ b/api/struct/AccelerationStructureDeviceAddressInfoKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AccelerationStructureKHR } from "../def.ts"; + +export interface InitAccelerationStructureDeviceAddressInfoKHR { + pNext?: AnyPointer; + accelerationStructure?: AccelerationStructureKHR; +} + +export class AccelerationStructureDeviceAddressInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureDeviceAddressInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureDeviceAddressInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureDeviceAddressInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureDeviceAddressInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureDeviceAddressInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureDeviceAddressInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get accelerationStructure(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set accelerationStructure(value: AccelerationStructureKHR) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureGeometryAabbsDataKHR.ts b/api/struct/AccelerationStructureGeometryAabbsDataKHR.ts new file mode 100644 index 0000000..a675053 --- /dev/null +++ b/api/struct/AccelerationStructureGeometryAabbsDataKHR.ts @@ -0,0 +1,91 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; +import { DeviceOrHostAddressConstKHR } from "../union.ts"; + +export interface InitAccelerationStructureGeometryAabbsDataKHR { + pNext?: AnyPointer; + data?: DeviceOrHostAddressConstKHR; + stride?: DeviceSize; +} + +export class AccelerationStructureGeometryAabbsDataKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureGeometryAabbsDataKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryAabbsDataKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureGeometryAabbsDataKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureGeometryAabbsDataKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureGeometryAabbsDataKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.data !== undefined) this.data = data.data; + if (data.stride !== undefined) this.stride = data.stride; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryAabbsDataKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get data(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set data(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get stride(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set stride(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureGeometryInstancesDataKHR.ts b/api/struct/AccelerationStructureGeometryInstancesDataKHR.ts new file mode 100644 index 0000000..595e462 --- /dev/null +++ b/api/struct/AccelerationStructureGeometryInstancesDataKHR.ts @@ -0,0 +1,91 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; +import { DeviceOrHostAddressConstKHR } from "../union.ts"; + +export interface InitAccelerationStructureGeometryInstancesDataKHR { + pNext?: AnyPointer; + arrayOfPointers?: Bool32; + data?: DeviceOrHostAddressConstKHR; +} + +export class AccelerationStructureGeometryInstancesDataKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureGeometryInstancesDataKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryInstancesDataKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureGeometryInstancesDataKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureGeometryInstancesDataKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureGeometryInstancesDataKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.arrayOfPointers !== undefined) this.arrayOfPointers = data.arrayOfPointers; + if (data.data !== undefined) this.data = data.data; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryInstancesDataKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get arrayOfPointers(): number { + return this.#view.getUint32(16, LE); + } + + set arrayOfPointers(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get data(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set data(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureGeometryKHR.ts b/api/struct/AccelerationStructureGeometryKHR.ts new file mode 100644 index 0000000..c4ee43f --- /dev/null +++ b/api/struct/AccelerationStructureGeometryKHR.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, GeometryTypeKHR } from "../enum.ts"; +import { GeometryFlagsKHR } from "../def.ts"; +import { AccelerationStructureGeometryDataKHR } from "../union.ts"; + +export interface InitAccelerationStructureGeometryKHR { + pNext?: AnyPointer; + geometryType?: GeometryTypeKHR; + geometry?: AccelerationStructureGeometryDataKHR; + flags?: GeometryFlagsKHR; +} + +export class AccelerationStructureGeometryKHR implements BaseStruct { + static size = 192; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureGeometryKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureGeometryKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureGeometryKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureGeometryKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.geometryType !== undefined) this.geometryType = data.geometryType; + if (data.geometry !== undefined) this.geometry = data.geometry; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get geometryType(): number { + return this.#view.getUint32(16, LE); + } + + set geometryType(value: GeometryTypeKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get geometry(): unknown { + throw new Error(`Unknown type: {"union":[{"struct":["u32","buffer","u32",{"union":["u64","buffer"]},"u64","u32","u32",{"union":["u64","buffer"]},{"union":["u64","buffer"]}]},{"struct":["u32","buffer",{"union":["u64","buffer"]},"u64"]},{"struct":["u32","buffer","u32",{"union":["u64","buffer"]}]}]}`); + } + + set geometry(value: AccelerationStructureGeometryDataKHR) { + throw new Error(`Unknown type: {"union":[{"struct":["u32","buffer","u32",{"union":["u64","buffer"]},"u64","u32","u32",{"union":["u64","buffer"]},{"union":["u64","buffer"]}]},{"struct":["u32","buffer",{"union":["u64","buffer"]},"u64"]},{"struct":["u32","buffer","u32",{"union":["u64","buffer"]}]}]}`); + } + + get flags(): number { + return this.#view.getUint32(128, LE); + } + + set flags(value: GeometryFlagsKHR) { + this.#view.setUint32(128, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureGeometryMotionTrianglesDataNV.ts b/api/struct/AccelerationStructureGeometryMotionTrianglesDataNV.ts new file mode 100644 index 0000000..5bbffc4 --- /dev/null +++ b/api/struct/AccelerationStructureGeometryMotionTrianglesDataNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceOrHostAddressConstKHR } from "../union.ts"; + +export interface InitAccelerationStructureGeometryMotionTrianglesDataNV { + pNext?: AnyPointer; + vertexData?: DeviceOrHostAddressConstKHR; +} + +export class AccelerationStructureGeometryMotionTrianglesDataNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureGeometryMotionTrianglesDataNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryMotionTrianglesDataNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureGeometryMotionTrianglesDataNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureGeometryMotionTrianglesDataNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureGeometryMotionTrianglesDataNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.vertexData !== undefined) this.vertexData = data.vertexData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryMotionTrianglesDataNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get vertexData(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set vertexData(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureGeometryTrianglesDataKHR.ts b/api/struct/AccelerationStructureGeometryTrianglesDataKHR.ts new file mode 100644 index 0000000..eadd049 --- /dev/null +++ b/api/struct/AccelerationStructureGeometryTrianglesDataKHR.ts @@ -0,0 +1,141 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format, IndexType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; +import { DeviceOrHostAddressConstKHR } from "../union.ts"; + +export interface InitAccelerationStructureGeometryTrianglesDataKHR { + pNext?: AnyPointer; + vertexFormat?: Format; + vertexData?: DeviceOrHostAddressConstKHR; + vertexStride?: DeviceSize; + maxVertex?: number; + indexType?: IndexType; + indexData?: DeviceOrHostAddressConstKHR; + transformData?: DeviceOrHostAddressConstKHR; +} + +export class AccelerationStructureGeometryTrianglesDataKHR implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureGeometryTrianglesDataKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryTrianglesDataKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureGeometryTrianglesDataKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureGeometryTrianglesDataKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureGeometryTrianglesDataKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.vertexFormat !== undefined) this.vertexFormat = data.vertexFormat; + if (data.vertexData !== undefined) this.vertexData = data.vertexData; + if (data.vertexStride !== undefined) this.vertexStride = data.vertexStride; + if (data.maxVertex !== undefined) this.maxVertex = data.maxVertex; + if (data.indexType !== undefined) this.indexType = data.indexType; + if (data.indexData !== undefined) this.indexData = data.indexData; + if (data.transformData !== undefined) this.transformData = data.transformData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryTrianglesDataKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get vertexFormat(): number { + return this.#view.getUint32(16, LE); + } + + set vertexFormat(value: Format) { + this.#view.setUint32(16, Number(value), LE); + } + + get vertexData(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set vertexData(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get vertexStride(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set vertexStride(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get maxVertex(): number { + return this.#view.getUint32(40, LE); + } + + set maxVertex(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get indexType(): number { + return this.#view.getUint32(44, LE); + } + + set indexType(value: IndexType) { + this.#view.setUint32(44, Number(value), LE); + } + + get indexData(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set indexData(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get transformData(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set transformData(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureInfoNV.ts b/api/struct/AccelerationStructureInfoNV.ts new file mode 100644 index 0000000..f5b7867 --- /dev/null +++ b/api/struct/AccelerationStructureInfoNV.ts @@ -0,0 +1,121 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {GeometryNV} from "./GeometryNV.ts"; +import { StructureType, AccelerationStructureTypeNV } from "../enum.ts"; +import { BuildAccelerationStructureFlagsNV } from "../def.ts"; + +export interface InitAccelerationStructureInfoNV { + pNext?: AnyPointer; + type?: AccelerationStructureTypeNV; + flags?: BuildAccelerationStructureFlagsNV; + instanceCount?: number; + geometryCount?: number; + pGeometries?: AnyPointer; +} + +export class AccelerationStructureInfoNV implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.type !== undefined) this.type = data.type; + if (data.flags !== undefined) this.flags = data.flags; + if (data.instanceCount !== undefined) this.instanceCount = data.instanceCount; + if (data.geometryCount !== undefined) this.geometryCount = data.geometryCount; + if (data.pGeometries !== undefined) this.pGeometries = data.pGeometries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get type(): number { + return this.#view.getUint32(16, LE); + } + + set type(value: AccelerationStructureTypeNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(20, LE); + } + + set flags(value: BuildAccelerationStructureFlagsNV) { + this.#view.setUint32(20, Number(value), LE); + } + + get instanceCount(): number { + return this.#view.getUint32(24, LE); + } + + set instanceCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get geometryCount(): number { + return this.#view.getUint32(28, LE); + } + + set geometryCount(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get pGeometries(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pGeometries(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureInstanceKHR.ts b/api/struct/AccelerationStructureInstanceKHR.ts new file mode 100644 index 0000000..e48da52 --- /dev/null +++ b/api/struct/AccelerationStructureInstanceKHR.ts @@ -0,0 +1,114 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {TransformMatrixKHR} from "./TransformMatrixKHR.ts"; +import { GeometryInstanceFlagsKHR } from "../def.ts"; + +export interface InitAccelerationStructureInstanceKHR { + transform?: TransformMatrixKHR; + instanceCustomIndex?: number; + mask?: number; + instanceShaderBindingTableRecordOffset?: number; + flags?: GeometryInstanceFlagsKHR; + accelerationStructureReference?: number | bigint; +} + +export class AccelerationStructureInstanceKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureInstanceKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureInstanceKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureInstanceKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureInstanceKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureInstanceKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.transform !== undefined) this.transform = data.transform; + if (data.instanceCustomIndex !== undefined) this.instanceCustomIndex = data.instanceCustomIndex; + if (data.mask !== undefined) this.mask = data.mask; + if (data.instanceShaderBindingTableRecordOffset !== undefined) this.instanceShaderBindingTableRecordOffset = data.instanceShaderBindingTableRecordOffset; + if (data.flags !== undefined) this.flags = data.flags; + if (data.accelerationStructureReference !== undefined) this.accelerationStructureReference = data.accelerationStructureReference; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureInstanceKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get transform(): TransformMatrixKHR { + return new TransformMatrixKHR(this.#data.subarray(0, 0 + TransformMatrixKHR.size)); + } + + set transform(value: TransformMatrixKHR) { + if (value[BUFFER].byteLength < TransformMatrixKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get instanceCustomIndex(): number { + return this.#view.getUint32(4, LE); + } + + set instanceCustomIndex(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get mask(): number { + return this.#view.getUint32(8, LE); + } + + set mask(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get instanceShaderBindingTableRecordOffset(): number { + return this.#view.getUint32(12, LE); + } + + set instanceShaderBindingTableRecordOffset(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: GeometryInstanceFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get accelerationStructureReference(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set accelerationStructureReference(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureInstanceNV.ts b/api/struct/AccelerationStructureInstanceNV.ts new file mode 100644 index 0000000..62a9fff --- /dev/null +++ b/api/struct/AccelerationStructureInstanceNV.ts @@ -0,0 +1,2 @@ + import { AccelerationStructureInstanceKHR } from "./AccelerationStructureInstanceKHR.ts"; + export type AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR; \ No newline at end of file diff --git a/api/struct/AccelerationStructureMatrixMotionInstanceNV.ts b/api/struct/AccelerationStructureMatrixMotionInstanceNV.ts new file mode 100644 index 0000000..7f23c43 --- /dev/null +++ b/api/struct/AccelerationStructureMatrixMotionInstanceNV.ts @@ -0,0 +1,127 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {TransformMatrixKHR} from "./TransformMatrixKHR.ts"; +import { GeometryInstanceFlagsKHR } from "../def.ts"; + +export interface InitAccelerationStructureMatrixMotionInstanceNV { + transformT0?: TransformMatrixKHR; + transformT1?: TransformMatrixKHR; + instanceCustomIndex?: number; + mask?: number; + instanceShaderBindingTableRecordOffset?: number; + flags?: GeometryInstanceFlagsKHR; + accelerationStructureReference?: number | bigint; +} + +export class AccelerationStructureMatrixMotionInstanceNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureMatrixMotionInstanceNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureMatrixMotionInstanceNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureMatrixMotionInstanceNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureMatrixMotionInstanceNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureMatrixMotionInstanceNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.transformT0 !== undefined) this.transformT0 = data.transformT0; + if (data.transformT1 !== undefined) this.transformT1 = data.transformT1; + if (data.instanceCustomIndex !== undefined) this.instanceCustomIndex = data.instanceCustomIndex; + if (data.mask !== undefined) this.mask = data.mask; + if (data.instanceShaderBindingTableRecordOffset !== undefined) this.instanceShaderBindingTableRecordOffset = data.instanceShaderBindingTableRecordOffset; + if (data.flags !== undefined) this.flags = data.flags; + if (data.accelerationStructureReference !== undefined) this.accelerationStructureReference = data.accelerationStructureReference; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMatrixMotionInstanceNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get transformT0(): TransformMatrixKHR { + return new TransformMatrixKHR(this.#data.subarray(0, 0 + TransformMatrixKHR.size)); + } + + set transformT0(value: TransformMatrixKHR) { + if (value[BUFFER].byteLength < TransformMatrixKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get transformT1(): TransformMatrixKHR { + return new TransformMatrixKHR(this.#data.subarray(4, 4 + TransformMatrixKHR.size)); + } + + set transformT1(value: TransformMatrixKHR) { + if (value[BUFFER].byteLength < TransformMatrixKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 4); + } + + get instanceCustomIndex(): number { + return this.#view.getUint32(8, LE); + } + + set instanceCustomIndex(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get mask(): number { + return this.#view.getUint32(12, LE); + } + + set mask(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get instanceShaderBindingTableRecordOffset(): number { + return this.#view.getUint32(16, LE); + } + + set instanceShaderBindingTableRecordOffset(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(20, LE); + } + + set flags(value: GeometryInstanceFlagsKHR) { + this.#view.setUint32(20, Number(value), LE); + } + + get accelerationStructureReference(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set accelerationStructureReference(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureMemoryRequirementsInfoNV.ts b/api/struct/AccelerationStructureMemoryRequirementsInfoNV.ts new file mode 100644 index 0000000..ac942b3 --- /dev/null +++ b/api/struct/AccelerationStructureMemoryRequirementsInfoNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, AccelerationStructureMemoryRequirementsTypeNV } from "../enum.ts"; +import { AccelerationStructureNV } from "../def.ts"; + +export interface InitAccelerationStructureMemoryRequirementsInfoNV { + pNext?: AnyPointer; + type?: AccelerationStructureMemoryRequirementsTypeNV; + accelerationStructure?: AccelerationStructureNV; +} + +export class AccelerationStructureMemoryRequirementsInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureMemoryRequirementsInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureMemoryRequirementsInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureMemoryRequirementsInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureMemoryRequirementsInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureMemoryRequirementsInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.type !== undefined) this.type = data.type; + if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMemoryRequirementsInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get type(): number { + return this.#view.getUint32(16, LE); + } + + set type(value: AccelerationStructureMemoryRequirementsTypeNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get accelerationStructure(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set accelerationStructure(value: AccelerationStructureNV) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureMotionInfoNV.ts b/api/struct/AccelerationStructureMotionInfoNV.ts new file mode 100644 index 0000000..fc06f97 --- /dev/null +++ b/api/struct/AccelerationStructureMotionInfoNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AccelerationStructureMotionInfoFlagsNV } from "../def.ts"; + +export interface InitAccelerationStructureMotionInfoNV { + pNext?: AnyPointer; + maxInstances?: number; + flags?: AccelerationStructureMotionInfoFlagsNV; +} + +export class AccelerationStructureMotionInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureMotionInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureMotionInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureMotionInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureMotionInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureMotionInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxInstances !== undefined) this.maxInstances = data.maxInstances; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMotionInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_MOTION_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxInstances(): number { + return this.#view.getUint32(16, LE); + } + + set maxInstances(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(20, LE); + } + + set flags(value: AccelerationStructureMotionInfoFlagsNV) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureMotionInstanceNV.ts b/api/struct/AccelerationStructureMotionInstanceNV.ts new file mode 100644 index 0000000..57c94db --- /dev/null +++ b/api/struct/AccelerationStructureMotionInstanceNV.ts @@ -0,0 +1,82 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { AccelerationStructureMotionInstanceTypeNV } from "../enum.ts"; +import { AccelerationStructureMotionInstanceFlagsNV } from "../def.ts"; +import { AccelerationStructureMotionInstanceDataNV } from "../union.ts"; + +export interface InitAccelerationStructureMotionInstanceNV { + type?: AccelerationStructureMotionInstanceTypeNV; + flags?: AccelerationStructureMotionInstanceFlagsNV; + data?: AccelerationStructureMotionInstanceDataNV; +} + +export class AccelerationStructureMotionInstanceNV implements BaseStruct { + static size = 304; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureMotionInstanceNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureMotionInstanceNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureMotionInstanceNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureMotionInstanceNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureMotionInstanceNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.type !== undefined) this.type = data.type; + if (data.flags !== undefined) this.flags = data.flags; + if (data.data !== undefined) this.data = data.data; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMotionInstanceNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get type(): number { + return this.#view.getUint32(0, LE); + } + + set type(value: AccelerationStructureMotionInstanceTypeNV) { + this.#view.setUint32(0, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(4, LE); + } + + set flags(value: AccelerationStructureMotionInstanceFlagsNV) { + this.#view.setUint32(4, Number(value), LE); + } + + get data(): unknown { + throw new Error(`Unknown type: {"union":[{"struct":[{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32"]},{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},"u32","u32","u32","u32","u64"]}]}`); + } + + set data(value: AccelerationStructureMotionInstanceDataNV) { + throw new Error(`Unknown type: {"union":[{"struct":[{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32"]},{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},"u32","u32","u32","u32","u64"]}]}`); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureSRTMotionInstanceNV.ts b/api/struct/AccelerationStructureSRTMotionInstanceNV.ts new file mode 100644 index 0000000..77e0cd2 --- /dev/null +++ b/api/struct/AccelerationStructureSRTMotionInstanceNV.ts @@ -0,0 +1,127 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SRTDataNV} from "./SRTDataNV.ts"; +import { GeometryInstanceFlagsKHR } from "../def.ts"; + +export interface InitAccelerationStructureSRTMotionInstanceNV { + transformT0?: SRTDataNV; + transformT1?: SRTDataNV; + instanceCustomIndex?: number; + mask?: number; + instanceShaderBindingTableRecordOffset?: number; + flags?: GeometryInstanceFlagsKHR; + accelerationStructureReference?: number | bigint; +} + +export class AccelerationStructureSRTMotionInstanceNV implements BaseStruct { + static size = 152; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureSRTMotionInstanceNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureSRTMotionInstanceNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureSRTMotionInstanceNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureSRTMotionInstanceNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureSRTMotionInstanceNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.transformT0 !== undefined) this.transformT0 = data.transformT0; + if (data.transformT1 !== undefined) this.transformT1 = data.transformT1; + if (data.instanceCustomIndex !== undefined) this.instanceCustomIndex = data.instanceCustomIndex; + if (data.mask !== undefined) this.mask = data.mask; + if (data.instanceShaderBindingTableRecordOffset !== undefined) this.instanceShaderBindingTableRecordOffset = data.instanceShaderBindingTableRecordOffset; + if (data.flags !== undefined) this.flags = data.flags; + if (data.accelerationStructureReference !== undefined) this.accelerationStructureReference = data.accelerationStructureReference; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureSRTMotionInstanceNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get transformT0(): SRTDataNV { + return new SRTDataNV(this.#data.subarray(0, 0 + SRTDataNV.size)); + } + + set transformT0(value: SRTDataNV) { + if (value[BUFFER].byteLength < SRTDataNV.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get transformT1(): SRTDataNV { + return new SRTDataNV(this.#data.subarray(64, 64 + SRTDataNV.size)); + } + + set transformT1(value: SRTDataNV) { + if (value[BUFFER].byteLength < SRTDataNV.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 64); + } + + get instanceCustomIndex(): number { + return this.#view.getUint32(128, LE); + } + + set instanceCustomIndex(value: number) { + this.#view.setUint32(128, Number(value), LE); + } + + get mask(): number { + return this.#view.getUint32(132, LE); + } + + set mask(value: number) { + this.#view.setUint32(132, Number(value), LE); + } + + get instanceShaderBindingTableRecordOffset(): number { + return this.#view.getUint32(136, LE); + } + + set instanceShaderBindingTableRecordOffset(value: number) { + this.#view.setUint32(136, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(140, LE); + } + + set flags(value: GeometryInstanceFlagsKHR) { + this.#view.setUint32(140, Number(value), LE); + } + + get accelerationStructureReference(): bigint { + return this.#view.getBigUint64(144, LE); + } + + set accelerationStructureReference(value: number | bigint) { + this.#view.setBigUint64(144, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureTrianglesOpacityMicromapEXT.ts b/api/struct/AccelerationStructureTrianglesOpacityMicromapEXT.ts new file mode 100644 index 0000000..637e034 --- /dev/null +++ b/api/struct/AccelerationStructureTrianglesOpacityMicromapEXT.ts @@ -0,0 +1,152 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {MicromapUsageEXT} from "./MicromapUsageEXT.ts"; +import { StructureType, IndexType } from "../enum.ts"; +import { DeviceSize, MicromapEXT } from "../def.ts"; +import { DeviceOrHostAddressConstKHR } from "../union.ts"; + +export interface InitAccelerationStructureTrianglesOpacityMicromapEXT { + pNext?: AnyPointer; + indexType?: IndexType; + indexBuffer?: DeviceOrHostAddressConstKHR; + indexStride?: DeviceSize; + baseTriangle?: number; + usageCountsCount?: number; + pUsageCounts?: AnyPointer; + ppUsageCounts?: AnyPointer; + micromap?: MicromapEXT; +} + +export class AccelerationStructureTrianglesOpacityMicromapEXT implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureTrianglesOpacityMicromapEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureTrianglesOpacityMicromapEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureTrianglesOpacityMicromapEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureTrianglesOpacityMicromapEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureTrianglesOpacityMicromapEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.indexType !== undefined) this.indexType = data.indexType; + if (data.indexBuffer !== undefined) this.indexBuffer = data.indexBuffer; + if (data.indexStride !== undefined) this.indexStride = data.indexStride; + if (data.baseTriangle !== undefined) this.baseTriangle = data.baseTriangle; + if (data.usageCountsCount !== undefined) this.usageCountsCount = data.usageCountsCount; + if (data.pUsageCounts !== undefined) this.pUsageCounts = data.pUsageCounts; + if (data.ppUsageCounts !== undefined) this.ppUsageCounts = data.ppUsageCounts; + if (data.micromap !== undefined) this.micromap = data.micromap; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureTrianglesOpacityMicromapEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get indexType(): number { + return this.#view.getUint32(16, LE); + } + + set indexType(value: IndexType) { + this.#view.setUint32(16, Number(value), LE); + } + + get indexBuffer(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set indexBuffer(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get indexStride(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set indexStride(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get baseTriangle(): number { + return this.#view.getUint32(40, LE); + } + + set baseTriangle(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get usageCountsCount(): number { + return this.#view.getUint32(44, LE); + } + + set usageCountsCount(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get pUsageCounts(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pUsageCounts(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get ppUsageCounts(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set ppUsageCounts(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get micromap(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set micromap(value: MicromapEXT) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/AccelerationStructureVersionInfoKHR.ts b/api/struct/AccelerationStructureVersionInfoKHR.ts new file mode 100644 index 0000000..8c7dad5 --- /dev/null +++ b/api/struct/AccelerationStructureVersionInfoKHR.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitAccelerationStructureVersionInfoKHR { + pNext?: AnyPointer; + pVersionData?: AnyPointer; +} + +export class AccelerationStructureVersionInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAccelerationStructureVersionInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureVersionInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AccelerationStructureVersionInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AccelerationStructureVersionInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AccelerationStructureVersionInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pVersionData !== undefined) this.pVersionData = data.pVersionData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureVersionInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACCELERATION_STRUCTURE_VERSION_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pVersionData(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pVersionData(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/AcquireNextImageInfoKHR.ts b/api/struct/AcquireNextImageInfoKHR.ts new file mode 100644 index 0000000..5108480 --- /dev/null +++ b/api/struct/AcquireNextImageInfoKHR.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { SwapchainKHR, Semaphore, Fence } from "../def.ts"; + +export interface InitAcquireNextImageInfoKHR { + pNext?: AnyPointer; + swapchain?: SwapchainKHR; + timeout?: number | bigint; + semaphore?: Semaphore; + fence?: Fence; + deviceMask?: number; +} + +export class AcquireNextImageInfoKHR implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAcquireNextImageInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAcquireNextImageInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AcquireNextImageInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AcquireNextImageInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AcquireNextImageInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.swapchain !== undefined) this.swapchain = data.swapchain; + if (data.timeout !== undefined) this.timeout = data.timeout; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.fence !== undefined) this.fence = data.fence; + if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AcquireNextImageInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACQUIRE_NEXT_IMAGE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get swapchain(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set swapchain(value: SwapchainKHR) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get timeout(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set timeout(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get fence(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set fence(value: Fence) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get deviceMask(): number { + return this.#view.getUint32(48, LE); + } + + set deviceMask(value: number) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AcquireProfilingLockInfoKHR.ts b/api/struct/AcquireProfilingLockInfoKHR.ts new file mode 100644 index 0000000..da96d6a --- /dev/null +++ b/api/struct/AcquireProfilingLockInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AcquireProfilingLockFlagsKHR } from "../def.ts"; + +export interface InitAcquireProfilingLockInfoKHR { + pNext?: AnyPointer; + flags?: AcquireProfilingLockFlagsKHR; + timeout?: number | bigint; +} + +export class AcquireProfilingLockInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAcquireProfilingLockInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAcquireProfilingLockInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AcquireProfilingLockInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AcquireProfilingLockInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AcquireProfilingLockInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.timeout !== undefined) this.timeout = data.timeout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AcquireProfilingLockInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ACQUIRE_PROFILING_LOCK_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: AcquireProfilingLockFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get timeout(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set timeout(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AllocationCallbacks.ts b/api/struct/AllocationCallbacks.ts new file mode 100644 index 0000000..aafd983 --- /dev/null +++ b/api/struct/AllocationCallbacks.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitAllocationCallbacks { + pUserData?: AnyPointer; + pfnAllocation?: Deno.PointerValue; + pfnReallocation?: Deno.PointerValue; + pfnFree?: Deno.PointerValue; + pfnInternalAllocation?: Deno.PointerValue; + pfnInternalFree?: Deno.PointerValue; +} + +export class AllocationCallbacks implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAllocationCallbacks); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAllocationCallbacks) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AllocationCallbacks.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AllocationCallbacks.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AllocationCallbacks.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pUserData !== undefined) this.pUserData = data.pUserData; + if (data.pfnAllocation !== undefined) this.pfnAllocation = data.pfnAllocation; + if (data.pfnReallocation !== undefined) this.pfnReallocation = data.pfnReallocation; + if (data.pfnFree !== undefined) this.pfnFree = data.pfnFree; + if (data.pfnInternalAllocation !== undefined) this.pfnInternalAllocation = data.pfnInternalAllocation; + if (data.pfnInternalFree !== undefined) this.pfnInternalFree = data.pfnInternalFree; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AllocationCallbacks.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get pUserData(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set pUserData(value: AnyPointer) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get pfnAllocation(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pfnAllocation(value: Deno.PointerValue) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pfnReallocation(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pfnReallocation(value: Deno.PointerValue) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get pfnFree(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pfnFree(value: Deno.PointerValue) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pfnInternalAllocation(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pfnInternalAllocation(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pfnInternalFree(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pfnInternalFree(value: Deno.PointerValue) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/AmigoProfilingSubmitInfoSEC.ts b/api/struct/AmigoProfilingSubmitInfoSEC.ts new file mode 100644 index 0000000..f7c6837 --- /dev/null +++ b/api/struct/AmigoProfilingSubmitInfoSEC.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitAmigoProfilingSubmitInfoSEC { + pNext?: AnyPointer; + firstDrawTimestamp?: number | bigint; + swapBufferTimestamp?: number | bigint; +} + +export class AmigoProfilingSubmitInfoSEC implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAmigoProfilingSubmitInfoSEC); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAmigoProfilingSubmitInfoSEC) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AmigoProfilingSubmitInfoSEC.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AmigoProfilingSubmitInfoSEC.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AmigoProfilingSubmitInfoSEC.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.firstDrawTimestamp !== undefined) this.firstDrawTimestamp = data.firstDrawTimestamp; + if (data.swapBufferTimestamp !== undefined) this.swapBufferTimestamp = data.swapBufferTimestamp; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AmigoProfilingSubmitInfoSEC.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.AMIGO_PROFILING_SUBMIT_INFO_SEC; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get firstDrawTimestamp(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set firstDrawTimestamp(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get swapBufferTimestamp(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set swapBufferTimestamp(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AndroidHardwareBufferFormatProperties2ANDROID.ts b/api/struct/AndroidHardwareBufferFormatProperties2ANDROID.ts new file mode 100644 index 0000000..26932cd --- /dev/null +++ b/api/struct/AndroidHardwareBufferFormatProperties2ANDROID.ts @@ -0,0 +1,154 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ComponentMapping} from "./ComponentMapping.ts"; +import { StructureType, Format, SamplerYcbcrModelConversion, SamplerYcbcrRange, ChromaLocation } from "../enum.ts"; +import { FormatFeatureFlags2 } from "../def.ts"; + +export interface InitAndroidHardwareBufferFormatProperties2ANDROID { + pNext?: AnyPointer; + format?: Format; + externalFormat?: number | bigint; + formatFeatures?: FormatFeatureFlags2; + samplerYcbcrConversionComponents?: ComponentMapping; + suggestedYcbcrModel?: SamplerYcbcrModelConversion; + suggestedYcbcrRange?: SamplerYcbcrRange; + suggestedXChromaOffset?: ChromaLocation; + suggestedYChromaOffset?: ChromaLocation; +} + +export class AndroidHardwareBufferFormatProperties2ANDROID implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAndroidHardwareBufferFormatProperties2ANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidHardwareBufferFormatProperties2ANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AndroidHardwareBufferFormatProperties2ANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AndroidHardwareBufferFormatProperties2ANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AndroidHardwareBufferFormatProperties2ANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.format !== undefined) this.format = data.format; + if (data.externalFormat !== undefined) this.externalFormat = data.externalFormat; + if (data.formatFeatures !== undefined) this.formatFeatures = data.formatFeatures; + if (data.samplerYcbcrConversionComponents !== undefined) this.samplerYcbcrConversionComponents = data.samplerYcbcrConversionComponents; + if (data.suggestedYcbcrModel !== undefined) this.suggestedYcbcrModel = data.suggestedYcbcrModel; + if (data.suggestedYcbcrRange !== undefined) this.suggestedYcbcrRange = data.suggestedYcbcrRange; + if (data.suggestedXChromaOffset !== undefined) this.suggestedXChromaOffset = data.suggestedXChromaOffset; + if (data.suggestedYChromaOffset !== undefined) this.suggestedYChromaOffset = data.suggestedYChromaOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferFormatProperties2ANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get format(): number { + return this.#view.getUint32(16, LE); + } + + set format(value: Format) { + this.#view.setUint32(16, Number(value), LE); + } + + get externalFormat(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set externalFormat(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get formatFeatures(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set formatFeatures(value: FormatFeatureFlags2) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get samplerYcbcrConversionComponents(): ComponentMapping { + return new ComponentMapping(this.#data.subarray(40, 40 + ComponentMapping.size)); + } + + set samplerYcbcrConversionComponents(value: ComponentMapping) { + if (value[BUFFER].byteLength < ComponentMapping.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } + + get suggestedYcbcrModel(): number { + return this.#view.getUint32(56, LE); + } + + set suggestedYcbcrModel(value: SamplerYcbcrModelConversion) { + this.#view.setUint32(56, Number(value), LE); + } + + get suggestedYcbcrRange(): number { + return this.#view.getUint32(60, LE); + } + + set suggestedYcbcrRange(value: SamplerYcbcrRange) { + this.#view.setUint32(60, Number(value), LE); + } + + get suggestedXChromaOffset(): number { + return this.#view.getUint32(64, LE); + } + + set suggestedXChromaOffset(value: ChromaLocation) { + this.#view.setUint32(64, Number(value), LE); + } + + get suggestedYChromaOffset(): number { + return this.#view.getUint32(68, LE); + } + + set suggestedYChromaOffset(value: ChromaLocation) { + this.#view.setUint32(68, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AndroidHardwareBufferFormatPropertiesANDROID.ts b/api/struct/AndroidHardwareBufferFormatPropertiesANDROID.ts new file mode 100644 index 0000000..ac458f8 --- /dev/null +++ b/api/struct/AndroidHardwareBufferFormatPropertiesANDROID.ts @@ -0,0 +1,154 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ComponentMapping} from "./ComponentMapping.ts"; +import { StructureType, Format, SamplerYcbcrModelConversion, SamplerYcbcrRange, ChromaLocation } from "../enum.ts"; +import { FormatFeatureFlags } from "../def.ts"; + +export interface InitAndroidHardwareBufferFormatPropertiesANDROID { + pNext?: AnyPointer; + format?: Format; + externalFormat?: number | bigint; + formatFeatures?: FormatFeatureFlags; + samplerYcbcrConversionComponents?: ComponentMapping; + suggestedYcbcrModel?: SamplerYcbcrModelConversion; + suggestedYcbcrRange?: SamplerYcbcrRange; + suggestedXChromaOffset?: ChromaLocation; + suggestedYChromaOffset?: ChromaLocation; +} + +export class AndroidHardwareBufferFormatPropertiesANDROID implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAndroidHardwareBufferFormatPropertiesANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidHardwareBufferFormatPropertiesANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AndroidHardwareBufferFormatPropertiesANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AndroidHardwareBufferFormatPropertiesANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AndroidHardwareBufferFormatPropertiesANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.format !== undefined) this.format = data.format; + if (data.externalFormat !== undefined) this.externalFormat = data.externalFormat; + if (data.formatFeatures !== undefined) this.formatFeatures = data.formatFeatures; + if (data.samplerYcbcrConversionComponents !== undefined) this.samplerYcbcrConversionComponents = data.samplerYcbcrConversionComponents; + if (data.suggestedYcbcrModel !== undefined) this.suggestedYcbcrModel = data.suggestedYcbcrModel; + if (data.suggestedYcbcrRange !== undefined) this.suggestedYcbcrRange = data.suggestedYcbcrRange; + if (data.suggestedXChromaOffset !== undefined) this.suggestedXChromaOffset = data.suggestedXChromaOffset; + if (data.suggestedYChromaOffset !== undefined) this.suggestedYChromaOffset = data.suggestedYChromaOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferFormatPropertiesANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get format(): number { + return this.#view.getUint32(16, LE); + } + + set format(value: Format) { + this.#view.setUint32(16, Number(value), LE); + } + + get externalFormat(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set externalFormat(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get formatFeatures(): number { + return this.#view.getUint32(32, LE); + } + + set formatFeatures(value: FormatFeatureFlags) { + this.#view.setUint32(32, Number(value), LE); + } + + get samplerYcbcrConversionComponents(): ComponentMapping { + return new ComponentMapping(this.#data.subarray(36, 36 + ComponentMapping.size)); + } + + set samplerYcbcrConversionComponents(value: ComponentMapping) { + if (value[BUFFER].byteLength < ComponentMapping.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 36); + } + + get suggestedYcbcrModel(): number { + return this.#view.getUint32(52, LE); + } + + set suggestedYcbcrModel(value: SamplerYcbcrModelConversion) { + this.#view.setUint32(52, Number(value), LE); + } + + get suggestedYcbcrRange(): number { + return this.#view.getUint32(56, LE); + } + + set suggestedYcbcrRange(value: SamplerYcbcrRange) { + this.#view.setUint32(56, Number(value), LE); + } + + get suggestedXChromaOffset(): number { + return this.#view.getUint32(60, LE); + } + + set suggestedXChromaOffset(value: ChromaLocation) { + this.#view.setUint32(60, Number(value), LE); + } + + get suggestedYChromaOffset(): number { + return this.#view.getUint32(64, LE); + } + + set suggestedYChromaOffset(value: ChromaLocation) { + this.#view.setUint32(64, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AndroidHardwareBufferPropertiesANDROID.ts b/api/struct/AndroidHardwareBufferPropertiesANDROID.ts new file mode 100644 index 0000000..35e719c --- /dev/null +++ b/api/struct/AndroidHardwareBufferPropertiesANDROID.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitAndroidHardwareBufferPropertiesANDROID { + pNext?: AnyPointer; + allocationSize?: DeviceSize; + memoryTypeBits?: number; +} + +export class AndroidHardwareBufferPropertiesANDROID implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAndroidHardwareBufferPropertiesANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidHardwareBufferPropertiesANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AndroidHardwareBufferPropertiesANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AndroidHardwareBufferPropertiesANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AndroidHardwareBufferPropertiesANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.allocationSize !== undefined) this.allocationSize = data.allocationSize; + if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferPropertiesANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get allocationSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set allocationSize(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get memoryTypeBits(): number { + return this.#view.getUint32(24, LE); + } + + set memoryTypeBits(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AndroidHardwareBufferUsageANDROID.ts b/api/struct/AndroidHardwareBufferUsageANDROID.ts new file mode 100644 index 0000000..cdf1048 --- /dev/null +++ b/api/struct/AndroidHardwareBufferUsageANDROID.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitAndroidHardwareBufferUsageANDROID { + pNext?: AnyPointer; + androidHardwareBufferUsage?: number | bigint; +} + +export class AndroidHardwareBufferUsageANDROID implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAndroidHardwareBufferUsageANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidHardwareBufferUsageANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AndroidHardwareBufferUsageANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AndroidHardwareBufferUsageANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AndroidHardwareBufferUsageANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.androidHardwareBufferUsage !== undefined) this.androidHardwareBufferUsage = data.androidHardwareBufferUsage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferUsageANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ANDROID_HARDWARE_BUFFER_USAGE_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get androidHardwareBufferUsage(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set androidHardwareBufferUsage(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AndroidSurfaceCreateInfoKHR.ts b/api/struct/AndroidSurfaceCreateInfoKHR.ts new file mode 100644 index 0000000..2ad0961 --- /dev/null +++ b/api/struct/AndroidSurfaceCreateInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AndroidSurfaceCreateFlagsKHR } from "../def.ts"; + +export interface InitAndroidSurfaceCreateInfoKHR { + pNext?: AnyPointer; + flags?: AndroidSurfaceCreateFlagsKHR; + window?: AnyPointer; +} + +export class AndroidSurfaceCreateInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAndroidSurfaceCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidSurfaceCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AndroidSurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AndroidSurfaceCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AndroidSurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.window !== undefined) this.window = data.window; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidSurfaceCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ANDROID_SURFACE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: AndroidSurfaceCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get window(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set window(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ApplicationInfo.ts b/api/struct/ApplicationInfo.ts new file mode 100644 index 0000000..cce9460 --- /dev/null +++ b/api/struct/ApplicationInfo.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitApplicationInfo { + pNext?: AnyPointer; + pApplicationName?: AnyPointer; + applicationVersion?: number; + pEngineName?: AnyPointer; + engineVersion?: number; + apiVersion?: number; +} + +export class ApplicationInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitApplicationInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitApplicationInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ApplicationInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ApplicationInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ApplicationInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pApplicationName !== undefined) this.pApplicationName = data.pApplicationName; + if (data.applicationVersion !== undefined) this.applicationVersion = data.applicationVersion; + if (data.pEngineName !== undefined) this.pEngineName = data.pEngineName; + if (data.engineVersion !== undefined) this.engineVersion = data.engineVersion; + if (data.apiVersion !== undefined) this.apiVersion = data.apiVersion; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ApplicationInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.APPLICATION_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pApplicationName(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pApplicationName(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get applicationVersion(): number { + return this.#view.getUint32(24, LE); + } + + set applicationVersion(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pEngineName(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pEngineName(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get engineVersion(): number { + return this.#view.getUint32(40, LE); + } + + set engineVersion(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get apiVersion(): number { + return this.#view.getUint32(44, LE); + } + + set apiVersion(value: number) { + this.#view.setUint32(44, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AttachmentDescription.ts b/api/struct/AttachmentDescription.ts new file mode 100644 index 0000000..e2b8216 --- /dev/null +++ b/api/struct/AttachmentDescription.ts @@ -0,0 +1,141 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { Format, SampleCountFlagBits, AttachmentLoadOp, AttachmentStoreOp, ImageLayout } from "../enum.ts"; +import { AttachmentDescriptionFlags } from "../def.ts"; + +export interface InitAttachmentDescription { + flags?: AttachmentDescriptionFlags; + format?: Format; + samples?: SampleCountFlagBits; + loadOp?: AttachmentLoadOp; + storeOp?: AttachmentStoreOp; + stencilLoadOp?: AttachmentLoadOp; + stencilStoreOp?: AttachmentStoreOp; + initialLayout?: ImageLayout; + finalLayout?: ImageLayout; +} + +export class AttachmentDescription implements BaseStruct { + static size = 36; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAttachmentDescription); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentDescription) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AttachmentDescription.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AttachmentDescription.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AttachmentDescription.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.format !== undefined) this.format = data.format; + if (data.samples !== undefined) this.samples = data.samples; + if (data.loadOp !== undefined) this.loadOp = data.loadOp; + if (data.storeOp !== undefined) this.storeOp = data.storeOp; + if (data.stencilLoadOp !== undefined) this.stencilLoadOp = data.stencilLoadOp; + if (data.stencilStoreOp !== undefined) this.stencilStoreOp = data.stencilStoreOp; + if (data.initialLayout !== undefined) this.initialLayout = data.initialLayout; + if (data.finalLayout !== undefined) this.finalLayout = data.finalLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentDescription.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): number { + return this.#view.getUint32(0, LE); + } + + set flags(value: AttachmentDescriptionFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get format(): number { + return this.#view.getUint32(4, LE); + } + + set format(value: Format) { + this.#view.setUint32(4, Number(value), LE); + } + + get samples(): number { + return this.#view.getUint32(8, LE); + } + + set samples(value: SampleCountFlagBits) { + this.#view.setUint32(8, Number(value), LE); + } + + get loadOp(): number { + return this.#view.getUint32(12, LE); + } + + set loadOp(value: AttachmentLoadOp) { + this.#view.setUint32(12, Number(value), LE); + } + + get storeOp(): number { + return this.#view.getUint32(16, LE); + } + + set storeOp(value: AttachmentStoreOp) { + this.#view.setUint32(16, Number(value), LE); + } + + get stencilLoadOp(): number { + return this.#view.getUint32(20, LE); + } + + set stencilLoadOp(value: AttachmentLoadOp) { + this.#view.setUint32(20, Number(value), LE); + } + + get stencilStoreOp(): number { + return this.#view.getUint32(24, LE); + } + + set stencilStoreOp(value: AttachmentStoreOp) { + this.#view.setUint32(24, Number(value), LE); + } + + get initialLayout(): number { + return this.#view.getUint32(28, LE); + } + + set initialLayout(value: ImageLayout) { + this.#view.setUint32(28, Number(value), LE); + } + + get finalLayout(): number { + return this.#view.getUint32(32, LE); + } + + set finalLayout(value: ImageLayout) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AttachmentDescription2.ts b/api/struct/AttachmentDescription2.ts new file mode 100644 index 0000000..ae8d0d2 --- /dev/null +++ b/api/struct/AttachmentDescription2.ts @@ -0,0 +1,160 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format, SampleCountFlagBits, AttachmentLoadOp, AttachmentStoreOp, ImageLayout } from "../enum.ts"; +import { AttachmentDescriptionFlags } from "../def.ts"; + +export interface InitAttachmentDescription2 { + pNext?: AnyPointer; + flags?: AttachmentDescriptionFlags; + format?: Format; + samples?: SampleCountFlagBits; + loadOp?: AttachmentLoadOp; + storeOp?: AttachmentStoreOp; + stencilLoadOp?: AttachmentLoadOp; + stencilStoreOp?: AttachmentStoreOp; + initialLayout?: ImageLayout; + finalLayout?: ImageLayout; +} + +export class AttachmentDescription2 implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAttachmentDescription2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentDescription2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AttachmentDescription2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AttachmentDescription2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AttachmentDescription2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.format !== undefined) this.format = data.format; + if (data.samples !== undefined) this.samples = data.samples; + if (data.loadOp !== undefined) this.loadOp = data.loadOp; + if (data.storeOp !== undefined) this.storeOp = data.storeOp; + if (data.stencilLoadOp !== undefined) this.stencilLoadOp = data.stencilLoadOp; + if (data.stencilStoreOp !== undefined) this.stencilStoreOp = data.stencilStoreOp; + if (data.initialLayout !== undefined) this.initialLayout = data.initialLayout; + if (data.finalLayout !== undefined) this.finalLayout = data.finalLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentDescription2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ATTACHMENT_DESCRIPTION_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: AttachmentDescriptionFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get format(): number { + return this.#view.getUint32(20, LE); + } + + set format(value: Format) { + this.#view.setUint32(20, Number(value), LE); + } + + get samples(): number { + return this.#view.getUint32(24, LE); + } + + set samples(value: SampleCountFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } + + get loadOp(): number { + return this.#view.getUint32(28, LE); + } + + set loadOp(value: AttachmentLoadOp) { + this.#view.setUint32(28, Number(value), LE); + } + + get storeOp(): number { + return this.#view.getUint32(32, LE); + } + + set storeOp(value: AttachmentStoreOp) { + this.#view.setUint32(32, Number(value), LE); + } + + get stencilLoadOp(): number { + return this.#view.getUint32(36, LE); + } + + set stencilLoadOp(value: AttachmentLoadOp) { + this.#view.setUint32(36, Number(value), LE); + } + + get stencilStoreOp(): number { + return this.#view.getUint32(40, LE); + } + + set stencilStoreOp(value: AttachmentStoreOp) { + this.#view.setUint32(40, Number(value), LE); + } + + get initialLayout(): number { + return this.#view.getUint32(44, LE); + } + + set initialLayout(value: ImageLayout) { + this.#view.setUint32(44, Number(value), LE); + } + + get finalLayout(): number { + return this.#view.getUint32(48, LE); + } + + set finalLayout(value: ImageLayout) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AttachmentDescription2KHR.ts b/api/struct/AttachmentDescription2KHR.ts new file mode 100644 index 0000000..5998620 --- /dev/null +++ b/api/struct/AttachmentDescription2KHR.ts @@ -0,0 +1,2 @@ + import { AttachmentDescription2 } from "./AttachmentDescription2.ts"; + export type AttachmentDescription2KHR = AttachmentDescription2; \ No newline at end of file diff --git a/api/struct/AttachmentDescriptionStencilLayout.ts b/api/struct/AttachmentDescriptionStencilLayout.ts new file mode 100644 index 0000000..23df985 --- /dev/null +++ b/api/struct/AttachmentDescriptionStencilLayout.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; + +export interface InitAttachmentDescriptionStencilLayout { + pNext?: AnyPointer; + stencilInitialLayout?: ImageLayout; + stencilFinalLayout?: ImageLayout; +} + +export class AttachmentDescriptionStencilLayout implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAttachmentDescriptionStencilLayout); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentDescriptionStencilLayout) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AttachmentDescriptionStencilLayout.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AttachmentDescriptionStencilLayout.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AttachmentDescriptionStencilLayout.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stencilInitialLayout !== undefined) this.stencilInitialLayout = data.stencilInitialLayout; + if (data.stencilFinalLayout !== undefined) this.stencilFinalLayout = data.stencilFinalLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentDescriptionStencilLayout.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stencilInitialLayout(): number { + return this.#view.getUint32(16, LE); + } + + set stencilInitialLayout(value: ImageLayout) { + this.#view.setUint32(16, Number(value), LE); + } + + get stencilFinalLayout(): number { + return this.#view.getUint32(20, LE); + } + + set stencilFinalLayout(value: ImageLayout) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AttachmentDescriptionStencilLayoutKHR.ts b/api/struct/AttachmentDescriptionStencilLayoutKHR.ts new file mode 100644 index 0000000..3491468 --- /dev/null +++ b/api/struct/AttachmentDescriptionStencilLayoutKHR.ts @@ -0,0 +1,2 @@ + import { AttachmentDescriptionStencilLayout } from "./AttachmentDescriptionStencilLayout.ts"; + export type AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout; \ No newline at end of file diff --git a/api/struct/AttachmentReference.ts b/api/struct/AttachmentReference.ts new file mode 100644 index 0000000..b2890dd --- /dev/null +++ b/api/struct/AttachmentReference.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ImageLayout } from "../enum.ts"; + +export interface InitAttachmentReference { + attachment?: number; + layout?: ImageLayout; +} + +export class AttachmentReference implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAttachmentReference); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentReference) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AttachmentReference.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AttachmentReference.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AttachmentReference.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.attachment !== undefined) this.attachment = data.attachment; + if (data.layout !== undefined) this.layout = data.layout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentReference.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get attachment(): number { + return this.#view.getUint32(0, LE); + } + + set attachment(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get layout(): number { + return this.#view.getUint32(4, LE); + } + + set layout(value: ImageLayout) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AttachmentReference2.ts b/api/struct/AttachmentReference2.ts new file mode 100644 index 0000000..b980751 --- /dev/null +++ b/api/struct/AttachmentReference2.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; +import { ImageAspectFlags } from "../def.ts"; + +export interface InitAttachmentReference2 { + pNext?: AnyPointer; + attachment?: number; + layout?: ImageLayout; + aspectMask?: ImageAspectFlags; +} + +export class AttachmentReference2 implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAttachmentReference2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentReference2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AttachmentReference2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AttachmentReference2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AttachmentReference2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.attachment !== undefined) this.attachment = data.attachment; + if (data.layout !== undefined) this.layout = data.layout; + if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentReference2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ATTACHMENT_REFERENCE_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get attachment(): number { + return this.#view.getUint32(16, LE); + } + + set attachment(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get layout(): number { + return this.#view.getUint32(20, LE); + } + + set layout(value: ImageLayout) { + this.#view.setUint32(20, Number(value), LE); + } + + get aspectMask(): number { + return this.#view.getUint32(24, LE); + } + + set aspectMask(value: ImageAspectFlags) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AttachmentReference2KHR.ts b/api/struct/AttachmentReference2KHR.ts new file mode 100644 index 0000000..4f6f15e --- /dev/null +++ b/api/struct/AttachmentReference2KHR.ts @@ -0,0 +1,2 @@ + import { AttachmentReference2 } from "./AttachmentReference2.ts"; + export type AttachmentReference2KHR = AttachmentReference2; \ No newline at end of file diff --git a/api/struct/AttachmentReferenceStencilLayout.ts b/api/struct/AttachmentReferenceStencilLayout.ts new file mode 100644 index 0000000..6aa47e1 --- /dev/null +++ b/api/struct/AttachmentReferenceStencilLayout.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; + +export interface InitAttachmentReferenceStencilLayout { + pNext?: AnyPointer; + stencilLayout?: ImageLayout; +} + +export class AttachmentReferenceStencilLayout implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAttachmentReferenceStencilLayout); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentReferenceStencilLayout) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AttachmentReferenceStencilLayout.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AttachmentReferenceStencilLayout.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AttachmentReferenceStencilLayout.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stencilLayout !== undefined) this.stencilLayout = data.stencilLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentReferenceStencilLayout.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ATTACHMENT_REFERENCE_STENCIL_LAYOUT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stencilLayout(): number { + return this.#view.getUint32(16, LE); + } + + set stencilLayout(value: ImageLayout) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AttachmentReferenceStencilLayoutKHR.ts b/api/struct/AttachmentReferenceStencilLayoutKHR.ts new file mode 100644 index 0000000..0db03e1 --- /dev/null +++ b/api/struct/AttachmentReferenceStencilLayoutKHR.ts @@ -0,0 +1,2 @@ + import { AttachmentReferenceStencilLayout } from "./AttachmentReferenceStencilLayout.ts"; + export type AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout; \ No newline at end of file diff --git a/api/struct/AttachmentSampleCountInfoAMD.ts b/api/struct/AttachmentSampleCountInfoAMD.ts new file mode 100644 index 0000000..36cfee3 --- /dev/null +++ b/api/struct/AttachmentSampleCountInfoAMD.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SampleCountFlagBits } from "../enum.ts"; + +export interface InitAttachmentSampleCountInfoAMD { + pNext?: AnyPointer; + colorAttachmentCount?: number; + pColorAttachmentSamples?: AnyPointer; + depthStencilAttachmentSamples?: SampleCountFlagBits; +} + +export class AttachmentSampleCountInfoAMD implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAttachmentSampleCountInfoAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentSampleCountInfoAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AttachmentSampleCountInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AttachmentSampleCountInfoAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AttachmentSampleCountInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; + if (data.pColorAttachmentSamples !== undefined) this.pColorAttachmentSamples = data.pColorAttachmentSamples; + if (data.depthStencilAttachmentSamples !== undefined) this.depthStencilAttachmentSamples = data.depthStencilAttachmentSamples; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentSampleCountInfoAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.ATTACHMENT_SAMPLE_COUNT_INFO_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get colorAttachmentCount(): number { + return this.#view.getUint32(16, LE); + } + + set colorAttachmentCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pColorAttachmentSamples(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pColorAttachmentSamples(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get depthStencilAttachmentSamples(): number { + return this.#view.getUint32(32, LE); + } + + set depthStencilAttachmentSamples(value: SampleCountFlagBits) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/AttachmentSampleCountInfoNV.ts b/api/struct/AttachmentSampleCountInfoNV.ts new file mode 100644 index 0000000..c45d1f0 --- /dev/null +++ b/api/struct/AttachmentSampleCountInfoNV.ts @@ -0,0 +1,2 @@ + import { AttachmentSampleCountInfoAMD } from "./AttachmentSampleCountInfoAMD.ts"; + export type AttachmentSampleCountInfoNV = AttachmentSampleCountInfoAMD; \ No newline at end of file diff --git a/api/struct/AttachmentSampleLocationsEXT.ts b/api/struct/AttachmentSampleLocationsEXT.ts new file mode 100644 index 0000000..def557a --- /dev/null +++ b/api/struct/AttachmentSampleLocationsEXT.ts @@ -0,0 +1,73 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SampleLocationsInfoEXT} from "./SampleLocationsInfoEXT.ts"; + +export interface InitAttachmentSampleLocationsEXT { + attachmentIndex?: number; + sampleLocationsInfo?: SampleLocationsInfoEXT; +} + +export class AttachmentSampleLocationsEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitAttachmentSampleLocationsEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentSampleLocationsEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(AttachmentSampleLocationsEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < AttachmentSampleLocationsEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(AttachmentSampleLocationsEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.attachmentIndex !== undefined) this.attachmentIndex = data.attachmentIndex; + if (data.sampleLocationsInfo !== undefined) this.sampleLocationsInfo = data.sampleLocationsInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentSampleLocationsEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get attachmentIndex(): number { + return this.#view.getUint32(0, LE); + } + + set attachmentIndex(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get sampleLocationsInfo(): SampleLocationsInfoEXT { + return new SampleLocationsInfoEXT(this.#data.subarray(8, 8 + SampleLocationsInfoEXT.size)); + } + + set sampleLocationsInfo(value: SampleLocationsInfoEXT) { + if (value[BUFFER].byteLength < SampleLocationsInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 8); + } +} \ No newline at end of file diff --git a/api/struct/BaseInStructure.ts b/api/struct/BaseInStructure.ts new file mode 100644 index 0000000..2c5c63d --- /dev/null +++ b/api/struct/BaseInStructure.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitBaseInStructure { + sType?: StructureType; + pNext?: AnyPointer; +} + +export class BaseInStructure implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBaseInStructure); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBaseInStructure) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BaseInStructure.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BaseInStructure.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BaseInStructure.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.sType !== undefined) this.sType = data.sType; + if (data.pNext !== undefined) this.pNext = data.pNext; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BaseInStructure.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BaseOutStructure.ts b/api/struct/BaseOutStructure.ts new file mode 100644 index 0000000..17cec2b --- /dev/null +++ b/api/struct/BaseOutStructure.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitBaseOutStructure { + sType?: StructureType; + pNext?: AnyPointer; +} + +export class BaseOutStructure implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBaseOutStructure); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBaseOutStructure) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BaseOutStructure.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BaseOutStructure.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BaseOutStructure.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.sType !== undefined) this.sType = data.sType; + if (data.pNext !== undefined) this.pNext = data.pNext; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BaseOutStructure.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindAccelerationStructureMemoryInfoNV.ts b/api/struct/BindAccelerationStructureMemoryInfoNV.ts new file mode 100644 index 0000000..7539478 --- /dev/null +++ b/api/struct/BindAccelerationStructureMemoryInfoNV.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AccelerationStructureNV, DeviceMemory, DeviceSize } from "../def.ts"; + +export interface InitBindAccelerationStructureMemoryInfoNV { + pNext?: AnyPointer; + accelerationStructure?: AccelerationStructureNV; + memory?: DeviceMemory; + memoryOffset?: DeviceSize; + deviceIndexCount?: number; + pDeviceIndices?: AnyPointer; +} + +export class BindAccelerationStructureMemoryInfoNV implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindAccelerationStructureMemoryInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindAccelerationStructureMemoryInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindAccelerationStructureMemoryInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindAccelerationStructureMemoryInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindAccelerationStructureMemoryInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; + if (data.memory !== undefined) this.memory = data.memory; + if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; + if (data.deviceIndexCount !== undefined) this.deviceIndexCount = data.deviceIndexCount; + if (data.pDeviceIndices !== undefined) this.pDeviceIndices = data.pDeviceIndices; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindAccelerationStructureMemoryInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get accelerationStructure(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set accelerationStructure(value: AccelerationStructureNV) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get memoryOffset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set memoryOffset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get deviceIndexCount(): number { + return this.#view.getUint32(40, LE); + } + + set deviceIndexCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get pDeviceIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pDeviceIndices(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindBufferMemoryDeviceGroupInfo.ts b/api/struct/BindBufferMemoryDeviceGroupInfo.ts new file mode 100644 index 0000000..d6c6380 --- /dev/null +++ b/api/struct/BindBufferMemoryDeviceGroupInfo.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitBindBufferMemoryDeviceGroupInfo { + pNext?: AnyPointer; + deviceIndexCount?: number; + pDeviceIndices?: AnyPointer; +} + +export class BindBufferMemoryDeviceGroupInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindBufferMemoryDeviceGroupInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindBufferMemoryDeviceGroupInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindBufferMemoryDeviceGroupInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindBufferMemoryDeviceGroupInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindBufferMemoryDeviceGroupInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceIndexCount !== undefined) this.deviceIndexCount = data.deviceIndexCount; + if (data.pDeviceIndices !== undefined) this.pDeviceIndices = data.pDeviceIndices; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindBufferMemoryDeviceGroupInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceIndexCount(): number { + return this.#view.getUint32(16, LE); + } + + set deviceIndexCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pDeviceIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDeviceIndices(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindBufferMemoryDeviceGroupInfoKHR.ts b/api/struct/BindBufferMemoryDeviceGroupInfoKHR.ts new file mode 100644 index 0000000..fc5387e --- /dev/null +++ b/api/struct/BindBufferMemoryDeviceGroupInfoKHR.ts @@ -0,0 +1,2 @@ + import { BindBufferMemoryDeviceGroupInfo } from "./BindBufferMemoryDeviceGroupInfo.ts"; + export type BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo; \ No newline at end of file diff --git a/api/struct/BindBufferMemoryInfo.ts b/api/struct/BindBufferMemoryInfo.ts new file mode 100644 index 0000000..33907c8 --- /dev/null +++ b/api/struct/BindBufferMemoryInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Buffer, DeviceMemory, DeviceSize } from "../def.ts"; + +export interface InitBindBufferMemoryInfo { + pNext?: AnyPointer; + buffer?: Buffer; + memory?: DeviceMemory; + memoryOffset?: DeviceSize; +} + +export class BindBufferMemoryInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindBufferMemoryInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindBufferMemoryInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindBufferMemoryInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindBufferMemoryInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindBufferMemoryInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.memory !== undefined) this.memory = data.memory; + if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindBufferMemoryInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BIND_BUFFER_MEMORY_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get memoryOffset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set memoryOffset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindBufferMemoryInfoKHR.ts b/api/struct/BindBufferMemoryInfoKHR.ts new file mode 100644 index 0000000..6c29544 --- /dev/null +++ b/api/struct/BindBufferMemoryInfoKHR.ts @@ -0,0 +1,2 @@ + import { BindBufferMemoryInfo } from "./BindBufferMemoryInfo.ts"; + export type BindBufferMemoryInfoKHR = BindBufferMemoryInfo; \ No newline at end of file diff --git a/api/struct/BindImageMemoryDeviceGroupInfo.ts b/api/struct/BindImageMemoryDeviceGroupInfo.ts new file mode 100644 index 0000000..9da35f9 --- /dev/null +++ b/api/struct/BindImageMemoryDeviceGroupInfo.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitBindImageMemoryDeviceGroupInfo { + pNext?: AnyPointer; + deviceIndexCount?: number; + pDeviceIndices?: AnyPointer; + splitInstanceBindRegionCount?: number; + pSplitInstanceBindRegions?: AnyPointer; +} + +export class BindImageMemoryDeviceGroupInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindImageMemoryDeviceGroupInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindImageMemoryDeviceGroupInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindImageMemoryDeviceGroupInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindImageMemoryDeviceGroupInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindImageMemoryDeviceGroupInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceIndexCount !== undefined) this.deviceIndexCount = data.deviceIndexCount; + if (data.pDeviceIndices !== undefined) this.pDeviceIndices = data.pDeviceIndices; + if (data.splitInstanceBindRegionCount !== undefined) this.splitInstanceBindRegionCount = data.splitInstanceBindRegionCount; + if (data.pSplitInstanceBindRegions !== undefined) this.pSplitInstanceBindRegions = data.pSplitInstanceBindRegions; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImageMemoryDeviceGroupInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceIndexCount(): number { + return this.#view.getUint32(16, LE); + } + + set deviceIndexCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pDeviceIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDeviceIndices(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get splitInstanceBindRegionCount(): number { + return this.#view.getUint32(32, LE); + } + + set splitInstanceBindRegionCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pSplitInstanceBindRegions(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pSplitInstanceBindRegions(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindImageMemoryDeviceGroupInfoKHR.ts b/api/struct/BindImageMemoryDeviceGroupInfoKHR.ts new file mode 100644 index 0000000..9e72e8d --- /dev/null +++ b/api/struct/BindImageMemoryDeviceGroupInfoKHR.ts @@ -0,0 +1,2 @@ + import { BindImageMemoryDeviceGroupInfo } from "./BindImageMemoryDeviceGroupInfo.ts"; + export type BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo; \ No newline at end of file diff --git a/api/struct/BindImageMemoryInfo.ts b/api/struct/BindImageMemoryInfo.ts new file mode 100644 index 0000000..066cade --- /dev/null +++ b/api/struct/BindImageMemoryInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Image, DeviceMemory, DeviceSize } from "../def.ts"; + +export interface InitBindImageMemoryInfo { + pNext?: AnyPointer; + image?: Image; + memory?: DeviceMemory; + memoryOffset?: DeviceSize; +} + +export class BindImageMemoryInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindImageMemoryInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindImageMemoryInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindImageMemoryInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindImageMemoryInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindImageMemoryInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.image !== undefined) this.image = data.image; + if (data.memory !== undefined) this.memory = data.memory; + if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImageMemoryInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BIND_IMAGE_MEMORY_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get memoryOffset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set memoryOffset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindImageMemoryInfoKHR.ts b/api/struct/BindImageMemoryInfoKHR.ts new file mode 100644 index 0000000..62f5530 --- /dev/null +++ b/api/struct/BindImageMemoryInfoKHR.ts @@ -0,0 +1,2 @@ + import { BindImageMemoryInfo } from "./BindImageMemoryInfo.ts"; + export type BindImageMemoryInfoKHR = BindImageMemoryInfo; \ No newline at end of file diff --git a/api/struct/BindImageMemorySwapchainInfoKHR.ts b/api/struct/BindImageMemorySwapchainInfoKHR.ts new file mode 100644 index 0000000..2bd577e --- /dev/null +++ b/api/struct/BindImageMemorySwapchainInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { SwapchainKHR } from "../def.ts"; + +export interface InitBindImageMemorySwapchainInfoKHR { + pNext?: AnyPointer; + swapchain?: SwapchainKHR; + imageIndex?: number; +} + +export class BindImageMemorySwapchainInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindImageMemorySwapchainInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindImageMemorySwapchainInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindImageMemorySwapchainInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindImageMemorySwapchainInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindImageMemorySwapchainInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.swapchain !== undefined) this.swapchain = data.swapchain; + if (data.imageIndex !== undefined) this.imageIndex = data.imageIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImageMemorySwapchainInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get swapchain(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set swapchain(value: SwapchainKHR) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get imageIndex(): number { + return this.#view.getUint32(24, LE); + } + + set imageIndex(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindImagePlaneMemoryInfo.ts b/api/struct/BindImagePlaneMemoryInfo.ts new file mode 100644 index 0000000..3400fa9 --- /dev/null +++ b/api/struct/BindImagePlaneMemoryInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageAspectFlagBits } from "../enum.ts"; + +export interface InitBindImagePlaneMemoryInfo { + pNext?: AnyPointer; + planeAspect?: ImageAspectFlagBits; +} + +export class BindImagePlaneMemoryInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindImagePlaneMemoryInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindImagePlaneMemoryInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindImagePlaneMemoryInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindImagePlaneMemoryInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindImagePlaneMemoryInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.planeAspect !== undefined) this.planeAspect = data.planeAspect; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImagePlaneMemoryInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BIND_IMAGE_PLANE_MEMORY_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get planeAspect(): number { + return this.#view.getUint32(16, LE); + } + + set planeAspect(value: ImageAspectFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindImagePlaneMemoryInfoKHR.ts b/api/struct/BindImagePlaneMemoryInfoKHR.ts new file mode 100644 index 0000000..d69a194 --- /dev/null +++ b/api/struct/BindImagePlaneMemoryInfoKHR.ts @@ -0,0 +1,2 @@ + import { BindImagePlaneMemoryInfo } from "./BindImagePlaneMemoryInfo.ts"; + export type BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo; \ No newline at end of file diff --git a/api/struct/BindIndexBufferIndirectCommandNV.ts b/api/struct/BindIndexBufferIndirectCommandNV.ts new file mode 100644 index 0000000..a4aaf36 --- /dev/null +++ b/api/struct/BindIndexBufferIndirectCommandNV.ts @@ -0,0 +1,81 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { IndexType } from "../enum.ts"; +import { DeviceAddress } from "../def.ts"; + +export interface InitBindIndexBufferIndirectCommandNV { + bufferAddress?: DeviceAddress; + size?: number; + indexType?: IndexType; +} + +export class BindIndexBufferIndirectCommandNV implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindIndexBufferIndirectCommandNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindIndexBufferIndirectCommandNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindIndexBufferIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindIndexBufferIndirectCommandNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindIndexBufferIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.bufferAddress !== undefined) this.bufferAddress = data.bufferAddress; + if (data.size !== undefined) this.size = data.size; + if (data.indexType !== undefined) this.indexType = data.indexType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindIndexBufferIndirectCommandNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get bufferAddress(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set bufferAddress(value: DeviceAddress) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get size(): number { + return this.#view.getUint32(8, LE); + } + + set size(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get indexType(): number { + return this.#view.getUint32(12, LE); + } + + set indexType(value: IndexType) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindShaderGroupIndirectCommandNV.ts b/api/struct/BindShaderGroupIndirectCommandNV.ts new file mode 100644 index 0000000..d722cba --- /dev/null +++ b/api/struct/BindShaderGroupIndirectCommandNV.ts @@ -0,0 +1,59 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitBindShaderGroupIndirectCommandNV { + groupIndex?: number; +} + +export class BindShaderGroupIndirectCommandNV implements BaseStruct { + static size = 4; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindShaderGroupIndirectCommandNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindShaderGroupIndirectCommandNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindShaderGroupIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindShaderGroupIndirectCommandNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindShaderGroupIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.groupIndex !== undefined) this.groupIndex = data.groupIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindShaderGroupIndirectCommandNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get groupIndex(): number { + return this.#view.getUint32(0, LE); + } + + set groupIndex(value: number) { + this.#view.setUint32(0, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindSparseInfo.ts b/api/struct/BindSparseInfo.ts new file mode 100644 index 0000000..6ae5c48 --- /dev/null +++ b/api/struct/BindSparseInfo.ts @@ -0,0 +1,173 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SparseBufferMemoryBindInfo} from "./SparseBufferMemoryBindInfo.ts"; +import {SparseImageOpaqueMemoryBindInfo} from "./SparseImageOpaqueMemoryBindInfo.ts"; +import {SparseImageMemoryBindInfo} from "./SparseImageMemoryBindInfo.ts"; +import { StructureType } from "../enum.ts"; +import { Semaphore } from "../def.ts"; + +export interface InitBindSparseInfo { + pNext?: AnyPointer; + waitSemaphoreCount?: number; + pWaitSemaphores?: AnyPointer; + bufferBindCount?: number; + pBufferBinds?: AnyPointer; + imageOpaqueBindCount?: number; + pImageOpaqueBinds?: AnyPointer; + imageBindCount?: number; + pImageBinds?: AnyPointer; + signalSemaphoreCount?: number; + pSignalSemaphores?: AnyPointer; +} + +export class BindSparseInfo implements BaseStruct { + static size = 96; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindSparseInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindSparseInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindSparseInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindSparseInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindSparseInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.waitSemaphoreCount !== undefined) this.waitSemaphoreCount = data.waitSemaphoreCount; + if (data.pWaitSemaphores !== undefined) this.pWaitSemaphores = data.pWaitSemaphores; + if (data.bufferBindCount !== undefined) this.bufferBindCount = data.bufferBindCount; + if (data.pBufferBinds !== undefined) this.pBufferBinds = data.pBufferBinds; + if (data.imageOpaqueBindCount !== undefined) this.imageOpaqueBindCount = data.imageOpaqueBindCount; + if (data.pImageOpaqueBinds !== undefined) this.pImageOpaqueBinds = data.pImageOpaqueBinds; + if (data.imageBindCount !== undefined) this.imageBindCount = data.imageBindCount; + if (data.pImageBinds !== undefined) this.pImageBinds = data.pImageBinds; + if (data.signalSemaphoreCount !== undefined) this.signalSemaphoreCount = data.signalSemaphoreCount; + if (data.pSignalSemaphores !== undefined) this.pSignalSemaphores = data.pSignalSemaphores; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindSparseInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BIND_SPARSE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get waitSemaphoreCount(): number { + return this.#view.getUint32(16, LE); + } + + set waitSemaphoreCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pWaitSemaphores(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pWaitSemaphores(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get bufferBindCount(): number { + return this.#view.getUint32(32, LE); + } + + set bufferBindCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pBufferBinds(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pBufferBinds(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get imageOpaqueBindCount(): number { + return this.#view.getUint32(48, LE); + } + + set imageOpaqueBindCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pImageOpaqueBinds(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pImageOpaqueBinds(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get imageBindCount(): number { + return this.#view.getUint32(64, LE); + } + + set imageBindCount(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get pImageBinds(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set pImageBinds(value: AnyPointer) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } + + get signalSemaphoreCount(): number { + return this.#view.getUint32(80, LE); + } + + set signalSemaphoreCount(value: number) { + this.#view.setUint32(80, Number(value), LE); + } + + get pSignalSemaphores(): Deno.PointerValue { + return pointerFromView(this.#view, 88, LE); + } + + set pSignalSemaphores(value: AnyPointer) { + this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindVertexBufferIndirectCommandNV.ts b/api/struct/BindVertexBufferIndirectCommandNV.ts new file mode 100644 index 0000000..34c87fb --- /dev/null +++ b/api/struct/BindVertexBufferIndirectCommandNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceAddress } from "../def.ts"; + +export interface InitBindVertexBufferIndirectCommandNV { + bufferAddress?: DeviceAddress; + size?: number; + stride?: number; +} + +export class BindVertexBufferIndirectCommandNV implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindVertexBufferIndirectCommandNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindVertexBufferIndirectCommandNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindVertexBufferIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindVertexBufferIndirectCommandNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindVertexBufferIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.bufferAddress !== undefined) this.bufferAddress = data.bufferAddress; + if (data.size !== undefined) this.size = data.size; + if (data.stride !== undefined) this.stride = data.stride; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindVertexBufferIndirectCommandNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get bufferAddress(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set bufferAddress(value: DeviceAddress) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get size(): number { + return this.#view.getUint32(8, LE); + } + + set size(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get stride(): number { + return this.#view.getUint32(12, LE); + } + + set stride(value: number) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BindVideoSessionMemoryInfoKHR.ts b/api/struct/BindVideoSessionMemoryInfoKHR.ts new file mode 100644 index 0000000..f1f86e6 --- /dev/null +++ b/api/struct/BindVideoSessionMemoryInfoKHR.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceMemory, DeviceSize } from "../def.ts"; + +export interface InitBindVideoSessionMemoryInfoKHR { + pNext?: AnyPointer; + memoryBindIndex?: number; + memory?: DeviceMemory; + memoryOffset?: DeviceSize; + memorySize?: DeviceSize; +} + +export class BindVideoSessionMemoryInfoKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBindVideoSessionMemoryInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBindVideoSessionMemoryInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BindVideoSessionMemoryInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BindVideoSessionMemoryInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BindVideoSessionMemoryInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryBindIndex !== undefined) this.memoryBindIndex = data.memoryBindIndex; + if (data.memory !== undefined) this.memory = data.memory; + if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; + if (data.memorySize !== undefined) this.memorySize = data.memorySize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindVideoSessionMemoryInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BIND_VIDEO_SESSION_MEMORY_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryBindIndex(): number { + return this.#view.getUint32(16, LE); + } + + set memoryBindIndex(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get memoryOffset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set memoryOffset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get memorySize(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set memorySize(value: DeviceSize) { + this.#view.setBigUint64(40, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BlitImageInfo2.ts b/api/struct/BlitImageInfo2.ts new file mode 100644 index 0000000..c0c988e --- /dev/null +++ b/api/struct/BlitImageInfo2.ts @@ -0,0 +1,141 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageBlit2} from "./ImageBlit2.ts"; +import { StructureType, ImageLayout, Filter } from "../enum.ts"; +import { Image } from "../def.ts"; + +export interface InitBlitImageInfo2 { + pNext?: AnyPointer; + srcImage?: Image; + srcImageLayout?: ImageLayout; + dstImage?: Image; + dstImageLayout?: ImageLayout; + regionCount?: number; + pRegions?: AnyPointer; + filter?: Filter; +} + +export class BlitImageInfo2 implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBlitImageInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBlitImageInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BlitImageInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BlitImageInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BlitImageInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcImage !== undefined) this.srcImage = data.srcImage; + if (data.srcImageLayout !== undefined) this.srcImageLayout = data.srcImageLayout; + if (data.dstImage !== undefined) this.dstImage = data.dstImage; + if (data.dstImageLayout !== undefined) this.dstImageLayout = data.dstImageLayout; + if (data.regionCount !== undefined) this.regionCount = data.regionCount; + if (data.pRegions !== undefined) this.pRegions = data.pRegions; + if (data.filter !== undefined) this.filter = data.filter; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BlitImageInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BLIT_IMAGE_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcImage(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set srcImage(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get srcImageLayout(): number { + return this.#view.getUint32(24, LE); + } + + set srcImageLayout(value: ImageLayout) { + this.#view.setUint32(24, Number(value), LE); + } + + get dstImage(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set dstImage(value: Image) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get dstImageLayout(): number { + return this.#view.getUint32(40, LE); + } + + set dstImageLayout(value: ImageLayout) { + this.#view.setUint32(40, Number(value), LE); + } + + get regionCount(): number { + return this.#view.getUint32(44, LE); + } + + set regionCount(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get pRegions(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pRegions(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get filter(): number { + return this.#view.getUint32(56, LE); + } + + set filter(value: Filter) { + this.#view.setUint32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BlitImageInfo2KHR.ts b/api/struct/BlitImageInfo2KHR.ts new file mode 100644 index 0000000..9af479c --- /dev/null +++ b/api/struct/BlitImageInfo2KHR.ts @@ -0,0 +1,2 @@ + import { BlitImageInfo2 } from "./BlitImageInfo2.ts"; + export type BlitImageInfo2KHR = BlitImageInfo2; \ No newline at end of file diff --git a/api/struct/BufferCaptureDescriptorDataInfoEXT.ts b/api/struct/BufferCaptureDescriptorDataInfoEXT.ts new file mode 100644 index 0000000..ebcf6bc --- /dev/null +++ b/api/struct/BufferCaptureDescriptorDataInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Buffer } from "../def.ts"; + +export interface InitBufferCaptureDescriptorDataInfoEXT { + pNext?: AnyPointer; + buffer?: Buffer; +} + +export class BufferCaptureDescriptorDataInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferCaptureDescriptorDataInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCaptureDescriptorDataInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferCaptureDescriptorDataInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.buffer !== undefined) this.buffer = data.buffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCaptureDescriptorDataInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferCollectionBufferCreateInfoFUCHSIA.ts b/api/struct/BufferCollectionBufferCreateInfoFUCHSIA.ts new file mode 100644 index 0000000..98a4753 --- /dev/null +++ b/api/struct/BufferCollectionBufferCreateInfoFUCHSIA.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { BufferCollectionFUCHSIA } from "../def.ts"; + +export interface InitBufferCollectionBufferCreateInfoFUCHSIA { + pNext?: AnyPointer; + collection?: BufferCollectionFUCHSIA; + index?: number; +} + +export class BufferCollectionBufferCreateInfoFUCHSIA implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferCollectionBufferCreateInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionBufferCreateInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferCollectionBufferCreateInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferCollectionBufferCreateInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferCollectionBufferCreateInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.collection !== undefined) this.collection = data.collection; + if (data.index !== undefined) this.index = data.index; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionBufferCreateInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get collection(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set collection(value: BufferCollectionFUCHSIA) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get index(): number { + return this.#view.getUint32(24, LE); + } + + set index(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferCollectionConstraintsInfoFUCHSIA.ts b/api/struct/BufferCollectionConstraintsInfoFUCHSIA.ts new file mode 100644 index 0000000..6bc4f20 --- /dev/null +++ b/api/struct/BufferCollectionConstraintsInfoFUCHSIA.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitBufferCollectionConstraintsInfoFUCHSIA { + pNext?: AnyPointer; + minBufferCount?: number; + maxBufferCount?: number; + minBufferCountForCamping?: number; + minBufferCountForDedicatedSlack?: number; + minBufferCountForSharedSlack?: number; +} + +export class BufferCollectionConstraintsInfoFUCHSIA implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferCollectionConstraintsInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionConstraintsInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferCollectionConstraintsInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferCollectionConstraintsInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferCollectionConstraintsInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minBufferCount !== undefined) this.minBufferCount = data.minBufferCount; + if (data.maxBufferCount !== undefined) this.maxBufferCount = data.maxBufferCount; + if (data.minBufferCountForCamping !== undefined) this.minBufferCountForCamping = data.minBufferCountForCamping; + if (data.minBufferCountForDedicatedSlack !== undefined) this.minBufferCountForDedicatedSlack = data.minBufferCountForDedicatedSlack; + if (data.minBufferCountForSharedSlack !== undefined) this.minBufferCountForSharedSlack = data.minBufferCountForSharedSlack; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionConstraintsInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minBufferCount(): number { + return this.#view.getUint32(16, LE); + } + + set minBufferCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxBufferCount(): number { + return this.#view.getUint32(20, LE); + } + + set maxBufferCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get minBufferCountForCamping(): number { + return this.#view.getUint32(24, LE); + } + + set minBufferCountForCamping(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get minBufferCountForDedicatedSlack(): number { + return this.#view.getUint32(28, LE); + } + + set minBufferCountForDedicatedSlack(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get minBufferCountForSharedSlack(): number { + return this.#view.getUint32(32, LE); + } + + set minBufferCountForSharedSlack(value: number) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferCollectionCreateInfoFUCHSIA.ts b/api/struct/BufferCollectionCreateInfoFUCHSIA.ts new file mode 100644 index 0000000..e8b2bfe --- /dev/null +++ b/api/struct/BufferCollectionCreateInfoFUCHSIA.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitBufferCollectionCreateInfoFUCHSIA { + pNext?: AnyPointer; + collectionToken?: Deno.PointerValue; +} + +export class BufferCollectionCreateInfoFUCHSIA implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferCollectionCreateInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionCreateInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferCollectionCreateInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferCollectionCreateInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferCollectionCreateInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.collectionToken !== undefined) this.collectionToken = data.collectionToken; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionCreateInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_COLLECTION_CREATE_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get collectionToken(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set collectionToken(value: Deno.PointerValue) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferCollectionImageCreateInfoFUCHSIA.ts b/api/struct/BufferCollectionImageCreateInfoFUCHSIA.ts new file mode 100644 index 0000000..50a9b2c --- /dev/null +++ b/api/struct/BufferCollectionImageCreateInfoFUCHSIA.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { BufferCollectionFUCHSIA } from "../def.ts"; + +export interface InitBufferCollectionImageCreateInfoFUCHSIA { + pNext?: AnyPointer; + collection?: BufferCollectionFUCHSIA; + index?: number; +} + +export class BufferCollectionImageCreateInfoFUCHSIA implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferCollectionImageCreateInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionImageCreateInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferCollectionImageCreateInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferCollectionImageCreateInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferCollectionImageCreateInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.collection !== undefined) this.collection = data.collection; + if (data.index !== undefined) this.index = data.index; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionImageCreateInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get collection(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set collection(value: BufferCollectionFUCHSIA) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get index(): number { + return this.#view.getUint32(24, LE); + } + + set index(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferCollectionPropertiesFUCHSIA.ts b/api/struct/BufferCollectionPropertiesFUCHSIA.ts new file mode 100644 index 0000000..f665c39 --- /dev/null +++ b/api/struct/BufferCollectionPropertiesFUCHSIA.ts @@ -0,0 +1,188 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SysmemColorSpaceFUCHSIA} from "./SysmemColorSpaceFUCHSIA.ts"; +import {ComponentMapping} from "./ComponentMapping.ts"; +import { StructureType, SamplerYcbcrModelConversion, SamplerYcbcrRange, ChromaLocation } from "../enum.ts"; +import { FormatFeatureFlags } from "../def.ts"; + +export interface InitBufferCollectionPropertiesFUCHSIA { + pNext?: AnyPointer; + memoryTypeBits?: number; + bufferCount?: number; + createInfoIndex?: number; + sysmemPixelFormat?: number | bigint; + formatFeatures?: FormatFeatureFlags; + sysmemColorSpaceIndex?: SysmemColorSpaceFUCHSIA; + samplerYcbcrConversionComponents?: ComponentMapping; + suggestedYcbcrModel?: SamplerYcbcrModelConversion; + suggestedYcbcrRange?: SamplerYcbcrRange; + suggestedXChromaOffset?: ChromaLocation; + suggestedYChromaOffset?: ChromaLocation; +} + +export class BufferCollectionPropertiesFUCHSIA implements BaseStruct { + static size = 104; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferCollectionPropertiesFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionPropertiesFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferCollectionPropertiesFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferCollectionPropertiesFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferCollectionPropertiesFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; + if (data.bufferCount !== undefined) this.bufferCount = data.bufferCount; + if (data.createInfoIndex !== undefined) this.createInfoIndex = data.createInfoIndex; + if (data.sysmemPixelFormat !== undefined) this.sysmemPixelFormat = data.sysmemPixelFormat; + if (data.formatFeatures !== undefined) this.formatFeatures = data.formatFeatures; + if (data.sysmemColorSpaceIndex !== undefined) this.sysmemColorSpaceIndex = data.sysmemColorSpaceIndex; + if (data.samplerYcbcrConversionComponents !== undefined) this.samplerYcbcrConversionComponents = data.samplerYcbcrConversionComponents; + if (data.suggestedYcbcrModel !== undefined) this.suggestedYcbcrModel = data.suggestedYcbcrModel; + if (data.suggestedYcbcrRange !== undefined) this.suggestedYcbcrRange = data.suggestedYcbcrRange; + if (data.suggestedXChromaOffset !== undefined) this.suggestedXChromaOffset = data.suggestedXChromaOffset; + if (data.suggestedYChromaOffset !== undefined) this.suggestedYChromaOffset = data.suggestedYChromaOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionPropertiesFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_COLLECTION_PROPERTIES_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryTypeBits(): number { + return this.#view.getUint32(16, LE); + } + + set memoryTypeBits(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get bufferCount(): number { + return this.#view.getUint32(20, LE); + } + + set bufferCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get createInfoIndex(): number { + return this.#view.getUint32(24, LE); + } + + set createInfoIndex(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get sysmemPixelFormat(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set sysmemPixelFormat(value: number | bigint) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get formatFeatures(): number { + return this.#view.getUint32(40, LE); + } + + set formatFeatures(value: FormatFeatureFlags) { + this.#view.setUint32(40, Number(value), LE); + } + + get sysmemColorSpaceIndex(): SysmemColorSpaceFUCHSIA { + return new SysmemColorSpaceFUCHSIA(this.#data.subarray(48, 48 + SysmemColorSpaceFUCHSIA.size)); + } + + set sysmemColorSpaceIndex(value: SysmemColorSpaceFUCHSIA) { + if (value[BUFFER].byteLength < SysmemColorSpaceFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 48); + } + + get samplerYcbcrConversionComponents(): ComponentMapping { + return new ComponentMapping(this.#data.subarray(72, 72 + ComponentMapping.size)); + } + + set samplerYcbcrConversionComponents(value: ComponentMapping) { + if (value[BUFFER].byteLength < ComponentMapping.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 72); + } + + get suggestedYcbcrModel(): number { + return this.#view.getUint32(88, LE); + } + + set suggestedYcbcrModel(value: SamplerYcbcrModelConversion) { + this.#view.setUint32(88, Number(value), LE); + } + + get suggestedYcbcrRange(): number { + return this.#view.getUint32(92, LE); + } + + set suggestedYcbcrRange(value: SamplerYcbcrRange) { + this.#view.setUint32(92, Number(value), LE); + } + + get suggestedXChromaOffset(): number { + return this.#view.getUint32(96, LE); + } + + set suggestedXChromaOffset(value: ChromaLocation) { + this.#view.setUint32(96, Number(value), LE); + } + + get suggestedYChromaOffset(): number { + return this.#view.getUint32(100, LE); + } + + set suggestedYChromaOffset(value: ChromaLocation) { + this.#view.setUint32(100, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferConstraintsInfoFUCHSIA.ts b/api/struct/BufferConstraintsInfoFUCHSIA.ts new file mode 100644 index 0000000..70a1e5a --- /dev/null +++ b/api/struct/BufferConstraintsInfoFUCHSIA.ts @@ -0,0 +1,108 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {BufferCreateInfo} from "./BufferCreateInfo.ts"; +import {BufferCollectionConstraintsInfoFUCHSIA} from "./BufferCollectionConstraintsInfoFUCHSIA.ts"; +import { StructureType } from "../enum.ts"; +import { FormatFeatureFlags } from "../def.ts"; + +export interface InitBufferConstraintsInfoFUCHSIA { + pNext?: AnyPointer; + createInfo?: BufferCreateInfo; + requiredFormatFeatures?: FormatFeatureFlags; + bufferCollectionConstraints?: BufferCollectionConstraintsInfoFUCHSIA; +} + +export class BufferConstraintsInfoFUCHSIA implements BaseStruct { + static size = 120; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferConstraintsInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferConstraintsInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferConstraintsInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferConstraintsInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferConstraintsInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.createInfo !== undefined) this.createInfo = data.createInfo; + if (data.requiredFormatFeatures !== undefined) this.requiredFormatFeatures = data.requiredFormatFeatures; + if (data.bufferCollectionConstraints !== undefined) this.bufferCollectionConstraints = data.bufferCollectionConstraints; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferConstraintsInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_CONSTRAINTS_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get createInfo(): BufferCreateInfo { + return new BufferCreateInfo(this.#data.subarray(16, 16 + BufferCreateInfo.size)); + } + + set createInfo(value: BufferCreateInfo) { + if (value[BUFFER].byteLength < BufferCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get requiredFormatFeatures(): number { + return this.#view.getUint32(72, LE); + } + + set requiredFormatFeatures(value: FormatFeatureFlags) { + this.#view.setUint32(72, Number(value), LE); + } + + get bufferCollectionConstraints(): BufferCollectionConstraintsInfoFUCHSIA { + return new BufferCollectionConstraintsInfoFUCHSIA(this.#data.subarray(80, 80 + BufferCollectionConstraintsInfoFUCHSIA.size)); + } + + set bufferCollectionConstraints(value: BufferCollectionConstraintsInfoFUCHSIA) { + if (value[BUFFER].byteLength < BufferCollectionConstraintsInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 80); + } +} \ No newline at end of file diff --git a/api/struct/BufferCopy.ts b/api/struct/BufferCopy.ts new file mode 100644 index 0000000..b7c8899 --- /dev/null +++ b/api/struct/BufferCopy.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitBufferCopy { + srcOffset?: DeviceSize; + dstOffset?: DeviceSize; + size?: DeviceSize; +} + +export class BufferCopy implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferCopy); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCopy) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferCopy.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferCopy.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferCopy.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; + if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCopy.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get srcOffset(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set srcOffset(value: DeviceSize) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get dstOffset(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set dstOffset(value: DeviceSize) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferCopy2.ts b/api/struct/BufferCopy2.ts new file mode 100644 index 0000000..1ddb0d4 --- /dev/null +++ b/api/struct/BufferCopy2.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitBufferCopy2 { + pNext?: AnyPointer; + srcOffset?: DeviceSize; + dstOffset?: DeviceSize; + size?: DeviceSize; +} + +export class BufferCopy2 implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferCopy2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCopy2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferCopy2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferCopy2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferCopy2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; + if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCopy2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_COPY_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcOffset(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set srcOffset(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get dstOffset(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set dstOffset(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferCopy2KHR.ts b/api/struct/BufferCopy2KHR.ts new file mode 100644 index 0000000..55f43ac --- /dev/null +++ b/api/struct/BufferCopy2KHR.ts @@ -0,0 +1,2 @@ + import { BufferCopy2 } from "./BufferCopy2.ts"; + export type BufferCopy2KHR = BufferCopy2; \ No newline at end of file diff --git a/api/struct/BufferCreateInfo.ts b/api/struct/BufferCreateInfo.ts new file mode 100644 index 0000000..386097a --- /dev/null +++ b/api/struct/BufferCreateInfo.ts @@ -0,0 +1,130 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SharingMode } from "../enum.ts"; +import { BufferCreateFlags, DeviceSize, BufferUsageFlags } from "../def.ts"; + +export interface InitBufferCreateInfo { + pNext?: AnyPointer; + flags?: BufferCreateFlags; + size?: DeviceSize; + usage?: BufferUsageFlags; + sharingMode?: SharingMode; + queueFamilyIndexCount?: number; + pQueueFamilyIndices?: AnyPointer; +} + +export class BufferCreateInfo implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.size !== undefined) this.size = data.size; + if (data.usage !== undefined) this.usage = data.usage; + if (data.sharingMode !== undefined) this.sharingMode = data.sharingMode; + if (data.queueFamilyIndexCount !== undefined) this.queueFamilyIndexCount = data.queueFamilyIndexCount; + if (data.pQueueFamilyIndices !== undefined) this.pQueueFamilyIndices = data.pQueueFamilyIndices; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: BufferCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get usage(): number { + return this.#view.getUint32(32, LE); + } + + set usage(value: BufferUsageFlags) { + this.#view.setUint32(32, Number(value), LE); + } + + get sharingMode(): number { + return this.#view.getUint32(36, LE); + } + + set sharingMode(value: SharingMode) { + this.#view.setUint32(36, Number(value), LE); + } + + get queueFamilyIndexCount(): number { + return this.#view.getUint32(40, LE); + } + + set queueFamilyIndexCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get pQueueFamilyIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pQueueFamilyIndices(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferDeviceAddressCreateInfoEXT.ts b/api/struct/BufferDeviceAddressCreateInfoEXT.ts new file mode 100644 index 0000000..6deb6a9 --- /dev/null +++ b/api/struct/BufferDeviceAddressCreateInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceAddress } from "../def.ts"; + +export interface InitBufferDeviceAddressCreateInfoEXT { + pNext?: AnyPointer; + deviceAddress?: DeviceAddress; +} + +export class BufferDeviceAddressCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferDeviceAddressCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferDeviceAddressCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferDeviceAddressCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferDeviceAddressCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferDeviceAddressCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferDeviceAddressCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceAddress(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set deviceAddress(value: DeviceAddress) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferDeviceAddressInfo.ts b/api/struct/BufferDeviceAddressInfo.ts new file mode 100644 index 0000000..36e5aa0 --- /dev/null +++ b/api/struct/BufferDeviceAddressInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Buffer } from "../def.ts"; + +export interface InitBufferDeviceAddressInfo { + pNext?: AnyPointer; + buffer?: Buffer; +} + +export class BufferDeviceAddressInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferDeviceAddressInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferDeviceAddressInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferDeviceAddressInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferDeviceAddressInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferDeviceAddressInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.buffer !== undefined) this.buffer = data.buffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferDeviceAddressInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_DEVICE_ADDRESS_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferDeviceAddressInfoEXT.ts b/api/struct/BufferDeviceAddressInfoEXT.ts new file mode 100644 index 0000000..afcb237 --- /dev/null +++ b/api/struct/BufferDeviceAddressInfoEXT.ts @@ -0,0 +1,2 @@ + import { BufferDeviceAddressInfo } from "./BufferDeviceAddressInfo.ts"; + export type BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo; \ No newline at end of file diff --git a/api/struct/BufferDeviceAddressInfoKHR.ts b/api/struct/BufferDeviceAddressInfoKHR.ts new file mode 100644 index 0000000..48f24b7 --- /dev/null +++ b/api/struct/BufferDeviceAddressInfoKHR.ts @@ -0,0 +1,2 @@ + import { BufferDeviceAddressInfo } from "./BufferDeviceAddressInfo.ts"; + export type BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo; \ No newline at end of file diff --git a/api/struct/BufferImageCopy.ts b/api/struct/BufferImageCopy.ts new file mode 100644 index 0000000..0740300 --- /dev/null +++ b/api/struct/BufferImageCopy.ts @@ -0,0 +1,122 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceLayers} from "./ImageSubresourceLayers.ts"; +import {Offset3D} from "./Offset3D.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitBufferImageCopy { + bufferOffset?: DeviceSize; + bufferRowLength?: number; + bufferImageHeight?: number; + imageSubresource?: ImageSubresourceLayers; + imageOffset?: Offset3D; + imageExtent?: Extent3D; +} + +export class BufferImageCopy implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferImageCopy); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferImageCopy) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferImageCopy.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferImageCopy.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferImageCopy.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.bufferOffset !== undefined) this.bufferOffset = data.bufferOffset; + if (data.bufferRowLength !== undefined) this.bufferRowLength = data.bufferRowLength; + if (data.bufferImageHeight !== undefined) this.bufferImageHeight = data.bufferImageHeight; + if (data.imageSubresource !== undefined) this.imageSubresource = data.imageSubresource; + if (data.imageOffset !== undefined) this.imageOffset = data.imageOffset; + if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferImageCopy.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get bufferOffset(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set bufferOffset(value: DeviceSize) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get bufferRowLength(): number { + return this.#view.getUint32(8, LE); + } + + set bufferRowLength(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get bufferImageHeight(): number { + return this.#view.getUint32(12, LE); + } + + set bufferImageHeight(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get imageSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); + } + + set imageSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get imageOffset(): Offset3D { + return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); + } + + set imageOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get imageExtent(): Extent3D { + return new Extent3D(this.#data.subarray(44, 44 + Extent3D.size)); + } + + set imageExtent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 44); + } +} \ No newline at end of file diff --git a/api/struct/BufferImageCopy2.ts b/api/struct/BufferImageCopy2.ts new file mode 100644 index 0000000..569987c --- /dev/null +++ b/api/struct/BufferImageCopy2.ts @@ -0,0 +1,142 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceLayers} from "./ImageSubresourceLayers.ts"; +import {Offset3D} from "./Offset3D.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitBufferImageCopy2 { + pNext?: AnyPointer; + bufferOffset?: DeviceSize; + bufferRowLength?: number; + bufferImageHeight?: number; + imageSubresource?: ImageSubresourceLayers; + imageOffset?: Offset3D; + imageExtent?: Extent3D; +} + +export class BufferImageCopy2 implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferImageCopy2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferImageCopy2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferImageCopy2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferImageCopy2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferImageCopy2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.bufferOffset !== undefined) this.bufferOffset = data.bufferOffset; + if (data.bufferRowLength !== undefined) this.bufferRowLength = data.bufferRowLength; + if (data.bufferImageHeight !== undefined) this.bufferImageHeight = data.bufferImageHeight; + if (data.imageSubresource !== undefined) this.imageSubresource = data.imageSubresource; + if (data.imageOffset !== undefined) this.imageOffset = data.imageOffset; + if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferImageCopy2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_IMAGE_COPY_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get bufferOffset(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set bufferOffset(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get bufferRowLength(): number { + return this.#view.getUint32(24, LE); + } + + set bufferRowLength(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get bufferImageHeight(): number { + return this.#view.getUint32(28, LE); + } + + set bufferImageHeight(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get imageSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(32, 32 + ImageSubresourceLayers.size)); + } + + set imageSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get imageOffset(): Offset3D { + return new Offset3D(this.#data.subarray(48, 48 + Offset3D.size)); + } + + set imageOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 48); + } + + get imageExtent(): Extent3D { + return new Extent3D(this.#data.subarray(60, 60 + Extent3D.size)); + } + + set imageExtent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 60); + } +} \ No newline at end of file diff --git a/api/struct/BufferImageCopy2KHR.ts b/api/struct/BufferImageCopy2KHR.ts new file mode 100644 index 0000000..78daab4 --- /dev/null +++ b/api/struct/BufferImageCopy2KHR.ts @@ -0,0 +1,2 @@ + import { BufferImageCopy2 } from "./BufferImageCopy2.ts"; + export type BufferImageCopy2KHR = BufferImageCopy2; \ No newline at end of file diff --git a/api/struct/BufferMemoryBarrier.ts b/api/struct/BufferMemoryBarrier.ts new file mode 100644 index 0000000..8327be3 --- /dev/null +++ b/api/struct/BufferMemoryBarrier.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AccessFlags, Buffer, DeviceSize } from "../def.ts"; + +export interface InitBufferMemoryBarrier { + pNext?: AnyPointer; + srcAccessMask?: AccessFlags; + dstAccessMask?: AccessFlags; + srcQueueFamilyIndex?: number; + dstQueueFamilyIndex?: number; + buffer?: Buffer; + offset?: DeviceSize; + size?: DeviceSize; +} + +export class BufferMemoryBarrier implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferMemoryBarrier); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferMemoryBarrier) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferMemoryBarrier.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferMemoryBarrier.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferMemoryBarrier.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; + if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; + if (data.srcQueueFamilyIndex !== undefined) this.srcQueueFamilyIndex = data.srcQueueFamilyIndex; + if (data.dstQueueFamilyIndex !== undefined) this.dstQueueFamilyIndex = data.dstQueueFamilyIndex; + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.offset !== undefined) this.offset = data.offset; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferMemoryBarrier.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_MEMORY_BARRIER; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcAccessMask(): number { + return this.#view.getUint32(16, LE); + } + + set srcAccessMask(value: AccessFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get dstAccessMask(): number { + return this.#view.getUint32(20, LE); + } + + set dstAccessMask(value: AccessFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get srcQueueFamilyIndex(): number { + return this.#view.getUint32(24, LE); + } + + set srcQueueFamilyIndex(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get dstQueueFamilyIndex(): number { + return this.#view.getUint32(28, LE); + } + + set dstQueueFamilyIndex(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(48, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(48, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferMemoryBarrier2.ts b/api/struct/BufferMemoryBarrier2.ts new file mode 100644 index 0000000..842e91e --- /dev/null +++ b/api/struct/BufferMemoryBarrier2.ts @@ -0,0 +1,160 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineStageFlags2, AccessFlags2, Buffer, DeviceSize } from "../def.ts"; + +export interface InitBufferMemoryBarrier2 { + pNext?: AnyPointer; + srcStageMask?: PipelineStageFlags2; + srcAccessMask?: AccessFlags2; + dstStageMask?: PipelineStageFlags2; + dstAccessMask?: AccessFlags2; + srcQueueFamilyIndex?: number; + dstQueueFamilyIndex?: number; + buffer?: Buffer; + offset?: DeviceSize; + size?: DeviceSize; +} + +export class BufferMemoryBarrier2 implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferMemoryBarrier2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferMemoryBarrier2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferMemoryBarrier2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferMemoryBarrier2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferMemoryBarrier2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; + if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; + if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; + if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; + if (data.srcQueueFamilyIndex !== undefined) this.srcQueueFamilyIndex = data.srcQueueFamilyIndex; + if (data.dstQueueFamilyIndex !== undefined) this.dstQueueFamilyIndex = data.dstQueueFamilyIndex; + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.offset !== undefined) this.offset = data.offset; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferMemoryBarrier2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_MEMORY_BARRIER_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcStageMask(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set srcStageMask(value: PipelineStageFlags2) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get srcAccessMask(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set srcAccessMask(value: AccessFlags2) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get dstStageMask(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set dstStageMask(value: PipelineStageFlags2) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get dstAccessMask(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set dstAccessMask(value: AccessFlags2) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get srcQueueFamilyIndex(): number { + return this.#view.getUint32(48, LE); + } + + set srcQueueFamilyIndex(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get dstQueueFamilyIndex(): number { + return this.#view.getUint32(52, LE); + } + + set dstQueueFamilyIndex(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(64, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(64, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(72, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(72, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferMemoryBarrier2KHR.ts b/api/struct/BufferMemoryBarrier2KHR.ts new file mode 100644 index 0000000..d34eb8d --- /dev/null +++ b/api/struct/BufferMemoryBarrier2KHR.ts @@ -0,0 +1,2 @@ + import { BufferMemoryBarrier2 } from "./BufferMemoryBarrier2.ts"; + export type BufferMemoryBarrier2KHR = BufferMemoryBarrier2; \ No newline at end of file diff --git a/api/struct/BufferMemoryRequirementsInfo2.ts b/api/struct/BufferMemoryRequirementsInfo2.ts new file mode 100644 index 0000000..e655e0d --- /dev/null +++ b/api/struct/BufferMemoryRequirementsInfo2.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Buffer } from "../def.ts"; + +export interface InitBufferMemoryRequirementsInfo2 { + pNext?: AnyPointer; + buffer?: Buffer; +} + +export class BufferMemoryRequirementsInfo2 implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferMemoryRequirementsInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferMemoryRequirementsInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferMemoryRequirementsInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferMemoryRequirementsInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferMemoryRequirementsInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.buffer !== undefined) this.buffer = data.buffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferMemoryRequirementsInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_MEMORY_REQUIREMENTS_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferMemoryRequirementsInfo2KHR.ts b/api/struct/BufferMemoryRequirementsInfo2KHR.ts new file mode 100644 index 0000000..285c095 --- /dev/null +++ b/api/struct/BufferMemoryRequirementsInfo2KHR.ts @@ -0,0 +1,2 @@ + import { BufferMemoryRequirementsInfo2 } from "./BufferMemoryRequirementsInfo2.ts"; + export type BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2; \ No newline at end of file diff --git a/api/struct/BufferOpaqueCaptureAddressCreateInfo.ts b/api/struct/BufferOpaqueCaptureAddressCreateInfo.ts new file mode 100644 index 0000000..d6ac1ea --- /dev/null +++ b/api/struct/BufferOpaqueCaptureAddressCreateInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitBufferOpaqueCaptureAddressCreateInfo { + pNext?: AnyPointer; + opaqueCaptureAddress?: number | bigint; +} + +export class BufferOpaqueCaptureAddressCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferOpaqueCaptureAddressCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferOpaqueCaptureAddressCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferOpaqueCaptureAddressCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferOpaqueCaptureAddressCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferOpaqueCaptureAddressCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.opaqueCaptureAddress !== undefined) this.opaqueCaptureAddress = data.opaqueCaptureAddress; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferOpaqueCaptureAddressCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get opaqueCaptureAddress(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set opaqueCaptureAddress(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/BufferOpaqueCaptureAddressCreateInfoKHR.ts b/api/struct/BufferOpaqueCaptureAddressCreateInfoKHR.ts new file mode 100644 index 0000000..acf2e5c --- /dev/null +++ b/api/struct/BufferOpaqueCaptureAddressCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { BufferOpaqueCaptureAddressCreateInfo } from "./BufferOpaqueCaptureAddressCreateInfo.ts"; + export type BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo; \ No newline at end of file diff --git a/api/struct/BufferViewCreateInfo.ts b/api/struct/BufferViewCreateInfo.ts new file mode 100644 index 0000000..104f6c0 --- /dev/null +++ b/api/struct/BufferViewCreateInfo.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format } from "../enum.ts"; +import { BufferViewCreateFlags, Buffer, DeviceSize } from "../def.ts"; + +export interface InitBufferViewCreateInfo { + pNext?: AnyPointer; + flags?: BufferViewCreateFlags; + buffer?: Buffer; + format?: Format; + offset?: DeviceSize; + range?: DeviceSize; +} + +export class BufferViewCreateInfo implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitBufferViewCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitBufferViewCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(BufferViewCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < BufferViewCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(BufferViewCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.format !== undefined) this.format = data.format; + if (data.offset !== undefined) this.offset = data.offset; + if (data.range !== undefined) this.range = data.range; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferViewCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.BUFFER_VIEW_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: BufferViewCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get format(): number { + return this.#view.getUint32(32, LE); + } + + set format(value: Format) { + this.#view.setUint32(32, Number(value), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get range(): bigint { + return this.#view.getBigUint64(48, LE); + } + + set range(value: DeviceSize) { + this.#view.setBigUint64(48, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CalibratedTimestampInfoEXT.ts b/api/struct/CalibratedTimestampInfoEXT.ts new file mode 100644 index 0000000..1fb7169 --- /dev/null +++ b/api/struct/CalibratedTimestampInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, TimeDomainEXT } from "../enum.ts"; + +export interface InitCalibratedTimestampInfoEXT { + pNext?: AnyPointer; + timeDomain?: TimeDomainEXT; +} + +export class CalibratedTimestampInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCalibratedTimestampInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCalibratedTimestampInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CalibratedTimestampInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CalibratedTimestampInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CalibratedTimestampInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.timeDomain !== undefined) this.timeDomain = data.timeDomain; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CalibratedTimestampInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.CALIBRATED_TIMESTAMP_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get timeDomain(): number { + return this.#view.getUint32(16, LE); + } + + set timeDomain(value: TimeDomainEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CheckpointData2NV.ts b/api/struct/CheckpointData2NV.ts new file mode 100644 index 0000000..d83fa2d --- /dev/null +++ b/api/struct/CheckpointData2NV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineStageFlags2 } from "../def.ts"; + +export interface InitCheckpointData2NV { + pNext?: AnyPointer; + stage?: PipelineStageFlags2; + pCheckpointMarker?: AnyPointer; +} + +export class CheckpointData2NV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCheckpointData2NV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCheckpointData2NV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CheckpointData2NV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CheckpointData2NV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CheckpointData2NV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stage !== undefined) this.stage = data.stage; + if (data.pCheckpointMarker !== undefined) this.pCheckpointMarker = data.pCheckpointMarker; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CheckpointData2NV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.CHECKPOINT_DATA_2_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stage(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set stage(value: PipelineStageFlags2) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get pCheckpointMarker(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pCheckpointMarker(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/CheckpointDataNV.ts b/api/struct/CheckpointDataNV.ts new file mode 100644 index 0000000..5676a69 --- /dev/null +++ b/api/struct/CheckpointDataNV.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PipelineStageFlagBits } from "../enum.ts"; + +export interface InitCheckpointDataNV { + pNext?: AnyPointer; + stage?: PipelineStageFlagBits; + pCheckpointMarker?: AnyPointer; +} + +export class CheckpointDataNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCheckpointDataNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCheckpointDataNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CheckpointDataNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CheckpointDataNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CheckpointDataNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stage !== undefined) this.stage = data.stage; + if (data.pCheckpointMarker !== undefined) this.pCheckpointMarker = data.pCheckpointMarker; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CheckpointDataNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.CHECKPOINT_DATA_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stage(): number { + return this.#view.getUint32(16, LE); + } + + set stage(value: PipelineStageFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } + + get pCheckpointMarker(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pCheckpointMarker(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ClearAttachment.ts b/api/struct/ClearAttachment.ts new file mode 100644 index 0000000..256832d --- /dev/null +++ b/api/struct/ClearAttachment.ts @@ -0,0 +1,81 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ImageAspectFlags } from "../def.ts"; +import { ClearValue } from "../union.ts"; + +export interface InitClearAttachment { + aspectMask?: ImageAspectFlags; + colorAttachment?: number; + clearValue?: ClearValue; +} + +export class ClearAttachment implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitClearAttachment); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitClearAttachment) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ClearAttachment.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ClearAttachment.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ClearAttachment.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; + if (data.colorAttachment !== undefined) this.colorAttachment = data.colorAttachment; + if (data.clearValue !== undefined) this.clearValue = data.clearValue; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ClearAttachment.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get aspectMask(): number { + return this.#view.getUint32(0, LE); + } + + set aspectMask(value: ImageAspectFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get colorAttachment(): number { + return this.#view.getUint32(4, LE); + } + + set colorAttachment(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get clearValue(): unknown { + throw new Error(`Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}`); + } + + set clearValue(value: ClearValue) { + throw new Error(`Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}`); + } +} \ No newline at end of file diff --git a/api/struct/ClearDepthStencilValue.ts b/api/struct/ClearDepthStencilValue.ts new file mode 100644 index 0000000..67cf71c --- /dev/null +++ b/api/struct/ClearDepthStencilValue.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitClearDepthStencilValue { + depth?: number; + stencil?: number; +} + +export class ClearDepthStencilValue implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitClearDepthStencilValue); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitClearDepthStencilValue) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ClearDepthStencilValue.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ClearDepthStencilValue.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ClearDepthStencilValue.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.depth !== undefined) this.depth = data.depth; + if (data.stencil !== undefined) this.stencil = data.stencil; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ClearDepthStencilValue.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get depth(): number { + return this.#view.getFloat32(0, LE); + } + + set depth(value: number) { + this.#view.setFloat32(0, Number(value), LE); + } + + get stencil(): number { + return this.#view.getUint32(4, LE); + } + + set stencil(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ClearRect.ts b/api/struct/ClearRect.ts new file mode 100644 index 0000000..7941090 --- /dev/null +++ b/api/struct/ClearRect.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; + +export interface InitClearRect { + rect?: Rect2D; + baseArrayLayer?: number; + layerCount?: number; +} + +export class ClearRect implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitClearRect); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitClearRect) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ClearRect.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ClearRect.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ClearRect.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.rect !== undefined) this.rect = data.rect; + if (data.baseArrayLayer !== undefined) this.baseArrayLayer = data.baseArrayLayer; + if (data.layerCount !== undefined) this.layerCount = data.layerCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ClearRect.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get rect(): Rect2D { + return new Rect2D(this.#data.subarray(0, 0 + Rect2D.size)); + } + + set rect(value: Rect2D) { + if (value[BUFFER].byteLength < Rect2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get baseArrayLayer(): number { + return this.#view.getUint32(16, LE); + } + + set baseArrayLayer(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get layerCount(): number { + return this.#view.getUint32(20, LE); + } + + set layerCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CoarseSampleLocationNV.ts b/api/struct/CoarseSampleLocationNV.ts new file mode 100644 index 0000000..4765547 --- /dev/null +++ b/api/struct/CoarseSampleLocationNV.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitCoarseSampleLocationNV { + pixelX?: number; + pixelY?: number; + sample?: number; +} + +export class CoarseSampleLocationNV implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCoarseSampleLocationNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCoarseSampleLocationNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CoarseSampleLocationNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CoarseSampleLocationNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CoarseSampleLocationNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pixelX !== undefined) this.pixelX = data.pixelX; + if (data.pixelY !== undefined) this.pixelY = data.pixelY; + if (data.sample !== undefined) this.sample = data.sample; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CoarseSampleLocationNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get pixelX(): number { + return this.#view.getUint32(0, LE); + } + + set pixelX(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get pixelY(): number { + return this.#view.getUint32(4, LE); + } + + set pixelY(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get sample(): number { + return this.#view.getUint32(8, LE); + } + + set sample(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CoarseSampleOrderCustomNV.ts b/api/struct/CoarseSampleOrderCustomNV.ts new file mode 100644 index 0000000..7b8592a --- /dev/null +++ b/api/struct/CoarseSampleOrderCustomNV.ts @@ -0,0 +1,91 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {CoarseSampleLocationNV} from "./CoarseSampleLocationNV.ts"; +import { ShadingRatePaletteEntryNV } from "../enum.ts"; + +export interface InitCoarseSampleOrderCustomNV { + shadingRate?: ShadingRatePaletteEntryNV; + sampleCount?: number; + sampleLocationCount?: number; + pSampleLocations?: AnyPointer; +} + +export class CoarseSampleOrderCustomNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCoarseSampleOrderCustomNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCoarseSampleOrderCustomNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CoarseSampleOrderCustomNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CoarseSampleOrderCustomNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CoarseSampleOrderCustomNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.shadingRate !== undefined) this.shadingRate = data.shadingRate; + if (data.sampleCount !== undefined) this.sampleCount = data.sampleCount; + if (data.sampleLocationCount !== undefined) this.sampleLocationCount = data.sampleLocationCount; + if (data.pSampleLocations !== undefined) this.pSampleLocations = data.pSampleLocations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CoarseSampleOrderCustomNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get shadingRate(): number { + return this.#view.getUint32(0, LE); + } + + set shadingRate(value: ShadingRatePaletteEntryNV) { + this.#view.setUint32(0, Number(value), LE); + } + + get sampleCount(): number { + return this.#view.getUint32(4, LE); + } + + set sampleCount(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get sampleLocationCount(): number { + return this.#view.getUint32(8, LE); + } + + set sampleLocationCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get pSampleLocations(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pSampleLocations(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ColorBlendAdvancedEXT.ts b/api/struct/ColorBlendAdvancedEXT.ts new file mode 100644 index 0000000..7c6dc53 --- /dev/null +++ b/api/struct/ColorBlendAdvancedEXT.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { BlendOp, BlendOverlapEXT } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitColorBlendAdvancedEXT { + advancedBlendOp?: BlendOp; + srcPremultiplied?: Bool32; + dstPremultiplied?: Bool32; + blendOverlap?: BlendOverlapEXT; + clampResults?: Bool32; +} + +export class ColorBlendAdvancedEXT implements BaseStruct { + static size = 20; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitColorBlendAdvancedEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitColorBlendAdvancedEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ColorBlendAdvancedEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ColorBlendAdvancedEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ColorBlendAdvancedEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.advancedBlendOp !== undefined) this.advancedBlendOp = data.advancedBlendOp; + if (data.srcPremultiplied !== undefined) this.srcPremultiplied = data.srcPremultiplied; + if (data.dstPremultiplied !== undefined) this.dstPremultiplied = data.dstPremultiplied; + if (data.blendOverlap !== undefined) this.blendOverlap = data.blendOverlap; + if (data.clampResults !== undefined) this.clampResults = data.clampResults; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ColorBlendAdvancedEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get advancedBlendOp(): number { + return this.#view.getUint32(0, LE); + } + + set advancedBlendOp(value: BlendOp) { + this.#view.setUint32(0, Number(value), LE); + } + + get srcPremultiplied(): number { + return this.#view.getUint32(4, LE); + } + + set srcPremultiplied(value: Bool32) { + this.#view.setUint32(4, Number(value), LE); + } + + get dstPremultiplied(): number { + return this.#view.getUint32(8, LE); + } + + set dstPremultiplied(value: Bool32) { + this.#view.setUint32(8, Number(value), LE); + } + + get blendOverlap(): number { + return this.#view.getUint32(12, LE); + } + + set blendOverlap(value: BlendOverlapEXT) { + this.#view.setUint32(12, Number(value), LE); + } + + get clampResults(): number { + return this.#view.getUint32(16, LE); + } + + set clampResults(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ColorBlendEquationEXT.ts b/api/struct/ColorBlendEquationEXT.ts new file mode 100644 index 0000000..b7792b2 --- /dev/null +++ b/api/struct/ColorBlendEquationEXT.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { BlendFactor, BlendOp } from "../enum.ts"; + +export interface InitColorBlendEquationEXT { + srcColorBlendFactor?: BlendFactor; + dstColorBlendFactor?: BlendFactor; + colorBlendOp?: BlendOp; + srcAlphaBlendFactor?: BlendFactor; + dstAlphaBlendFactor?: BlendFactor; + alphaBlendOp?: BlendOp; +} + +export class ColorBlendEquationEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitColorBlendEquationEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitColorBlendEquationEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ColorBlendEquationEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ColorBlendEquationEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ColorBlendEquationEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.srcColorBlendFactor !== undefined) this.srcColorBlendFactor = data.srcColorBlendFactor; + if (data.dstColorBlendFactor !== undefined) this.dstColorBlendFactor = data.dstColorBlendFactor; + if (data.colorBlendOp !== undefined) this.colorBlendOp = data.colorBlendOp; + if (data.srcAlphaBlendFactor !== undefined) this.srcAlphaBlendFactor = data.srcAlphaBlendFactor; + if (data.dstAlphaBlendFactor !== undefined) this.dstAlphaBlendFactor = data.dstAlphaBlendFactor; + if (data.alphaBlendOp !== undefined) this.alphaBlendOp = data.alphaBlendOp; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ColorBlendEquationEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get srcColorBlendFactor(): number { + return this.#view.getUint32(0, LE); + } + + set srcColorBlendFactor(value: BlendFactor) { + this.#view.setUint32(0, Number(value), LE); + } + + get dstColorBlendFactor(): number { + return this.#view.getUint32(4, LE); + } + + set dstColorBlendFactor(value: BlendFactor) { + this.#view.setUint32(4, Number(value), LE); + } + + get colorBlendOp(): number { + return this.#view.getUint32(8, LE); + } + + set colorBlendOp(value: BlendOp) { + this.#view.setUint32(8, Number(value), LE); + } + + get srcAlphaBlendFactor(): number { + return this.#view.getUint32(12, LE); + } + + set srcAlphaBlendFactor(value: BlendFactor) { + this.#view.setUint32(12, Number(value), LE); + } + + get dstAlphaBlendFactor(): number { + return this.#view.getUint32(16, LE); + } + + set dstAlphaBlendFactor(value: BlendFactor) { + this.#view.setUint32(16, Number(value), LE); + } + + get alphaBlendOp(): number { + return this.#view.getUint32(20, LE); + } + + set alphaBlendOp(value: BlendOp) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CommandBufferAllocateInfo.ts b/api/struct/CommandBufferAllocateInfo.ts new file mode 100644 index 0000000..76a4ad8 --- /dev/null +++ b/api/struct/CommandBufferAllocateInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CommandBufferLevel } from "../enum.ts"; +import { CommandPool } from "../def.ts"; + +export interface InitCommandBufferAllocateInfo { + pNext?: AnyPointer; + commandPool?: CommandPool; + level?: CommandBufferLevel; + commandBufferCount?: number; +} + +export class CommandBufferAllocateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCommandBufferAllocateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferAllocateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CommandBufferAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CommandBufferAllocateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CommandBufferAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.commandPool !== undefined) this.commandPool = data.commandPool; + if (data.level !== undefined) this.level = data.level; + if (data.commandBufferCount !== undefined) this.commandBufferCount = data.commandBufferCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferAllocateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMMAND_BUFFER_ALLOCATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get commandPool(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set commandPool(value: CommandPool) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get level(): number { + return this.#view.getUint32(24, LE); + } + + set level(value: CommandBufferLevel) { + this.#view.setUint32(24, Number(value), LE); + } + + get commandBufferCount(): number { + return this.#view.getUint32(28, LE); + } + + set commandBufferCount(value: number) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CommandBufferBeginInfo.ts b/api/struct/CommandBufferBeginInfo.ts new file mode 100644 index 0000000..fe9984d --- /dev/null +++ b/api/struct/CommandBufferBeginInfo.ts @@ -0,0 +1,91 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {CommandBufferInheritanceInfo} from "./CommandBufferInheritanceInfo.ts"; +import { StructureType } from "../enum.ts"; +import { CommandBufferUsageFlags } from "../def.ts"; + +export interface InitCommandBufferBeginInfo { + pNext?: AnyPointer; + flags?: CommandBufferUsageFlags; + pInheritanceInfo?: AnyPointer; +} + +export class CommandBufferBeginInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCommandBufferBeginInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferBeginInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CommandBufferBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CommandBufferBeginInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CommandBufferBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pInheritanceInfo !== undefined) this.pInheritanceInfo = data.pInheritanceInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferBeginInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMMAND_BUFFER_BEGIN_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: CommandBufferUsageFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get pInheritanceInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pInheritanceInfo(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/CommandBufferInheritanceConditionalRenderingInfoEXT.ts b/api/struct/CommandBufferInheritanceConditionalRenderingInfoEXT.ts new file mode 100644 index 0000000..5c652db --- /dev/null +++ b/api/struct/CommandBufferInheritanceConditionalRenderingInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitCommandBufferInheritanceConditionalRenderingInfoEXT { + pNext?: AnyPointer; + conditionalRenderingEnable?: Bool32; +} + +export class CommandBufferInheritanceConditionalRenderingInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCommandBufferInheritanceConditionalRenderingInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceConditionalRenderingInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CommandBufferInheritanceConditionalRenderingInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CommandBufferInheritanceConditionalRenderingInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CommandBufferInheritanceConditionalRenderingInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.conditionalRenderingEnable !== undefined) this.conditionalRenderingEnable = data.conditionalRenderingEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceConditionalRenderingInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get conditionalRenderingEnable(): number { + return this.#view.getUint32(16, LE); + } + + set conditionalRenderingEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CommandBufferInheritanceInfo.ts b/api/struct/CommandBufferInheritanceInfo.ts new file mode 100644 index 0000000..eab69db --- /dev/null +++ b/api/struct/CommandBufferInheritanceInfo.ts @@ -0,0 +1,130 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { RenderPass, Framebuffer, Bool32, QueryControlFlags, QueryPipelineStatisticFlags } from "../def.ts"; + +export interface InitCommandBufferInheritanceInfo { + pNext?: AnyPointer; + renderPass?: RenderPass; + subpass?: number; + framebuffer?: Framebuffer; + occlusionQueryEnable?: Bool32; + queryFlags?: QueryControlFlags; + pipelineStatistics?: QueryPipelineStatisticFlags; +} + +export class CommandBufferInheritanceInfo implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCommandBufferInheritanceInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CommandBufferInheritanceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CommandBufferInheritanceInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CommandBufferInheritanceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.renderPass !== undefined) this.renderPass = data.renderPass; + if (data.subpass !== undefined) this.subpass = data.subpass; + if (data.framebuffer !== undefined) this.framebuffer = data.framebuffer; + if (data.occlusionQueryEnable !== undefined) this.occlusionQueryEnable = data.occlusionQueryEnable; + if (data.queryFlags !== undefined) this.queryFlags = data.queryFlags; + if (data.pipelineStatistics !== undefined) this.pipelineStatistics = data.pipelineStatistics; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get renderPass(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set renderPass(value: RenderPass) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get subpass(): number { + return this.#view.getUint32(24, LE); + } + + set subpass(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get framebuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set framebuffer(value: Framebuffer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get occlusionQueryEnable(): number { + return this.#view.getUint32(40, LE); + } + + set occlusionQueryEnable(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get queryFlags(): number { + return this.#view.getUint32(44, LE); + } + + set queryFlags(value: QueryControlFlags) { + this.#view.setUint32(44, Number(value), LE); + } + + get pipelineStatistics(): number { + return this.#view.getUint32(48, LE); + } + + set pipelineStatistics(value: QueryPipelineStatisticFlags) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CommandBufferInheritanceRenderPassTransformInfoQCOM.ts b/api/struct/CommandBufferInheritanceRenderPassTransformInfoQCOM.ts new file mode 100644 index 0000000..270967c --- /dev/null +++ b/api/struct/CommandBufferInheritanceRenderPassTransformInfoQCOM.ts @@ -0,0 +1,93 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; +import { StructureType, SurfaceTransformFlagBitsKHR } from "../enum.ts"; + +export interface InitCommandBufferInheritanceRenderPassTransformInfoQCOM { + pNext?: AnyPointer; + transform?: SurfaceTransformFlagBitsKHR; + renderArea?: Rect2D; +} + +export class CommandBufferInheritanceRenderPassTransformInfoQCOM implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCommandBufferInheritanceRenderPassTransformInfoQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceRenderPassTransformInfoQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CommandBufferInheritanceRenderPassTransformInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CommandBufferInheritanceRenderPassTransformInfoQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CommandBufferInheritanceRenderPassTransformInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.transform !== undefined) this.transform = data.transform; + if (data.renderArea !== undefined) this.renderArea = data.renderArea; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceRenderPassTransformInfoQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get transform(): number { + return this.#view.getUint32(16, LE); + } + + set transform(value: SurfaceTransformFlagBitsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get renderArea(): Rect2D { + return new Rect2D(this.#data.subarray(20, 20 + Rect2D.size)); + } + + set renderArea(value: Rect2D) { + if (value[BUFFER].byteLength < Rect2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } +} \ No newline at end of file diff --git a/api/struct/CommandBufferInheritanceRenderingInfo.ts b/api/struct/CommandBufferInheritanceRenderingInfo.ts new file mode 100644 index 0000000..e88bcd5 --- /dev/null +++ b/api/struct/CommandBufferInheritanceRenderingInfo.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format, SampleCountFlagBits } from "../enum.ts"; +import { RenderingFlags } from "../def.ts"; + +export interface InitCommandBufferInheritanceRenderingInfo { + pNext?: AnyPointer; + flags?: RenderingFlags; + viewMask?: number; + colorAttachmentCount?: number; + pColorAttachmentFormats?: AnyPointer; + depthAttachmentFormat?: Format; + stencilAttachmentFormat?: Format; + rasterizationSamples?: SampleCountFlagBits; +} + +export class CommandBufferInheritanceRenderingInfo implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCommandBufferInheritanceRenderingInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceRenderingInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CommandBufferInheritanceRenderingInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CommandBufferInheritanceRenderingInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CommandBufferInheritanceRenderingInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.viewMask !== undefined) this.viewMask = data.viewMask; + if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; + if (data.pColorAttachmentFormats !== undefined) this.pColorAttachmentFormats = data.pColorAttachmentFormats; + if (data.depthAttachmentFormat !== undefined) this.depthAttachmentFormat = data.depthAttachmentFormat; + if (data.stencilAttachmentFormat !== undefined) this.stencilAttachmentFormat = data.stencilAttachmentFormat; + if (data.rasterizationSamples !== undefined) this.rasterizationSamples = data.rasterizationSamples; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceRenderingInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_RENDERING_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: RenderingFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get viewMask(): number { + return this.#view.getUint32(20, LE); + } + + set viewMask(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get colorAttachmentCount(): number { + return this.#view.getUint32(24, LE); + } + + set colorAttachmentCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pColorAttachmentFormats(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pColorAttachmentFormats(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get depthAttachmentFormat(): number { + return this.#view.getUint32(40, LE); + } + + set depthAttachmentFormat(value: Format) { + this.#view.setUint32(40, Number(value), LE); + } + + get stencilAttachmentFormat(): number { + return this.#view.getUint32(44, LE); + } + + set stencilAttachmentFormat(value: Format) { + this.#view.setUint32(44, Number(value), LE); + } + + get rasterizationSamples(): number { + return this.#view.getUint32(48, LE); + } + + set rasterizationSamples(value: SampleCountFlagBits) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CommandBufferInheritanceRenderingInfoKHR.ts b/api/struct/CommandBufferInheritanceRenderingInfoKHR.ts new file mode 100644 index 0000000..d5f2cb7 --- /dev/null +++ b/api/struct/CommandBufferInheritanceRenderingInfoKHR.ts @@ -0,0 +1,2 @@ + import { CommandBufferInheritanceRenderingInfo } from "./CommandBufferInheritanceRenderingInfo.ts"; + export type CommandBufferInheritanceRenderingInfoKHR = CommandBufferInheritanceRenderingInfo; \ No newline at end of file diff --git a/api/struct/CommandBufferInheritanceViewportScissorInfoNV.ts b/api/struct/CommandBufferInheritanceViewportScissorInfoNV.ts new file mode 100644 index 0000000..51965b9 --- /dev/null +++ b/api/struct/CommandBufferInheritanceViewportScissorInfoNV.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Viewport} from "./Viewport.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitCommandBufferInheritanceViewportScissorInfoNV { + pNext?: AnyPointer; + viewportScissor2D?: Bool32; + viewportDepthCount?: number; + pViewportDepths?: AnyPointer; +} + +export class CommandBufferInheritanceViewportScissorInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCommandBufferInheritanceViewportScissorInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceViewportScissorInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CommandBufferInheritanceViewportScissorInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CommandBufferInheritanceViewportScissorInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CommandBufferInheritanceViewportScissorInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.viewportScissor2D !== undefined) this.viewportScissor2D = data.viewportScissor2D; + if (data.viewportDepthCount !== undefined) this.viewportDepthCount = data.viewportDepthCount; + if (data.pViewportDepths !== undefined) this.pViewportDepths = data.pViewportDepths; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceViewportScissorInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get viewportScissor2D(): number { + return this.#view.getUint32(16, LE); + } + + set viewportScissor2D(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get viewportDepthCount(): number { + return this.#view.getUint32(20, LE); + } + + set viewportDepthCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pViewportDepths(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pViewportDepths(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/CommandBufferSubmitInfo.ts b/api/struct/CommandBufferSubmitInfo.ts new file mode 100644 index 0000000..2cca779 --- /dev/null +++ b/api/struct/CommandBufferSubmitInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { CommandBuffer } from "../def.ts"; + +export interface InitCommandBufferSubmitInfo { + pNext?: AnyPointer; + commandBuffer?: CommandBuffer; + deviceMask?: number; +} + +export class CommandBufferSubmitInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCommandBufferSubmitInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferSubmitInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CommandBufferSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CommandBufferSubmitInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CommandBufferSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.commandBuffer !== undefined) this.commandBuffer = data.commandBuffer; + if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferSubmitInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMMAND_BUFFER_SUBMIT_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get commandBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set commandBuffer(value: CommandBuffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get deviceMask(): number { + return this.#view.getUint32(24, LE); + } + + set deviceMask(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CommandBufferSubmitInfoKHR.ts b/api/struct/CommandBufferSubmitInfoKHR.ts new file mode 100644 index 0000000..86effd4 --- /dev/null +++ b/api/struct/CommandBufferSubmitInfoKHR.ts @@ -0,0 +1,2 @@ + import { CommandBufferSubmitInfo } from "./CommandBufferSubmitInfo.ts"; + export type CommandBufferSubmitInfoKHR = CommandBufferSubmitInfo; \ No newline at end of file diff --git a/api/struct/CommandPoolCreateInfo.ts b/api/struct/CommandPoolCreateInfo.ts new file mode 100644 index 0000000..1624736 --- /dev/null +++ b/api/struct/CommandPoolCreateInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { CommandPoolCreateFlags } from "../def.ts"; + +export interface InitCommandPoolCreateInfo { + pNext?: AnyPointer; + flags?: CommandPoolCreateFlags; + queueFamilyIndex?: number; +} + +export class CommandPoolCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCommandPoolCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCommandPoolCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CommandPoolCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CommandPoolCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CommandPoolCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandPoolCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMMAND_POOL_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: CommandPoolCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get queueFamilyIndex(): number { + return this.#view.getUint32(20, LE); + } + + set queueFamilyIndex(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ComponentMapping.ts b/api/struct/ComponentMapping.ts new file mode 100644 index 0000000..98cf900 --- /dev/null +++ b/api/struct/ComponentMapping.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ComponentSwizzle } from "../enum.ts"; + +export interface InitComponentMapping { + r?: ComponentSwizzle; + g?: ComponentSwizzle; + b?: ComponentSwizzle; + a?: ComponentSwizzle; +} + +export class ComponentMapping implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitComponentMapping); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitComponentMapping) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ComponentMapping.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ComponentMapping.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ComponentMapping.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.r !== undefined) this.r = data.r; + if (data.g !== undefined) this.g = data.g; + if (data.b !== undefined) this.b = data.b; + if (data.a !== undefined) this.a = data.a; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ComponentMapping.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get r(): number { + return this.#view.getUint32(0, LE); + } + + set r(value: ComponentSwizzle) { + this.#view.setUint32(0, Number(value), LE); + } + + get g(): number { + return this.#view.getUint32(4, LE); + } + + set g(value: ComponentSwizzle) { + this.#view.setUint32(4, Number(value), LE); + } + + get b(): number { + return this.#view.getUint32(8, LE); + } + + set b(value: ComponentSwizzle) { + this.#view.setUint32(8, Number(value), LE); + } + + get a(): number { + return this.#view.getUint32(12, LE); + } + + set a(value: ComponentSwizzle) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ComputePipelineCreateInfo.ts b/api/struct/ComputePipelineCreateInfo.ts new file mode 100644 index 0000000..5a9c8f6 --- /dev/null +++ b/api/struct/ComputePipelineCreateInfo.ts @@ -0,0 +1,124 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PipelineShaderStageCreateInfo} from "./PipelineShaderStageCreateInfo.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineCreateFlags, PipelineLayout, Pipeline } from "../def.ts"; + +export interface InitComputePipelineCreateInfo { + pNext?: AnyPointer; + flags?: PipelineCreateFlags; + stage?: PipelineShaderStageCreateInfo; + layout?: PipelineLayout; + basePipelineHandle?: Pipeline; + basePipelineIndex?: number; +} + +export class ComputePipelineCreateInfo implements BaseStruct { + static size = 96; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitComputePipelineCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitComputePipelineCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ComputePipelineCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ComputePipelineCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ComputePipelineCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.stage !== undefined) this.stage = data.stage; + if (data.layout !== undefined) this.layout = data.layout; + if (data.basePipelineHandle !== undefined) this.basePipelineHandle = data.basePipelineHandle; + if (data.basePipelineIndex !== undefined) this.basePipelineIndex = data.basePipelineIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ComputePipelineCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COMPUTE_PIPELINE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get stage(): PipelineShaderStageCreateInfo { + return new PipelineShaderStageCreateInfo(this.#data.subarray(24, 24 + PipelineShaderStageCreateInfo.size)); + } + + set stage(value: PipelineShaderStageCreateInfo) { + if (value[BUFFER].byteLength < PipelineShaderStageCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get layout(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set layout(value: PipelineLayout) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } + + get basePipelineHandle(): Deno.PointerValue { + return pointerFromView(this.#view, 80, LE); + } + + set basePipelineHandle(value: Pipeline) { + this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); + } + + get basePipelineIndex(): number { + return this.#view.getInt32(88, LE); + } + + set basePipelineIndex(value: number) { + this.#view.setInt32(88, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ConditionalRenderingBeginInfoEXT.ts b/api/struct/ConditionalRenderingBeginInfoEXT.ts new file mode 100644 index 0000000..c8661f7 --- /dev/null +++ b/api/struct/ConditionalRenderingBeginInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Buffer, DeviceSize, ConditionalRenderingFlagsEXT } from "../def.ts"; + +export interface InitConditionalRenderingBeginInfoEXT { + pNext?: AnyPointer; + buffer?: Buffer; + offset?: DeviceSize; + flags?: ConditionalRenderingFlagsEXT; +} + +export class ConditionalRenderingBeginInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitConditionalRenderingBeginInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitConditionalRenderingBeginInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ConditionalRenderingBeginInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ConditionalRenderingBeginInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ConditionalRenderingBeginInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.offset !== undefined) this.offset = data.offset; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ConditionalRenderingBeginInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.CONDITIONAL_RENDERING_BEGIN_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get flags(): number { + return this.#view.getUint32(32, LE); + } + + set flags(value: ConditionalRenderingFlagsEXT) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ConformanceVersion.ts b/api/struct/ConformanceVersion.ts new file mode 100644 index 0000000..753edba --- /dev/null +++ b/api/struct/ConformanceVersion.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitConformanceVersion { + major?: number; + minor?: number; + subminor?: number; + patch?: number; +} + +export class ConformanceVersion implements BaseStruct { + static size = 4; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitConformanceVersion); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitConformanceVersion) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ConformanceVersion.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ConformanceVersion.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ConformanceVersion.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.major !== undefined) this.major = data.major; + if (data.minor !== undefined) this.minor = data.minor; + if (data.subminor !== undefined) this.subminor = data.subminor; + if (data.patch !== undefined) this.patch = data.patch; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ConformanceVersion.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get major(): number { + return this.#view.getUint8(0); + } + + set major(value: number) { + this.#view.setUint8(0, Number(value)); + } + + get minor(): number { + return this.#view.getUint8(1); + } + + set minor(value: number) { + this.#view.setUint8(1, Number(value)); + } + + get subminor(): number { + return this.#view.getUint8(2); + } + + set subminor(value: number) { + this.#view.setUint8(2, Number(value)); + } + + get patch(): number { + return this.#view.getUint8(3); + } + + set patch(value: number) { + this.#view.setUint8(3, Number(value)); + } +} \ No newline at end of file diff --git a/api/struct/ConformanceVersionKHR.ts b/api/struct/ConformanceVersionKHR.ts new file mode 100644 index 0000000..287bb46 --- /dev/null +++ b/api/struct/ConformanceVersionKHR.ts @@ -0,0 +1,2 @@ + import { ConformanceVersion } from "./ConformanceVersion.ts"; + export type ConformanceVersionKHR = ConformanceVersion; \ No newline at end of file diff --git a/api/struct/CooperativeMatrixPropertiesNV.ts b/api/struct/CooperativeMatrixPropertiesNV.ts new file mode 100644 index 0000000..3f9e262 --- /dev/null +++ b/api/struct/CooperativeMatrixPropertiesNV.ts @@ -0,0 +1,149 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ComponentTypeNV, ScopeNV } from "../enum.ts"; + +export interface InitCooperativeMatrixPropertiesNV { + pNext?: AnyPointer; + MSize?: number; + NSize?: number; + KSize?: number; + AType?: ComponentTypeNV; + BType?: ComponentTypeNV; + CType?: ComponentTypeNV; + DType?: ComponentTypeNV; + scope?: ScopeNV; +} + +export class CooperativeMatrixPropertiesNV implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCooperativeMatrixPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCooperativeMatrixPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CooperativeMatrixPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CooperativeMatrixPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CooperativeMatrixPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.MSize !== undefined) this.MSize = data.MSize; + if (data.NSize !== undefined) this.NSize = data.NSize; + if (data.KSize !== undefined) this.KSize = data.KSize; + if (data.AType !== undefined) this.AType = data.AType; + if (data.BType !== undefined) this.BType = data.BType; + if (data.CType !== undefined) this.CType = data.CType; + if (data.DType !== undefined) this.DType = data.DType; + if (data.scope !== undefined) this.scope = data.scope; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CooperativeMatrixPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COOPERATIVE_MATRIX_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get MSize(): number { + return this.#view.getUint32(16, LE); + } + + set MSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get NSize(): number { + return this.#view.getUint32(20, LE); + } + + set NSize(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get KSize(): number { + return this.#view.getUint32(24, LE); + } + + set KSize(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get AType(): number { + return this.#view.getUint32(28, LE); + } + + set AType(value: ComponentTypeNV) { + this.#view.setUint32(28, Number(value), LE); + } + + get BType(): number { + return this.#view.getUint32(32, LE); + } + + set BType(value: ComponentTypeNV) { + this.#view.setUint32(32, Number(value), LE); + } + + get CType(): number { + return this.#view.getUint32(36, LE); + } + + set CType(value: ComponentTypeNV) { + this.#view.setUint32(36, Number(value), LE); + } + + get DType(): number { + return this.#view.getUint32(40, LE); + } + + set DType(value: ComponentTypeNV) { + this.#view.setUint32(40, Number(value), LE); + } + + get scope(): number { + return this.#view.getUint32(44, LE); + } + + set scope(value: ScopeNV) { + this.#view.setUint32(44, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyAccelerationStructureInfoKHR.ts b/api/struct/CopyAccelerationStructureInfoKHR.ts new file mode 100644 index 0000000..00a3ccf --- /dev/null +++ b/api/struct/CopyAccelerationStructureInfoKHR.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CopyAccelerationStructureModeKHR } from "../enum.ts"; +import { AccelerationStructureKHR } from "../def.ts"; + +export interface InitCopyAccelerationStructureInfoKHR { + pNext?: AnyPointer; + src?: AccelerationStructureKHR; + dst?: AccelerationStructureKHR; + mode?: CopyAccelerationStructureModeKHR; +} + +export class CopyAccelerationStructureInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyAccelerationStructureInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyAccelerationStructureInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyAccelerationStructureInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyAccelerationStructureInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyAccelerationStructureInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.src !== undefined) this.src = data.src; + if (data.dst !== undefined) this.dst = data.dst; + if (data.mode !== undefined) this.mode = data.mode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyAccelerationStructureInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_ACCELERATION_STRUCTURE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get src(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set src(value: AccelerationStructureKHR) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dst(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set dst(value: AccelerationStructureKHR) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get mode(): number { + return this.#view.getUint32(32, LE); + } + + set mode(value: CopyAccelerationStructureModeKHR) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyAccelerationStructureToMemoryInfoKHR.ts b/api/struct/CopyAccelerationStructureToMemoryInfoKHR.ts new file mode 100644 index 0000000..b576d53 --- /dev/null +++ b/api/struct/CopyAccelerationStructureToMemoryInfoKHR.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CopyAccelerationStructureModeKHR } from "../enum.ts"; +import { AccelerationStructureKHR } from "../def.ts"; +import { DeviceOrHostAddressKHR } from "../union.ts"; + +export interface InitCopyAccelerationStructureToMemoryInfoKHR { + pNext?: AnyPointer; + src?: AccelerationStructureKHR; + dst?: DeviceOrHostAddressKHR; + mode?: CopyAccelerationStructureModeKHR; +} + +export class CopyAccelerationStructureToMemoryInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyAccelerationStructureToMemoryInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyAccelerationStructureToMemoryInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyAccelerationStructureToMemoryInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyAccelerationStructureToMemoryInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyAccelerationStructureToMemoryInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.src !== undefined) this.src = data.src; + if (data.dst !== undefined) this.dst = data.dst; + if (data.mode !== undefined) this.mode = data.mode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyAccelerationStructureToMemoryInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get src(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set src(value: AccelerationStructureKHR) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dst(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set dst(value: DeviceOrHostAddressKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get mode(): number { + return this.#view.getUint32(32, LE); + } + + set mode(value: CopyAccelerationStructureModeKHR) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyBufferInfo2.ts b/api/struct/CopyBufferInfo2.ts new file mode 100644 index 0000000..602c1cd --- /dev/null +++ b/api/struct/CopyBufferInfo2.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {BufferCopy2} from "./BufferCopy2.ts"; +import { StructureType } from "../enum.ts"; +import { Buffer } from "../def.ts"; + +export interface InitCopyBufferInfo2 { + pNext?: AnyPointer; + srcBuffer?: Buffer; + dstBuffer?: Buffer; + regionCount?: number; + pRegions?: AnyPointer; +} + +export class CopyBufferInfo2 implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyBufferInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyBufferInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyBufferInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyBufferInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyBufferInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcBuffer !== undefined) this.srcBuffer = data.srcBuffer; + if (data.dstBuffer !== undefined) this.dstBuffer = data.dstBuffer; + if (data.regionCount !== undefined) this.regionCount = data.regionCount; + if (data.pRegions !== undefined) this.pRegions = data.pRegions; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyBufferInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_BUFFER_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set srcBuffer(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dstBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set dstBuffer(value: Buffer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get regionCount(): number { + return this.#view.getUint32(32, LE); + } + + set regionCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pRegions(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pRegions(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyBufferInfo2KHR.ts b/api/struct/CopyBufferInfo2KHR.ts new file mode 100644 index 0000000..7f3579d --- /dev/null +++ b/api/struct/CopyBufferInfo2KHR.ts @@ -0,0 +1,2 @@ + import { CopyBufferInfo2 } from "./CopyBufferInfo2.ts"; + export type CopyBufferInfo2KHR = CopyBufferInfo2; \ No newline at end of file diff --git a/api/struct/CopyBufferToImageInfo2.ts b/api/struct/CopyBufferToImageInfo2.ts new file mode 100644 index 0000000..4db6c45 --- /dev/null +++ b/api/struct/CopyBufferToImageInfo2.ts @@ -0,0 +1,121 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {BufferImageCopy2} from "./BufferImageCopy2.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; +import { Buffer, Image } from "../def.ts"; + +export interface InitCopyBufferToImageInfo2 { + pNext?: AnyPointer; + srcBuffer?: Buffer; + dstImage?: Image; + dstImageLayout?: ImageLayout; + regionCount?: number; + pRegions?: AnyPointer; +} + +export class CopyBufferToImageInfo2 implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyBufferToImageInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyBufferToImageInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyBufferToImageInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyBufferToImageInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyBufferToImageInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcBuffer !== undefined) this.srcBuffer = data.srcBuffer; + if (data.dstImage !== undefined) this.dstImage = data.dstImage; + if (data.dstImageLayout !== undefined) this.dstImageLayout = data.dstImageLayout; + if (data.regionCount !== undefined) this.regionCount = data.regionCount; + if (data.pRegions !== undefined) this.pRegions = data.pRegions; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyBufferToImageInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_BUFFER_TO_IMAGE_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set srcBuffer(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dstImage(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set dstImage(value: Image) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get dstImageLayout(): number { + return this.#view.getUint32(32, LE); + } + + set dstImageLayout(value: ImageLayout) { + this.#view.setUint32(32, Number(value), LE); + } + + get regionCount(): number { + return this.#view.getUint32(36, LE); + } + + set regionCount(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get pRegions(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pRegions(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyBufferToImageInfo2KHR.ts b/api/struct/CopyBufferToImageInfo2KHR.ts new file mode 100644 index 0000000..3ff9b23 --- /dev/null +++ b/api/struct/CopyBufferToImageInfo2KHR.ts @@ -0,0 +1,2 @@ + import { CopyBufferToImageInfo2 } from "./CopyBufferToImageInfo2.ts"; + export type CopyBufferToImageInfo2KHR = CopyBufferToImageInfo2; \ No newline at end of file diff --git a/api/struct/CopyCommandTransformInfoQCOM.ts b/api/struct/CopyCommandTransformInfoQCOM.ts new file mode 100644 index 0000000..b0d7d34 --- /dev/null +++ b/api/struct/CopyCommandTransformInfoQCOM.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SurfaceTransformFlagBitsKHR } from "../enum.ts"; + +export interface InitCopyCommandTransformInfoQCOM { + pNext?: AnyPointer; + transform?: SurfaceTransformFlagBitsKHR; +} + +export class CopyCommandTransformInfoQCOM implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyCommandTransformInfoQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyCommandTransformInfoQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyCommandTransformInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyCommandTransformInfoQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyCommandTransformInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.transform !== undefined) this.transform = data.transform; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyCommandTransformInfoQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_COMMAND_TRANSFORM_INFO_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get transform(): number { + return this.#view.getUint32(16, LE); + } + + set transform(value: SurfaceTransformFlagBitsKHR) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyDescriptorSet.ts b/api/struct/CopyDescriptorSet.ts new file mode 100644 index 0000000..c563174 --- /dev/null +++ b/api/struct/CopyDescriptorSet.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DescriptorSet } from "../def.ts"; + +export interface InitCopyDescriptorSet { + pNext?: AnyPointer; + srcSet?: DescriptorSet; + srcBinding?: number; + srcArrayElement?: number; + dstSet?: DescriptorSet; + dstBinding?: number; + dstArrayElement?: number; + descriptorCount?: number; +} + +export class CopyDescriptorSet implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyDescriptorSet); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyDescriptorSet) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyDescriptorSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyDescriptorSet.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyDescriptorSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcSet !== undefined) this.srcSet = data.srcSet; + if (data.srcBinding !== undefined) this.srcBinding = data.srcBinding; + if (data.srcArrayElement !== undefined) this.srcArrayElement = data.srcArrayElement; + if (data.dstSet !== undefined) this.dstSet = data.dstSet; + if (data.dstBinding !== undefined) this.dstBinding = data.dstBinding; + if (data.dstArrayElement !== undefined) this.dstArrayElement = data.dstArrayElement; + if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyDescriptorSet.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_DESCRIPTOR_SET; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcSet(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set srcSet(value: DescriptorSet) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get srcBinding(): number { + return this.#view.getUint32(24, LE); + } + + set srcBinding(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get srcArrayElement(): number { + return this.#view.getUint32(28, LE); + } + + set srcArrayElement(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get dstSet(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set dstSet(value: DescriptorSet) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get dstBinding(): number { + return this.#view.getUint32(40, LE); + } + + set dstBinding(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get dstArrayElement(): number { + return this.#view.getUint32(44, LE); + } + + set dstArrayElement(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get descriptorCount(): number { + return this.#view.getUint32(48, LE); + } + + set descriptorCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyImageInfo2.ts b/api/struct/CopyImageInfo2.ts new file mode 100644 index 0000000..f5c8c63 --- /dev/null +++ b/api/struct/CopyImageInfo2.ts @@ -0,0 +1,131 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageCopy2} from "./ImageCopy2.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; +import { Image } from "../def.ts"; + +export interface InitCopyImageInfo2 { + pNext?: AnyPointer; + srcImage?: Image; + srcImageLayout?: ImageLayout; + dstImage?: Image; + dstImageLayout?: ImageLayout; + regionCount?: number; + pRegions?: AnyPointer; +} + +export class CopyImageInfo2 implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyImageInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyImageInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyImageInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyImageInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyImageInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcImage !== undefined) this.srcImage = data.srcImage; + if (data.srcImageLayout !== undefined) this.srcImageLayout = data.srcImageLayout; + if (data.dstImage !== undefined) this.dstImage = data.dstImage; + if (data.dstImageLayout !== undefined) this.dstImageLayout = data.dstImageLayout; + if (data.regionCount !== undefined) this.regionCount = data.regionCount; + if (data.pRegions !== undefined) this.pRegions = data.pRegions; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyImageInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_IMAGE_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcImage(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set srcImage(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get srcImageLayout(): number { + return this.#view.getUint32(24, LE); + } + + set srcImageLayout(value: ImageLayout) { + this.#view.setUint32(24, Number(value), LE); + } + + get dstImage(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set dstImage(value: Image) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get dstImageLayout(): number { + return this.#view.getUint32(40, LE); + } + + set dstImageLayout(value: ImageLayout) { + this.#view.setUint32(40, Number(value), LE); + } + + get regionCount(): number { + return this.#view.getUint32(44, LE); + } + + set regionCount(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get pRegions(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pRegions(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyImageInfo2KHR.ts b/api/struct/CopyImageInfo2KHR.ts new file mode 100644 index 0000000..c6ecffe --- /dev/null +++ b/api/struct/CopyImageInfo2KHR.ts @@ -0,0 +1,2 @@ + import { CopyImageInfo2 } from "./CopyImageInfo2.ts"; + export type CopyImageInfo2KHR = CopyImageInfo2; \ No newline at end of file diff --git a/api/struct/CopyImageToBufferInfo2.ts b/api/struct/CopyImageToBufferInfo2.ts new file mode 100644 index 0000000..df4ff5b --- /dev/null +++ b/api/struct/CopyImageToBufferInfo2.ts @@ -0,0 +1,121 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {BufferImageCopy2} from "./BufferImageCopy2.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; +import { Image, Buffer } from "../def.ts"; + +export interface InitCopyImageToBufferInfo2 { + pNext?: AnyPointer; + srcImage?: Image; + srcImageLayout?: ImageLayout; + dstBuffer?: Buffer; + regionCount?: number; + pRegions?: AnyPointer; +} + +export class CopyImageToBufferInfo2 implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyImageToBufferInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyImageToBufferInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyImageToBufferInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyImageToBufferInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyImageToBufferInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcImage !== undefined) this.srcImage = data.srcImage; + if (data.srcImageLayout !== undefined) this.srcImageLayout = data.srcImageLayout; + if (data.dstBuffer !== undefined) this.dstBuffer = data.dstBuffer; + if (data.regionCount !== undefined) this.regionCount = data.regionCount; + if (data.pRegions !== undefined) this.pRegions = data.pRegions; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyImageToBufferInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_IMAGE_TO_BUFFER_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcImage(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set srcImage(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get srcImageLayout(): number { + return this.#view.getUint32(24, LE); + } + + set srcImageLayout(value: ImageLayout) { + this.#view.setUint32(24, Number(value), LE); + } + + get dstBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set dstBuffer(value: Buffer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get regionCount(): number { + return this.#view.getUint32(40, LE); + } + + set regionCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get pRegions(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pRegions(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyImageToBufferInfo2KHR.ts b/api/struct/CopyImageToBufferInfo2KHR.ts new file mode 100644 index 0000000..d47b9d4 --- /dev/null +++ b/api/struct/CopyImageToBufferInfo2KHR.ts @@ -0,0 +1,2 @@ + import { CopyImageToBufferInfo2 } from "./CopyImageToBufferInfo2.ts"; + export type CopyImageToBufferInfo2KHR = CopyImageToBufferInfo2; \ No newline at end of file diff --git a/api/struct/CopyMemoryIndirectCommandNV.ts b/api/struct/CopyMemoryIndirectCommandNV.ts new file mode 100644 index 0000000..4389d7d --- /dev/null +++ b/api/struct/CopyMemoryIndirectCommandNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceAddress, DeviceSize } from "../def.ts"; + +export interface InitCopyMemoryIndirectCommandNV { + srcAddress?: DeviceAddress; + dstAddress?: DeviceAddress; + size?: DeviceSize; +} + +export class CopyMemoryIndirectCommandNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyMemoryIndirectCommandNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMemoryIndirectCommandNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyMemoryIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyMemoryIndirectCommandNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyMemoryIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.srcAddress !== undefined) this.srcAddress = data.srcAddress; + if (data.dstAddress !== undefined) this.dstAddress = data.dstAddress; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryIndirectCommandNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get srcAddress(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set srcAddress(value: DeviceAddress) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get dstAddress(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set dstAddress(value: DeviceAddress) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyMemoryToAccelerationStructureInfoKHR.ts b/api/struct/CopyMemoryToAccelerationStructureInfoKHR.ts new file mode 100644 index 0000000..4d1ca94 --- /dev/null +++ b/api/struct/CopyMemoryToAccelerationStructureInfoKHR.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CopyAccelerationStructureModeKHR } from "../enum.ts"; +import { AccelerationStructureKHR } from "../def.ts"; +import { DeviceOrHostAddressConstKHR } from "../union.ts"; + +export interface InitCopyMemoryToAccelerationStructureInfoKHR { + pNext?: AnyPointer; + src?: DeviceOrHostAddressConstKHR; + dst?: AccelerationStructureKHR; + mode?: CopyAccelerationStructureModeKHR; +} + +export class CopyMemoryToAccelerationStructureInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyMemoryToAccelerationStructureInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMemoryToAccelerationStructureInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyMemoryToAccelerationStructureInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyMemoryToAccelerationStructureInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyMemoryToAccelerationStructureInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.src !== undefined) this.src = data.src; + if (data.dst !== undefined) this.dst = data.dst; + if (data.mode !== undefined) this.mode = data.mode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryToAccelerationStructureInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get src(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set src(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get dst(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set dst(value: AccelerationStructureKHR) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get mode(): number { + return this.#view.getUint32(32, LE); + } + + set mode(value: CopyAccelerationStructureModeKHR) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyMemoryToImageIndirectCommandNV.ts b/api/struct/CopyMemoryToImageIndirectCommandNV.ts new file mode 100644 index 0000000..1b93908 --- /dev/null +++ b/api/struct/CopyMemoryToImageIndirectCommandNV.ts @@ -0,0 +1,122 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceLayers} from "./ImageSubresourceLayers.ts"; +import {Offset3D} from "./Offset3D.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { DeviceAddress } from "../def.ts"; + +export interface InitCopyMemoryToImageIndirectCommandNV { + srcAddress?: DeviceAddress; + bufferRowLength?: number; + bufferImageHeight?: number; + imageSubresource?: ImageSubresourceLayers; + imageOffset?: Offset3D; + imageExtent?: Extent3D; +} + +export class CopyMemoryToImageIndirectCommandNV implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyMemoryToImageIndirectCommandNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMemoryToImageIndirectCommandNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyMemoryToImageIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyMemoryToImageIndirectCommandNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyMemoryToImageIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.srcAddress !== undefined) this.srcAddress = data.srcAddress; + if (data.bufferRowLength !== undefined) this.bufferRowLength = data.bufferRowLength; + if (data.bufferImageHeight !== undefined) this.bufferImageHeight = data.bufferImageHeight; + if (data.imageSubresource !== undefined) this.imageSubresource = data.imageSubresource; + if (data.imageOffset !== undefined) this.imageOffset = data.imageOffset; + if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryToImageIndirectCommandNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get srcAddress(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set srcAddress(value: DeviceAddress) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get bufferRowLength(): number { + return this.#view.getUint32(8, LE); + } + + set bufferRowLength(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get bufferImageHeight(): number { + return this.#view.getUint32(12, LE); + } + + set bufferImageHeight(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get imageSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); + } + + set imageSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get imageOffset(): Offset3D { + return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); + } + + set imageOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get imageExtent(): Extent3D { + return new Extent3D(this.#data.subarray(44, 44 + Extent3D.size)); + } + + set imageExtent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 44); + } +} \ No newline at end of file diff --git a/api/struct/CopyMemoryToMicromapInfoEXT.ts b/api/struct/CopyMemoryToMicromapInfoEXT.ts new file mode 100644 index 0000000..ec0da81 --- /dev/null +++ b/api/struct/CopyMemoryToMicromapInfoEXT.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CopyMicromapModeEXT } from "../enum.ts"; +import { MicromapEXT } from "../def.ts"; +import { DeviceOrHostAddressConstKHR } from "../union.ts"; + +export interface InitCopyMemoryToMicromapInfoEXT { + pNext?: AnyPointer; + src?: DeviceOrHostAddressConstKHR; + dst?: MicromapEXT; + mode?: CopyMicromapModeEXT; +} + +export class CopyMemoryToMicromapInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyMemoryToMicromapInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMemoryToMicromapInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyMemoryToMicromapInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyMemoryToMicromapInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyMemoryToMicromapInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.src !== undefined) this.src = data.src; + if (data.dst !== undefined) this.dst = data.dst; + if (data.mode !== undefined) this.mode = data.mode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryToMicromapInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_MEMORY_TO_MICROMAP_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get src(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set src(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get dst(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set dst(value: MicromapEXT) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get mode(): number { + return this.#view.getUint32(32, LE); + } + + set mode(value: CopyMicromapModeEXT) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyMicromapInfoEXT.ts b/api/struct/CopyMicromapInfoEXT.ts new file mode 100644 index 0000000..13596b7 --- /dev/null +++ b/api/struct/CopyMicromapInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CopyMicromapModeEXT } from "../enum.ts"; +import { MicromapEXT } from "../def.ts"; + +export interface InitCopyMicromapInfoEXT { + pNext?: AnyPointer; + src?: MicromapEXT; + dst?: MicromapEXT; + mode?: CopyMicromapModeEXT; +} + +export class CopyMicromapInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyMicromapInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMicromapInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyMicromapInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyMicromapInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyMicromapInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.src !== undefined) this.src = data.src; + if (data.dst !== undefined) this.dst = data.dst; + if (data.mode !== undefined) this.mode = data.mode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMicromapInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_MICROMAP_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get src(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set src(value: MicromapEXT) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dst(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set dst(value: MicromapEXT) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get mode(): number { + return this.#view.getUint32(32, LE); + } + + set mode(value: CopyMicromapModeEXT) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CopyMicromapToMemoryInfoEXT.ts b/api/struct/CopyMicromapToMemoryInfoEXT.ts new file mode 100644 index 0000000..889fa27 --- /dev/null +++ b/api/struct/CopyMicromapToMemoryInfoEXT.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CopyMicromapModeEXT } from "../enum.ts"; +import { MicromapEXT } from "../def.ts"; +import { DeviceOrHostAddressKHR } from "../union.ts"; + +export interface InitCopyMicromapToMemoryInfoEXT { + pNext?: AnyPointer; + src?: MicromapEXT; + dst?: DeviceOrHostAddressKHR; + mode?: CopyMicromapModeEXT; +} + +export class CopyMicromapToMemoryInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCopyMicromapToMemoryInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMicromapToMemoryInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CopyMicromapToMemoryInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CopyMicromapToMemoryInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CopyMicromapToMemoryInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.src !== undefined) this.src = data.src; + if (data.dst !== undefined) this.dst = data.dst; + if (data.mode !== undefined) this.mode = data.mode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMicromapToMemoryInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.COPY_MICROMAP_TO_MEMORY_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get src(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set src(value: MicromapEXT) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dst(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set dst(value: DeviceOrHostAddressKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get mode(): number { + return this.#view.getUint32(32, LE); + } + + set mode(value: CopyMicromapModeEXT) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/CuFunctionCreateInfoNVX.ts b/api/struct/CuFunctionCreateInfoNVX.ts new file mode 100644 index 0000000..c160cf6 --- /dev/null +++ b/api/struct/CuFunctionCreateInfoNVX.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { CuModuleNVX } from "../def.ts"; + +export interface InitCuFunctionCreateInfoNVX { + pNext?: AnyPointer; + module?: CuModuleNVX; + pName?: AnyPointer; +} + +export class CuFunctionCreateInfoNVX implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCuFunctionCreateInfoNVX); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCuFunctionCreateInfoNVX) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CuFunctionCreateInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CuFunctionCreateInfoNVX.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CuFunctionCreateInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.module !== undefined) this.module = data.module; + if (data.pName !== undefined) this.pName = data.pName; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CuFunctionCreateInfoNVX.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.CU_FUNCTION_CREATE_INFO_NVX; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get module(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set module(value: CuModuleNVX) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get pName(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pName(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/CuLaunchInfoNVX.ts b/api/struct/CuLaunchInfoNVX.ts new file mode 100644 index 0000000..4aacb36 --- /dev/null +++ b/api/struct/CuLaunchInfoNVX.ts @@ -0,0 +1,190 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { CuFunctionNVX } from "../def.ts"; + +export interface InitCuLaunchInfoNVX { + pNext?: AnyPointer; + vk_function?: CuFunctionNVX; + gridDimX?: number; + gridDimY?: number; + gridDimZ?: number; + blockDimX?: number; + blockDimY?: number; + blockDimZ?: number; + sharedMemBytes?: number; + paramCount?: number | bigint; + pParams?: AnyPointer; + extraCount?: number | bigint; + pExtras?: AnyPointer; +} + +export class CuLaunchInfoNVX implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCuLaunchInfoNVX); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCuLaunchInfoNVX) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CuLaunchInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CuLaunchInfoNVX.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CuLaunchInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.vk_function !== undefined) this.vk_function = data.vk_function; + if (data.gridDimX !== undefined) this.gridDimX = data.gridDimX; + if (data.gridDimY !== undefined) this.gridDimY = data.gridDimY; + if (data.gridDimZ !== undefined) this.gridDimZ = data.gridDimZ; + if (data.blockDimX !== undefined) this.blockDimX = data.blockDimX; + if (data.blockDimY !== undefined) this.blockDimY = data.blockDimY; + if (data.blockDimZ !== undefined) this.blockDimZ = data.blockDimZ; + if (data.sharedMemBytes !== undefined) this.sharedMemBytes = data.sharedMemBytes; + if (data.paramCount !== undefined) this.paramCount = data.paramCount; + if (data.pParams !== undefined) this.pParams = data.pParams; + if (data.extraCount !== undefined) this.extraCount = data.extraCount; + if (data.pExtras !== undefined) this.pExtras = data.pExtras; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CuLaunchInfoNVX.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.CU_LAUNCH_INFO_NVX; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get vk_function(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set vk_function(value: CuFunctionNVX) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get gridDimX(): number { + return this.#view.getUint32(24, LE); + } + + set gridDimX(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get gridDimY(): number { + return this.#view.getUint32(28, LE); + } + + set gridDimY(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get gridDimZ(): number { + return this.#view.getUint32(32, LE); + } + + set gridDimZ(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get blockDimX(): number { + return this.#view.getUint32(36, LE); + } + + set blockDimX(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get blockDimY(): number { + return this.#view.getUint32(40, LE); + } + + set blockDimY(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get blockDimZ(): number { + return this.#view.getUint32(44, LE); + } + + set blockDimZ(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get sharedMemBytes(): number { + return this.#view.getUint32(48, LE); + } + + set sharedMemBytes(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get paramCount(): bigint { + return this.#view.getBigUint64(56, LE); + } + + set paramCount(value: number | bigint) { + this.#view.setBigUint64(56, BigInt(value), LE); + } + + get pParams(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pParams(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } + + get extraCount(): bigint { + return this.#view.getBigUint64(72, LE); + } + + set extraCount(value: number | bigint) { + this.#view.setBigUint64(72, BigInt(value), LE); + } + + get pExtras(): Deno.PointerValue { + return pointerFromView(this.#view, 80, LE); + } + + set pExtras(value: AnyPointer) { + this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/CuModuleCreateInfoNVX.ts b/api/struct/CuModuleCreateInfoNVX.ts new file mode 100644 index 0000000..0558055 --- /dev/null +++ b/api/struct/CuModuleCreateInfoNVX.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitCuModuleCreateInfoNVX { + pNext?: AnyPointer; + dataSize?: number | bigint; + pData?: AnyPointer; +} + +export class CuModuleCreateInfoNVX implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitCuModuleCreateInfoNVX); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitCuModuleCreateInfoNVX) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(CuModuleCreateInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < CuModuleCreateInfoNVX.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(CuModuleCreateInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.dataSize !== undefined) this.dataSize = data.dataSize; + if (data.pData !== undefined) this.pData = data.pData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CuModuleCreateInfoNVX.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.CU_MODULE_CREATE_INFO_NVX; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dataSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set dataSize(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get pData(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pData(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/D3D12FenceSubmitInfoKHR.ts b/api/struct/D3D12FenceSubmitInfoKHR.ts new file mode 100644 index 0000000..91a3aed --- /dev/null +++ b/api/struct/D3D12FenceSubmitInfoKHR.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitD3D12FenceSubmitInfoKHR { + pNext?: AnyPointer; + waitSemaphoreValuesCount?: number; + pWaitSemaphoreValues?: AnyPointer; + signalSemaphoreValuesCount?: number; + pSignalSemaphoreValues?: AnyPointer; +} + +export class D3D12FenceSubmitInfoKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitD3D12FenceSubmitInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitD3D12FenceSubmitInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(D3D12FenceSubmitInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < D3D12FenceSubmitInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(D3D12FenceSubmitInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.waitSemaphoreValuesCount !== undefined) this.waitSemaphoreValuesCount = data.waitSemaphoreValuesCount; + if (data.pWaitSemaphoreValues !== undefined) this.pWaitSemaphoreValues = data.pWaitSemaphoreValues; + if (data.signalSemaphoreValuesCount !== undefined) this.signalSemaphoreValuesCount = data.signalSemaphoreValuesCount; + if (data.pSignalSemaphoreValues !== undefined) this.pSignalSemaphoreValues = data.pSignalSemaphoreValues; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, D3D12FenceSubmitInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.D3D12_FENCE_SUBMIT_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get waitSemaphoreValuesCount(): number { + return this.#view.getUint32(16, LE); + } + + set waitSemaphoreValuesCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pWaitSemaphoreValues(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pWaitSemaphoreValues(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get signalSemaphoreValuesCount(): number { + return this.#view.getUint32(32, LE); + } + + set signalSemaphoreValuesCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pSignalSemaphoreValues(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pSignalSemaphoreValues(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DebugMarkerMarkerInfoEXT.ts b/api/struct/DebugMarkerMarkerInfoEXT.ts new file mode 100644 index 0000000..697c858 --- /dev/null +++ b/api/struct/DebugMarkerMarkerInfoEXT.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDebugMarkerMarkerInfoEXT { + pNext?: AnyPointer; + pMarkerName?: AnyPointer; + color?: Float32Array; +} + +export class DebugMarkerMarkerInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDebugMarkerMarkerInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDebugMarkerMarkerInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DebugMarkerMarkerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DebugMarkerMarkerInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DebugMarkerMarkerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pMarkerName !== undefined) this.pMarkerName = data.pMarkerName; + if (data.color !== undefined) this.color = data.color; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugMarkerMarkerInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEBUG_MARKER_MARKER_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pMarkerName(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pMarkerName(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get color(): Float32Array { + return new Float32Array(this.#data.buffer, this.#data.byteOffset + 24, 4); + } + + set color(value: Float32Array) { + this.#data.set(new Uint8Array(value.buffer), 24); + } +} \ No newline at end of file diff --git a/api/struct/DebugMarkerObjectNameInfoEXT.ts b/api/struct/DebugMarkerObjectNameInfoEXT.ts new file mode 100644 index 0000000..cb500fd --- /dev/null +++ b/api/struct/DebugMarkerObjectNameInfoEXT.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DebugReportObjectTypeEXT } from "../enum.ts"; + +export interface InitDebugMarkerObjectNameInfoEXT { + pNext?: AnyPointer; + objectType?: DebugReportObjectTypeEXT; + object?: number | bigint; + pObjectName?: AnyPointer; +} + +export class DebugMarkerObjectNameInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDebugMarkerObjectNameInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDebugMarkerObjectNameInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DebugMarkerObjectNameInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DebugMarkerObjectNameInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DebugMarkerObjectNameInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.objectType !== undefined) this.objectType = data.objectType; + if (data.object !== undefined) this.object = data.object; + if (data.pObjectName !== undefined) this.pObjectName = data.pObjectName; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugMarkerObjectNameInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEBUG_MARKER_OBJECT_NAME_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get objectType(): number { + return this.#view.getUint32(16, LE); + } + + set objectType(value: DebugReportObjectTypeEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get object(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set object(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get pObjectName(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pObjectName(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DebugMarkerObjectTagInfoEXT.ts b/api/struct/DebugMarkerObjectTagInfoEXT.ts new file mode 100644 index 0000000..784701a --- /dev/null +++ b/api/struct/DebugMarkerObjectTagInfoEXT.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DebugReportObjectTypeEXT } from "../enum.ts"; + +export interface InitDebugMarkerObjectTagInfoEXT { + pNext?: AnyPointer; + objectType?: DebugReportObjectTypeEXT; + object?: number | bigint; + tagName?: number | bigint; + tagSize?: number | bigint; + pTag?: AnyPointer; +} + +export class DebugMarkerObjectTagInfoEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDebugMarkerObjectTagInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDebugMarkerObjectTagInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DebugMarkerObjectTagInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DebugMarkerObjectTagInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DebugMarkerObjectTagInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.objectType !== undefined) this.objectType = data.objectType; + if (data.object !== undefined) this.object = data.object; + if (data.tagName !== undefined) this.tagName = data.tagName; + if (data.tagSize !== undefined) this.tagSize = data.tagSize; + if (data.pTag !== undefined) this.pTag = data.pTag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugMarkerObjectTagInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEBUG_MARKER_OBJECT_TAG_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get objectType(): number { + return this.#view.getUint32(16, LE); + } + + set objectType(value: DebugReportObjectTypeEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get object(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set object(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get tagName(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set tagName(value: number | bigint) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get tagSize(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set tagSize(value: number | bigint) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get pTag(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pTag(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DebugReportCallbackCreateInfoEXT.ts b/api/struct/DebugReportCallbackCreateInfoEXT.ts new file mode 100644 index 0000000..1731ce9 --- /dev/null +++ b/api/struct/DebugReportCallbackCreateInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DebugReportFlagsEXT } from "../def.ts"; + +export interface InitDebugReportCallbackCreateInfoEXT { + pNext?: AnyPointer; + flags?: DebugReportFlagsEXT; + pfnCallback?: Deno.PointerValue; + pUserData?: AnyPointer; +} + +export class DebugReportCallbackCreateInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDebugReportCallbackCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDebugReportCallbackCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DebugReportCallbackCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DebugReportCallbackCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DebugReportCallbackCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pfnCallback !== undefined) this.pfnCallback = data.pfnCallback; + if (data.pUserData !== undefined) this.pUserData = data.pUserData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugReportCallbackCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DebugReportFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get pfnCallback(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pfnCallback(value: Deno.PointerValue) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pUserData(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pUserData(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DebugUtilsLabelEXT.ts b/api/struct/DebugUtilsLabelEXT.ts new file mode 100644 index 0000000..a6b58b4 --- /dev/null +++ b/api/struct/DebugUtilsLabelEXT.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDebugUtilsLabelEXT { + pNext?: AnyPointer; + pLabelName?: AnyPointer; + color?: Float32Array; +} + +export class DebugUtilsLabelEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDebugUtilsLabelEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsLabelEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DebugUtilsLabelEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DebugUtilsLabelEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DebugUtilsLabelEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pLabelName !== undefined) this.pLabelName = data.pLabelName; + if (data.color !== undefined) this.color = data.color; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsLabelEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEBUG_UTILS_LABEL_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pLabelName(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pLabelName(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get color(): Float32Array { + return new Float32Array(this.#data.buffer, this.#data.byteOffset + 24, 4); + } + + set color(value: Float32Array) { + this.#data.set(new Uint8Array(value.buffer), 24); + } +} \ No newline at end of file diff --git a/api/struct/DebugUtilsMessengerCallbackDataEXT.ts b/api/struct/DebugUtilsMessengerCallbackDataEXT.ts new file mode 100644 index 0000000..329ea17 --- /dev/null +++ b/api/struct/DebugUtilsMessengerCallbackDataEXT.ts @@ -0,0 +1,172 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DebugUtilsLabelEXT} from "./DebugUtilsLabelEXT.ts"; +import {DebugUtilsObjectNameInfoEXT} from "./DebugUtilsObjectNameInfoEXT.ts"; +import { StructureType } from "../enum.ts"; +import { DebugUtilsMessengerCallbackDataFlagsEXT } from "../def.ts"; + +export interface InitDebugUtilsMessengerCallbackDataEXT { + pNext?: AnyPointer; + flags?: DebugUtilsMessengerCallbackDataFlagsEXT; + pMessageIdName?: AnyPointer; + messageIdNumber?: number; + pMessage?: AnyPointer; + queueLabelCount?: number; + pQueueLabels?: AnyPointer; + cmdBufLabelCount?: number; + pCmdBufLabels?: AnyPointer; + objectCount?: number; + pObjects?: AnyPointer; +} + +export class DebugUtilsMessengerCallbackDataEXT implements BaseStruct { + static size = 96; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDebugUtilsMessengerCallbackDataEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsMessengerCallbackDataEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DebugUtilsMessengerCallbackDataEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DebugUtilsMessengerCallbackDataEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DebugUtilsMessengerCallbackDataEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pMessageIdName !== undefined) this.pMessageIdName = data.pMessageIdName; + if (data.messageIdNumber !== undefined) this.messageIdNumber = data.messageIdNumber; + if (data.pMessage !== undefined) this.pMessage = data.pMessage; + if (data.queueLabelCount !== undefined) this.queueLabelCount = data.queueLabelCount; + if (data.pQueueLabels !== undefined) this.pQueueLabels = data.pQueueLabels; + if (data.cmdBufLabelCount !== undefined) this.cmdBufLabelCount = data.cmdBufLabelCount; + if (data.pCmdBufLabels !== undefined) this.pCmdBufLabels = data.pCmdBufLabels; + if (data.objectCount !== undefined) this.objectCount = data.objectCount; + if (data.pObjects !== undefined) this.pObjects = data.pObjects; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsMessengerCallbackDataEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DebugUtilsMessengerCallbackDataFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get pMessageIdName(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pMessageIdName(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get messageIdNumber(): number { + return this.#view.getInt32(32, LE); + } + + set messageIdNumber(value: number) { + this.#view.setInt32(32, Number(value), LE); + } + + get pMessage(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pMessage(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get queueLabelCount(): number { + return this.#view.getUint32(48, LE); + } + + set queueLabelCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pQueueLabels(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pQueueLabels(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get cmdBufLabelCount(): number { + return this.#view.getUint32(64, LE); + } + + set cmdBufLabelCount(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get pCmdBufLabels(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set pCmdBufLabels(value: AnyPointer) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } + + get objectCount(): number { + return this.#view.getUint32(80, LE); + } + + set objectCount(value: number) { + this.#view.setUint32(80, Number(value), LE); + } + + get pObjects(): Deno.PointerValue { + return pointerFromView(this.#view, 88, LE); + } + + set pObjects(value: AnyPointer) { + this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DebugUtilsMessengerCreateInfoEXT.ts b/api/struct/DebugUtilsMessengerCreateInfoEXT.ts new file mode 100644 index 0000000..02180ce --- /dev/null +++ b/api/struct/DebugUtilsMessengerCreateInfoEXT.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DebugUtilsMessengerCreateFlagsEXT, DebugUtilsMessageSeverityFlagsEXT, DebugUtilsMessageTypeFlagsEXT } from "../def.ts"; + +export interface InitDebugUtilsMessengerCreateInfoEXT { + pNext?: AnyPointer; + flags?: DebugUtilsMessengerCreateFlagsEXT; + messageSeverity?: DebugUtilsMessageSeverityFlagsEXT; + messageType?: DebugUtilsMessageTypeFlagsEXT; + pfnUserCallback?: Deno.PointerValue; + pUserData?: AnyPointer; +} + +export class DebugUtilsMessengerCreateInfoEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDebugUtilsMessengerCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsMessengerCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DebugUtilsMessengerCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DebugUtilsMessengerCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DebugUtilsMessengerCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.messageSeverity !== undefined) this.messageSeverity = data.messageSeverity; + if (data.messageType !== undefined) this.messageType = data.messageType; + if (data.pfnUserCallback !== undefined) this.pfnUserCallback = data.pfnUserCallback; + if (data.pUserData !== undefined) this.pUserData = data.pUserData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsMessengerCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DebugUtilsMessengerCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get messageSeverity(): number { + return this.#view.getUint32(20, LE); + } + + set messageSeverity(value: DebugUtilsMessageSeverityFlagsEXT) { + this.#view.setUint32(20, Number(value), LE); + } + + get messageType(): number { + return this.#view.getUint32(24, LE); + } + + set messageType(value: DebugUtilsMessageTypeFlagsEXT) { + this.#view.setUint32(24, Number(value), LE); + } + + get pfnUserCallback(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pfnUserCallback(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pUserData(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pUserData(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DebugUtilsObjectNameInfoEXT.ts b/api/struct/DebugUtilsObjectNameInfoEXT.ts new file mode 100644 index 0000000..6fb4da8 --- /dev/null +++ b/api/struct/DebugUtilsObjectNameInfoEXT.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ObjectType } from "../enum.ts"; + +export interface InitDebugUtilsObjectNameInfoEXT { + pNext?: AnyPointer; + objectType?: ObjectType; + objectHandle?: number | bigint; + pObjectName?: AnyPointer; +} + +export class DebugUtilsObjectNameInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDebugUtilsObjectNameInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsObjectNameInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DebugUtilsObjectNameInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DebugUtilsObjectNameInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DebugUtilsObjectNameInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.objectType !== undefined) this.objectType = data.objectType; + if (data.objectHandle !== undefined) this.objectHandle = data.objectHandle; + if (data.pObjectName !== undefined) this.pObjectName = data.pObjectName; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsObjectNameInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEBUG_UTILS_OBJECT_NAME_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get objectType(): number { + return this.#view.getUint32(16, LE); + } + + set objectType(value: ObjectType) { + this.#view.setUint32(16, Number(value), LE); + } + + get objectHandle(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set objectHandle(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get pObjectName(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pObjectName(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DebugUtilsObjectTagInfoEXT.ts b/api/struct/DebugUtilsObjectTagInfoEXT.ts new file mode 100644 index 0000000..d64f708 --- /dev/null +++ b/api/struct/DebugUtilsObjectTagInfoEXT.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ObjectType } from "../enum.ts"; + +export interface InitDebugUtilsObjectTagInfoEXT { + pNext?: AnyPointer; + objectType?: ObjectType; + objectHandle?: number | bigint; + tagName?: number | bigint; + tagSize?: number | bigint; + pTag?: AnyPointer; +} + +export class DebugUtilsObjectTagInfoEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDebugUtilsObjectTagInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsObjectTagInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DebugUtilsObjectTagInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DebugUtilsObjectTagInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DebugUtilsObjectTagInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.objectType !== undefined) this.objectType = data.objectType; + if (data.objectHandle !== undefined) this.objectHandle = data.objectHandle; + if (data.tagName !== undefined) this.tagName = data.tagName; + if (data.tagSize !== undefined) this.tagSize = data.tagSize; + if (data.pTag !== undefined) this.pTag = data.pTag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsObjectTagInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEBUG_UTILS_OBJECT_TAG_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get objectType(): number { + return this.#view.getUint32(16, LE); + } + + set objectType(value: ObjectType) { + this.#view.setUint32(16, Number(value), LE); + } + + get objectHandle(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set objectHandle(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get tagName(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set tagName(value: number | bigint) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get tagSize(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set tagSize(value: number | bigint) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get pTag(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pTag(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DecompressMemoryRegionNV.ts b/api/struct/DecompressMemoryRegionNV.ts new file mode 100644 index 0000000..a9bd759 --- /dev/null +++ b/api/struct/DecompressMemoryRegionNV.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceAddress, DeviceSize, MemoryDecompressionMethodFlagsNV } from "../def.ts"; + +export interface InitDecompressMemoryRegionNV { + srcAddress?: DeviceAddress; + dstAddress?: DeviceAddress; + compressedSize?: DeviceSize; + decompressedSize?: DeviceSize; + decompressionMethod?: MemoryDecompressionMethodFlagsNV; +} + +export class DecompressMemoryRegionNV implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDecompressMemoryRegionNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDecompressMemoryRegionNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DecompressMemoryRegionNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DecompressMemoryRegionNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DecompressMemoryRegionNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.srcAddress !== undefined) this.srcAddress = data.srcAddress; + if (data.dstAddress !== undefined) this.dstAddress = data.dstAddress; + if (data.compressedSize !== undefined) this.compressedSize = data.compressedSize; + if (data.decompressedSize !== undefined) this.decompressedSize = data.decompressedSize; + if (data.decompressionMethod !== undefined) this.decompressionMethod = data.decompressionMethod; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DecompressMemoryRegionNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get srcAddress(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set srcAddress(value: DeviceAddress) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get dstAddress(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set dstAddress(value: DeviceAddress) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get compressedSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set compressedSize(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get decompressedSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set decompressedSize(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get decompressionMethod(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set decompressionMethod(value: MemoryDecompressionMethodFlagsNV) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DedicatedAllocationBufferCreateInfoNV.ts b/api/struct/DedicatedAllocationBufferCreateInfoNV.ts new file mode 100644 index 0000000..ec3fff9 --- /dev/null +++ b/api/struct/DedicatedAllocationBufferCreateInfoNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitDedicatedAllocationBufferCreateInfoNV { + pNext?: AnyPointer; + dedicatedAllocation?: Bool32; +} + +export class DedicatedAllocationBufferCreateInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDedicatedAllocationBufferCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDedicatedAllocationBufferCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DedicatedAllocationBufferCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DedicatedAllocationBufferCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DedicatedAllocationBufferCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.dedicatedAllocation !== undefined) this.dedicatedAllocation = data.dedicatedAllocation; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DedicatedAllocationBufferCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dedicatedAllocation(): number { + return this.#view.getUint32(16, LE); + } + + set dedicatedAllocation(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DedicatedAllocationImageCreateInfoNV.ts b/api/struct/DedicatedAllocationImageCreateInfoNV.ts new file mode 100644 index 0000000..5dda53d --- /dev/null +++ b/api/struct/DedicatedAllocationImageCreateInfoNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitDedicatedAllocationImageCreateInfoNV { + pNext?: AnyPointer; + dedicatedAllocation?: Bool32; +} + +export class DedicatedAllocationImageCreateInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDedicatedAllocationImageCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDedicatedAllocationImageCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DedicatedAllocationImageCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DedicatedAllocationImageCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DedicatedAllocationImageCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.dedicatedAllocation !== undefined) this.dedicatedAllocation = data.dedicatedAllocation; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DedicatedAllocationImageCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dedicatedAllocation(): number { + return this.#view.getUint32(16, LE); + } + + set dedicatedAllocation(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DedicatedAllocationMemoryAllocateInfoNV.ts b/api/struct/DedicatedAllocationMemoryAllocateInfoNV.ts new file mode 100644 index 0000000..45c25b5 --- /dev/null +++ b/api/struct/DedicatedAllocationMemoryAllocateInfoNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Image, Buffer } from "../def.ts"; + +export interface InitDedicatedAllocationMemoryAllocateInfoNV { + pNext?: AnyPointer; + image?: Image; + buffer?: Buffer; +} + +export class DedicatedAllocationMemoryAllocateInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDedicatedAllocationMemoryAllocateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDedicatedAllocationMemoryAllocateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DedicatedAllocationMemoryAllocateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DedicatedAllocationMemoryAllocateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DedicatedAllocationMemoryAllocateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.image !== undefined) this.image = data.image; + if (data.buffer !== undefined) this.buffer = data.buffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DedicatedAllocationMemoryAllocateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DependencyInfo.ts b/api/struct/DependencyInfo.ts new file mode 100644 index 0000000..d78a5b3 --- /dev/null +++ b/api/struct/DependencyInfo.ts @@ -0,0 +1,143 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {MemoryBarrier2} from "./MemoryBarrier2.ts"; +import {BufferMemoryBarrier2} from "./BufferMemoryBarrier2.ts"; +import {ImageMemoryBarrier2} from "./ImageMemoryBarrier2.ts"; +import { StructureType } from "../enum.ts"; +import { DependencyFlags } from "../def.ts"; + +export interface InitDependencyInfo { + pNext?: AnyPointer; + dependencyFlags?: DependencyFlags; + memoryBarrierCount?: number; + pMemoryBarriers?: AnyPointer; + bufferMemoryBarrierCount?: number; + pBufferMemoryBarriers?: AnyPointer; + imageMemoryBarrierCount?: number; + pImageMemoryBarriers?: AnyPointer; +} + +export class DependencyInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDependencyInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDependencyInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DependencyInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DependencyInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DependencyInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.dependencyFlags !== undefined) this.dependencyFlags = data.dependencyFlags; + if (data.memoryBarrierCount !== undefined) this.memoryBarrierCount = data.memoryBarrierCount; + if (data.pMemoryBarriers !== undefined) this.pMemoryBarriers = data.pMemoryBarriers; + if (data.bufferMemoryBarrierCount !== undefined) this.bufferMemoryBarrierCount = data.bufferMemoryBarrierCount; + if (data.pBufferMemoryBarriers !== undefined) this.pBufferMemoryBarriers = data.pBufferMemoryBarriers; + if (data.imageMemoryBarrierCount !== undefined) this.imageMemoryBarrierCount = data.imageMemoryBarrierCount; + if (data.pImageMemoryBarriers !== undefined) this.pImageMemoryBarriers = data.pImageMemoryBarriers; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DependencyInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEPENDENCY_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dependencyFlags(): number { + return this.#view.getUint32(16, LE); + } + + set dependencyFlags(value: DependencyFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get memoryBarrierCount(): number { + return this.#view.getUint32(20, LE); + } + + set memoryBarrierCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pMemoryBarriers(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pMemoryBarriers(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get bufferMemoryBarrierCount(): number { + return this.#view.getUint32(32, LE); + } + + set bufferMemoryBarrierCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pBufferMemoryBarriers(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pBufferMemoryBarriers(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get imageMemoryBarrierCount(): number { + return this.#view.getUint32(48, LE); + } + + set imageMemoryBarrierCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pImageMemoryBarriers(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pImageMemoryBarriers(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DependencyInfoKHR.ts b/api/struct/DependencyInfoKHR.ts new file mode 100644 index 0000000..3df49f7 --- /dev/null +++ b/api/struct/DependencyInfoKHR.ts @@ -0,0 +1,2 @@ + import { DependencyInfo } from "./DependencyInfo.ts"; + export type DependencyInfoKHR = DependencyInfo; \ No newline at end of file diff --git a/api/struct/DescriptorAddressInfoEXT.ts b/api/struct/DescriptorAddressInfoEXT.ts new file mode 100644 index 0000000..3a540d5 --- /dev/null +++ b/api/struct/DescriptorAddressInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format } from "../enum.ts"; +import { DeviceAddress, DeviceSize } from "../def.ts"; + +export interface InitDescriptorAddressInfoEXT { + pNext?: AnyPointer; + address?: DeviceAddress; + range?: DeviceSize; + format?: Format; +} + +export class DescriptorAddressInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorAddressInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorAddressInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorAddressInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorAddressInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorAddressInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.address !== undefined) this.address = data.address; + if (data.range !== undefined) this.range = data.range; + if (data.format !== undefined) this.format = data.format; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorAddressInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_ADDRESS_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get address(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set address(value: DeviceAddress) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get range(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set range(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get format(): number { + return this.#view.getUint32(32, LE); + } + + set format(value: Format) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorBufferBindingInfoEXT.ts b/api/struct/DescriptorBufferBindingInfoEXT.ts new file mode 100644 index 0000000..5e95b40 --- /dev/null +++ b/api/struct/DescriptorBufferBindingInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceAddress, BufferUsageFlags } from "../def.ts"; + +export interface InitDescriptorBufferBindingInfoEXT { + pNext?: AnyPointer; + address?: DeviceAddress; + usage?: BufferUsageFlags; +} + +export class DescriptorBufferBindingInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorBufferBindingInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorBufferBindingInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorBufferBindingInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorBufferBindingInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorBufferBindingInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.address !== undefined) this.address = data.address; + if (data.usage !== undefined) this.usage = data.usage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorBufferBindingInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_BUFFER_BINDING_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get address(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set address(value: DeviceAddress) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get usage(): number { + return this.#view.getUint32(24, LE); + } + + set usage(value: BufferUsageFlags) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorBufferBindingPushDescriptorBufferHandleEXT.ts b/api/struct/DescriptorBufferBindingPushDescriptorBufferHandleEXT.ts new file mode 100644 index 0000000..ed2f818 --- /dev/null +++ b/api/struct/DescriptorBufferBindingPushDescriptorBufferHandleEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Buffer } from "../def.ts"; + +export interface InitDescriptorBufferBindingPushDescriptorBufferHandleEXT { + pNext?: AnyPointer; + buffer?: Buffer; +} + +export class DescriptorBufferBindingPushDescriptorBufferHandleEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorBufferBindingPushDescriptorBufferHandleEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorBufferBindingPushDescriptorBufferHandleEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorBufferBindingPushDescriptorBufferHandleEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorBufferBindingPushDescriptorBufferHandleEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorBufferBindingPushDescriptorBufferHandleEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.buffer !== undefined) this.buffer = data.buffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorBufferBindingPushDescriptorBufferHandleEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorBufferInfo.ts b/api/struct/DescriptorBufferInfo.ts new file mode 100644 index 0000000..5f1b585 --- /dev/null +++ b/api/struct/DescriptorBufferInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { Buffer, DeviceSize } from "../def.ts"; + +export interface InitDescriptorBufferInfo { + buffer?: Buffer; + offset?: DeviceSize; + range?: DeviceSize; +} + +export class DescriptorBufferInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorBufferInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorBufferInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorBufferInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorBufferInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorBufferInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.offset !== undefined) this.offset = data.offset; + if (data.range !== undefined) this.range = data.range; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorBufferInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get range(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set range(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorGetInfoEXT.ts b/api/struct/DescriptorGetInfoEXT.ts new file mode 100644 index 0000000..e18f013 --- /dev/null +++ b/api/struct/DescriptorGetInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DescriptorType } from "../enum.ts"; +import { DescriptorDataEXT } from "../union.ts"; + +export interface InitDescriptorGetInfoEXT { + pNext?: AnyPointer; + type?: DescriptorType; + data?: DescriptorDataEXT; +} + +export class DescriptorGetInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorGetInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorGetInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorGetInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorGetInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorGetInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.type !== undefined) this.type = data.type; + if (data.data !== undefined) this.data = data.data; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorGetInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_GET_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get type(): number { + return this.#view.getUint32(16, LE); + } + + set type(value: DescriptorType) { + this.#view.setUint32(16, Number(value), LE); + } + + get data(): unknown { + throw new Error(`Unknown type: {"union":["buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","u64"]}`); + } + + set data(value: DescriptorDataEXT) { + throw new Error(`Unknown type: {"union":["buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","u64"]}`); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorImageInfo.ts b/api/struct/DescriptorImageInfo.ts new file mode 100644 index 0000000..2ed2cf5 --- /dev/null +++ b/api/struct/DescriptorImageInfo.ts @@ -0,0 +1,81 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ImageLayout } from "../enum.ts"; +import { Sampler, ImageView } from "../def.ts"; + +export interface InitDescriptorImageInfo { + sampler?: Sampler; + imageView?: ImageView; + imageLayout?: ImageLayout; +} + +export class DescriptorImageInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorImageInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorImageInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorImageInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorImageInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorImageInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.sampler !== undefined) this.sampler = data.sampler; + if (data.imageView !== undefined) this.imageView = data.imageView; + if (data.imageLayout !== undefined) this.imageLayout = data.imageLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorImageInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get sampler(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set sampler(value: Sampler) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get imageView(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set imageView(value: ImageView) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageLayout(): number { + return this.#view.getUint32(16, LE); + } + + set imageLayout(value: ImageLayout) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorPoolCreateInfo.ts b/api/struct/DescriptorPoolCreateInfo.ts new file mode 100644 index 0000000..ff03b8d --- /dev/null +++ b/api/struct/DescriptorPoolCreateInfo.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DescriptorPoolSize} from "./DescriptorPoolSize.ts"; +import { StructureType } from "../enum.ts"; +import { DescriptorPoolCreateFlags } from "../def.ts"; + +export interface InitDescriptorPoolCreateInfo { + pNext?: AnyPointer; + flags?: DescriptorPoolCreateFlags; + maxSets?: number; + poolSizeCount?: number; + pPoolSizes?: AnyPointer; +} + +export class DescriptorPoolCreateInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorPoolCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorPoolCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorPoolCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorPoolCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorPoolCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.maxSets !== undefined) this.maxSets = data.maxSets; + if (data.poolSizeCount !== undefined) this.poolSizeCount = data.poolSizeCount; + if (data.pPoolSizes !== undefined) this.pPoolSizes = data.pPoolSizes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorPoolCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_POOL_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DescriptorPoolCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxSets(): number { + return this.#view.getUint32(20, LE); + } + + set maxSets(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get poolSizeCount(): number { + return this.#view.getUint32(24, LE); + } + + set poolSizeCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pPoolSizes(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pPoolSizes(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorPoolInlineUniformBlockCreateInfo.ts b/api/struct/DescriptorPoolInlineUniformBlockCreateInfo.ts new file mode 100644 index 0000000..058b685 --- /dev/null +++ b/api/struct/DescriptorPoolInlineUniformBlockCreateInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDescriptorPoolInlineUniformBlockCreateInfo { + pNext?: AnyPointer; + maxInlineUniformBlockBindings?: number; +} + +export class DescriptorPoolInlineUniformBlockCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorPoolInlineUniformBlockCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorPoolInlineUniformBlockCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorPoolInlineUniformBlockCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorPoolInlineUniformBlockCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorPoolInlineUniformBlockCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxInlineUniformBlockBindings !== undefined) this.maxInlineUniformBlockBindings = data.maxInlineUniformBlockBindings; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorPoolInlineUniformBlockCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxInlineUniformBlockBindings(): number { + return this.#view.getUint32(16, LE); + } + + set maxInlineUniformBlockBindings(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorPoolInlineUniformBlockCreateInfoEXT.ts b/api/struct/DescriptorPoolInlineUniformBlockCreateInfoEXT.ts new file mode 100644 index 0000000..608b0d9 --- /dev/null +++ b/api/struct/DescriptorPoolInlineUniformBlockCreateInfoEXT.ts @@ -0,0 +1,2 @@ + import { DescriptorPoolInlineUniformBlockCreateInfo } from "./DescriptorPoolInlineUniformBlockCreateInfo.ts"; + export type DescriptorPoolInlineUniformBlockCreateInfoEXT = DescriptorPoolInlineUniformBlockCreateInfo; \ No newline at end of file diff --git a/api/struct/DescriptorPoolSize.ts b/api/struct/DescriptorPoolSize.ts new file mode 100644 index 0000000..32dd266 --- /dev/null +++ b/api/struct/DescriptorPoolSize.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DescriptorType } from "../enum.ts"; + +export interface InitDescriptorPoolSize { + type?: DescriptorType; + descriptorCount?: number; +} + +export class DescriptorPoolSize implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorPoolSize); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorPoolSize) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorPoolSize.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorPoolSize.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorPoolSize.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.type !== undefined) this.type = data.type; + if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorPoolSize.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get type(): number { + return this.#view.getUint32(0, LE); + } + + set type(value: DescriptorType) { + this.#view.setUint32(0, Number(value), LE); + } + + get descriptorCount(): number { + return this.#view.getUint32(4, LE); + } + + set descriptorCount(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetAllocateInfo.ts b/api/struct/DescriptorSetAllocateInfo.ts new file mode 100644 index 0000000..e2cd727 --- /dev/null +++ b/api/struct/DescriptorSetAllocateInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DescriptorPool, DescriptorSetLayout } from "../def.ts"; + +export interface InitDescriptorSetAllocateInfo { + pNext?: AnyPointer; + descriptorPool?: DescriptorPool; + descriptorSetCount?: number; + pSetLayouts?: AnyPointer; +} + +export class DescriptorSetAllocateInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorSetAllocateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetAllocateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorSetAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorSetAllocateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorSetAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.descriptorPool !== undefined) this.descriptorPool = data.descriptorPool; + if (data.descriptorSetCount !== undefined) this.descriptorSetCount = data.descriptorSetCount; + if (data.pSetLayouts !== undefined) this.pSetLayouts = data.pSetLayouts; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetAllocateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_SET_ALLOCATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get descriptorPool(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set descriptorPool(value: DescriptorPool) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get descriptorSetCount(): number { + return this.#view.getUint32(24, LE); + } + + set descriptorSetCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pSetLayouts(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pSetLayouts(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetBindingReferenceVALVE.ts b/api/struct/DescriptorSetBindingReferenceVALVE.ts new file mode 100644 index 0000000..8596ec2 --- /dev/null +++ b/api/struct/DescriptorSetBindingReferenceVALVE.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DescriptorSetLayout } from "../def.ts"; + +export interface InitDescriptorSetBindingReferenceVALVE { + pNext?: AnyPointer; + descriptorSetLayout?: DescriptorSetLayout; + binding?: number; +} + +export class DescriptorSetBindingReferenceVALVE implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorSetBindingReferenceVALVE); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetBindingReferenceVALVE) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorSetBindingReferenceVALVE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorSetBindingReferenceVALVE.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorSetBindingReferenceVALVE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.descriptorSetLayout !== undefined) this.descriptorSetLayout = data.descriptorSetLayout; + if (data.binding !== undefined) this.binding = data.binding; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetBindingReferenceVALVE.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_SET_BINDING_REFERENCE_VALVE; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get descriptorSetLayout(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set descriptorSetLayout(value: DescriptorSetLayout) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get binding(): number { + return this.#view.getUint32(24, LE); + } + + set binding(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetLayoutBinding.ts b/api/struct/DescriptorSetLayoutBinding.ts new file mode 100644 index 0000000..04f764e --- /dev/null +++ b/api/struct/DescriptorSetLayoutBinding.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DescriptorType } from "../enum.ts"; +import { ShaderStageFlags, Sampler } from "../def.ts"; + +export interface InitDescriptorSetLayoutBinding { + binding?: number; + descriptorType?: DescriptorType; + descriptorCount?: number; + stageFlags?: ShaderStageFlags; + pImmutableSamplers?: AnyPointer; +} + +export class DescriptorSetLayoutBinding implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorSetLayoutBinding); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutBinding) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorSetLayoutBinding.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorSetLayoutBinding.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorSetLayoutBinding.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.binding !== undefined) this.binding = data.binding; + if (data.descriptorType !== undefined) this.descriptorType = data.descriptorType; + if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; + if (data.stageFlags !== undefined) this.stageFlags = data.stageFlags; + if (data.pImmutableSamplers !== undefined) this.pImmutableSamplers = data.pImmutableSamplers; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutBinding.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get binding(): number { + return this.#view.getUint32(0, LE); + } + + set binding(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get descriptorType(): number { + return this.#view.getUint32(4, LE); + } + + set descriptorType(value: DescriptorType) { + this.#view.setUint32(4, Number(value), LE); + } + + get descriptorCount(): number { + return this.#view.getUint32(8, LE); + } + + set descriptorCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get stageFlags(): number { + return this.#view.getUint32(12, LE); + } + + set stageFlags(value: ShaderStageFlags) { + this.#view.setUint32(12, Number(value), LE); + } + + get pImmutableSamplers(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pImmutableSamplers(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetLayoutBindingFlagsCreateInfo.ts b/api/struct/DescriptorSetLayoutBindingFlagsCreateInfo.ts new file mode 100644 index 0000000..70a88c0 --- /dev/null +++ b/api/struct/DescriptorSetLayoutBindingFlagsCreateInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DescriptorBindingFlags } from "../def.ts"; + +export interface InitDescriptorSetLayoutBindingFlagsCreateInfo { + pNext?: AnyPointer; + bindingCount?: number; + pBindingFlags?: AnyPointer; +} + +export class DescriptorSetLayoutBindingFlagsCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorSetLayoutBindingFlagsCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutBindingFlagsCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorSetLayoutBindingFlagsCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorSetLayoutBindingFlagsCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorSetLayoutBindingFlagsCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.bindingCount !== undefined) this.bindingCount = data.bindingCount; + if (data.pBindingFlags !== undefined) this.pBindingFlags = data.pBindingFlags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutBindingFlagsCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get bindingCount(): number { + return this.#view.getUint32(16, LE); + } + + set bindingCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pBindingFlags(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pBindingFlags(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetLayoutBindingFlagsCreateInfoEXT.ts b/api/struct/DescriptorSetLayoutBindingFlagsCreateInfoEXT.ts new file mode 100644 index 0000000..a7af2b3 --- /dev/null +++ b/api/struct/DescriptorSetLayoutBindingFlagsCreateInfoEXT.ts @@ -0,0 +1,2 @@ + import { DescriptorSetLayoutBindingFlagsCreateInfo } from "./DescriptorSetLayoutBindingFlagsCreateInfo.ts"; + export type DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo; \ No newline at end of file diff --git a/api/struct/DescriptorSetLayoutCreateInfo.ts b/api/struct/DescriptorSetLayoutCreateInfo.ts new file mode 100644 index 0000000..f9b7cff --- /dev/null +++ b/api/struct/DescriptorSetLayoutCreateInfo.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DescriptorSetLayoutBinding} from "./DescriptorSetLayoutBinding.ts"; +import { StructureType } from "../enum.ts"; +import { DescriptorSetLayoutCreateFlags } from "../def.ts"; + +export interface InitDescriptorSetLayoutCreateInfo { + pNext?: AnyPointer; + flags?: DescriptorSetLayoutCreateFlags; + bindingCount?: number; + pBindings?: AnyPointer; +} + +export class DescriptorSetLayoutCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorSetLayoutCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorSetLayoutCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorSetLayoutCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorSetLayoutCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.bindingCount !== undefined) this.bindingCount = data.bindingCount; + if (data.pBindings !== undefined) this.pBindings = data.pBindings; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DescriptorSetLayoutCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get bindingCount(): number { + return this.#view.getUint32(20, LE); + } + + set bindingCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pBindings(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pBindings(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetLayoutHostMappingInfoVALVE.ts b/api/struct/DescriptorSetLayoutHostMappingInfoVALVE.ts new file mode 100644 index 0000000..a955768 --- /dev/null +++ b/api/struct/DescriptorSetLayoutHostMappingInfoVALVE.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDescriptorSetLayoutHostMappingInfoVALVE { + pNext?: AnyPointer; + descriptorOffset?: number | bigint; + descriptorSize?: number; +} + +export class DescriptorSetLayoutHostMappingInfoVALVE implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorSetLayoutHostMappingInfoVALVE); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutHostMappingInfoVALVE) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorSetLayoutHostMappingInfoVALVE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorSetLayoutHostMappingInfoVALVE.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorSetLayoutHostMappingInfoVALVE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.descriptorOffset !== undefined) this.descriptorOffset = data.descriptorOffset; + if (data.descriptorSize !== undefined) this.descriptorSize = data.descriptorSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutHostMappingInfoVALVE.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get descriptorOffset(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set descriptorOffset(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get descriptorSize(): number { + return this.#view.getUint32(24, LE); + } + + set descriptorSize(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetLayoutSupport.ts b/api/struct/DescriptorSetLayoutSupport.ts new file mode 100644 index 0000000..2f6a98d --- /dev/null +++ b/api/struct/DescriptorSetLayoutSupport.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitDescriptorSetLayoutSupport { + pNext?: AnyPointer; + supported?: Bool32; +} + +export class DescriptorSetLayoutSupport implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorSetLayoutSupport); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutSupport) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorSetLayoutSupport.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorSetLayoutSupport.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorSetLayoutSupport.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.supported !== undefined) this.supported = data.supported; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutSupport.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_SUPPORT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get supported(): number { + return this.#view.getUint32(16, LE); + } + + set supported(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetLayoutSupportKHR.ts b/api/struct/DescriptorSetLayoutSupportKHR.ts new file mode 100644 index 0000000..31ae662 --- /dev/null +++ b/api/struct/DescriptorSetLayoutSupportKHR.ts @@ -0,0 +1,2 @@ + import { DescriptorSetLayoutSupport } from "./DescriptorSetLayoutSupport.ts"; + export type DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport; \ No newline at end of file diff --git a/api/struct/DescriptorSetVariableDescriptorCountAllocateInfo.ts b/api/struct/DescriptorSetVariableDescriptorCountAllocateInfo.ts new file mode 100644 index 0000000..d90868e --- /dev/null +++ b/api/struct/DescriptorSetVariableDescriptorCountAllocateInfo.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDescriptorSetVariableDescriptorCountAllocateInfo { + pNext?: AnyPointer; + descriptorSetCount?: number; + pDescriptorCounts?: AnyPointer; +} + +export class DescriptorSetVariableDescriptorCountAllocateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorSetVariableDescriptorCountAllocateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetVariableDescriptorCountAllocateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorSetVariableDescriptorCountAllocateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.descriptorSetCount !== undefined) this.descriptorSetCount = data.descriptorSetCount; + if (data.pDescriptorCounts !== undefined) this.pDescriptorCounts = data.pDescriptorCounts; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetVariableDescriptorCountAllocateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get descriptorSetCount(): number { + return this.#view.getUint32(16, LE); + } + + set descriptorSetCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pDescriptorCounts(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDescriptorCounts(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetVariableDescriptorCountAllocateInfoEXT.ts b/api/struct/DescriptorSetVariableDescriptorCountAllocateInfoEXT.ts new file mode 100644 index 0000000..8c23fa5 --- /dev/null +++ b/api/struct/DescriptorSetVariableDescriptorCountAllocateInfoEXT.ts @@ -0,0 +1,2 @@ + import { DescriptorSetVariableDescriptorCountAllocateInfo } from "./DescriptorSetVariableDescriptorCountAllocateInfo.ts"; + export type DescriptorSetVariableDescriptorCountAllocateInfoEXT = DescriptorSetVariableDescriptorCountAllocateInfo; \ No newline at end of file diff --git a/api/struct/DescriptorSetVariableDescriptorCountLayoutSupport.ts b/api/struct/DescriptorSetVariableDescriptorCountLayoutSupport.ts new file mode 100644 index 0000000..891c070 --- /dev/null +++ b/api/struct/DescriptorSetVariableDescriptorCountLayoutSupport.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDescriptorSetVariableDescriptorCountLayoutSupport { + pNext?: AnyPointer; + maxVariableDescriptorCount?: number; +} + +export class DescriptorSetVariableDescriptorCountLayoutSupport implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorSetVariableDescriptorCountLayoutSupport); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetVariableDescriptorCountLayoutSupport) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountLayoutSupport.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorSetVariableDescriptorCountLayoutSupport.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountLayoutSupport.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxVariableDescriptorCount !== undefined) this.maxVariableDescriptorCount = data.maxVariableDescriptorCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetVariableDescriptorCountLayoutSupport.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxVariableDescriptorCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxVariableDescriptorCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorSetVariableDescriptorCountLayoutSupportEXT.ts b/api/struct/DescriptorSetVariableDescriptorCountLayoutSupportEXT.ts new file mode 100644 index 0000000..45c17fc --- /dev/null +++ b/api/struct/DescriptorSetVariableDescriptorCountLayoutSupportEXT.ts @@ -0,0 +1,2 @@ + import { DescriptorSetVariableDescriptorCountLayoutSupport } from "./DescriptorSetVariableDescriptorCountLayoutSupport.ts"; + export type DescriptorSetVariableDescriptorCountLayoutSupportEXT = DescriptorSetVariableDescriptorCountLayoutSupport; \ No newline at end of file diff --git a/api/struct/DescriptorUpdateTemplateCreateInfo.ts b/api/struct/DescriptorUpdateTemplateCreateInfo.ts new file mode 100644 index 0000000..ee99d33 --- /dev/null +++ b/api/struct/DescriptorUpdateTemplateCreateInfo.ts @@ -0,0 +1,151 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DescriptorUpdateTemplateEntry} from "./DescriptorUpdateTemplateEntry.ts"; +import { StructureType, DescriptorUpdateTemplateType, PipelineBindPoint } from "../enum.ts"; +import { DescriptorUpdateTemplateCreateFlags, DescriptorSetLayout, PipelineLayout } from "../def.ts"; + +export interface InitDescriptorUpdateTemplateCreateInfo { + pNext?: AnyPointer; + flags?: DescriptorUpdateTemplateCreateFlags; + descriptorUpdateEntryCount?: number; + pDescriptorUpdateEntries?: AnyPointer; + templateType?: DescriptorUpdateTemplateType; + descriptorSetLayout?: DescriptorSetLayout; + pipelineBindPoint?: PipelineBindPoint; + pipelineLayout?: PipelineLayout; + set?: number; +} + +export class DescriptorUpdateTemplateCreateInfo implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorUpdateTemplateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorUpdateTemplateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorUpdateTemplateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorUpdateTemplateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorUpdateTemplateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.descriptorUpdateEntryCount !== undefined) this.descriptorUpdateEntryCount = data.descriptorUpdateEntryCount; + if (data.pDescriptorUpdateEntries !== undefined) this.pDescriptorUpdateEntries = data.pDescriptorUpdateEntries; + if (data.templateType !== undefined) this.templateType = data.templateType; + if (data.descriptorSetLayout !== undefined) this.descriptorSetLayout = data.descriptorSetLayout; + if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; + if (data.pipelineLayout !== undefined) this.pipelineLayout = data.pipelineLayout; + if (data.set !== undefined) this.set = data.set; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorUpdateTemplateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DescriptorUpdateTemplateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get descriptorUpdateEntryCount(): number { + return this.#view.getUint32(20, LE); + } + + set descriptorUpdateEntryCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pDescriptorUpdateEntries(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDescriptorUpdateEntries(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get templateType(): number { + return this.#view.getUint32(32, LE); + } + + set templateType(value: DescriptorUpdateTemplateType) { + this.#view.setUint32(32, Number(value), LE); + } + + get descriptorSetLayout(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set descriptorSetLayout(value: DescriptorSetLayout) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get pipelineBindPoint(): number { + return this.#view.getUint32(48, LE); + } + + set pipelineBindPoint(value: PipelineBindPoint) { + this.#view.setUint32(48, Number(value), LE); + } + + get pipelineLayout(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pipelineLayout(value: PipelineLayout) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get set(): number { + return this.#view.getUint32(64, LE); + } + + set set(value: number) { + this.#view.setUint32(64, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorUpdateTemplateCreateInfoKHR.ts b/api/struct/DescriptorUpdateTemplateCreateInfoKHR.ts new file mode 100644 index 0000000..0335422 --- /dev/null +++ b/api/struct/DescriptorUpdateTemplateCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { DescriptorUpdateTemplateCreateInfo } from "./DescriptorUpdateTemplateCreateInfo.ts"; + export type DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo; \ No newline at end of file diff --git a/api/struct/DescriptorUpdateTemplateEntry.ts b/api/struct/DescriptorUpdateTemplateEntry.ts new file mode 100644 index 0000000..688954f --- /dev/null +++ b/api/struct/DescriptorUpdateTemplateEntry.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DescriptorType } from "../enum.ts"; + +export interface InitDescriptorUpdateTemplateEntry { + dstBinding?: number; + dstArrayElement?: number; + descriptorCount?: number; + descriptorType?: DescriptorType; + offset?: number | bigint; + stride?: number | bigint; +} + +export class DescriptorUpdateTemplateEntry implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDescriptorUpdateTemplateEntry); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorUpdateTemplateEntry) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DescriptorUpdateTemplateEntry.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DescriptorUpdateTemplateEntry.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DescriptorUpdateTemplateEntry.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.dstBinding !== undefined) this.dstBinding = data.dstBinding; + if (data.dstArrayElement !== undefined) this.dstArrayElement = data.dstArrayElement; + if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; + if (data.descriptorType !== undefined) this.descriptorType = data.descriptorType; + if (data.offset !== undefined) this.offset = data.offset; + if (data.stride !== undefined) this.stride = data.stride; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorUpdateTemplateEntry.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get dstBinding(): number { + return this.#view.getUint32(0, LE); + } + + set dstBinding(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get dstArrayElement(): number { + return this.#view.getUint32(4, LE); + } + + set dstArrayElement(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get descriptorCount(): number { + return this.#view.getUint32(8, LE); + } + + set descriptorCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get descriptorType(): number { + return this.#view.getUint32(12, LE); + } + + set descriptorType(value: DescriptorType) { + this.#view.setUint32(12, Number(value), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set offset(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get stride(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set stride(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DescriptorUpdateTemplateEntryKHR.ts b/api/struct/DescriptorUpdateTemplateEntryKHR.ts new file mode 100644 index 0000000..b699d65 --- /dev/null +++ b/api/struct/DescriptorUpdateTemplateEntryKHR.ts @@ -0,0 +1,2 @@ + import { DescriptorUpdateTemplateEntry } from "./DescriptorUpdateTemplateEntry.ts"; + export type DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry; \ No newline at end of file diff --git a/api/struct/DeviceAddressBindingCallbackDataEXT.ts b/api/struct/DeviceAddressBindingCallbackDataEXT.ts new file mode 100644 index 0000000..7f84931 --- /dev/null +++ b/api/struct/DeviceAddressBindingCallbackDataEXT.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DeviceAddressBindingTypeEXT } from "../enum.ts"; +import { DeviceAddressBindingFlagsEXT, DeviceAddress, DeviceSize } from "../def.ts"; + +export interface InitDeviceAddressBindingCallbackDataEXT { + pNext?: AnyPointer; + flags?: DeviceAddressBindingFlagsEXT; + baseAddress?: DeviceAddress; + size?: DeviceSize; + bindingType?: DeviceAddressBindingTypeEXT; +} + +export class DeviceAddressBindingCallbackDataEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceAddressBindingCallbackDataEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceAddressBindingCallbackDataEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceAddressBindingCallbackDataEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceAddressBindingCallbackDataEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceAddressBindingCallbackDataEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.baseAddress !== undefined) this.baseAddress = data.baseAddress; + if (data.size !== undefined) this.size = data.size; + if (data.bindingType !== undefined) this.bindingType = data.bindingType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceAddressBindingCallbackDataEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DeviceAddressBindingFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get baseAddress(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set baseAddress(value: DeviceAddress) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get bindingType(): number { + return this.#view.getUint32(40, LE); + } + + set bindingType(value: DeviceAddressBindingTypeEXT) { + this.#view.setUint32(40, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceBufferMemoryRequirements.ts b/api/struct/DeviceBufferMemoryRequirements.ts new file mode 100644 index 0000000..b93252d --- /dev/null +++ b/api/struct/DeviceBufferMemoryRequirements.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {BufferCreateInfo} from "./BufferCreateInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDeviceBufferMemoryRequirements { + pNext?: AnyPointer; + pCreateInfo?: AnyPointer; +} + +export class DeviceBufferMemoryRequirements implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceBufferMemoryRequirements); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceBufferMemoryRequirements) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceBufferMemoryRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceBufferMemoryRequirements.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceBufferMemoryRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pCreateInfo !== undefined) this.pCreateInfo = data.pCreateInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceBufferMemoryRequirements.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_BUFFER_MEMORY_REQUIREMENTS; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pCreateInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pCreateInfo(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceBufferMemoryRequirementsKHR.ts b/api/struct/DeviceBufferMemoryRequirementsKHR.ts new file mode 100644 index 0000000..8e67f09 --- /dev/null +++ b/api/struct/DeviceBufferMemoryRequirementsKHR.ts @@ -0,0 +1,2 @@ + import { DeviceBufferMemoryRequirements } from "./DeviceBufferMemoryRequirements.ts"; + export type DeviceBufferMemoryRequirementsKHR = DeviceBufferMemoryRequirements; \ No newline at end of file diff --git a/api/struct/DeviceCreateInfo.ts b/api/struct/DeviceCreateInfo.ts new file mode 100644 index 0000000..a147283 --- /dev/null +++ b/api/struct/DeviceCreateInfo.ts @@ -0,0 +1,152 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DeviceQueueCreateInfo} from "./DeviceQueueCreateInfo.ts"; +import {PhysicalDeviceFeatures} from "./PhysicalDeviceFeatures.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceCreateFlags } from "../def.ts"; + +export interface InitDeviceCreateInfo { + pNext?: AnyPointer; + flags?: DeviceCreateFlags; + queueCreateInfoCount?: number; + pQueueCreateInfos?: AnyPointer; + enabledLayerCount?: number; + ppEnabledLayerNames?: AnyPointer; + enabledExtensionCount?: number; + ppEnabledExtensionNames?: AnyPointer; + pEnabledFeatures?: AnyPointer; +} + +export class DeviceCreateInfo implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.queueCreateInfoCount !== undefined) this.queueCreateInfoCount = data.queueCreateInfoCount; + if (data.pQueueCreateInfos !== undefined) this.pQueueCreateInfos = data.pQueueCreateInfos; + if (data.enabledLayerCount !== undefined) this.enabledLayerCount = data.enabledLayerCount; + if (data.ppEnabledLayerNames !== undefined) this.ppEnabledLayerNames = data.ppEnabledLayerNames; + if (data.enabledExtensionCount !== undefined) this.enabledExtensionCount = data.enabledExtensionCount; + if (data.ppEnabledExtensionNames !== undefined) this.ppEnabledExtensionNames = data.ppEnabledExtensionNames; + if (data.pEnabledFeatures !== undefined) this.pEnabledFeatures = data.pEnabledFeatures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DeviceCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get queueCreateInfoCount(): number { + return this.#view.getUint32(20, LE); + } + + set queueCreateInfoCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pQueueCreateInfos(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pQueueCreateInfos(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get enabledLayerCount(): number { + return this.#view.getUint32(32, LE); + } + + set enabledLayerCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get ppEnabledLayerNames(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set ppEnabledLayerNames(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get enabledExtensionCount(): number { + return this.#view.getUint32(48, LE); + } + + set enabledExtensionCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get ppEnabledExtensionNames(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set ppEnabledExtensionNames(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get pEnabledFeatures(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pEnabledFeatures(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceDeviceMemoryReportCreateInfoEXT.ts b/api/struct/DeviceDeviceMemoryReportCreateInfoEXT.ts new file mode 100644 index 0000000..4c3624e --- /dev/null +++ b/api/struct/DeviceDeviceMemoryReportCreateInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceMemoryReportFlagsEXT } from "../def.ts"; + +export interface InitDeviceDeviceMemoryReportCreateInfoEXT { + pNext?: AnyPointer; + flags?: DeviceMemoryReportFlagsEXT; + pfnUserCallback?: Deno.PointerValue; + pUserData?: AnyPointer; +} + +export class DeviceDeviceMemoryReportCreateInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceDeviceMemoryReportCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceDeviceMemoryReportCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceDeviceMemoryReportCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceDeviceMemoryReportCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceDeviceMemoryReportCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pfnUserCallback !== undefined) this.pfnUserCallback = data.pfnUserCallback; + if (data.pUserData !== undefined) this.pUserData = data.pUserData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceDeviceMemoryReportCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DeviceMemoryReportFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get pfnUserCallback(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pfnUserCallback(value: Deno.PointerValue) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pUserData(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pUserData(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceDiagnosticsConfigCreateInfoNV.ts b/api/struct/DeviceDiagnosticsConfigCreateInfoNV.ts new file mode 100644 index 0000000..e1a0b36 --- /dev/null +++ b/api/struct/DeviceDiagnosticsConfigCreateInfoNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceDiagnosticsConfigFlagsNV } from "../def.ts"; + +export interface InitDeviceDiagnosticsConfigCreateInfoNV { + pNext?: AnyPointer; + flags?: DeviceDiagnosticsConfigFlagsNV; +} + +export class DeviceDiagnosticsConfigCreateInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceDiagnosticsConfigCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceDiagnosticsConfigCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceDiagnosticsConfigCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceDiagnosticsConfigCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceDiagnosticsConfigCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceDiagnosticsConfigCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DeviceDiagnosticsConfigFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceEventInfoEXT.ts b/api/struct/DeviceEventInfoEXT.ts new file mode 100644 index 0000000..336794c --- /dev/null +++ b/api/struct/DeviceEventInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DeviceEventTypeEXT } from "../enum.ts"; + +export interface InitDeviceEventInfoEXT { + pNext?: AnyPointer; + deviceEvent?: DeviceEventTypeEXT; +} + +export class DeviceEventInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceEventInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceEventInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceEventInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceEventInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceEventInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceEvent !== undefined) this.deviceEvent = data.deviceEvent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceEventInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_EVENT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceEvent(): number { + return this.#view.getUint32(16, LE); + } + + set deviceEvent(value: DeviceEventTypeEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceFaultAddressInfoEXT.ts b/api/struct/DeviceFaultAddressInfoEXT.ts new file mode 100644 index 0000000..26bdd8e --- /dev/null +++ b/api/struct/DeviceFaultAddressInfoEXT.ts @@ -0,0 +1,81 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceFaultAddressTypeEXT } from "../enum.ts"; +import { DeviceAddress, DeviceSize } from "../def.ts"; + +export interface InitDeviceFaultAddressInfoEXT { + addressType?: DeviceFaultAddressTypeEXT; + reportedAddress?: DeviceAddress; + addressPrecision?: DeviceSize; +} + +export class DeviceFaultAddressInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceFaultAddressInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultAddressInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceFaultAddressInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceFaultAddressInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceFaultAddressInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.addressType !== undefined) this.addressType = data.addressType; + if (data.reportedAddress !== undefined) this.reportedAddress = data.reportedAddress; + if (data.addressPrecision !== undefined) this.addressPrecision = data.addressPrecision; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultAddressInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get addressType(): number { + return this.#view.getUint32(0, LE); + } + + set addressType(value: DeviceFaultAddressTypeEXT) { + this.#view.setUint32(0, Number(value), LE); + } + + get reportedAddress(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set reportedAddress(value: DeviceAddress) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get addressPrecision(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set addressPrecision(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceFaultCountsEXT.ts b/api/struct/DeviceFaultCountsEXT.ts new file mode 100644 index 0000000..bb1e03e --- /dev/null +++ b/api/struct/DeviceFaultCountsEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitDeviceFaultCountsEXT { + pNext?: AnyPointer; + addressInfoCount?: number; + vendorInfoCount?: number; + vendorBinarySize?: DeviceSize; +} + +export class DeviceFaultCountsEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceFaultCountsEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultCountsEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceFaultCountsEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceFaultCountsEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceFaultCountsEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.addressInfoCount !== undefined) this.addressInfoCount = data.addressInfoCount; + if (data.vendorInfoCount !== undefined) this.vendorInfoCount = data.vendorInfoCount; + if (data.vendorBinarySize !== undefined) this.vendorBinarySize = data.vendorBinarySize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultCountsEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_FAULT_COUNTS_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get addressInfoCount(): number { + return this.#view.getUint32(16, LE); + } + + set addressInfoCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get vendorInfoCount(): number { + return this.#view.getUint32(20, LE); + } + + set vendorInfoCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get vendorBinarySize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set vendorBinarySize(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceFaultInfoEXT.ts b/api/struct/DeviceFaultInfoEXT.ts new file mode 100644 index 0000000..ec617e2 --- /dev/null +++ b/api/struct/DeviceFaultInfoEXT.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DeviceFaultAddressInfoEXT} from "./DeviceFaultAddressInfoEXT.ts"; +import {DeviceFaultVendorInfoEXT} from "./DeviceFaultVendorInfoEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDeviceFaultInfoEXT { + pNext?: AnyPointer; + description?: Uint8Array; + pAddressInfos?: AnyPointer; + pVendorInfos?: AnyPointer; + pVendorBinaryData?: AnyPointer; +} + +export class DeviceFaultInfoEXT implements BaseStruct { + static size = 296; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceFaultInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceFaultInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceFaultInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceFaultInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.description !== undefined) this.description = data.description; + if (data.pAddressInfos !== undefined) this.pAddressInfos = data.pAddressInfos; + if (data.pVendorInfos !== undefined) this.pVendorInfos = data.pVendorInfos; + if (data.pVendorBinaryData !== undefined) this.pVendorBinaryData = data.pVendorBinaryData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_FAULT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get description(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); + } + + set description(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } + + get pAddressInfos(): Deno.PointerValue { + return pointerFromView(this.#view, 272, LE); + } + + set pAddressInfos(value: AnyPointer) { + this.#view.setBigUint64(272, BigInt(anyPointer(value)), LE); + } + + get pVendorInfos(): Deno.PointerValue { + return pointerFromView(this.#view, 280, LE); + } + + set pVendorInfos(value: AnyPointer) { + this.#view.setBigUint64(280, BigInt(anyPointer(value)), LE); + } + + get pVendorBinaryData(): Deno.PointerValue { + return pointerFromView(this.#view, 288, LE); + } + + set pVendorBinaryData(value: AnyPointer) { + this.#view.setBigUint64(288, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceFaultVendorBinaryHeaderVersionOneEXT.ts b/api/struct/DeviceFaultVendorBinaryHeaderVersionOneEXT.ts new file mode 100644 index 0000000..673ab1e --- /dev/null +++ b/api/struct/DeviceFaultVendorBinaryHeaderVersionOneEXT.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceFaultVendorBinaryHeaderVersionEXT } from "../enum.ts"; + +export interface InitDeviceFaultVendorBinaryHeaderVersionOneEXT { + headerSize?: number; + headerVersion?: DeviceFaultVendorBinaryHeaderVersionEXT; + vendorID?: number; + deviceID?: number; + driverVersion?: number; + pipelineCacheUUID?: Uint8Array; + applicationNameOffset?: number; + applicationVersion?: number; + engineNameOffset?: number; +} + +export class DeviceFaultVendorBinaryHeaderVersionOneEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceFaultVendorBinaryHeaderVersionOneEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultVendorBinaryHeaderVersionOneEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceFaultVendorBinaryHeaderVersionOneEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceFaultVendorBinaryHeaderVersionOneEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceFaultVendorBinaryHeaderVersionOneEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.headerSize !== undefined) this.headerSize = data.headerSize; + if (data.headerVersion !== undefined) this.headerVersion = data.headerVersion; + if (data.vendorID !== undefined) this.vendorID = data.vendorID; + if (data.deviceID !== undefined) this.deviceID = data.deviceID; + if (data.driverVersion !== undefined) this.driverVersion = data.driverVersion; + if (data.pipelineCacheUUID !== undefined) this.pipelineCacheUUID = data.pipelineCacheUUID; + if (data.applicationNameOffset !== undefined) this.applicationNameOffset = data.applicationNameOffset; + if (data.applicationVersion !== undefined) this.applicationVersion = data.applicationVersion; + if (data.engineNameOffset !== undefined) this.engineNameOffset = data.engineNameOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultVendorBinaryHeaderVersionOneEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get headerSize(): number { + return this.#view.getUint32(0, LE); + } + + set headerSize(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get headerVersion(): number { + return this.#view.getUint32(4, LE); + } + + set headerVersion(value: DeviceFaultVendorBinaryHeaderVersionEXT) { + this.#view.setUint32(4, Number(value), LE); + } + + get vendorID(): number { + return this.#view.getUint32(8, LE); + } + + set vendorID(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get deviceID(): number { + return this.#view.getUint32(12, LE); + } + + set deviceID(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get driverVersion(): number { + return this.#view.getUint32(16, LE); + } + + set driverVersion(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pipelineCacheUUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 16); + } + + set pipelineCacheUUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } + + get applicationNameOffset(): number { + return this.#view.getUint32(36, LE); + } + + set applicationNameOffset(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get applicationVersion(): number { + return this.#view.getUint32(40, LE); + } + + set applicationVersion(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get engineNameOffset(): number { + return this.#view.getUint32(44, LE); + } + + set engineNameOffset(value: number) { + this.#view.setUint32(44, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceFaultVendorInfoEXT.ts b/api/struct/DeviceFaultVendorInfoEXT.ts new file mode 100644 index 0000000..17c3f01 --- /dev/null +++ b/api/struct/DeviceFaultVendorInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitDeviceFaultVendorInfoEXT { + description?: Uint8Array; + vendorFaultCode?: number | bigint; + vendorFaultData?: number | bigint; +} + +export class DeviceFaultVendorInfoEXT implements BaseStruct { + static size = 272; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceFaultVendorInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultVendorInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceFaultVendorInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceFaultVendorInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceFaultVendorInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.description !== undefined) this.description = data.description; + if (data.vendorFaultCode !== undefined) this.vendorFaultCode = data.vendorFaultCode; + if (data.vendorFaultData !== undefined) this.vendorFaultData = data.vendorFaultData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultVendorInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get description(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 256); + } + + set description(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 0); + } + + get vendorFaultCode(): bigint { + return this.#view.getBigUint64(256, LE); + } + + set vendorFaultCode(value: number | bigint) { + this.#view.setBigUint64(256, BigInt(value), LE); + } + + get vendorFaultData(): bigint { + return this.#view.getBigUint64(264, LE); + } + + set vendorFaultData(value: number | bigint) { + this.#view.setBigUint64(264, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceGroupBindSparseInfo.ts b/api/struct/DeviceGroupBindSparseInfo.ts new file mode 100644 index 0000000..6ac0dda --- /dev/null +++ b/api/struct/DeviceGroupBindSparseInfo.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDeviceGroupBindSparseInfo { + pNext?: AnyPointer; + resourceDeviceIndex?: number; + memoryDeviceIndex?: number; +} + +export class DeviceGroupBindSparseInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceGroupBindSparseInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupBindSparseInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceGroupBindSparseInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceGroupBindSparseInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceGroupBindSparseInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.resourceDeviceIndex !== undefined) this.resourceDeviceIndex = data.resourceDeviceIndex; + if (data.memoryDeviceIndex !== undefined) this.memoryDeviceIndex = data.memoryDeviceIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupBindSparseInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_GROUP_BIND_SPARSE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get resourceDeviceIndex(): number { + return this.#view.getUint32(16, LE); + } + + set resourceDeviceIndex(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get memoryDeviceIndex(): number { + return this.#view.getUint32(20, LE); + } + + set memoryDeviceIndex(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceGroupBindSparseInfoKHR.ts b/api/struct/DeviceGroupBindSparseInfoKHR.ts new file mode 100644 index 0000000..60f206d --- /dev/null +++ b/api/struct/DeviceGroupBindSparseInfoKHR.ts @@ -0,0 +1,2 @@ + import { DeviceGroupBindSparseInfo } from "./DeviceGroupBindSparseInfo.ts"; + export type DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo; \ No newline at end of file diff --git a/api/struct/DeviceGroupCommandBufferBeginInfo.ts b/api/struct/DeviceGroupCommandBufferBeginInfo.ts new file mode 100644 index 0000000..0a8effd --- /dev/null +++ b/api/struct/DeviceGroupCommandBufferBeginInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDeviceGroupCommandBufferBeginInfo { + pNext?: AnyPointer; + deviceMask?: number; +} + +export class DeviceGroupCommandBufferBeginInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceGroupCommandBufferBeginInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupCommandBufferBeginInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceGroupCommandBufferBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceGroupCommandBufferBeginInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceGroupCommandBufferBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupCommandBufferBeginInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceMask(): number { + return this.#view.getUint32(16, LE); + } + + set deviceMask(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceGroupCommandBufferBeginInfoKHR.ts b/api/struct/DeviceGroupCommandBufferBeginInfoKHR.ts new file mode 100644 index 0000000..57d3d88 --- /dev/null +++ b/api/struct/DeviceGroupCommandBufferBeginInfoKHR.ts @@ -0,0 +1,2 @@ + import { DeviceGroupCommandBufferBeginInfo } from "./DeviceGroupCommandBufferBeginInfo.ts"; + export type DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo; \ No newline at end of file diff --git a/api/struct/DeviceGroupDeviceCreateInfo.ts b/api/struct/DeviceGroupDeviceCreateInfo.ts new file mode 100644 index 0000000..0470d5c --- /dev/null +++ b/api/struct/DeviceGroupDeviceCreateInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PhysicalDevice } from "../def.ts"; + +export interface InitDeviceGroupDeviceCreateInfo { + pNext?: AnyPointer; + physicalDeviceCount?: number; + pPhysicalDevices?: AnyPointer; +} + +export class DeviceGroupDeviceCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceGroupDeviceCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupDeviceCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceGroupDeviceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceGroupDeviceCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceGroupDeviceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.physicalDeviceCount !== undefined) this.physicalDeviceCount = data.physicalDeviceCount; + if (data.pPhysicalDevices !== undefined) this.pPhysicalDevices = data.pPhysicalDevices; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupDeviceCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_GROUP_DEVICE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get physicalDeviceCount(): number { + return this.#view.getUint32(16, LE); + } + + set physicalDeviceCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pPhysicalDevices(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pPhysicalDevices(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceGroupDeviceCreateInfoKHR.ts b/api/struct/DeviceGroupDeviceCreateInfoKHR.ts new file mode 100644 index 0000000..f3e2bda --- /dev/null +++ b/api/struct/DeviceGroupDeviceCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { DeviceGroupDeviceCreateInfo } from "./DeviceGroupDeviceCreateInfo.ts"; + export type DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo; \ No newline at end of file diff --git a/api/struct/DeviceGroupPresentCapabilitiesKHR.ts b/api/struct/DeviceGroupPresentCapabilitiesKHR.ts new file mode 100644 index 0000000..ad60aef --- /dev/null +++ b/api/struct/DeviceGroupPresentCapabilitiesKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceGroupPresentModeFlagsKHR } from "../def.ts"; + +export interface InitDeviceGroupPresentCapabilitiesKHR { + pNext?: AnyPointer; + presentMask?: Uint32Array; + modes?: DeviceGroupPresentModeFlagsKHR; +} + +export class DeviceGroupPresentCapabilitiesKHR implements BaseStruct { + static size = 152; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceGroupPresentCapabilitiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupPresentCapabilitiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceGroupPresentCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceGroupPresentCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceGroupPresentCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.presentMask !== undefined) this.presentMask = data.presentMask; + if (data.modes !== undefined) this.modes = data.modes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupPresentCapabilitiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_GROUP_PRESENT_CAPABILITIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get presentMask(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 16, 32); + } + + set presentMask(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } + + get modes(): number { + return this.#view.getUint32(144, LE); + } + + set modes(value: DeviceGroupPresentModeFlagsKHR) { + this.#view.setUint32(144, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceGroupPresentInfoKHR.ts b/api/struct/DeviceGroupPresentInfoKHR.ts new file mode 100644 index 0000000..c3ba8e8 --- /dev/null +++ b/api/struct/DeviceGroupPresentInfoKHR.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DeviceGroupPresentModeFlagBitsKHR } from "../enum.ts"; + +export interface InitDeviceGroupPresentInfoKHR { + pNext?: AnyPointer; + swapchainCount?: number; + pDeviceMasks?: AnyPointer; + mode?: DeviceGroupPresentModeFlagBitsKHR; +} + +export class DeviceGroupPresentInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceGroupPresentInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupPresentInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceGroupPresentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceGroupPresentInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceGroupPresentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; + if (data.pDeviceMasks !== undefined) this.pDeviceMasks = data.pDeviceMasks; + if (data.mode !== undefined) this.mode = data.mode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupPresentInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_GROUP_PRESENT_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get swapchainCount(): number { + return this.#view.getUint32(16, LE); + } + + set swapchainCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pDeviceMasks(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDeviceMasks(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get mode(): number { + return this.#view.getUint32(32, LE); + } + + set mode(value: DeviceGroupPresentModeFlagBitsKHR) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceGroupRenderPassBeginInfo.ts b/api/struct/DeviceGroupRenderPassBeginInfo.ts new file mode 100644 index 0000000..f84352e --- /dev/null +++ b/api/struct/DeviceGroupRenderPassBeginInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDeviceGroupRenderPassBeginInfo { + pNext?: AnyPointer; + deviceMask?: number; + deviceRenderAreaCount?: number; + pDeviceRenderAreas?: AnyPointer; +} + +export class DeviceGroupRenderPassBeginInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceGroupRenderPassBeginInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupRenderPassBeginInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceGroupRenderPassBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceGroupRenderPassBeginInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceGroupRenderPassBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; + if (data.deviceRenderAreaCount !== undefined) this.deviceRenderAreaCount = data.deviceRenderAreaCount; + if (data.pDeviceRenderAreas !== undefined) this.pDeviceRenderAreas = data.pDeviceRenderAreas; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupRenderPassBeginInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_GROUP_RENDER_PASS_BEGIN_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceMask(): number { + return this.#view.getUint32(16, LE); + } + + set deviceMask(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get deviceRenderAreaCount(): number { + return this.#view.getUint32(20, LE); + } + + set deviceRenderAreaCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pDeviceRenderAreas(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDeviceRenderAreas(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceGroupRenderPassBeginInfoKHR.ts b/api/struct/DeviceGroupRenderPassBeginInfoKHR.ts new file mode 100644 index 0000000..868881f --- /dev/null +++ b/api/struct/DeviceGroupRenderPassBeginInfoKHR.ts @@ -0,0 +1,2 @@ + import { DeviceGroupRenderPassBeginInfo } from "./DeviceGroupRenderPassBeginInfo.ts"; + export type DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo; \ No newline at end of file diff --git a/api/struct/DeviceGroupSubmitInfo.ts b/api/struct/DeviceGroupSubmitInfo.ts new file mode 100644 index 0000000..78b1cc4 --- /dev/null +++ b/api/struct/DeviceGroupSubmitInfo.ts @@ -0,0 +1,129 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDeviceGroupSubmitInfo { + pNext?: AnyPointer; + waitSemaphoreCount?: number; + pWaitSemaphoreDeviceIndices?: AnyPointer; + commandBufferCount?: number; + pCommandBufferDeviceMasks?: AnyPointer; + signalSemaphoreCount?: number; + pSignalSemaphoreDeviceIndices?: AnyPointer; +} + +export class DeviceGroupSubmitInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceGroupSubmitInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupSubmitInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceGroupSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceGroupSubmitInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceGroupSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.waitSemaphoreCount !== undefined) this.waitSemaphoreCount = data.waitSemaphoreCount; + if (data.pWaitSemaphoreDeviceIndices !== undefined) this.pWaitSemaphoreDeviceIndices = data.pWaitSemaphoreDeviceIndices; + if (data.commandBufferCount !== undefined) this.commandBufferCount = data.commandBufferCount; + if (data.pCommandBufferDeviceMasks !== undefined) this.pCommandBufferDeviceMasks = data.pCommandBufferDeviceMasks; + if (data.signalSemaphoreCount !== undefined) this.signalSemaphoreCount = data.signalSemaphoreCount; + if (data.pSignalSemaphoreDeviceIndices !== undefined) this.pSignalSemaphoreDeviceIndices = data.pSignalSemaphoreDeviceIndices; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupSubmitInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_GROUP_SUBMIT_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get waitSemaphoreCount(): number { + return this.#view.getUint32(16, LE); + } + + set waitSemaphoreCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pWaitSemaphoreDeviceIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pWaitSemaphoreDeviceIndices(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get commandBufferCount(): number { + return this.#view.getUint32(32, LE); + } + + set commandBufferCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pCommandBufferDeviceMasks(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pCommandBufferDeviceMasks(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get signalSemaphoreCount(): number { + return this.#view.getUint32(48, LE); + } + + set signalSemaphoreCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pSignalSemaphoreDeviceIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pSignalSemaphoreDeviceIndices(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceGroupSubmitInfoKHR.ts b/api/struct/DeviceGroupSubmitInfoKHR.ts new file mode 100644 index 0000000..f8eaa01 --- /dev/null +++ b/api/struct/DeviceGroupSubmitInfoKHR.ts @@ -0,0 +1,2 @@ + import { DeviceGroupSubmitInfo } from "./DeviceGroupSubmitInfo.ts"; + export type DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo; \ No newline at end of file diff --git a/api/struct/DeviceGroupSwapchainCreateInfoKHR.ts b/api/struct/DeviceGroupSwapchainCreateInfoKHR.ts new file mode 100644 index 0000000..b4d4c19 --- /dev/null +++ b/api/struct/DeviceGroupSwapchainCreateInfoKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceGroupPresentModeFlagsKHR } from "../def.ts"; + +export interface InitDeviceGroupSwapchainCreateInfoKHR { + pNext?: AnyPointer; + modes?: DeviceGroupPresentModeFlagsKHR; +} + +export class DeviceGroupSwapchainCreateInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceGroupSwapchainCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupSwapchainCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceGroupSwapchainCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceGroupSwapchainCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceGroupSwapchainCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.modes !== undefined) this.modes = data.modes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupSwapchainCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get modes(): number { + return this.#view.getUint32(16, LE); + } + + set modes(value: DeviceGroupPresentModeFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceImageMemoryRequirements.ts b/api/struct/DeviceImageMemoryRequirements.ts new file mode 100644 index 0000000..989a8bc --- /dev/null +++ b/api/struct/DeviceImageMemoryRequirements.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageCreateInfo} from "./ImageCreateInfo.ts"; +import { StructureType, ImageAspectFlagBits } from "../enum.ts"; + +export interface InitDeviceImageMemoryRequirements { + pNext?: AnyPointer; + pCreateInfo?: AnyPointer; + planeAspect?: ImageAspectFlagBits; +} + +export class DeviceImageMemoryRequirements implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceImageMemoryRequirements); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceImageMemoryRequirements) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceImageMemoryRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceImageMemoryRequirements.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceImageMemoryRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pCreateInfo !== undefined) this.pCreateInfo = data.pCreateInfo; + if (data.planeAspect !== undefined) this.planeAspect = data.planeAspect; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceImageMemoryRequirements.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_IMAGE_MEMORY_REQUIREMENTS; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pCreateInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pCreateInfo(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get planeAspect(): number { + return this.#view.getUint32(24, LE); + } + + set planeAspect(value: ImageAspectFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceImageMemoryRequirementsKHR.ts b/api/struct/DeviceImageMemoryRequirementsKHR.ts new file mode 100644 index 0000000..0fc885c --- /dev/null +++ b/api/struct/DeviceImageMemoryRequirementsKHR.ts @@ -0,0 +1,2 @@ + import { DeviceImageMemoryRequirements } from "./DeviceImageMemoryRequirements.ts"; + export type DeviceImageMemoryRequirementsKHR = DeviceImageMemoryRequirements; \ No newline at end of file diff --git a/api/struct/DeviceMemoryOpaqueCaptureAddressInfo.ts b/api/struct/DeviceMemoryOpaqueCaptureAddressInfo.ts new file mode 100644 index 0000000..6b9b0f7 --- /dev/null +++ b/api/struct/DeviceMemoryOpaqueCaptureAddressInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceMemory } from "../def.ts"; + +export interface InitDeviceMemoryOpaqueCaptureAddressInfo { + pNext?: AnyPointer; + memory?: DeviceMemory; +} + +export class DeviceMemoryOpaqueCaptureAddressInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceMemoryOpaqueCaptureAddressInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceMemoryOpaqueCaptureAddressInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceMemoryOpaqueCaptureAddressInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceMemoryOpaqueCaptureAddressInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceMemoryOpaqueCaptureAddressInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memory !== undefined) this.memory = data.memory; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceMemoryOpaqueCaptureAddressInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceMemoryOpaqueCaptureAddressInfoKHR.ts b/api/struct/DeviceMemoryOpaqueCaptureAddressInfoKHR.ts new file mode 100644 index 0000000..46c50fc --- /dev/null +++ b/api/struct/DeviceMemoryOpaqueCaptureAddressInfoKHR.ts @@ -0,0 +1,2 @@ + import { DeviceMemoryOpaqueCaptureAddressInfo } from "./DeviceMemoryOpaqueCaptureAddressInfo.ts"; + export type DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo; \ No newline at end of file diff --git a/api/struct/DeviceMemoryOverallocationCreateInfoAMD.ts b/api/struct/DeviceMemoryOverallocationCreateInfoAMD.ts new file mode 100644 index 0000000..3721542 --- /dev/null +++ b/api/struct/DeviceMemoryOverallocationCreateInfoAMD.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, MemoryOverallocationBehaviorAMD } from "../enum.ts"; + +export interface InitDeviceMemoryOverallocationCreateInfoAMD { + pNext?: AnyPointer; + overallocationBehavior?: MemoryOverallocationBehaviorAMD; +} + +export class DeviceMemoryOverallocationCreateInfoAMD implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceMemoryOverallocationCreateInfoAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceMemoryOverallocationCreateInfoAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceMemoryOverallocationCreateInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceMemoryOverallocationCreateInfoAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceMemoryOverallocationCreateInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.overallocationBehavior !== undefined) this.overallocationBehavior = data.overallocationBehavior; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceMemoryOverallocationCreateInfoAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get overallocationBehavior(): number { + return this.#view.getUint32(16, LE); + } + + set overallocationBehavior(value: MemoryOverallocationBehaviorAMD) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceMemoryReportCallbackDataEXT.ts b/api/struct/DeviceMemoryReportCallbackDataEXT.ts new file mode 100644 index 0000000..53f5d91 --- /dev/null +++ b/api/struct/DeviceMemoryReportCallbackDataEXT.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DeviceMemoryReportEventTypeEXT, ObjectType } from "../enum.ts"; +import { DeviceMemoryReportFlagsEXT, DeviceSize } from "../def.ts"; + +export interface InitDeviceMemoryReportCallbackDataEXT { + pNext?: AnyPointer; + flags?: DeviceMemoryReportFlagsEXT; + type?: DeviceMemoryReportEventTypeEXT; + memoryObjectId?: number | bigint; + size?: DeviceSize; + objectType?: ObjectType; + objectHandle?: number | bigint; + heapIndex?: number; +} + +export class DeviceMemoryReportCallbackDataEXT implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceMemoryReportCallbackDataEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceMemoryReportCallbackDataEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceMemoryReportCallbackDataEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceMemoryReportCallbackDataEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceMemoryReportCallbackDataEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.type !== undefined) this.type = data.type; + if (data.memoryObjectId !== undefined) this.memoryObjectId = data.memoryObjectId; + if (data.size !== undefined) this.size = data.size; + if (data.objectType !== undefined) this.objectType = data.objectType; + if (data.objectHandle !== undefined) this.objectHandle = data.objectHandle; + if (data.heapIndex !== undefined) this.heapIndex = data.heapIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceMemoryReportCallbackDataEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DeviceMemoryReportFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get type(): number { + return this.#view.getUint32(20, LE); + } + + set type(value: DeviceMemoryReportEventTypeEXT) { + this.#view.setUint32(20, Number(value), LE); + } + + get memoryObjectId(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set memoryObjectId(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get objectType(): number { + return this.#view.getUint32(40, LE); + } + + set objectType(value: ObjectType) { + this.#view.setUint32(40, Number(value), LE); + } + + get objectHandle(): bigint { + return this.#view.getBigUint64(48, LE); + } + + set objectHandle(value: number | bigint) { + this.#view.setBigUint64(48, BigInt(value), LE); + } + + get heapIndex(): number { + return this.#view.getUint32(56, LE); + } + + set heapIndex(value: number) { + this.#view.setUint32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DevicePrivateDataCreateInfo.ts b/api/struct/DevicePrivateDataCreateInfo.ts new file mode 100644 index 0000000..b2e85bc --- /dev/null +++ b/api/struct/DevicePrivateDataCreateInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDevicePrivateDataCreateInfo { + pNext?: AnyPointer; + privateDataSlotRequestCount?: number; +} + +export class DevicePrivateDataCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDevicePrivateDataCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDevicePrivateDataCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DevicePrivateDataCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DevicePrivateDataCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DevicePrivateDataCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.privateDataSlotRequestCount !== undefined) this.privateDataSlotRequestCount = data.privateDataSlotRequestCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DevicePrivateDataCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_PRIVATE_DATA_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get privateDataSlotRequestCount(): number { + return this.#view.getUint32(16, LE); + } + + set privateDataSlotRequestCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DevicePrivateDataCreateInfoEXT.ts b/api/struct/DevicePrivateDataCreateInfoEXT.ts new file mode 100644 index 0000000..97e0aa6 --- /dev/null +++ b/api/struct/DevicePrivateDataCreateInfoEXT.ts @@ -0,0 +1,2 @@ + import { DevicePrivateDataCreateInfo } from "./DevicePrivateDataCreateInfo.ts"; + export type DevicePrivateDataCreateInfoEXT = DevicePrivateDataCreateInfo; \ No newline at end of file diff --git a/api/struct/DeviceQueueCreateInfo.ts b/api/struct/DeviceQueueCreateInfo.ts new file mode 100644 index 0000000..b5e7239 --- /dev/null +++ b/api/struct/DeviceQueueCreateInfo.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceQueueCreateFlags } from "../def.ts"; + +export interface InitDeviceQueueCreateInfo { + pNext?: AnyPointer; + flags?: DeviceQueueCreateFlags; + queueFamilyIndex?: number; + queueCount?: number; + pQueuePriorities?: AnyPointer; +} + +export class DeviceQueueCreateInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceQueueCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceQueueCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceQueueCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceQueueCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceQueueCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; + if (data.queueCount !== undefined) this.queueCount = data.queueCount; + if (data.pQueuePriorities !== undefined) this.pQueuePriorities = data.pQueuePriorities; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceQueueCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_QUEUE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DeviceQueueCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get queueFamilyIndex(): number { + return this.#view.getUint32(20, LE); + } + + set queueFamilyIndex(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get queueCount(): number { + return this.#view.getUint32(24, LE); + } + + set queueCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pQueuePriorities(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pQueuePriorities(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceQueueGlobalPriorityCreateInfoEXT.ts b/api/struct/DeviceQueueGlobalPriorityCreateInfoEXT.ts new file mode 100644 index 0000000..882c9c5 --- /dev/null +++ b/api/struct/DeviceQueueGlobalPriorityCreateInfoEXT.ts @@ -0,0 +1,2 @@ + import { DeviceQueueGlobalPriorityCreateInfoKHR } from "./DeviceQueueGlobalPriorityCreateInfoKHR.ts"; + export type DeviceQueueGlobalPriorityCreateInfoEXT = DeviceQueueGlobalPriorityCreateInfoKHR; \ No newline at end of file diff --git a/api/struct/DeviceQueueGlobalPriorityCreateInfoKHR.ts b/api/struct/DeviceQueueGlobalPriorityCreateInfoKHR.ts new file mode 100644 index 0000000..f8c4d6a --- /dev/null +++ b/api/struct/DeviceQueueGlobalPriorityCreateInfoKHR.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, QueueGlobalPriorityKHR } from "../enum.ts"; + +export interface InitDeviceQueueGlobalPriorityCreateInfoKHR { + pNext?: AnyPointer; + globalPriority?: QueueGlobalPriorityKHR; +} + +export class DeviceQueueGlobalPriorityCreateInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceQueueGlobalPriorityCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceQueueGlobalPriorityCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceQueueGlobalPriorityCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceQueueGlobalPriorityCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceQueueGlobalPriorityCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.globalPriority !== undefined) this.globalPriority = data.globalPriority; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceQueueGlobalPriorityCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get globalPriority(): number { + return this.#view.getUint32(16, LE); + } + + set globalPriority(value: QueueGlobalPriorityKHR) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DeviceQueueInfo2.ts b/api/struct/DeviceQueueInfo2.ts new file mode 100644 index 0000000..d97c5b2 --- /dev/null +++ b/api/struct/DeviceQueueInfo2.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceQueueCreateFlags } from "../def.ts"; + +export interface InitDeviceQueueInfo2 { + pNext?: AnyPointer; + flags?: DeviceQueueCreateFlags; + queueFamilyIndex?: number; + queueIndex?: number; +} + +export class DeviceQueueInfo2 implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDeviceQueueInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceQueueInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DeviceQueueInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DeviceQueueInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DeviceQueueInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; + if (data.queueIndex !== undefined) this.queueIndex = data.queueIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceQueueInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DEVICE_QUEUE_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DeviceQueueCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get queueFamilyIndex(): number { + return this.#view.getUint32(20, LE); + } + + set queueFamilyIndex(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get queueIndex(): number { + return this.#view.getUint32(24, LE); + } + + set queueIndex(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DirectFBSurfaceCreateInfoEXT.ts b/api/struct/DirectFBSurfaceCreateInfoEXT.ts new file mode 100644 index 0000000..8e02d15 --- /dev/null +++ b/api/struct/DirectFBSurfaceCreateInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DirectFBSurfaceCreateFlagsEXT } from "../def.ts"; + +export interface InitDirectFBSurfaceCreateInfoEXT { + pNext?: AnyPointer; + flags?: DirectFBSurfaceCreateFlagsEXT; + dfb?: AnyPointer; + surface?: AnyPointer; +} + +export class DirectFBSurfaceCreateInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDirectFBSurfaceCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDirectFBSurfaceCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DirectFBSurfaceCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DirectFBSurfaceCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DirectFBSurfaceCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.dfb !== undefined) this.dfb = data.dfb; + if (data.surface !== undefined) this.surface = data.surface; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DirectFBSurfaceCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DIRECTFB_SURFACE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DirectFBSurfaceCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get dfb(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set dfb(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get surface(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set surface(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DispatchIndirectCommand.ts b/api/struct/DispatchIndirectCommand.ts new file mode 100644 index 0000000..30bab29 --- /dev/null +++ b/api/struct/DispatchIndirectCommand.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitDispatchIndirectCommand { + x?: number; + y?: number; + z?: number; +} + +export class DispatchIndirectCommand implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDispatchIndirectCommand); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDispatchIndirectCommand) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DispatchIndirectCommand.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DispatchIndirectCommand.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DispatchIndirectCommand.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.x !== undefined) this.x = data.x; + if (data.y !== undefined) this.y = data.y; + if (data.z !== undefined) this.z = data.z; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DispatchIndirectCommand.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get x(): number { + return this.#view.getUint32(0, LE); + } + + set x(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get y(): number { + return this.#view.getUint32(4, LE); + } + + set y(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get z(): number { + return this.#view.getUint32(8, LE); + } + + set z(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DisplayEventInfoEXT.ts b/api/struct/DisplayEventInfoEXT.ts new file mode 100644 index 0000000..72fff85 --- /dev/null +++ b/api/struct/DisplayEventInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DisplayEventTypeEXT } from "../enum.ts"; + +export interface InitDisplayEventInfoEXT { + pNext?: AnyPointer; + displayEvent?: DisplayEventTypeEXT; +} + +export class DisplayEventInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayEventInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayEventInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayEventInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayEventInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayEventInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.displayEvent !== undefined) this.displayEvent = data.displayEvent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayEventInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_EVENT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get displayEvent(): number { + return this.#view.getUint32(16, LE); + } + + set displayEvent(value: DisplayEventTypeEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DisplayModeCreateInfoKHR.ts b/api/struct/DisplayModeCreateInfoKHR.ts new file mode 100644 index 0000000..42ac714 --- /dev/null +++ b/api/struct/DisplayModeCreateInfoKHR.ts @@ -0,0 +1,94 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DisplayModeParametersKHR} from "./DisplayModeParametersKHR.ts"; +import { StructureType } from "../enum.ts"; +import { DisplayModeCreateFlagsKHR } from "../def.ts"; + +export interface InitDisplayModeCreateInfoKHR { + pNext?: AnyPointer; + flags?: DisplayModeCreateFlagsKHR; + parameters?: DisplayModeParametersKHR; +} + +export class DisplayModeCreateInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayModeCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayModeCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayModeCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayModeCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayModeCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.parameters !== undefined) this.parameters = data.parameters; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModeCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_MODE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DisplayModeCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get parameters(): DisplayModeParametersKHR { + return new DisplayModeParametersKHR(this.#data.subarray(20, 20 + DisplayModeParametersKHR.size)); + } + + set parameters(value: DisplayModeParametersKHR) { + if (value[BUFFER].byteLength < DisplayModeParametersKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } +} \ No newline at end of file diff --git a/api/struct/DisplayModeParametersKHR.ts b/api/struct/DisplayModeParametersKHR.ts new file mode 100644 index 0000000..71b4ed1 --- /dev/null +++ b/api/struct/DisplayModeParametersKHR.ts @@ -0,0 +1,73 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; + +export interface InitDisplayModeParametersKHR { + visibleRegion?: Extent2D; + refreshRate?: number; +} + +export class DisplayModeParametersKHR implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayModeParametersKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayModeParametersKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayModeParametersKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayModeParametersKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayModeParametersKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.visibleRegion !== undefined) this.visibleRegion = data.visibleRegion; + if (data.refreshRate !== undefined) this.refreshRate = data.refreshRate; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModeParametersKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get visibleRegion(): Extent2D { + return new Extent2D(this.#data.subarray(0, 0 + Extent2D.size)); + } + + set visibleRegion(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get refreshRate(): number { + return this.#view.getUint32(8, LE); + } + + set refreshRate(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DisplayModeProperties2KHR.ts b/api/struct/DisplayModeProperties2KHR.ts new file mode 100644 index 0000000..6a1cf9e --- /dev/null +++ b/api/struct/DisplayModeProperties2KHR.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DisplayModePropertiesKHR} from "./DisplayModePropertiesKHR.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDisplayModeProperties2KHR { + pNext?: AnyPointer; + displayModeProperties?: DisplayModePropertiesKHR; +} + +export class DisplayModeProperties2KHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayModeProperties2KHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayModeProperties2KHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayModeProperties2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayModeProperties2KHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayModeProperties2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.displayModeProperties !== undefined) this.displayModeProperties = data.displayModeProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModeProperties2KHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_MODE_PROPERTIES_2_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get displayModeProperties(): DisplayModePropertiesKHR { + return new DisplayModePropertiesKHR(this.#data.subarray(16, 16 + DisplayModePropertiesKHR.size)); + } + + set displayModeProperties(value: DisplayModePropertiesKHR) { + if (value[BUFFER].byteLength < DisplayModePropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/DisplayModePropertiesKHR.ts b/api/struct/DisplayModePropertiesKHR.ts new file mode 100644 index 0000000..1015d77 --- /dev/null +++ b/api/struct/DisplayModePropertiesKHR.ts @@ -0,0 +1,74 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DisplayModeParametersKHR} from "./DisplayModeParametersKHR.ts"; +import { DisplayModeKHR } from "../def.ts"; + +export interface InitDisplayModePropertiesKHR { + displayMode?: DisplayModeKHR; + parameters?: DisplayModeParametersKHR; +} + +export class DisplayModePropertiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayModePropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayModePropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayModePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayModePropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayModePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.displayMode !== undefined) this.displayMode = data.displayMode; + if (data.parameters !== undefined) this.parameters = data.parameters; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModePropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get displayMode(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set displayMode(value: DisplayModeKHR) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get parameters(): DisplayModeParametersKHR { + return new DisplayModeParametersKHR(this.#data.subarray(8, 8 + DisplayModeParametersKHR.size)); + } + + set parameters(value: DisplayModeParametersKHR) { + if (value[BUFFER].byteLength < DisplayModeParametersKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 8); + } +} \ No newline at end of file diff --git a/api/struct/DisplayNativeHdrSurfaceCapabilitiesAMD.ts b/api/struct/DisplayNativeHdrSurfaceCapabilitiesAMD.ts new file mode 100644 index 0000000..67a8a74 --- /dev/null +++ b/api/struct/DisplayNativeHdrSurfaceCapabilitiesAMD.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitDisplayNativeHdrSurfaceCapabilitiesAMD { + pNext?: AnyPointer; + localDimmingSupport?: Bool32; +} + +export class DisplayNativeHdrSurfaceCapabilitiesAMD implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayNativeHdrSurfaceCapabilitiesAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayNativeHdrSurfaceCapabilitiesAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayNativeHdrSurfaceCapabilitiesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayNativeHdrSurfaceCapabilitiesAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayNativeHdrSurfaceCapabilitiesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.localDimmingSupport !== undefined) this.localDimmingSupport = data.localDimmingSupport; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayNativeHdrSurfaceCapabilitiesAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get localDimmingSupport(): number { + return this.#view.getUint32(16, LE); + } + + set localDimmingSupport(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DisplayPlaneCapabilities2KHR.ts b/api/struct/DisplayPlaneCapabilities2KHR.ts new file mode 100644 index 0000000..ed5933d --- /dev/null +++ b/api/struct/DisplayPlaneCapabilities2KHR.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DisplayPlaneCapabilitiesKHR} from "./DisplayPlaneCapabilitiesKHR.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDisplayPlaneCapabilities2KHR { + pNext?: AnyPointer; + capabilities?: DisplayPlaneCapabilitiesKHR; +} + +export class DisplayPlaneCapabilities2KHR implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayPlaneCapabilities2KHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlaneCapabilities2KHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayPlaneCapabilities2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayPlaneCapabilities2KHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayPlaneCapabilities2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.capabilities !== undefined) this.capabilities = data.capabilities; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneCapabilities2KHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_PLANE_CAPABILITIES_2_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get capabilities(): DisplayPlaneCapabilitiesKHR { + return new DisplayPlaneCapabilitiesKHR(this.#data.subarray(16, 16 + DisplayPlaneCapabilitiesKHR.size)); + } + + set capabilities(value: DisplayPlaneCapabilitiesKHR) { + if (value[BUFFER].byteLength < DisplayPlaneCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/DisplayPlaneCapabilitiesKHR.ts b/api/struct/DisplayPlaneCapabilitiesKHR.ts new file mode 100644 index 0000000..78bdb70 --- /dev/null +++ b/api/struct/DisplayPlaneCapabilitiesKHR.ts @@ -0,0 +1,166 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Offset2D} from "./Offset2D.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { DisplayPlaneAlphaFlagsKHR } from "../def.ts"; + +export interface InitDisplayPlaneCapabilitiesKHR { + supportedAlpha?: DisplayPlaneAlphaFlagsKHR; + minSrcPosition?: Offset2D; + maxSrcPosition?: Offset2D; + minSrcExtent?: Extent2D; + maxSrcExtent?: Extent2D; + minDstPosition?: Offset2D; + maxDstPosition?: Offset2D; + minDstExtent?: Extent2D; + maxDstExtent?: Extent2D; +} + +export class DisplayPlaneCapabilitiesKHR implements BaseStruct { + static size = 68; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayPlaneCapabilitiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlaneCapabilitiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayPlaneCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayPlaneCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayPlaneCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.supportedAlpha !== undefined) this.supportedAlpha = data.supportedAlpha; + if (data.minSrcPosition !== undefined) this.minSrcPosition = data.minSrcPosition; + if (data.maxSrcPosition !== undefined) this.maxSrcPosition = data.maxSrcPosition; + if (data.minSrcExtent !== undefined) this.minSrcExtent = data.minSrcExtent; + if (data.maxSrcExtent !== undefined) this.maxSrcExtent = data.maxSrcExtent; + if (data.minDstPosition !== undefined) this.minDstPosition = data.minDstPosition; + if (data.maxDstPosition !== undefined) this.maxDstPosition = data.maxDstPosition; + if (data.minDstExtent !== undefined) this.minDstExtent = data.minDstExtent; + if (data.maxDstExtent !== undefined) this.maxDstExtent = data.maxDstExtent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneCapabilitiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get supportedAlpha(): number { + return this.#view.getUint32(0, LE); + } + + set supportedAlpha(value: DisplayPlaneAlphaFlagsKHR) { + this.#view.setUint32(0, Number(value), LE); + } + + get minSrcPosition(): Offset2D { + return new Offset2D(this.#data.subarray(4, 4 + Offset2D.size)); + } + + set minSrcPosition(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 4); + } + + get maxSrcPosition(): Offset2D { + return new Offset2D(this.#data.subarray(12, 12 + Offset2D.size)); + } + + set maxSrcPosition(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 12); + } + + get minSrcExtent(): Extent2D { + return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); + } + + set minSrcExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } + + get maxSrcExtent(): Extent2D { + return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); + } + + set maxSrcExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 28); + } + + get minDstPosition(): Offset2D { + return new Offset2D(this.#data.subarray(36, 36 + Offset2D.size)); + } + + set minDstPosition(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 36); + } + + get maxDstPosition(): Offset2D { + return new Offset2D(this.#data.subarray(44, 44 + Offset2D.size)); + } + + set maxDstPosition(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 44); + } + + get minDstExtent(): Extent2D { + return new Extent2D(this.#data.subarray(52, 52 + Extent2D.size)); + } + + set minDstExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 52); + } + + get maxDstExtent(): Extent2D { + return new Extent2D(this.#data.subarray(60, 60 + Extent2D.size)); + } + + set maxDstExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 60); + } +} \ No newline at end of file diff --git a/api/struct/DisplayPlaneInfo2KHR.ts b/api/struct/DisplayPlaneInfo2KHR.ts new file mode 100644 index 0000000..e1bd69e --- /dev/null +++ b/api/struct/DisplayPlaneInfo2KHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DisplayModeKHR } from "../def.ts"; + +export interface InitDisplayPlaneInfo2KHR { + pNext?: AnyPointer; + mode?: DisplayModeKHR; + planeIndex?: number; +} + +export class DisplayPlaneInfo2KHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayPlaneInfo2KHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlaneInfo2KHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayPlaneInfo2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayPlaneInfo2KHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayPlaneInfo2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.mode !== undefined) this.mode = data.mode; + if (data.planeIndex !== undefined) this.planeIndex = data.planeIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneInfo2KHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_PLANE_INFO_2_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get mode(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set mode(value: DisplayModeKHR) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get planeIndex(): number { + return this.#view.getUint32(24, LE); + } + + set planeIndex(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DisplayPlaneProperties2KHR.ts b/api/struct/DisplayPlaneProperties2KHR.ts new file mode 100644 index 0000000..de4dcf0 --- /dev/null +++ b/api/struct/DisplayPlaneProperties2KHR.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DisplayPlanePropertiesKHR} from "./DisplayPlanePropertiesKHR.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDisplayPlaneProperties2KHR { + pNext?: AnyPointer; + displayPlaneProperties?: DisplayPlanePropertiesKHR; +} + +export class DisplayPlaneProperties2KHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayPlaneProperties2KHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlaneProperties2KHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayPlaneProperties2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayPlaneProperties2KHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayPlaneProperties2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.displayPlaneProperties !== undefined) this.displayPlaneProperties = data.displayPlaneProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneProperties2KHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_PLANE_PROPERTIES_2_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get displayPlaneProperties(): DisplayPlanePropertiesKHR { + return new DisplayPlanePropertiesKHR(this.#data.subarray(16, 16 + DisplayPlanePropertiesKHR.size)); + } + + set displayPlaneProperties(value: DisplayPlanePropertiesKHR) { + if (value[BUFFER].byteLength < DisplayPlanePropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/DisplayPlanePropertiesKHR.ts b/api/struct/DisplayPlanePropertiesKHR.ts new file mode 100644 index 0000000..7af5fdf --- /dev/null +++ b/api/struct/DisplayPlanePropertiesKHR.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DisplayKHR } from "../def.ts"; + +export interface InitDisplayPlanePropertiesKHR { + currentDisplay?: DisplayKHR; + currentStackIndex?: number; +} + +export class DisplayPlanePropertiesKHR implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayPlanePropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlanePropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayPlanePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayPlanePropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayPlanePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.currentDisplay !== undefined) this.currentDisplay = data.currentDisplay; + if (data.currentStackIndex !== undefined) this.currentStackIndex = data.currentStackIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlanePropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get currentDisplay(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set currentDisplay(value: DisplayKHR) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get currentStackIndex(): number { + return this.#view.getUint32(8, LE); + } + + set currentStackIndex(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DisplayPowerInfoEXT.ts b/api/struct/DisplayPowerInfoEXT.ts new file mode 100644 index 0000000..227febf --- /dev/null +++ b/api/struct/DisplayPowerInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DisplayPowerStateEXT } from "../enum.ts"; + +export interface InitDisplayPowerInfoEXT { + pNext?: AnyPointer; + powerState?: DisplayPowerStateEXT; +} + +export class DisplayPowerInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayPowerInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPowerInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayPowerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayPowerInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayPowerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.powerState !== undefined) this.powerState = data.powerState; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPowerInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_POWER_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get powerState(): number { + return this.#view.getUint32(16, LE); + } + + set powerState(value: DisplayPowerStateEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DisplayPresentInfoKHR.ts b/api/struct/DisplayPresentInfoKHR.ts new file mode 100644 index 0000000..f869598 --- /dev/null +++ b/api/struct/DisplayPresentInfoKHR.ts @@ -0,0 +1,107 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitDisplayPresentInfoKHR { + pNext?: AnyPointer; + srcRect?: Rect2D; + dstRect?: Rect2D; + persistent?: Bool32; +} + +export class DisplayPresentInfoKHR implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayPresentInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPresentInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayPresentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayPresentInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayPresentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcRect !== undefined) this.srcRect = data.srcRect; + if (data.dstRect !== undefined) this.dstRect = data.dstRect; + if (data.persistent !== undefined) this.persistent = data.persistent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPresentInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_PRESENT_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcRect(): Rect2D { + return new Rect2D(this.#data.subarray(16, 16 + Rect2D.size)); + } + + set srcRect(value: Rect2D) { + if (value[BUFFER].byteLength < Rect2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get dstRect(): Rect2D { + return new Rect2D(this.#data.subarray(32, 32 + Rect2D.size)); + } + + set dstRect(value: Rect2D) { + if (value[BUFFER].byteLength < Rect2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get persistent(): number { + return this.#view.getUint32(48, LE); + } + + set persistent(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DisplayProperties2KHR.ts b/api/struct/DisplayProperties2KHR.ts new file mode 100644 index 0000000..b765205 --- /dev/null +++ b/api/struct/DisplayProperties2KHR.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DisplayPropertiesKHR} from "./DisplayPropertiesKHR.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDisplayProperties2KHR { + pNext?: AnyPointer; + displayProperties?: DisplayPropertiesKHR; +} + +export class DisplayProperties2KHR implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayProperties2KHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayProperties2KHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayProperties2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayProperties2KHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayProperties2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.displayProperties !== undefined) this.displayProperties = data.displayProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayProperties2KHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_PROPERTIES_2_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get displayProperties(): DisplayPropertiesKHR { + return new DisplayPropertiesKHR(this.#data.subarray(16, 16 + DisplayPropertiesKHR.size)); + } + + set displayProperties(value: DisplayPropertiesKHR) { + if (value[BUFFER].byteLength < DisplayPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/DisplayPropertiesKHR.ts b/api/struct/DisplayPropertiesKHR.ts new file mode 100644 index 0000000..b3402e9 --- /dev/null +++ b/api/struct/DisplayPropertiesKHR.ts @@ -0,0 +1,127 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { DisplayKHR, SurfaceTransformFlagsKHR, Bool32 } from "../def.ts"; + +export interface InitDisplayPropertiesKHR { + display?: DisplayKHR; + displayName?: AnyPointer; + physicalDimensions?: Extent2D; + physicalResolution?: Extent2D; + supportedTransforms?: SurfaceTransformFlagsKHR; + planeReorderPossible?: Bool32; + persistentContent?: Bool32; +} + +export class DisplayPropertiesKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplayPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplayPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplayPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplayPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.display !== undefined) this.display = data.display; + if (data.displayName !== undefined) this.displayName = data.displayName; + if (data.physicalDimensions !== undefined) this.physicalDimensions = data.physicalDimensions; + if (data.physicalResolution !== undefined) this.physicalResolution = data.physicalResolution; + if (data.supportedTransforms !== undefined) this.supportedTransforms = data.supportedTransforms; + if (data.planeReorderPossible !== undefined) this.planeReorderPossible = data.planeReorderPossible; + if (data.persistentContent !== undefined) this.persistentContent = data.persistentContent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get display(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set display(value: DisplayKHR) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get displayName(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set displayName(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get physicalDimensions(): Extent2D { + return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); + } + + set physicalDimensions(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get physicalResolution(): Extent2D { + return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); + } + + set physicalResolution(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get supportedTransforms(): number { + return this.#view.getUint32(32, LE); + } + + set supportedTransforms(value: SurfaceTransformFlagsKHR) { + this.#view.setUint32(32, Number(value), LE); + } + + get planeReorderPossible(): number { + return this.#view.getUint32(36, LE); + } + + set planeReorderPossible(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get persistentContent(): number { + return this.#view.getUint32(40, LE); + } + + set persistentContent(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DisplaySurfaceCreateInfoKHR.ts b/api/struct/DisplaySurfaceCreateInfoKHR.ts new file mode 100644 index 0000000..a439e62 --- /dev/null +++ b/api/struct/DisplaySurfaceCreateInfoKHR.ts @@ -0,0 +1,154 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType, SurfaceTransformFlagBitsKHR, DisplayPlaneAlphaFlagBitsKHR } from "../enum.ts"; +import { DisplaySurfaceCreateFlagsKHR, DisplayModeKHR } from "../def.ts"; + +export interface InitDisplaySurfaceCreateInfoKHR { + pNext?: AnyPointer; + flags?: DisplaySurfaceCreateFlagsKHR; + displayMode?: DisplayModeKHR; + planeIndex?: number; + planeStackIndex?: number; + transform?: SurfaceTransformFlagBitsKHR; + globalAlpha?: number; + alphaMode?: DisplayPlaneAlphaFlagBitsKHR; + imageExtent?: Extent2D; +} + +export class DisplaySurfaceCreateInfoKHR implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDisplaySurfaceCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDisplaySurfaceCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DisplaySurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DisplaySurfaceCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DisplaySurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.displayMode !== undefined) this.displayMode = data.displayMode; + if (data.planeIndex !== undefined) this.planeIndex = data.planeIndex; + if (data.planeStackIndex !== undefined) this.planeStackIndex = data.planeStackIndex; + if (data.transform !== undefined) this.transform = data.transform; + if (data.globalAlpha !== undefined) this.globalAlpha = data.globalAlpha; + if (data.alphaMode !== undefined) this.alphaMode = data.alphaMode; + if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplaySurfaceCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DISPLAY_SURFACE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: DisplaySurfaceCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get displayMode(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set displayMode(value: DisplayModeKHR) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get planeIndex(): number { + return this.#view.getUint32(32, LE); + } + + set planeIndex(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get planeStackIndex(): number { + return this.#view.getUint32(36, LE); + } + + set planeStackIndex(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get transform(): number { + return this.#view.getUint32(40, LE); + } + + set transform(value: SurfaceTransformFlagBitsKHR) { + this.#view.setUint32(40, Number(value), LE); + } + + get globalAlpha(): number { + return this.#view.getFloat32(44, LE); + } + + set globalAlpha(value: number) { + this.#view.setFloat32(44, Number(value), LE); + } + + get alphaMode(): number { + return this.#view.getUint32(48, LE); + } + + set alphaMode(value: DisplayPlaneAlphaFlagBitsKHR) { + this.#view.setUint32(48, Number(value), LE); + } + + get imageExtent(): Extent2D { + return new Extent2D(this.#data.subarray(52, 52 + Extent2D.size)); + } + + set imageExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 52); + } +} \ No newline at end of file diff --git a/api/struct/DrawIndexedIndirectCommand.ts b/api/struct/DrawIndexedIndirectCommand.ts new file mode 100644 index 0000000..0419541 --- /dev/null +++ b/api/struct/DrawIndexedIndirectCommand.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitDrawIndexedIndirectCommand { + indexCount?: number; + instanceCount?: number; + firstIndex?: number; + vertexOffset?: number; + firstInstance?: number; +} + +export class DrawIndexedIndirectCommand implements BaseStruct { + static size = 20; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDrawIndexedIndirectCommand); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDrawIndexedIndirectCommand) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DrawIndexedIndirectCommand.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DrawIndexedIndirectCommand.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DrawIndexedIndirectCommand.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.indexCount !== undefined) this.indexCount = data.indexCount; + if (data.instanceCount !== undefined) this.instanceCount = data.instanceCount; + if (data.firstIndex !== undefined) this.firstIndex = data.firstIndex; + if (data.vertexOffset !== undefined) this.vertexOffset = data.vertexOffset; + if (data.firstInstance !== undefined) this.firstInstance = data.firstInstance; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawIndexedIndirectCommand.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get indexCount(): number { + return this.#view.getUint32(0, LE); + } + + set indexCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get instanceCount(): number { + return this.#view.getUint32(4, LE); + } + + set instanceCount(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get firstIndex(): number { + return this.#view.getUint32(8, LE); + } + + set firstIndex(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get vertexOffset(): number { + return this.#view.getInt32(12, LE); + } + + set vertexOffset(value: number) { + this.#view.setInt32(12, Number(value), LE); + } + + get firstInstance(): number { + return this.#view.getUint32(16, LE); + } + + set firstInstance(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DrawIndirectCommand.ts b/api/struct/DrawIndirectCommand.ts new file mode 100644 index 0000000..792b587 --- /dev/null +++ b/api/struct/DrawIndirectCommand.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitDrawIndirectCommand { + vertexCount?: number; + instanceCount?: number; + firstVertex?: number; + firstInstance?: number; +} + +export class DrawIndirectCommand implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDrawIndirectCommand); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDrawIndirectCommand) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DrawIndirectCommand.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DrawIndirectCommand.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DrawIndirectCommand.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.vertexCount !== undefined) this.vertexCount = data.vertexCount; + if (data.instanceCount !== undefined) this.instanceCount = data.instanceCount; + if (data.firstVertex !== undefined) this.firstVertex = data.firstVertex; + if (data.firstInstance !== undefined) this.firstInstance = data.firstInstance; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawIndirectCommand.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get vertexCount(): number { + return this.#view.getUint32(0, LE); + } + + set vertexCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get instanceCount(): number { + return this.#view.getUint32(4, LE); + } + + set instanceCount(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get firstVertex(): number { + return this.#view.getUint32(8, LE); + } + + set firstVertex(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get firstInstance(): number { + return this.#view.getUint32(12, LE); + } + + set firstInstance(value: number) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DrawMeshTasksIndirectCommandEXT.ts b/api/struct/DrawMeshTasksIndirectCommandEXT.ts new file mode 100644 index 0000000..240fe3e --- /dev/null +++ b/api/struct/DrawMeshTasksIndirectCommandEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitDrawMeshTasksIndirectCommandEXT { + groupCountX?: number; + groupCountY?: number; + groupCountZ?: number; +} + +export class DrawMeshTasksIndirectCommandEXT implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDrawMeshTasksIndirectCommandEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDrawMeshTasksIndirectCommandEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DrawMeshTasksIndirectCommandEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DrawMeshTasksIndirectCommandEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DrawMeshTasksIndirectCommandEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.groupCountX !== undefined) this.groupCountX = data.groupCountX; + if (data.groupCountY !== undefined) this.groupCountY = data.groupCountY; + if (data.groupCountZ !== undefined) this.groupCountZ = data.groupCountZ; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawMeshTasksIndirectCommandEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get groupCountX(): number { + return this.#view.getUint32(0, LE); + } + + set groupCountX(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get groupCountY(): number { + return this.#view.getUint32(4, LE); + } + + set groupCountY(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get groupCountZ(): number { + return this.#view.getUint32(8, LE); + } + + set groupCountZ(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DrawMeshTasksIndirectCommandNV.ts b/api/struct/DrawMeshTasksIndirectCommandNV.ts new file mode 100644 index 0000000..62b3c42 --- /dev/null +++ b/api/struct/DrawMeshTasksIndirectCommandNV.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitDrawMeshTasksIndirectCommandNV { + taskCount?: number; + firstTask?: number; +} + +export class DrawMeshTasksIndirectCommandNV implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDrawMeshTasksIndirectCommandNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDrawMeshTasksIndirectCommandNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DrawMeshTasksIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DrawMeshTasksIndirectCommandNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DrawMeshTasksIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.taskCount !== undefined) this.taskCount = data.taskCount; + if (data.firstTask !== undefined) this.firstTask = data.firstTask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawMeshTasksIndirectCommandNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get taskCount(): number { + return this.#view.getUint32(0, LE); + } + + set taskCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get firstTask(): number { + return this.#view.getUint32(4, LE); + } + + set firstTask(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DrmFormatModifierProperties2EXT.ts b/api/struct/DrmFormatModifierProperties2EXT.ts new file mode 100644 index 0000000..23b2c12 --- /dev/null +++ b/api/struct/DrmFormatModifierProperties2EXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { FormatFeatureFlags2 } from "../def.ts"; + +export interface InitDrmFormatModifierProperties2EXT { + drmFormatModifier?: number | bigint; + drmFormatModifierPlaneCount?: number; + drmFormatModifierTilingFeatures?: FormatFeatureFlags2; +} + +export class DrmFormatModifierProperties2EXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDrmFormatModifierProperties2EXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDrmFormatModifierProperties2EXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DrmFormatModifierProperties2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DrmFormatModifierProperties2EXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DrmFormatModifierProperties2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; + if (data.drmFormatModifierPlaneCount !== undefined) this.drmFormatModifierPlaneCount = data.drmFormatModifierPlaneCount; + if (data.drmFormatModifierTilingFeatures !== undefined) this.drmFormatModifierTilingFeatures = data.drmFormatModifierTilingFeatures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierProperties2EXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get drmFormatModifier(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set drmFormatModifier(value: number | bigint) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get drmFormatModifierPlaneCount(): number { + return this.#view.getUint32(8, LE); + } + + set drmFormatModifierPlaneCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get drmFormatModifierTilingFeatures(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set drmFormatModifierTilingFeatures(value: FormatFeatureFlags2) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DrmFormatModifierPropertiesEXT.ts b/api/struct/DrmFormatModifierPropertiesEXT.ts new file mode 100644 index 0000000..a2492e0 --- /dev/null +++ b/api/struct/DrmFormatModifierPropertiesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { FormatFeatureFlags } from "../def.ts"; + +export interface InitDrmFormatModifierPropertiesEXT { + drmFormatModifier?: number | bigint; + drmFormatModifierPlaneCount?: number; + drmFormatModifierTilingFeatures?: FormatFeatureFlags; +} + +export class DrmFormatModifierPropertiesEXT implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDrmFormatModifierPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDrmFormatModifierPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DrmFormatModifierPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DrmFormatModifierPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DrmFormatModifierPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; + if (data.drmFormatModifierPlaneCount !== undefined) this.drmFormatModifierPlaneCount = data.drmFormatModifierPlaneCount; + if (data.drmFormatModifierTilingFeatures !== undefined) this.drmFormatModifierTilingFeatures = data.drmFormatModifierTilingFeatures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get drmFormatModifier(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set drmFormatModifier(value: number | bigint) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get drmFormatModifierPlaneCount(): number { + return this.#view.getUint32(8, LE); + } + + set drmFormatModifierPlaneCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get drmFormatModifierTilingFeatures(): number { + return this.#view.getUint32(12, LE); + } + + set drmFormatModifierTilingFeatures(value: FormatFeatureFlags) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/DrmFormatModifierPropertiesList2EXT.ts b/api/struct/DrmFormatModifierPropertiesList2EXT.ts new file mode 100644 index 0000000..dbb719d --- /dev/null +++ b/api/struct/DrmFormatModifierPropertiesList2EXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DrmFormatModifierProperties2EXT} from "./DrmFormatModifierProperties2EXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDrmFormatModifierPropertiesList2EXT { + pNext?: AnyPointer; + drmFormatModifierCount?: number; + pDrmFormatModifierProperties?: AnyPointer; +} + +export class DrmFormatModifierPropertiesList2EXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDrmFormatModifierPropertiesList2EXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDrmFormatModifierPropertiesList2EXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DrmFormatModifierPropertiesList2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DrmFormatModifierPropertiesList2EXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DrmFormatModifierPropertiesList2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.drmFormatModifierCount !== undefined) this.drmFormatModifierCount = data.drmFormatModifierCount; + if (data.pDrmFormatModifierProperties !== undefined) this.pDrmFormatModifierProperties = data.pDrmFormatModifierProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierPropertiesList2EXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get drmFormatModifierCount(): number { + return this.#view.getUint32(16, LE); + } + + set drmFormatModifierCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pDrmFormatModifierProperties(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDrmFormatModifierProperties(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/DrmFormatModifierPropertiesListEXT.ts b/api/struct/DrmFormatModifierPropertiesListEXT.ts new file mode 100644 index 0000000..cb7fc9a --- /dev/null +++ b/api/struct/DrmFormatModifierPropertiesListEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DrmFormatModifierPropertiesEXT} from "./DrmFormatModifierPropertiesEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitDrmFormatModifierPropertiesListEXT { + pNext?: AnyPointer; + drmFormatModifierCount?: number; + pDrmFormatModifierProperties?: AnyPointer; +} + +export class DrmFormatModifierPropertiesListEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitDrmFormatModifierPropertiesListEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitDrmFormatModifierPropertiesListEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(DrmFormatModifierPropertiesListEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < DrmFormatModifierPropertiesListEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(DrmFormatModifierPropertiesListEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.drmFormatModifierCount !== undefined) this.drmFormatModifierCount = data.drmFormatModifierCount; + if (data.pDrmFormatModifierProperties !== undefined) this.pDrmFormatModifierProperties = data.pDrmFormatModifierProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierPropertiesListEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get drmFormatModifierCount(): number { + return this.#view.getUint32(16, LE); + } + + set drmFormatModifierCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pDrmFormatModifierProperties(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDrmFormatModifierProperties(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/EventCreateInfo.ts b/api/struct/EventCreateInfo.ts new file mode 100644 index 0000000..6371cb5 --- /dev/null +++ b/api/struct/EventCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { EventCreateFlags } from "../def.ts"; + +export interface InitEventCreateInfo { + pNext?: AnyPointer; + flags?: EventCreateFlags; +} + +export class EventCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitEventCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitEventCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(EventCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < EventCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(EventCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, EventCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EVENT_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: EventCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportFenceCreateInfo.ts b/api/struct/ExportFenceCreateInfo.ts new file mode 100644 index 0000000..a13a659 --- /dev/null +++ b/api/struct/ExportFenceCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalFenceHandleTypeFlags } from "../def.ts"; + +export interface InitExportFenceCreateInfo { + pNext?: AnyPointer; + handleTypes?: ExternalFenceHandleTypeFlags; +} + +export class ExportFenceCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportFenceCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportFenceCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportFenceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportFenceCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportFenceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportFenceCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_FENCE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleTypes(): number { + return this.#view.getUint32(16, LE); + } + + set handleTypes(value: ExternalFenceHandleTypeFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportFenceCreateInfoKHR.ts b/api/struct/ExportFenceCreateInfoKHR.ts new file mode 100644 index 0000000..bb0372c --- /dev/null +++ b/api/struct/ExportFenceCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { ExportFenceCreateInfo } from "./ExportFenceCreateInfo.ts"; + export type ExportFenceCreateInfoKHR = ExportFenceCreateInfo; \ No newline at end of file diff --git a/api/struct/ExportFenceWin32HandleInfoKHR.ts b/api/struct/ExportFenceWin32HandleInfoKHR.ts new file mode 100644 index 0000000..89af708 --- /dev/null +++ b/api/struct/ExportFenceWin32HandleInfoKHR.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitExportFenceWin32HandleInfoKHR { + pNext?: AnyPointer; + pAttributes?: AnyPointer; + dwAccess?: number; + name?: Deno.PointerValue; +} + +export class ExportFenceWin32HandleInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportFenceWin32HandleInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportFenceWin32HandleInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportFenceWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportFenceWin32HandleInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportFenceWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pAttributes !== undefined) this.pAttributes = data.pAttributes; + if (data.dwAccess !== undefined) this.dwAccess = data.dwAccess; + if (data.name !== undefined) this.name = data.name; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportFenceWin32HandleInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_FENCE_WIN32_HANDLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pAttributes(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pAttributes(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dwAccess(): number { + return this.#view.getUint32(24, LE); + } + + set dwAccess(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get name(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set name(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMemoryAllocateInfo.ts b/api/struct/ExportMemoryAllocateInfo.ts new file mode 100644 index 0000000..8fa955b --- /dev/null +++ b/api/struct/ExportMemoryAllocateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalMemoryHandleTypeFlags } from "../def.ts"; + +export interface InitExportMemoryAllocateInfo { + pNext?: AnyPointer; + handleTypes?: ExternalMemoryHandleTypeFlags; +} + +export class ExportMemoryAllocateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMemoryAllocateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMemoryAllocateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMemoryAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMemoryAllocateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMemoryAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryAllocateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_MEMORY_ALLOCATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleTypes(): number { + return this.#view.getUint32(16, LE); + } + + set handleTypes(value: ExternalMemoryHandleTypeFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMemoryAllocateInfoKHR.ts b/api/struct/ExportMemoryAllocateInfoKHR.ts new file mode 100644 index 0000000..a763676 --- /dev/null +++ b/api/struct/ExportMemoryAllocateInfoKHR.ts @@ -0,0 +1,2 @@ + import { ExportMemoryAllocateInfo } from "./ExportMemoryAllocateInfo.ts"; + export type ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo; \ No newline at end of file diff --git a/api/struct/ExportMemoryAllocateInfoNV.ts b/api/struct/ExportMemoryAllocateInfoNV.ts new file mode 100644 index 0000000..811d578 --- /dev/null +++ b/api/struct/ExportMemoryAllocateInfoNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalMemoryHandleTypeFlagsNV } from "../def.ts"; + +export interface InitExportMemoryAllocateInfoNV { + pNext?: AnyPointer; + handleTypes?: ExternalMemoryHandleTypeFlagsNV; +} + +export class ExportMemoryAllocateInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMemoryAllocateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMemoryAllocateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMemoryAllocateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMemoryAllocateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMemoryAllocateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryAllocateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_MEMORY_ALLOCATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleTypes(): number { + return this.#view.getUint32(16, LE); + } + + set handleTypes(value: ExternalMemoryHandleTypeFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMemoryWin32HandleInfoKHR.ts b/api/struct/ExportMemoryWin32HandleInfoKHR.ts new file mode 100644 index 0000000..f82951f --- /dev/null +++ b/api/struct/ExportMemoryWin32HandleInfoKHR.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitExportMemoryWin32HandleInfoKHR { + pNext?: AnyPointer; + pAttributes?: AnyPointer; + dwAccess?: number; + name?: Deno.PointerValue; +} + +export class ExportMemoryWin32HandleInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMemoryWin32HandleInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMemoryWin32HandleInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMemoryWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMemoryWin32HandleInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMemoryWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pAttributes !== undefined) this.pAttributes = data.pAttributes; + if (data.dwAccess !== undefined) this.dwAccess = data.dwAccess; + if (data.name !== undefined) this.name = data.name; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryWin32HandleInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pAttributes(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pAttributes(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dwAccess(): number { + return this.#view.getUint32(24, LE); + } + + set dwAccess(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get name(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set name(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMemoryWin32HandleInfoNV.ts b/api/struct/ExportMemoryWin32HandleInfoNV.ts new file mode 100644 index 0000000..24b22b2 --- /dev/null +++ b/api/struct/ExportMemoryWin32HandleInfoNV.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitExportMemoryWin32HandleInfoNV { + pNext?: AnyPointer; + pAttributes?: AnyPointer; + dwAccess?: number; +} + +export class ExportMemoryWin32HandleInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMemoryWin32HandleInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMemoryWin32HandleInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMemoryWin32HandleInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMemoryWin32HandleInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMemoryWin32HandleInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pAttributes !== undefined) this.pAttributes = data.pAttributes; + if (data.dwAccess !== undefined) this.dwAccess = data.dwAccess; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryWin32HandleInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_MEMORY_WIN32_HANDLE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pAttributes(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pAttributes(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dwAccess(): number { + return this.#view.getUint32(24, LE); + } + + set dwAccess(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMetalBufferInfoEXT.ts b/api/struct/ExportMetalBufferInfoEXT.ts new file mode 100644 index 0000000..63dfaaa --- /dev/null +++ b/api/struct/ExportMetalBufferInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceMemory, MTLBuffer_id } from "../def.ts"; + +export interface InitExportMetalBufferInfoEXT { + pNext?: AnyPointer; + memory?: DeviceMemory; + mtlBuffer?: MTLBuffer_id; +} + +export class ExportMetalBufferInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMetalBufferInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalBufferInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMetalBufferInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMetalBufferInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMetalBufferInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memory !== undefined) this.memory = data.memory; + if (data.mtlBuffer !== undefined) this.mtlBuffer = data.mtlBuffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalBufferInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_METAL_BUFFER_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get mtlBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set mtlBuffer(value: MTLBuffer_id) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMetalCommandQueueInfoEXT.ts b/api/struct/ExportMetalCommandQueueInfoEXT.ts new file mode 100644 index 0000000..f0ce9fc --- /dev/null +++ b/api/struct/ExportMetalCommandQueueInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Queue, MTLCommandQueue_id } from "../def.ts"; + +export interface InitExportMetalCommandQueueInfoEXT { + pNext?: AnyPointer; + queue?: Queue; + mtlCommandQueue?: MTLCommandQueue_id; +} + +export class ExportMetalCommandQueueInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMetalCommandQueueInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalCommandQueueInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMetalCommandQueueInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMetalCommandQueueInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMetalCommandQueueInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.queue !== undefined) this.queue = data.queue; + if (data.mtlCommandQueue !== undefined) this.mtlCommandQueue = data.mtlCommandQueue; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalCommandQueueInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_METAL_COMMAND_QUEUE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get queue(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set queue(value: Queue) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get mtlCommandQueue(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set mtlCommandQueue(value: MTLCommandQueue_id) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMetalDeviceInfoEXT.ts b/api/struct/ExportMetalDeviceInfoEXT.ts new file mode 100644 index 0000000..3adfdbc --- /dev/null +++ b/api/struct/ExportMetalDeviceInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { MTLDevice_id } from "../def.ts"; + +export interface InitExportMetalDeviceInfoEXT { + pNext?: AnyPointer; + mtlDevice?: MTLDevice_id; +} + +export class ExportMetalDeviceInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMetalDeviceInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalDeviceInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMetalDeviceInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMetalDeviceInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMetalDeviceInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.mtlDevice !== undefined) this.mtlDevice = data.mtlDevice; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalDeviceInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_METAL_DEVICE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get mtlDevice(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set mtlDevice(value: MTLDevice_id) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMetalIOSurfaceInfoEXT.ts b/api/struct/ExportMetalIOSurfaceInfoEXT.ts new file mode 100644 index 0000000..4b58c7b --- /dev/null +++ b/api/struct/ExportMetalIOSurfaceInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Image, IOSurfaceRef } from "../def.ts"; + +export interface InitExportMetalIOSurfaceInfoEXT { + pNext?: AnyPointer; + image?: Image; + ioSurface?: IOSurfaceRef; +} + +export class ExportMetalIOSurfaceInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMetalIOSurfaceInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalIOSurfaceInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMetalIOSurfaceInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMetalIOSurfaceInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMetalIOSurfaceInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.image !== undefined) this.image = data.image; + if (data.ioSurface !== undefined) this.ioSurface = data.ioSurface; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalIOSurfaceInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_METAL_IO_SURFACE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get ioSurface(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set ioSurface(value: IOSurfaceRef) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMetalObjectCreateInfoEXT.ts b/api/struct/ExportMetalObjectCreateInfoEXT.ts new file mode 100644 index 0000000..c540e4a --- /dev/null +++ b/api/struct/ExportMetalObjectCreateInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExportMetalObjectTypeFlagBitsEXT } from "../enum.ts"; + +export interface InitExportMetalObjectCreateInfoEXT { + pNext?: AnyPointer; + exportObjectType?: ExportMetalObjectTypeFlagBitsEXT; +} + +export class ExportMetalObjectCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMetalObjectCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalObjectCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMetalObjectCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMetalObjectCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMetalObjectCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.exportObjectType !== undefined) this.exportObjectType = data.exportObjectType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalObjectCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_METAL_OBJECT_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get exportObjectType(): number { + return this.#view.getUint32(16, LE); + } + + set exportObjectType(value: ExportMetalObjectTypeFlagBitsEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMetalObjectsInfoEXT.ts b/api/struct/ExportMetalObjectsInfoEXT.ts new file mode 100644 index 0000000..412871f --- /dev/null +++ b/api/struct/ExportMetalObjectsInfoEXT.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitExportMetalObjectsInfoEXT { + pNext?: AnyPointer; +} + +export class ExportMetalObjectsInfoEXT implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMetalObjectsInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalObjectsInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMetalObjectsInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMetalObjectsInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMetalObjectsInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalObjectsInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_METAL_OBJECTS_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMetalSharedEventInfoEXT.ts b/api/struct/ExportMetalSharedEventInfoEXT.ts new file mode 100644 index 0000000..29cad4b --- /dev/null +++ b/api/struct/ExportMetalSharedEventInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Semaphore, Event, MTLSharedEvent_id } from "../def.ts"; + +export interface InitExportMetalSharedEventInfoEXT { + pNext?: AnyPointer; + semaphore?: Semaphore; + event?: Event; + mtlSharedEvent?: MTLSharedEvent_id; +} + +export class ExportMetalSharedEventInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMetalSharedEventInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalSharedEventInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMetalSharedEventInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMetalSharedEventInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMetalSharedEventInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.event !== undefined) this.event = data.event; + if (data.mtlSharedEvent !== undefined) this.mtlSharedEvent = data.mtlSharedEvent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalSharedEventInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_METAL_SHARED_EVENT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get event(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set event(value: Event) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get mtlSharedEvent(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set mtlSharedEvent(value: MTLSharedEvent_id) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportMetalTextureInfoEXT.ts b/api/struct/ExportMetalTextureInfoEXT.ts new file mode 100644 index 0000000..22a320d --- /dev/null +++ b/api/struct/ExportMetalTextureInfoEXT.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageAspectFlagBits } from "../enum.ts"; +import { Image, ImageView, BufferView, MTLTexture_id } from "../def.ts"; + +export interface InitExportMetalTextureInfoEXT { + pNext?: AnyPointer; + image?: Image; + imageView?: ImageView; + bufferView?: BufferView; + plane?: ImageAspectFlagBits; + mtlTexture?: MTLTexture_id; +} + +export class ExportMetalTextureInfoEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportMetalTextureInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalTextureInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportMetalTextureInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportMetalTextureInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportMetalTextureInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.image !== undefined) this.image = data.image; + if (data.imageView !== undefined) this.imageView = data.imageView; + if (data.bufferView !== undefined) this.bufferView = data.bufferView; + if (data.plane !== undefined) this.plane = data.plane; + if (data.mtlTexture !== undefined) this.mtlTexture = data.mtlTexture; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalTextureInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_METAL_TEXTURE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get imageView(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set imageView(value: ImageView) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get bufferView(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set bufferView(value: BufferView) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get plane(): number { + return this.#view.getUint32(40, LE); + } + + set plane(value: ImageAspectFlagBits) { + this.#view.setUint32(40, Number(value), LE); + } + + get mtlTexture(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set mtlTexture(value: MTLTexture_id) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportSemaphoreCreateInfo.ts b/api/struct/ExportSemaphoreCreateInfo.ts new file mode 100644 index 0000000..6c8b533 --- /dev/null +++ b/api/struct/ExportSemaphoreCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalSemaphoreHandleTypeFlags } from "../def.ts"; + +export interface InitExportSemaphoreCreateInfo { + pNext?: AnyPointer; + handleTypes?: ExternalSemaphoreHandleTypeFlags; +} + +export class ExportSemaphoreCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportSemaphoreCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportSemaphoreCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportSemaphoreCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportSemaphoreCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportSemaphoreCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportSemaphoreCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_SEMAPHORE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleTypes(): number { + return this.#view.getUint32(16, LE); + } + + set handleTypes(value: ExternalSemaphoreHandleTypeFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExportSemaphoreCreateInfoKHR.ts b/api/struct/ExportSemaphoreCreateInfoKHR.ts new file mode 100644 index 0000000..565a487 --- /dev/null +++ b/api/struct/ExportSemaphoreCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { ExportSemaphoreCreateInfo } from "./ExportSemaphoreCreateInfo.ts"; + export type ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo; \ No newline at end of file diff --git a/api/struct/ExportSemaphoreWin32HandleInfoKHR.ts b/api/struct/ExportSemaphoreWin32HandleInfoKHR.ts new file mode 100644 index 0000000..db68646 --- /dev/null +++ b/api/struct/ExportSemaphoreWin32HandleInfoKHR.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitExportSemaphoreWin32HandleInfoKHR { + pNext?: AnyPointer; + pAttributes?: AnyPointer; + dwAccess?: number; + name?: Deno.PointerValue; +} + +export class ExportSemaphoreWin32HandleInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExportSemaphoreWin32HandleInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExportSemaphoreWin32HandleInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExportSemaphoreWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExportSemaphoreWin32HandleInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExportSemaphoreWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pAttributes !== undefined) this.pAttributes = data.pAttributes; + if (data.dwAccess !== undefined) this.dwAccess = data.dwAccess; + if (data.name !== undefined) this.name = data.name; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportSemaphoreWin32HandleInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pAttributes(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pAttributes(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dwAccess(): number { + return this.#view.getUint32(24, LE); + } + + set dwAccess(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get name(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set name(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExtensionProperties.ts b/api/struct/ExtensionProperties.ts new file mode 100644 index 0000000..ec7d301 --- /dev/null +++ b/api/struct/ExtensionProperties.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitExtensionProperties { + extensionName?: Uint8Array; + specVersion?: number; +} + +export class ExtensionProperties implements BaseStruct { + static size = 260; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExtensionProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExtensionProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExtensionProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExtensionProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExtensionProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.extensionName !== undefined) this.extensionName = data.extensionName; + if (data.specVersion !== undefined) this.specVersion = data.specVersion; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExtensionProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get extensionName(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 256); + } + + set extensionName(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 0); + } + + get specVersion(): number { + return this.#view.getUint32(256, LE); + } + + set specVersion(value: number) { + this.#view.setUint32(256, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/Extent2D.ts b/api/struct/Extent2D.ts new file mode 100644 index 0000000..405b5be --- /dev/null +++ b/api/struct/Extent2D.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitExtent2D { + width?: number; + height?: number; +} + +export class Extent2D implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExtent2D); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExtent2D) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(Extent2D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(Extent2D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.width !== undefined) this.width = data.width; + if (data.height !== undefined) this.height = data.height; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Extent2D.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get width(): number { + return this.#view.getUint32(0, LE); + } + + set width(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get height(): number { + return this.#view.getUint32(4, LE); + } + + set height(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/Extent3D.ts b/api/struct/Extent3D.ts new file mode 100644 index 0000000..07f4988 --- /dev/null +++ b/api/struct/Extent3D.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitExtent3D { + width?: number; + height?: number; + depth?: number; +} + +export class Extent3D implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExtent3D); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExtent3D) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(Extent3D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(Extent3D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.width !== undefined) this.width = data.width; + if (data.height !== undefined) this.height = data.height; + if (data.depth !== undefined) this.depth = data.depth; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Extent3D.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get width(): number { + return this.#view.getUint32(0, LE); + } + + set width(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get height(): number { + return this.#view.getUint32(4, LE); + } + + set height(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get depth(): number { + return this.#view.getUint32(8, LE); + } + + set depth(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExternalBufferProperties.ts b/api/struct/ExternalBufferProperties.ts new file mode 100644 index 0000000..3d7ad9a --- /dev/null +++ b/api/struct/ExternalBufferProperties.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ExternalMemoryProperties} from "./ExternalMemoryProperties.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitExternalBufferProperties { + pNext?: AnyPointer; + externalMemoryProperties?: ExternalMemoryProperties; +} + +export class ExternalBufferProperties implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalBufferProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalBufferProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalBufferProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalBufferProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalBufferProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.externalMemoryProperties !== undefined) this.externalMemoryProperties = data.externalMemoryProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalBufferProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXTERNAL_BUFFER_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get externalMemoryProperties(): ExternalMemoryProperties { + return new ExternalMemoryProperties(this.#data.subarray(16, 16 + ExternalMemoryProperties.size)); + } + + set externalMemoryProperties(value: ExternalMemoryProperties) { + if (value[BUFFER].byteLength < ExternalMemoryProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/ExternalBufferPropertiesKHR.ts b/api/struct/ExternalBufferPropertiesKHR.ts new file mode 100644 index 0000000..e738efe --- /dev/null +++ b/api/struct/ExternalBufferPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { ExternalBufferProperties } from "./ExternalBufferProperties.ts"; + export type ExternalBufferPropertiesKHR = ExternalBufferProperties; \ No newline at end of file diff --git a/api/struct/ExternalFenceProperties.ts b/api/struct/ExternalFenceProperties.ts new file mode 100644 index 0000000..04a431b --- /dev/null +++ b/api/struct/ExternalFenceProperties.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalFenceHandleTypeFlags, ExternalFenceFeatureFlags } from "../def.ts"; + +export interface InitExternalFenceProperties { + pNext?: AnyPointer; + exportFromImportedHandleTypes?: ExternalFenceHandleTypeFlags; + compatibleHandleTypes?: ExternalFenceHandleTypeFlags; + externalFenceFeatures?: ExternalFenceFeatureFlags; +} + +export class ExternalFenceProperties implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalFenceProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalFenceProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalFenceProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalFenceProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalFenceProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.exportFromImportedHandleTypes !== undefined) this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes; + if (data.compatibleHandleTypes !== undefined) this.compatibleHandleTypes = data.compatibleHandleTypes; + if (data.externalFenceFeatures !== undefined) this.externalFenceFeatures = data.externalFenceFeatures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalFenceProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXTERNAL_FENCE_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get exportFromImportedHandleTypes(): number { + return this.#view.getUint32(16, LE); + } + + set exportFromImportedHandleTypes(value: ExternalFenceHandleTypeFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get compatibleHandleTypes(): number { + return this.#view.getUint32(20, LE); + } + + set compatibleHandleTypes(value: ExternalFenceHandleTypeFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get externalFenceFeatures(): number { + return this.#view.getUint32(24, LE); + } + + set externalFenceFeatures(value: ExternalFenceFeatureFlags) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExternalFencePropertiesKHR.ts b/api/struct/ExternalFencePropertiesKHR.ts new file mode 100644 index 0000000..b812197 --- /dev/null +++ b/api/struct/ExternalFencePropertiesKHR.ts @@ -0,0 +1,2 @@ + import { ExternalFenceProperties } from "./ExternalFenceProperties.ts"; + export type ExternalFencePropertiesKHR = ExternalFenceProperties; \ No newline at end of file diff --git a/api/struct/ExternalFormatANDROID.ts b/api/struct/ExternalFormatANDROID.ts new file mode 100644 index 0000000..62aec56 --- /dev/null +++ b/api/struct/ExternalFormatANDROID.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitExternalFormatANDROID { + pNext?: AnyPointer; + externalFormat?: number | bigint; +} + +export class ExternalFormatANDROID implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalFormatANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalFormatANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalFormatANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalFormatANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalFormatANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.externalFormat !== undefined) this.externalFormat = data.externalFormat; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalFormatANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXTERNAL_FORMAT_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get externalFormat(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set externalFormat(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExternalImageFormatProperties.ts b/api/struct/ExternalImageFormatProperties.ts new file mode 100644 index 0000000..4c2ee19 --- /dev/null +++ b/api/struct/ExternalImageFormatProperties.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ExternalMemoryProperties} from "./ExternalMemoryProperties.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitExternalImageFormatProperties { + pNext?: AnyPointer; + externalMemoryProperties?: ExternalMemoryProperties; +} + +export class ExternalImageFormatProperties implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalImageFormatProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalImageFormatProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalImageFormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalImageFormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalImageFormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.externalMemoryProperties !== undefined) this.externalMemoryProperties = data.externalMemoryProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalImageFormatProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXTERNAL_IMAGE_FORMAT_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get externalMemoryProperties(): ExternalMemoryProperties { + return new ExternalMemoryProperties(this.#data.subarray(16, 16 + ExternalMemoryProperties.size)); + } + + set externalMemoryProperties(value: ExternalMemoryProperties) { + if (value[BUFFER].byteLength < ExternalMemoryProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/ExternalImageFormatPropertiesKHR.ts b/api/struct/ExternalImageFormatPropertiesKHR.ts new file mode 100644 index 0000000..d5c1cbd --- /dev/null +++ b/api/struct/ExternalImageFormatPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { ExternalImageFormatProperties } from "./ExternalImageFormatProperties.ts"; + export type ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties; \ No newline at end of file diff --git a/api/struct/ExternalImageFormatPropertiesNV.ts b/api/struct/ExternalImageFormatPropertiesNV.ts new file mode 100644 index 0000000..50bf4bd --- /dev/null +++ b/api/struct/ExternalImageFormatPropertiesNV.ts @@ -0,0 +1,94 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageFormatProperties} from "./ImageFormatProperties.ts"; +import { ExternalMemoryFeatureFlagsNV, ExternalMemoryHandleTypeFlagsNV } from "../def.ts"; + +export interface InitExternalImageFormatPropertiesNV { + imageFormatProperties?: ImageFormatProperties; + externalMemoryFeatures?: ExternalMemoryFeatureFlagsNV; + exportFromImportedHandleTypes?: ExternalMemoryHandleTypeFlagsNV; + compatibleHandleTypes?: ExternalMemoryHandleTypeFlagsNV; +} + +export class ExternalImageFormatPropertiesNV implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalImageFormatPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalImageFormatPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalImageFormatPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalImageFormatPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalImageFormatPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.imageFormatProperties !== undefined) this.imageFormatProperties = data.imageFormatProperties; + if (data.externalMemoryFeatures !== undefined) this.externalMemoryFeatures = data.externalMemoryFeatures; + if (data.exportFromImportedHandleTypes !== undefined) this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes; + if (data.compatibleHandleTypes !== undefined) this.compatibleHandleTypes = data.compatibleHandleTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalImageFormatPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get imageFormatProperties(): ImageFormatProperties { + return new ImageFormatProperties(this.#data.subarray(0, 0 + ImageFormatProperties.size)); + } + + set imageFormatProperties(value: ImageFormatProperties) { + if (value[BUFFER].byteLength < ImageFormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get externalMemoryFeatures(): number { + return this.#view.getUint32(32, LE); + } + + set externalMemoryFeatures(value: ExternalMemoryFeatureFlagsNV) { + this.#view.setUint32(32, Number(value), LE); + } + + get exportFromImportedHandleTypes(): number { + return this.#view.getUint32(36, LE); + } + + set exportFromImportedHandleTypes(value: ExternalMemoryHandleTypeFlagsNV) { + this.#view.setUint32(36, Number(value), LE); + } + + get compatibleHandleTypes(): number { + return this.#view.getUint32(40, LE); + } + + set compatibleHandleTypes(value: ExternalMemoryHandleTypeFlagsNV) { + this.#view.setUint32(40, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExternalMemoryBufferCreateInfo.ts b/api/struct/ExternalMemoryBufferCreateInfo.ts new file mode 100644 index 0000000..2752d6f --- /dev/null +++ b/api/struct/ExternalMemoryBufferCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalMemoryHandleTypeFlags } from "../def.ts"; + +export interface InitExternalMemoryBufferCreateInfo { + pNext?: AnyPointer; + handleTypes?: ExternalMemoryHandleTypeFlags; +} + +export class ExternalMemoryBufferCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalMemoryBufferCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalMemoryBufferCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalMemoryBufferCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalMemoryBufferCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalMemoryBufferCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryBufferCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXTERNAL_MEMORY_BUFFER_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleTypes(): number { + return this.#view.getUint32(16, LE); + } + + set handleTypes(value: ExternalMemoryHandleTypeFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExternalMemoryBufferCreateInfoKHR.ts b/api/struct/ExternalMemoryBufferCreateInfoKHR.ts new file mode 100644 index 0000000..890ef5d --- /dev/null +++ b/api/struct/ExternalMemoryBufferCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { ExternalMemoryBufferCreateInfo } from "./ExternalMemoryBufferCreateInfo.ts"; + export type ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo; \ No newline at end of file diff --git a/api/struct/ExternalMemoryImageCreateInfo.ts b/api/struct/ExternalMemoryImageCreateInfo.ts new file mode 100644 index 0000000..7ad27f9 --- /dev/null +++ b/api/struct/ExternalMemoryImageCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalMemoryHandleTypeFlags } from "../def.ts"; + +export interface InitExternalMemoryImageCreateInfo { + pNext?: AnyPointer; + handleTypes?: ExternalMemoryHandleTypeFlags; +} + +export class ExternalMemoryImageCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalMemoryImageCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalMemoryImageCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalMemoryImageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalMemoryImageCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalMemoryImageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryImageCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXTERNAL_MEMORY_IMAGE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleTypes(): number { + return this.#view.getUint32(16, LE); + } + + set handleTypes(value: ExternalMemoryHandleTypeFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExternalMemoryImageCreateInfoKHR.ts b/api/struct/ExternalMemoryImageCreateInfoKHR.ts new file mode 100644 index 0000000..627d09c --- /dev/null +++ b/api/struct/ExternalMemoryImageCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { ExternalMemoryImageCreateInfo } from "./ExternalMemoryImageCreateInfo.ts"; + export type ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo; \ No newline at end of file diff --git a/api/struct/ExternalMemoryImageCreateInfoNV.ts b/api/struct/ExternalMemoryImageCreateInfoNV.ts new file mode 100644 index 0000000..e9a8dd3 --- /dev/null +++ b/api/struct/ExternalMemoryImageCreateInfoNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalMemoryHandleTypeFlagsNV } from "../def.ts"; + +export interface InitExternalMemoryImageCreateInfoNV { + pNext?: AnyPointer; + handleTypes?: ExternalMemoryHandleTypeFlagsNV; +} + +export class ExternalMemoryImageCreateInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalMemoryImageCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalMemoryImageCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalMemoryImageCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalMemoryImageCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalMemoryImageCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryImageCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleTypes(): number { + return this.#view.getUint32(16, LE); + } + + set handleTypes(value: ExternalMemoryHandleTypeFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExternalMemoryProperties.ts b/api/struct/ExternalMemoryProperties.ts new file mode 100644 index 0000000..3576191 --- /dev/null +++ b/api/struct/ExternalMemoryProperties.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ExternalMemoryFeatureFlags, ExternalMemoryHandleTypeFlags } from "../def.ts"; + +export interface InitExternalMemoryProperties { + externalMemoryFeatures?: ExternalMemoryFeatureFlags; + exportFromImportedHandleTypes?: ExternalMemoryHandleTypeFlags; + compatibleHandleTypes?: ExternalMemoryHandleTypeFlags; +} + +export class ExternalMemoryProperties implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalMemoryProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalMemoryProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalMemoryProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalMemoryProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalMemoryProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.externalMemoryFeatures !== undefined) this.externalMemoryFeatures = data.externalMemoryFeatures; + if (data.exportFromImportedHandleTypes !== undefined) this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes; + if (data.compatibleHandleTypes !== undefined) this.compatibleHandleTypes = data.compatibleHandleTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get externalMemoryFeatures(): number { + return this.#view.getUint32(0, LE); + } + + set externalMemoryFeatures(value: ExternalMemoryFeatureFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get exportFromImportedHandleTypes(): number { + return this.#view.getUint32(4, LE); + } + + set exportFromImportedHandleTypes(value: ExternalMemoryHandleTypeFlags) { + this.#view.setUint32(4, Number(value), LE); + } + + get compatibleHandleTypes(): number { + return this.#view.getUint32(8, LE); + } + + set compatibleHandleTypes(value: ExternalMemoryHandleTypeFlags) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExternalMemoryPropertiesKHR.ts b/api/struct/ExternalMemoryPropertiesKHR.ts new file mode 100644 index 0000000..c12f0af --- /dev/null +++ b/api/struct/ExternalMemoryPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { ExternalMemoryProperties } from "./ExternalMemoryProperties.ts"; + export type ExternalMemoryPropertiesKHR = ExternalMemoryProperties; \ No newline at end of file diff --git a/api/struct/ExternalSemaphoreProperties.ts b/api/struct/ExternalSemaphoreProperties.ts new file mode 100644 index 0000000..d649975 --- /dev/null +++ b/api/struct/ExternalSemaphoreProperties.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalSemaphoreHandleTypeFlags, ExternalSemaphoreFeatureFlags } from "../def.ts"; + +export interface InitExternalSemaphoreProperties { + pNext?: AnyPointer; + exportFromImportedHandleTypes?: ExternalSemaphoreHandleTypeFlags; + compatibleHandleTypes?: ExternalSemaphoreHandleTypeFlags; + externalSemaphoreFeatures?: ExternalSemaphoreFeatureFlags; +} + +export class ExternalSemaphoreProperties implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitExternalSemaphoreProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitExternalSemaphoreProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ExternalSemaphoreProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ExternalSemaphoreProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ExternalSemaphoreProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.exportFromImportedHandleTypes !== undefined) this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes; + if (data.compatibleHandleTypes !== undefined) this.compatibleHandleTypes = data.compatibleHandleTypes; + if (data.externalSemaphoreFeatures !== undefined) this.externalSemaphoreFeatures = data.externalSemaphoreFeatures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalSemaphoreProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.EXTERNAL_SEMAPHORE_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get exportFromImportedHandleTypes(): number { + return this.#view.getUint32(16, LE); + } + + set exportFromImportedHandleTypes(value: ExternalSemaphoreHandleTypeFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get compatibleHandleTypes(): number { + return this.#view.getUint32(20, LE); + } + + set compatibleHandleTypes(value: ExternalSemaphoreHandleTypeFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get externalSemaphoreFeatures(): number { + return this.#view.getUint32(24, LE); + } + + set externalSemaphoreFeatures(value: ExternalSemaphoreFeatureFlags) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ExternalSemaphorePropertiesKHR.ts b/api/struct/ExternalSemaphorePropertiesKHR.ts new file mode 100644 index 0000000..97d7f14 --- /dev/null +++ b/api/struct/ExternalSemaphorePropertiesKHR.ts @@ -0,0 +1,2 @@ + import { ExternalSemaphoreProperties } from "./ExternalSemaphoreProperties.ts"; + export type ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties; \ No newline at end of file diff --git a/api/struct/FenceCreateInfo.ts b/api/struct/FenceCreateInfo.ts new file mode 100644 index 0000000..eb04755 --- /dev/null +++ b/api/struct/FenceCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { FenceCreateFlags } from "../def.ts"; + +export interface InitFenceCreateInfo { + pNext?: AnyPointer; + flags?: FenceCreateFlags; +} + +export class FenceCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFenceCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFenceCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FenceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FenceCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FenceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FenceCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FENCE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: FenceCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/FenceGetFdInfoKHR.ts b/api/struct/FenceGetFdInfoKHR.ts new file mode 100644 index 0000000..74a2690 --- /dev/null +++ b/api/struct/FenceGetFdInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalFenceHandleTypeFlagBits } from "../enum.ts"; +import { Fence } from "../def.ts"; + +export interface InitFenceGetFdInfoKHR { + pNext?: AnyPointer; + fence?: Fence; + handleType?: ExternalFenceHandleTypeFlagBits; +} + +export class FenceGetFdInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFenceGetFdInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFenceGetFdInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FenceGetFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FenceGetFdInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FenceGetFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fence !== undefined) this.fence = data.fence; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FenceGetFdInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FENCE_GET_FD_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fence(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set fence(value: Fence) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalFenceHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/FenceGetWin32HandleInfoKHR.ts b/api/struct/FenceGetWin32HandleInfoKHR.ts new file mode 100644 index 0000000..4c3f733 --- /dev/null +++ b/api/struct/FenceGetWin32HandleInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalFenceHandleTypeFlagBits } from "../enum.ts"; +import { Fence } from "../def.ts"; + +export interface InitFenceGetWin32HandleInfoKHR { + pNext?: AnyPointer; + fence?: Fence; + handleType?: ExternalFenceHandleTypeFlagBits; +} + +export class FenceGetWin32HandleInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFenceGetWin32HandleInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFenceGetWin32HandleInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FenceGetWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FenceGetWin32HandleInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FenceGetWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fence !== undefined) this.fence = data.fence; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FenceGetWin32HandleInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FENCE_GET_WIN32_HANDLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fence(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set fence(value: Fence) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalFenceHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/FilterCubicImageViewImageFormatPropertiesEXT.ts b/api/struct/FilterCubicImageViewImageFormatPropertiesEXT.ts new file mode 100644 index 0000000..af6a816 --- /dev/null +++ b/api/struct/FilterCubicImageViewImageFormatPropertiesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitFilterCubicImageViewImageFormatPropertiesEXT { + pNext?: AnyPointer; + filterCubic?: Bool32; + filterCubicMinmax?: Bool32; +} + +export class FilterCubicImageViewImageFormatPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFilterCubicImageViewImageFormatPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFilterCubicImageViewImageFormatPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FilterCubicImageViewImageFormatPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FilterCubicImageViewImageFormatPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FilterCubicImageViewImageFormatPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.filterCubic !== undefined) this.filterCubic = data.filterCubic; + if (data.filterCubicMinmax !== undefined) this.filterCubicMinmax = data.filterCubicMinmax; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FilterCubicImageViewImageFormatPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get filterCubic(): number { + return this.#view.getUint32(16, LE); + } + + set filterCubic(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get filterCubicMinmax(): number { + return this.#view.getUint32(20, LE); + } + + set filterCubicMinmax(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/FormatProperties.ts b/api/struct/FormatProperties.ts new file mode 100644 index 0000000..60c8f29 --- /dev/null +++ b/api/struct/FormatProperties.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { FormatFeatureFlags } from "../def.ts"; + +export interface InitFormatProperties { + linearTilingFeatures?: FormatFeatureFlags; + optimalTilingFeatures?: FormatFeatureFlags; + bufferFeatures?: FormatFeatureFlags; +} + +export class FormatProperties implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFormatProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFormatProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.linearTilingFeatures !== undefined) this.linearTilingFeatures = data.linearTilingFeatures; + if (data.optimalTilingFeatures !== undefined) this.optimalTilingFeatures = data.optimalTilingFeatures; + if (data.bufferFeatures !== undefined) this.bufferFeatures = data.bufferFeatures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FormatProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get linearTilingFeatures(): number { + return this.#view.getUint32(0, LE); + } + + set linearTilingFeatures(value: FormatFeatureFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get optimalTilingFeatures(): number { + return this.#view.getUint32(4, LE); + } + + set optimalTilingFeatures(value: FormatFeatureFlags) { + this.#view.setUint32(4, Number(value), LE); + } + + get bufferFeatures(): number { + return this.#view.getUint32(8, LE); + } + + set bufferFeatures(value: FormatFeatureFlags) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/FormatProperties2.ts b/api/struct/FormatProperties2.ts new file mode 100644 index 0000000..06846a1 --- /dev/null +++ b/api/struct/FormatProperties2.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {FormatProperties} from "./FormatProperties.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitFormatProperties2 { + pNext?: AnyPointer; + formatProperties?: FormatProperties; +} + +export class FormatProperties2 implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFormatProperties2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFormatProperties2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FormatProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FormatProperties2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FormatProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.formatProperties !== undefined) this.formatProperties = data.formatProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FormatProperties2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FORMAT_PROPERTIES_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get formatProperties(): FormatProperties { + return new FormatProperties(this.#data.subarray(16, 16 + FormatProperties.size)); + } + + set formatProperties(value: FormatProperties) { + if (value[BUFFER].byteLength < FormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/FormatProperties2KHR.ts b/api/struct/FormatProperties2KHR.ts new file mode 100644 index 0000000..4bbec71 --- /dev/null +++ b/api/struct/FormatProperties2KHR.ts @@ -0,0 +1,2 @@ + import { FormatProperties2 } from "./FormatProperties2.ts"; + export type FormatProperties2KHR = FormatProperties2; \ No newline at end of file diff --git a/api/struct/FormatProperties3.ts b/api/struct/FormatProperties3.ts new file mode 100644 index 0000000..a35a337 --- /dev/null +++ b/api/struct/FormatProperties3.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { FormatFeatureFlags2 } from "../def.ts"; + +export interface InitFormatProperties3 { + pNext?: AnyPointer; + linearTilingFeatures?: FormatFeatureFlags2; + optimalTilingFeatures?: FormatFeatureFlags2; + bufferFeatures?: FormatFeatureFlags2; +} + +export class FormatProperties3 implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFormatProperties3); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFormatProperties3) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FormatProperties3.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FormatProperties3.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FormatProperties3.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.linearTilingFeatures !== undefined) this.linearTilingFeatures = data.linearTilingFeatures; + if (data.optimalTilingFeatures !== undefined) this.optimalTilingFeatures = data.optimalTilingFeatures; + if (data.bufferFeatures !== undefined) this.bufferFeatures = data.bufferFeatures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FormatProperties3.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FORMAT_PROPERTIES_3; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get linearTilingFeatures(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set linearTilingFeatures(value: FormatFeatureFlags2) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get optimalTilingFeatures(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set optimalTilingFeatures(value: FormatFeatureFlags2) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get bufferFeatures(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set bufferFeatures(value: FormatFeatureFlags2) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/FormatProperties3KHR.ts b/api/struct/FormatProperties3KHR.ts new file mode 100644 index 0000000..41a4607 --- /dev/null +++ b/api/struct/FormatProperties3KHR.ts @@ -0,0 +1,2 @@ + import { FormatProperties3 } from "./FormatProperties3.ts"; + export type FormatProperties3KHR = FormatProperties3; \ No newline at end of file diff --git a/api/struct/FragmentShadingRateAttachmentInfoKHR.ts b/api/struct/FragmentShadingRateAttachmentInfoKHR.ts new file mode 100644 index 0000000..4ebe40f --- /dev/null +++ b/api/struct/FragmentShadingRateAttachmentInfoKHR.ts @@ -0,0 +1,94 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AttachmentReference2} from "./AttachmentReference2.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitFragmentShadingRateAttachmentInfoKHR { + pNext?: AnyPointer; + pFragmentShadingRateAttachment?: AnyPointer; + shadingRateAttachmentTexelSize?: Extent2D; +} + +export class FragmentShadingRateAttachmentInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFragmentShadingRateAttachmentInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFragmentShadingRateAttachmentInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FragmentShadingRateAttachmentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FragmentShadingRateAttachmentInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FragmentShadingRateAttachmentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pFragmentShadingRateAttachment !== undefined) this.pFragmentShadingRateAttachment = data.pFragmentShadingRateAttachment; + if (data.shadingRateAttachmentTexelSize !== undefined) this.shadingRateAttachmentTexelSize = data.shadingRateAttachmentTexelSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FragmentShadingRateAttachmentInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pFragmentShadingRateAttachment(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pFragmentShadingRateAttachment(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get shadingRateAttachmentTexelSize(): Extent2D { + return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); + } + + set shadingRateAttachmentTexelSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } +} \ No newline at end of file diff --git a/api/struct/FramebufferAttachmentImageInfo.ts b/api/struct/FramebufferAttachmentImageInfo.ts new file mode 100644 index 0000000..68e0441 --- /dev/null +++ b/api/struct/FramebufferAttachmentImageInfo.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format } from "../enum.ts"; +import { ImageCreateFlags, ImageUsageFlags } from "../def.ts"; + +export interface InitFramebufferAttachmentImageInfo { + pNext?: AnyPointer; + flags?: ImageCreateFlags; + usage?: ImageUsageFlags; + width?: number; + height?: number; + layerCount?: number; + viewFormatCount?: number; + pViewFormats?: AnyPointer; +} + +export class FramebufferAttachmentImageInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFramebufferAttachmentImageInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFramebufferAttachmentImageInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FramebufferAttachmentImageInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FramebufferAttachmentImageInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FramebufferAttachmentImageInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.usage !== undefined) this.usage = data.usage; + if (data.width !== undefined) this.width = data.width; + if (data.height !== undefined) this.height = data.height; + if (data.layerCount !== undefined) this.layerCount = data.layerCount; + if (data.viewFormatCount !== undefined) this.viewFormatCount = data.viewFormatCount; + if (data.pViewFormats !== undefined) this.pViewFormats = data.pViewFormats; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferAttachmentImageInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FRAMEBUFFER_ATTACHMENT_IMAGE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: ImageCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get usage(): number { + return this.#view.getUint32(20, LE); + } + + set usage(value: ImageUsageFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get width(): number { + return this.#view.getUint32(24, LE); + } + + set width(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get height(): number { + return this.#view.getUint32(28, LE); + } + + set height(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get layerCount(): number { + return this.#view.getUint32(32, LE); + } + + set layerCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get viewFormatCount(): number { + return this.#view.getUint32(36, LE); + } + + set viewFormatCount(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get pViewFormats(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pViewFormats(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/FramebufferAttachmentImageInfoKHR.ts b/api/struct/FramebufferAttachmentImageInfoKHR.ts new file mode 100644 index 0000000..590cccf --- /dev/null +++ b/api/struct/FramebufferAttachmentImageInfoKHR.ts @@ -0,0 +1,2 @@ + import { FramebufferAttachmentImageInfo } from "./FramebufferAttachmentImageInfo.ts"; + export type FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo; \ No newline at end of file diff --git a/api/struct/FramebufferAttachmentsCreateInfo.ts b/api/struct/FramebufferAttachmentsCreateInfo.ts new file mode 100644 index 0000000..eae3341 --- /dev/null +++ b/api/struct/FramebufferAttachmentsCreateInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {FramebufferAttachmentImageInfo} from "./FramebufferAttachmentImageInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitFramebufferAttachmentsCreateInfo { + pNext?: AnyPointer; + attachmentImageInfoCount?: number; + pAttachmentImageInfos?: AnyPointer; +} + +export class FramebufferAttachmentsCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFramebufferAttachmentsCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFramebufferAttachmentsCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FramebufferAttachmentsCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FramebufferAttachmentsCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FramebufferAttachmentsCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.attachmentImageInfoCount !== undefined) this.attachmentImageInfoCount = data.attachmentImageInfoCount; + if (data.pAttachmentImageInfos !== undefined) this.pAttachmentImageInfos = data.pAttachmentImageInfos; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferAttachmentsCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FRAMEBUFFER_ATTACHMENTS_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get attachmentImageInfoCount(): number { + return this.#view.getUint32(16, LE); + } + + set attachmentImageInfoCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pAttachmentImageInfos(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAttachmentImageInfos(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/FramebufferAttachmentsCreateInfoKHR.ts b/api/struct/FramebufferAttachmentsCreateInfoKHR.ts new file mode 100644 index 0000000..ac4f7e6 --- /dev/null +++ b/api/struct/FramebufferAttachmentsCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { FramebufferAttachmentsCreateInfo } from "./FramebufferAttachmentsCreateInfo.ts"; + export type FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo; \ No newline at end of file diff --git a/api/struct/FramebufferCreateInfo.ts b/api/struct/FramebufferCreateInfo.ts new file mode 100644 index 0000000..5272ed0 --- /dev/null +++ b/api/struct/FramebufferCreateInfo.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { FramebufferCreateFlags, RenderPass, ImageView } from "../def.ts"; + +export interface InitFramebufferCreateInfo { + pNext?: AnyPointer; + flags?: FramebufferCreateFlags; + renderPass?: RenderPass; + attachmentCount?: number; + pAttachments?: AnyPointer; + width?: number; + height?: number; + layers?: number; +} + +export class FramebufferCreateInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFramebufferCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFramebufferCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FramebufferCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FramebufferCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FramebufferCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.renderPass !== undefined) this.renderPass = data.renderPass; + if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; + if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; + if (data.width !== undefined) this.width = data.width; + if (data.height !== undefined) this.height = data.height; + if (data.layers !== undefined) this.layers = data.layers; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FRAMEBUFFER_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: FramebufferCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get renderPass(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set renderPass(value: RenderPass) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get attachmentCount(): number { + return this.#view.getUint32(32, LE); + } + + set attachmentCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pAttachments(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get width(): number { + return this.#view.getUint32(48, LE); + } + + set width(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get height(): number { + return this.#view.getUint32(52, LE); + } + + set height(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get layers(): number { + return this.#view.getUint32(56, LE); + } + + set layers(value: number) { + this.#view.setUint32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/FramebufferMixedSamplesCombinationNV.ts b/api/struct/FramebufferMixedSamplesCombinationNV.ts new file mode 100644 index 0000000..0b2c541 --- /dev/null +++ b/api/struct/FramebufferMixedSamplesCombinationNV.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CoverageReductionModeNV, SampleCountFlagBits } from "../enum.ts"; +import { SampleCountFlags } from "../def.ts"; + +export interface InitFramebufferMixedSamplesCombinationNV { + pNext?: AnyPointer; + coverageReductionMode?: CoverageReductionModeNV; + rasterizationSamples?: SampleCountFlagBits; + depthStencilSamples?: SampleCountFlags; + colorSamples?: SampleCountFlags; +} + +export class FramebufferMixedSamplesCombinationNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitFramebufferMixedSamplesCombinationNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitFramebufferMixedSamplesCombinationNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(FramebufferMixedSamplesCombinationNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < FramebufferMixedSamplesCombinationNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(FramebufferMixedSamplesCombinationNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.coverageReductionMode !== undefined) this.coverageReductionMode = data.coverageReductionMode; + if (data.rasterizationSamples !== undefined) this.rasterizationSamples = data.rasterizationSamples; + if (data.depthStencilSamples !== undefined) this.depthStencilSamples = data.depthStencilSamples; + if (data.colorSamples !== undefined) this.colorSamples = data.colorSamples; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferMixedSamplesCombinationNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get coverageReductionMode(): number { + return this.#view.getUint32(16, LE); + } + + set coverageReductionMode(value: CoverageReductionModeNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get rasterizationSamples(): number { + return this.#view.getUint32(20, LE); + } + + set rasterizationSamples(value: SampleCountFlagBits) { + this.#view.setUint32(20, Number(value), LE); + } + + get depthStencilSamples(): number { + return this.#view.getUint32(24, LE); + } + + set depthStencilSamples(value: SampleCountFlags) { + this.#view.setUint32(24, Number(value), LE); + } + + get colorSamples(): number { + return this.#view.getUint32(28, LE); + } + + set colorSamples(value: SampleCountFlags) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/GeneratedCommandsInfoNV.ts b/api/struct/GeneratedCommandsInfoNV.ts new file mode 100644 index 0000000..32e6a53 --- /dev/null +++ b/api/struct/GeneratedCommandsInfoNV.ts @@ -0,0 +1,201 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {IndirectCommandsStreamNV} from "./IndirectCommandsStreamNV.ts"; +import { StructureType, PipelineBindPoint } from "../enum.ts"; +import { Pipeline, IndirectCommandsLayoutNV, Buffer, DeviceSize } from "../def.ts"; + +export interface InitGeneratedCommandsInfoNV { + pNext?: AnyPointer; + pipelineBindPoint?: PipelineBindPoint; + pipeline?: Pipeline; + indirectCommandsLayout?: IndirectCommandsLayoutNV; + streamCount?: number; + pStreams?: AnyPointer; + sequencesCount?: number; + preprocessBuffer?: Buffer; + preprocessOffset?: DeviceSize; + preprocessSize?: DeviceSize; + sequencesCountBuffer?: Buffer; + sequencesCountOffset?: DeviceSize; + sequencesIndexBuffer?: Buffer; + sequencesIndexOffset?: DeviceSize; +} + +export class GeneratedCommandsInfoNV implements BaseStruct { + static size = 120; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGeneratedCommandsInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGeneratedCommandsInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GeneratedCommandsInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GeneratedCommandsInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GeneratedCommandsInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; + if (data.pipeline !== undefined) this.pipeline = data.pipeline; + if (data.indirectCommandsLayout !== undefined) this.indirectCommandsLayout = data.indirectCommandsLayout; + if (data.streamCount !== undefined) this.streamCount = data.streamCount; + if (data.pStreams !== undefined) this.pStreams = data.pStreams; + if (data.sequencesCount !== undefined) this.sequencesCount = data.sequencesCount; + if (data.preprocessBuffer !== undefined) this.preprocessBuffer = data.preprocessBuffer; + if (data.preprocessOffset !== undefined) this.preprocessOffset = data.preprocessOffset; + if (data.preprocessSize !== undefined) this.preprocessSize = data.preprocessSize; + if (data.sequencesCountBuffer !== undefined) this.sequencesCountBuffer = data.sequencesCountBuffer; + if (data.sequencesCountOffset !== undefined) this.sequencesCountOffset = data.sequencesCountOffset; + if (data.sequencesIndexBuffer !== undefined) this.sequencesIndexBuffer = data.sequencesIndexBuffer; + if (data.sequencesIndexOffset !== undefined) this.sequencesIndexOffset = data.sequencesIndexOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeneratedCommandsInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.GENERATED_COMMANDS_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipelineBindPoint(): number { + return this.#view.getUint32(16, LE); + } + + set pipelineBindPoint(value: PipelineBindPoint) { + this.#view.setUint32(16, Number(value), LE); + } + + get pipeline(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pipeline(value: Pipeline) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get indirectCommandsLayout(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set indirectCommandsLayout(value: IndirectCommandsLayoutNV) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get streamCount(): number { + return this.#view.getUint32(40, LE); + } + + set streamCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get pStreams(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pStreams(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get sequencesCount(): number { + return this.#view.getUint32(56, LE); + } + + set sequencesCount(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get preprocessBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set preprocessBuffer(value: Buffer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } + + get preprocessOffset(): bigint { + return this.#view.getBigUint64(72, LE); + } + + set preprocessOffset(value: DeviceSize) { + this.#view.setBigUint64(72, BigInt(value), LE); + } + + get preprocessSize(): bigint { + return this.#view.getBigUint64(80, LE); + } + + set preprocessSize(value: DeviceSize) { + this.#view.setBigUint64(80, BigInt(value), LE); + } + + get sequencesCountBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 88, LE); + } + + set sequencesCountBuffer(value: Buffer) { + this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); + } + + get sequencesCountOffset(): bigint { + return this.#view.getBigUint64(96, LE); + } + + set sequencesCountOffset(value: DeviceSize) { + this.#view.setBigUint64(96, BigInt(value), LE); + } + + get sequencesIndexBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 104, LE); + } + + set sequencesIndexBuffer(value: Buffer) { + this.#view.setBigUint64(104, BigInt(anyPointer(value)), LE); + } + + get sequencesIndexOffset(): bigint { + return this.#view.getBigUint64(112, LE); + } + + set sequencesIndexOffset(value: DeviceSize) { + this.#view.setBigUint64(112, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/GeneratedCommandsMemoryRequirementsInfoNV.ts b/api/struct/GeneratedCommandsMemoryRequirementsInfoNV.ts new file mode 100644 index 0000000..358923f --- /dev/null +++ b/api/struct/GeneratedCommandsMemoryRequirementsInfoNV.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PipelineBindPoint } from "../enum.ts"; +import { Pipeline, IndirectCommandsLayoutNV } from "../def.ts"; + +export interface InitGeneratedCommandsMemoryRequirementsInfoNV { + pNext?: AnyPointer; + pipelineBindPoint?: PipelineBindPoint; + pipeline?: Pipeline; + indirectCommandsLayout?: IndirectCommandsLayoutNV; + maxSequencesCount?: number; +} + +export class GeneratedCommandsMemoryRequirementsInfoNV implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGeneratedCommandsMemoryRequirementsInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGeneratedCommandsMemoryRequirementsInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GeneratedCommandsMemoryRequirementsInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GeneratedCommandsMemoryRequirementsInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GeneratedCommandsMemoryRequirementsInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; + if (data.pipeline !== undefined) this.pipeline = data.pipeline; + if (data.indirectCommandsLayout !== undefined) this.indirectCommandsLayout = data.indirectCommandsLayout; + if (data.maxSequencesCount !== undefined) this.maxSequencesCount = data.maxSequencesCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeneratedCommandsMemoryRequirementsInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipelineBindPoint(): number { + return this.#view.getUint32(16, LE); + } + + set pipelineBindPoint(value: PipelineBindPoint) { + this.#view.setUint32(16, Number(value), LE); + } + + get pipeline(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pipeline(value: Pipeline) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get indirectCommandsLayout(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set indirectCommandsLayout(value: IndirectCommandsLayoutNV) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get maxSequencesCount(): number { + return this.#view.getUint32(40, LE); + } + + set maxSequencesCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/GeometryAABBNV.ts b/api/struct/GeometryAABBNV.ts new file mode 100644 index 0000000..3645e73 --- /dev/null +++ b/api/struct/GeometryAABBNV.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Buffer, DeviceSize } from "../def.ts"; + +export interface InitGeometryAABBNV { + pNext?: AnyPointer; + aabbData?: Buffer; + numAABBs?: number; + stride?: number; + offset?: DeviceSize; +} + +export class GeometryAABBNV implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGeometryAABBNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGeometryAABBNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GeometryAABBNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GeometryAABBNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GeometryAABBNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.aabbData !== undefined) this.aabbData = data.aabbData; + if (data.numAABBs !== undefined) this.numAABBs = data.numAABBs; + if (data.stride !== undefined) this.stride = data.stride; + if (data.offset !== undefined) this.offset = data.offset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryAABBNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.GEOMETRY_AABB_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get aabbData(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set aabbData(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get numAABBs(): number { + return this.#view.getUint32(24, LE); + } + + set numAABBs(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get stride(): number { + return this.#view.getUint32(28, LE); + } + + set stride(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/GeometryDataNV.ts b/api/struct/GeometryDataNV.ts new file mode 100644 index 0000000..e7b8c17 --- /dev/null +++ b/api/struct/GeometryDataNV.ts @@ -0,0 +1,77 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {GeometryTrianglesNV} from "./GeometryTrianglesNV.ts"; +import {GeometryAABBNV} from "./GeometryAABBNV.ts"; + +export interface InitGeometryDataNV { + triangles?: GeometryTrianglesNV; + aabbs?: GeometryAABBNV; +} + +export class GeometryDataNV implements BaseStruct { + static size = 136; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGeometryDataNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGeometryDataNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GeometryDataNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GeometryDataNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GeometryDataNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.triangles !== undefined) this.triangles = data.triangles; + if (data.aabbs !== undefined) this.aabbs = data.aabbs; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryDataNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get triangles(): GeometryTrianglesNV { + return new GeometryTrianglesNV(this.#data.subarray(0, 0 + GeometryTrianglesNV.size)); + } + + set triangles(value: GeometryTrianglesNV) { + if (value[BUFFER].byteLength < GeometryTrianglesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get aabbs(): GeometryAABBNV { + return new GeometryAABBNV(this.#data.subarray(96, 96 + GeometryAABBNV.size)); + } + + set aabbs(value: GeometryAABBNV) { + if (value[BUFFER].byteLength < GeometryAABBNV.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 96); + } +} \ No newline at end of file diff --git a/api/struct/GeometryNV.ts b/api/struct/GeometryNV.ts new file mode 100644 index 0000000..0f5cd25 --- /dev/null +++ b/api/struct/GeometryNV.ts @@ -0,0 +1,104 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {GeometryDataNV} from "./GeometryDataNV.ts"; +import { StructureType, GeometryTypeKHR } from "../enum.ts"; +import { GeometryFlagsKHR } from "../def.ts"; + +export interface InitGeometryNV { + pNext?: AnyPointer; + geometryType?: GeometryTypeKHR; + geometry?: GeometryDataNV; + flags?: GeometryFlagsKHR; +} + +export class GeometryNV implements BaseStruct { + static size = 168; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGeometryNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGeometryNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GeometryNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GeometryNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GeometryNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.geometryType !== undefined) this.geometryType = data.geometryType; + if (data.geometry !== undefined) this.geometry = data.geometry; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.GEOMETRY_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get geometryType(): number { + return this.#view.getUint32(16, LE); + } + + set geometryType(value: GeometryTypeKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get geometry(): GeometryDataNV { + return new GeometryDataNV(this.#data.subarray(24, 24 + GeometryDataNV.size)); + } + + set geometry(value: GeometryDataNV) { + if (value[BUFFER].byteLength < GeometryDataNV.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get flags(): number { + return this.#view.getUint32(160, LE); + } + + set flags(value: GeometryFlagsKHR) { + this.#view.setUint32(160, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/GeometryTrianglesNV.ts b/api/struct/GeometryTrianglesNV.ts new file mode 100644 index 0000000..8f951d0 --- /dev/null +++ b/api/struct/GeometryTrianglesNV.ts @@ -0,0 +1,180 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format, IndexType } from "../enum.ts"; +import { Buffer, DeviceSize } from "../def.ts"; + +export interface InitGeometryTrianglesNV { + pNext?: AnyPointer; + vertexData?: Buffer; + vertexOffset?: DeviceSize; + vertexCount?: number; + vertexStride?: DeviceSize; + vertexFormat?: Format; + indexData?: Buffer; + indexOffset?: DeviceSize; + indexCount?: number; + indexType?: IndexType; + transformData?: Buffer; + transformOffset?: DeviceSize; +} + +export class GeometryTrianglesNV implements BaseStruct { + static size = 96; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGeometryTrianglesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGeometryTrianglesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GeometryTrianglesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GeometryTrianglesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GeometryTrianglesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.vertexData !== undefined) this.vertexData = data.vertexData; + if (data.vertexOffset !== undefined) this.vertexOffset = data.vertexOffset; + if (data.vertexCount !== undefined) this.vertexCount = data.vertexCount; + if (data.vertexStride !== undefined) this.vertexStride = data.vertexStride; + if (data.vertexFormat !== undefined) this.vertexFormat = data.vertexFormat; + if (data.indexData !== undefined) this.indexData = data.indexData; + if (data.indexOffset !== undefined) this.indexOffset = data.indexOffset; + if (data.indexCount !== undefined) this.indexCount = data.indexCount; + if (data.indexType !== undefined) this.indexType = data.indexType; + if (data.transformData !== undefined) this.transformData = data.transformData; + if (data.transformOffset !== undefined) this.transformOffset = data.transformOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryTrianglesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.GEOMETRY_TRIANGLES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get vertexData(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set vertexData(value: Buffer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get vertexOffset(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set vertexOffset(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get vertexCount(): number { + return this.#view.getUint32(32, LE); + } + + set vertexCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get vertexStride(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set vertexStride(value: DeviceSize) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get vertexFormat(): number { + return this.#view.getUint32(48, LE); + } + + set vertexFormat(value: Format) { + this.#view.setUint32(48, Number(value), LE); + } + + get indexData(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set indexData(value: Buffer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get indexOffset(): bigint { + return this.#view.getBigUint64(64, LE); + } + + set indexOffset(value: DeviceSize) { + this.#view.setBigUint64(64, BigInt(value), LE); + } + + get indexCount(): number { + return this.#view.getUint32(72, LE); + } + + set indexCount(value: number) { + this.#view.setUint32(72, Number(value), LE); + } + + get indexType(): number { + return this.#view.getUint32(76, LE); + } + + set indexType(value: IndexType) { + this.#view.setUint32(76, Number(value), LE); + } + + get transformData(): Deno.PointerValue { + return pointerFromView(this.#view, 80, LE); + } + + set transformData(value: Buffer) { + this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); + } + + get transformOffset(): bigint { + return this.#view.getBigUint64(88, LE); + } + + set transformOffset(value: DeviceSize) { + this.#view.setBigUint64(88, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/GraphicsPipelineCreateInfo.ts b/api/struct/GraphicsPipelineCreateInfo.ts new file mode 100644 index 0000000..bc8581e --- /dev/null +++ b/api/struct/GraphicsPipelineCreateInfo.ts @@ -0,0 +1,250 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PipelineShaderStageCreateInfo} from "./PipelineShaderStageCreateInfo.ts"; +import {PipelineVertexInputStateCreateInfo} from "./PipelineVertexInputStateCreateInfo.ts"; +import {PipelineInputAssemblyStateCreateInfo} from "./PipelineInputAssemblyStateCreateInfo.ts"; +import {PipelineTessellationStateCreateInfo} from "./PipelineTessellationStateCreateInfo.ts"; +import {PipelineViewportStateCreateInfo} from "./PipelineViewportStateCreateInfo.ts"; +import {PipelineRasterizationStateCreateInfo} from "./PipelineRasterizationStateCreateInfo.ts"; +import {PipelineMultisampleStateCreateInfo} from "./PipelineMultisampleStateCreateInfo.ts"; +import {PipelineDepthStencilStateCreateInfo} from "./PipelineDepthStencilStateCreateInfo.ts"; +import {PipelineColorBlendStateCreateInfo} from "./PipelineColorBlendStateCreateInfo.ts"; +import {PipelineDynamicStateCreateInfo} from "./PipelineDynamicStateCreateInfo.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineCreateFlags, PipelineLayout, RenderPass, Pipeline } from "../def.ts"; + +export interface InitGraphicsPipelineCreateInfo { + pNext?: AnyPointer; + flags?: PipelineCreateFlags; + stageCount?: number; + pStages?: AnyPointer; + pVertexInputState?: AnyPointer; + pInputAssemblyState?: AnyPointer; + pTessellationState?: AnyPointer; + pViewportState?: AnyPointer; + pRasterizationState?: AnyPointer; + pMultisampleState?: AnyPointer; + pDepthStencilState?: AnyPointer; + pColorBlendState?: AnyPointer; + pDynamicState?: AnyPointer; + layout?: PipelineLayout; + renderPass?: RenderPass; + subpass?: number; + basePipelineHandle?: Pipeline; + basePipelineIndex?: number; +} + +export class GraphicsPipelineCreateInfo implements BaseStruct { + static size = 144; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGraphicsPipelineCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGraphicsPipelineCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GraphicsPipelineCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GraphicsPipelineCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GraphicsPipelineCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.stageCount !== undefined) this.stageCount = data.stageCount; + if (data.pStages !== undefined) this.pStages = data.pStages; + if (data.pVertexInputState !== undefined) this.pVertexInputState = data.pVertexInputState; + if (data.pInputAssemblyState !== undefined) this.pInputAssemblyState = data.pInputAssemblyState; + if (data.pTessellationState !== undefined) this.pTessellationState = data.pTessellationState; + if (data.pViewportState !== undefined) this.pViewportState = data.pViewportState; + if (data.pRasterizationState !== undefined) this.pRasterizationState = data.pRasterizationState; + if (data.pMultisampleState !== undefined) this.pMultisampleState = data.pMultisampleState; + if (data.pDepthStencilState !== undefined) this.pDepthStencilState = data.pDepthStencilState; + if (data.pColorBlendState !== undefined) this.pColorBlendState = data.pColorBlendState; + if (data.pDynamicState !== undefined) this.pDynamicState = data.pDynamicState; + if (data.layout !== undefined) this.layout = data.layout; + if (data.renderPass !== undefined) this.renderPass = data.renderPass; + if (data.subpass !== undefined) this.subpass = data.subpass; + if (data.basePipelineHandle !== undefined) this.basePipelineHandle = data.basePipelineHandle; + if (data.basePipelineIndex !== undefined) this.basePipelineIndex = data.basePipelineIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsPipelineCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.GRAPHICS_PIPELINE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get stageCount(): number { + return this.#view.getUint32(20, LE); + } + + set stageCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pStages(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStages(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pVertexInputState(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pVertexInputState(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pInputAssemblyState(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pInputAssemblyState(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get pTessellationState(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pTessellationState(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get pViewportState(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pViewportState(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get pRasterizationState(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pRasterizationState(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } + + get pMultisampleState(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set pMultisampleState(value: AnyPointer) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } + + get pDepthStencilState(): Deno.PointerValue { + return pointerFromView(this.#view, 80, LE); + } + + set pDepthStencilState(value: AnyPointer) { + this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); + } + + get pColorBlendState(): Deno.PointerValue { + return pointerFromView(this.#view, 88, LE); + } + + set pColorBlendState(value: AnyPointer) { + this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); + } + + get pDynamicState(): Deno.PointerValue { + return pointerFromView(this.#view, 96, LE); + } + + set pDynamicState(value: AnyPointer) { + this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); + } + + get layout(): Deno.PointerValue { + return pointerFromView(this.#view, 104, LE); + } + + set layout(value: PipelineLayout) { + this.#view.setBigUint64(104, BigInt(anyPointer(value)), LE); + } + + get renderPass(): Deno.PointerValue { + return pointerFromView(this.#view, 112, LE); + } + + set renderPass(value: RenderPass) { + this.#view.setBigUint64(112, BigInt(anyPointer(value)), LE); + } + + get subpass(): number { + return this.#view.getUint32(120, LE); + } + + set subpass(value: number) { + this.#view.setUint32(120, Number(value), LE); + } + + get basePipelineHandle(): Deno.PointerValue { + return pointerFromView(this.#view, 128, LE); + } + + set basePipelineHandle(value: Pipeline) { + this.#view.setBigUint64(128, BigInt(anyPointer(value)), LE); + } + + get basePipelineIndex(): number { + return this.#view.getInt32(136, LE); + } + + set basePipelineIndex(value: number) { + this.#view.setInt32(136, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/GraphicsPipelineLibraryCreateInfoEXT.ts b/api/struct/GraphicsPipelineLibraryCreateInfoEXT.ts new file mode 100644 index 0000000..6dd3b71 --- /dev/null +++ b/api/struct/GraphicsPipelineLibraryCreateInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { GraphicsPipelineLibraryFlagsEXT } from "../def.ts"; + +export interface InitGraphicsPipelineLibraryCreateInfoEXT { + pNext?: AnyPointer; + flags?: GraphicsPipelineLibraryFlagsEXT; +} + +export class GraphicsPipelineLibraryCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGraphicsPipelineLibraryCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGraphicsPipelineLibraryCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GraphicsPipelineLibraryCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GraphicsPipelineLibraryCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GraphicsPipelineLibraryCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsPipelineLibraryCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: GraphicsPipelineLibraryFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/GraphicsPipelineShaderGroupsCreateInfoNV.ts b/api/struct/GraphicsPipelineShaderGroupsCreateInfoNV.ts new file mode 100644 index 0000000..03e0d20 --- /dev/null +++ b/api/struct/GraphicsPipelineShaderGroupsCreateInfoNV.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {GraphicsShaderGroupCreateInfoNV} from "./GraphicsShaderGroupCreateInfoNV.ts"; +import { StructureType } from "../enum.ts"; +import { Pipeline } from "../def.ts"; + +export interface InitGraphicsPipelineShaderGroupsCreateInfoNV { + pNext?: AnyPointer; + groupCount?: number; + pGroups?: AnyPointer; + pipelineCount?: number; + pPipelines?: AnyPointer; +} + +export class GraphicsPipelineShaderGroupsCreateInfoNV implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGraphicsPipelineShaderGroupsCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGraphicsPipelineShaderGroupsCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GraphicsPipelineShaderGroupsCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GraphicsPipelineShaderGroupsCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GraphicsPipelineShaderGroupsCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.groupCount !== undefined) this.groupCount = data.groupCount; + if (data.pGroups !== undefined) this.pGroups = data.pGroups; + if (data.pipelineCount !== undefined) this.pipelineCount = data.pipelineCount; + if (data.pPipelines !== undefined) this.pPipelines = data.pPipelines; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsPipelineShaderGroupsCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get groupCount(): number { + return this.#view.getUint32(16, LE); + } + + set groupCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pGroups(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pGroups(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pipelineCount(): number { + return this.#view.getUint32(32, LE); + } + + set pipelineCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pPipelines(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pPipelines(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/GraphicsShaderGroupCreateInfoNV.ts b/api/struct/GraphicsShaderGroupCreateInfoNV.ts new file mode 100644 index 0000000..b7ba425 --- /dev/null +++ b/api/struct/GraphicsShaderGroupCreateInfoNV.ts @@ -0,0 +1,112 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PipelineShaderStageCreateInfo} from "./PipelineShaderStageCreateInfo.ts"; +import {PipelineVertexInputStateCreateInfo} from "./PipelineVertexInputStateCreateInfo.ts"; +import {PipelineTessellationStateCreateInfo} from "./PipelineTessellationStateCreateInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitGraphicsShaderGroupCreateInfoNV { + pNext?: AnyPointer; + stageCount?: number; + pStages?: AnyPointer; + pVertexInputState?: AnyPointer; + pTessellationState?: AnyPointer; +} + +export class GraphicsShaderGroupCreateInfoNV implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitGraphicsShaderGroupCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitGraphicsShaderGroupCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(GraphicsShaderGroupCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < GraphicsShaderGroupCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(GraphicsShaderGroupCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stageCount !== undefined) this.stageCount = data.stageCount; + if (data.pStages !== undefined) this.pStages = data.pStages; + if (data.pVertexInputState !== undefined) this.pVertexInputState = data.pVertexInputState; + if (data.pTessellationState !== undefined) this.pTessellationState = data.pTessellationState; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsShaderGroupCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.GRAPHICS_SHADER_GROUP_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stageCount(): number { + return this.#view.getUint32(16, LE); + } + + set stageCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pStages(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStages(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pVertexInputState(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pVertexInputState(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pTessellationState(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pTessellationState(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/HdrMetadataEXT.ts b/api/struct/HdrMetadataEXT.ts new file mode 100644 index 0000000..3e7512f --- /dev/null +++ b/api/struct/HdrMetadataEXT.ts @@ -0,0 +1,162 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {XYColorEXT} from "./XYColorEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitHdrMetadataEXT { + pNext?: AnyPointer; + displayPrimaryRed?: XYColorEXT; + displayPrimaryGreen?: XYColorEXT; + displayPrimaryBlue?: XYColorEXT; + whitePoint?: XYColorEXT; + maxLuminance?: number; + minLuminance?: number; + maxContentLightLevel?: number; + maxFrameAverageLightLevel?: number; +} + +export class HdrMetadataEXT implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitHdrMetadataEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitHdrMetadataEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(HdrMetadataEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < HdrMetadataEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(HdrMetadataEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.displayPrimaryRed !== undefined) this.displayPrimaryRed = data.displayPrimaryRed; + if (data.displayPrimaryGreen !== undefined) this.displayPrimaryGreen = data.displayPrimaryGreen; + if (data.displayPrimaryBlue !== undefined) this.displayPrimaryBlue = data.displayPrimaryBlue; + if (data.whitePoint !== undefined) this.whitePoint = data.whitePoint; + if (data.maxLuminance !== undefined) this.maxLuminance = data.maxLuminance; + if (data.minLuminance !== undefined) this.minLuminance = data.minLuminance; + if (data.maxContentLightLevel !== undefined) this.maxContentLightLevel = data.maxContentLightLevel; + if (data.maxFrameAverageLightLevel !== undefined) this.maxFrameAverageLightLevel = data.maxFrameAverageLightLevel; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, HdrMetadataEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.HDR_METADATA_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get displayPrimaryRed(): XYColorEXT { + return new XYColorEXT(this.#data.subarray(16, 16 + XYColorEXT.size)); + } + + set displayPrimaryRed(value: XYColorEXT) { + if (value[BUFFER].byteLength < XYColorEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get displayPrimaryGreen(): XYColorEXT { + return new XYColorEXT(this.#data.subarray(24, 24 + XYColorEXT.size)); + } + + set displayPrimaryGreen(value: XYColorEXT) { + if (value[BUFFER].byteLength < XYColorEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get displayPrimaryBlue(): XYColorEXT { + return new XYColorEXT(this.#data.subarray(32, 32 + XYColorEXT.size)); + } + + set displayPrimaryBlue(value: XYColorEXT) { + if (value[BUFFER].byteLength < XYColorEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get whitePoint(): XYColorEXT { + return new XYColorEXT(this.#data.subarray(40, 40 + XYColorEXT.size)); + } + + set whitePoint(value: XYColorEXT) { + if (value[BUFFER].byteLength < XYColorEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } + + get maxLuminance(): number { + return this.#view.getFloat32(48, LE); + } + + set maxLuminance(value: number) { + this.#view.setFloat32(48, Number(value), LE); + } + + get minLuminance(): number { + return this.#view.getFloat32(52, LE); + } + + set minLuminance(value: number) { + this.#view.setFloat32(52, Number(value), LE); + } + + get maxContentLightLevel(): number { + return this.#view.getFloat32(56, LE); + } + + set maxContentLightLevel(value: number) { + this.#view.setFloat32(56, Number(value), LE); + } + + get maxFrameAverageLightLevel(): number { + return this.#view.getFloat32(60, LE); + } + + set maxFrameAverageLightLevel(value: number) { + this.#view.setFloat32(60, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/HeadlessSurfaceCreateInfoEXT.ts b/api/struct/HeadlessSurfaceCreateInfoEXT.ts new file mode 100644 index 0000000..ddc65e6 --- /dev/null +++ b/api/struct/HeadlessSurfaceCreateInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { HeadlessSurfaceCreateFlagsEXT } from "../def.ts"; + +export interface InitHeadlessSurfaceCreateInfoEXT { + pNext?: AnyPointer; + flags?: HeadlessSurfaceCreateFlagsEXT; +} + +export class HeadlessSurfaceCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitHeadlessSurfaceCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitHeadlessSurfaceCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(HeadlessSurfaceCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < HeadlessSurfaceCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(HeadlessSurfaceCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, HeadlessSurfaceCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.HEADLESS_SURFACE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: HeadlessSurfaceCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/IOSSurfaceCreateInfoMVK.ts b/api/struct/IOSSurfaceCreateInfoMVK.ts new file mode 100644 index 0000000..5317a6a --- /dev/null +++ b/api/struct/IOSSurfaceCreateInfoMVK.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { IOSSurfaceCreateFlagsMVK } from "../def.ts"; + +export interface InitIOSSurfaceCreateInfoMVK { + pNext?: AnyPointer; + flags?: IOSSurfaceCreateFlagsMVK; + pView?: AnyPointer; +} + +export class IOSSurfaceCreateInfoMVK implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitIOSSurfaceCreateInfoMVK); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitIOSSurfaceCreateInfoMVK) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(IOSSurfaceCreateInfoMVK.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < IOSSurfaceCreateInfoMVK.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(IOSSurfaceCreateInfoMVK.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pView !== undefined) this.pView = data.pView; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IOSSurfaceCreateInfoMVK.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IOS_SURFACE_CREATE_INFO_MVK; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: IOSSurfaceCreateFlagsMVK) { + this.#view.setUint32(16, Number(value), LE); + } + + get pView(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pView(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageBlit.ts b/api/struct/ImageBlit.ts new file mode 100644 index 0000000..3293dbf --- /dev/null +++ b/api/struct/ImageBlit.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceLayers} from "./ImageSubresourceLayers.ts"; +import {Offset3D} from "./Offset3D.ts"; + +export interface InitImageBlit { + srcSubresource?: ImageSubresourceLayers; + srcOffsets?: Offset3D[]; + dstSubresource?: ImageSubresourceLayers; + dstOffsets?: Offset3D[]; +} + +export class ImageBlit implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageBlit); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageBlit) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageBlit.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageBlit.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageBlit.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; + if (data.srcOffsets !== undefined) this.srcOffsets = data.srcOffsets; + if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; + if (data.dstOffsets !== undefined) this.dstOffsets = data.dstOffsets; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageBlit.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get srcSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(0, 0 + ImageSubresourceLayers.size)); + } + + set srcSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get srcOffsets(): Offset3D[] { + const result: Offset3D[] = []; + for (let i = 0; i < 2; i++) { + result.push((() => { + return new Offset3D(this.#data.subarray(16 + i * 12, 16 + i * 12 + Offset3D.size)); + })()); + } + return result; + } + + set srcOffsets(value: Offset3D[]) { + for (let i = 0; i < value.length; i++) { + if (value[i][BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[i][BUFFER], 16 + i * 12); + } + } + + get dstSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(40, 40 + ImageSubresourceLayers.size)); + } + + set dstSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } + + get dstOffsets(): Offset3D[] { + const result: Offset3D[] = []; + for (let i = 0; i < 2; i++) { + result.push((() => { + return new Offset3D(this.#data.subarray(56 + i * 12, 56 + i * 12 + Offset3D.size)); + })()); + } + return result; + } + + set dstOffsets(value: Offset3D[]) { + for (let i = 0; i < value.length; i++) { + if (value[i][BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[i][BUFFER], 56 + i * 12); + } + } +} \ No newline at end of file diff --git a/api/struct/ImageBlit2.ts b/api/struct/ImageBlit2.ts new file mode 100644 index 0000000..2302ae6 --- /dev/null +++ b/api/struct/ImageBlit2.ts @@ -0,0 +1,139 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceLayers} from "./ImageSubresourceLayers.ts"; +import {Offset3D} from "./Offset3D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageBlit2 { + pNext?: AnyPointer; + srcSubresource?: ImageSubresourceLayers; + srcOffsets?: Offset3D[]; + dstSubresource?: ImageSubresourceLayers; + dstOffsets?: Offset3D[]; +} + +export class ImageBlit2 implements BaseStruct { + static size = 96; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageBlit2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageBlit2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageBlit2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageBlit2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageBlit2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; + if (data.srcOffsets !== undefined) this.srcOffsets = data.srcOffsets; + if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; + if (data.dstOffsets !== undefined) this.dstOffsets = data.dstOffsets; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageBlit2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_BLIT_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); + } + + set srcSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get srcOffsets(): Offset3D[] { + const result: Offset3D[] = []; + for (let i = 0; i < 2; i++) { + result.push((() => { + return new Offset3D(this.#data.subarray(32 + i * 12, 32 + i * 12 + Offset3D.size)); + })()); + } + return result; + } + + set srcOffsets(value: Offset3D[]) { + for (let i = 0; i < value.length; i++) { + if (value[i][BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[i][BUFFER], 32 + i * 12); + } + } + + get dstSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(56, 56 + ImageSubresourceLayers.size)); + } + + set dstSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 56); + } + + get dstOffsets(): Offset3D[] { + const result: Offset3D[] = []; + for (let i = 0; i < 2; i++) { + result.push((() => { + return new Offset3D(this.#data.subarray(72 + i * 12, 72 + i * 12 + Offset3D.size)); + })()); + } + return result; + } + + set dstOffsets(value: Offset3D[]) { + for (let i = 0; i < value.length; i++) { + if (value[i][BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[i][BUFFER], 72 + i * 12); + } + } +} \ No newline at end of file diff --git a/api/struct/ImageBlit2KHR.ts b/api/struct/ImageBlit2KHR.ts new file mode 100644 index 0000000..eb47e79 --- /dev/null +++ b/api/struct/ImageBlit2KHR.ts @@ -0,0 +1,2 @@ + import { ImageBlit2 } from "./ImageBlit2.ts"; + export type ImageBlit2KHR = ImageBlit2; \ No newline at end of file diff --git a/api/struct/ImageCaptureDescriptorDataInfoEXT.ts b/api/struct/ImageCaptureDescriptorDataInfoEXT.ts new file mode 100644 index 0000000..62c47a9 --- /dev/null +++ b/api/struct/ImageCaptureDescriptorDataInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Image } from "../def.ts"; + +export interface InitImageCaptureDescriptorDataInfoEXT { + pNext?: AnyPointer; + image?: Image; +} + +export class ImageCaptureDescriptorDataInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageCaptureDescriptorDataInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageCaptureDescriptorDataInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageCaptureDescriptorDataInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.image !== undefined) this.image = data.image; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCaptureDescriptorDataInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageCompressionControlEXT.ts b/api/struct/ImageCompressionControlEXT.ts new file mode 100644 index 0000000..4652e3b --- /dev/null +++ b/api/struct/ImageCompressionControlEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ImageCompressionFlagsEXT, ImageCompressionFixedRateFlagsEXT } from "../def.ts"; + +export interface InitImageCompressionControlEXT { + pNext?: AnyPointer; + flags?: ImageCompressionFlagsEXT; + compressionControlPlaneCount?: number; + pFixedRateFlags?: AnyPointer; +} + +export class ImageCompressionControlEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageCompressionControlEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageCompressionControlEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageCompressionControlEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageCompressionControlEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageCompressionControlEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.compressionControlPlaneCount !== undefined) this.compressionControlPlaneCount = data.compressionControlPlaneCount; + if (data.pFixedRateFlags !== undefined) this.pFixedRateFlags = data.pFixedRateFlags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCompressionControlEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_COMPRESSION_CONTROL_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: ImageCompressionFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get compressionControlPlaneCount(): number { + return this.#view.getUint32(20, LE); + } + + set compressionControlPlaneCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pFixedRateFlags(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pFixedRateFlags(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageCompressionPropertiesEXT.ts b/api/struct/ImageCompressionPropertiesEXT.ts new file mode 100644 index 0000000..656096b --- /dev/null +++ b/api/struct/ImageCompressionPropertiesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ImageCompressionFlagsEXT, ImageCompressionFixedRateFlagsEXT } from "../def.ts"; + +export interface InitImageCompressionPropertiesEXT { + pNext?: AnyPointer; + imageCompressionFlags?: ImageCompressionFlagsEXT; + imageCompressionFixedRateFlags?: ImageCompressionFixedRateFlagsEXT; +} + +export class ImageCompressionPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageCompressionPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageCompressionPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageCompressionPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageCompressionPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageCompressionPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageCompressionFlags !== undefined) this.imageCompressionFlags = data.imageCompressionFlags; + if (data.imageCompressionFixedRateFlags !== undefined) this.imageCompressionFixedRateFlags = data.imageCompressionFixedRateFlags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCompressionPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_COMPRESSION_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageCompressionFlags(): number { + return this.#view.getUint32(16, LE); + } + + set imageCompressionFlags(value: ImageCompressionFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get imageCompressionFixedRateFlags(): number { + return this.#view.getUint32(20, LE); + } + + set imageCompressionFixedRateFlags(value: ImageCompressionFixedRateFlagsEXT) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageConstraintsInfoFUCHSIA.ts b/api/struct/ImageConstraintsInfoFUCHSIA.ts new file mode 100644 index 0000000..6af5956 --- /dev/null +++ b/api/struct/ImageConstraintsInfoFUCHSIA.ts @@ -0,0 +1,115 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageFormatConstraintsInfoFUCHSIA} from "./ImageFormatConstraintsInfoFUCHSIA.ts"; +import {BufferCollectionConstraintsInfoFUCHSIA} from "./BufferCollectionConstraintsInfoFUCHSIA.ts"; +import { StructureType } from "../enum.ts"; +import { ImageConstraintsInfoFlagsFUCHSIA } from "../def.ts"; + +export interface InitImageConstraintsInfoFUCHSIA { + pNext?: AnyPointer; + formatConstraintsCount?: number; + pFormatConstraints?: AnyPointer; + bufferCollectionConstraints?: BufferCollectionConstraintsInfoFUCHSIA; + flags?: ImageConstraintsInfoFlagsFUCHSIA; +} + +export class ImageConstraintsInfoFUCHSIA implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageConstraintsInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageConstraintsInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageConstraintsInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageConstraintsInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageConstraintsInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.formatConstraintsCount !== undefined) this.formatConstraintsCount = data.formatConstraintsCount; + if (data.pFormatConstraints !== undefined) this.pFormatConstraints = data.pFormatConstraints; + if (data.bufferCollectionConstraints !== undefined) this.bufferCollectionConstraints = data.bufferCollectionConstraints; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageConstraintsInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_CONSTRAINTS_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get formatConstraintsCount(): number { + return this.#view.getUint32(16, LE); + } + + set formatConstraintsCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pFormatConstraints(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pFormatConstraints(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get bufferCollectionConstraints(): BufferCollectionConstraintsInfoFUCHSIA { + return new BufferCollectionConstraintsInfoFUCHSIA(this.#data.subarray(32, 32 + BufferCollectionConstraintsInfoFUCHSIA.size)); + } + + set bufferCollectionConstraints(value: BufferCollectionConstraintsInfoFUCHSIA) { + if (value[BUFFER].byteLength < BufferCollectionConstraintsInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get flags(): number { + return this.#view.getUint32(72, LE); + } + + set flags(value: ImageConstraintsInfoFlagsFUCHSIA) { + this.#view.setUint32(72, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageCopy.ts b/api/struct/ImageCopy.ts new file mode 100644 index 0000000..20ad35e --- /dev/null +++ b/api/struct/ImageCopy.ts @@ -0,0 +1,117 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceLayers} from "./ImageSubresourceLayers.ts"; +import {Offset3D} from "./Offset3D.ts"; +import {Extent3D} from "./Extent3D.ts"; + +export interface InitImageCopy { + srcSubresource?: ImageSubresourceLayers; + srcOffset?: Offset3D; + dstSubresource?: ImageSubresourceLayers; + dstOffset?: Offset3D; + extent?: Extent3D; +} + +export class ImageCopy implements BaseStruct { + static size = 68; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageCopy); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageCopy) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageCopy.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageCopy.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageCopy.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; + if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; + if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; + if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; + if (data.extent !== undefined) this.extent = data.extent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCopy.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get srcSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(0, 0 + ImageSubresourceLayers.size)); + } + + set srcSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get srcOffset(): Offset3D { + return new Offset3D(this.#data.subarray(16, 16 + Offset3D.size)); + } + + set srcOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get dstSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(28, 28 + ImageSubresourceLayers.size)); + } + + set dstSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 28); + } + + get dstOffset(): Offset3D { + return new Offset3D(this.#data.subarray(44, 44 + Offset3D.size)); + } + + set dstOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 44); + } + + get extent(): Extent3D { + return new Extent3D(this.#data.subarray(56, 56 + Extent3D.size)); + } + + set extent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 56); + } +} \ No newline at end of file diff --git a/api/struct/ImageCopy2.ts b/api/struct/ImageCopy2.ts new file mode 100644 index 0000000..b15f2be --- /dev/null +++ b/api/struct/ImageCopy2.ts @@ -0,0 +1,137 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceLayers} from "./ImageSubresourceLayers.ts"; +import {Offset3D} from "./Offset3D.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageCopy2 { + pNext?: AnyPointer; + srcSubresource?: ImageSubresourceLayers; + srcOffset?: Offset3D; + dstSubresource?: ImageSubresourceLayers; + dstOffset?: Offset3D; + extent?: Extent3D; +} + +export class ImageCopy2 implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageCopy2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageCopy2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageCopy2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageCopy2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageCopy2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; + if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; + if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; + if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; + if (data.extent !== undefined) this.extent = data.extent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCopy2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_COPY_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); + } + + set srcSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get srcOffset(): Offset3D { + return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); + } + + set srcOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get dstSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(44, 44 + ImageSubresourceLayers.size)); + } + + set dstSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 44); + } + + get dstOffset(): Offset3D { + return new Offset3D(this.#data.subarray(60, 60 + Offset3D.size)); + } + + set dstOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 60); + } + + get extent(): Extent3D { + return new Extent3D(this.#data.subarray(72, 72 + Extent3D.size)); + } + + set extent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 72); + } +} \ No newline at end of file diff --git a/api/struct/ImageCopy2KHR.ts b/api/struct/ImageCopy2KHR.ts new file mode 100644 index 0000000..a9479c3 --- /dev/null +++ b/api/struct/ImageCopy2KHR.ts @@ -0,0 +1,2 @@ + import { ImageCopy2 } from "./ImageCopy2.ts"; + export type ImageCopy2KHR = ImageCopy2; \ No newline at end of file diff --git a/api/struct/ImageCreateInfo.ts b/api/struct/ImageCreateInfo.ts new file mode 100644 index 0000000..c7d0455 --- /dev/null +++ b/api/struct/ImageCreateInfo.ts @@ -0,0 +1,204 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { StructureType, ImageType, Format, SampleCountFlagBits, ImageTiling, SharingMode, ImageLayout } from "../enum.ts"; +import { ImageCreateFlags, ImageUsageFlags } from "../def.ts"; + +export interface InitImageCreateInfo { + pNext?: AnyPointer; + flags?: ImageCreateFlags; + imageType?: ImageType; + format?: Format; + extent?: Extent3D; + mipLevels?: number; + arrayLayers?: number; + samples?: SampleCountFlagBits; + tiling?: ImageTiling; + usage?: ImageUsageFlags; + sharingMode?: SharingMode; + queueFamilyIndexCount?: number; + pQueueFamilyIndices?: AnyPointer; + initialLayout?: ImageLayout; +} + +export class ImageCreateInfo implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.imageType !== undefined) this.imageType = data.imageType; + if (data.format !== undefined) this.format = data.format; + if (data.extent !== undefined) this.extent = data.extent; + if (data.mipLevels !== undefined) this.mipLevels = data.mipLevels; + if (data.arrayLayers !== undefined) this.arrayLayers = data.arrayLayers; + if (data.samples !== undefined) this.samples = data.samples; + if (data.tiling !== undefined) this.tiling = data.tiling; + if (data.usage !== undefined) this.usage = data.usage; + if (data.sharingMode !== undefined) this.sharingMode = data.sharingMode; + if (data.queueFamilyIndexCount !== undefined) this.queueFamilyIndexCount = data.queueFamilyIndexCount; + if (data.pQueueFamilyIndices !== undefined) this.pQueueFamilyIndices = data.pQueueFamilyIndices; + if (data.initialLayout !== undefined) this.initialLayout = data.initialLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: ImageCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get imageType(): number { + return this.#view.getUint32(20, LE); + } + + set imageType(value: ImageType) { + this.#view.setUint32(20, Number(value), LE); + } + + get format(): number { + return this.#view.getUint32(24, LE); + } + + set format(value: Format) { + this.#view.setUint32(24, Number(value), LE); + } + + get extent(): Extent3D { + return new Extent3D(this.#data.subarray(28, 28 + Extent3D.size)); + } + + set extent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 28); + } + + get mipLevels(): number { + return this.#view.getUint32(40, LE); + } + + set mipLevels(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get arrayLayers(): number { + return this.#view.getUint32(44, LE); + } + + set arrayLayers(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get samples(): number { + return this.#view.getUint32(48, LE); + } + + set samples(value: SampleCountFlagBits) { + this.#view.setUint32(48, Number(value), LE); + } + + get tiling(): number { + return this.#view.getUint32(52, LE); + } + + set tiling(value: ImageTiling) { + this.#view.setUint32(52, Number(value), LE); + } + + get usage(): number { + return this.#view.getUint32(56, LE); + } + + set usage(value: ImageUsageFlags) { + this.#view.setUint32(56, Number(value), LE); + } + + get sharingMode(): number { + return this.#view.getUint32(60, LE); + } + + set sharingMode(value: SharingMode) { + this.#view.setUint32(60, Number(value), LE); + } + + get queueFamilyIndexCount(): number { + return this.#view.getUint32(64, LE); + } + + set queueFamilyIndexCount(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get pQueueFamilyIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set pQueueFamilyIndices(value: AnyPointer) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } + + get initialLayout(): number { + return this.#view.getUint32(80, LE); + } + + set initialLayout(value: ImageLayout) { + this.#view.setUint32(80, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageDrmFormatModifierExplicitCreateInfoEXT.ts b/api/struct/ImageDrmFormatModifierExplicitCreateInfoEXT.ts new file mode 100644 index 0000000..fd863b9 --- /dev/null +++ b/api/struct/ImageDrmFormatModifierExplicitCreateInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SubresourceLayout} from "./SubresourceLayout.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageDrmFormatModifierExplicitCreateInfoEXT { + pNext?: AnyPointer; + drmFormatModifier?: number | bigint; + drmFormatModifierPlaneCount?: number; + pPlaneLayouts?: AnyPointer; +} + +export class ImageDrmFormatModifierExplicitCreateInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageDrmFormatModifierExplicitCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageDrmFormatModifierExplicitCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageDrmFormatModifierExplicitCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageDrmFormatModifierExplicitCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageDrmFormatModifierExplicitCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; + if (data.drmFormatModifierPlaneCount !== undefined) this.drmFormatModifierPlaneCount = data.drmFormatModifierPlaneCount; + if (data.pPlaneLayouts !== undefined) this.pPlaneLayouts = data.pPlaneLayouts; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageDrmFormatModifierExplicitCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get drmFormatModifier(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set drmFormatModifier(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get drmFormatModifierPlaneCount(): number { + return this.#view.getUint32(24, LE); + } + + set drmFormatModifierPlaneCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pPlaneLayouts(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pPlaneLayouts(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageDrmFormatModifierListCreateInfoEXT.ts b/api/struct/ImageDrmFormatModifierListCreateInfoEXT.ts new file mode 100644 index 0000000..84236d9 --- /dev/null +++ b/api/struct/ImageDrmFormatModifierListCreateInfoEXT.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageDrmFormatModifierListCreateInfoEXT { + pNext?: AnyPointer; + drmFormatModifierCount?: number; + pDrmFormatModifiers?: AnyPointer; +} + +export class ImageDrmFormatModifierListCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageDrmFormatModifierListCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageDrmFormatModifierListCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageDrmFormatModifierListCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageDrmFormatModifierListCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageDrmFormatModifierListCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.drmFormatModifierCount !== undefined) this.drmFormatModifierCount = data.drmFormatModifierCount; + if (data.pDrmFormatModifiers !== undefined) this.pDrmFormatModifiers = data.pDrmFormatModifiers; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageDrmFormatModifierListCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get drmFormatModifierCount(): number { + return this.#view.getUint32(16, LE); + } + + set drmFormatModifierCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pDrmFormatModifiers(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDrmFormatModifiers(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageDrmFormatModifierPropertiesEXT.ts b/api/struct/ImageDrmFormatModifierPropertiesEXT.ts new file mode 100644 index 0000000..52b9243 --- /dev/null +++ b/api/struct/ImageDrmFormatModifierPropertiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageDrmFormatModifierPropertiesEXT { + pNext?: AnyPointer; + drmFormatModifier?: number | bigint; +} + +export class ImageDrmFormatModifierPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageDrmFormatModifierPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageDrmFormatModifierPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageDrmFormatModifierPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageDrmFormatModifierPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageDrmFormatModifierPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageDrmFormatModifierPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get drmFormatModifier(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set drmFormatModifier(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageFormatConstraintsInfoFUCHSIA.ts b/api/struct/ImageFormatConstraintsInfoFUCHSIA.ts new file mode 100644 index 0000000..59921da --- /dev/null +++ b/api/struct/ImageFormatConstraintsInfoFUCHSIA.ts @@ -0,0 +1,135 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageCreateInfo} from "./ImageCreateInfo.ts"; +import {SysmemColorSpaceFUCHSIA} from "./SysmemColorSpaceFUCHSIA.ts"; +import { StructureType } from "../enum.ts"; +import { FormatFeatureFlags, ImageFormatConstraintsFlagsFUCHSIA } from "../def.ts"; + +export interface InitImageFormatConstraintsInfoFUCHSIA { + pNext?: AnyPointer; + imageCreateInfo?: ImageCreateInfo; + requiredFormatFeatures?: FormatFeatureFlags; + flags?: ImageFormatConstraintsFlagsFUCHSIA; + sysmemPixelFormat?: number | bigint; + colorSpaceCount?: number; + pColorSpaces?: AnyPointer; +} + +export class ImageFormatConstraintsInfoFUCHSIA implements BaseStruct { + static size = 136; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageFormatConstraintsInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageFormatConstraintsInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageFormatConstraintsInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageFormatConstraintsInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageFormatConstraintsInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageCreateInfo !== undefined) this.imageCreateInfo = data.imageCreateInfo; + if (data.requiredFormatFeatures !== undefined) this.requiredFormatFeatures = data.requiredFormatFeatures; + if (data.flags !== undefined) this.flags = data.flags; + if (data.sysmemPixelFormat !== undefined) this.sysmemPixelFormat = data.sysmemPixelFormat; + if (data.colorSpaceCount !== undefined) this.colorSpaceCount = data.colorSpaceCount; + if (data.pColorSpaces !== undefined) this.pColorSpaces = data.pColorSpaces; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatConstraintsInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageCreateInfo(): ImageCreateInfo { + return new ImageCreateInfo(this.#data.subarray(16, 16 + ImageCreateInfo.size)); + } + + set imageCreateInfo(value: ImageCreateInfo) { + if (value[BUFFER].byteLength < ImageCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get requiredFormatFeatures(): number { + return this.#view.getUint32(104, LE); + } + + set requiredFormatFeatures(value: FormatFeatureFlags) { + this.#view.setUint32(104, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(108, LE); + } + + set flags(value: ImageFormatConstraintsFlagsFUCHSIA) { + this.#view.setUint32(108, Number(value), LE); + } + + get sysmemPixelFormat(): bigint { + return this.#view.getBigUint64(112, LE); + } + + set sysmemPixelFormat(value: number | bigint) { + this.#view.setBigUint64(112, BigInt(value), LE); + } + + get colorSpaceCount(): number { + return this.#view.getUint32(120, LE); + } + + set colorSpaceCount(value: number) { + this.#view.setUint32(120, Number(value), LE); + } + + get pColorSpaces(): Deno.PointerValue { + return pointerFromView(this.#view, 128, LE); + } + + set pColorSpaces(value: AnyPointer) { + this.#view.setBigUint64(128, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageFormatListCreateInfo.ts b/api/struct/ImageFormatListCreateInfo.ts new file mode 100644 index 0000000..a6dd24d --- /dev/null +++ b/api/struct/ImageFormatListCreateInfo.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format } from "../enum.ts"; + +export interface InitImageFormatListCreateInfo { + pNext?: AnyPointer; + viewFormatCount?: number; + pViewFormats?: AnyPointer; +} + +export class ImageFormatListCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageFormatListCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageFormatListCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageFormatListCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageFormatListCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageFormatListCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.viewFormatCount !== undefined) this.viewFormatCount = data.viewFormatCount; + if (data.pViewFormats !== undefined) this.pViewFormats = data.pViewFormats; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatListCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_FORMAT_LIST_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get viewFormatCount(): number { + return this.#view.getUint32(16, LE); + } + + set viewFormatCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pViewFormats(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pViewFormats(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageFormatListCreateInfoKHR.ts b/api/struct/ImageFormatListCreateInfoKHR.ts new file mode 100644 index 0000000..f8c54bc --- /dev/null +++ b/api/struct/ImageFormatListCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { ImageFormatListCreateInfo } from "./ImageFormatListCreateInfo.ts"; + export type ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo; \ No newline at end of file diff --git a/api/struct/ImageFormatProperties.ts b/api/struct/ImageFormatProperties.ts new file mode 100644 index 0000000..e119745 --- /dev/null +++ b/api/struct/ImageFormatProperties.ts @@ -0,0 +1,104 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { SampleCountFlags, DeviceSize } from "../def.ts"; + +export interface InitImageFormatProperties { + maxExtent?: Extent3D; + maxMipLevels?: number; + maxArrayLayers?: number; + sampleCounts?: SampleCountFlags; + maxResourceSize?: DeviceSize; +} + +export class ImageFormatProperties implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageFormatProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageFormatProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageFormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageFormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageFormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.maxExtent !== undefined) this.maxExtent = data.maxExtent; + if (data.maxMipLevels !== undefined) this.maxMipLevels = data.maxMipLevels; + if (data.maxArrayLayers !== undefined) this.maxArrayLayers = data.maxArrayLayers; + if (data.sampleCounts !== undefined) this.sampleCounts = data.sampleCounts; + if (data.maxResourceSize !== undefined) this.maxResourceSize = data.maxResourceSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get maxExtent(): Extent3D { + return new Extent3D(this.#data.subarray(0, 0 + Extent3D.size)); + } + + set maxExtent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get maxMipLevels(): number { + return this.#view.getUint32(12, LE); + } + + set maxMipLevels(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get maxArrayLayers(): number { + return this.#view.getUint32(16, LE); + } + + set maxArrayLayers(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get sampleCounts(): number { + return this.#view.getUint32(20, LE); + } + + set sampleCounts(value: SampleCountFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxResourceSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set maxResourceSize(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageFormatProperties2.ts b/api/struct/ImageFormatProperties2.ts new file mode 100644 index 0000000..5196c0b --- /dev/null +++ b/api/struct/ImageFormatProperties2.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageFormatProperties} from "./ImageFormatProperties.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageFormatProperties2 { + pNext?: AnyPointer; + imageFormatProperties?: ImageFormatProperties; +} + +export class ImageFormatProperties2 implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageFormatProperties2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageFormatProperties2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageFormatProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageFormatProperties2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageFormatProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageFormatProperties !== undefined) this.imageFormatProperties = data.imageFormatProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatProperties2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_FORMAT_PROPERTIES_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageFormatProperties(): ImageFormatProperties { + return new ImageFormatProperties(this.#data.subarray(16, 16 + ImageFormatProperties.size)); + } + + set imageFormatProperties(value: ImageFormatProperties) { + if (value[BUFFER].byteLength < ImageFormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/ImageFormatProperties2KHR.ts b/api/struct/ImageFormatProperties2KHR.ts new file mode 100644 index 0000000..b73815b --- /dev/null +++ b/api/struct/ImageFormatProperties2KHR.ts @@ -0,0 +1,2 @@ + import { ImageFormatProperties2 } from "./ImageFormatProperties2.ts"; + export type ImageFormatProperties2KHR = ImageFormatProperties2; \ No newline at end of file diff --git a/api/struct/ImageMemoryBarrier.ts b/api/struct/ImageMemoryBarrier.ts new file mode 100644 index 0000000..28c49fe --- /dev/null +++ b/api/struct/ImageMemoryBarrier.ts @@ -0,0 +1,154 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceRange} from "./ImageSubresourceRange.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; +import { AccessFlags, Image } from "../def.ts"; + +export interface InitImageMemoryBarrier { + pNext?: AnyPointer; + srcAccessMask?: AccessFlags; + dstAccessMask?: AccessFlags; + oldLayout?: ImageLayout; + newLayout?: ImageLayout; + srcQueueFamilyIndex?: number; + dstQueueFamilyIndex?: number; + image?: Image; + subresourceRange?: ImageSubresourceRange; +} + +export class ImageMemoryBarrier implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageMemoryBarrier); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageMemoryBarrier) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageMemoryBarrier.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageMemoryBarrier.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageMemoryBarrier.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; + if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; + if (data.oldLayout !== undefined) this.oldLayout = data.oldLayout; + if (data.newLayout !== undefined) this.newLayout = data.newLayout; + if (data.srcQueueFamilyIndex !== undefined) this.srcQueueFamilyIndex = data.srcQueueFamilyIndex; + if (data.dstQueueFamilyIndex !== undefined) this.dstQueueFamilyIndex = data.dstQueueFamilyIndex; + if (data.image !== undefined) this.image = data.image; + if (data.subresourceRange !== undefined) this.subresourceRange = data.subresourceRange; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageMemoryBarrier.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_MEMORY_BARRIER; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcAccessMask(): number { + return this.#view.getUint32(16, LE); + } + + set srcAccessMask(value: AccessFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get dstAccessMask(): number { + return this.#view.getUint32(20, LE); + } + + set dstAccessMask(value: AccessFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get oldLayout(): number { + return this.#view.getUint32(24, LE); + } + + set oldLayout(value: ImageLayout) { + this.#view.setUint32(24, Number(value), LE); + } + + get newLayout(): number { + return this.#view.getUint32(28, LE); + } + + set newLayout(value: ImageLayout) { + this.#view.setUint32(28, Number(value), LE); + } + + get srcQueueFamilyIndex(): number { + return this.#view.getUint32(32, LE); + } + + set srcQueueFamilyIndex(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get dstQueueFamilyIndex(): number { + return this.#view.getUint32(36, LE); + } + + set dstQueueFamilyIndex(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get subresourceRange(): ImageSubresourceRange { + return new ImageSubresourceRange(this.#data.subarray(48, 48 + ImageSubresourceRange.size)); + } + + set subresourceRange(value: ImageSubresourceRange) { + if (value[BUFFER].byteLength < ImageSubresourceRange.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 48); + } +} \ No newline at end of file diff --git a/api/struct/ImageMemoryBarrier2.ts b/api/struct/ImageMemoryBarrier2.ts new file mode 100644 index 0000000..4805b2f --- /dev/null +++ b/api/struct/ImageMemoryBarrier2.ts @@ -0,0 +1,174 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceRange} from "./ImageSubresourceRange.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; +import { PipelineStageFlags2, AccessFlags2, Image } from "../def.ts"; + +export interface InitImageMemoryBarrier2 { + pNext?: AnyPointer; + srcStageMask?: PipelineStageFlags2; + srcAccessMask?: AccessFlags2; + dstStageMask?: PipelineStageFlags2; + dstAccessMask?: AccessFlags2; + oldLayout?: ImageLayout; + newLayout?: ImageLayout; + srcQueueFamilyIndex?: number; + dstQueueFamilyIndex?: number; + image?: Image; + subresourceRange?: ImageSubresourceRange; +} + +export class ImageMemoryBarrier2 implements BaseStruct { + static size = 96; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageMemoryBarrier2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageMemoryBarrier2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageMemoryBarrier2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageMemoryBarrier2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageMemoryBarrier2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; + if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; + if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; + if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; + if (data.oldLayout !== undefined) this.oldLayout = data.oldLayout; + if (data.newLayout !== undefined) this.newLayout = data.newLayout; + if (data.srcQueueFamilyIndex !== undefined) this.srcQueueFamilyIndex = data.srcQueueFamilyIndex; + if (data.dstQueueFamilyIndex !== undefined) this.dstQueueFamilyIndex = data.dstQueueFamilyIndex; + if (data.image !== undefined) this.image = data.image; + if (data.subresourceRange !== undefined) this.subresourceRange = data.subresourceRange; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageMemoryBarrier2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_MEMORY_BARRIER_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcStageMask(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set srcStageMask(value: PipelineStageFlags2) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get srcAccessMask(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set srcAccessMask(value: AccessFlags2) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get dstStageMask(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set dstStageMask(value: PipelineStageFlags2) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get dstAccessMask(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set dstAccessMask(value: AccessFlags2) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get oldLayout(): number { + return this.#view.getUint32(48, LE); + } + + set oldLayout(value: ImageLayout) { + this.#view.setUint32(48, Number(value), LE); + } + + get newLayout(): number { + return this.#view.getUint32(52, LE); + } + + set newLayout(value: ImageLayout) { + this.#view.setUint32(52, Number(value), LE); + } + + get srcQueueFamilyIndex(): number { + return this.#view.getUint32(56, LE); + } + + set srcQueueFamilyIndex(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get dstQueueFamilyIndex(): number { + return this.#view.getUint32(60, LE); + } + + set dstQueueFamilyIndex(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } + + get subresourceRange(): ImageSubresourceRange { + return new ImageSubresourceRange(this.#data.subarray(72, 72 + ImageSubresourceRange.size)); + } + + set subresourceRange(value: ImageSubresourceRange) { + if (value[BUFFER].byteLength < ImageSubresourceRange.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 72); + } +} \ No newline at end of file diff --git a/api/struct/ImageMemoryBarrier2KHR.ts b/api/struct/ImageMemoryBarrier2KHR.ts new file mode 100644 index 0000000..5c74805 --- /dev/null +++ b/api/struct/ImageMemoryBarrier2KHR.ts @@ -0,0 +1,2 @@ + import { ImageMemoryBarrier2 } from "./ImageMemoryBarrier2.ts"; + export type ImageMemoryBarrier2KHR = ImageMemoryBarrier2; \ No newline at end of file diff --git a/api/struct/ImageMemoryRequirementsInfo2.ts b/api/struct/ImageMemoryRequirementsInfo2.ts new file mode 100644 index 0000000..194728e --- /dev/null +++ b/api/struct/ImageMemoryRequirementsInfo2.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Image } from "../def.ts"; + +export interface InitImageMemoryRequirementsInfo2 { + pNext?: AnyPointer; + image?: Image; +} + +export class ImageMemoryRequirementsInfo2 implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageMemoryRequirementsInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageMemoryRequirementsInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageMemoryRequirementsInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageMemoryRequirementsInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageMemoryRequirementsInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.image !== undefined) this.image = data.image; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageMemoryRequirementsInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_MEMORY_REQUIREMENTS_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageMemoryRequirementsInfo2KHR.ts b/api/struct/ImageMemoryRequirementsInfo2KHR.ts new file mode 100644 index 0000000..8f2db2d --- /dev/null +++ b/api/struct/ImageMemoryRequirementsInfo2KHR.ts @@ -0,0 +1,2 @@ + import { ImageMemoryRequirementsInfo2 } from "./ImageMemoryRequirementsInfo2.ts"; + export type ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2; \ No newline at end of file diff --git a/api/struct/ImagePipeSurfaceCreateInfoFUCHSIA.ts b/api/struct/ImagePipeSurfaceCreateInfoFUCHSIA.ts new file mode 100644 index 0000000..c6e17d5 --- /dev/null +++ b/api/struct/ImagePipeSurfaceCreateInfoFUCHSIA.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ImagePipeSurfaceCreateFlagsFUCHSIA } from "../def.ts"; + +export interface InitImagePipeSurfaceCreateInfoFUCHSIA { + pNext?: AnyPointer; + flags?: ImagePipeSurfaceCreateFlagsFUCHSIA; + imagePipeHandle?: Deno.PointerValue; +} + +export class ImagePipeSurfaceCreateInfoFUCHSIA implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImagePipeSurfaceCreateInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImagePipeSurfaceCreateInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImagePipeSurfaceCreateInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImagePipeSurfaceCreateInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImagePipeSurfaceCreateInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.imagePipeHandle !== undefined) this.imagePipeHandle = data.imagePipeHandle; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImagePipeSurfaceCreateInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: ImagePipeSurfaceCreateFlagsFUCHSIA) { + this.#view.setUint32(16, Number(value), LE); + } + + get imagePipeHandle(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set imagePipeHandle(value: Deno.PointerValue) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImagePlaneMemoryRequirementsInfo.ts b/api/struct/ImagePlaneMemoryRequirementsInfo.ts new file mode 100644 index 0000000..57f99be --- /dev/null +++ b/api/struct/ImagePlaneMemoryRequirementsInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageAspectFlagBits } from "../enum.ts"; + +export interface InitImagePlaneMemoryRequirementsInfo { + pNext?: AnyPointer; + planeAspect?: ImageAspectFlagBits; +} + +export class ImagePlaneMemoryRequirementsInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImagePlaneMemoryRequirementsInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImagePlaneMemoryRequirementsInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImagePlaneMemoryRequirementsInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImagePlaneMemoryRequirementsInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImagePlaneMemoryRequirementsInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.planeAspect !== undefined) this.planeAspect = data.planeAspect; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImagePlaneMemoryRequirementsInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get planeAspect(): number { + return this.#view.getUint32(16, LE); + } + + set planeAspect(value: ImageAspectFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImagePlaneMemoryRequirementsInfoKHR.ts b/api/struct/ImagePlaneMemoryRequirementsInfoKHR.ts new file mode 100644 index 0000000..e4be6db --- /dev/null +++ b/api/struct/ImagePlaneMemoryRequirementsInfoKHR.ts @@ -0,0 +1,2 @@ + import { ImagePlaneMemoryRequirementsInfo } from "./ImagePlaneMemoryRequirementsInfo.ts"; + export type ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo; \ No newline at end of file diff --git a/api/struct/ImageResolve.ts b/api/struct/ImageResolve.ts new file mode 100644 index 0000000..f7eb64e --- /dev/null +++ b/api/struct/ImageResolve.ts @@ -0,0 +1,117 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceLayers} from "./ImageSubresourceLayers.ts"; +import {Offset3D} from "./Offset3D.ts"; +import {Extent3D} from "./Extent3D.ts"; + +export interface InitImageResolve { + srcSubresource?: ImageSubresourceLayers; + srcOffset?: Offset3D; + dstSubresource?: ImageSubresourceLayers; + dstOffset?: Offset3D; + extent?: Extent3D; +} + +export class ImageResolve implements BaseStruct { + static size = 68; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageResolve); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageResolve) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageResolve.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageResolve.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageResolve.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; + if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; + if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; + if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; + if (data.extent !== undefined) this.extent = data.extent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageResolve.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get srcSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(0, 0 + ImageSubresourceLayers.size)); + } + + set srcSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get srcOffset(): Offset3D { + return new Offset3D(this.#data.subarray(16, 16 + Offset3D.size)); + } + + set srcOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get dstSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(28, 28 + ImageSubresourceLayers.size)); + } + + set dstSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 28); + } + + get dstOffset(): Offset3D { + return new Offset3D(this.#data.subarray(44, 44 + Offset3D.size)); + } + + set dstOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 44); + } + + get extent(): Extent3D { + return new Extent3D(this.#data.subarray(56, 56 + Extent3D.size)); + } + + set extent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 56); + } +} \ No newline at end of file diff --git a/api/struct/ImageResolve2.ts b/api/struct/ImageResolve2.ts new file mode 100644 index 0000000..ad32998 --- /dev/null +++ b/api/struct/ImageResolve2.ts @@ -0,0 +1,137 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresourceLayers} from "./ImageSubresourceLayers.ts"; +import {Offset3D} from "./Offset3D.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageResolve2 { + pNext?: AnyPointer; + srcSubresource?: ImageSubresourceLayers; + srcOffset?: Offset3D; + dstSubresource?: ImageSubresourceLayers; + dstOffset?: Offset3D; + extent?: Extent3D; +} + +export class ImageResolve2 implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageResolve2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageResolve2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageResolve2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageResolve2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageResolve2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; + if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; + if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; + if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; + if (data.extent !== undefined) this.extent = data.extent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageResolve2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_RESOLVE_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); + } + + set srcSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get srcOffset(): Offset3D { + return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); + } + + set srcOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get dstSubresource(): ImageSubresourceLayers { + return new ImageSubresourceLayers(this.#data.subarray(44, 44 + ImageSubresourceLayers.size)); + } + + set dstSubresource(value: ImageSubresourceLayers) { + if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 44); + } + + get dstOffset(): Offset3D { + return new Offset3D(this.#data.subarray(60, 60 + Offset3D.size)); + } + + set dstOffset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 60); + } + + get extent(): Extent3D { + return new Extent3D(this.#data.subarray(72, 72 + Extent3D.size)); + } + + set extent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 72); + } +} \ No newline at end of file diff --git a/api/struct/ImageResolve2KHR.ts b/api/struct/ImageResolve2KHR.ts new file mode 100644 index 0000000..c32956c --- /dev/null +++ b/api/struct/ImageResolve2KHR.ts @@ -0,0 +1,2 @@ + import { ImageResolve2 } from "./ImageResolve2.ts"; + export type ImageResolve2KHR = ImageResolve2; \ No newline at end of file diff --git a/api/struct/ImageSparseMemoryRequirementsInfo2.ts b/api/struct/ImageSparseMemoryRequirementsInfo2.ts new file mode 100644 index 0000000..000fb3d --- /dev/null +++ b/api/struct/ImageSparseMemoryRequirementsInfo2.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Image } from "../def.ts"; + +export interface InitImageSparseMemoryRequirementsInfo2 { + pNext?: AnyPointer; + image?: Image; +} + +export class ImageSparseMemoryRequirementsInfo2 implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageSparseMemoryRequirementsInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageSparseMemoryRequirementsInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageSparseMemoryRequirementsInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageSparseMemoryRequirementsInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageSparseMemoryRequirementsInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.image !== undefined) this.image = data.image; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSparseMemoryRequirementsInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageSparseMemoryRequirementsInfo2KHR.ts b/api/struct/ImageSparseMemoryRequirementsInfo2KHR.ts new file mode 100644 index 0000000..4ea956c --- /dev/null +++ b/api/struct/ImageSparseMemoryRequirementsInfo2KHR.ts @@ -0,0 +1,2 @@ + import { ImageSparseMemoryRequirementsInfo2 } from "./ImageSparseMemoryRequirementsInfo2.ts"; + export type ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2; \ No newline at end of file diff --git a/api/struct/ImageStencilUsageCreateInfo.ts b/api/struct/ImageStencilUsageCreateInfo.ts new file mode 100644 index 0000000..7cbbd0c --- /dev/null +++ b/api/struct/ImageStencilUsageCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ImageUsageFlags } from "../def.ts"; + +export interface InitImageStencilUsageCreateInfo { + pNext?: AnyPointer; + stencilUsage?: ImageUsageFlags; +} + +export class ImageStencilUsageCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageStencilUsageCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageStencilUsageCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageStencilUsageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageStencilUsageCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageStencilUsageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stencilUsage !== undefined) this.stencilUsage = data.stencilUsage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageStencilUsageCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_STENCIL_USAGE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stencilUsage(): number { + return this.#view.getUint32(16, LE); + } + + set stencilUsage(value: ImageUsageFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageStencilUsageCreateInfoEXT.ts b/api/struct/ImageStencilUsageCreateInfoEXT.ts new file mode 100644 index 0000000..58fea0f --- /dev/null +++ b/api/struct/ImageStencilUsageCreateInfoEXT.ts @@ -0,0 +1,2 @@ + import { ImageStencilUsageCreateInfo } from "./ImageStencilUsageCreateInfo.ts"; + export type ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo; \ No newline at end of file diff --git a/api/struct/ImageSubresource.ts b/api/struct/ImageSubresource.ts new file mode 100644 index 0000000..0eb7bb0 --- /dev/null +++ b/api/struct/ImageSubresource.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ImageAspectFlags } from "../def.ts"; + +export interface InitImageSubresource { + aspectMask?: ImageAspectFlags; + mipLevel?: number; + arrayLayer?: number; +} + +export class ImageSubresource implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageSubresource); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageSubresource) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageSubresource.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageSubresource.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageSubresource.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; + if (data.mipLevel !== undefined) this.mipLevel = data.mipLevel; + if (data.arrayLayer !== undefined) this.arrayLayer = data.arrayLayer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresource.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get aspectMask(): number { + return this.#view.getUint32(0, LE); + } + + set aspectMask(value: ImageAspectFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get mipLevel(): number { + return this.#view.getUint32(4, LE); + } + + set mipLevel(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get arrayLayer(): number { + return this.#view.getUint32(8, LE); + } + + set arrayLayer(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageSubresource2EXT.ts b/api/struct/ImageSubresource2EXT.ts new file mode 100644 index 0000000..2ca9bff --- /dev/null +++ b/api/struct/ImageSubresource2EXT.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresource} from "./ImageSubresource.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageSubresource2EXT { + pNext?: AnyPointer; + imageSubresource?: ImageSubresource; +} + +export class ImageSubresource2EXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageSubresource2EXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageSubresource2EXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageSubresource2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageSubresource2EXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageSubresource2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageSubresource !== undefined) this.imageSubresource = data.imageSubresource; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresource2EXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_SUBRESOURCE_2_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageSubresource(): ImageSubresource { + return new ImageSubresource(this.#data.subarray(16, 16 + ImageSubresource.size)); + } + + set imageSubresource(value: ImageSubresource) { + if (value[BUFFER].byteLength < ImageSubresource.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/ImageSubresourceLayers.ts b/api/struct/ImageSubresourceLayers.ts new file mode 100644 index 0000000..373a3cc --- /dev/null +++ b/api/struct/ImageSubresourceLayers.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ImageAspectFlags } from "../def.ts"; + +export interface InitImageSubresourceLayers { + aspectMask?: ImageAspectFlags; + mipLevel?: number; + baseArrayLayer?: number; + layerCount?: number; +} + +export class ImageSubresourceLayers implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageSubresourceLayers); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageSubresourceLayers) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageSubresourceLayers.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageSubresourceLayers.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageSubresourceLayers.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; + if (data.mipLevel !== undefined) this.mipLevel = data.mipLevel; + if (data.baseArrayLayer !== undefined) this.baseArrayLayer = data.baseArrayLayer; + if (data.layerCount !== undefined) this.layerCount = data.layerCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresourceLayers.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get aspectMask(): number { + return this.#view.getUint32(0, LE); + } + + set aspectMask(value: ImageAspectFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get mipLevel(): number { + return this.#view.getUint32(4, LE); + } + + set mipLevel(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get baseArrayLayer(): number { + return this.#view.getUint32(8, LE); + } + + set baseArrayLayer(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get layerCount(): number { + return this.#view.getUint32(12, LE); + } + + set layerCount(value: number) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageSubresourceRange.ts b/api/struct/ImageSubresourceRange.ts new file mode 100644 index 0000000..5dc6ff9 --- /dev/null +++ b/api/struct/ImageSubresourceRange.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ImageAspectFlags } from "../def.ts"; + +export interface InitImageSubresourceRange { + aspectMask?: ImageAspectFlags; + baseMipLevel?: number; + levelCount?: number; + baseArrayLayer?: number; + layerCount?: number; +} + +export class ImageSubresourceRange implements BaseStruct { + static size = 20; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageSubresourceRange); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageSubresourceRange) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageSubresourceRange.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageSubresourceRange.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageSubresourceRange.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; + if (data.baseMipLevel !== undefined) this.baseMipLevel = data.baseMipLevel; + if (data.levelCount !== undefined) this.levelCount = data.levelCount; + if (data.baseArrayLayer !== undefined) this.baseArrayLayer = data.baseArrayLayer; + if (data.layerCount !== undefined) this.layerCount = data.layerCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresourceRange.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get aspectMask(): number { + return this.#view.getUint32(0, LE); + } + + set aspectMask(value: ImageAspectFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get baseMipLevel(): number { + return this.#view.getUint32(4, LE); + } + + set baseMipLevel(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get levelCount(): number { + return this.#view.getUint32(8, LE); + } + + set levelCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get baseArrayLayer(): number { + return this.#view.getUint32(12, LE); + } + + set baseArrayLayer(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get layerCount(): number { + return this.#view.getUint32(16, LE); + } + + set layerCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageSwapchainCreateInfoKHR.ts b/api/struct/ImageSwapchainCreateInfoKHR.ts new file mode 100644 index 0000000..a244706 --- /dev/null +++ b/api/struct/ImageSwapchainCreateInfoKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { SwapchainKHR } from "../def.ts"; + +export interface InitImageSwapchainCreateInfoKHR { + pNext?: AnyPointer; + swapchain?: SwapchainKHR; +} + +export class ImageSwapchainCreateInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageSwapchainCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageSwapchainCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageSwapchainCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageSwapchainCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageSwapchainCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.swapchain !== undefined) this.swapchain = data.swapchain; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSwapchainCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_SWAPCHAIN_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get swapchain(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set swapchain(value: SwapchainKHR) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageViewASTCDecodeModeEXT.ts b/api/struct/ImageViewASTCDecodeModeEXT.ts new file mode 100644 index 0000000..e1d0efb --- /dev/null +++ b/api/struct/ImageViewASTCDecodeModeEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format } from "../enum.ts"; + +export interface InitImageViewASTCDecodeModeEXT { + pNext?: AnyPointer; + decodeMode?: Format; +} + +export class ImageViewASTCDecodeModeEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageViewASTCDecodeModeEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewASTCDecodeModeEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageViewASTCDecodeModeEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageViewASTCDecodeModeEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageViewASTCDecodeModeEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.decodeMode !== undefined) this.decodeMode = data.decodeMode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewASTCDecodeModeEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_VIEW_ASTC_DECODE_MODE_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get decodeMode(): number { + return this.#view.getUint32(16, LE); + } + + set decodeMode(value: Format) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageViewAddressPropertiesNVX.ts b/api/struct/ImageViewAddressPropertiesNVX.ts new file mode 100644 index 0000000..d6d5adc --- /dev/null +++ b/api/struct/ImageViewAddressPropertiesNVX.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceAddress, DeviceSize } from "../def.ts"; + +export interface InitImageViewAddressPropertiesNVX { + pNext?: AnyPointer; + deviceAddress?: DeviceAddress; + size?: DeviceSize; +} + +export class ImageViewAddressPropertiesNVX implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageViewAddressPropertiesNVX); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewAddressPropertiesNVX) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageViewAddressPropertiesNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageViewAddressPropertiesNVX.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageViewAddressPropertiesNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewAddressPropertiesNVX.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_VIEW_ADDRESS_PROPERTIES_NVX; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceAddress(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set deviceAddress(value: DeviceAddress) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageViewCaptureDescriptorDataInfoEXT.ts b/api/struct/ImageViewCaptureDescriptorDataInfoEXT.ts new file mode 100644 index 0000000..35e2308 --- /dev/null +++ b/api/struct/ImageViewCaptureDescriptorDataInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ImageView } from "../def.ts"; + +export interface InitImageViewCaptureDescriptorDataInfoEXT { + pNext?: AnyPointer; + imageView?: ImageView; +} + +export class ImageViewCaptureDescriptorDataInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageViewCaptureDescriptorDataInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewCaptureDescriptorDataInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageViewCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageViewCaptureDescriptorDataInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageViewCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageView !== undefined) this.imageView = data.imageView; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewCaptureDescriptorDataInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageView(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set imageView(value: ImageView) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageViewCreateInfo.ts b/api/struct/ImageViewCreateInfo.ts new file mode 100644 index 0000000..83d93cf --- /dev/null +++ b/api/struct/ImageViewCreateInfo.ts @@ -0,0 +1,138 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ComponentMapping} from "./ComponentMapping.ts"; +import {ImageSubresourceRange} from "./ImageSubresourceRange.ts"; +import { StructureType, ImageViewType, Format } from "../enum.ts"; +import { ImageViewCreateFlags, Image } from "../def.ts"; + +export interface InitImageViewCreateInfo { + pNext?: AnyPointer; + flags?: ImageViewCreateFlags; + image?: Image; + viewType?: ImageViewType; + format?: Format; + components?: ComponentMapping; + subresourceRange?: ImageSubresourceRange; +} + +export class ImageViewCreateInfo implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageViewCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageViewCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageViewCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageViewCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.image !== undefined) this.image = data.image; + if (data.viewType !== undefined) this.viewType = data.viewType; + if (data.format !== undefined) this.format = data.format; + if (data.components !== undefined) this.components = data.components; + if (data.subresourceRange !== undefined) this.subresourceRange = data.subresourceRange; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_VIEW_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: ImageViewCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get viewType(): number { + return this.#view.getUint32(32, LE); + } + + set viewType(value: ImageViewType) { + this.#view.setUint32(32, Number(value), LE); + } + + get format(): number { + return this.#view.getUint32(36, LE); + } + + set format(value: Format) { + this.#view.setUint32(36, Number(value), LE); + } + + get components(): ComponentMapping { + return new ComponentMapping(this.#data.subarray(40, 40 + ComponentMapping.size)); + } + + set components(value: ComponentMapping) { + if (value[BUFFER].byteLength < ComponentMapping.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } + + get subresourceRange(): ImageSubresourceRange { + return new ImageSubresourceRange(this.#data.subarray(56, 56 + ImageSubresourceRange.size)); + } + + set subresourceRange(value: ImageSubresourceRange) { + if (value[BUFFER].byteLength < ImageSubresourceRange.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 56); + } +} \ No newline at end of file diff --git a/api/struct/ImageViewHandleInfoNVX.ts b/api/struct/ImageViewHandleInfoNVX.ts new file mode 100644 index 0000000..eb7264f --- /dev/null +++ b/api/struct/ImageViewHandleInfoNVX.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DescriptorType } from "../enum.ts"; +import { ImageView, Sampler } from "../def.ts"; + +export interface InitImageViewHandleInfoNVX { + pNext?: AnyPointer; + imageView?: ImageView; + descriptorType?: DescriptorType; + sampler?: Sampler; +} + +export class ImageViewHandleInfoNVX implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageViewHandleInfoNVX); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewHandleInfoNVX) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageViewHandleInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageViewHandleInfoNVX.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageViewHandleInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageView !== undefined) this.imageView = data.imageView; + if (data.descriptorType !== undefined) this.descriptorType = data.descriptorType; + if (data.sampler !== undefined) this.sampler = data.sampler; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewHandleInfoNVX.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_VIEW_HANDLE_INFO_NVX; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageView(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set imageView(value: ImageView) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get descriptorType(): number { + return this.#view.getUint32(24, LE); + } + + set descriptorType(value: DescriptorType) { + this.#view.setUint32(24, Number(value), LE); + } + + get sampler(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set sampler(value: Sampler) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageViewMinLodCreateInfoEXT.ts b/api/struct/ImageViewMinLodCreateInfoEXT.ts new file mode 100644 index 0000000..e0aa931 --- /dev/null +++ b/api/struct/ImageViewMinLodCreateInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageViewMinLodCreateInfoEXT { + pNext?: AnyPointer; + minLod?: number; +} + +export class ImageViewMinLodCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageViewMinLodCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewMinLodCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageViewMinLodCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageViewMinLodCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageViewMinLodCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minLod !== undefined) this.minLod = data.minLod; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewMinLodCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minLod(): number { + return this.#view.getFloat32(16, LE); + } + + set minLod(value: number) { + this.#view.setFloat32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageViewSampleWeightCreateInfoQCOM.ts b/api/struct/ImageViewSampleWeightCreateInfoQCOM.ts new file mode 100644 index 0000000..592a4b1 --- /dev/null +++ b/api/struct/ImageViewSampleWeightCreateInfoQCOM.ts @@ -0,0 +1,107 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Offset2D} from "./Offset2D.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImageViewSampleWeightCreateInfoQCOM { + pNext?: AnyPointer; + filterCenter?: Offset2D; + filterSize?: Extent2D; + numPhases?: number; +} + +export class ImageViewSampleWeightCreateInfoQCOM implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageViewSampleWeightCreateInfoQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewSampleWeightCreateInfoQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageViewSampleWeightCreateInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageViewSampleWeightCreateInfoQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageViewSampleWeightCreateInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.filterCenter !== undefined) this.filterCenter = data.filterCenter; + if (data.filterSize !== undefined) this.filterSize = data.filterSize; + if (data.numPhases !== undefined) this.numPhases = data.numPhases; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewSampleWeightCreateInfoQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get filterCenter(): Offset2D { + return new Offset2D(this.#data.subarray(16, 16 + Offset2D.size)); + } + + set filterCenter(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get filterSize(): Extent2D { + return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); + } + + set filterSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get numPhases(): number { + return this.#view.getUint32(32, LE); + } + + set numPhases(value: number) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageViewUsageCreateInfo.ts b/api/struct/ImageViewUsageCreateInfo.ts new file mode 100644 index 0000000..54cfc0c --- /dev/null +++ b/api/struct/ImageViewUsageCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ImageUsageFlags } from "../def.ts"; + +export interface InitImageViewUsageCreateInfo { + pNext?: AnyPointer; + usage?: ImageUsageFlags; +} + +export class ImageViewUsageCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImageViewUsageCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewUsageCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImageViewUsageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImageViewUsageCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImageViewUsageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.usage !== undefined) this.usage = data.usage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewUsageCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMAGE_VIEW_USAGE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get usage(): number { + return this.#view.getUint32(16, LE); + } + + set usage(value: ImageUsageFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImageViewUsageCreateInfoKHR.ts b/api/struct/ImageViewUsageCreateInfoKHR.ts new file mode 100644 index 0000000..17665d1 --- /dev/null +++ b/api/struct/ImageViewUsageCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { ImageViewUsageCreateInfo } from "./ImageViewUsageCreateInfo.ts"; + export type ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo; \ No newline at end of file diff --git a/api/struct/ImportAndroidHardwareBufferInfoANDROID.ts b/api/struct/ImportAndroidHardwareBufferInfoANDROID.ts new file mode 100644 index 0000000..2e6f326 --- /dev/null +++ b/api/struct/ImportAndroidHardwareBufferInfoANDROID.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitImportAndroidHardwareBufferInfoANDROID { + pNext?: AnyPointer; + buffer?: AnyPointer; +} + +export class ImportAndroidHardwareBufferInfoANDROID implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportAndroidHardwareBufferInfoANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportAndroidHardwareBufferInfoANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportAndroidHardwareBufferInfoANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportAndroidHardwareBufferInfoANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportAndroidHardwareBufferInfoANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.buffer !== undefined) this.buffer = data.buffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportAndroidHardwareBufferInfoANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set buffer(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportFenceFdInfoKHR.ts b/api/struct/ImportFenceFdInfoKHR.ts new file mode 100644 index 0000000..b067e86 --- /dev/null +++ b/api/struct/ImportFenceFdInfoKHR.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalFenceHandleTypeFlagBits } from "../enum.ts"; +import { Fence, FenceImportFlags } from "../def.ts"; + +export interface InitImportFenceFdInfoKHR { + pNext?: AnyPointer; + fence?: Fence; + flags?: FenceImportFlags; + handleType?: ExternalFenceHandleTypeFlagBits; + fd?: number; +} + +export class ImportFenceFdInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportFenceFdInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportFenceFdInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportFenceFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportFenceFdInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportFenceFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fence !== undefined) this.fence = data.fence; + if (data.flags !== undefined) this.flags = data.flags; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.fd !== undefined) this.fd = data.fd; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportFenceFdInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_FENCE_FD_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fence(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set fence(value: Fence) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(24, LE); + } + + set flags(value: FenceImportFlags) { + this.#view.setUint32(24, Number(value), LE); + } + + get handleType(): number { + return this.#view.getUint32(28, LE); + } + + set handleType(value: ExternalFenceHandleTypeFlagBits) { + this.#view.setUint32(28, Number(value), LE); + } + + get fd(): number { + return this.#view.getInt32(32, LE); + } + + set fd(value: number) { + this.#view.setInt32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportFenceWin32HandleInfoKHR.ts b/api/struct/ImportFenceWin32HandleInfoKHR.ts new file mode 100644 index 0000000..8460e60 --- /dev/null +++ b/api/struct/ImportFenceWin32HandleInfoKHR.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalFenceHandleTypeFlagBits } from "../enum.ts"; +import { Fence, FenceImportFlags } from "../def.ts"; + +export interface InitImportFenceWin32HandleInfoKHR { + pNext?: AnyPointer; + fence?: Fence; + flags?: FenceImportFlags; + handleType?: ExternalFenceHandleTypeFlagBits; + handle?: Deno.PointerValue; + name?: Deno.PointerValue; +} + +export class ImportFenceWin32HandleInfoKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportFenceWin32HandleInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportFenceWin32HandleInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportFenceWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportFenceWin32HandleInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportFenceWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fence !== undefined) this.fence = data.fence; + if (data.flags !== undefined) this.flags = data.flags; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.handle !== undefined) this.handle = data.handle; + if (data.name !== undefined) this.name = data.name; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportFenceWin32HandleInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_FENCE_WIN32_HANDLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fence(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set fence(value: Fence) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(24, LE); + } + + set flags(value: FenceImportFlags) { + this.#view.setUint32(24, Number(value), LE); + } + + get handleType(): number { + return this.#view.getUint32(28, LE); + } + + set handleType(value: ExternalFenceHandleTypeFlagBits) { + this.#view.setUint32(28, Number(value), LE); + } + + get handle(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set handle(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get name(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set name(value: Deno.PointerValue) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMemoryBufferCollectionFUCHSIA.ts b/api/struct/ImportMemoryBufferCollectionFUCHSIA.ts new file mode 100644 index 0000000..dfe3c5e --- /dev/null +++ b/api/struct/ImportMemoryBufferCollectionFUCHSIA.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { BufferCollectionFUCHSIA } from "../def.ts"; + +export interface InitImportMemoryBufferCollectionFUCHSIA { + pNext?: AnyPointer; + collection?: BufferCollectionFUCHSIA; + index?: number; +} + +export class ImportMemoryBufferCollectionFUCHSIA implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMemoryBufferCollectionFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryBufferCollectionFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMemoryBufferCollectionFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMemoryBufferCollectionFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMemoryBufferCollectionFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.collection !== undefined) this.collection = data.collection; + if (data.index !== undefined) this.index = data.index; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryBufferCollectionFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get collection(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set collection(value: BufferCollectionFUCHSIA) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get index(): number { + return this.#view.getUint32(24, LE); + } + + set index(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMemoryFdInfoKHR.ts b/api/struct/ImportMemoryFdInfoKHR.ts new file mode 100644 index 0000000..9059bd6 --- /dev/null +++ b/api/struct/ImportMemoryFdInfoKHR.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; + +export interface InitImportMemoryFdInfoKHR { + pNext?: AnyPointer; + handleType?: ExternalMemoryHandleTypeFlagBits; + fd?: number; +} + +export class ImportMemoryFdInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMemoryFdInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryFdInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMemoryFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMemoryFdInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMemoryFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.fd !== undefined) this.fd = data.fd; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryFdInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_MEMORY_FD_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(16, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } + + get fd(): number { + return this.#view.getInt32(20, LE); + } + + set fd(value: number) { + this.#view.setInt32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMemoryHostPointerInfoEXT.ts b/api/struct/ImportMemoryHostPointerInfoEXT.ts new file mode 100644 index 0000000..d7e65d3 --- /dev/null +++ b/api/struct/ImportMemoryHostPointerInfoEXT.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; + +export interface InitImportMemoryHostPointerInfoEXT { + pNext?: AnyPointer; + handleType?: ExternalMemoryHandleTypeFlagBits; + pHostPointer?: AnyPointer; +} + +export class ImportMemoryHostPointerInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMemoryHostPointerInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryHostPointerInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMemoryHostPointerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMemoryHostPointerInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMemoryHostPointerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.pHostPointer !== undefined) this.pHostPointer = data.pHostPointer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryHostPointerInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_MEMORY_HOST_POINTER_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(16, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } + + get pHostPointer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pHostPointer(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMemoryWin32HandleInfoKHR.ts b/api/struct/ImportMemoryWin32HandleInfoKHR.ts new file mode 100644 index 0000000..240543f --- /dev/null +++ b/api/struct/ImportMemoryWin32HandleInfoKHR.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; + +export interface InitImportMemoryWin32HandleInfoKHR { + pNext?: AnyPointer; + handleType?: ExternalMemoryHandleTypeFlagBits; + handle?: Deno.PointerValue; + name?: Deno.PointerValue; +} + +export class ImportMemoryWin32HandleInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMemoryWin32HandleInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryWin32HandleInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMemoryWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMemoryWin32HandleInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMemoryWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.handle !== undefined) this.handle = data.handle; + if (data.name !== undefined) this.name = data.name; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryWin32HandleInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(16, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } + + get handle(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set handle(value: Deno.PointerValue) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get name(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set name(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMemoryWin32HandleInfoNV.ts b/api/struct/ImportMemoryWin32HandleInfoNV.ts new file mode 100644 index 0000000..b27e742 --- /dev/null +++ b/api/struct/ImportMemoryWin32HandleInfoNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ExternalMemoryHandleTypeFlagsNV } from "../def.ts"; + +export interface InitImportMemoryWin32HandleInfoNV { + pNext?: AnyPointer; + handleType?: ExternalMemoryHandleTypeFlagsNV; + handle?: Deno.PointerValue; +} + +export class ImportMemoryWin32HandleInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMemoryWin32HandleInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryWin32HandleInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMemoryWin32HandleInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMemoryWin32HandleInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMemoryWin32HandleInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.handle !== undefined) this.handle = data.handle; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryWin32HandleInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_MEMORY_WIN32_HANDLE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(16, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get handle(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set handle(value: Deno.PointerValue) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMemoryZirconHandleInfoFUCHSIA.ts b/api/struct/ImportMemoryZirconHandleInfoFUCHSIA.ts new file mode 100644 index 0000000..334ee84 --- /dev/null +++ b/api/struct/ImportMemoryZirconHandleInfoFUCHSIA.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; + +export interface InitImportMemoryZirconHandleInfoFUCHSIA { + pNext?: AnyPointer; + handleType?: ExternalMemoryHandleTypeFlagBits; + handle?: Deno.PointerValue; +} + +export class ImportMemoryZirconHandleInfoFUCHSIA implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMemoryZirconHandleInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryZirconHandleInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMemoryZirconHandleInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMemoryZirconHandleInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMemoryZirconHandleInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.handle !== undefined) this.handle = data.handle; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryZirconHandleInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(16, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } + + get handle(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set handle(value: Deno.PointerValue) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMetalBufferInfoEXT.ts b/api/struct/ImportMetalBufferInfoEXT.ts new file mode 100644 index 0000000..5b2bd3d --- /dev/null +++ b/api/struct/ImportMetalBufferInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { MTLBuffer_id } from "../def.ts"; + +export interface InitImportMetalBufferInfoEXT { + pNext?: AnyPointer; + mtlBuffer?: MTLBuffer_id; +} + +export class ImportMetalBufferInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMetalBufferInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMetalBufferInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMetalBufferInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMetalBufferInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMetalBufferInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.mtlBuffer !== undefined) this.mtlBuffer = data.mtlBuffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalBufferInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_METAL_BUFFER_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get mtlBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set mtlBuffer(value: MTLBuffer_id) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMetalIOSurfaceInfoEXT.ts b/api/struct/ImportMetalIOSurfaceInfoEXT.ts new file mode 100644 index 0000000..ea6e10b --- /dev/null +++ b/api/struct/ImportMetalIOSurfaceInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { IOSurfaceRef } from "../def.ts"; + +export interface InitImportMetalIOSurfaceInfoEXT { + pNext?: AnyPointer; + ioSurface?: IOSurfaceRef; +} + +export class ImportMetalIOSurfaceInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMetalIOSurfaceInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMetalIOSurfaceInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMetalIOSurfaceInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMetalIOSurfaceInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMetalIOSurfaceInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.ioSurface !== undefined) this.ioSurface = data.ioSurface; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalIOSurfaceInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_METAL_IO_SURFACE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get ioSurface(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set ioSurface(value: IOSurfaceRef) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMetalSharedEventInfoEXT.ts b/api/struct/ImportMetalSharedEventInfoEXT.ts new file mode 100644 index 0000000..a65853d --- /dev/null +++ b/api/struct/ImportMetalSharedEventInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { MTLSharedEvent_id } from "../def.ts"; + +export interface InitImportMetalSharedEventInfoEXT { + pNext?: AnyPointer; + mtlSharedEvent?: MTLSharedEvent_id; +} + +export class ImportMetalSharedEventInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMetalSharedEventInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMetalSharedEventInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMetalSharedEventInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMetalSharedEventInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMetalSharedEventInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.mtlSharedEvent !== undefined) this.mtlSharedEvent = data.mtlSharedEvent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalSharedEventInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_METAL_SHARED_EVENT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get mtlSharedEvent(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set mtlSharedEvent(value: MTLSharedEvent_id) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportMetalTextureInfoEXT.ts b/api/struct/ImportMetalTextureInfoEXT.ts new file mode 100644 index 0000000..46583e9 --- /dev/null +++ b/api/struct/ImportMetalTextureInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageAspectFlagBits } from "../enum.ts"; +import { MTLTexture_id } from "../def.ts"; + +export interface InitImportMetalTextureInfoEXT { + pNext?: AnyPointer; + plane?: ImageAspectFlagBits; + mtlTexture?: MTLTexture_id; +} + +export class ImportMetalTextureInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportMetalTextureInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportMetalTextureInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportMetalTextureInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportMetalTextureInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportMetalTextureInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.plane !== undefined) this.plane = data.plane; + if (data.mtlTexture !== undefined) this.mtlTexture = data.mtlTexture; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalTextureInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_METAL_TEXTURE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get plane(): number { + return this.#view.getUint32(16, LE); + } + + set plane(value: ImageAspectFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } + + get mtlTexture(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set mtlTexture(value: MTLTexture_id) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportSemaphoreFdInfoKHR.ts b/api/struct/ImportSemaphoreFdInfoKHR.ts new file mode 100644 index 0000000..250ca1e --- /dev/null +++ b/api/struct/ImportSemaphoreFdInfoKHR.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalSemaphoreHandleTypeFlagBits } from "../enum.ts"; +import { Semaphore, SemaphoreImportFlags } from "../def.ts"; + +export interface InitImportSemaphoreFdInfoKHR { + pNext?: AnyPointer; + semaphore?: Semaphore; + flags?: SemaphoreImportFlags; + handleType?: ExternalSemaphoreHandleTypeFlagBits; + fd?: number; +} + +export class ImportSemaphoreFdInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportSemaphoreFdInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportSemaphoreFdInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportSemaphoreFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportSemaphoreFdInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportSemaphoreFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.flags !== undefined) this.flags = data.flags; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.fd !== undefined) this.fd = data.fd; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportSemaphoreFdInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_SEMAPHORE_FD_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(24, LE); + } + + set flags(value: SemaphoreImportFlags) { + this.#view.setUint32(24, Number(value), LE); + } + + get handleType(): number { + return this.#view.getUint32(28, LE); + } + + set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { + this.#view.setUint32(28, Number(value), LE); + } + + get fd(): number { + return this.#view.getInt32(32, LE); + } + + set fd(value: number) { + this.#view.setInt32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportSemaphoreWin32HandleInfoKHR.ts b/api/struct/ImportSemaphoreWin32HandleInfoKHR.ts new file mode 100644 index 0000000..61b3f7e --- /dev/null +++ b/api/struct/ImportSemaphoreWin32HandleInfoKHR.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalSemaphoreHandleTypeFlagBits } from "../enum.ts"; +import { Semaphore, SemaphoreImportFlags } from "../def.ts"; + +export interface InitImportSemaphoreWin32HandleInfoKHR { + pNext?: AnyPointer; + semaphore?: Semaphore; + flags?: SemaphoreImportFlags; + handleType?: ExternalSemaphoreHandleTypeFlagBits; + handle?: Deno.PointerValue; + name?: Deno.PointerValue; +} + +export class ImportSemaphoreWin32HandleInfoKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportSemaphoreWin32HandleInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportSemaphoreWin32HandleInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportSemaphoreWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportSemaphoreWin32HandleInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportSemaphoreWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.flags !== undefined) this.flags = data.flags; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.handle !== undefined) this.handle = data.handle; + if (data.name !== undefined) this.name = data.name; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportSemaphoreWin32HandleInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(24, LE); + } + + set flags(value: SemaphoreImportFlags) { + this.#view.setUint32(24, Number(value), LE); + } + + get handleType(): number { + return this.#view.getUint32(28, LE); + } + + set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { + this.#view.setUint32(28, Number(value), LE); + } + + get handle(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set handle(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get name(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set name(value: Deno.PointerValue) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ImportSemaphoreZirconHandleInfoFUCHSIA.ts b/api/struct/ImportSemaphoreZirconHandleInfoFUCHSIA.ts new file mode 100644 index 0000000..87be705 --- /dev/null +++ b/api/struct/ImportSemaphoreZirconHandleInfoFUCHSIA.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalSemaphoreHandleTypeFlagBits } from "../enum.ts"; +import { Semaphore, SemaphoreImportFlags } from "../def.ts"; + +export interface InitImportSemaphoreZirconHandleInfoFUCHSIA { + pNext?: AnyPointer; + semaphore?: Semaphore; + flags?: SemaphoreImportFlags; + handleType?: ExternalSemaphoreHandleTypeFlagBits; + zirconHandle?: Deno.PointerValue; +} + +export class ImportSemaphoreZirconHandleInfoFUCHSIA implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitImportSemaphoreZirconHandleInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitImportSemaphoreZirconHandleInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ImportSemaphoreZirconHandleInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ImportSemaphoreZirconHandleInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ImportSemaphoreZirconHandleInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.flags !== undefined) this.flags = data.flags; + if (data.handleType !== undefined) this.handleType = data.handleType; + if (data.zirconHandle !== undefined) this.zirconHandle = data.zirconHandle; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportSemaphoreZirconHandleInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(24, LE); + } + + set flags(value: SemaphoreImportFlags) { + this.#view.setUint32(24, Number(value), LE); + } + + get handleType(): number { + return this.#view.getUint32(28, LE); + } + + set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { + this.#view.setUint32(28, Number(value), LE); + } + + get zirconHandle(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set zirconHandle(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/IndirectCommandsLayoutCreateInfoNV.ts b/api/struct/IndirectCommandsLayoutCreateInfoNV.ts new file mode 100644 index 0000000..11de553 --- /dev/null +++ b/api/struct/IndirectCommandsLayoutCreateInfoNV.ts @@ -0,0 +1,131 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {IndirectCommandsLayoutTokenNV} from "./IndirectCommandsLayoutTokenNV.ts"; +import { StructureType, PipelineBindPoint } from "../enum.ts"; +import { IndirectCommandsLayoutUsageFlagsNV } from "../def.ts"; + +export interface InitIndirectCommandsLayoutCreateInfoNV { + pNext?: AnyPointer; + flags?: IndirectCommandsLayoutUsageFlagsNV; + pipelineBindPoint?: PipelineBindPoint; + tokenCount?: number; + pTokens?: AnyPointer; + streamCount?: number; + pStreamStrides?: AnyPointer; +} + +export class IndirectCommandsLayoutCreateInfoNV implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitIndirectCommandsLayoutCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitIndirectCommandsLayoutCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(IndirectCommandsLayoutCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < IndirectCommandsLayoutCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(IndirectCommandsLayoutCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; + if (data.tokenCount !== undefined) this.tokenCount = data.tokenCount; + if (data.pTokens !== undefined) this.pTokens = data.pTokens; + if (data.streamCount !== undefined) this.streamCount = data.streamCount; + if (data.pStreamStrides !== undefined) this.pStreamStrides = data.pStreamStrides; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IndirectCommandsLayoutCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: IndirectCommandsLayoutUsageFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get pipelineBindPoint(): number { + return this.#view.getUint32(20, LE); + } + + set pipelineBindPoint(value: PipelineBindPoint) { + this.#view.setUint32(20, Number(value), LE); + } + + get tokenCount(): number { + return this.#view.getUint32(24, LE); + } + + set tokenCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pTokens(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pTokens(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get streamCount(): number { + return this.#view.getUint32(40, LE); + } + + set streamCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get pStreamStrides(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pStreamStrides(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/IndirectCommandsLayoutTokenNV.ts b/api/struct/IndirectCommandsLayoutTokenNV.ts new file mode 100644 index 0000000..e42b369 --- /dev/null +++ b/api/struct/IndirectCommandsLayoutTokenNV.ts @@ -0,0 +1,200 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, IndirectCommandsTokenTypeNV, IndexType } from "../enum.ts"; +import { Bool32, PipelineLayout, ShaderStageFlags, IndirectStateFlagsNV } from "../def.ts"; + +export interface InitIndirectCommandsLayoutTokenNV { + pNext?: AnyPointer; + tokenType?: IndirectCommandsTokenTypeNV; + stream?: number; + offset?: number; + vertexBindingUnit?: number; + vertexDynamicStride?: Bool32; + pushconstantPipelineLayout?: PipelineLayout; + pushconstantShaderStageFlags?: ShaderStageFlags; + pushconstantOffset?: number; + pushconstantSize?: number; + indirectStateFlags?: IndirectStateFlagsNV; + indexTypeCount?: number; + pIndexTypes?: AnyPointer; + pIndexTypeValues?: AnyPointer; +} + +export class IndirectCommandsLayoutTokenNV implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitIndirectCommandsLayoutTokenNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitIndirectCommandsLayoutTokenNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(IndirectCommandsLayoutTokenNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < IndirectCommandsLayoutTokenNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(IndirectCommandsLayoutTokenNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.tokenType !== undefined) this.tokenType = data.tokenType; + if (data.stream !== undefined) this.stream = data.stream; + if (data.offset !== undefined) this.offset = data.offset; + if (data.vertexBindingUnit !== undefined) this.vertexBindingUnit = data.vertexBindingUnit; + if (data.vertexDynamicStride !== undefined) this.vertexDynamicStride = data.vertexDynamicStride; + if (data.pushconstantPipelineLayout !== undefined) this.pushconstantPipelineLayout = data.pushconstantPipelineLayout; + if (data.pushconstantShaderStageFlags !== undefined) this.pushconstantShaderStageFlags = data.pushconstantShaderStageFlags; + if (data.pushconstantOffset !== undefined) this.pushconstantOffset = data.pushconstantOffset; + if (data.pushconstantSize !== undefined) this.pushconstantSize = data.pushconstantSize; + if (data.indirectStateFlags !== undefined) this.indirectStateFlags = data.indirectStateFlags; + if (data.indexTypeCount !== undefined) this.indexTypeCount = data.indexTypeCount; + if (data.pIndexTypes !== undefined) this.pIndexTypes = data.pIndexTypes; + if (data.pIndexTypeValues !== undefined) this.pIndexTypeValues = data.pIndexTypeValues; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IndirectCommandsLayoutTokenNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.INDIRECT_COMMANDS_LAYOUT_TOKEN_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get tokenType(): number { + return this.#view.getUint32(16, LE); + } + + set tokenType(value: IndirectCommandsTokenTypeNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get stream(): number { + return this.#view.getUint32(20, LE); + } + + set stream(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get offset(): number { + return this.#view.getUint32(24, LE); + } + + set offset(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get vertexBindingUnit(): number { + return this.#view.getUint32(28, LE); + } + + set vertexBindingUnit(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get vertexDynamicStride(): number { + return this.#view.getUint32(32, LE); + } + + set vertexDynamicStride(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get pushconstantPipelineLayout(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pushconstantPipelineLayout(value: PipelineLayout) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get pushconstantShaderStageFlags(): number { + return this.#view.getUint32(48, LE); + } + + set pushconstantShaderStageFlags(value: ShaderStageFlags) { + this.#view.setUint32(48, Number(value), LE); + } + + get pushconstantOffset(): number { + return this.#view.getUint32(52, LE); + } + + set pushconstantOffset(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get pushconstantSize(): number { + return this.#view.getUint32(56, LE); + } + + set pushconstantSize(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get indirectStateFlags(): number { + return this.#view.getUint32(60, LE); + } + + set indirectStateFlags(value: IndirectStateFlagsNV) { + this.#view.setUint32(60, Number(value), LE); + } + + get indexTypeCount(): number { + return this.#view.getUint32(64, LE); + } + + set indexTypeCount(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get pIndexTypes(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set pIndexTypes(value: AnyPointer) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } + + get pIndexTypeValues(): Deno.PointerValue { + return pointerFromView(this.#view, 80, LE); + } + + set pIndexTypeValues(value: AnyPointer) { + this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/IndirectCommandsStreamNV.ts b/api/struct/IndirectCommandsStreamNV.ts new file mode 100644 index 0000000..cd89ddb --- /dev/null +++ b/api/struct/IndirectCommandsStreamNV.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { Buffer, DeviceSize } from "../def.ts"; + +export interface InitIndirectCommandsStreamNV { + buffer?: Buffer; + offset?: DeviceSize; +} + +export class IndirectCommandsStreamNV implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitIndirectCommandsStreamNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitIndirectCommandsStreamNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(IndirectCommandsStreamNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < IndirectCommandsStreamNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(IndirectCommandsStreamNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.offset !== undefined) this.offset = data.offset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IndirectCommandsStreamNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(8, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/InitializePerformanceApiInfoINTEL.ts b/api/struct/InitializePerformanceApiInfoINTEL.ts new file mode 100644 index 0000000..ccc82a1 --- /dev/null +++ b/api/struct/InitializePerformanceApiInfoINTEL.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitInitializePerformanceApiInfoINTEL { + pNext?: AnyPointer; + pUserData?: AnyPointer; +} + +export class InitializePerformanceApiInfoINTEL implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitInitializePerformanceApiInfoINTEL); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitInitializePerformanceApiInfoINTEL) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(InitializePerformanceApiInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < InitializePerformanceApiInfoINTEL.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(InitializePerformanceApiInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pUserData !== undefined) this.pUserData = data.pUserData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, InitializePerformanceApiInfoINTEL.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.INITIALIZE_PERFORMANCE_API_INFO_INTEL; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pUserData(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pUserData(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/InputAttachmentAspectReference.ts b/api/struct/InputAttachmentAspectReference.ts new file mode 100644 index 0000000..7998e3c --- /dev/null +++ b/api/struct/InputAttachmentAspectReference.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ImageAspectFlags } from "../def.ts"; + +export interface InitInputAttachmentAspectReference { + subpass?: number; + inputAttachmentIndex?: number; + aspectMask?: ImageAspectFlags; +} + +export class InputAttachmentAspectReference implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitInputAttachmentAspectReference); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitInputAttachmentAspectReference) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(InputAttachmentAspectReference.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < InputAttachmentAspectReference.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(InputAttachmentAspectReference.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.subpass !== undefined) this.subpass = data.subpass; + if (data.inputAttachmentIndex !== undefined) this.inputAttachmentIndex = data.inputAttachmentIndex; + if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, InputAttachmentAspectReference.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get subpass(): number { + return this.#view.getUint32(0, LE); + } + + set subpass(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get inputAttachmentIndex(): number { + return this.#view.getUint32(4, LE); + } + + set inputAttachmentIndex(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get aspectMask(): number { + return this.#view.getUint32(8, LE); + } + + set aspectMask(value: ImageAspectFlags) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/InputAttachmentAspectReferenceKHR.ts b/api/struct/InputAttachmentAspectReferenceKHR.ts new file mode 100644 index 0000000..32d27f0 --- /dev/null +++ b/api/struct/InputAttachmentAspectReferenceKHR.ts @@ -0,0 +1,2 @@ + import { InputAttachmentAspectReference } from "./InputAttachmentAspectReference.ts"; + export type InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference; \ No newline at end of file diff --git a/api/struct/InstanceCreateInfo.ts b/api/struct/InstanceCreateInfo.ts new file mode 100644 index 0000000..6c97724 --- /dev/null +++ b/api/struct/InstanceCreateInfo.ts @@ -0,0 +1,131 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ApplicationInfo} from "./ApplicationInfo.ts"; +import { StructureType } from "../enum.ts"; +import { InstanceCreateFlags } from "../def.ts"; + +export interface InitInstanceCreateInfo { + pNext?: AnyPointer; + flags?: InstanceCreateFlags; + pApplicationInfo?: AnyPointer; + enabledLayerCount?: number; + ppEnabledLayerNames?: AnyPointer; + enabledExtensionCount?: number; + ppEnabledExtensionNames?: AnyPointer; +} + +export class InstanceCreateInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitInstanceCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitInstanceCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(InstanceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < InstanceCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(InstanceCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pApplicationInfo !== undefined) this.pApplicationInfo = data.pApplicationInfo; + if (data.enabledLayerCount !== undefined) this.enabledLayerCount = data.enabledLayerCount; + if (data.ppEnabledLayerNames !== undefined) this.ppEnabledLayerNames = data.ppEnabledLayerNames; + if (data.enabledExtensionCount !== undefined) this.enabledExtensionCount = data.enabledExtensionCount; + if (data.ppEnabledExtensionNames !== undefined) this.ppEnabledExtensionNames = data.ppEnabledExtensionNames; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, InstanceCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.INSTANCE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: InstanceCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get pApplicationInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pApplicationInfo(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get enabledLayerCount(): number { + return this.#view.getUint32(32, LE); + } + + set enabledLayerCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get ppEnabledLayerNames(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set ppEnabledLayerNames(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get enabledExtensionCount(): number { + return this.#view.getUint32(48, LE); + } + + set enabledExtensionCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get ppEnabledExtensionNames(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set ppEnabledExtensionNames(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/LayerProperties.ts b/api/struct/LayerProperties.ts new file mode 100644 index 0000000..1e9a688 --- /dev/null +++ b/api/struct/LayerProperties.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitLayerProperties { + layerName?: Uint8Array; + specVersion?: number; + implementationVersion?: number; + description?: Uint8Array; +} + +export class LayerProperties implements BaseStruct { + static size = 520; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitLayerProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitLayerProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(LayerProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < LayerProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(LayerProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.layerName !== undefined) this.layerName = data.layerName; + if (data.specVersion !== undefined) this.specVersion = data.specVersion; + if (data.implementationVersion !== undefined) this.implementationVersion = data.implementationVersion; + if (data.description !== undefined) this.description = data.description; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, LayerProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get layerName(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 256); + } + + set layerName(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 0); + } + + get specVersion(): number { + return this.#view.getUint32(256, LE); + } + + set specVersion(value: number) { + this.#view.setUint32(256, Number(value), LE); + } + + get implementationVersion(): number { + return this.#view.getUint32(260, LE); + } + + set implementationVersion(value: number) { + this.#view.setUint32(260, Number(value), LE); + } + + get description(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 264, 256); + } + + set description(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 264); + } +} \ No newline at end of file diff --git a/api/struct/MacOSSurfaceCreateInfoMVK.ts b/api/struct/MacOSSurfaceCreateInfoMVK.ts new file mode 100644 index 0000000..65a5e07 --- /dev/null +++ b/api/struct/MacOSSurfaceCreateInfoMVK.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { MacOSSurfaceCreateFlagsMVK } from "../def.ts"; + +export interface InitMacOSSurfaceCreateInfoMVK { + pNext?: AnyPointer; + flags?: MacOSSurfaceCreateFlagsMVK; + pView?: AnyPointer; +} + +export class MacOSSurfaceCreateInfoMVK implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMacOSSurfaceCreateInfoMVK); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMacOSSurfaceCreateInfoMVK) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MacOSSurfaceCreateInfoMVK.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MacOSSurfaceCreateInfoMVK.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MacOSSurfaceCreateInfoMVK.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pView !== undefined) this.pView = data.pView; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MacOSSurfaceCreateInfoMVK.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MACOS_SURFACE_CREATE_INFO_MVK; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: MacOSSurfaceCreateFlagsMVK) { + this.#view.setUint32(16, Number(value), LE); + } + + get pView(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pView(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/MappedMemoryRange.ts b/api/struct/MappedMemoryRange.ts new file mode 100644 index 0000000..72a67cb --- /dev/null +++ b/api/struct/MappedMemoryRange.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceMemory, DeviceSize } from "../def.ts"; + +export interface InitMappedMemoryRange { + pNext?: AnyPointer; + memory?: DeviceMemory; + offset?: DeviceSize; + size?: DeviceSize; +} + +export class MappedMemoryRange implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMappedMemoryRange); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMappedMemoryRange) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MappedMemoryRange.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MappedMemoryRange.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MappedMemoryRange.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memory !== undefined) this.memory = data.memory; + if (data.offset !== undefined) this.offset = data.offset; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MappedMemoryRange.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MAPPED_MEMORY_RANGE; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryAllocateFlagsInfo.ts b/api/struct/MemoryAllocateFlagsInfo.ts new file mode 100644 index 0000000..018b510 --- /dev/null +++ b/api/struct/MemoryAllocateFlagsInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { MemoryAllocateFlags } from "../def.ts"; + +export interface InitMemoryAllocateFlagsInfo { + pNext?: AnyPointer; + flags?: MemoryAllocateFlags; + deviceMask?: number; +} + +export class MemoryAllocateFlagsInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryAllocateFlagsInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryAllocateFlagsInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryAllocateFlagsInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryAllocateFlagsInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryAllocateFlagsInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryAllocateFlagsInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_ALLOCATE_FLAGS_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: MemoryAllocateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get deviceMask(): number { + return this.#view.getUint32(20, LE); + } + + set deviceMask(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryAllocateFlagsInfoKHR.ts b/api/struct/MemoryAllocateFlagsInfoKHR.ts new file mode 100644 index 0000000..3ef3dff --- /dev/null +++ b/api/struct/MemoryAllocateFlagsInfoKHR.ts @@ -0,0 +1,2 @@ + import { MemoryAllocateFlagsInfo } from "./MemoryAllocateFlagsInfo.ts"; + export type MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo; \ No newline at end of file diff --git a/api/struct/MemoryAllocateInfo.ts b/api/struct/MemoryAllocateInfo.ts new file mode 100644 index 0000000..1603969 --- /dev/null +++ b/api/struct/MemoryAllocateInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitMemoryAllocateInfo { + pNext?: AnyPointer; + allocationSize?: DeviceSize; + memoryTypeIndex?: number; +} + +export class MemoryAllocateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryAllocateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryAllocateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryAllocateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.allocationSize !== undefined) this.allocationSize = data.allocationSize; + if (data.memoryTypeIndex !== undefined) this.memoryTypeIndex = data.memoryTypeIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryAllocateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_ALLOCATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get allocationSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set allocationSize(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get memoryTypeIndex(): number { + return this.#view.getUint32(24, LE); + } + + set memoryTypeIndex(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryBarrier.ts b/api/struct/MemoryBarrier.ts new file mode 100644 index 0000000..1c005ad --- /dev/null +++ b/api/struct/MemoryBarrier.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AccessFlags } from "../def.ts"; + +export interface InitMemoryBarrier { + pNext?: AnyPointer; + srcAccessMask?: AccessFlags; + dstAccessMask?: AccessFlags; +} + +export class MemoryBarrier implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryBarrier); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryBarrier) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryBarrier.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryBarrier.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryBarrier.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; + if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryBarrier.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_BARRIER; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcAccessMask(): number { + return this.#view.getUint32(16, LE); + } + + set srcAccessMask(value: AccessFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get dstAccessMask(): number { + return this.#view.getUint32(20, LE); + } + + set dstAccessMask(value: AccessFlags) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryBarrier2.ts b/api/struct/MemoryBarrier2.ts new file mode 100644 index 0000000..9dc3ae1 --- /dev/null +++ b/api/struct/MemoryBarrier2.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineStageFlags2, AccessFlags2 } from "../def.ts"; + +export interface InitMemoryBarrier2 { + pNext?: AnyPointer; + srcStageMask?: PipelineStageFlags2; + srcAccessMask?: AccessFlags2; + dstStageMask?: PipelineStageFlags2; + dstAccessMask?: AccessFlags2; +} + +export class MemoryBarrier2 implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryBarrier2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryBarrier2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryBarrier2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryBarrier2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryBarrier2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; + if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; + if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; + if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryBarrier2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_BARRIER_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcStageMask(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set srcStageMask(value: PipelineStageFlags2) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get srcAccessMask(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set srcAccessMask(value: AccessFlags2) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get dstStageMask(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set dstStageMask(value: PipelineStageFlags2) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get dstAccessMask(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set dstAccessMask(value: AccessFlags2) { + this.#view.setBigUint64(40, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryBarrier2KHR.ts b/api/struct/MemoryBarrier2KHR.ts new file mode 100644 index 0000000..e945a43 --- /dev/null +++ b/api/struct/MemoryBarrier2KHR.ts @@ -0,0 +1,2 @@ + import { MemoryBarrier2 } from "./MemoryBarrier2.ts"; + export type MemoryBarrier2KHR = MemoryBarrier2; \ No newline at end of file diff --git a/api/struct/MemoryDedicatedAllocateInfo.ts b/api/struct/MemoryDedicatedAllocateInfo.ts new file mode 100644 index 0000000..3a97f66 --- /dev/null +++ b/api/struct/MemoryDedicatedAllocateInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Image, Buffer } from "../def.ts"; + +export interface InitMemoryDedicatedAllocateInfo { + pNext?: AnyPointer; + image?: Image; + buffer?: Buffer; +} + +export class MemoryDedicatedAllocateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryDedicatedAllocateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryDedicatedAllocateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryDedicatedAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryDedicatedAllocateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryDedicatedAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.image !== undefined) this.image = data.image; + if (data.buffer !== undefined) this.buffer = data.buffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryDedicatedAllocateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_DEDICATED_ALLOCATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryDedicatedAllocateInfoKHR.ts b/api/struct/MemoryDedicatedAllocateInfoKHR.ts new file mode 100644 index 0000000..826b752 --- /dev/null +++ b/api/struct/MemoryDedicatedAllocateInfoKHR.ts @@ -0,0 +1,2 @@ + import { MemoryDedicatedAllocateInfo } from "./MemoryDedicatedAllocateInfo.ts"; + export type MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo; \ No newline at end of file diff --git a/api/struct/MemoryDedicatedRequirements.ts b/api/struct/MemoryDedicatedRequirements.ts new file mode 100644 index 0000000..114774d --- /dev/null +++ b/api/struct/MemoryDedicatedRequirements.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitMemoryDedicatedRequirements { + pNext?: AnyPointer; + prefersDedicatedAllocation?: Bool32; + requiresDedicatedAllocation?: Bool32; +} + +export class MemoryDedicatedRequirements implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryDedicatedRequirements); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryDedicatedRequirements) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryDedicatedRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryDedicatedRequirements.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryDedicatedRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.prefersDedicatedAllocation !== undefined) this.prefersDedicatedAllocation = data.prefersDedicatedAllocation; + if (data.requiresDedicatedAllocation !== undefined) this.requiresDedicatedAllocation = data.requiresDedicatedAllocation; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryDedicatedRequirements.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_DEDICATED_REQUIREMENTS; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get prefersDedicatedAllocation(): number { + return this.#view.getUint32(16, LE); + } + + set prefersDedicatedAllocation(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get requiresDedicatedAllocation(): number { + return this.#view.getUint32(20, LE); + } + + set requiresDedicatedAllocation(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryDedicatedRequirementsKHR.ts b/api/struct/MemoryDedicatedRequirementsKHR.ts new file mode 100644 index 0000000..0df15d6 --- /dev/null +++ b/api/struct/MemoryDedicatedRequirementsKHR.ts @@ -0,0 +1,2 @@ + import { MemoryDedicatedRequirements } from "./MemoryDedicatedRequirements.ts"; + export type MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements; \ No newline at end of file diff --git a/api/struct/MemoryFdPropertiesKHR.ts b/api/struct/MemoryFdPropertiesKHR.ts new file mode 100644 index 0000000..8f6ae98 --- /dev/null +++ b/api/struct/MemoryFdPropertiesKHR.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMemoryFdPropertiesKHR { + pNext?: AnyPointer; + memoryTypeBits?: number; +} + +export class MemoryFdPropertiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryFdPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryFdPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryFdPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryFdPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryFdPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryFdPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_FD_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryTypeBits(): number { + return this.#view.getUint32(16, LE); + } + + set memoryTypeBits(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryGetAndroidHardwareBufferInfoANDROID.ts b/api/struct/MemoryGetAndroidHardwareBufferInfoANDROID.ts new file mode 100644 index 0000000..87413a2 --- /dev/null +++ b/api/struct/MemoryGetAndroidHardwareBufferInfoANDROID.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceMemory } from "../def.ts"; + +export interface InitMemoryGetAndroidHardwareBufferInfoANDROID { + pNext?: AnyPointer; + memory?: DeviceMemory; +} + +export class MemoryGetAndroidHardwareBufferInfoANDROID implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryGetAndroidHardwareBufferInfoANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetAndroidHardwareBufferInfoANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryGetAndroidHardwareBufferInfoANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryGetAndroidHardwareBufferInfoANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryGetAndroidHardwareBufferInfoANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memory !== undefined) this.memory = data.memory; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetAndroidHardwareBufferInfoANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryGetFdInfoKHR.ts b/api/struct/MemoryGetFdInfoKHR.ts new file mode 100644 index 0000000..efebee9 --- /dev/null +++ b/api/struct/MemoryGetFdInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; +import { DeviceMemory } from "../def.ts"; + +export interface InitMemoryGetFdInfoKHR { + pNext?: AnyPointer; + memory?: DeviceMemory; + handleType?: ExternalMemoryHandleTypeFlagBits; +} + +export class MemoryGetFdInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryGetFdInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetFdInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryGetFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryGetFdInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryGetFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memory !== undefined) this.memory = data.memory; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetFdInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_GET_FD_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryGetRemoteAddressInfoNV.ts b/api/struct/MemoryGetRemoteAddressInfoNV.ts new file mode 100644 index 0000000..cf49e25 --- /dev/null +++ b/api/struct/MemoryGetRemoteAddressInfoNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; +import { DeviceMemory } from "../def.ts"; + +export interface InitMemoryGetRemoteAddressInfoNV { + pNext?: AnyPointer; + memory?: DeviceMemory; + handleType?: ExternalMemoryHandleTypeFlagBits; +} + +export class MemoryGetRemoteAddressInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryGetRemoteAddressInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetRemoteAddressInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryGetRemoteAddressInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryGetRemoteAddressInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryGetRemoteAddressInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memory !== undefined) this.memory = data.memory; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetRemoteAddressInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_GET_REMOTE_ADDRESS_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryGetWin32HandleInfoKHR.ts b/api/struct/MemoryGetWin32HandleInfoKHR.ts new file mode 100644 index 0000000..aeb516b --- /dev/null +++ b/api/struct/MemoryGetWin32HandleInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; +import { DeviceMemory } from "../def.ts"; + +export interface InitMemoryGetWin32HandleInfoKHR { + pNext?: AnyPointer; + memory?: DeviceMemory; + handleType?: ExternalMemoryHandleTypeFlagBits; +} + +export class MemoryGetWin32HandleInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryGetWin32HandleInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetWin32HandleInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryGetWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryGetWin32HandleInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryGetWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memory !== undefined) this.memory = data.memory; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetWin32HandleInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_GET_WIN32_HANDLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryGetZirconHandleInfoFUCHSIA.ts b/api/struct/MemoryGetZirconHandleInfoFUCHSIA.ts new file mode 100644 index 0000000..5139a70 --- /dev/null +++ b/api/struct/MemoryGetZirconHandleInfoFUCHSIA.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; +import { DeviceMemory } from "../def.ts"; + +export interface InitMemoryGetZirconHandleInfoFUCHSIA { + pNext?: AnyPointer; + memory?: DeviceMemory; + handleType?: ExternalMemoryHandleTypeFlagBits; +} + +export class MemoryGetZirconHandleInfoFUCHSIA implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryGetZirconHandleInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetZirconHandleInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryGetZirconHandleInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryGetZirconHandleInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryGetZirconHandleInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memory !== undefined) this.memory = data.memory; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetZirconHandleInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryHeap.ts b/api/struct/MemoryHeap.ts new file mode 100644 index 0000000..f24292b --- /dev/null +++ b/api/struct/MemoryHeap.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceSize, MemoryHeapFlags } from "../def.ts"; + +export interface InitMemoryHeap { + size?: DeviceSize; + flags?: MemoryHeapFlags; +} + +export class MemoryHeap implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryHeap); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryHeap) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryHeap.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryHeap.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryHeap.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.size !== undefined) this.size = data.size; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryHeap.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get size(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get flags(): number { + return this.#view.getUint32(8, LE); + } + + set flags(value: MemoryHeapFlags) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryHostPointerPropertiesEXT.ts b/api/struct/MemoryHostPointerPropertiesEXT.ts new file mode 100644 index 0000000..5be883d --- /dev/null +++ b/api/struct/MemoryHostPointerPropertiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMemoryHostPointerPropertiesEXT { + pNext?: AnyPointer; + memoryTypeBits?: number; +} + +export class MemoryHostPointerPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryHostPointerPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryHostPointerPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryHostPointerPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryHostPointerPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryHostPointerPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryHostPointerPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_HOST_POINTER_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryTypeBits(): number { + return this.#view.getUint32(16, LE); + } + + set memoryTypeBits(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryOpaqueCaptureAddressAllocateInfo.ts b/api/struct/MemoryOpaqueCaptureAddressAllocateInfo.ts new file mode 100644 index 0000000..7dd88c3 --- /dev/null +++ b/api/struct/MemoryOpaqueCaptureAddressAllocateInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMemoryOpaqueCaptureAddressAllocateInfo { + pNext?: AnyPointer; + opaqueCaptureAddress?: number | bigint; +} + +export class MemoryOpaqueCaptureAddressAllocateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryOpaqueCaptureAddressAllocateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryOpaqueCaptureAddressAllocateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryOpaqueCaptureAddressAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryOpaqueCaptureAddressAllocateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryOpaqueCaptureAddressAllocateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.opaqueCaptureAddress !== undefined) this.opaqueCaptureAddress = data.opaqueCaptureAddress; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryOpaqueCaptureAddressAllocateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get opaqueCaptureAddress(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set opaqueCaptureAddress(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryOpaqueCaptureAddressAllocateInfoKHR.ts b/api/struct/MemoryOpaqueCaptureAddressAllocateInfoKHR.ts new file mode 100644 index 0000000..2e7e038 --- /dev/null +++ b/api/struct/MemoryOpaqueCaptureAddressAllocateInfoKHR.ts @@ -0,0 +1,2 @@ + import { MemoryOpaqueCaptureAddressAllocateInfo } from "./MemoryOpaqueCaptureAddressAllocateInfo.ts"; + export type MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo; \ No newline at end of file diff --git a/api/struct/MemoryPriorityAllocateInfoEXT.ts b/api/struct/MemoryPriorityAllocateInfoEXT.ts new file mode 100644 index 0000000..f5351b4 --- /dev/null +++ b/api/struct/MemoryPriorityAllocateInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMemoryPriorityAllocateInfoEXT { + pNext?: AnyPointer; + priority?: number; +} + +export class MemoryPriorityAllocateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryPriorityAllocateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryPriorityAllocateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryPriorityAllocateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryPriorityAllocateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryPriorityAllocateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.priority !== undefined) this.priority = data.priority; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryPriorityAllocateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_PRIORITY_ALLOCATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get priority(): number { + return this.#view.getFloat32(16, LE); + } + + set priority(value: number) { + this.#view.setFloat32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryRequirements.ts b/api/struct/MemoryRequirements.ts new file mode 100644 index 0000000..da4455d --- /dev/null +++ b/api/struct/MemoryRequirements.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitMemoryRequirements { + size?: DeviceSize; + alignment?: DeviceSize; + memoryTypeBits?: number; +} + +export class MemoryRequirements implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryRequirements); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryRequirements) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryRequirements.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.size !== undefined) this.size = data.size; + if (data.alignment !== undefined) this.alignment = data.alignment; + if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryRequirements.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get size(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get alignment(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set alignment(value: DeviceSize) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get memoryTypeBits(): number { + return this.#view.getUint32(16, LE); + } + + set memoryTypeBits(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryRequirements2.ts b/api/struct/MemoryRequirements2.ts new file mode 100644 index 0000000..6b08de4 --- /dev/null +++ b/api/struct/MemoryRequirements2.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {MemoryRequirements} from "./MemoryRequirements.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMemoryRequirements2 { + pNext?: AnyPointer; + memoryRequirements?: MemoryRequirements; +} + +export class MemoryRequirements2 implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryRequirements2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryRequirements2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryRequirements2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryRequirements2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryRequirements2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryRequirements !== undefined) this.memoryRequirements = data.memoryRequirements; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryRequirements2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_REQUIREMENTS_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryRequirements(): MemoryRequirements { + return new MemoryRequirements(this.#data.subarray(16, 16 + MemoryRequirements.size)); + } + + set memoryRequirements(value: MemoryRequirements) { + if (value[BUFFER].byteLength < MemoryRequirements.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/MemoryRequirements2KHR.ts b/api/struct/MemoryRequirements2KHR.ts new file mode 100644 index 0000000..31cac70 --- /dev/null +++ b/api/struct/MemoryRequirements2KHR.ts @@ -0,0 +1,2 @@ + import { MemoryRequirements2 } from "./MemoryRequirements2.ts"; + export type MemoryRequirements2KHR = MemoryRequirements2; \ No newline at end of file diff --git a/api/struct/MemoryType.ts b/api/struct/MemoryType.ts new file mode 100644 index 0000000..47a2a00 --- /dev/null +++ b/api/struct/MemoryType.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { MemoryPropertyFlags } from "../def.ts"; + +export interface InitMemoryType { + propertyFlags?: MemoryPropertyFlags; + heapIndex?: number; +} + +export class MemoryType implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryType); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryType) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryType.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryType.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryType.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.propertyFlags !== undefined) this.propertyFlags = data.propertyFlags; + if (data.heapIndex !== undefined) this.heapIndex = data.heapIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryType.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get propertyFlags(): number { + return this.#view.getUint32(0, LE); + } + + set propertyFlags(value: MemoryPropertyFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get heapIndex(): number { + return this.#view.getUint32(4, LE); + } + + set heapIndex(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryWin32HandlePropertiesKHR.ts b/api/struct/MemoryWin32HandlePropertiesKHR.ts new file mode 100644 index 0000000..d20d978 --- /dev/null +++ b/api/struct/MemoryWin32HandlePropertiesKHR.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMemoryWin32HandlePropertiesKHR { + pNext?: AnyPointer; + memoryTypeBits?: number; +} + +export class MemoryWin32HandlePropertiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryWin32HandlePropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryWin32HandlePropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryWin32HandlePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryWin32HandlePropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryWin32HandlePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryWin32HandlePropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_WIN32_HANDLE_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryTypeBits(): number { + return this.#view.getUint32(16, LE); + } + + set memoryTypeBits(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MemoryZirconHandlePropertiesFUCHSIA.ts b/api/struct/MemoryZirconHandlePropertiesFUCHSIA.ts new file mode 100644 index 0000000..d56e166 --- /dev/null +++ b/api/struct/MemoryZirconHandlePropertiesFUCHSIA.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMemoryZirconHandlePropertiesFUCHSIA { + pNext?: AnyPointer; + memoryTypeBits?: number; +} + +export class MemoryZirconHandlePropertiesFUCHSIA implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMemoryZirconHandlePropertiesFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryZirconHandlePropertiesFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MemoryZirconHandlePropertiesFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MemoryZirconHandlePropertiesFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MemoryZirconHandlePropertiesFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryZirconHandlePropertiesFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryTypeBits(): number { + return this.#view.getUint32(16, LE); + } + + set memoryTypeBits(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MetalSurfaceCreateInfoEXT.ts b/api/struct/MetalSurfaceCreateInfoEXT.ts new file mode 100644 index 0000000..9272acc --- /dev/null +++ b/api/struct/MetalSurfaceCreateInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { MetalSurfaceCreateFlagsEXT } from "../def.ts"; + +export interface InitMetalSurfaceCreateInfoEXT { + pNext?: AnyPointer; + flags?: MetalSurfaceCreateFlagsEXT; + pLayer?: AnyPointer; +} + +export class MetalSurfaceCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMetalSurfaceCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMetalSurfaceCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MetalSurfaceCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MetalSurfaceCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MetalSurfaceCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pLayer !== undefined) this.pLayer = data.pLayer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MetalSurfaceCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.METAL_SURFACE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: MetalSurfaceCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get pLayer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pLayer(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/MicromapBuildInfoEXT.ts b/api/struct/MicromapBuildInfoEXT.ts new file mode 100644 index 0000000..5d3433c --- /dev/null +++ b/api/struct/MicromapBuildInfoEXT.ts @@ -0,0 +1,182 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {MicromapUsageEXT} from "./MicromapUsageEXT.ts"; +import { StructureType, MicromapTypeEXT, BuildMicromapModeEXT } from "../enum.ts"; +import { BuildMicromapFlagsEXT, MicromapEXT, DeviceSize } from "../def.ts"; +import { DeviceOrHostAddressConstKHR, DeviceOrHostAddressKHR } from "../union.ts"; + +export interface InitMicromapBuildInfoEXT { + pNext?: AnyPointer; + type?: MicromapTypeEXT; + flags?: BuildMicromapFlagsEXT; + mode?: BuildMicromapModeEXT; + dstMicromap?: MicromapEXT; + usageCountsCount?: number; + pUsageCounts?: AnyPointer; + ppUsageCounts?: AnyPointer; + data?: DeviceOrHostAddressConstKHR; + scratchData?: DeviceOrHostAddressKHR; + triangleArray?: DeviceOrHostAddressConstKHR; + triangleArrayStride?: DeviceSize; +} + +export class MicromapBuildInfoEXT implements BaseStruct { + static size = 96; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMicromapBuildInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapBuildInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MicromapBuildInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MicromapBuildInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MicromapBuildInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.type !== undefined) this.type = data.type; + if (data.flags !== undefined) this.flags = data.flags; + if (data.mode !== undefined) this.mode = data.mode; + if (data.dstMicromap !== undefined) this.dstMicromap = data.dstMicromap; + if (data.usageCountsCount !== undefined) this.usageCountsCount = data.usageCountsCount; + if (data.pUsageCounts !== undefined) this.pUsageCounts = data.pUsageCounts; + if (data.ppUsageCounts !== undefined) this.ppUsageCounts = data.ppUsageCounts; + if (data.data !== undefined) this.data = data.data; + if (data.scratchData !== undefined) this.scratchData = data.scratchData; + if (data.triangleArray !== undefined) this.triangleArray = data.triangleArray; + if (data.triangleArrayStride !== undefined) this.triangleArrayStride = data.triangleArrayStride; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapBuildInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MICROMAP_BUILD_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get type(): number { + return this.#view.getUint32(16, LE); + } + + set type(value: MicromapTypeEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(20, LE); + } + + set flags(value: BuildMicromapFlagsEXT) { + this.#view.setUint32(20, Number(value), LE); + } + + get mode(): number { + return this.#view.getUint32(24, LE); + } + + set mode(value: BuildMicromapModeEXT) { + this.#view.setUint32(24, Number(value), LE); + } + + get dstMicromap(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set dstMicromap(value: MicromapEXT) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get usageCountsCount(): number { + return this.#view.getUint32(40, LE); + } + + set usageCountsCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get pUsageCounts(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pUsageCounts(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get ppUsageCounts(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set ppUsageCounts(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get data(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set data(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get scratchData(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set scratchData(value: DeviceOrHostAddressKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get triangleArray(): unknown { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + set triangleArray(value: DeviceOrHostAddressConstKHR) { + throw new Error(`Unknown type: {"union":["u64","buffer"]}`); + } + + get triangleArrayStride(): bigint { + return this.#view.getBigUint64(88, LE); + } + + set triangleArrayStride(value: DeviceSize) { + this.#view.setBigUint64(88, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MicromapBuildSizesInfoEXT.ts b/api/struct/MicromapBuildSizesInfoEXT.ts new file mode 100644 index 0000000..6144f46 --- /dev/null +++ b/api/struct/MicromapBuildSizesInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize, Bool32 } from "../def.ts"; + +export interface InitMicromapBuildSizesInfoEXT { + pNext?: AnyPointer; + micromapSize?: DeviceSize; + buildScratchSize?: DeviceSize; + discardable?: Bool32; +} + +export class MicromapBuildSizesInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMicromapBuildSizesInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapBuildSizesInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MicromapBuildSizesInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MicromapBuildSizesInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MicromapBuildSizesInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.micromapSize !== undefined) this.micromapSize = data.micromapSize; + if (data.buildScratchSize !== undefined) this.buildScratchSize = data.buildScratchSize; + if (data.discardable !== undefined) this.discardable = data.discardable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapBuildSizesInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MICROMAP_BUILD_SIZES_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get micromapSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set micromapSize(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get buildScratchSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set buildScratchSize(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get discardable(): number { + return this.#view.getUint32(32, LE); + } + + set discardable(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MicromapCreateInfoEXT.ts b/api/struct/MicromapCreateInfoEXT.ts new file mode 100644 index 0000000..ae180cc --- /dev/null +++ b/api/struct/MicromapCreateInfoEXT.ts @@ -0,0 +1,130 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, MicromapTypeEXT } from "../enum.ts"; +import { MicromapCreateFlagsEXT, Buffer, DeviceSize, DeviceAddress } from "../def.ts"; + +export interface InitMicromapCreateInfoEXT { + pNext?: AnyPointer; + createFlags?: MicromapCreateFlagsEXT; + buffer?: Buffer; + offset?: DeviceSize; + size?: DeviceSize; + type?: MicromapTypeEXT; + deviceAddress?: DeviceAddress; +} + +export class MicromapCreateInfoEXT implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMicromapCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MicromapCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MicromapCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MicromapCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.createFlags !== undefined) this.createFlags = data.createFlags; + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.offset !== undefined) this.offset = data.offset; + if (data.size !== undefined) this.size = data.size; + if (data.type !== undefined) this.type = data.type; + if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MICROMAP_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get createFlags(): number { + return this.#view.getUint32(16, LE); + } + + set createFlags(value: MicromapCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get offset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get type(): number { + return this.#view.getUint32(48, LE); + } + + set type(value: MicromapTypeEXT) { + this.#view.setUint32(48, Number(value), LE); + } + + get deviceAddress(): bigint { + return this.#view.getBigUint64(56, LE); + } + + set deviceAddress(value: DeviceAddress) { + this.#view.setBigUint64(56, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MicromapTriangleEXT.ts b/api/struct/MicromapTriangleEXT.ts new file mode 100644 index 0000000..f3172e8 --- /dev/null +++ b/api/struct/MicromapTriangleEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitMicromapTriangleEXT { + dataOffset?: number; + subdivisionLevel?: number; + format?: number; +} + +export class MicromapTriangleEXT implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMicromapTriangleEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapTriangleEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MicromapTriangleEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MicromapTriangleEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MicromapTriangleEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.dataOffset !== undefined) this.dataOffset = data.dataOffset; + if (data.subdivisionLevel !== undefined) this.subdivisionLevel = data.subdivisionLevel; + if (data.format !== undefined) this.format = data.format; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapTriangleEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get dataOffset(): number { + return this.#view.getUint32(0, LE); + } + + set dataOffset(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get subdivisionLevel(): number { + return this.#view.getUint16(4, LE); + } + + set subdivisionLevel(value: number) { + this.#view.setUint16(4, Number(value), LE); + } + + get format(): number { + return this.#view.getUint16(6, LE); + } + + set format(value: number) { + this.#view.setUint16(6, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MicromapUsageEXT.ts b/api/struct/MicromapUsageEXT.ts new file mode 100644 index 0000000..809fa83 --- /dev/null +++ b/api/struct/MicromapUsageEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitMicromapUsageEXT { + count?: number; + subdivisionLevel?: number; + format?: number; +} + +export class MicromapUsageEXT implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMicromapUsageEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapUsageEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MicromapUsageEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MicromapUsageEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MicromapUsageEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.count !== undefined) this.count = data.count; + if (data.subdivisionLevel !== undefined) this.subdivisionLevel = data.subdivisionLevel; + if (data.format !== undefined) this.format = data.format; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapUsageEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get count(): number { + return this.#view.getUint32(0, LE); + } + + set count(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get subdivisionLevel(): number { + return this.#view.getUint32(4, LE); + } + + set subdivisionLevel(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get format(): number { + return this.#view.getUint32(8, LE); + } + + set format(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MicromapVersionInfoEXT.ts b/api/struct/MicromapVersionInfoEXT.ts new file mode 100644 index 0000000..780c82c --- /dev/null +++ b/api/struct/MicromapVersionInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMicromapVersionInfoEXT { + pNext?: AnyPointer; + pVersionData?: AnyPointer; +} + +export class MicromapVersionInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMicromapVersionInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapVersionInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MicromapVersionInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MicromapVersionInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MicromapVersionInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pVersionData !== undefined) this.pVersionData = data.pVersionData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapVersionInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MICROMAP_VERSION_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pVersionData(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pVersionData(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/MultiDrawIndexedInfoEXT.ts b/api/struct/MultiDrawIndexedInfoEXT.ts new file mode 100644 index 0000000..7a6c919 --- /dev/null +++ b/api/struct/MultiDrawIndexedInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitMultiDrawIndexedInfoEXT { + firstIndex?: number; + indexCount?: number; + vertexOffset?: number; +} + +export class MultiDrawIndexedInfoEXT implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMultiDrawIndexedInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMultiDrawIndexedInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MultiDrawIndexedInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MultiDrawIndexedInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MultiDrawIndexedInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.firstIndex !== undefined) this.firstIndex = data.firstIndex; + if (data.indexCount !== undefined) this.indexCount = data.indexCount; + if (data.vertexOffset !== undefined) this.vertexOffset = data.vertexOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultiDrawIndexedInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get firstIndex(): number { + return this.#view.getUint32(0, LE); + } + + set firstIndex(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get indexCount(): number { + return this.#view.getUint32(4, LE); + } + + set indexCount(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get vertexOffset(): number { + return this.#view.getInt32(8, LE); + } + + set vertexOffset(value: number) { + this.#view.setInt32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MultiDrawInfoEXT.ts b/api/struct/MultiDrawInfoEXT.ts new file mode 100644 index 0000000..8579c18 --- /dev/null +++ b/api/struct/MultiDrawInfoEXT.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitMultiDrawInfoEXT { + firstVertex?: number; + vertexCount?: number; +} + +export class MultiDrawInfoEXT implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMultiDrawInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMultiDrawInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MultiDrawInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MultiDrawInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MultiDrawInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.firstVertex !== undefined) this.firstVertex = data.firstVertex; + if (data.vertexCount !== undefined) this.vertexCount = data.vertexCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultiDrawInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get firstVertex(): number { + return this.#view.getUint32(0, LE); + } + + set firstVertex(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get vertexCount(): number { + return this.#view.getUint32(4, LE); + } + + set vertexCount(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MultisamplePropertiesEXT.ts b/api/struct/MultisamplePropertiesEXT.ts new file mode 100644 index 0000000..598cee2 --- /dev/null +++ b/api/struct/MultisamplePropertiesEXT.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMultisamplePropertiesEXT { + pNext?: AnyPointer; + maxSampleLocationGridSize?: Extent2D; +} + +export class MultisamplePropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMultisamplePropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMultisamplePropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MultisamplePropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MultisamplePropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MultisamplePropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxSampleLocationGridSize !== undefined) this.maxSampleLocationGridSize = data.maxSampleLocationGridSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultisamplePropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MULTISAMPLE_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxSampleLocationGridSize(): Extent2D { + return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); + } + + set maxSampleLocationGridSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/MultisampledRenderToSingleSampledInfoEXT.ts b/api/struct/MultisampledRenderToSingleSampledInfoEXT.ts new file mode 100644 index 0000000..4aada5e --- /dev/null +++ b/api/struct/MultisampledRenderToSingleSampledInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SampleCountFlagBits } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitMultisampledRenderToSingleSampledInfoEXT { + pNext?: AnyPointer; + multisampledRenderToSingleSampledEnable?: Bool32; + rasterizationSamples?: SampleCountFlagBits; +} + +export class MultisampledRenderToSingleSampledInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMultisampledRenderToSingleSampledInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMultisampledRenderToSingleSampledInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MultisampledRenderToSingleSampledInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MultisampledRenderToSingleSampledInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MultisampledRenderToSingleSampledInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.multisampledRenderToSingleSampledEnable !== undefined) this.multisampledRenderToSingleSampledEnable = data.multisampledRenderToSingleSampledEnable; + if (data.rasterizationSamples !== undefined) this.rasterizationSamples = data.rasterizationSamples; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultisampledRenderToSingleSampledInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get multisampledRenderToSingleSampledEnable(): number { + return this.#view.getUint32(16, LE); + } + + set multisampledRenderToSingleSampledEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get rasterizationSamples(): number { + return this.#view.getUint32(20, LE); + } + + set rasterizationSamples(value: SampleCountFlagBits) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MultiviewPerViewAttributesInfoNVX.ts b/api/struct/MultiviewPerViewAttributesInfoNVX.ts new file mode 100644 index 0000000..5245bfc --- /dev/null +++ b/api/struct/MultiviewPerViewAttributesInfoNVX.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitMultiviewPerViewAttributesInfoNVX { + pNext?: AnyPointer; + perViewAttributes?: Bool32; + perViewAttributesPositionXOnly?: Bool32; +} + +export class MultiviewPerViewAttributesInfoNVX implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMultiviewPerViewAttributesInfoNVX); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMultiviewPerViewAttributesInfoNVX) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MultiviewPerViewAttributesInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MultiviewPerViewAttributesInfoNVX.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MultiviewPerViewAttributesInfoNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.perViewAttributes !== undefined) this.perViewAttributes = data.perViewAttributes; + if (data.perViewAttributesPositionXOnly !== undefined) this.perViewAttributesPositionXOnly = data.perViewAttributesPositionXOnly; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultiviewPerViewAttributesInfoNVX.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get perViewAttributes(): number { + return this.#view.getUint32(16, LE); + } + + set perViewAttributes(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get perViewAttributesPositionXOnly(): number { + return this.#view.getUint32(20, LE); + } + + set perViewAttributesPositionXOnly(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/MutableDescriptorTypeCreateInfoEXT.ts b/api/struct/MutableDescriptorTypeCreateInfoEXT.ts new file mode 100644 index 0000000..a14d1b8 --- /dev/null +++ b/api/struct/MutableDescriptorTypeCreateInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {MutableDescriptorTypeListEXT} from "./MutableDescriptorTypeListEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitMutableDescriptorTypeCreateInfoEXT { + pNext?: AnyPointer; + mutableDescriptorTypeListCount?: number; + pMutableDescriptorTypeLists?: AnyPointer; +} + +export class MutableDescriptorTypeCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMutableDescriptorTypeCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMutableDescriptorTypeCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MutableDescriptorTypeCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MutableDescriptorTypeCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MutableDescriptorTypeCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.mutableDescriptorTypeListCount !== undefined) this.mutableDescriptorTypeListCount = data.mutableDescriptorTypeListCount; + if (data.pMutableDescriptorTypeLists !== undefined) this.pMutableDescriptorTypeLists = data.pMutableDescriptorTypeLists; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MutableDescriptorTypeCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get mutableDescriptorTypeListCount(): number { + return this.#view.getUint32(16, LE); + } + + set mutableDescriptorTypeListCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pMutableDescriptorTypeLists(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pMutableDescriptorTypeLists(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/MutableDescriptorTypeCreateInfoVALVE.ts b/api/struct/MutableDescriptorTypeCreateInfoVALVE.ts new file mode 100644 index 0000000..ad2c7ac --- /dev/null +++ b/api/struct/MutableDescriptorTypeCreateInfoVALVE.ts @@ -0,0 +1,2 @@ + import { MutableDescriptorTypeCreateInfoEXT } from "./MutableDescriptorTypeCreateInfoEXT.ts"; + export type MutableDescriptorTypeCreateInfoVALVE = MutableDescriptorTypeCreateInfoEXT; \ No newline at end of file diff --git a/api/struct/MutableDescriptorTypeListEXT.ts b/api/struct/MutableDescriptorTypeListEXT.ts new file mode 100644 index 0000000..3830d18 --- /dev/null +++ b/api/struct/MutableDescriptorTypeListEXT.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DescriptorType } from "../enum.ts"; + +export interface InitMutableDescriptorTypeListEXT { + descriptorTypeCount?: number; + pDescriptorTypes?: AnyPointer; +} + +export class MutableDescriptorTypeListEXT implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitMutableDescriptorTypeListEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitMutableDescriptorTypeListEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(MutableDescriptorTypeListEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < MutableDescriptorTypeListEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(MutableDescriptorTypeListEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.descriptorTypeCount !== undefined) this.descriptorTypeCount = data.descriptorTypeCount; + if (data.pDescriptorTypes !== undefined) this.pDescriptorTypes = data.pDescriptorTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MutableDescriptorTypeListEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get descriptorTypeCount(): number { + return this.#view.getUint32(0, LE); + } + + set descriptorTypeCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get pDescriptorTypes(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pDescriptorTypes(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/MutableDescriptorTypeListVALVE.ts b/api/struct/MutableDescriptorTypeListVALVE.ts new file mode 100644 index 0000000..7bc5984 --- /dev/null +++ b/api/struct/MutableDescriptorTypeListVALVE.ts @@ -0,0 +1,2 @@ + import { MutableDescriptorTypeListEXT } from "./MutableDescriptorTypeListEXT.ts"; + export type MutableDescriptorTypeListVALVE = MutableDescriptorTypeListEXT; \ No newline at end of file diff --git a/api/struct/NativeBufferANDROID.ts b/api/struct/NativeBufferANDROID.ts new file mode 100644 index 0000000..2adfd89 --- /dev/null +++ b/api/struct/NativeBufferANDROID.ts @@ -0,0 +1,123 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {NativeBufferUsage2ANDROID} from "./NativeBufferUsage2ANDROID.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitNativeBufferANDROID { + pNext?: AnyPointer; + handle?: AnyPointer; + stride?: number; + format?: number; + usage?: number; + usage2?: NativeBufferUsage2ANDROID; +} + +export class NativeBufferANDROID implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitNativeBufferANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitNativeBufferANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(NativeBufferANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < NativeBufferANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(NativeBufferANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handle !== undefined) this.handle = data.handle; + if (data.stride !== undefined) this.stride = data.stride; + if (data.format !== undefined) this.format = data.format; + if (data.usage !== undefined) this.usage = data.usage; + if (data.usage2 !== undefined) this.usage2 = data.usage2; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, NativeBufferANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.NATIVE_BUFFER_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handle(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set handle(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get stride(): number { + return this.#view.getInt32(24, LE); + } + + set stride(value: number) { + this.#view.setInt32(24, Number(value), LE); + } + + get format(): number { + return this.#view.getInt32(28, LE); + } + + set format(value: number) { + this.#view.setInt32(28, Number(value), LE); + } + + get usage(): number { + return this.#view.getInt32(32, LE); + } + + set usage(value: number) { + this.#view.setInt32(32, Number(value), LE); + } + + get usage2(): NativeBufferUsage2ANDROID { + return new NativeBufferUsage2ANDROID(this.#data.subarray(40, 40 + NativeBufferUsage2ANDROID.size)); + } + + set usage2(value: NativeBufferUsage2ANDROID) { + if (value[BUFFER].byteLength < NativeBufferUsage2ANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } +} \ No newline at end of file diff --git a/api/struct/NativeBufferUsage2ANDROID.ts b/api/struct/NativeBufferUsage2ANDROID.ts new file mode 100644 index 0000000..cfc77b1 --- /dev/null +++ b/api/struct/NativeBufferUsage2ANDROID.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitNativeBufferUsage2ANDROID { + consumer?: number | bigint; + producer?: number | bigint; +} + +export class NativeBufferUsage2ANDROID implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitNativeBufferUsage2ANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitNativeBufferUsage2ANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(NativeBufferUsage2ANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < NativeBufferUsage2ANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(NativeBufferUsage2ANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.consumer !== undefined) this.consumer = data.consumer; + if (data.producer !== undefined) this.producer = data.producer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, NativeBufferUsage2ANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get consumer(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set consumer(value: number | bigint) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get producer(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set producer(value: number | bigint) { + this.#view.setBigUint64(8, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/Offset2D.ts b/api/struct/Offset2D.ts new file mode 100644 index 0000000..a597c0b --- /dev/null +++ b/api/struct/Offset2D.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitOffset2D { + x?: number; + y?: number; +} + +export class Offset2D implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitOffset2D); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitOffset2D) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(Offset2D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(Offset2D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.x !== undefined) this.x = data.x; + if (data.y !== undefined) this.y = data.y; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Offset2D.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get x(): number { + return this.#view.getInt32(0, LE); + } + + set x(value: number) { + this.#view.setInt32(0, Number(value), LE); + } + + get y(): number { + return this.#view.getInt32(4, LE); + } + + set y(value: number) { + this.#view.setInt32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/Offset3D.ts b/api/struct/Offset3D.ts new file mode 100644 index 0000000..96ef0b9 --- /dev/null +++ b/api/struct/Offset3D.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitOffset3D { + x?: number; + y?: number; + z?: number; +} + +export class Offset3D implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitOffset3D); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitOffset3D) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(Offset3D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(Offset3D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.x !== undefined) this.x = data.x; + if (data.y !== undefined) this.y = data.y; + if (data.z !== undefined) this.z = data.z; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Offset3D.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get x(): number { + return this.#view.getInt32(0, LE); + } + + set x(value: number) { + this.#view.setInt32(0, Number(value), LE); + } + + get y(): number { + return this.#view.getInt32(4, LE); + } + + set y(value: number) { + this.#view.setInt32(4, Number(value), LE); + } + + get z(): number { + return this.#view.getInt32(8, LE); + } + + set z(value: number) { + this.#view.setInt32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/OpaqueCaptureDescriptorDataCreateInfoEXT.ts b/api/struct/OpaqueCaptureDescriptorDataCreateInfoEXT.ts new file mode 100644 index 0000000..4a495af --- /dev/null +++ b/api/struct/OpaqueCaptureDescriptorDataCreateInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitOpaqueCaptureDescriptorDataCreateInfoEXT { + pNext?: AnyPointer; + opaqueCaptureDescriptorData?: AnyPointer; +} + +export class OpaqueCaptureDescriptorDataCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitOpaqueCaptureDescriptorDataCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitOpaqueCaptureDescriptorDataCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(OpaqueCaptureDescriptorDataCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < OpaqueCaptureDescriptorDataCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(OpaqueCaptureDescriptorDataCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.opaqueCaptureDescriptorData !== undefined) this.opaqueCaptureDescriptorData = data.opaqueCaptureDescriptorData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpaqueCaptureDescriptorDataCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get opaqueCaptureDescriptorData(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set opaqueCaptureDescriptorData(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/OpticalFlowExecuteInfoNV.ts b/api/struct/OpticalFlowExecuteInfoNV.ts new file mode 100644 index 0000000..a4d09b0 --- /dev/null +++ b/api/struct/OpticalFlowExecuteInfoNV.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; +import { StructureType } from "../enum.ts"; +import { OpticalFlowExecuteFlagsNV } from "../def.ts"; + +export interface InitOpticalFlowExecuteInfoNV { + pNext?: AnyPointer; + flags?: OpticalFlowExecuteFlagsNV; + regionCount?: number; + pRegions?: AnyPointer; +} + +export class OpticalFlowExecuteInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitOpticalFlowExecuteInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowExecuteInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(OpticalFlowExecuteInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < OpticalFlowExecuteInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(OpticalFlowExecuteInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.regionCount !== undefined) this.regionCount = data.regionCount; + if (data.pRegions !== undefined) this.pRegions = data.pRegions; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowExecuteInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.OPTICAL_FLOW_EXECUTE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: OpticalFlowExecuteFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get regionCount(): number { + return this.#view.getUint32(20, LE); + } + + set regionCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pRegions(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pRegions(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/OpticalFlowImageFormatInfoNV.ts b/api/struct/OpticalFlowImageFormatInfoNV.ts new file mode 100644 index 0000000..f171802 --- /dev/null +++ b/api/struct/OpticalFlowImageFormatInfoNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { OpticalFlowUsageFlagsNV } from "../def.ts"; + +export interface InitOpticalFlowImageFormatInfoNV { + pNext?: AnyPointer; + usage?: OpticalFlowUsageFlagsNV; +} + +export class OpticalFlowImageFormatInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitOpticalFlowImageFormatInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowImageFormatInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(OpticalFlowImageFormatInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < OpticalFlowImageFormatInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(OpticalFlowImageFormatInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.usage !== undefined) this.usage = data.usage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowImageFormatInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get usage(): number { + return this.#view.getUint32(16, LE); + } + + set usage(value: OpticalFlowUsageFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/OpticalFlowImageFormatPropertiesNV.ts b/api/struct/OpticalFlowImageFormatPropertiesNV.ts new file mode 100644 index 0000000..d2ddd8f --- /dev/null +++ b/api/struct/OpticalFlowImageFormatPropertiesNV.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format } from "../enum.ts"; + +export interface InitOpticalFlowImageFormatPropertiesNV { + pNext?: AnyPointer; + format?: Format; +} + +export class OpticalFlowImageFormatPropertiesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitOpticalFlowImageFormatPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowImageFormatPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(OpticalFlowImageFormatPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < OpticalFlowImageFormatPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(OpticalFlowImageFormatPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.format !== undefined) this.format = data.format; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowImageFormatPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get format(): number { + return this.#view.getUint32(16, LE); + } + + set format(value: Format) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/OpticalFlowSessionCreateInfoNV.ts b/api/struct/OpticalFlowSessionCreateInfoNV.ts new file mode 100644 index 0000000..d02d211 --- /dev/null +++ b/api/struct/OpticalFlowSessionCreateInfoNV.ts @@ -0,0 +1,160 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format, OpticalFlowPerformanceLevelNV } from "../enum.ts"; +import { OpticalFlowGridSizeFlagsNV, OpticalFlowSessionCreateFlagsNV } from "../def.ts"; + +export interface InitOpticalFlowSessionCreateInfoNV { + pNext?: AnyPointer; + width?: number; + height?: number; + imageFormat?: Format; + flowVectorFormat?: Format; + costFormat?: Format; + outputGridSize?: OpticalFlowGridSizeFlagsNV; + hintGridSize?: OpticalFlowGridSizeFlagsNV; + performanceLevel?: OpticalFlowPerformanceLevelNV; + flags?: OpticalFlowSessionCreateFlagsNV; +} + +export class OpticalFlowSessionCreateInfoNV implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitOpticalFlowSessionCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowSessionCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(OpticalFlowSessionCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < OpticalFlowSessionCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(OpticalFlowSessionCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.width !== undefined) this.width = data.width; + if (data.height !== undefined) this.height = data.height; + if (data.imageFormat !== undefined) this.imageFormat = data.imageFormat; + if (data.flowVectorFormat !== undefined) this.flowVectorFormat = data.flowVectorFormat; + if (data.costFormat !== undefined) this.costFormat = data.costFormat; + if (data.outputGridSize !== undefined) this.outputGridSize = data.outputGridSize; + if (data.hintGridSize !== undefined) this.hintGridSize = data.hintGridSize; + if (data.performanceLevel !== undefined) this.performanceLevel = data.performanceLevel; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowSessionCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.OPTICAL_FLOW_SESSION_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get width(): number { + return this.#view.getUint32(16, LE); + } + + set width(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get height(): number { + return this.#view.getUint32(20, LE); + } + + set height(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get imageFormat(): number { + return this.#view.getUint32(24, LE); + } + + set imageFormat(value: Format) { + this.#view.setUint32(24, Number(value), LE); + } + + get flowVectorFormat(): number { + return this.#view.getUint32(28, LE); + } + + set flowVectorFormat(value: Format) { + this.#view.setUint32(28, Number(value), LE); + } + + get costFormat(): number { + return this.#view.getUint32(32, LE); + } + + set costFormat(value: Format) { + this.#view.setUint32(32, Number(value), LE); + } + + get outputGridSize(): number { + return this.#view.getUint32(36, LE); + } + + set outputGridSize(value: OpticalFlowGridSizeFlagsNV) { + this.#view.setUint32(36, Number(value), LE); + } + + get hintGridSize(): number { + return this.#view.getUint32(40, LE); + } + + set hintGridSize(value: OpticalFlowGridSizeFlagsNV) { + this.#view.setUint32(40, Number(value), LE); + } + + get performanceLevel(): number { + return this.#view.getUint32(44, LE); + } + + set performanceLevel(value: OpticalFlowPerformanceLevelNV) { + this.#view.setUint32(44, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(48, LE); + } + + set flags(value: OpticalFlowSessionCreateFlagsNV) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/OpticalFlowSessionCreatePrivateDataInfoNV.ts b/api/struct/OpticalFlowSessionCreatePrivateDataInfoNV.ts new file mode 100644 index 0000000..bb7654c --- /dev/null +++ b/api/struct/OpticalFlowSessionCreatePrivateDataInfoNV.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitOpticalFlowSessionCreatePrivateDataInfoNV { + pNext?: AnyPointer; + id?: number; + size?: number; + pPrivateData?: AnyPointer; +} + +export class OpticalFlowSessionCreatePrivateDataInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitOpticalFlowSessionCreatePrivateDataInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowSessionCreatePrivateDataInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(OpticalFlowSessionCreatePrivateDataInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < OpticalFlowSessionCreatePrivateDataInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(OpticalFlowSessionCreatePrivateDataInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.id !== undefined) this.id = data.id; + if (data.size !== undefined) this.size = data.size; + if (data.pPrivateData !== undefined) this.pPrivateData = data.pPrivateData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowSessionCreatePrivateDataInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get id(): number { + return this.#view.getUint32(16, LE); + } + + set id(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get size(): number { + return this.#view.getUint32(20, LE); + } + + set size(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pPrivateData(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pPrivateData(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PastPresentationTimingGOOGLE.ts b/api/struct/PastPresentationTimingGOOGLE.ts new file mode 100644 index 0000000..6cd8388 --- /dev/null +++ b/api/struct/PastPresentationTimingGOOGLE.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitPastPresentationTimingGOOGLE { + presentID?: number; + desiredPresentTime?: number | bigint; + actualPresentTime?: number | bigint; + earliestPresentTime?: number | bigint; + presentMargin?: number | bigint; +} + +export class PastPresentationTimingGOOGLE implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPastPresentationTimingGOOGLE); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPastPresentationTimingGOOGLE) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PastPresentationTimingGOOGLE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PastPresentationTimingGOOGLE.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PastPresentationTimingGOOGLE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.presentID !== undefined) this.presentID = data.presentID; + if (data.desiredPresentTime !== undefined) this.desiredPresentTime = data.desiredPresentTime; + if (data.actualPresentTime !== undefined) this.actualPresentTime = data.actualPresentTime; + if (data.earliestPresentTime !== undefined) this.earliestPresentTime = data.earliestPresentTime; + if (data.presentMargin !== undefined) this.presentMargin = data.presentMargin; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PastPresentationTimingGOOGLE.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get presentID(): number { + return this.#view.getUint32(0, LE); + } + + set presentID(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get desiredPresentTime(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set desiredPresentTime(value: number | bigint) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get actualPresentTime(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set actualPresentTime(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get earliestPresentTime(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set earliestPresentTime(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get presentMargin(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set presentMargin(value: number | bigint) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PerformanceConfigurationAcquireInfoINTEL.ts b/api/struct/PerformanceConfigurationAcquireInfoINTEL.ts new file mode 100644 index 0000000..5940aec --- /dev/null +++ b/api/struct/PerformanceConfigurationAcquireInfoINTEL.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PerformanceConfigurationTypeINTEL } from "../enum.ts"; + +export interface InitPerformanceConfigurationAcquireInfoINTEL { + pNext?: AnyPointer; + type?: PerformanceConfigurationTypeINTEL; +} + +export class PerformanceConfigurationAcquireInfoINTEL implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPerformanceConfigurationAcquireInfoINTEL); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceConfigurationAcquireInfoINTEL) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PerformanceConfigurationAcquireInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PerformanceConfigurationAcquireInfoINTEL.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PerformanceConfigurationAcquireInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.type !== undefined) this.type = data.type; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceConfigurationAcquireInfoINTEL.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get type(): number { + return this.#view.getUint32(16, LE); + } + + set type(value: PerformanceConfigurationTypeINTEL) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PerformanceCounterDescriptionKHR.ts b/api/struct/PerformanceCounterDescriptionKHR.ts new file mode 100644 index 0000000..50d7356 --- /dev/null +++ b/api/struct/PerformanceCounterDescriptionKHR.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PerformanceCounterDescriptionFlagsKHR } from "../def.ts"; + +export interface InitPerformanceCounterDescriptionKHR { + pNext?: AnyPointer; + flags?: PerformanceCounterDescriptionFlagsKHR; + name?: Uint8Array; + category?: Uint8Array; + description?: Uint8Array; +} + +export class PerformanceCounterDescriptionKHR implements BaseStruct { + static size = 792; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPerformanceCounterDescriptionKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceCounterDescriptionKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PerformanceCounterDescriptionKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PerformanceCounterDescriptionKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PerformanceCounterDescriptionKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.name !== undefined) this.name = data.name; + if (data.category !== undefined) this.category = data.category; + if (data.description !== undefined) this.description = data.description; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceCounterDescriptionKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PERFORMANCE_COUNTER_DESCRIPTION_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PerformanceCounterDescriptionFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get name(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); + } + + set name(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } + + get category(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); + } + + set category(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 276); + } + + get description(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 532, 256); + } + + set description(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 532); + } +} \ No newline at end of file diff --git a/api/struct/PerformanceCounterKHR.ts b/api/struct/PerformanceCounterKHR.ts new file mode 100644 index 0000000..95d4b76 --- /dev/null +++ b/api/struct/PerformanceCounterKHR.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PerformanceCounterUnitKHR, PerformanceCounterScopeKHR, PerformanceCounterStorageKHR } from "../enum.ts"; + +export interface InitPerformanceCounterKHR { + pNext?: AnyPointer; + unit?: PerformanceCounterUnitKHR; + scope?: PerformanceCounterScopeKHR; + storage?: PerformanceCounterStorageKHR; + uuid?: Uint8Array; +} + +export class PerformanceCounterKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPerformanceCounterKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceCounterKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PerformanceCounterKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PerformanceCounterKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PerformanceCounterKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.unit !== undefined) this.unit = data.unit; + if (data.scope !== undefined) this.scope = data.scope; + if (data.storage !== undefined) this.storage = data.storage; + if (data.uuid !== undefined) this.uuid = data.uuid; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceCounterKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PERFORMANCE_COUNTER_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get unit(): number { + return this.#view.getUint32(16, LE); + } + + set unit(value: PerformanceCounterUnitKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get scope(): number { + return this.#view.getUint32(20, LE); + } + + set scope(value: PerformanceCounterScopeKHR) { + this.#view.setUint32(20, Number(value), LE); + } + + get storage(): number { + return this.#view.getUint32(24, LE); + } + + set storage(value: PerformanceCounterStorageKHR) { + this.#view.setUint32(24, Number(value), LE); + } + + get uuid(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 28, 16); + } + + set uuid(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 28); + } +} \ No newline at end of file diff --git a/api/struct/PerformanceMarkerInfoINTEL.ts b/api/struct/PerformanceMarkerInfoINTEL.ts new file mode 100644 index 0000000..1a2bf0c --- /dev/null +++ b/api/struct/PerformanceMarkerInfoINTEL.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPerformanceMarkerInfoINTEL { + pNext?: AnyPointer; + marker?: number | bigint; +} + +export class PerformanceMarkerInfoINTEL implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPerformanceMarkerInfoINTEL); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceMarkerInfoINTEL) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PerformanceMarkerInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PerformanceMarkerInfoINTEL.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PerformanceMarkerInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.marker !== undefined) this.marker = data.marker; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceMarkerInfoINTEL.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PERFORMANCE_MARKER_INFO_INTEL; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get marker(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set marker(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PerformanceOverrideInfoINTEL.ts b/api/struct/PerformanceOverrideInfoINTEL.ts new file mode 100644 index 0000000..f87a46a --- /dev/null +++ b/api/struct/PerformanceOverrideInfoINTEL.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PerformanceOverrideTypeINTEL } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPerformanceOverrideInfoINTEL { + pNext?: AnyPointer; + type?: PerformanceOverrideTypeINTEL; + enable?: Bool32; + parameter?: number | bigint; +} + +export class PerformanceOverrideInfoINTEL implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPerformanceOverrideInfoINTEL); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceOverrideInfoINTEL) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PerformanceOverrideInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PerformanceOverrideInfoINTEL.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PerformanceOverrideInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.type !== undefined) this.type = data.type; + if (data.enable !== undefined) this.enable = data.enable; + if (data.parameter !== undefined) this.parameter = data.parameter; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceOverrideInfoINTEL.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PERFORMANCE_OVERRIDE_INFO_INTEL; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get type(): number { + return this.#view.getUint32(16, LE); + } + + set type(value: PerformanceOverrideTypeINTEL) { + this.#view.setUint32(16, Number(value), LE); + } + + get enable(): number { + return this.#view.getUint32(20, LE); + } + + set enable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get parameter(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set parameter(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PerformanceQuerySubmitInfoKHR.ts b/api/struct/PerformanceQuerySubmitInfoKHR.ts new file mode 100644 index 0000000..1c7713d --- /dev/null +++ b/api/struct/PerformanceQuerySubmitInfoKHR.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPerformanceQuerySubmitInfoKHR { + pNext?: AnyPointer; + counterPassIndex?: number; +} + +export class PerformanceQuerySubmitInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPerformanceQuerySubmitInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceQuerySubmitInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PerformanceQuerySubmitInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PerformanceQuerySubmitInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PerformanceQuerySubmitInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.counterPassIndex !== undefined) this.counterPassIndex = data.counterPassIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceQuerySubmitInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PERFORMANCE_QUERY_SUBMIT_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get counterPassIndex(): number { + return this.#view.getUint32(16, LE); + } + + set counterPassIndex(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PerformanceStreamMarkerInfoINTEL.ts b/api/struct/PerformanceStreamMarkerInfoINTEL.ts new file mode 100644 index 0000000..f62db99 --- /dev/null +++ b/api/struct/PerformanceStreamMarkerInfoINTEL.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPerformanceStreamMarkerInfoINTEL { + pNext?: AnyPointer; + marker?: number; +} + +export class PerformanceStreamMarkerInfoINTEL implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPerformanceStreamMarkerInfoINTEL); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceStreamMarkerInfoINTEL) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PerformanceStreamMarkerInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PerformanceStreamMarkerInfoINTEL.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PerformanceStreamMarkerInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.marker !== undefined) this.marker = data.marker; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceStreamMarkerInfoINTEL.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PERFORMANCE_STREAM_MARKER_INFO_INTEL; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get marker(): number { + return this.#view.getUint32(16, LE); + } + + set marker(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PerformanceValueINTEL.ts b/api/struct/PerformanceValueINTEL.ts new file mode 100644 index 0000000..63a4a78 --- /dev/null +++ b/api/struct/PerformanceValueINTEL.ts @@ -0,0 +1,71 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { PerformanceValueTypeINTEL } from "../enum.ts"; +import { PerformanceValueDataINTEL } from "../union.ts"; + +export interface InitPerformanceValueINTEL { + type?: PerformanceValueTypeINTEL; + data?: PerformanceValueDataINTEL; +} + +export class PerformanceValueINTEL implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPerformanceValueINTEL); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceValueINTEL) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PerformanceValueINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PerformanceValueINTEL.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PerformanceValueINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.type !== undefined) this.type = data.type; + if (data.data !== undefined) this.data = data.data; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceValueINTEL.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get type(): number { + return this.#view.getUint32(0, LE); + } + + set type(value: PerformanceValueTypeINTEL) { + this.#view.setUint32(0, Number(value), LE); + } + + get data(): unknown { + throw new Error(`Unknown type: {"union":["u32","u64","f32","u32","buffer"]}`); + } + + set data(value: PerformanceValueDataINTEL) { + throw new Error(`Unknown type: {"union":["u32","u64","f32","u32","buffer"]}`); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevice16BitStorageFeatures.ts b/api/struct/PhysicalDevice16BitStorageFeatures.ts new file mode 100644 index 0000000..809a05f --- /dev/null +++ b/api/struct/PhysicalDevice16BitStorageFeatures.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevice16BitStorageFeatures { + pNext?: AnyPointer; + storageBuffer16BitAccess?: Bool32; + uniformAndStorageBuffer16BitAccess?: Bool32; + storagePushConstant16?: Bool32; + storageInputOutput16?: Bool32; +} + +export class PhysicalDevice16BitStorageFeatures implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevice16BitStorageFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevice16BitStorageFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevice16BitStorageFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevice16BitStorageFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevice16BitStorageFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.storageBuffer16BitAccess !== undefined) this.storageBuffer16BitAccess = data.storageBuffer16BitAccess; + if (data.uniformAndStorageBuffer16BitAccess !== undefined) this.uniformAndStorageBuffer16BitAccess = data.uniformAndStorageBuffer16BitAccess; + if (data.storagePushConstant16 !== undefined) this.storagePushConstant16 = data.storagePushConstant16; + if (data.storageInputOutput16 !== undefined) this.storageInputOutput16 = data.storageInputOutput16; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevice16BitStorageFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get storageBuffer16BitAccess(): number { + return this.#view.getUint32(16, LE); + } + + set storageBuffer16BitAccess(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get uniformAndStorageBuffer16BitAccess(): number { + return this.#view.getUint32(20, LE); + } + + set uniformAndStorageBuffer16BitAccess(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get storagePushConstant16(): number { + return this.#view.getUint32(24, LE); + } + + set storagePushConstant16(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get storageInputOutput16(): number { + return this.#view.getUint32(28, LE); + } + + set storageInputOutput16(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevice16BitStorageFeaturesKHR.ts b/api/struct/PhysicalDevice16BitStorageFeaturesKHR.ts new file mode 100644 index 0000000..b6e5783 --- /dev/null +++ b/api/struct/PhysicalDevice16BitStorageFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDevice16BitStorageFeatures } from "./PhysicalDevice16BitStorageFeatures.ts"; + export type PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDevice4444FormatsFeaturesEXT.ts b/api/struct/PhysicalDevice4444FormatsFeaturesEXT.ts new file mode 100644 index 0000000..9846f56 --- /dev/null +++ b/api/struct/PhysicalDevice4444FormatsFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevice4444FormatsFeaturesEXT { + pNext?: AnyPointer; + formatA4R4G4B4?: Bool32; + formatA4B4G4R4?: Bool32; +} + +export class PhysicalDevice4444FormatsFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevice4444FormatsFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevice4444FormatsFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevice4444FormatsFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevice4444FormatsFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevice4444FormatsFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.formatA4R4G4B4 !== undefined) this.formatA4R4G4B4 = data.formatA4R4G4B4; + if (data.formatA4B4G4R4 !== undefined) this.formatA4B4G4R4 = data.formatA4B4G4R4; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevice4444FormatsFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get formatA4R4G4B4(): number { + return this.#view.getUint32(16, LE); + } + + set formatA4R4G4B4(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get formatA4B4G4R4(): number { + return this.#view.getUint32(20, LE); + } + + set formatA4B4G4R4(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevice8BitStorageFeatures.ts b/api/struct/PhysicalDevice8BitStorageFeatures.ts new file mode 100644 index 0000000..9a7dd9c --- /dev/null +++ b/api/struct/PhysicalDevice8BitStorageFeatures.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevice8BitStorageFeatures { + pNext?: AnyPointer; + storageBuffer8BitAccess?: Bool32; + uniformAndStorageBuffer8BitAccess?: Bool32; + storagePushConstant8?: Bool32; +} + +export class PhysicalDevice8BitStorageFeatures implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevice8BitStorageFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevice8BitStorageFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevice8BitStorageFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevice8BitStorageFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevice8BitStorageFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.storageBuffer8BitAccess !== undefined) this.storageBuffer8BitAccess = data.storageBuffer8BitAccess; + if (data.uniformAndStorageBuffer8BitAccess !== undefined) this.uniformAndStorageBuffer8BitAccess = data.uniformAndStorageBuffer8BitAccess; + if (data.storagePushConstant8 !== undefined) this.storagePushConstant8 = data.storagePushConstant8; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevice8BitStorageFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get storageBuffer8BitAccess(): number { + return this.#view.getUint32(16, LE); + } + + set storageBuffer8BitAccess(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get uniformAndStorageBuffer8BitAccess(): number { + return this.#view.getUint32(20, LE); + } + + set uniformAndStorageBuffer8BitAccess(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get storagePushConstant8(): number { + return this.#view.getUint32(24, LE); + } + + set storagePushConstant8(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevice8BitStorageFeaturesKHR.ts b/api/struct/PhysicalDevice8BitStorageFeaturesKHR.ts new file mode 100644 index 0000000..0b76995 --- /dev/null +++ b/api/struct/PhysicalDevice8BitStorageFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDevice8BitStorageFeatures } from "./PhysicalDevice8BitStorageFeatures.ts"; + export type PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceASTCDecodeFeaturesEXT.ts b/api/struct/PhysicalDeviceASTCDecodeFeaturesEXT.ts new file mode 100644 index 0000000..710a3bb --- /dev/null +++ b/api/struct/PhysicalDeviceASTCDecodeFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceASTCDecodeFeaturesEXT { + pNext?: AnyPointer; + decodeModeSharedExponent?: Bool32; +} + +export class PhysicalDeviceASTCDecodeFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceASTCDecodeFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceASTCDecodeFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceASTCDecodeFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceASTCDecodeFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceASTCDecodeFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.decodeModeSharedExponent !== undefined) this.decodeModeSharedExponent = data.decodeModeSharedExponent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceASTCDecodeFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get decodeModeSharedExponent(): number { + return this.#view.getUint32(16, LE); + } + + set decodeModeSharedExponent(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceAccelerationStructureFeaturesKHR.ts b/api/struct/PhysicalDeviceAccelerationStructureFeaturesKHR.ts new file mode 100644 index 0000000..593feb1 --- /dev/null +++ b/api/struct/PhysicalDeviceAccelerationStructureFeaturesKHR.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceAccelerationStructureFeaturesKHR { + pNext?: AnyPointer; + accelerationStructure?: Bool32; + accelerationStructureCaptureReplay?: Bool32; + accelerationStructureIndirectBuild?: Bool32; + accelerationStructureHostCommands?: Bool32; + descriptorBindingAccelerationStructureUpdateAfterBind?: Bool32; +} + +export class PhysicalDeviceAccelerationStructureFeaturesKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceAccelerationStructureFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAccelerationStructureFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceAccelerationStructureFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceAccelerationStructureFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceAccelerationStructureFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; + if (data.accelerationStructureCaptureReplay !== undefined) this.accelerationStructureCaptureReplay = data.accelerationStructureCaptureReplay; + if (data.accelerationStructureIndirectBuild !== undefined) this.accelerationStructureIndirectBuild = data.accelerationStructureIndirectBuild; + if (data.accelerationStructureHostCommands !== undefined) this.accelerationStructureHostCommands = data.accelerationStructureHostCommands; + if (data.descriptorBindingAccelerationStructureUpdateAfterBind !== undefined) this.descriptorBindingAccelerationStructureUpdateAfterBind = data.descriptorBindingAccelerationStructureUpdateAfterBind; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAccelerationStructureFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get accelerationStructure(): number { + return this.#view.getUint32(16, LE); + } + + set accelerationStructure(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get accelerationStructureCaptureReplay(): number { + return this.#view.getUint32(20, LE); + } + + set accelerationStructureCaptureReplay(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get accelerationStructureIndirectBuild(): number { + return this.#view.getUint32(24, LE); + } + + set accelerationStructureIndirectBuild(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get accelerationStructureHostCommands(): number { + return this.#view.getUint32(28, LE); + } + + set accelerationStructureHostCommands(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get descriptorBindingAccelerationStructureUpdateAfterBind(): number { + return this.#view.getUint32(32, LE); + } + + set descriptorBindingAccelerationStructureUpdateAfterBind(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceAccelerationStructurePropertiesKHR.ts b/api/struct/PhysicalDeviceAccelerationStructurePropertiesKHR.ts new file mode 100644 index 0000000..92b6afd --- /dev/null +++ b/api/struct/PhysicalDeviceAccelerationStructurePropertiesKHR.ts @@ -0,0 +1,149 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceAccelerationStructurePropertiesKHR { + pNext?: AnyPointer; + maxGeometryCount?: number | bigint; + maxInstanceCount?: number | bigint; + maxPrimitiveCount?: number | bigint; + maxPerStageDescriptorAccelerationStructures?: number; + maxPerStageDescriptorUpdateAfterBindAccelerationStructures?: number; + maxDescriptorSetAccelerationStructures?: number; + maxDescriptorSetUpdateAfterBindAccelerationStructures?: number; + minAccelerationStructureScratchOffsetAlignment?: number; +} + +export class PhysicalDeviceAccelerationStructurePropertiesKHR implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceAccelerationStructurePropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAccelerationStructurePropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceAccelerationStructurePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceAccelerationStructurePropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceAccelerationStructurePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxGeometryCount !== undefined) this.maxGeometryCount = data.maxGeometryCount; + if (data.maxInstanceCount !== undefined) this.maxInstanceCount = data.maxInstanceCount; + if (data.maxPrimitiveCount !== undefined) this.maxPrimitiveCount = data.maxPrimitiveCount; + if (data.maxPerStageDescriptorAccelerationStructures !== undefined) this.maxPerStageDescriptorAccelerationStructures = data.maxPerStageDescriptorAccelerationStructures; + if (data.maxPerStageDescriptorUpdateAfterBindAccelerationStructures !== undefined) this.maxPerStageDescriptorUpdateAfterBindAccelerationStructures = data.maxPerStageDescriptorUpdateAfterBindAccelerationStructures; + if (data.maxDescriptorSetAccelerationStructures !== undefined) this.maxDescriptorSetAccelerationStructures = data.maxDescriptorSetAccelerationStructures; + if (data.maxDescriptorSetUpdateAfterBindAccelerationStructures !== undefined) this.maxDescriptorSetUpdateAfterBindAccelerationStructures = data.maxDescriptorSetUpdateAfterBindAccelerationStructures; + if (data.minAccelerationStructureScratchOffsetAlignment !== undefined) this.minAccelerationStructureScratchOffsetAlignment = data.minAccelerationStructureScratchOffsetAlignment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAccelerationStructurePropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxGeometryCount(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set maxGeometryCount(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get maxInstanceCount(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set maxInstanceCount(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get maxPrimitiveCount(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set maxPrimitiveCount(value: number | bigint) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get maxPerStageDescriptorAccelerationStructures(): number { + return this.#view.getUint32(40, LE); + } + + set maxPerStageDescriptorAccelerationStructures(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindAccelerationStructures(): number { + return this.#view.getUint32(44, LE); + } + + set maxPerStageDescriptorUpdateAfterBindAccelerationStructures(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get maxDescriptorSetAccelerationStructures(): number { + return this.#view.getUint32(48, LE); + } + + set maxDescriptorSetAccelerationStructures(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindAccelerationStructures(): number { + return this.#view.getUint32(52, LE); + } + + set maxDescriptorSetUpdateAfterBindAccelerationStructures(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get minAccelerationStructureScratchOffsetAlignment(): number { + return this.#view.getUint32(56, LE); + } + + set minAccelerationStructureScratchOffsetAlignment(value: number) { + this.#view.setUint32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceAddressBindingReportFeaturesEXT.ts b/api/struct/PhysicalDeviceAddressBindingReportFeaturesEXT.ts new file mode 100644 index 0000000..d8868db --- /dev/null +++ b/api/struct/PhysicalDeviceAddressBindingReportFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceAddressBindingReportFeaturesEXT { + pNext?: AnyPointer; + reportAddressBinding?: Bool32; +} + +export class PhysicalDeviceAddressBindingReportFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceAddressBindingReportFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAddressBindingReportFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceAddressBindingReportFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceAddressBindingReportFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceAddressBindingReportFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.reportAddressBinding !== undefined) this.reportAddressBinding = data.reportAddressBinding; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAddressBindingReportFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get reportAddressBinding(): number { + return this.#view.getUint32(16, LE); + } + + set reportAddressBinding(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceAmigoProfilingFeaturesSEC.ts b/api/struct/PhysicalDeviceAmigoProfilingFeaturesSEC.ts new file mode 100644 index 0000000..12496f7 --- /dev/null +++ b/api/struct/PhysicalDeviceAmigoProfilingFeaturesSEC.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceAmigoProfilingFeaturesSEC { + pNext?: AnyPointer; + amigoProfiling?: Bool32; +} + +export class PhysicalDeviceAmigoProfilingFeaturesSEC implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceAmigoProfilingFeaturesSEC); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAmigoProfilingFeaturesSEC) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceAmigoProfilingFeaturesSEC.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceAmigoProfilingFeaturesSEC.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceAmigoProfilingFeaturesSEC.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.amigoProfiling !== undefined) this.amigoProfiling = data.amigoProfiling; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAmigoProfilingFeaturesSEC.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get amigoProfiling(): number { + return this.#view.getUint32(16, LE); + } + + set amigoProfiling(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.ts b/api/struct/PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.ts new file mode 100644 index 0000000..4f9e58f --- /dev/null +++ b/api/struct/PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT { + pNext?: AnyPointer; + attachmentFeedbackLoopLayout?: Bool32; +} + +export class PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.attachmentFeedbackLoopLayout !== undefined) this.attachmentFeedbackLoopLayout = data.attachmentFeedbackLoopLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get attachmentFeedbackLoopLayout(): number { + return this.#view.getUint32(16, LE); + } + + set attachmentFeedbackLoopLayout(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceBlendOperationAdvancedFeaturesEXT.ts b/api/struct/PhysicalDeviceBlendOperationAdvancedFeaturesEXT.ts new file mode 100644 index 0000000..e243c45 --- /dev/null +++ b/api/struct/PhysicalDeviceBlendOperationAdvancedFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceBlendOperationAdvancedFeaturesEXT { + pNext?: AnyPointer; + advancedBlendCoherentOperations?: Bool32; +} + +export class PhysicalDeviceBlendOperationAdvancedFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceBlendOperationAdvancedFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBlendOperationAdvancedFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.advancedBlendCoherentOperations !== undefined) this.advancedBlendCoherentOperations = data.advancedBlendCoherentOperations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get advancedBlendCoherentOperations(): number { + return this.#view.getUint32(16, LE); + } + + set advancedBlendCoherentOperations(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceBlendOperationAdvancedPropertiesEXT.ts b/api/struct/PhysicalDeviceBlendOperationAdvancedPropertiesEXT.ts new file mode 100644 index 0000000..d5addc6 --- /dev/null +++ b/api/struct/PhysicalDeviceBlendOperationAdvancedPropertiesEXT.ts @@ -0,0 +1,130 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceBlendOperationAdvancedPropertiesEXT { + pNext?: AnyPointer; + advancedBlendMaxColorAttachments?: number; + advancedBlendIndependentBlend?: Bool32; + advancedBlendNonPremultipliedSrcColor?: Bool32; + advancedBlendNonPremultipliedDstColor?: Bool32; + advancedBlendCorrelatedOverlap?: Bool32; + advancedBlendAllOperations?: Bool32; +} + +export class PhysicalDeviceBlendOperationAdvancedPropertiesEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceBlendOperationAdvancedPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBlendOperationAdvancedPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.advancedBlendMaxColorAttachments !== undefined) this.advancedBlendMaxColorAttachments = data.advancedBlendMaxColorAttachments; + if (data.advancedBlendIndependentBlend !== undefined) this.advancedBlendIndependentBlend = data.advancedBlendIndependentBlend; + if (data.advancedBlendNonPremultipliedSrcColor !== undefined) this.advancedBlendNonPremultipliedSrcColor = data.advancedBlendNonPremultipliedSrcColor; + if (data.advancedBlendNonPremultipliedDstColor !== undefined) this.advancedBlendNonPremultipliedDstColor = data.advancedBlendNonPremultipliedDstColor; + if (data.advancedBlendCorrelatedOverlap !== undefined) this.advancedBlendCorrelatedOverlap = data.advancedBlendCorrelatedOverlap; + if (data.advancedBlendAllOperations !== undefined) this.advancedBlendAllOperations = data.advancedBlendAllOperations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get advancedBlendMaxColorAttachments(): number { + return this.#view.getUint32(16, LE); + } + + set advancedBlendMaxColorAttachments(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get advancedBlendIndependentBlend(): number { + return this.#view.getUint32(20, LE); + } + + set advancedBlendIndependentBlend(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get advancedBlendNonPremultipliedSrcColor(): number { + return this.#view.getUint32(24, LE); + } + + set advancedBlendNonPremultipliedSrcColor(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get advancedBlendNonPremultipliedDstColor(): number { + return this.#view.getUint32(28, LE); + } + + set advancedBlendNonPremultipliedDstColor(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get advancedBlendCorrelatedOverlap(): number { + return this.#view.getUint32(32, LE); + } + + set advancedBlendCorrelatedOverlap(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get advancedBlendAllOperations(): number { + return this.#view.getUint32(36, LE); + } + + set advancedBlendAllOperations(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceBorderColorSwizzleFeaturesEXT.ts b/api/struct/PhysicalDeviceBorderColorSwizzleFeaturesEXT.ts new file mode 100644 index 0000000..3aeebfc --- /dev/null +++ b/api/struct/PhysicalDeviceBorderColorSwizzleFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceBorderColorSwizzleFeaturesEXT { + pNext?: AnyPointer; + borderColorSwizzle?: Bool32; + borderColorSwizzleFromImage?: Bool32; +} + +export class PhysicalDeviceBorderColorSwizzleFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceBorderColorSwizzleFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBorderColorSwizzleFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceBorderColorSwizzleFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceBorderColorSwizzleFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceBorderColorSwizzleFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.borderColorSwizzle !== undefined) this.borderColorSwizzle = data.borderColorSwizzle; + if (data.borderColorSwizzleFromImage !== undefined) this.borderColorSwizzleFromImage = data.borderColorSwizzleFromImage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBorderColorSwizzleFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get borderColorSwizzle(): number { + return this.#view.getUint32(16, LE); + } + + set borderColorSwizzle(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get borderColorSwizzleFromImage(): number { + return this.#view.getUint32(20, LE); + } + + set borderColorSwizzleFromImage(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceBufferAddressFeaturesEXT.ts b/api/struct/PhysicalDeviceBufferAddressFeaturesEXT.ts new file mode 100644 index 0000000..47f98be --- /dev/null +++ b/api/struct/PhysicalDeviceBufferAddressFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceBufferDeviceAddressFeaturesEXT } from "./PhysicalDeviceBufferDeviceAddressFeaturesEXT.ts"; + export type PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceBufferDeviceAddressFeatures.ts b/api/struct/PhysicalDeviceBufferDeviceAddressFeatures.ts new file mode 100644 index 0000000..878d8c6 --- /dev/null +++ b/api/struct/PhysicalDeviceBufferDeviceAddressFeatures.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceBufferDeviceAddressFeatures { + pNext?: AnyPointer; + bufferDeviceAddress?: Bool32; + bufferDeviceAddressCaptureReplay?: Bool32; + bufferDeviceAddressMultiDevice?: Bool32; +} + +export class PhysicalDeviceBufferDeviceAddressFeatures implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceBufferDeviceAddressFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBufferDeviceAddressFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceBufferDeviceAddressFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.bufferDeviceAddress !== undefined) this.bufferDeviceAddress = data.bufferDeviceAddress; + if (data.bufferDeviceAddressCaptureReplay !== undefined) this.bufferDeviceAddressCaptureReplay = data.bufferDeviceAddressCaptureReplay; + if (data.bufferDeviceAddressMultiDevice !== undefined) this.bufferDeviceAddressMultiDevice = data.bufferDeviceAddressMultiDevice; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBufferDeviceAddressFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get bufferDeviceAddress(): number { + return this.#view.getUint32(16, LE); + } + + set bufferDeviceAddress(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get bufferDeviceAddressCaptureReplay(): number { + return this.#view.getUint32(20, LE); + } + + set bufferDeviceAddressCaptureReplay(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get bufferDeviceAddressMultiDevice(): number { + return this.#view.getUint32(24, LE); + } + + set bufferDeviceAddressMultiDevice(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceBufferDeviceAddressFeaturesEXT.ts b/api/struct/PhysicalDeviceBufferDeviceAddressFeaturesEXT.ts new file mode 100644 index 0000000..e87081e --- /dev/null +++ b/api/struct/PhysicalDeviceBufferDeviceAddressFeaturesEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceBufferDeviceAddressFeaturesEXT { + pNext?: AnyPointer; + bufferDeviceAddress?: Bool32; + bufferDeviceAddressCaptureReplay?: Bool32; + bufferDeviceAddressMultiDevice?: Bool32; +} + +export class PhysicalDeviceBufferDeviceAddressFeaturesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceBufferDeviceAddressFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBufferDeviceAddressFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceBufferDeviceAddressFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.bufferDeviceAddress !== undefined) this.bufferDeviceAddress = data.bufferDeviceAddress; + if (data.bufferDeviceAddressCaptureReplay !== undefined) this.bufferDeviceAddressCaptureReplay = data.bufferDeviceAddressCaptureReplay; + if (data.bufferDeviceAddressMultiDevice !== undefined) this.bufferDeviceAddressMultiDevice = data.bufferDeviceAddressMultiDevice; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBufferDeviceAddressFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get bufferDeviceAddress(): number { + return this.#view.getUint32(16, LE); + } + + set bufferDeviceAddress(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get bufferDeviceAddressCaptureReplay(): number { + return this.#view.getUint32(20, LE); + } + + set bufferDeviceAddressCaptureReplay(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get bufferDeviceAddressMultiDevice(): number { + return this.#view.getUint32(24, LE); + } + + set bufferDeviceAddressMultiDevice(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceBufferDeviceAddressFeaturesKHR.ts b/api/struct/PhysicalDeviceBufferDeviceAddressFeaturesKHR.ts new file mode 100644 index 0000000..ea37ac0 --- /dev/null +++ b/api/struct/PhysicalDeviceBufferDeviceAddressFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceBufferDeviceAddressFeatures } from "./PhysicalDeviceBufferDeviceAddressFeatures.ts"; + export type PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceCoherentMemoryFeaturesAMD.ts b/api/struct/PhysicalDeviceCoherentMemoryFeaturesAMD.ts new file mode 100644 index 0000000..e185fc5 --- /dev/null +++ b/api/struct/PhysicalDeviceCoherentMemoryFeaturesAMD.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceCoherentMemoryFeaturesAMD { + pNext?: AnyPointer; + deviceCoherentMemory?: Bool32; +} + +export class PhysicalDeviceCoherentMemoryFeaturesAMD implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceCoherentMemoryFeaturesAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCoherentMemoryFeaturesAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceCoherentMemoryFeaturesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceCoherentMemoryFeaturesAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceCoherentMemoryFeaturesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceCoherentMemory !== undefined) this.deviceCoherentMemory = data.deviceCoherentMemory; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCoherentMemoryFeaturesAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceCoherentMemory(): number { + return this.#view.getUint32(16, LE); + } + + set deviceCoherentMemory(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceColorWriteEnableFeaturesEXT.ts b/api/struct/PhysicalDeviceColorWriteEnableFeaturesEXT.ts new file mode 100644 index 0000000..54eb95b --- /dev/null +++ b/api/struct/PhysicalDeviceColorWriteEnableFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceColorWriteEnableFeaturesEXT { + pNext?: AnyPointer; + colorWriteEnable?: Bool32; +} + +export class PhysicalDeviceColorWriteEnableFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceColorWriteEnableFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceColorWriteEnableFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceColorWriteEnableFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceColorWriteEnableFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceColorWriteEnableFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.colorWriteEnable !== undefined) this.colorWriteEnable = data.colorWriteEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceColorWriteEnableFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get colorWriteEnable(): number { + return this.#view.getUint32(16, LE); + } + + set colorWriteEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceComputeShaderDerivativesFeaturesNV.ts b/api/struct/PhysicalDeviceComputeShaderDerivativesFeaturesNV.ts new file mode 100644 index 0000000..91c69dc --- /dev/null +++ b/api/struct/PhysicalDeviceComputeShaderDerivativesFeaturesNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceComputeShaderDerivativesFeaturesNV { + pNext?: AnyPointer; + computeDerivativeGroupQuads?: Bool32; + computeDerivativeGroupLinear?: Bool32; +} + +export class PhysicalDeviceComputeShaderDerivativesFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceComputeShaderDerivativesFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceComputeShaderDerivativesFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceComputeShaderDerivativesFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceComputeShaderDerivativesFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceComputeShaderDerivativesFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.computeDerivativeGroupQuads !== undefined) this.computeDerivativeGroupQuads = data.computeDerivativeGroupQuads; + if (data.computeDerivativeGroupLinear !== undefined) this.computeDerivativeGroupLinear = data.computeDerivativeGroupLinear; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceComputeShaderDerivativesFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get computeDerivativeGroupQuads(): number { + return this.#view.getUint32(16, LE); + } + + set computeDerivativeGroupQuads(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get computeDerivativeGroupLinear(): number { + return this.#view.getUint32(20, LE); + } + + set computeDerivativeGroupLinear(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceConditionalRenderingFeaturesEXT.ts b/api/struct/PhysicalDeviceConditionalRenderingFeaturesEXT.ts new file mode 100644 index 0000000..1e0575d --- /dev/null +++ b/api/struct/PhysicalDeviceConditionalRenderingFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceConditionalRenderingFeaturesEXT { + pNext?: AnyPointer; + conditionalRendering?: Bool32; + inheritedConditionalRendering?: Bool32; +} + +export class PhysicalDeviceConditionalRenderingFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceConditionalRenderingFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceConditionalRenderingFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceConditionalRenderingFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceConditionalRenderingFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceConditionalRenderingFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.conditionalRendering !== undefined) this.conditionalRendering = data.conditionalRendering; + if (data.inheritedConditionalRendering !== undefined) this.inheritedConditionalRendering = data.inheritedConditionalRendering; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceConditionalRenderingFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get conditionalRendering(): number { + return this.#view.getUint32(16, LE); + } + + set conditionalRendering(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get inheritedConditionalRendering(): number { + return this.#view.getUint32(20, LE); + } + + set inheritedConditionalRendering(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceConservativeRasterizationPropertiesEXT.ts b/api/struct/PhysicalDeviceConservativeRasterizationPropertiesEXT.ts new file mode 100644 index 0000000..1e5e79c --- /dev/null +++ b/api/struct/PhysicalDeviceConservativeRasterizationPropertiesEXT.ts @@ -0,0 +1,160 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceConservativeRasterizationPropertiesEXT { + pNext?: AnyPointer; + primitiveOverestimationSize?: number; + maxExtraPrimitiveOverestimationSize?: number; + extraPrimitiveOverestimationSizeGranularity?: number; + primitiveUnderestimation?: Bool32; + conservativePointAndLineRasterization?: Bool32; + degenerateTrianglesRasterized?: Bool32; + degenerateLinesRasterized?: Bool32; + fullyCoveredFragmentShaderInputVariable?: Bool32; + conservativeRasterizationPostDepthCoverage?: Bool32; +} + +export class PhysicalDeviceConservativeRasterizationPropertiesEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceConservativeRasterizationPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceConservativeRasterizationPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceConservativeRasterizationPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceConservativeRasterizationPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceConservativeRasterizationPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.primitiveOverestimationSize !== undefined) this.primitiveOverestimationSize = data.primitiveOverestimationSize; + if (data.maxExtraPrimitiveOverestimationSize !== undefined) this.maxExtraPrimitiveOverestimationSize = data.maxExtraPrimitiveOverestimationSize; + if (data.extraPrimitiveOverestimationSizeGranularity !== undefined) this.extraPrimitiveOverestimationSizeGranularity = data.extraPrimitiveOverestimationSizeGranularity; + if (data.primitiveUnderestimation !== undefined) this.primitiveUnderestimation = data.primitiveUnderestimation; + if (data.conservativePointAndLineRasterization !== undefined) this.conservativePointAndLineRasterization = data.conservativePointAndLineRasterization; + if (data.degenerateTrianglesRasterized !== undefined) this.degenerateTrianglesRasterized = data.degenerateTrianglesRasterized; + if (data.degenerateLinesRasterized !== undefined) this.degenerateLinesRasterized = data.degenerateLinesRasterized; + if (data.fullyCoveredFragmentShaderInputVariable !== undefined) this.fullyCoveredFragmentShaderInputVariable = data.fullyCoveredFragmentShaderInputVariable; + if (data.conservativeRasterizationPostDepthCoverage !== undefined) this.conservativeRasterizationPostDepthCoverage = data.conservativeRasterizationPostDepthCoverage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceConservativeRasterizationPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get primitiveOverestimationSize(): number { + return this.#view.getFloat32(16, LE); + } + + set primitiveOverestimationSize(value: number) { + this.#view.setFloat32(16, Number(value), LE); + } + + get maxExtraPrimitiveOverestimationSize(): number { + return this.#view.getFloat32(20, LE); + } + + set maxExtraPrimitiveOverestimationSize(value: number) { + this.#view.setFloat32(20, Number(value), LE); + } + + get extraPrimitiveOverestimationSizeGranularity(): number { + return this.#view.getFloat32(24, LE); + } + + set extraPrimitiveOverestimationSizeGranularity(value: number) { + this.#view.setFloat32(24, Number(value), LE); + } + + get primitiveUnderestimation(): number { + return this.#view.getUint32(28, LE); + } + + set primitiveUnderestimation(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get conservativePointAndLineRasterization(): number { + return this.#view.getUint32(32, LE); + } + + set conservativePointAndLineRasterization(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get degenerateTrianglesRasterized(): number { + return this.#view.getUint32(36, LE); + } + + set degenerateTrianglesRasterized(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get degenerateLinesRasterized(): number { + return this.#view.getUint32(40, LE); + } + + set degenerateLinesRasterized(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get fullyCoveredFragmentShaderInputVariable(): number { + return this.#view.getUint32(44, LE); + } + + set fullyCoveredFragmentShaderInputVariable(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get conservativeRasterizationPostDepthCoverage(): number { + return this.#view.getUint32(48, LE); + } + + set conservativeRasterizationPostDepthCoverage(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceCooperativeMatrixFeaturesNV.ts b/api/struct/PhysicalDeviceCooperativeMatrixFeaturesNV.ts new file mode 100644 index 0000000..5b21e22 --- /dev/null +++ b/api/struct/PhysicalDeviceCooperativeMatrixFeaturesNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceCooperativeMatrixFeaturesNV { + pNext?: AnyPointer; + cooperativeMatrix?: Bool32; + cooperativeMatrixRobustBufferAccess?: Bool32; +} + +export class PhysicalDeviceCooperativeMatrixFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceCooperativeMatrixFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCooperativeMatrixFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceCooperativeMatrixFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.cooperativeMatrix !== undefined) this.cooperativeMatrix = data.cooperativeMatrix; + if (data.cooperativeMatrixRobustBufferAccess !== undefined) this.cooperativeMatrixRobustBufferAccess = data.cooperativeMatrixRobustBufferAccess; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCooperativeMatrixFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get cooperativeMatrix(): number { + return this.#view.getUint32(16, LE); + } + + set cooperativeMatrix(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get cooperativeMatrixRobustBufferAccess(): number { + return this.#view.getUint32(20, LE); + } + + set cooperativeMatrixRobustBufferAccess(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceCooperativeMatrixPropertiesNV.ts b/api/struct/PhysicalDeviceCooperativeMatrixPropertiesNV.ts new file mode 100644 index 0000000..d133384 --- /dev/null +++ b/api/struct/PhysicalDeviceCooperativeMatrixPropertiesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ShaderStageFlags } from "../def.ts"; + +export interface InitPhysicalDeviceCooperativeMatrixPropertiesNV { + pNext?: AnyPointer; + cooperativeMatrixSupportedStages?: ShaderStageFlags; +} + +export class PhysicalDeviceCooperativeMatrixPropertiesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceCooperativeMatrixPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCooperativeMatrixPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceCooperativeMatrixPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.cooperativeMatrixSupportedStages !== undefined) this.cooperativeMatrixSupportedStages = data.cooperativeMatrixSupportedStages; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCooperativeMatrixPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get cooperativeMatrixSupportedStages(): number { + return this.#view.getUint32(16, LE); + } + + set cooperativeMatrixSupportedStages(value: ShaderStageFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceCopyMemoryIndirectFeaturesNV.ts b/api/struct/PhysicalDeviceCopyMemoryIndirectFeaturesNV.ts new file mode 100644 index 0000000..0dd52cf --- /dev/null +++ b/api/struct/PhysicalDeviceCopyMemoryIndirectFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceCopyMemoryIndirectFeaturesNV { + pNext?: AnyPointer; + indirectCopy?: Bool32; +} + +export class PhysicalDeviceCopyMemoryIndirectFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceCopyMemoryIndirectFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCopyMemoryIndirectFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceCopyMemoryIndirectFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.indirectCopy !== undefined) this.indirectCopy = data.indirectCopy; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCopyMemoryIndirectFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get indirectCopy(): number { + return this.#view.getUint32(16, LE); + } + + set indirectCopy(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceCopyMemoryIndirectPropertiesNV.ts b/api/struct/PhysicalDeviceCopyMemoryIndirectPropertiesNV.ts new file mode 100644 index 0000000..c7a819a --- /dev/null +++ b/api/struct/PhysicalDeviceCopyMemoryIndirectPropertiesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { QueueFlags } from "../def.ts"; + +export interface InitPhysicalDeviceCopyMemoryIndirectPropertiesNV { + pNext?: AnyPointer; + supportedQueues?: QueueFlags; +} + +export class PhysicalDeviceCopyMemoryIndirectPropertiesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceCopyMemoryIndirectPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCopyMemoryIndirectPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceCopyMemoryIndirectPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.supportedQueues !== undefined) this.supportedQueues = data.supportedQueues; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCopyMemoryIndirectPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get supportedQueues(): number { + return this.#view.getUint32(16, LE); + } + + set supportedQueues(value: QueueFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceCornerSampledImageFeaturesNV.ts b/api/struct/PhysicalDeviceCornerSampledImageFeaturesNV.ts new file mode 100644 index 0000000..d64cb6e --- /dev/null +++ b/api/struct/PhysicalDeviceCornerSampledImageFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceCornerSampledImageFeaturesNV { + pNext?: AnyPointer; + cornerSampledImage?: Bool32; +} + +export class PhysicalDeviceCornerSampledImageFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceCornerSampledImageFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCornerSampledImageFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceCornerSampledImageFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceCornerSampledImageFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceCornerSampledImageFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.cornerSampledImage !== undefined) this.cornerSampledImage = data.cornerSampledImage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCornerSampledImageFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get cornerSampledImage(): number { + return this.#view.getUint32(16, LE); + } + + set cornerSampledImage(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceCoverageReductionModeFeaturesNV.ts b/api/struct/PhysicalDeviceCoverageReductionModeFeaturesNV.ts new file mode 100644 index 0000000..b8c42c3 --- /dev/null +++ b/api/struct/PhysicalDeviceCoverageReductionModeFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceCoverageReductionModeFeaturesNV { + pNext?: AnyPointer; + coverageReductionMode?: Bool32; +} + +export class PhysicalDeviceCoverageReductionModeFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceCoverageReductionModeFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCoverageReductionModeFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceCoverageReductionModeFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceCoverageReductionModeFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceCoverageReductionModeFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.coverageReductionMode !== undefined) this.coverageReductionMode = data.coverageReductionMode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCoverageReductionModeFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get coverageReductionMode(): number { + return this.#view.getUint32(16, LE); + } + + set coverageReductionMode(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceCustomBorderColorFeaturesEXT.ts b/api/struct/PhysicalDeviceCustomBorderColorFeaturesEXT.ts new file mode 100644 index 0000000..2b0f17b --- /dev/null +++ b/api/struct/PhysicalDeviceCustomBorderColorFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceCustomBorderColorFeaturesEXT { + pNext?: AnyPointer; + customBorderColors?: Bool32; + customBorderColorWithoutFormat?: Bool32; +} + +export class PhysicalDeviceCustomBorderColorFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceCustomBorderColorFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCustomBorderColorFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceCustomBorderColorFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.customBorderColors !== undefined) this.customBorderColors = data.customBorderColors; + if (data.customBorderColorWithoutFormat !== undefined) this.customBorderColorWithoutFormat = data.customBorderColorWithoutFormat; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCustomBorderColorFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get customBorderColors(): number { + return this.#view.getUint32(16, LE); + } + + set customBorderColors(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get customBorderColorWithoutFormat(): number { + return this.#view.getUint32(20, LE); + } + + set customBorderColorWithoutFormat(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceCustomBorderColorPropertiesEXT.ts b/api/struct/PhysicalDeviceCustomBorderColorPropertiesEXT.ts new file mode 100644 index 0000000..571a920 --- /dev/null +++ b/api/struct/PhysicalDeviceCustomBorderColorPropertiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceCustomBorderColorPropertiesEXT { + pNext?: AnyPointer; + maxCustomBorderColorSamplers?: number; +} + +export class PhysicalDeviceCustomBorderColorPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceCustomBorderColorPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCustomBorderColorPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceCustomBorderColorPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxCustomBorderColorSamplers !== undefined) this.maxCustomBorderColorSamplers = data.maxCustomBorderColorSamplers; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCustomBorderColorPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxCustomBorderColorSamplers(): number { + return this.#view.getUint32(16, LE); + } + + set maxCustomBorderColorSamplers(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.ts b/api/struct/PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.ts new file mode 100644 index 0000000..d81ef80 --- /dev/null +++ b/api/struct/PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV { + pNext?: AnyPointer; + dedicatedAllocationImageAliasing?: Bool32; +} + +export class PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.dedicatedAllocationImageAliasing !== undefined) this.dedicatedAllocationImageAliasing = data.dedicatedAllocationImageAliasing; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dedicatedAllocationImageAliasing(): number { + return this.#view.getUint32(16, LE); + } + + set dedicatedAllocationImageAliasing(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDepthClampZeroOneFeaturesEXT.ts b/api/struct/PhysicalDeviceDepthClampZeroOneFeaturesEXT.ts new file mode 100644 index 0000000..acccd48 --- /dev/null +++ b/api/struct/PhysicalDeviceDepthClampZeroOneFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDepthClampZeroOneFeaturesEXT { + pNext?: AnyPointer; + depthClampZeroOne?: Bool32; +} + +export class PhysicalDeviceDepthClampZeroOneFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDepthClampZeroOneFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDepthClampZeroOneFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDepthClampZeroOneFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDepthClampZeroOneFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDepthClampZeroOneFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.depthClampZeroOne !== undefined) this.depthClampZeroOne = data.depthClampZeroOne; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthClampZeroOneFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get depthClampZeroOne(): number { + return this.#view.getUint32(16, LE); + } + + set depthClampZeroOne(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDepthClipControlFeaturesEXT.ts b/api/struct/PhysicalDeviceDepthClipControlFeaturesEXT.ts new file mode 100644 index 0000000..1482d4f --- /dev/null +++ b/api/struct/PhysicalDeviceDepthClipControlFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDepthClipControlFeaturesEXT { + pNext?: AnyPointer; + depthClipControl?: Bool32; +} + +export class PhysicalDeviceDepthClipControlFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDepthClipControlFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDepthClipControlFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDepthClipControlFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDepthClipControlFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDepthClipControlFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.depthClipControl !== undefined) this.depthClipControl = data.depthClipControl; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthClipControlFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get depthClipControl(): number { + return this.#view.getUint32(16, LE); + } + + set depthClipControl(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDepthClipEnableFeaturesEXT.ts b/api/struct/PhysicalDeviceDepthClipEnableFeaturesEXT.ts new file mode 100644 index 0000000..0f403ea --- /dev/null +++ b/api/struct/PhysicalDeviceDepthClipEnableFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDepthClipEnableFeaturesEXT { + pNext?: AnyPointer; + depthClipEnable?: Bool32; +} + +export class PhysicalDeviceDepthClipEnableFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDepthClipEnableFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDepthClipEnableFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDepthClipEnableFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDepthClipEnableFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDepthClipEnableFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.depthClipEnable !== undefined) this.depthClipEnable = data.depthClipEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthClipEnableFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get depthClipEnable(): number { + return this.#view.getUint32(16, LE); + } + + set depthClipEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDepthStencilResolveProperties.ts b/api/struct/PhysicalDeviceDepthStencilResolveProperties.ts new file mode 100644 index 0000000..d414f4f --- /dev/null +++ b/api/struct/PhysicalDeviceDepthStencilResolveProperties.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ResolveModeFlags, Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDepthStencilResolveProperties { + pNext?: AnyPointer; + supportedDepthResolveModes?: ResolveModeFlags; + supportedStencilResolveModes?: ResolveModeFlags; + independentResolveNone?: Bool32; + independentResolve?: Bool32; +} + +export class PhysicalDeviceDepthStencilResolveProperties implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDepthStencilResolveProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDepthStencilResolveProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDepthStencilResolveProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDepthStencilResolveProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDepthStencilResolveProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.supportedDepthResolveModes !== undefined) this.supportedDepthResolveModes = data.supportedDepthResolveModes; + if (data.supportedStencilResolveModes !== undefined) this.supportedStencilResolveModes = data.supportedStencilResolveModes; + if (data.independentResolveNone !== undefined) this.independentResolveNone = data.independentResolveNone; + if (data.independentResolve !== undefined) this.independentResolve = data.independentResolve; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthStencilResolveProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get supportedDepthResolveModes(): number { + return this.#view.getUint32(16, LE); + } + + set supportedDepthResolveModes(value: ResolveModeFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get supportedStencilResolveModes(): number { + return this.#view.getUint32(20, LE); + } + + set supportedStencilResolveModes(value: ResolveModeFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get independentResolveNone(): number { + return this.#view.getUint32(24, LE); + } + + set independentResolveNone(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get independentResolve(): number { + return this.#view.getUint32(28, LE); + } + + set independentResolve(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDepthStencilResolvePropertiesKHR.ts b/api/struct/PhysicalDeviceDepthStencilResolvePropertiesKHR.ts new file mode 100644 index 0000000..13c2a07 --- /dev/null +++ b/api/struct/PhysicalDeviceDepthStencilResolvePropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceDepthStencilResolveProperties } from "./PhysicalDeviceDepthStencilResolveProperties.ts"; + export type PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.ts b/api/struct/PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.ts new file mode 100644 index 0000000..828eb05 --- /dev/null +++ b/api/struct/PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT { + pNext?: AnyPointer; + combinedImageSamplerDensityMapDescriptorSize?: number | bigint; +} + +export class PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.combinedImageSamplerDensityMapDescriptorSize !== undefined) this.combinedImageSamplerDensityMapDescriptorSize = data.combinedImageSamplerDensityMapDescriptorSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get combinedImageSamplerDensityMapDescriptorSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set combinedImageSamplerDensityMapDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDescriptorBufferFeaturesEXT.ts b/api/struct/PhysicalDeviceDescriptorBufferFeaturesEXT.ts new file mode 100644 index 0000000..fa9ff03 --- /dev/null +++ b/api/struct/PhysicalDeviceDescriptorBufferFeaturesEXT.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDescriptorBufferFeaturesEXT { + pNext?: AnyPointer; + descriptorBuffer?: Bool32; + descriptorBufferCaptureReplay?: Bool32; + descriptorBufferImageLayoutIgnored?: Bool32; + descriptorBufferPushDescriptors?: Bool32; +} + +export class PhysicalDeviceDescriptorBufferFeaturesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDescriptorBufferFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorBufferFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDescriptorBufferFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.descriptorBuffer !== undefined) this.descriptorBuffer = data.descriptorBuffer; + if (data.descriptorBufferCaptureReplay !== undefined) this.descriptorBufferCaptureReplay = data.descriptorBufferCaptureReplay; + if (data.descriptorBufferImageLayoutIgnored !== undefined) this.descriptorBufferImageLayoutIgnored = data.descriptorBufferImageLayoutIgnored; + if (data.descriptorBufferPushDescriptors !== undefined) this.descriptorBufferPushDescriptors = data.descriptorBufferPushDescriptors; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorBufferFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get descriptorBuffer(): number { + return this.#view.getUint32(16, LE); + } + + set descriptorBuffer(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get descriptorBufferCaptureReplay(): number { + return this.#view.getUint32(20, LE); + } + + set descriptorBufferCaptureReplay(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get descriptorBufferImageLayoutIgnored(): number { + return this.#view.getUint32(24, LE); + } + + set descriptorBufferImageLayoutIgnored(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get descriptorBufferPushDescriptors(): number { + return this.#view.getUint32(28, LE); + } + + set descriptorBufferPushDescriptors(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDescriptorBufferPropertiesEXT.ts b/api/struct/PhysicalDeviceDescriptorBufferPropertiesEXT.ts new file mode 100644 index 0000000..9c2ceeb --- /dev/null +++ b/api/struct/PhysicalDeviceDescriptorBufferPropertiesEXT.ts @@ -0,0 +1,400 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32, DeviceSize } from "../def.ts"; + +export interface InitPhysicalDeviceDescriptorBufferPropertiesEXT { + pNext?: AnyPointer; + combinedImageSamplerDescriptorSingleArray?: Bool32; + bufferlessPushDescriptors?: Bool32; + allowSamplerImageViewPostSubmitCreation?: Bool32; + descriptorBufferOffsetAlignment?: DeviceSize; + maxDescriptorBufferBindings?: number; + maxResourceDescriptorBufferBindings?: number; + maxSamplerDescriptorBufferBindings?: number; + maxEmbeddedImmutableSamplerBindings?: number; + maxEmbeddedImmutableSamplers?: number; + bufferCaptureReplayDescriptorDataSize?: number | bigint; + imageCaptureReplayDescriptorDataSize?: number | bigint; + imageViewCaptureReplayDescriptorDataSize?: number | bigint; + samplerCaptureReplayDescriptorDataSize?: number | bigint; + accelerationStructureCaptureReplayDescriptorDataSize?: number | bigint; + samplerDescriptorSize?: number | bigint; + combinedImageSamplerDescriptorSize?: number | bigint; + sampledImageDescriptorSize?: number | bigint; + storageImageDescriptorSize?: number | bigint; + uniformTexelBufferDescriptorSize?: number | bigint; + robustUniformTexelBufferDescriptorSize?: number | bigint; + storageTexelBufferDescriptorSize?: number | bigint; + robustStorageTexelBufferDescriptorSize?: number | bigint; + uniformBufferDescriptorSize?: number | bigint; + robustUniformBufferDescriptorSize?: number | bigint; + storageBufferDescriptorSize?: number | bigint; + robustStorageBufferDescriptorSize?: number | bigint; + inputAttachmentDescriptorSize?: number | bigint; + accelerationStructureDescriptorSize?: number | bigint; + maxSamplerDescriptorBufferRange?: DeviceSize; + maxResourceDescriptorBufferRange?: DeviceSize; + samplerDescriptorBufferAddressSpaceSize?: DeviceSize; + resourceDescriptorBufferAddressSpaceSize?: DeviceSize; + descriptorBufferAddressSpaceSize?: DeviceSize; +} + +export class PhysicalDeviceDescriptorBufferPropertiesEXT implements BaseStruct { + static size = 256; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDescriptorBufferPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorBufferPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDescriptorBufferPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.combinedImageSamplerDescriptorSingleArray !== undefined) this.combinedImageSamplerDescriptorSingleArray = data.combinedImageSamplerDescriptorSingleArray; + if (data.bufferlessPushDescriptors !== undefined) this.bufferlessPushDescriptors = data.bufferlessPushDescriptors; + if (data.allowSamplerImageViewPostSubmitCreation !== undefined) this.allowSamplerImageViewPostSubmitCreation = data.allowSamplerImageViewPostSubmitCreation; + if (data.descriptorBufferOffsetAlignment !== undefined) this.descriptorBufferOffsetAlignment = data.descriptorBufferOffsetAlignment; + if (data.maxDescriptorBufferBindings !== undefined) this.maxDescriptorBufferBindings = data.maxDescriptorBufferBindings; + if (data.maxResourceDescriptorBufferBindings !== undefined) this.maxResourceDescriptorBufferBindings = data.maxResourceDescriptorBufferBindings; + if (data.maxSamplerDescriptorBufferBindings !== undefined) this.maxSamplerDescriptorBufferBindings = data.maxSamplerDescriptorBufferBindings; + if (data.maxEmbeddedImmutableSamplerBindings !== undefined) this.maxEmbeddedImmutableSamplerBindings = data.maxEmbeddedImmutableSamplerBindings; + if (data.maxEmbeddedImmutableSamplers !== undefined) this.maxEmbeddedImmutableSamplers = data.maxEmbeddedImmutableSamplers; + if (data.bufferCaptureReplayDescriptorDataSize !== undefined) this.bufferCaptureReplayDescriptorDataSize = data.bufferCaptureReplayDescriptorDataSize; + if (data.imageCaptureReplayDescriptorDataSize !== undefined) this.imageCaptureReplayDescriptorDataSize = data.imageCaptureReplayDescriptorDataSize; + if (data.imageViewCaptureReplayDescriptorDataSize !== undefined) this.imageViewCaptureReplayDescriptorDataSize = data.imageViewCaptureReplayDescriptorDataSize; + if (data.samplerCaptureReplayDescriptorDataSize !== undefined) this.samplerCaptureReplayDescriptorDataSize = data.samplerCaptureReplayDescriptorDataSize; + if (data.accelerationStructureCaptureReplayDescriptorDataSize !== undefined) this.accelerationStructureCaptureReplayDescriptorDataSize = data.accelerationStructureCaptureReplayDescriptorDataSize; + if (data.samplerDescriptorSize !== undefined) this.samplerDescriptorSize = data.samplerDescriptorSize; + if (data.combinedImageSamplerDescriptorSize !== undefined) this.combinedImageSamplerDescriptorSize = data.combinedImageSamplerDescriptorSize; + if (data.sampledImageDescriptorSize !== undefined) this.sampledImageDescriptorSize = data.sampledImageDescriptorSize; + if (data.storageImageDescriptorSize !== undefined) this.storageImageDescriptorSize = data.storageImageDescriptorSize; + if (data.uniformTexelBufferDescriptorSize !== undefined) this.uniformTexelBufferDescriptorSize = data.uniformTexelBufferDescriptorSize; + if (data.robustUniformTexelBufferDescriptorSize !== undefined) this.robustUniformTexelBufferDescriptorSize = data.robustUniformTexelBufferDescriptorSize; + if (data.storageTexelBufferDescriptorSize !== undefined) this.storageTexelBufferDescriptorSize = data.storageTexelBufferDescriptorSize; + if (data.robustStorageTexelBufferDescriptorSize !== undefined) this.robustStorageTexelBufferDescriptorSize = data.robustStorageTexelBufferDescriptorSize; + if (data.uniformBufferDescriptorSize !== undefined) this.uniformBufferDescriptorSize = data.uniformBufferDescriptorSize; + if (data.robustUniformBufferDescriptorSize !== undefined) this.robustUniformBufferDescriptorSize = data.robustUniformBufferDescriptorSize; + if (data.storageBufferDescriptorSize !== undefined) this.storageBufferDescriptorSize = data.storageBufferDescriptorSize; + if (data.robustStorageBufferDescriptorSize !== undefined) this.robustStorageBufferDescriptorSize = data.robustStorageBufferDescriptorSize; + if (data.inputAttachmentDescriptorSize !== undefined) this.inputAttachmentDescriptorSize = data.inputAttachmentDescriptorSize; + if (data.accelerationStructureDescriptorSize !== undefined) this.accelerationStructureDescriptorSize = data.accelerationStructureDescriptorSize; + if (data.maxSamplerDescriptorBufferRange !== undefined) this.maxSamplerDescriptorBufferRange = data.maxSamplerDescriptorBufferRange; + if (data.maxResourceDescriptorBufferRange !== undefined) this.maxResourceDescriptorBufferRange = data.maxResourceDescriptorBufferRange; + if (data.samplerDescriptorBufferAddressSpaceSize !== undefined) this.samplerDescriptorBufferAddressSpaceSize = data.samplerDescriptorBufferAddressSpaceSize; + if (data.resourceDescriptorBufferAddressSpaceSize !== undefined) this.resourceDescriptorBufferAddressSpaceSize = data.resourceDescriptorBufferAddressSpaceSize; + if (data.descriptorBufferAddressSpaceSize !== undefined) this.descriptorBufferAddressSpaceSize = data.descriptorBufferAddressSpaceSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorBufferPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get combinedImageSamplerDescriptorSingleArray(): number { + return this.#view.getUint32(16, LE); + } + + set combinedImageSamplerDescriptorSingleArray(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get bufferlessPushDescriptors(): number { + return this.#view.getUint32(20, LE); + } + + set bufferlessPushDescriptors(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get allowSamplerImageViewPostSubmitCreation(): number { + return this.#view.getUint32(24, LE); + } + + set allowSamplerImageViewPostSubmitCreation(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get descriptorBufferOffsetAlignment(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set descriptorBufferOffsetAlignment(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get maxDescriptorBufferBindings(): number { + return this.#view.getUint32(40, LE); + } + + set maxDescriptorBufferBindings(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get maxResourceDescriptorBufferBindings(): number { + return this.#view.getUint32(44, LE); + } + + set maxResourceDescriptorBufferBindings(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get maxSamplerDescriptorBufferBindings(): number { + return this.#view.getUint32(48, LE); + } + + set maxSamplerDescriptorBufferBindings(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get maxEmbeddedImmutableSamplerBindings(): number { + return this.#view.getUint32(52, LE); + } + + set maxEmbeddedImmutableSamplerBindings(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get maxEmbeddedImmutableSamplers(): number { + return this.#view.getUint32(56, LE); + } + + set maxEmbeddedImmutableSamplers(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get bufferCaptureReplayDescriptorDataSize(): bigint { + return this.#view.getBigUint64(64, LE); + } + + set bufferCaptureReplayDescriptorDataSize(value: number | bigint) { + this.#view.setBigUint64(64, BigInt(value), LE); + } + + get imageCaptureReplayDescriptorDataSize(): bigint { + return this.#view.getBigUint64(72, LE); + } + + set imageCaptureReplayDescriptorDataSize(value: number | bigint) { + this.#view.setBigUint64(72, BigInt(value), LE); + } + + get imageViewCaptureReplayDescriptorDataSize(): bigint { + return this.#view.getBigUint64(80, LE); + } + + set imageViewCaptureReplayDescriptorDataSize(value: number | bigint) { + this.#view.setBigUint64(80, BigInt(value), LE); + } + + get samplerCaptureReplayDescriptorDataSize(): bigint { + return this.#view.getBigUint64(88, LE); + } + + set samplerCaptureReplayDescriptorDataSize(value: number | bigint) { + this.#view.setBigUint64(88, BigInt(value), LE); + } + + get accelerationStructureCaptureReplayDescriptorDataSize(): bigint { + return this.#view.getBigUint64(96, LE); + } + + set accelerationStructureCaptureReplayDescriptorDataSize(value: number | bigint) { + this.#view.setBigUint64(96, BigInt(value), LE); + } + + get samplerDescriptorSize(): bigint { + return this.#view.getBigUint64(104, LE); + } + + set samplerDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(104, BigInt(value), LE); + } + + get combinedImageSamplerDescriptorSize(): bigint { + return this.#view.getBigUint64(112, LE); + } + + set combinedImageSamplerDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(112, BigInt(value), LE); + } + + get sampledImageDescriptorSize(): bigint { + return this.#view.getBigUint64(120, LE); + } + + set sampledImageDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(120, BigInt(value), LE); + } + + get storageImageDescriptorSize(): bigint { + return this.#view.getBigUint64(128, LE); + } + + set storageImageDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(128, BigInt(value), LE); + } + + get uniformTexelBufferDescriptorSize(): bigint { + return this.#view.getBigUint64(136, LE); + } + + set uniformTexelBufferDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(136, BigInt(value), LE); + } + + get robustUniformTexelBufferDescriptorSize(): bigint { + return this.#view.getBigUint64(144, LE); + } + + set robustUniformTexelBufferDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(144, BigInt(value), LE); + } + + get storageTexelBufferDescriptorSize(): bigint { + return this.#view.getBigUint64(152, LE); + } + + set storageTexelBufferDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(152, BigInt(value), LE); + } + + get robustStorageTexelBufferDescriptorSize(): bigint { + return this.#view.getBigUint64(160, LE); + } + + set robustStorageTexelBufferDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(160, BigInt(value), LE); + } + + get uniformBufferDescriptorSize(): bigint { + return this.#view.getBigUint64(168, LE); + } + + set uniformBufferDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(168, BigInt(value), LE); + } + + get robustUniformBufferDescriptorSize(): bigint { + return this.#view.getBigUint64(176, LE); + } + + set robustUniformBufferDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(176, BigInt(value), LE); + } + + get storageBufferDescriptorSize(): bigint { + return this.#view.getBigUint64(184, LE); + } + + set storageBufferDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(184, BigInt(value), LE); + } + + get robustStorageBufferDescriptorSize(): bigint { + return this.#view.getBigUint64(192, LE); + } + + set robustStorageBufferDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(192, BigInt(value), LE); + } + + get inputAttachmentDescriptorSize(): bigint { + return this.#view.getBigUint64(200, LE); + } + + set inputAttachmentDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(200, BigInt(value), LE); + } + + get accelerationStructureDescriptorSize(): bigint { + return this.#view.getBigUint64(208, LE); + } + + set accelerationStructureDescriptorSize(value: number | bigint) { + this.#view.setBigUint64(208, BigInt(value), LE); + } + + get maxSamplerDescriptorBufferRange(): bigint { + return this.#view.getBigUint64(216, LE); + } + + set maxSamplerDescriptorBufferRange(value: DeviceSize) { + this.#view.setBigUint64(216, BigInt(value), LE); + } + + get maxResourceDescriptorBufferRange(): bigint { + return this.#view.getBigUint64(224, LE); + } + + set maxResourceDescriptorBufferRange(value: DeviceSize) { + this.#view.setBigUint64(224, BigInt(value), LE); + } + + get samplerDescriptorBufferAddressSpaceSize(): bigint { + return this.#view.getBigUint64(232, LE); + } + + set samplerDescriptorBufferAddressSpaceSize(value: DeviceSize) { + this.#view.setBigUint64(232, BigInt(value), LE); + } + + get resourceDescriptorBufferAddressSpaceSize(): bigint { + return this.#view.getBigUint64(240, LE); + } + + set resourceDescriptorBufferAddressSpaceSize(value: DeviceSize) { + this.#view.setBigUint64(240, BigInt(value), LE); + } + + get descriptorBufferAddressSpaceSize(): bigint { + return this.#view.getBigUint64(248, LE); + } + + set descriptorBufferAddressSpaceSize(value: DeviceSize) { + this.#view.setBigUint64(248, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDescriptorIndexingFeatures.ts b/api/struct/PhysicalDeviceDescriptorIndexingFeatures.ts new file mode 100644 index 0000000..87be4f6 --- /dev/null +++ b/api/struct/PhysicalDeviceDescriptorIndexingFeatures.ts @@ -0,0 +1,270 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDescriptorIndexingFeatures { + pNext?: AnyPointer; + shaderInputAttachmentArrayDynamicIndexing?: Bool32; + shaderUniformTexelBufferArrayDynamicIndexing?: Bool32; + shaderStorageTexelBufferArrayDynamicIndexing?: Bool32; + shaderUniformBufferArrayNonUniformIndexing?: Bool32; + shaderSampledImageArrayNonUniformIndexing?: Bool32; + shaderStorageBufferArrayNonUniformIndexing?: Bool32; + shaderStorageImageArrayNonUniformIndexing?: Bool32; + shaderInputAttachmentArrayNonUniformIndexing?: Bool32; + shaderUniformTexelBufferArrayNonUniformIndexing?: Bool32; + shaderStorageTexelBufferArrayNonUniformIndexing?: Bool32; + descriptorBindingUniformBufferUpdateAfterBind?: Bool32; + descriptorBindingSampledImageUpdateAfterBind?: Bool32; + descriptorBindingStorageImageUpdateAfterBind?: Bool32; + descriptorBindingStorageBufferUpdateAfterBind?: Bool32; + descriptorBindingUniformTexelBufferUpdateAfterBind?: Bool32; + descriptorBindingStorageTexelBufferUpdateAfterBind?: Bool32; + descriptorBindingUpdateUnusedWhilePending?: Bool32; + descriptorBindingPartiallyBound?: Bool32; + descriptorBindingVariableDescriptorCount?: Bool32; + runtimeDescriptorArray?: Bool32; +} + +export class PhysicalDeviceDescriptorIndexingFeatures implements BaseStruct { + static size = 96; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDescriptorIndexingFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorIndexingFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDescriptorIndexingFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderInputAttachmentArrayDynamicIndexing !== undefined) this.shaderInputAttachmentArrayDynamicIndexing = data.shaderInputAttachmentArrayDynamicIndexing; + if (data.shaderUniformTexelBufferArrayDynamicIndexing !== undefined) this.shaderUniformTexelBufferArrayDynamicIndexing = data.shaderUniformTexelBufferArrayDynamicIndexing; + if (data.shaderStorageTexelBufferArrayDynamicIndexing !== undefined) this.shaderStorageTexelBufferArrayDynamicIndexing = data.shaderStorageTexelBufferArrayDynamicIndexing; + if (data.shaderUniformBufferArrayNonUniformIndexing !== undefined) this.shaderUniformBufferArrayNonUniformIndexing = data.shaderUniformBufferArrayNonUniformIndexing; + if (data.shaderSampledImageArrayNonUniformIndexing !== undefined) this.shaderSampledImageArrayNonUniformIndexing = data.shaderSampledImageArrayNonUniformIndexing; + if (data.shaderStorageBufferArrayNonUniformIndexing !== undefined) this.shaderStorageBufferArrayNonUniformIndexing = data.shaderStorageBufferArrayNonUniformIndexing; + if (data.shaderStorageImageArrayNonUniformIndexing !== undefined) this.shaderStorageImageArrayNonUniformIndexing = data.shaderStorageImageArrayNonUniformIndexing; + if (data.shaderInputAttachmentArrayNonUniformIndexing !== undefined) this.shaderInputAttachmentArrayNonUniformIndexing = data.shaderInputAttachmentArrayNonUniformIndexing; + if (data.shaderUniformTexelBufferArrayNonUniformIndexing !== undefined) this.shaderUniformTexelBufferArrayNonUniformIndexing = data.shaderUniformTexelBufferArrayNonUniformIndexing; + if (data.shaderStorageTexelBufferArrayNonUniformIndexing !== undefined) this.shaderStorageTexelBufferArrayNonUniformIndexing = data.shaderStorageTexelBufferArrayNonUniformIndexing; + if (data.descriptorBindingUniformBufferUpdateAfterBind !== undefined) this.descriptorBindingUniformBufferUpdateAfterBind = data.descriptorBindingUniformBufferUpdateAfterBind; + if (data.descriptorBindingSampledImageUpdateAfterBind !== undefined) this.descriptorBindingSampledImageUpdateAfterBind = data.descriptorBindingSampledImageUpdateAfterBind; + if (data.descriptorBindingStorageImageUpdateAfterBind !== undefined) this.descriptorBindingStorageImageUpdateAfterBind = data.descriptorBindingStorageImageUpdateAfterBind; + if (data.descriptorBindingStorageBufferUpdateAfterBind !== undefined) this.descriptorBindingStorageBufferUpdateAfterBind = data.descriptorBindingStorageBufferUpdateAfterBind; + if (data.descriptorBindingUniformTexelBufferUpdateAfterBind !== undefined) this.descriptorBindingUniformTexelBufferUpdateAfterBind = data.descriptorBindingUniformTexelBufferUpdateAfterBind; + if (data.descriptorBindingStorageTexelBufferUpdateAfterBind !== undefined) this.descriptorBindingStorageTexelBufferUpdateAfterBind = data.descriptorBindingStorageTexelBufferUpdateAfterBind; + if (data.descriptorBindingUpdateUnusedWhilePending !== undefined) this.descriptorBindingUpdateUnusedWhilePending = data.descriptorBindingUpdateUnusedWhilePending; + if (data.descriptorBindingPartiallyBound !== undefined) this.descriptorBindingPartiallyBound = data.descriptorBindingPartiallyBound; + if (data.descriptorBindingVariableDescriptorCount !== undefined) this.descriptorBindingVariableDescriptorCount = data.descriptorBindingVariableDescriptorCount; + if (data.runtimeDescriptorArray !== undefined) this.runtimeDescriptorArray = data.runtimeDescriptorArray; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorIndexingFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderInputAttachmentArrayDynamicIndexing(): number { + return this.#view.getUint32(16, LE); + } + + set shaderInputAttachmentArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get shaderUniformTexelBufferArrayDynamicIndexing(): number { + return this.#view.getUint32(20, LE); + } + + set shaderUniformTexelBufferArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get shaderStorageTexelBufferArrayDynamicIndexing(): number { + return this.#view.getUint32(24, LE); + } + + set shaderStorageTexelBufferArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get shaderUniformBufferArrayNonUniformIndexing(): number { + return this.#view.getUint32(28, LE); + } + + set shaderUniformBufferArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get shaderSampledImageArrayNonUniformIndexing(): number { + return this.#view.getUint32(32, LE); + } + + set shaderSampledImageArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get shaderStorageBufferArrayNonUniformIndexing(): number { + return this.#view.getUint32(36, LE); + } + + set shaderStorageBufferArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get shaderStorageImageArrayNonUniformIndexing(): number { + return this.#view.getUint32(40, LE); + } + + set shaderStorageImageArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get shaderInputAttachmentArrayNonUniformIndexing(): number { + return this.#view.getUint32(44, LE); + } + + set shaderInputAttachmentArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get shaderUniformTexelBufferArrayNonUniformIndexing(): number { + return this.#view.getUint32(48, LE); + } + + set shaderUniformTexelBufferArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get shaderStorageTexelBufferArrayNonUniformIndexing(): number { + return this.#view.getUint32(52, LE); + } + + set shaderStorageTexelBufferArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get descriptorBindingUniformBufferUpdateAfterBind(): number { + return this.#view.getUint32(56, LE); + } + + set descriptorBindingUniformBufferUpdateAfterBind(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get descriptorBindingSampledImageUpdateAfterBind(): number { + return this.#view.getUint32(60, LE); + } + + set descriptorBindingSampledImageUpdateAfterBind(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get descriptorBindingStorageImageUpdateAfterBind(): number { + return this.#view.getUint32(64, LE); + } + + set descriptorBindingStorageImageUpdateAfterBind(value: Bool32) { + this.#view.setUint32(64, Number(value), LE); + } + + get descriptorBindingStorageBufferUpdateAfterBind(): number { + return this.#view.getUint32(68, LE); + } + + set descriptorBindingStorageBufferUpdateAfterBind(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get descriptorBindingUniformTexelBufferUpdateAfterBind(): number { + return this.#view.getUint32(72, LE); + } + + set descriptorBindingUniformTexelBufferUpdateAfterBind(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } + + get descriptorBindingStorageTexelBufferUpdateAfterBind(): number { + return this.#view.getUint32(76, LE); + } + + set descriptorBindingStorageTexelBufferUpdateAfterBind(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } + + get descriptorBindingUpdateUnusedWhilePending(): number { + return this.#view.getUint32(80, LE); + } + + set descriptorBindingUpdateUnusedWhilePending(value: Bool32) { + this.#view.setUint32(80, Number(value), LE); + } + + get descriptorBindingPartiallyBound(): number { + return this.#view.getUint32(84, LE); + } + + set descriptorBindingPartiallyBound(value: Bool32) { + this.#view.setUint32(84, Number(value), LE); + } + + get descriptorBindingVariableDescriptorCount(): number { + return this.#view.getUint32(88, LE); + } + + set descriptorBindingVariableDescriptorCount(value: Bool32) { + this.#view.setUint32(88, Number(value), LE); + } + + get runtimeDescriptorArray(): number { + return this.#view.getUint32(92, LE); + } + + set runtimeDescriptorArray(value: Bool32) { + this.#view.setUint32(92, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDescriptorIndexingFeaturesEXT.ts b/api/struct/PhysicalDeviceDescriptorIndexingFeaturesEXT.ts new file mode 100644 index 0000000..cd97bb9 --- /dev/null +++ b/api/struct/PhysicalDeviceDescriptorIndexingFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceDescriptorIndexingFeatures } from "./PhysicalDeviceDescriptorIndexingFeatures.ts"; + export type PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDescriptorIndexingProperties.ts b/api/struct/PhysicalDeviceDescriptorIndexingProperties.ts new file mode 100644 index 0000000..40f4eb5 --- /dev/null +++ b/api/struct/PhysicalDeviceDescriptorIndexingProperties.ts @@ -0,0 +1,300 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDescriptorIndexingProperties { + pNext?: AnyPointer; + maxUpdateAfterBindDescriptorsInAllPools?: number; + shaderUniformBufferArrayNonUniformIndexingNative?: Bool32; + shaderSampledImageArrayNonUniformIndexingNative?: Bool32; + shaderStorageBufferArrayNonUniformIndexingNative?: Bool32; + shaderStorageImageArrayNonUniformIndexingNative?: Bool32; + shaderInputAttachmentArrayNonUniformIndexingNative?: Bool32; + robustBufferAccessUpdateAfterBind?: Bool32; + quadDivergentImplicitLod?: Bool32; + maxPerStageDescriptorUpdateAfterBindSamplers?: number; + maxPerStageDescriptorUpdateAfterBindUniformBuffers?: number; + maxPerStageDescriptorUpdateAfterBindStorageBuffers?: number; + maxPerStageDescriptorUpdateAfterBindSampledImages?: number; + maxPerStageDescriptorUpdateAfterBindStorageImages?: number; + maxPerStageDescriptorUpdateAfterBindInputAttachments?: number; + maxPerStageUpdateAfterBindResources?: number; + maxDescriptorSetUpdateAfterBindSamplers?: number; + maxDescriptorSetUpdateAfterBindUniformBuffers?: number; + maxDescriptorSetUpdateAfterBindUniformBuffersDynamic?: number; + maxDescriptorSetUpdateAfterBindStorageBuffers?: number; + maxDescriptorSetUpdateAfterBindStorageBuffersDynamic?: number; + maxDescriptorSetUpdateAfterBindSampledImages?: number; + maxDescriptorSetUpdateAfterBindStorageImages?: number; + maxDescriptorSetUpdateAfterBindInputAttachments?: number; +} + +export class PhysicalDeviceDescriptorIndexingProperties implements BaseStruct { + static size = 112; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDescriptorIndexingProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorIndexingProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDescriptorIndexingProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxUpdateAfterBindDescriptorsInAllPools !== undefined) this.maxUpdateAfterBindDescriptorsInAllPools = data.maxUpdateAfterBindDescriptorsInAllPools; + if (data.shaderUniformBufferArrayNonUniformIndexingNative !== undefined) this.shaderUniformBufferArrayNonUniformIndexingNative = data.shaderUniformBufferArrayNonUniformIndexingNative; + if (data.shaderSampledImageArrayNonUniformIndexingNative !== undefined) this.shaderSampledImageArrayNonUniformIndexingNative = data.shaderSampledImageArrayNonUniformIndexingNative; + if (data.shaderStorageBufferArrayNonUniformIndexingNative !== undefined) this.shaderStorageBufferArrayNonUniformIndexingNative = data.shaderStorageBufferArrayNonUniformIndexingNative; + if (data.shaderStorageImageArrayNonUniformIndexingNative !== undefined) this.shaderStorageImageArrayNonUniformIndexingNative = data.shaderStorageImageArrayNonUniformIndexingNative; + if (data.shaderInputAttachmentArrayNonUniformIndexingNative !== undefined) this.shaderInputAttachmentArrayNonUniformIndexingNative = data.shaderInputAttachmentArrayNonUniformIndexingNative; + if (data.robustBufferAccessUpdateAfterBind !== undefined) this.robustBufferAccessUpdateAfterBind = data.robustBufferAccessUpdateAfterBind; + if (data.quadDivergentImplicitLod !== undefined) this.quadDivergentImplicitLod = data.quadDivergentImplicitLod; + if (data.maxPerStageDescriptorUpdateAfterBindSamplers !== undefined) this.maxPerStageDescriptorUpdateAfterBindSamplers = data.maxPerStageDescriptorUpdateAfterBindSamplers; + if (data.maxPerStageDescriptorUpdateAfterBindUniformBuffers !== undefined) this.maxPerStageDescriptorUpdateAfterBindUniformBuffers = data.maxPerStageDescriptorUpdateAfterBindUniformBuffers; + if (data.maxPerStageDescriptorUpdateAfterBindStorageBuffers !== undefined) this.maxPerStageDescriptorUpdateAfterBindStorageBuffers = data.maxPerStageDescriptorUpdateAfterBindStorageBuffers; + if (data.maxPerStageDescriptorUpdateAfterBindSampledImages !== undefined) this.maxPerStageDescriptorUpdateAfterBindSampledImages = data.maxPerStageDescriptorUpdateAfterBindSampledImages; + if (data.maxPerStageDescriptorUpdateAfterBindStorageImages !== undefined) this.maxPerStageDescriptorUpdateAfterBindStorageImages = data.maxPerStageDescriptorUpdateAfterBindStorageImages; + if (data.maxPerStageDescriptorUpdateAfterBindInputAttachments !== undefined) this.maxPerStageDescriptorUpdateAfterBindInputAttachments = data.maxPerStageDescriptorUpdateAfterBindInputAttachments; + if (data.maxPerStageUpdateAfterBindResources !== undefined) this.maxPerStageUpdateAfterBindResources = data.maxPerStageUpdateAfterBindResources; + if (data.maxDescriptorSetUpdateAfterBindSamplers !== undefined) this.maxDescriptorSetUpdateAfterBindSamplers = data.maxDescriptorSetUpdateAfterBindSamplers; + if (data.maxDescriptorSetUpdateAfterBindUniformBuffers !== undefined) this.maxDescriptorSetUpdateAfterBindUniformBuffers = data.maxDescriptorSetUpdateAfterBindUniformBuffers; + if (data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic !== undefined) this.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; + if (data.maxDescriptorSetUpdateAfterBindStorageBuffers !== undefined) this.maxDescriptorSetUpdateAfterBindStorageBuffers = data.maxDescriptorSetUpdateAfterBindStorageBuffers; + if (data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic !== undefined) this.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; + if (data.maxDescriptorSetUpdateAfterBindSampledImages !== undefined) this.maxDescriptorSetUpdateAfterBindSampledImages = data.maxDescriptorSetUpdateAfterBindSampledImages; + if (data.maxDescriptorSetUpdateAfterBindStorageImages !== undefined) this.maxDescriptorSetUpdateAfterBindStorageImages = data.maxDescriptorSetUpdateAfterBindStorageImages; + if (data.maxDescriptorSetUpdateAfterBindInputAttachments !== undefined) this.maxDescriptorSetUpdateAfterBindInputAttachments = data.maxDescriptorSetUpdateAfterBindInputAttachments; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorIndexingProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxUpdateAfterBindDescriptorsInAllPools(): number { + return this.#view.getUint32(16, LE); + } + + set maxUpdateAfterBindDescriptorsInAllPools(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get shaderUniformBufferArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(20, LE); + } + + set shaderUniformBufferArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get shaderSampledImageArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(24, LE); + } + + set shaderSampledImageArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get shaderStorageBufferArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(28, LE); + } + + set shaderStorageBufferArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get shaderStorageImageArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(32, LE); + } + + set shaderStorageImageArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get shaderInputAttachmentArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(36, LE); + } + + set shaderInputAttachmentArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get robustBufferAccessUpdateAfterBind(): number { + return this.#view.getUint32(40, LE); + } + + set robustBufferAccessUpdateAfterBind(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get quadDivergentImplicitLod(): number { + return this.#view.getUint32(44, LE); + } + + set quadDivergentImplicitLod(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindSamplers(): number { + return this.#view.getUint32(48, LE); + } + + set maxPerStageDescriptorUpdateAfterBindSamplers(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindUniformBuffers(): number { + return this.#view.getUint32(52, LE); + } + + set maxPerStageDescriptorUpdateAfterBindUniformBuffers(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindStorageBuffers(): number { + return this.#view.getUint32(56, LE); + } + + set maxPerStageDescriptorUpdateAfterBindStorageBuffers(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindSampledImages(): number { + return this.#view.getUint32(60, LE); + } + + set maxPerStageDescriptorUpdateAfterBindSampledImages(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindStorageImages(): number { + return this.#view.getUint32(64, LE); + } + + set maxPerStageDescriptorUpdateAfterBindStorageImages(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindInputAttachments(): number { + return this.#view.getUint32(68, LE); + } + + set maxPerStageDescriptorUpdateAfterBindInputAttachments(value: number) { + this.#view.setUint32(68, Number(value), LE); + } + + get maxPerStageUpdateAfterBindResources(): number { + return this.#view.getUint32(72, LE); + } + + set maxPerStageUpdateAfterBindResources(value: number) { + this.#view.setUint32(72, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindSamplers(): number { + return this.#view.getUint32(76, LE); + } + + set maxDescriptorSetUpdateAfterBindSamplers(value: number) { + this.#view.setUint32(76, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindUniformBuffers(): number { + return this.#view.getUint32(80, LE); + } + + set maxDescriptorSetUpdateAfterBindUniformBuffers(value: number) { + this.#view.setUint32(80, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(): number { + return this.#view.getUint32(84, LE); + } + + set maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(value: number) { + this.#view.setUint32(84, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindStorageBuffers(): number { + return this.#view.getUint32(88, LE); + } + + set maxDescriptorSetUpdateAfterBindStorageBuffers(value: number) { + this.#view.setUint32(88, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(): number { + return this.#view.getUint32(92, LE); + } + + set maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(value: number) { + this.#view.setUint32(92, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindSampledImages(): number { + return this.#view.getUint32(96, LE); + } + + set maxDescriptorSetUpdateAfterBindSampledImages(value: number) { + this.#view.setUint32(96, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindStorageImages(): number { + return this.#view.getUint32(100, LE); + } + + set maxDescriptorSetUpdateAfterBindStorageImages(value: number) { + this.#view.setUint32(100, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindInputAttachments(): number { + return this.#view.getUint32(104, LE); + } + + set maxDescriptorSetUpdateAfterBindInputAttachments(value: number) { + this.#view.setUint32(104, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDescriptorIndexingPropertiesEXT.ts b/api/struct/PhysicalDeviceDescriptorIndexingPropertiesEXT.ts new file mode 100644 index 0000000..62c1d09 --- /dev/null +++ b/api/struct/PhysicalDeviceDescriptorIndexingPropertiesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceDescriptorIndexingProperties } from "./PhysicalDeviceDescriptorIndexingProperties.ts"; + export type PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.ts b/api/struct/PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.ts new file mode 100644 index 0000000..5050131 --- /dev/null +++ b/api/struct/PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE { + pNext?: AnyPointer; + descriptorSetHostMapping?: Bool32; +} + +export class PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.descriptorSetHostMapping !== undefined) this.descriptorSetHostMapping = data.descriptorSetHostMapping; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get descriptorSetHostMapping(): number { + return this.#view.getUint32(16, LE); + } + + set descriptorSetHostMapping(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.ts b/api/struct/PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.ts new file mode 100644 index 0000000..4793fdb --- /dev/null +++ b/api/struct/PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDeviceGeneratedCommandsFeaturesNV { + pNext?: AnyPointer; + deviceGeneratedCommands?: Bool32; +} + +export class PhysicalDeviceDeviceGeneratedCommandsFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDeviceGeneratedCommandsFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDeviceGeneratedCommandsFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceGeneratedCommands !== undefined) this.deviceGeneratedCommands = data.deviceGeneratedCommands; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceGeneratedCommands(): number { + return this.#view.getUint32(16, LE); + } + + set deviceGeneratedCommands(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.ts b/api/struct/PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.ts new file mode 100644 index 0000000..9e74242 --- /dev/null +++ b/api/struct/PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.ts @@ -0,0 +1,159 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceDeviceGeneratedCommandsPropertiesNV { + pNext?: AnyPointer; + maxGraphicsShaderGroupCount?: number; + maxIndirectSequenceCount?: number; + maxIndirectCommandsTokenCount?: number; + maxIndirectCommandsStreamCount?: number; + maxIndirectCommandsTokenOffset?: number; + maxIndirectCommandsStreamStride?: number; + minSequencesCountBufferOffsetAlignment?: number; + minSequencesIndexBufferOffsetAlignment?: number; + minIndirectCommandsBufferOffsetAlignment?: number; +} + +export class PhysicalDeviceDeviceGeneratedCommandsPropertiesNV implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDeviceGeneratedCommandsPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDeviceGeneratedCommandsPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxGraphicsShaderGroupCount !== undefined) this.maxGraphicsShaderGroupCount = data.maxGraphicsShaderGroupCount; + if (data.maxIndirectSequenceCount !== undefined) this.maxIndirectSequenceCount = data.maxIndirectSequenceCount; + if (data.maxIndirectCommandsTokenCount !== undefined) this.maxIndirectCommandsTokenCount = data.maxIndirectCommandsTokenCount; + if (data.maxIndirectCommandsStreamCount !== undefined) this.maxIndirectCommandsStreamCount = data.maxIndirectCommandsStreamCount; + if (data.maxIndirectCommandsTokenOffset !== undefined) this.maxIndirectCommandsTokenOffset = data.maxIndirectCommandsTokenOffset; + if (data.maxIndirectCommandsStreamStride !== undefined) this.maxIndirectCommandsStreamStride = data.maxIndirectCommandsStreamStride; + if (data.minSequencesCountBufferOffsetAlignment !== undefined) this.minSequencesCountBufferOffsetAlignment = data.minSequencesCountBufferOffsetAlignment; + if (data.minSequencesIndexBufferOffsetAlignment !== undefined) this.minSequencesIndexBufferOffsetAlignment = data.minSequencesIndexBufferOffsetAlignment; + if (data.minIndirectCommandsBufferOffsetAlignment !== undefined) this.minIndirectCommandsBufferOffsetAlignment = data.minIndirectCommandsBufferOffsetAlignment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxGraphicsShaderGroupCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxGraphicsShaderGroupCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxIndirectSequenceCount(): number { + return this.#view.getUint32(20, LE); + } + + set maxIndirectSequenceCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxIndirectCommandsTokenCount(): number { + return this.#view.getUint32(24, LE); + } + + set maxIndirectCommandsTokenCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get maxIndirectCommandsStreamCount(): number { + return this.#view.getUint32(28, LE); + } + + set maxIndirectCommandsStreamCount(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get maxIndirectCommandsTokenOffset(): number { + return this.#view.getUint32(32, LE); + } + + set maxIndirectCommandsTokenOffset(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get maxIndirectCommandsStreamStride(): number { + return this.#view.getUint32(36, LE); + } + + set maxIndirectCommandsStreamStride(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get minSequencesCountBufferOffsetAlignment(): number { + return this.#view.getUint32(40, LE); + } + + set minSequencesCountBufferOffsetAlignment(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get minSequencesIndexBufferOffsetAlignment(): number { + return this.#view.getUint32(44, LE); + } + + set minSequencesIndexBufferOffsetAlignment(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get minIndirectCommandsBufferOffsetAlignment(): number { + return this.#view.getUint32(48, LE); + } + + set minIndirectCommandsBufferOffsetAlignment(value: number) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDeviceMemoryReportFeaturesEXT.ts b/api/struct/PhysicalDeviceDeviceMemoryReportFeaturesEXT.ts new file mode 100644 index 0000000..58f91e9 --- /dev/null +++ b/api/struct/PhysicalDeviceDeviceMemoryReportFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDeviceMemoryReportFeaturesEXT { + pNext?: AnyPointer; + deviceMemoryReport?: Bool32; +} + +export class PhysicalDeviceDeviceMemoryReportFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDeviceMemoryReportFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDeviceMemoryReportFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDeviceMemoryReportFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDeviceMemoryReportFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDeviceMemoryReportFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceMemoryReport !== undefined) this.deviceMemoryReport = data.deviceMemoryReport; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDeviceMemoryReportFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceMemoryReport(): number { + return this.#view.getUint32(16, LE); + } + + set deviceMemoryReport(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDiagnosticsConfigFeaturesNV.ts b/api/struct/PhysicalDeviceDiagnosticsConfigFeaturesNV.ts new file mode 100644 index 0000000..557e0fd --- /dev/null +++ b/api/struct/PhysicalDeviceDiagnosticsConfigFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDiagnosticsConfigFeaturesNV { + pNext?: AnyPointer; + diagnosticsConfig?: Bool32; +} + +export class PhysicalDeviceDiagnosticsConfigFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDiagnosticsConfigFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDiagnosticsConfigFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDiagnosticsConfigFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDiagnosticsConfigFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDiagnosticsConfigFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.diagnosticsConfig !== undefined) this.diagnosticsConfig = data.diagnosticsConfig; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDiagnosticsConfigFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get diagnosticsConfig(): number { + return this.#view.getUint32(16, LE); + } + + set diagnosticsConfig(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDiscardRectanglePropertiesEXT.ts b/api/struct/PhysicalDeviceDiscardRectanglePropertiesEXT.ts new file mode 100644 index 0000000..efd8c85 --- /dev/null +++ b/api/struct/PhysicalDeviceDiscardRectanglePropertiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceDiscardRectanglePropertiesEXT { + pNext?: AnyPointer; + maxDiscardRectangles?: number; +} + +export class PhysicalDeviceDiscardRectanglePropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDiscardRectanglePropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDiscardRectanglePropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDiscardRectanglePropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDiscardRectanglePropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDiscardRectanglePropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxDiscardRectangles !== undefined) this.maxDiscardRectangles = data.maxDiscardRectangles; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDiscardRectanglePropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxDiscardRectangles(): number { + return this.#view.getUint32(16, LE); + } + + set maxDiscardRectangles(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDriverProperties.ts b/api/struct/PhysicalDeviceDriverProperties.ts new file mode 100644 index 0000000..b665a0b --- /dev/null +++ b/api/struct/PhysicalDeviceDriverProperties.ts @@ -0,0 +1,113 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ConformanceVersion} from "./ConformanceVersion.ts"; +import { StructureType, DriverId } from "../enum.ts"; + +export interface InitPhysicalDeviceDriverProperties { + pNext?: AnyPointer; + driverID?: DriverId; + driverName?: Uint8Array; + driverInfo?: Uint8Array; + conformanceVersion?: ConformanceVersion; +} + +export class PhysicalDeviceDriverProperties implements BaseStruct { + static size = 536; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDriverProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDriverProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDriverProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDriverProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDriverProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.driverID !== undefined) this.driverID = data.driverID; + if (data.driverName !== undefined) this.driverName = data.driverName; + if (data.driverInfo !== undefined) this.driverInfo = data.driverInfo; + if (data.conformanceVersion !== undefined) this.conformanceVersion = data.conformanceVersion; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDriverProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DRIVER_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get driverID(): number { + return this.#view.getUint32(16, LE); + } + + set driverID(value: DriverId) { + this.#view.setUint32(16, Number(value), LE); + } + + get driverName(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); + } + + set driverName(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } + + get driverInfo(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); + } + + set driverInfo(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 276); + } + + get conformanceVersion(): ConformanceVersion { + return new ConformanceVersion(this.#data.subarray(532, 532 + ConformanceVersion.size)); + } + + set conformanceVersion(value: ConformanceVersion) { + if (value[BUFFER].byteLength < ConformanceVersion.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 532); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDriverPropertiesKHR.ts b/api/struct/PhysicalDeviceDriverPropertiesKHR.ts new file mode 100644 index 0000000..c80918f --- /dev/null +++ b/api/struct/PhysicalDeviceDriverPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceDriverProperties } from "./PhysicalDeviceDriverProperties.ts"; + export type PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDrmPropertiesEXT.ts b/api/struct/PhysicalDeviceDrmPropertiesEXT.ts new file mode 100644 index 0000000..3bfcdbe --- /dev/null +++ b/api/struct/PhysicalDeviceDrmPropertiesEXT.ts @@ -0,0 +1,130 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDrmPropertiesEXT { + pNext?: AnyPointer; + hasPrimary?: Bool32; + hasRender?: Bool32; + primaryMajor?: number | bigint; + primaryMinor?: number | bigint; + renderMajor?: number | bigint; + renderMinor?: number | bigint; +} + +export class PhysicalDeviceDrmPropertiesEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDrmPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDrmPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDrmPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDrmPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDrmPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.hasPrimary !== undefined) this.hasPrimary = data.hasPrimary; + if (data.hasRender !== undefined) this.hasRender = data.hasRender; + if (data.primaryMajor !== undefined) this.primaryMajor = data.primaryMajor; + if (data.primaryMinor !== undefined) this.primaryMinor = data.primaryMinor; + if (data.renderMajor !== undefined) this.renderMajor = data.renderMajor; + if (data.renderMinor !== undefined) this.renderMinor = data.renderMinor; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDrmPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DRM_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get hasPrimary(): number { + return this.#view.getUint32(16, LE); + } + + set hasPrimary(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get hasRender(): number { + return this.#view.getUint32(20, LE); + } + + set hasRender(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get primaryMajor(): bigint { + return this.#view.getBigInt64(24, LE); + } + + set primaryMajor(value: number | bigint) { + this.#view.setBigInt64(24, BigInt(value), LE); + } + + get primaryMinor(): bigint { + return this.#view.getBigInt64(32, LE); + } + + set primaryMinor(value: number | bigint) { + this.#view.setBigInt64(32, BigInt(value), LE); + } + + get renderMajor(): bigint { + return this.#view.getBigInt64(40, LE); + } + + set renderMajor(value: number | bigint) { + this.#view.setBigInt64(40, BigInt(value), LE); + } + + get renderMinor(): bigint { + return this.#view.getBigInt64(48, LE); + } + + set renderMinor(value: number | bigint) { + this.#view.setBigInt64(48, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDynamicRenderingFeatures.ts b/api/struct/PhysicalDeviceDynamicRenderingFeatures.ts new file mode 100644 index 0000000..bedb193 --- /dev/null +++ b/api/struct/PhysicalDeviceDynamicRenderingFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceDynamicRenderingFeatures { + pNext?: AnyPointer; + dynamicRendering?: Bool32; +} + +export class PhysicalDeviceDynamicRenderingFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceDynamicRenderingFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDynamicRenderingFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceDynamicRenderingFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceDynamicRenderingFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceDynamicRenderingFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.dynamicRendering !== undefined) this.dynamicRendering = data.dynamicRendering; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDynamicRenderingFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dynamicRendering(): number { + return this.#view.getUint32(16, LE); + } + + set dynamicRendering(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceDynamicRenderingFeaturesKHR.ts b/api/struct/PhysicalDeviceDynamicRenderingFeaturesKHR.ts new file mode 100644 index 0000000..d1f4ce1 --- /dev/null +++ b/api/struct/PhysicalDeviceDynamicRenderingFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceDynamicRenderingFeatures } from "./PhysicalDeviceDynamicRenderingFeatures.ts"; + export type PhysicalDeviceDynamicRenderingFeaturesKHR = PhysicalDeviceDynamicRenderingFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExclusiveScissorFeaturesNV.ts b/api/struct/PhysicalDeviceExclusiveScissorFeaturesNV.ts new file mode 100644 index 0000000..c93d156 --- /dev/null +++ b/api/struct/PhysicalDeviceExclusiveScissorFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceExclusiveScissorFeaturesNV { + pNext?: AnyPointer; + exclusiveScissor?: Bool32; +} + +export class PhysicalDeviceExclusiveScissorFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExclusiveScissorFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExclusiveScissorFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExclusiveScissorFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExclusiveScissorFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExclusiveScissorFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.exclusiveScissor !== undefined) this.exclusiveScissor = data.exclusiveScissor; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExclusiveScissorFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get exclusiveScissor(): number { + return this.#view.getUint32(16, LE); + } + + set exclusiveScissor(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExtendedDynamicState2FeaturesEXT.ts b/api/struct/PhysicalDeviceExtendedDynamicState2FeaturesEXT.ts new file mode 100644 index 0000000..e588dfc --- /dev/null +++ b/api/struct/PhysicalDeviceExtendedDynamicState2FeaturesEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceExtendedDynamicState2FeaturesEXT { + pNext?: AnyPointer; + extendedDynamicState2?: Bool32; + extendedDynamicState2LogicOp?: Bool32; + extendedDynamicState2PatchControlPoints?: Bool32; +} + +export class PhysicalDeviceExtendedDynamicState2FeaturesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExtendedDynamicState2FeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExtendedDynamicState2FeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState2FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExtendedDynamicState2FeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState2FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.extendedDynamicState2 !== undefined) this.extendedDynamicState2 = data.extendedDynamicState2; + if (data.extendedDynamicState2LogicOp !== undefined) this.extendedDynamicState2LogicOp = data.extendedDynamicState2LogicOp; + if (data.extendedDynamicState2PatchControlPoints !== undefined) this.extendedDynamicState2PatchControlPoints = data.extendedDynamicState2PatchControlPoints; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicState2FeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get extendedDynamicState2(): number { + return this.#view.getUint32(16, LE); + } + + set extendedDynamicState2(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get extendedDynamicState2LogicOp(): number { + return this.#view.getUint32(20, LE); + } + + set extendedDynamicState2LogicOp(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get extendedDynamicState2PatchControlPoints(): number { + return this.#view.getUint32(24, LE); + } + + set extendedDynamicState2PatchControlPoints(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExtendedDynamicState3FeaturesEXT.ts b/api/struct/PhysicalDeviceExtendedDynamicState3FeaturesEXT.ts new file mode 100644 index 0000000..687aa0a --- /dev/null +++ b/api/struct/PhysicalDeviceExtendedDynamicState3FeaturesEXT.ts @@ -0,0 +1,380 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceExtendedDynamicState3FeaturesEXT { + pNext?: AnyPointer; + extendedDynamicState3TessellationDomainOrigin?: Bool32; + extendedDynamicState3DepthClampEnable?: Bool32; + extendedDynamicState3PolygonMode?: Bool32; + extendedDynamicState3RasterizationSamples?: Bool32; + extendedDynamicState3SampleMask?: Bool32; + extendedDynamicState3AlphaToCoverageEnable?: Bool32; + extendedDynamicState3AlphaToOneEnable?: Bool32; + extendedDynamicState3LogicOpEnable?: Bool32; + extendedDynamicState3ColorBlendEnable?: Bool32; + extendedDynamicState3ColorBlendEquation?: Bool32; + extendedDynamicState3ColorWriteMask?: Bool32; + extendedDynamicState3RasterizationStream?: Bool32; + extendedDynamicState3ConservativeRasterizationMode?: Bool32; + extendedDynamicState3ExtraPrimitiveOverestimationSize?: Bool32; + extendedDynamicState3DepthClipEnable?: Bool32; + extendedDynamicState3SampleLocationsEnable?: Bool32; + extendedDynamicState3ColorBlendAdvanced?: Bool32; + extendedDynamicState3ProvokingVertexMode?: Bool32; + extendedDynamicState3LineRasterizationMode?: Bool32; + extendedDynamicState3LineStippleEnable?: Bool32; + extendedDynamicState3DepthClipNegativeOneToOne?: Bool32; + extendedDynamicState3ViewportWScalingEnable?: Bool32; + extendedDynamicState3ViewportSwizzle?: Bool32; + extendedDynamicState3CoverageToColorEnable?: Bool32; + extendedDynamicState3CoverageToColorLocation?: Bool32; + extendedDynamicState3CoverageModulationMode?: Bool32; + extendedDynamicState3CoverageModulationTableEnable?: Bool32; + extendedDynamicState3CoverageModulationTable?: Bool32; + extendedDynamicState3CoverageReductionMode?: Bool32; + extendedDynamicState3RepresentativeFragmentTestEnable?: Bool32; + extendedDynamicState3ShadingRateImageEnable?: Bool32; +} + +export class PhysicalDeviceExtendedDynamicState3FeaturesEXT implements BaseStruct { + static size = 144; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExtendedDynamicState3FeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExtendedDynamicState3FeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExtendedDynamicState3FeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.extendedDynamicState3TessellationDomainOrigin !== undefined) this.extendedDynamicState3TessellationDomainOrigin = data.extendedDynamicState3TessellationDomainOrigin; + if (data.extendedDynamicState3DepthClampEnable !== undefined) this.extendedDynamicState3DepthClampEnable = data.extendedDynamicState3DepthClampEnable; + if (data.extendedDynamicState3PolygonMode !== undefined) this.extendedDynamicState3PolygonMode = data.extendedDynamicState3PolygonMode; + if (data.extendedDynamicState3RasterizationSamples !== undefined) this.extendedDynamicState3RasterizationSamples = data.extendedDynamicState3RasterizationSamples; + if (data.extendedDynamicState3SampleMask !== undefined) this.extendedDynamicState3SampleMask = data.extendedDynamicState3SampleMask; + if (data.extendedDynamicState3AlphaToCoverageEnable !== undefined) this.extendedDynamicState3AlphaToCoverageEnable = data.extendedDynamicState3AlphaToCoverageEnable; + if (data.extendedDynamicState3AlphaToOneEnable !== undefined) this.extendedDynamicState3AlphaToOneEnable = data.extendedDynamicState3AlphaToOneEnable; + if (data.extendedDynamicState3LogicOpEnable !== undefined) this.extendedDynamicState3LogicOpEnable = data.extendedDynamicState3LogicOpEnable; + if (data.extendedDynamicState3ColorBlendEnable !== undefined) this.extendedDynamicState3ColorBlendEnable = data.extendedDynamicState3ColorBlendEnable; + if (data.extendedDynamicState3ColorBlendEquation !== undefined) this.extendedDynamicState3ColorBlendEquation = data.extendedDynamicState3ColorBlendEquation; + if (data.extendedDynamicState3ColorWriteMask !== undefined) this.extendedDynamicState3ColorWriteMask = data.extendedDynamicState3ColorWriteMask; + if (data.extendedDynamicState3RasterizationStream !== undefined) this.extendedDynamicState3RasterizationStream = data.extendedDynamicState3RasterizationStream; + if (data.extendedDynamicState3ConservativeRasterizationMode !== undefined) this.extendedDynamicState3ConservativeRasterizationMode = data.extendedDynamicState3ConservativeRasterizationMode; + if (data.extendedDynamicState3ExtraPrimitiveOverestimationSize !== undefined) this.extendedDynamicState3ExtraPrimitiveOverestimationSize = data.extendedDynamicState3ExtraPrimitiveOverestimationSize; + if (data.extendedDynamicState3DepthClipEnable !== undefined) this.extendedDynamicState3DepthClipEnable = data.extendedDynamicState3DepthClipEnable; + if (data.extendedDynamicState3SampleLocationsEnable !== undefined) this.extendedDynamicState3SampleLocationsEnable = data.extendedDynamicState3SampleLocationsEnable; + if (data.extendedDynamicState3ColorBlendAdvanced !== undefined) this.extendedDynamicState3ColorBlendAdvanced = data.extendedDynamicState3ColorBlendAdvanced; + if (data.extendedDynamicState3ProvokingVertexMode !== undefined) this.extendedDynamicState3ProvokingVertexMode = data.extendedDynamicState3ProvokingVertexMode; + if (data.extendedDynamicState3LineRasterizationMode !== undefined) this.extendedDynamicState3LineRasterizationMode = data.extendedDynamicState3LineRasterizationMode; + if (data.extendedDynamicState3LineStippleEnable !== undefined) this.extendedDynamicState3LineStippleEnable = data.extendedDynamicState3LineStippleEnable; + if (data.extendedDynamicState3DepthClipNegativeOneToOne !== undefined) this.extendedDynamicState3DepthClipNegativeOneToOne = data.extendedDynamicState3DepthClipNegativeOneToOne; + if (data.extendedDynamicState3ViewportWScalingEnable !== undefined) this.extendedDynamicState3ViewportWScalingEnable = data.extendedDynamicState3ViewportWScalingEnable; + if (data.extendedDynamicState3ViewportSwizzle !== undefined) this.extendedDynamicState3ViewportSwizzle = data.extendedDynamicState3ViewportSwizzle; + if (data.extendedDynamicState3CoverageToColorEnable !== undefined) this.extendedDynamicState3CoverageToColorEnable = data.extendedDynamicState3CoverageToColorEnable; + if (data.extendedDynamicState3CoverageToColorLocation !== undefined) this.extendedDynamicState3CoverageToColorLocation = data.extendedDynamicState3CoverageToColorLocation; + if (data.extendedDynamicState3CoverageModulationMode !== undefined) this.extendedDynamicState3CoverageModulationMode = data.extendedDynamicState3CoverageModulationMode; + if (data.extendedDynamicState3CoverageModulationTableEnable !== undefined) this.extendedDynamicState3CoverageModulationTableEnable = data.extendedDynamicState3CoverageModulationTableEnable; + if (data.extendedDynamicState3CoverageModulationTable !== undefined) this.extendedDynamicState3CoverageModulationTable = data.extendedDynamicState3CoverageModulationTable; + if (data.extendedDynamicState3CoverageReductionMode !== undefined) this.extendedDynamicState3CoverageReductionMode = data.extendedDynamicState3CoverageReductionMode; + if (data.extendedDynamicState3RepresentativeFragmentTestEnable !== undefined) this.extendedDynamicState3RepresentativeFragmentTestEnable = data.extendedDynamicState3RepresentativeFragmentTestEnable; + if (data.extendedDynamicState3ShadingRateImageEnable !== undefined) this.extendedDynamicState3ShadingRateImageEnable = data.extendedDynamicState3ShadingRateImageEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicState3FeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get extendedDynamicState3TessellationDomainOrigin(): number { + return this.#view.getUint32(16, LE); + } + + set extendedDynamicState3TessellationDomainOrigin(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get extendedDynamicState3DepthClampEnable(): number { + return this.#view.getUint32(20, LE); + } + + set extendedDynamicState3DepthClampEnable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get extendedDynamicState3PolygonMode(): number { + return this.#view.getUint32(24, LE); + } + + set extendedDynamicState3PolygonMode(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get extendedDynamicState3RasterizationSamples(): number { + return this.#view.getUint32(28, LE); + } + + set extendedDynamicState3RasterizationSamples(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get extendedDynamicState3SampleMask(): number { + return this.#view.getUint32(32, LE); + } + + set extendedDynamicState3SampleMask(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get extendedDynamicState3AlphaToCoverageEnable(): number { + return this.#view.getUint32(36, LE); + } + + set extendedDynamicState3AlphaToCoverageEnable(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get extendedDynamicState3AlphaToOneEnable(): number { + return this.#view.getUint32(40, LE); + } + + set extendedDynamicState3AlphaToOneEnable(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get extendedDynamicState3LogicOpEnable(): number { + return this.#view.getUint32(44, LE); + } + + set extendedDynamicState3LogicOpEnable(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get extendedDynamicState3ColorBlendEnable(): number { + return this.#view.getUint32(48, LE); + } + + set extendedDynamicState3ColorBlendEnable(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get extendedDynamicState3ColorBlendEquation(): number { + return this.#view.getUint32(52, LE); + } + + set extendedDynamicState3ColorBlendEquation(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get extendedDynamicState3ColorWriteMask(): number { + return this.#view.getUint32(56, LE); + } + + set extendedDynamicState3ColorWriteMask(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get extendedDynamicState3RasterizationStream(): number { + return this.#view.getUint32(60, LE); + } + + set extendedDynamicState3RasterizationStream(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get extendedDynamicState3ConservativeRasterizationMode(): number { + return this.#view.getUint32(64, LE); + } + + set extendedDynamicState3ConservativeRasterizationMode(value: Bool32) { + this.#view.setUint32(64, Number(value), LE); + } + + get extendedDynamicState3ExtraPrimitiveOverestimationSize(): number { + return this.#view.getUint32(68, LE); + } + + set extendedDynamicState3ExtraPrimitiveOverestimationSize(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get extendedDynamicState3DepthClipEnable(): number { + return this.#view.getUint32(72, LE); + } + + set extendedDynamicState3DepthClipEnable(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } + + get extendedDynamicState3SampleLocationsEnable(): number { + return this.#view.getUint32(76, LE); + } + + set extendedDynamicState3SampleLocationsEnable(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } + + get extendedDynamicState3ColorBlendAdvanced(): number { + return this.#view.getUint32(80, LE); + } + + set extendedDynamicState3ColorBlendAdvanced(value: Bool32) { + this.#view.setUint32(80, Number(value), LE); + } + + get extendedDynamicState3ProvokingVertexMode(): number { + return this.#view.getUint32(84, LE); + } + + set extendedDynamicState3ProvokingVertexMode(value: Bool32) { + this.#view.setUint32(84, Number(value), LE); + } + + get extendedDynamicState3LineRasterizationMode(): number { + return this.#view.getUint32(88, LE); + } + + set extendedDynamicState3LineRasterizationMode(value: Bool32) { + this.#view.setUint32(88, Number(value), LE); + } + + get extendedDynamicState3LineStippleEnable(): number { + return this.#view.getUint32(92, LE); + } + + set extendedDynamicState3LineStippleEnable(value: Bool32) { + this.#view.setUint32(92, Number(value), LE); + } + + get extendedDynamicState3DepthClipNegativeOneToOne(): number { + return this.#view.getUint32(96, LE); + } + + set extendedDynamicState3DepthClipNegativeOneToOne(value: Bool32) { + this.#view.setUint32(96, Number(value), LE); + } + + get extendedDynamicState3ViewportWScalingEnable(): number { + return this.#view.getUint32(100, LE); + } + + set extendedDynamicState3ViewportWScalingEnable(value: Bool32) { + this.#view.setUint32(100, Number(value), LE); + } + + get extendedDynamicState3ViewportSwizzle(): number { + return this.#view.getUint32(104, LE); + } + + set extendedDynamicState3ViewportSwizzle(value: Bool32) { + this.#view.setUint32(104, Number(value), LE); + } + + get extendedDynamicState3CoverageToColorEnable(): number { + return this.#view.getUint32(108, LE); + } + + set extendedDynamicState3CoverageToColorEnable(value: Bool32) { + this.#view.setUint32(108, Number(value), LE); + } + + get extendedDynamicState3CoverageToColorLocation(): number { + return this.#view.getUint32(112, LE); + } + + set extendedDynamicState3CoverageToColorLocation(value: Bool32) { + this.#view.setUint32(112, Number(value), LE); + } + + get extendedDynamicState3CoverageModulationMode(): number { + return this.#view.getUint32(116, LE); + } + + set extendedDynamicState3CoverageModulationMode(value: Bool32) { + this.#view.setUint32(116, Number(value), LE); + } + + get extendedDynamicState3CoverageModulationTableEnable(): number { + return this.#view.getUint32(120, LE); + } + + set extendedDynamicState3CoverageModulationTableEnable(value: Bool32) { + this.#view.setUint32(120, Number(value), LE); + } + + get extendedDynamicState3CoverageModulationTable(): number { + return this.#view.getUint32(124, LE); + } + + set extendedDynamicState3CoverageModulationTable(value: Bool32) { + this.#view.setUint32(124, Number(value), LE); + } + + get extendedDynamicState3CoverageReductionMode(): number { + return this.#view.getUint32(128, LE); + } + + set extendedDynamicState3CoverageReductionMode(value: Bool32) { + this.#view.setUint32(128, Number(value), LE); + } + + get extendedDynamicState3RepresentativeFragmentTestEnable(): number { + return this.#view.getUint32(132, LE); + } + + set extendedDynamicState3RepresentativeFragmentTestEnable(value: Bool32) { + this.#view.setUint32(132, Number(value), LE); + } + + get extendedDynamicState3ShadingRateImageEnable(): number { + return this.#view.getUint32(136, LE); + } + + set extendedDynamicState3ShadingRateImageEnable(value: Bool32) { + this.#view.setUint32(136, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExtendedDynamicState3PropertiesEXT.ts b/api/struct/PhysicalDeviceExtendedDynamicState3PropertiesEXT.ts new file mode 100644 index 0000000..10b647a --- /dev/null +++ b/api/struct/PhysicalDeviceExtendedDynamicState3PropertiesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceExtendedDynamicState3PropertiesEXT { + pNext?: AnyPointer; + dynamicPrimitiveTopologyUnrestricted?: Bool32; +} + +export class PhysicalDeviceExtendedDynamicState3PropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExtendedDynamicState3PropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExtendedDynamicState3PropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3PropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExtendedDynamicState3PropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3PropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.dynamicPrimitiveTopologyUnrestricted !== undefined) this.dynamicPrimitiveTopologyUnrestricted = data.dynamicPrimitiveTopologyUnrestricted; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicState3PropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dynamicPrimitiveTopologyUnrestricted(): number { + return this.#view.getUint32(16, LE); + } + + set dynamicPrimitiveTopologyUnrestricted(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExtendedDynamicStateFeaturesEXT.ts b/api/struct/PhysicalDeviceExtendedDynamicStateFeaturesEXT.ts new file mode 100644 index 0000000..b1744b6 --- /dev/null +++ b/api/struct/PhysicalDeviceExtendedDynamicStateFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceExtendedDynamicStateFeaturesEXT { + pNext?: AnyPointer; + extendedDynamicState?: Bool32; +} + +export class PhysicalDeviceExtendedDynamicStateFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExtendedDynamicStateFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExtendedDynamicStateFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicStateFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExtendedDynamicStateFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicStateFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.extendedDynamicState !== undefined) this.extendedDynamicState = data.extendedDynamicState; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicStateFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get extendedDynamicState(): number { + return this.#view.getUint32(16, LE); + } + + set extendedDynamicState(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalBufferInfo.ts b/api/struct/PhysicalDeviceExternalBufferInfo.ts new file mode 100644 index 0000000..3230f61 --- /dev/null +++ b/api/struct/PhysicalDeviceExternalBufferInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; +import { BufferCreateFlags, BufferUsageFlags } from "../def.ts"; + +export interface InitPhysicalDeviceExternalBufferInfo { + pNext?: AnyPointer; + flags?: BufferCreateFlags; + usage?: BufferUsageFlags; + handleType?: ExternalMemoryHandleTypeFlagBits; +} + +export class PhysicalDeviceExternalBufferInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExternalBufferInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalBufferInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExternalBufferInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExternalBufferInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExternalBufferInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.usage !== undefined) this.usage = data.usage; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalBufferInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: BufferCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get usage(): number { + return this.#view.getUint32(20, LE); + } + + set usage(value: BufferUsageFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalBufferInfoKHR.ts b/api/struct/PhysicalDeviceExternalBufferInfoKHR.ts new file mode 100644 index 0000000..e809f7f --- /dev/null +++ b/api/struct/PhysicalDeviceExternalBufferInfoKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceExternalBufferInfo } from "./PhysicalDeviceExternalBufferInfo.ts"; + export type PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalFenceInfo.ts b/api/struct/PhysicalDeviceExternalFenceInfo.ts new file mode 100644 index 0000000..fe8729d --- /dev/null +++ b/api/struct/PhysicalDeviceExternalFenceInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalFenceHandleTypeFlagBits } from "../enum.ts"; + +export interface InitPhysicalDeviceExternalFenceInfo { + pNext?: AnyPointer; + handleType?: ExternalFenceHandleTypeFlagBits; +} + +export class PhysicalDeviceExternalFenceInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExternalFenceInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalFenceInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExternalFenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExternalFenceInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExternalFenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalFenceInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(16, LE); + } + + set handleType(value: ExternalFenceHandleTypeFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalFenceInfoKHR.ts b/api/struct/PhysicalDeviceExternalFenceInfoKHR.ts new file mode 100644 index 0000000..e42024d --- /dev/null +++ b/api/struct/PhysicalDeviceExternalFenceInfoKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceExternalFenceInfo } from "./PhysicalDeviceExternalFenceInfo.ts"; + export type PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalImageFormatInfo.ts b/api/struct/PhysicalDeviceExternalImageFormatInfo.ts new file mode 100644 index 0000000..4e688dd --- /dev/null +++ b/api/struct/PhysicalDeviceExternalImageFormatInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalMemoryHandleTypeFlagBits } from "../enum.ts"; + +export interface InitPhysicalDeviceExternalImageFormatInfo { + pNext?: AnyPointer; + handleType?: ExternalMemoryHandleTypeFlagBits; +} + +export class PhysicalDeviceExternalImageFormatInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExternalImageFormatInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalImageFormatInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExternalImageFormatInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExternalImageFormatInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExternalImageFormatInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalImageFormatInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(16, LE); + } + + set handleType(value: ExternalMemoryHandleTypeFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalImageFormatInfoKHR.ts b/api/struct/PhysicalDeviceExternalImageFormatInfoKHR.ts new file mode 100644 index 0000000..a111e9e --- /dev/null +++ b/api/struct/PhysicalDeviceExternalImageFormatInfoKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceExternalImageFormatInfo } from "./PhysicalDeviceExternalImageFormatInfo.ts"; + export type PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalMemoryHostPropertiesEXT.ts b/api/struct/PhysicalDeviceExternalMemoryHostPropertiesEXT.ts new file mode 100644 index 0000000..5ffb48c --- /dev/null +++ b/api/struct/PhysicalDeviceExternalMemoryHostPropertiesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitPhysicalDeviceExternalMemoryHostPropertiesEXT { + pNext?: AnyPointer; + minImportedHostPointerAlignment?: DeviceSize; +} + +export class PhysicalDeviceExternalMemoryHostPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExternalMemoryHostPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalMemoryHostPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExternalMemoryHostPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExternalMemoryHostPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExternalMemoryHostPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minImportedHostPointerAlignment !== undefined) this.minImportedHostPointerAlignment = data.minImportedHostPointerAlignment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalMemoryHostPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minImportedHostPointerAlignment(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set minImportedHostPointerAlignment(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalMemoryRDMAFeaturesNV.ts b/api/struct/PhysicalDeviceExternalMemoryRDMAFeaturesNV.ts new file mode 100644 index 0000000..d3e3561 --- /dev/null +++ b/api/struct/PhysicalDeviceExternalMemoryRDMAFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceExternalMemoryRDMAFeaturesNV { + pNext?: AnyPointer; + externalMemoryRDMA?: Bool32; +} + +export class PhysicalDeviceExternalMemoryRDMAFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExternalMemoryRDMAFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalMemoryRDMAFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExternalMemoryRDMAFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExternalMemoryRDMAFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExternalMemoryRDMAFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.externalMemoryRDMA !== undefined) this.externalMemoryRDMA = data.externalMemoryRDMA; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalMemoryRDMAFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get externalMemoryRDMA(): number { + return this.#view.getUint32(16, LE); + } + + set externalMemoryRDMA(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalSemaphoreInfo.ts b/api/struct/PhysicalDeviceExternalSemaphoreInfo.ts new file mode 100644 index 0000000..bc2415e --- /dev/null +++ b/api/struct/PhysicalDeviceExternalSemaphoreInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalSemaphoreHandleTypeFlagBits } from "../enum.ts"; + +export interface InitPhysicalDeviceExternalSemaphoreInfo { + pNext?: AnyPointer; + handleType?: ExternalSemaphoreHandleTypeFlagBits; +} + +export class PhysicalDeviceExternalSemaphoreInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceExternalSemaphoreInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalSemaphoreInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceExternalSemaphoreInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceExternalSemaphoreInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceExternalSemaphoreInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalSemaphoreInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(16, LE); + } + + set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceExternalSemaphoreInfoKHR.ts b/api/struct/PhysicalDeviceExternalSemaphoreInfoKHR.ts new file mode 100644 index 0000000..749eedc --- /dev/null +++ b/api/struct/PhysicalDeviceExternalSemaphoreInfoKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceExternalSemaphoreInfo } from "./PhysicalDeviceExternalSemaphoreInfo.ts"; + export type PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFaultFeaturesEXT.ts b/api/struct/PhysicalDeviceFaultFeaturesEXT.ts new file mode 100644 index 0000000..e79400b --- /dev/null +++ b/api/struct/PhysicalDeviceFaultFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFaultFeaturesEXT { + pNext?: AnyPointer; + deviceFault?: Bool32; + deviceFaultVendorBinary?: Bool32; +} + +export class PhysicalDeviceFaultFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFaultFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFaultFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFaultFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFaultFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFaultFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceFault !== undefined) this.deviceFault = data.deviceFault; + if (data.deviceFaultVendorBinary !== undefined) this.deviceFaultVendorBinary = data.deviceFaultVendorBinary; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFaultFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FAULT_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceFault(): number { + return this.#view.getUint32(16, LE); + } + + set deviceFault(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get deviceFaultVendorBinary(): number { + return this.#view.getUint32(20, LE); + } + + set deviceFaultVendorBinary(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFeatures.ts b/api/struct/PhysicalDeviceFeatures.ts new file mode 100644 index 0000000..bfa0aff --- /dev/null +++ b/api/struct/PhysicalDeviceFeatures.ts @@ -0,0 +1,600 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFeatures { + robustBufferAccess?: Bool32; + fullDrawIndexUint32?: Bool32; + imageCubeArray?: Bool32; + independentBlend?: Bool32; + geometryShader?: Bool32; + tessellationShader?: Bool32; + sampleRateShading?: Bool32; + dualSrcBlend?: Bool32; + logicOp?: Bool32; + multiDrawIndirect?: Bool32; + drawIndirectFirstInstance?: Bool32; + depthClamp?: Bool32; + depthBiasClamp?: Bool32; + fillModeNonSolid?: Bool32; + depthBounds?: Bool32; + wideLines?: Bool32; + largePoints?: Bool32; + alphaToOne?: Bool32; + multiViewport?: Bool32; + samplerAnisotropy?: Bool32; + textureCompressionETC2?: Bool32; + textureCompressionASTC_LDR?: Bool32; + textureCompressionBC?: Bool32; + occlusionQueryPrecise?: Bool32; + pipelineStatisticsQuery?: Bool32; + vertexPipelineStoresAndAtomics?: Bool32; + fragmentStoresAndAtomics?: Bool32; + shaderTessellationAndGeometryPointSize?: Bool32; + shaderImageGatherExtended?: Bool32; + shaderStorageImageExtendedFormats?: Bool32; + shaderStorageImageMultisample?: Bool32; + shaderStorageImageReadWithoutFormat?: Bool32; + shaderStorageImageWriteWithoutFormat?: Bool32; + shaderUniformBufferArrayDynamicIndexing?: Bool32; + shaderSampledImageArrayDynamicIndexing?: Bool32; + shaderStorageBufferArrayDynamicIndexing?: Bool32; + shaderStorageImageArrayDynamicIndexing?: Bool32; + shaderClipDistance?: Bool32; + shaderCullDistance?: Bool32; + shaderFloat64?: Bool32; + shaderInt64?: Bool32; + shaderInt16?: Bool32; + shaderResourceResidency?: Bool32; + shaderResourceMinLod?: Bool32; + sparseBinding?: Bool32; + sparseResidencyBuffer?: Bool32; + sparseResidencyImage2D?: Bool32; + sparseResidencyImage3D?: Bool32; + sparseResidency2Samples?: Bool32; + sparseResidency4Samples?: Bool32; + sparseResidency8Samples?: Bool32; + sparseResidency16Samples?: Bool32; + sparseResidencyAliased?: Bool32; + variableMultisampleRate?: Bool32; + inheritedQueries?: Bool32; +} + +export class PhysicalDeviceFeatures implements BaseStruct { + static size = 220; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.robustBufferAccess !== undefined) this.robustBufferAccess = data.robustBufferAccess; + if (data.fullDrawIndexUint32 !== undefined) this.fullDrawIndexUint32 = data.fullDrawIndexUint32; + if (data.imageCubeArray !== undefined) this.imageCubeArray = data.imageCubeArray; + if (data.independentBlend !== undefined) this.independentBlend = data.independentBlend; + if (data.geometryShader !== undefined) this.geometryShader = data.geometryShader; + if (data.tessellationShader !== undefined) this.tessellationShader = data.tessellationShader; + if (data.sampleRateShading !== undefined) this.sampleRateShading = data.sampleRateShading; + if (data.dualSrcBlend !== undefined) this.dualSrcBlend = data.dualSrcBlend; + if (data.logicOp !== undefined) this.logicOp = data.logicOp; + if (data.multiDrawIndirect !== undefined) this.multiDrawIndirect = data.multiDrawIndirect; + if (data.drawIndirectFirstInstance !== undefined) this.drawIndirectFirstInstance = data.drawIndirectFirstInstance; + if (data.depthClamp !== undefined) this.depthClamp = data.depthClamp; + if (data.depthBiasClamp !== undefined) this.depthBiasClamp = data.depthBiasClamp; + if (data.fillModeNonSolid !== undefined) this.fillModeNonSolid = data.fillModeNonSolid; + if (data.depthBounds !== undefined) this.depthBounds = data.depthBounds; + if (data.wideLines !== undefined) this.wideLines = data.wideLines; + if (data.largePoints !== undefined) this.largePoints = data.largePoints; + if (data.alphaToOne !== undefined) this.alphaToOne = data.alphaToOne; + if (data.multiViewport !== undefined) this.multiViewport = data.multiViewport; + if (data.samplerAnisotropy !== undefined) this.samplerAnisotropy = data.samplerAnisotropy; + if (data.textureCompressionETC2 !== undefined) this.textureCompressionETC2 = data.textureCompressionETC2; + if (data.textureCompressionASTC_LDR !== undefined) this.textureCompressionASTC_LDR = data.textureCompressionASTC_LDR; + if (data.textureCompressionBC !== undefined) this.textureCompressionBC = data.textureCompressionBC; + if (data.occlusionQueryPrecise !== undefined) this.occlusionQueryPrecise = data.occlusionQueryPrecise; + if (data.pipelineStatisticsQuery !== undefined) this.pipelineStatisticsQuery = data.pipelineStatisticsQuery; + if (data.vertexPipelineStoresAndAtomics !== undefined) this.vertexPipelineStoresAndAtomics = data.vertexPipelineStoresAndAtomics; + if (data.fragmentStoresAndAtomics !== undefined) this.fragmentStoresAndAtomics = data.fragmentStoresAndAtomics; + if (data.shaderTessellationAndGeometryPointSize !== undefined) this.shaderTessellationAndGeometryPointSize = data.shaderTessellationAndGeometryPointSize; + if (data.shaderImageGatherExtended !== undefined) this.shaderImageGatherExtended = data.shaderImageGatherExtended; + if (data.shaderStorageImageExtendedFormats !== undefined) this.shaderStorageImageExtendedFormats = data.shaderStorageImageExtendedFormats; + if (data.shaderStorageImageMultisample !== undefined) this.shaderStorageImageMultisample = data.shaderStorageImageMultisample; + if (data.shaderStorageImageReadWithoutFormat !== undefined) this.shaderStorageImageReadWithoutFormat = data.shaderStorageImageReadWithoutFormat; + if (data.shaderStorageImageWriteWithoutFormat !== undefined) this.shaderStorageImageWriteWithoutFormat = data.shaderStorageImageWriteWithoutFormat; + if (data.shaderUniformBufferArrayDynamicIndexing !== undefined) this.shaderUniformBufferArrayDynamicIndexing = data.shaderUniformBufferArrayDynamicIndexing; + if (data.shaderSampledImageArrayDynamicIndexing !== undefined) this.shaderSampledImageArrayDynamicIndexing = data.shaderSampledImageArrayDynamicIndexing; + if (data.shaderStorageBufferArrayDynamicIndexing !== undefined) this.shaderStorageBufferArrayDynamicIndexing = data.shaderStorageBufferArrayDynamicIndexing; + if (data.shaderStorageImageArrayDynamicIndexing !== undefined) this.shaderStorageImageArrayDynamicIndexing = data.shaderStorageImageArrayDynamicIndexing; + if (data.shaderClipDistance !== undefined) this.shaderClipDistance = data.shaderClipDistance; + if (data.shaderCullDistance !== undefined) this.shaderCullDistance = data.shaderCullDistance; + if (data.shaderFloat64 !== undefined) this.shaderFloat64 = data.shaderFloat64; + if (data.shaderInt64 !== undefined) this.shaderInt64 = data.shaderInt64; + if (data.shaderInt16 !== undefined) this.shaderInt16 = data.shaderInt16; + if (data.shaderResourceResidency !== undefined) this.shaderResourceResidency = data.shaderResourceResidency; + if (data.shaderResourceMinLod !== undefined) this.shaderResourceMinLod = data.shaderResourceMinLod; + if (data.sparseBinding !== undefined) this.sparseBinding = data.sparseBinding; + if (data.sparseResidencyBuffer !== undefined) this.sparseResidencyBuffer = data.sparseResidencyBuffer; + if (data.sparseResidencyImage2D !== undefined) this.sparseResidencyImage2D = data.sparseResidencyImage2D; + if (data.sparseResidencyImage3D !== undefined) this.sparseResidencyImage3D = data.sparseResidencyImage3D; + if (data.sparseResidency2Samples !== undefined) this.sparseResidency2Samples = data.sparseResidency2Samples; + if (data.sparseResidency4Samples !== undefined) this.sparseResidency4Samples = data.sparseResidency4Samples; + if (data.sparseResidency8Samples !== undefined) this.sparseResidency8Samples = data.sparseResidency8Samples; + if (data.sparseResidency16Samples !== undefined) this.sparseResidency16Samples = data.sparseResidency16Samples; + if (data.sparseResidencyAliased !== undefined) this.sparseResidencyAliased = data.sparseResidencyAliased; + if (data.variableMultisampleRate !== undefined) this.variableMultisampleRate = data.variableMultisampleRate; + if (data.inheritedQueries !== undefined) this.inheritedQueries = data.inheritedQueries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get robustBufferAccess(): number { + return this.#view.getUint32(0, LE); + } + + set robustBufferAccess(value: Bool32) { + this.#view.setUint32(0, Number(value), LE); + } + + get fullDrawIndexUint32(): number { + return this.#view.getUint32(4, LE); + } + + set fullDrawIndexUint32(value: Bool32) { + this.#view.setUint32(4, Number(value), LE); + } + + get imageCubeArray(): number { + return this.#view.getUint32(8, LE); + } + + set imageCubeArray(value: Bool32) { + this.#view.setUint32(8, Number(value), LE); + } + + get independentBlend(): number { + return this.#view.getUint32(12, LE); + } + + set independentBlend(value: Bool32) { + this.#view.setUint32(12, Number(value), LE); + } + + get geometryShader(): number { + return this.#view.getUint32(16, LE); + } + + set geometryShader(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get tessellationShader(): number { + return this.#view.getUint32(20, LE); + } + + set tessellationShader(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get sampleRateShading(): number { + return this.#view.getUint32(24, LE); + } + + set sampleRateShading(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get dualSrcBlend(): number { + return this.#view.getUint32(28, LE); + } + + set dualSrcBlend(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get logicOp(): number { + return this.#view.getUint32(32, LE); + } + + set logicOp(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get multiDrawIndirect(): number { + return this.#view.getUint32(36, LE); + } + + set multiDrawIndirect(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get drawIndirectFirstInstance(): number { + return this.#view.getUint32(40, LE); + } + + set drawIndirectFirstInstance(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get depthClamp(): number { + return this.#view.getUint32(44, LE); + } + + set depthClamp(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get depthBiasClamp(): number { + return this.#view.getUint32(48, LE); + } + + set depthBiasClamp(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get fillModeNonSolid(): number { + return this.#view.getUint32(52, LE); + } + + set fillModeNonSolid(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get depthBounds(): number { + return this.#view.getUint32(56, LE); + } + + set depthBounds(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get wideLines(): number { + return this.#view.getUint32(60, LE); + } + + set wideLines(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get largePoints(): number { + return this.#view.getUint32(64, LE); + } + + set largePoints(value: Bool32) { + this.#view.setUint32(64, Number(value), LE); + } + + get alphaToOne(): number { + return this.#view.getUint32(68, LE); + } + + set alphaToOne(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get multiViewport(): number { + return this.#view.getUint32(72, LE); + } + + set multiViewport(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } + + get samplerAnisotropy(): number { + return this.#view.getUint32(76, LE); + } + + set samplerAnisotropy(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } + + get textureCompressionETC2(): number { + return this.#view.getUint32(80, LE); + } + + set textureCompressionETC2(value: Bool32) { + this.#view.setUint32(80, Number(value), LE); + } + + get textureCompressionASTC_LDR(): number { + return this.#view.getUint32(84, LE); + } + + set textureCompressionASTC_LDR(value: Bool32) { + this.#view.setUint32(84, Number(value), LE); + } + + get textureCompressionBC(): number { + return this.#view.getUint32(88, LE); + } + + set textureCompressionBC(value: Bool32) { + this.#view.setUint32(88, Number(value), LE); + } + + get occlusionQueryPrecise(): number { + return this.#view.getUint32(92, LE); + } + + set occlusionQueryPrecise(value: Bool32) { + this.#view.setUint32(92, Number(value), LE); + } + + get pipelineStatisticsQuery(): number { + return this.#view.getUint32(96, LE); + } + + set pipelineStatisticsQuery(value: Bool32) { + this.#view.setUint32(96, Number(value), LE); + } + + get vertexPipelineStoresAndAtomics(): number { + return this.#view.getUint32(100, LE); + } + + set vertexPipelineStoresAndAtomics(value: Bool32) { + this.#view.setUint32(100, Number(value), LE); + } + + get fragmentStoresAndAtomics(): number { + return this.#view.getUint32(104, LE); + } + + set fragmentStoresAndAtomics(value: Bool32) { + this.#view.setUint32(104, Number(value), LE); + } + + get shaderTessellationAndGeometryPointSize(): number { + return this.#view.getUint32(108, LE); + } + + set shaderTessellationAndGeometryPointSize(value: Bool32) { + this.#view.setUint32(108, Number(value), LE); + } + + get shaderImageGatherExtended(): number { + return this.#view.getUint32(112, LE); + } + + set shaderImageGatherExtended(value: Bool32) { + this.#view.setUint32(112, Number(value), LE); + } + + get shaderStorageImageExtendedFormats(): number { + return this.#view.getUint32(116, LE); + } + + set shaderStorageImageExtendedFormats(value: Bool32) { + this.#view.setUint32(116, Number(value), LE); + } + + get shaderStorageImageMultisample(): number { + return this.#view.getUint32(120, LE); + } + + set shaderStorageImageMultisample(value: Bool32) { + this.#view.setUint32(120, Number(value), LE); + } + + get shaderStorageImageReadWithoutFormat(): number { + return this.#view.getUint32(124, LE); + } + + set shaderStorageImageReadWithoutFormat(value: Bool32) { + this.#view.setUint32(124, Number(value), LE); + } + + get shaderStorageImageWriteWithoutFormat(): number { + return this.#view.getUint32(128, LE); + } + + set shaderStorageImageWriteWithoutFormat(value: Bool32) { + this.#view.setUint32(128, Number(value), LE); + } + + get shaderUniformBufferArrayDynamicIndexing(): number { + return this.#view.getUint32(132, LE); + } + + set shaderUniformBufferArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(132, Number(value), LE); + } + + get shaderSampledImageArrayDynamicIndexing(): number { + return this.#view.getUint32(136, LE); + } + + set shaderSampledImageArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(136, Number(value), LE); + } + + get shaderStorageBufferArrayDynamicIndexing(): number { + return this.#view.getUint32(140, LE); + } + + set shaderStorageBufferArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(140, Number(value), LE); + } + + get shaderStorageImageArrayDynamicIndexing(): number { + return this.#view.getUint32(144, LE); + } + + set shaderStorageImageArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(144, Number(value), LE); + } + + get shaderClipDistance(): number { + return this.#view.getUint32(148, LE); + } + + set shaderClipDistance(value: Bool32) { + this.#view.setUint32(148, Number(value), LE); + } + + get shaderCullDistance(): number { + return this.#view.getUint32(152, LE); + } + + set shaderCullDistance(value: Bool32) { + this.#view.setUint32(152, Number(value), LE); + } + + get shaderFloat64(): number { + return this.#view.getUint32(156, LE); + } + + set shaderFloat64(value: Bool32) { + this.#view.setUint32(156, Number(value), LE); + } + + get shaderInt64(): number { + return this.#view.getUint32(160, LE); + } + + set shaderInt64(value: Bool32) { + this.#view.setUint32(160, Number(value), LE); + } + + get shaderInt16(): number { + return this.#view.getUint32(164, LE); + } + + set shaderInt16(value: Bool32) { + this.#view.setUint32(164, Number(value), LE); + } + + get shaderResourceResidency(): number { + return this.#view.getUint32(168, LE); + } + + set shaderResourceResidency(value: Bool32) { + this.#view.setUint32(168, Number(value), LE); + } + + get shaderResourceMinLod(): number { + return this.#view.getUint32(172, LE); + } + + set shaderResourceMinLod(value: Bool32) { + this.#view.setUint32(172, Number(value), LE); + } + + get sparseBinding(): number { + return this.#view.getUint32(176, LE); + } + + set sparseBinding(value: Bool32) { + this.#view.setUint32(176, Number(value), LE); + } + + get sparseResidencyBuffer(): number { + return this.#view.getUint32(180, LE); + } + + set sparseResidencyBuffer(value: Bool32) { + this.#view.setUint32(180, Number(value), LE); + } + + get sparseResidencyImage2D(): number { + return this.#view.getUint32(184, LE); + } + + set sparseResidencyImage2D(value: Bool32) { + this.#view.setUint32(184, Number(value), LE); + } + + get sparseResidencyImage3D(): number { + return this.#view.getUint32(188, LE); + } + + set sparseResidencyImage3D(value: Bool32) { + this.#view.setUint32(188, Number(value), LE); + } + + get sparseResidency2Samples(): number { + return this.#view.getUint32(192, LE); + } + + set sparseResidency2Samples(value: Bool32) { + this.#view.setUint32(192, Number(value), LE); + } + + get sparseResidency4Samples(): number { + return this.#view.getUint32(196, LE); + } + + set sparseResidency4Samples(value: Bool32) { + this.#view.setUint32(196, Number(value), LE); + } + + get sparseResidency8Samples(): number { + return this.#view.getUint32(200, LE); + } + + set sparseResidency8Samples(value: Bool32) { + this.#view.setUint32(200, Number(value), LE); + } + + get sparseResidency16Samples(): number { + return this.#view.getUint32(204, LE); + } + + set sparseResidency16Samples(value: Bool32) { + this.#view.setUint32(204, Number(value), LE); + } + + get sparseResidencyAliased(): number { + return this.#view.getUint32(208, LE); + } + + set sparseResidencyAliased(value: Bool32) { + this.#view.setUint32(208, Number(value), LE); + } + + get variableMultisampleRate(): number { + return this.#view.getUint32(212, LE); + } + + set variableMultisampleRate(value: Bool32) { + this.#view.setUint32(212, Number(value), LE); + } + + get inheritedQueries(): number { + return this.#view.getUint32(216, LE); + } + + set inheritedQueries(value: Bool32) { + this.#view.setUint32(216, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFeatures2.ts b/api/struct/PhysicalDeviceFeatures2.ts new file mode 100644 index 0000000..e00a621 --- /dev/null +++ b/api/struct/PhysicalDeviceFeatures2.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PhysicalDeviceFeatures} from "./PhysicalDeviceFeatures.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceFeatures2 { + pNext?: AnyPointer; + features?: PhysicalDeviceFeatures; +} + +export class PhysicalDeviceFeatures2 implements BaseStruct { + static size = 240; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFeatures2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFeatures2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFeatures2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFeatures2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFeatures2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.features !== undefined) this.features = data.features; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFeatures2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FEATURES_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get features(): PhysicalDeviceFeatures { + return new PhysicalDeviceFeatures(this.#data.subarray(16, 16 + PhysicalDeviceFeatures.size)); + } + + set features(value: PhysicalDeviceFeatures) { + if (value[BUFFER].byteLength < PhysicalDeviceFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFeatures2KHR.ts b/api/struct/PhysicalDeviceFeatures2KHR.ts new file mode 100644 index 0000000..3fbb6b2 --- /dev/null +++ b/api/struct/PhysicalDeviceFeatures2KHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceFeatures2 } from "./PhysicalDeviceFeatures2.ts"; + export type PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFloat16Int8FeaturesKHR.ts b/api/struct/PhysicalDeviceFloat16Int8FeaturesKHR.ts new file mode 100644 index 0000000..cf801e2 --- /dev/null +++ b/api/struct/PhysicalDeviceFloat16Int8FeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceShaderFloat16Int8Features } from "./PhysicalDeviceShaderFloat16Int8Features.ts"; + export type PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFloatControlsProperties.ts b/api/struct/PhysicalDeviceFloatControlsProperties.ts new file mode 100644 index 0000000..13f9292 --- /dev/null +++ b/api/struct/PhysicalDeviceFloatControlsProperties.ts @@ -0,0 +1,240 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ShaderFloatControlsIndependence } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFloatControlsProperties { + pNext?: AnyPointer; + denormBehaviorIndependence?: ShaderFloatControlsIndependence; + roundingModeIndependence?: ShaderFloatControlsIndependence; + shaderSignedZeroInfNanPreserveFloat16?: Bool32; + shaderSignedZeroInfNanPreserveFloat32?: Bool32; + shaderSignedZeroInfNanPreserveFloat64?: Bool32; + shaderDenormPreserveFloat16?: Bool32; + shaderDenormPreserveFloat32?: Bool32; + shaderDenormPreserveFloat64?: Bool32; + shaderDenormFlushToZeroFloat16?: Bool32; + shaderDenormFlushToZeroFloat32?: Bool32; + shaderDenormFlushToZeroFloat64?: Bool32; + shaderRoundingModeRTEFloat16?: Bool32; + shaderRoundingModeRTEFloat32?: Bool32; + shaderRoundingModeRTEFloat64?: Bool32; + shaderRoundingModeRTZFloat16?: Bool32; + shaderRoundingModeRTZFloat32?: Bool32; + shaderRoundingModeRTZFloat64?: Bool32; +} + +export class PhysicalDeviceFloatControlsProperties implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFloatControlsProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFloatControlsProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFloatControlsProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFloatControlsProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFloatControlsProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.denormBehaviorIndependence !== undefined) this.denormBehaviorIndependence = data.denormBehaviorIndependence; + if (data.roundingModeIndependence !== undefined) this.roundingModeIndependence = data.roundingModeIndependence; + if (data.shaderSignedZeroInfNanPreserveFloat16 !== undefined) this.shaderSignedZeroInfNanPreserveFloat16 = data.shaderSignedZeroInfNanPreserveFloat16; + if (data.shaderSignedZeroInfNanPreserveFloat32 !== undefined) this.shaderSignedZeroInfNanPreserveFloat32 = data.shaderSignedZeroInfNanPreserveFloat32; + if (data.shaderSignedZeroInfNanPreserveFloat64 !== undefined) this.shaderSignedZeroInfNanPreserveFloat64 = data.shaderSignedZeroInfNanPreserveFloat64; + if (data.shaderDenormPreserveFloat16 !== undefined) this.shaderDenormPreserveFloat16 = data.shaderDenormPreserveFloat16; + if (data.shaderDenormPreserveFloat32 !== undefined) this.shaderDenormPreserveFloat32 = data.shaderDenormPreserveFloat32; + if (data.shaderDenormPreserveFloat64 !== undefined) this.shaderDenormPreserveFloat64 = data.shaderDenormPreserveFloat64; + if (data.shaderDenormFlushToZeroFloat16 !== undefined) this.shaderDenormFlushToZeroFloat16 = data.shaderDenormFlushToZeroFloat16; + if (data.shaderDenormFlushToZeroFloat32 !== undefined) this.shaderDenormFlushToZeroFloat32 = data.shaderDenormFlushToZeroFloat32; + if (data.shaderDenormFlushToZeroFloat64 !== undefined) this.shaderDenormFlushToZeroFloat64 = data.shaderDenormFlushToZeroFloat64; + if (data.shaderRoundingModeRTEFloat16 !== undefined) this.shaderRoundingModeRTEFloat16 = data.shaderRoundingModeRTEFloat16; + if (data.shaderRoundingModeRTEFloat32 !== undefined) this.shaderRoundingModeRTEFloat32 = data.shaderRoundingModeRTEFloat32; + if (data.shaderRoundingModeRTEFloat64 !== undefined) this.shaderRoundingModeRTEFloat64 = data.shaderRoundingModeRTEFloat64; + if (data.shaderRoundingModeRTZFloat16 !== undefined) this.shaderRoundingModeRTZFloat16 = data.shaderRoundingModeRTZFloat16; + if (data.shaderRoundingModeRTZFloat32 !== undefined) this.shaderRoundingModeRTZFloat32 = data.shaderRoundingModeRTZFloat32; + if (data.shaderRoundingModeRTZFloat64 !== undefined) this.shaderRoundingModeRTZFloat64 = data.shaderRoundingModeRTZFloat64; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFloatControlsProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get denormBehaviorIndependence(): number { + return this.#view.getUint32(16, LE); + } + + set denormBehaviorIndependence(value: ShaderFloatControlsIndependence) { + this.#view.setUint32(16, Number(value), LE); + } + + get roundingModeIndependence(): number { + return this.#view.getUint32(20, LE); + } + + set roundingModeIndependence(value: ShaderFloatControlsIndependence) { + this.#view.setUint32(20, Number(value), LE); + } + + get shaderSignedZeroInfNanPreserveFloat16(): number { + return this.#view.getUint32(24, LE); + } + + set shaderSignedZeroInfNanPreserveFloat16(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get shaderSignedZeroInfNanPreserveFloat32(): number { + return this.#view.getUint32(28, LE); + } + + set shaderSignedZeroInfNanPreserveFloat32(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get shaderSignedZeroInfNanPreserveFloat64(): number { + return this.#view.getUint32(32, LE); + } + + set shaderSignedZeroInfNanPreserveFloat64(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get shaderDenormPreserveFloat16(): number { + return this.#view.getUint32(36, LE); + } + + set shaderDenormPreserveFloat16(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get shaderDenormPreserveFloat32(): number { + return this.#view.getUint32(40, LE); + } + + set shaderDenormPreserveFloat32(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get shaderDenormPreserveFloat64(): number { + return this.#view.getUint32(44, LE); + } + + set shaderDenormPreserveFloat64(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get shaderDenormFlushToZeroFloat16(): number { + return this.#view.getUint32(48, LE); + } + + set shaderDenormFlushToZeroFloat16(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get shaderDenormFlushToZeroFloat32(): number { + return this.#view.getUint32(52, LE); + } + + set shaderDenormFlushToZeroFloat32(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get shaderDenormFlushToZeroFloat64(): number { + return this.#view.getUint32(56, LE); + } + + set shaderDenormFlushToZeroFloat64(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get shaderRoundingModeRTEFloat16(): number { + return this.#view.getUint32(60, LE); + } + + set shaderRoundingModeRTEFloat16(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get shaderRoundingModeRTEFloat32(): number { + return this.#view.getUint32(64, LE); + } + + set shaderRoundingModeRTEFloat32(value: Bool32) { + this.#view.setUint32(64, Number(value), LE); + } + + get shaderRoundingModeRTEFloat64(): number { + return this.#view.getUint32(68, LE); + } + + set shaderRoundingModeRTEFloat64(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get shaderRoundingModeRTZFloat16(): number { + return this.#view.getUint32(72, LE); + } + + set shaderRoundingModeRTZFloat16(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } + + get shaderRoundingModeRTZFloat32(): number { + return this.#view.getUint32(76, LE); + } + + set shaderRoundingModeRTZFloat32(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } + + get shaderRoundingModeRTZFloat64(): number { + return this.#view.getUint32(80, LE); + } + + set shaderRoundingModeRTZFloat64(value: Bool32) { + this.#view.setUint32(80, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFloatControlsPropertiesKHR.ts b/api/struct/PhysicalDeviceFloatControlsPropertiesKHR.ts new file mode 100644 index 0000000..bbf8f59 --- /dev/null +++ b/api/struct/PhysicalDeviceFloatControlsPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceFloatControlsProperties } from "./PhysicalDeviceFloatControlsProperties.ts"; + export type PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentDensityMap2FeaturesEXT.ts b/api/struct/PhysicalDeviceFragmentDensityMap2FeaturesEXT.ts new file mode 100644 index 0000000..87680f3 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentDensityMap2FeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentDensityMap2FeaturesEXT { + pNext?: AnyPointer; + fragmentDensityMapDeferred?: Bool32; +} + +export class PhysicalDeviceFragmentDensityMap2FeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentDensityMap2FeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMap2FeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentDensityMap2FeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentDensityMapDeferred !== undefined) this.fragmentDensityMapDeferred = data.fragmentDensityMapDeferred; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMap2FeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentDensityMapDeferred(): number { + return this.#view.getUint32(16, LE); + } + + set fragmentDensityMapDeferred(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentDensityMap2PropertiesEXT.ts b/api/struct/PhysicalDeviceFragmentDensityMap2PropertiesEXT.ts new file mode 100644 index 0000000..bbb7ceb --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentDensityMap2PropertiesEXT.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentDensityMap2PropertiesEXT { + pNext?: AnyPointer; + subsampledLoads?: Bool32; + subsampledCoarseReconstructionEarlyAccess?: Bool32; + maxSubsampledArrayLayers?: number; + maxDescriptorSetSubsampledSamplers?: number; +} + +export class PhysicalDeviceFragmentDensityMap2PropertiesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentDensityMap2PropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMap2PropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2PropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentDensityMap2PropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2PropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.subsampledLoads !== undefined) this.subsampledLoads = data.subsampledLoads; + if (data.subsampledCoarseReconstructionEarlyAccess !== undefined) this.subsampledCoarseReconstructionEarlyAccess = data.subsampledCoarseReconstructionEarlyAccess; + if (data.maxSubsampledArrayLayers !== undefined) this.maxSubsampledArrayLayers = data.maxSubsampledArrayLayers; + if (data.maxDescriptorSetSubsampledSamplers !== undefined) this.maxDescriptorSetSubsampledSamplers = data.maxDescriptorSetSubsampledSamplers; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMap2PropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get subsampledLoads(): number { + return this.#view.getUint32(16, LE); + } + + set subsampledLoads(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get subsampledCoarseReconstructionEarlyAccess(): number { + return this.#view.getUint32(20, LE); + } + + set subsampledCoarseReconstructionEarlyAccess(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxSubsampledArrayLayers(): number { + return this.#view.getUint32(24, LE); + } + + set maxSubsampledArrayLayers(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get maxDescriptorSetSubsampledSamplers(): number { + return this.#view.getUint32(28, LE); + } + + set maxDescriptorSetSubsampledSamplers(value: number) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentDensityMapFeaturesEXT.ts b/api/struct/PhysicalDeviceFragmentDensityMapFeaturesEXT.ts new file mode 100644 index 0000000..31103a0 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentDensityMapFeaturesEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentDensityMapFeaturesEXT { + pNext?: AnyPointer; + fragmentDensityMap?: Bool32; + fragmentDensityMapDynamic?: Bool32; + fragmentDensityMapNonSubsampledImages?: Bool32; +} + +export class PhysicalDeviceFragmentDensityMapFeaturesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentDensityMapFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMapFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentDensityMapFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentDensityMap !== undefined) this.fragmentDensityMap = data.fragmentDensityMap; + if (data.fragmentDensityMapDynamic !== undefined) this.fragmentDensityMapDynamic = data.fragmentDensityMapDynamic; + if (data.fragmentDensityMapNonSubsampledImages !== undefined) this.fragmentDensityMapNonSubsampledImages = data.fragmentDensityMapNonSubsampledImages; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentDensityMap(): number { + return this.#view.getUint32(16, LE); + } + + set fragmentDensityMap(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get fragmentDensityMapDynamic(): number { + return this.#view.getUint32(20, LE); + } + + set fragmentDensityMapDynamic(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get fragmentDensityMapNonSubsampledImages(): number { + return this.#view.getUint32(24, LE); + } + + set fragmentDensityMapNonSubsampledImages(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.ts b/api/struct/PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.ts new file mode 100644 index 0000000..cc6754b --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM { + pNext?: AnyPointer; + fragmentDensityMapOffset?: Bool32; +} + +export class PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentDensityMapOffset !== undefined) this.fragmentDensityMapOffset = data.fragmentDensityMapOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentDensityMapOffset(): number { + return this.#view.getUint32(16, LE); + } + + set fragmentDensityMapOffset(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.ts b/api/struct/PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.ts new file mode 100644 index 0000000..49bfec2 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM { + pNext?: AnyPointer; + fragmentDensityOffsetGranularity?: Extent2D; +} + +export class PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentDensityOffsetGranularity !== undefined) this.fragmentDensityOffsetGranularity = data.fragmentDensityOffsetGranularity; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentDensityOffsetGranularity(): Extent2D { + return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); + } + + set fragmentDensityOffsetGranularity(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentDensityMapPropertiesEXT.ts b/api/struct/PhysicalDeviceFragmentDensityMapPropertiesEXT.ts new file mode 100644 index 0000000..6dc5c75 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentDensityMapPropertiesEXT.ts @@ -0,0 +1,107 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentDensityMapPropertiesEXT { + pNext?: AnyPointer; + minFragmentDensityTexelSize?: Extent2D; + maxFragmentDensityTexelSize?: Extent2D; + fragmentDensityInvocations?: Bool32; +} + +export class PhysicalDeviceFragmentDensityMapPropertiesEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentDensityMapPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMapPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentDensityMapPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minFragmentDensityTexelSize !== undefined) this.minFragmentDensityTexelSize = data.minFragmentDensityTexelSize; + if (data.maxFragmentDensityTexelSize !== undefined) this.maxFragmentDensityTexelSize = data.maxFragmentDensityTexelSize; + if (data.fragmentDensityInvocations !== undefined) this.fragmentDensityInvocations = data.fragmentDensityInvocations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minFragmentDensityTexelSize(): Extent2D { + return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); + } + + set minFragmentDensityTexelSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get maxFragmentDensityTexelSize(): Extent2D { + return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); + } + + set maxFragmentDensityTexelSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get fragmentDensityInvocations(): number { + return this.#view.getUint32(32, LE); + } + + set fragmentDensityInvocations(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.ts b/api/struct/PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.ts new file mode 100644 index 0000000..0228c8e --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentShaderBarycentricFeaturesKHR { + pNext?: AnyPointer; + fragmentShaderBarycentric?: Bool32; +} + +export class PhysicalDeviceFragmentShaderBarycentricFeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentShaderBarycentricFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShaderBarycentricFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentShaderBarycentric !== undefined) this.fragmentShaderBarycentric = data.fragmentShaderBarycentric; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentShaderBarycentric(): number { + return this.#view.getUint32(16, LE); + } + + set fragmentShaderBarycentric(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentShaderBarycentricFeaturesNV.ts b/api/struct/PhysicalDeviceFragmentShaderBarycentricFeaturesNV.ts new file mode 100644 index 0000000..4a042f4 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentShaderBarycentricFeaturesNV.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceFragmentShaderBarycentricFeaturesKHR } from "./PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.ts"; + export type PhysicalDeviceFragmentShaderBarycentricFeaturesNV = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.ts b/api/struct/PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.ts new file mode 100644 index 0000000..bd9cda3 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentShaderBarycentricPropertiesKHR { + pNext?: AnyPointer; + triStripVertexOrderIndependentOfProvokingVertex?: Bool32; +} + +export class PhysicalDeviceFragmentShaderBarycentricPropertiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentShaderBarycentricPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShaderBarycentricPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.triStripVertexOrderIndependentOfProvokingVertex !== undefined) this.triStripVertexOrderIndependentOfProvokingVertex = data.triStripVertexOrderIndependentOfProvokingVertex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get triStripVertexOrderIndependentOfProvokingVertex(): number { + return this.#view.getUint32(16, LE); + } + + set triStripVertexOrderIndependentOfProvokingVertex(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentShaderInterlockFeaturesEXT.ts b/api/struct/PhysicalDeviceFragmentShaderInterlockFeaturesEXT.ts new file mode 100644 index 0000000..303e2b2 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentShaderInterlockFeaturesEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentShaderInterlockFeaturesEXT { + pNext?: AnyPointer; + fragmentShaderSampleInterlock?: Bool32; + fragmentShaderPixelInterlock?: Bool32; + fragmentShaderShadingRateInterlock?: Bool32; +} + +export class PhysicalDeviceFragmentShaderInterlockFeaturesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentShaderInterlockFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShaderInterlockFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentShaderSampleInterlock !== undefined) this.fragmentShaderSampleInterlock = data.fragmentShaderSampleInterlock; + if (data.fragmentShaderPixelInterlock !== undefined) this.fragmentShaderPixelInterlock = data.fragmentShaderPixelInterlock; + if (data.fragmentShaderShadingRateInterlock !== undefined) this.fragmentShaderShadingRateInterlock = data.fragmentShaderShadingRateInterlock; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentShaderSampleInterlock(): number { + return this.#view.getUint32(16, LE); + } + + set fragmentShaderSampleInterlock(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get fragmentShaderPixelInterlock(): number { + return this.#view.getUint32(20, LE); + } + + set fragmentShaderPixelInterlock(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get fragmentShaderShadingRateInterlock(): number { + return this.#view.getUint32(24, LE); + } + + set fragmentShaderShadingRateInterlock(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.ts b/api/struct/PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.ts new file mode 100644 index 0000000..00275a5 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentShadingRateEnumsFeaturesNV { + pNext?: AnyPointer; + fragmentShadingRateEnums?: Bool32; + supersampleFragmentShadingRates?: Bool32; + noInvocationFragmentShadingRates?: Bool32; +} + +export class PhysicalDeviceFragmentShadingRateEnumsFeaturesNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentShadingRateEnumsFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRateEnumsFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentShadingRateEnums !== undefined) this.fragmentShadingRateEnums = data.fragmentShadingRateEnums; + if (data.supersampleFragmentShadingRates !== undefined) this.supersampleFragmentShadingRates = data.supersampleFragmentShadingRates; + if (data.noInvocationFragmentShadingRates !== undefined) this.noInvocationFragmentShadingRates = data.noInvocationFragmentShadingRates; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentShadingRateEnums(): number { + return this.#view.getUint32(16, LE); + } + + set fragmentShadingRateEnums(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get supersampleFragmentShadingRates(): number { + return this.#view.getUint32(20, LE); + } + + set supersampleFragmentShadingRates(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get noInvocationFragmentShadingRates(): number { + return this.#view.getUint32(24, LE); + } + + set noInvocationFragmentShadingRates(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.ts b/api/struct/PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.ts new file mode 100644 index 0000000..8b1a6c9 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SampleCountFlagBits } from "../enum.ts"; + +export interface InitPhysicalDeviceFragmentShadingRateEnumsPropertiesNV { + pNext?: AnyPointer; + maxFragmentShadingRateInvocationCount?: SampleCountFlagBits; +} + +export class PhysicalDeviceFragmentShadingRateEnumsPropertiesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentShadingRateEnumsPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRateEnumsPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxFragmentShadingRateInvocationCount !== undefined) this.maxFragmentShadingRateInvocationCount = data.maxFragmentShadingRateInvocationCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxFragmentShadingRateInvocationCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxFragmentShadingRateInvocationCount(value: SampleCountFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentShadingRateFeaturesKHR.ts b/api/struct/PhysicalDeviceFragmentShadingRateFeaturesKHR.ts new file mode 100644 index 0000000..5c3adcf --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentShadingRateFeaturesKHR.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentShadingRateFeaturesKHR { + pNext?: AnyPointer; + pipelineFragmentShadingRate?: Bool32; + primitiveFragmentShadingRate?: Bool32; + attachmentFragmentShadingRate?: Bool32; +} + +export class PhysicalDeviceFragmentShadingRateFeaturesKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentShadingRateFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRateFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentShadingRateFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipelineFragmentShadingRate !== undefined) this.pipelineFragmentShadingRate = data.pipelineFragmentShadingRate; + if (data.primitiveFragmentShadingRate !== undefined) this.primitiveFragmentShadingRate = data.primitiveFragmentShadingRate; + if (data.attachmentFragmentShadingRate !== undefined) this.attachmentFragmentShadingRate = data.attachmentFragmentShadingRate; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipelineFragmentShadingRate(): number { + return this.#view.getUint32(16, LE); + } + + set pipelineFragmentShadingRate(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get primitiveFragmentShadingRate(): number { + return this.#view.getUint32(20, LE); + } + + set primitiveFragmentShadingRate(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get attachmentFragmentShadingRate(): number { + return this.#view.getUint32(24, LE); + } + + set attachmentFragmentShadingRate(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentShadingRateKHR.ts b/api/struct/PhysicalDeviceFragmentShadingRateKHR.ts new file mode 100644 index 0000000..54e5583 --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentShadingRateKHR.ts @@ -0,0 +1,94 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; +import { SampleCountFlags } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentShadingRateKHR { + pNext?: AnyPointer; + sampleCounts?: SampleCountFlags; + fragmentSize?: Extent2D; +} + +export class PhysicalDeviceFragmentShadingRateKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentShadingRateKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRateKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentShadingRateKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.sampleCounts !== undefined) this.sampleCounts = data.sampleCounts; + if (data.fragmentSize !== undefined) this.fragmentSize = data.fragmentSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get sampleCounts(): number { + return this.#view.getUint32(16, LE); + } + + set sampleCounts(value: SampleCountFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get fragmentSize(): Extent2D { + return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); + } + + set fragmentSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceFragmentShadingRatePropertiesKHR.ts b/api/struct/PhysicalDeviceFragmentShadingRatePropertiesKHR.ts new file mode 100644 index 0000000..a771a7f --- /dev/null +++ b/api/struct/PhysicalDeviceFragmentShadingRatePropertiesKHR.ts @@ -0,0 +1,250 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType, SampleCountFlagBits } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceFragmentShadingRatePropertiesKHR { + pNext?: AnyPointer; + minFragmentShadingRateAttachmentTexelSize?: Extent2D; + maxFragmentShadingRateAttachmentTexelSize?: Extent2D; + maxFragmentShadingRateAttachmentTexelSizeAspectRatio?: number; + primitiveFragmentShadingRateWithMultipleViewports?: Bool32; + layeredShadingRateAttachments?: Bool32; + fragmentShadingRateNonTrivialCombinerOps?: Bool32; + maxFragmentSize?: Extent2D; + maxFragmentSizeAspectRatio?: number; + maxFragmentShadingRateCoverageSamples?: number; + maxFragmentShadingRateRasterizationSamples?: SampleCountFlagBits; + fragmentShadingRateWithShaderDepthStencilWrites?: Bool32; + fragmentShadingRateWithSampleMask?: Bool32; + fragmentShadingRateWithShaderSampleMask?: Bool32; + fragmentShadingRateWithConservativeRasterization?: Bool32; + fragmentShadingRateWithFragmentShaderInterlock?: Bool32; + fragmentShadingRateWithCustomSampleLocations?: Bool32; + fragmentShadingRateStrictMultiplyCombiner?: Bool32; +} + +export class PhysicalDeviceFragmentShadingRatePropertiesKHR implements BaseStruct { + static size = 96; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceFragmentShadingRatePropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRatePropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRatePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceFragmentShadingRatePropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRatePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minFragmentShadingRateAttachmentTexelSize !== undefined) this.minFragmentShadingRateAttachmentTexelSize = data.minFragmentShadingRateAttachmentTexelSize; + if (data.maxFragmentShadingRateAttachmentTexelSize !== undefined) this.maxFragmentShadingRateAttachmentTexelSize = data.maxFragmentShadingRateAttachmentTexelSize; + if (data.maxFragmentShadingRateAttachmentTexelSizeAspectRatio !== undefined) this.maxFragmentShadingRateAttachmentTexelSizeAspectRatio = data.maxFragmentShadingRateAttachmentTexelSizeAspectRatio; + if (data.primitiveFragmentShadingRateWithMultipleViewports !== undefined) this.primitiveFragmentShadingRateWithMultipleViewports = data.primitiveFragmentShadingRateWithMultipleViewports; + if (data.layeredShadingRateAttachments !== undefined) this.layeredShadingRateAttachments = data.layeredShadingRateAttachments; + if (data.fragmentShadingRateNonTrivialCombinerOps !== undefined) this.fragmentShadingRateNonTrivialCombinerOps = data.fragmentShadingRateNonTrivialCombinerOps; + if (data.maxFragmentSize !== undefined) this.maxFragmentSize = data.maxFragmentSize; + if (data.maxFragmentSizeAspectRatio !== undefined) this.maxFragmentSizeAspectRatio = data.maxFragmentSizeAspectRatio; + if (data.maxFragmentShadingRateCoverageSamples !== undefined) this.maxFragmentShadingRateCoverageSamples = data.maxFragmentShadingRateCoverageSamples; + if (data.maxFragmentShadingRateRasterizationSamples !== undefined) this.maxFragmentShadingRateRasterizationSamples = data.maxFragmentShadingRateRasterizationSamples; + if (data.fragmentShadingRateWithShaderDepthStencilWrites !== undefined) this.fragmentShadingRateWithShaderDepthStencilWrites = data.fragmentShadingRateWithShaderDepthStencilWrites; + if (data.fragmentShadingRateWithSampleMask !== undefined) this.fragmentShadingRateWithSampleMask = data.fragmentShadingRateWithSampleMask; + if (data.fragmentShadingRateWithShaderSampleMask !== undefined) this.fragmentShadingRateWithShaderSampleMask = data.fragmentShadingRateWithShaderSampleMask; + if (data.fragmentShadingRateWithConservativeRasterization !== undefined) this.fragmentShadingRateWithConservativeRasterization = data.fragmentShadingRateWithConservativeRasterization; + if (data.fragmentShadingRateWithFragmentShaderInterlock !== undefined) this.fragmentShadingRateWithFragmentShaderInterlock = data.fragmentShadingRateWithFragmentShaderInterlock; + if (data.fragmentShadingRateWithCustomSampleLocations !== undefined) this.fragmentShadingRateWithCustomSampleLocations = data.fragmentShadingRateWithCustomSampleLocations; + if (data.fragmentShadingRateStrictMultiplyCombiner !== undefined) this.fragmentShadingRateStrictMultiplyCombiner = data.fragmentShadingRateStrictMultiplyCombiner; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRatePropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minFragmentShadingRateAttachmentTexelSize(): Extent2D { + return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); + } + + set minFragmentShadingRateAttachmentTexelSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get maxFragmentShadingRateAttachmentTexelSize(): Extent2D { + return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); + } + + set maxFragmentShadingRateAttachmentTexelSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get maxFragmentShadingRateAttachmentTexelSizeAspectRatio(): number { + return this.#view.getUint32(32, LE); + } + + set maxFragmentShadingRateAttachmentTexelSizeAspectRatio(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get primitiveFragmentShadingRateWithMultipleViewports(): number { + return this.#view.getUint32(36, LE); + } + + set primitiveFragmentShadingRateWithMultipleViewports(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get layeredShadingRateAttachments(): number { + return this.#view.getUint32(40, LE); + } + + set layeredShadingRateAttachments(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get fragmentShadingRateNonTrivialCombinerOps(): number { + return this.#view.getUint32(44, LE); + } + + set fragmentShadingRateNonTrivialCombinerOps(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get maxFragmentSize(): Extent2D { + return new Extent2D(this.#data.subarray(48, 48 + Extent2D.size)); + } + + set maxFragmentSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 48); + } + + get maxFragmentSizeAspectRatio(): number { + return this.#view.getUint32(56, LE); + } + + set maxFragmentSizeAspectRatio(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get maxFragmentShadingRateCoverageSamples(): number { + return this.#view.getUint32(60, LE); + } + + set maxFragmentShadingRateCoverageSamples(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get maxFragmentShadingRateRasterizationSamples(): number { + return this.#view.getUint32(64, LE); + } + + set maxFragmentShadingRateRasterizationSamples(value: SampleCountFlagBits) { + this.#view.setUint32(64, Number(value), LE); + } + + get fragmentShadingRateWithShaderDepthStencilWrites(): number { + return this.#view.getUint32(68, LE); + } + + set fragmentShadingRateWithShaderDepthStencilWrites(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get fragmentShadingRateWithSampleMask(): number { + return this.#view.getUint32(72, LE); + } + + set fragmentShadingRateWithSampleMask(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } + + get fragmentShadingRateWithShaderSampleMask(): number { + return this.#view.getUint32(76, LE); + } + + set fragmentShadingRateWithShaderSampleMask(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } + + get fragmentShadingRateWithConservativeRasterization(): number { + return this.#view.getUint32(80, LE); + } + + set fragmentShadingRateWithConservativeRasterization(value: Bool32) { + this.#view.setUint32(80, Number(value), LE); + } + + get fragmentShadingRateWithFragmentShaderInterlock(): number { + return this.#view.getUint32(84, LE); + } + + set fragmentShadingRateWithFragmentShaderInterlock(value: Bool32) { + this.#view.setUint32(84, Number(value), LE); + } + + get fragmentShadingRateWithCustomSampleLocations(): number { + return this.#view.getUint32(88, LE); + } + + set fragmentShadingRateWithCustomSampleLocations(value: Bool32) { + this.#view.setUint32(88, Number(value), LE); + } + + get fragmentShadingRateStrictMultiplyCombiner(): number { + return this.#view.getUint32(92, LE); + } + + set fragmentShadingRateStrictMultiplyCombiner(value: Bool32) { + this.#view.setUint32(92, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceGlobalPriorityQueryFeaturesEXT.ts b/api/struct/PhysicalDeviceGlobalPriorityQueryFeaturesEXT.ts new file mode 100644 index 0000000..9ecb3c2 --- /dev/null +++ b/api/struct/PhysicalDeviceGlobalPriorityQueryFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceGlobalPriorityQueryFeaturesKHR } from "./PhysicalDeviceGlobalPriorityQueryFeaturesKHR.ts"; + export type PhysicalDeviceGlobalPriorityQueryFeaturesEXT = PhysicalDeviceGlobalPriorityQueryFeaturesKHR; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceGlobalPriorityQueryFeaturesKHR.ts b/api/struct/PhysicalDeviceGlobalPriorityQueryFeaturesKHR.ts new file mode 100644 index 0000000..b88278b --- /dev/null +++ b/api/struct/PhysicalDeviceGlobalPriorityQueryFeaturesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceGlobalPriorityQueryFeaturesKHR { + pNext?: AnyPointer; + globalPriorityQuery?: Bool32; +} + +export class PhysicalDeviceGlobalPriorityQueryFeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceGlobalPriorityQueryFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceGlobalPriorityQueryFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.globalPriorityQuery !== undefined) this.globalPriorityQuery = data.globalPriorityQuery; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get globalPriorityQuery(): number { + return this.#view.getUint32(16, LE); + } + + set globalPriorityQuery(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.ts b/api/struct/PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.ts new file mode 100644 index 0000000..2ee3c7e --- /dev/null +++ b/api/struct/PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT { + pNext?: AnyPointer; + graphicsPipelineLibrary?: Bool32; +} + +export class PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.graphicsPipelineLibrary !== undefined) this.graphicsPipelineLibrary = data.graphicsPipelineLibrary; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get graphicsPipelineLibrary(): number { + return this.#view.getUint32(16, LE); + } + + set graphicsPipelineLibrary(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.ts b/api/struct/PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.ts new file mode 100644 index 0000000..e8aceb1 --- /dev/null +++ b/api/struct/PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT { + pNext?: AnyPointer; + graphicsPipelineLibraryFastLinking?: Bool32; + graphicsPipelineLibraryIndependentInterpolationDecoration?: Bool32; +} + +export class PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.graphicsPipelineLibraryFastLinking !== undefined) this.graphicsPipelineLibraryFastLinking = data.graphicsPipelineLibraryFastLinking; + if (data.graphicsPipelineLibraryIndependentInterpolationDecoration !== undefined) this.graphicsPipelineLibraryIndependentInterpolationDecoration = data.graphicsPipelineLibraryIndependentInterpolationDecoration; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get graphicsPipelineLibraryFastLinking(): number { + return this.#view.getUint32(16, LE); + } + + set graphicsPipelineLibraryFastLinking(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get graphicsPipelineLibraryIndependentInterpolationDecoration(): number { + return this.#view.getUint32(20, LE); + } + + set graphicsPipelineLibraryIndependentInterpolationDecoration(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceGroupProperties.ts b/api/struct/PhysicalDeviceGroupProperties.ts new file mode 100644 index 0000000..f245ec3 --- /dev/null +++ b/api/struct/PhysicalDeviceGroupProperties.ts @@ -0,0 +1,108 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PhysicalDevice, Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceGroupProperties { + pNext?: AnyPointer; + physicalDeviceCount?: number; + physicalDevices?: PhysicalDevice[]; + subsetAllocation?: Bool32; +} + +export class PhysicalDeviceGroupProperties implements BaseStruct { + static size = 288; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceGroupProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceGroupProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceGroupProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceGroupProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceGroupProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.physicalDeviceCount !== undefined) this.physicalDeviceCount = data.physicalDeviceCount; + if (data.physicalDevices !== undefined) this.physicalDevices = data.physicalDevices; + if (data.subsetAllocation !== undefined) this.subsetAllocation = data.subsetAllocation; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGroupProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_GROUP_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get physicalDeviceCount(): number { + return this.#view.getUint32(16, LE); + } + + set physicalDeviceCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get physicalDevices(): PhysicalDevice[] { + const result: PhysicalDevice[] = []; + for (let i = 0; i < 32; i++) { + result.push((() => { + return pointerFromView(this.#view, 24 + i * 8, LE); + })()); + } + return result; + } + + set physicalDevices(value: PhysicalDevice[]) { + for (let i = 0; i < value.length; i++) { + this.#view.setBigUint64(24 + i * 8, BigInt(anyPointer(value[i])), LE); + } + } + + get subsetAllocation(): number { + return this.#view.getUint32(280, LE); + } + + set subsetAllocation(value: Bool32) { + this.#view.setUint32(280, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceGroupPropertiesKHR.ts b/api/struct/PhysicalDeviceGroupPropertiesKHR.ts new file mode 100644 index 0000000..3858020 --- /dev/null +++ b/api/struct/PhysicalDeviceGroupPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceGroupProperties } from "./PhysicalDeviceGroupProperties.ts"; + export type PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceHostQueryResetFeatures.ts b/api/struct/PhysicalDeviceHostQueryResetFeatures.ts new file mode 100644 index 0000000..8931777 --- /dev/null +++ b/api/struct/PhysicalDeviceHostQueryResetFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceHostQueryResetFeatures { + pNext?: AnyPointer; + hostQueryReset?: Bool32; +} + +export class PhysicalDeviceHostQueryResetFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceHostQueryResetFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceHostQueryResetFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceHostQueryResetFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceHostQueryResetFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceHostQueryResetFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.hostQueryReset !== undefined) this.hostQueryReset = data.hostQueryReset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceHostQueryResetFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get hostQueryReset(): number { + return this.#view.getUint32(16, LE); + } + + set hostQueryReset(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceHostQueryResetFeaturesEXT.ts b/api/struct/PhysicalDeviceHostQueryResetFeaturesEXT.ts new file mode 100644 index 0000000..a3161ef --- /dev/null +++ b/api/struct/PhysicalDeviceHostQueryResetFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceHostQueryResetFeatures } from "./PhysicalDeviceHostQueryResetFeatures.ts"; + export type PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceIDProperties.ts b/api/struct/PhysicalDeviceIDProperties.ts new file mode 100644 index 0000000..dacf20f --- /dev/null +++ b/api/struct/PhysicalDeviceIDProperties.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceIDProperties { + pNext?: AnyPointer; + deviceUUID?: Uint8Array; + driverUUID?: Uint8Array; + deviceLUID?: Uint8Array; + deviceNodeMask?: number; + deviceLUIDValid?: Bool32; +} + +export class PhysicalDeviceIDProperties implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceIDProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceIDProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceIDProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceIDProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceIDProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceUUID !== undefined) this.deviceUUID = data.deviceUUID; + if (data.driverUUID !== undefined) this.driverUUID = data.driverUUID; + if (data.deviceLUID !== undefined) this.deviceLUID = data.deviceLUID; + if (data.deviceNodeMask !== undefined) this.deviceNodeMask = data.deviceNodeMask; + if (data.deviceLUIDValid !== undefined) this.deviceLUIDValid = data.deviceLUIDValid; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceIDProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_ID_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceUUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); + } + + set deviceUUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } + + get driverUUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 32, 16); + } + + set driverUUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 32); + } + + get deviceLUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 48, 8); + } + + set deviceLUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 48); + } + + get deviceNodeMask(): number { + return this.#view.getUint32(56, LE); + } + + set deviceNodeMask(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get deviceLUIDValid(): number { + return this.#view.getUint32(60, LE); + } + + set deviceLUIDValid(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceIDPropertiesKHR.ts b/api/struct/PhysicalDeviceIDPropertiesKHR.ts new file mode 100644 index 0000000..ce6caa5 --- /dev/null +++ b/api/struct/PhysicalDeviceIDPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceIDProperties } from "./PhysicalDeviceIDProperties.ts"; + export type PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImage2DViewOf3DFeaturesEXT.ts b/api/struct/PhysicalDeviceImage2DViewOf3DFeaturesEXT.ts new file mode 100644 index 0000000..f5abb19 --- /dev/null +++ b/api/struct/PhysicalDeviceImage2DViewOf3DFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceImage2DViewOf3DFeaturesEXT { + pNext?: AnyPointer; + image2DViewOf3D?: Bool32; + sampler2DViewOf3D?: Bool32; +} + +export class PhysicalDeviceImage2DViewOf3DFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImage2DViewOf3DFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImage2DViewOf3DFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImage2DViewOf3DFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImage2DViewOf3DFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImage2DViewOf3DFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.image2DViewOf3D !== undefined) this.image2DViewOf3D = data.image2DViewOf3D; + if (data.sampler2DViewOf3D !== undefined) this.sampler2DViewOf3D = data.sampler2DViewOf3D; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImage2DViewOf3DFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get image2DViewOf3D(): number { + return this.#view.getUint32(16, LE); + } + + set image2DViewOf3D(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get sampler2DViewOf3D(): number { + return this.#view.getUint32(20, LE); + } + + set sampler2DViewOf3D(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageCompressionControlFeaturesEXT.ts b/api/struct/PhysicalDeviceImageCompressionControlFeaturesEXT.ts new file mode 100644 index 0000000..35bf7e3 --- /dev/null +++ b/api/struct/PhysicalDeviceImageCompressionControlFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceImageCompressionControlFeaturesEXT { + pNext?: AnyPointer; + imageCompressionControl?: Bool32; +} + +export class PhysicalDeviceImageCompressionControlFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImageCompressionControlFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageCompressionControlFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImageCompressionControlFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageCompressionControl !== undefined) this.imageCompressionControl = data.imageCompressionControl; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageCompressionControlFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageCompressionControl(): number { + return this.#view.getUint32(16, LE); + } + + set imageCompressionControl(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.ts b/api/struct/PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.ts new file mode 100644 index 0000000..2e123aa --- /dev/null +++ b/api/struct/PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT { + pNext?: AnyPointer; + imageCompressionControlSwapchain?: Bool32; +} + +export class PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageCompressionControlSwapchain !== undefined) this.imageCompressionControlSwapchain = data.imageCompressionControlSwapchain; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageCompressionControlSwapchain(): number { + return this.#view.getUint32(16, LE); + } + + set imageCompressionControlSwapchain(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageDrmFormatModifierInfoEXT.ts b/api/struct/PhysicalDeviceImageDrmFormatModifierInfoEXT.ts new file mode 100644 index 0000000..f37b553 --- /dev/null +++ b/api/struct/PhysicalDeviceImageDrmFormatModifierInfoEXT.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SharingMode } from "../enum.ts"; + +export interface InitPhysicalDeviceImageDrmFormatModifierInfoEXT { + pNext?: AnyPointer; + drmFormatModifier?: number | bigint; + sharingMode?: SharingMode; + queueFamilyIndexCount?: number; + pQueueFamilyIndices?: AnyPointer; +} + +export class PhysicalDeviceImageDrmFormatModifierInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImageDrmFormatModifierInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageDrmFormatModifierInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImageDrmFormatModifierInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImageDrmFormatModifierInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImageDrmFormatModifierInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; + if (data.sharingMode !== undefined) this.sharingMode = data.sharingMode; + if (data.queueFamilyIndexCount !== undefined) this.queueFamilyIndexCount = data.queueFamilyIndexCount; + if (data.pQueueFamilyIndices !== undefined) this.pQueueFamilyIndices = data.pQueueFamilyIndices; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageDrmFormatModifierInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get drmFormatModifier(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set drmFormatModifier(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get sharingMode(): number { + return this.#view.getUint32(24, LE); + } + + set sharingMode(value: SharingMode) { + this.#view.setUint32(24, Number(value), LE); + } + + get queueFamilyIndexCount(): number { + return this.#view.getUint32(28, LE); + } + + set queueFamilyIndexCount(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get pQueueFamilyIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pQueueFamilyIndices(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageFormatInfo2.ts b/api/struct/PhysicalDeviceImageFormatInfo2.ts new file mode 100644 index 0000000..fec73f5 --- /dev/null +++ b/api/struct/PhysicalDeviceImageFormatInfo2.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format, ImageType, ImageTiling } from "../enum.ts"; +import { ImageUsageFlags, ImageCreateFlags } from "../def.ts"; + +export interface InitPhysicalDeviceImageFormatInfo2 { + pNext?: AnyPointer; + format?: Format; + type?: ImageType; + tiling?: ImageTiling; + usage?: ImageUsageFlags; + flags?: ImageCreateFlags; +} + +export class PhysicalDeviceImageFormatInfo2 implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImageFormatInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageFormatInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImageFormatInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImageFormatInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImageFormatInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.format !== undefined) this.format = data.format; + if (data.type !== undefined) this.type = data.type; + if (data.tiling !== undefined) this.tiling = data.tiling; + if (data.usage !== undefined) this.usage = data.usage; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageFormatInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get format(): number { + return this.#view.getUint32(16, LE); + } + + set format(value: Format) { + this.#view.setUint32(16, Number(value), LE); + } + + get type(): number { + return this.#view.getUint32(20, LE); + } + + set type(value: ImageType) { + this.#view.setUint32(20, Number(value), LE); + } + + get tiling(): number { + return this.#view.getUint32(24, LE); + } + + set tiling(value: ImageTiling) { + this.#view.setUint32(24, Number(value), LE); + } + + get usage(): number { + return this.#view.getUint32(28, LE); + } + + set usage(value: ImageUsageFlags) { + this.#view.setUint32(28, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(32, LE); + } + + set flags(value: ImageCreateFlags) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageFormatInfo2KHR.ts b/api/struct/PhysicalDeviceImageFormatInfo2KHR.ts new file mode 100644 index 0000000..eeaae2c --- /dev/null +++ b/api/struct/PhysicalDeviceImageFormatInfo2KHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceImageFormatInfo2 } from "./PhysicalDeviceImageFormatInfo2.ts"; + export type PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageProcessingFeaturesQCOM.ts b/api/struct/PhysicalDeviceImageProcessingFeaturesQCOM.ts new file mode 100644 index 0000000..e445e2a --- /dev/null +++ b/api/struct/PhysicalDeviceImageProcessingFeaturesQCOM.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceImageProcessingFeaturesQCOM { + pNext?: AnyPointer; + textureSampleWeighted?: Bool32; + textureBoxFilter?: Bool32; + textureBlockMatch?: Bool32; +} + +export class PhysicalDeviceImageProcessingFeaturesQCOM implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImageProcessingFeaturesQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageProcessingFeaturesQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImageProcessingFeaturesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImageProcessingFeaturesQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImageProcessingFeaturesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.textureSampleWeighted !== undefined) this.textureSampleWeighted = data.textureSampleWeighted; + if (data.textureBoxFilter !== undefined) this.textureBoxFilter = data.textureBoxFilter; + if (data.textureBlockMatch !== undefined) this.textureBlockMatch = data.textureBlockMatch; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageProcessingFeaturesQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get textureSampleWeighted(): number { + return this.#view.getUint32(16, LE); + } + + set textureSampleWeighted(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get textureBoxFilter(): number { + return this.#view.getUint32(20, LE); + } + + set textureBoxFilter(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get textureBlockMatch(): number { + return this.#view.getUint32(24, LE); + } + + set textureBlockMatch(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageProcessingPropertiesQCOM.ts b/api/struct/PhysicalDeviceImageProcessingPropertiesQCOM.ts new file mode 100644 index 0000000..125364e --- /dev/null +++ b/api/struct/PhysicalDeviceImageProcessingPropertiesQCOM.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceImageProcessingPropertiesQCOM { + pNext?: AnyPointer; + maxWeightFilterPhases?: number; + maxWeightFilterDimension?: Extent2D; + maxBlockMatchRegion?: Extent2D; + maxBoxFilterBlockSize?: Extent2D; +} + +export class PhysicalDeviceImageProcessingPropertiesQCOM implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImageProcessingPropertiesQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageProcessingPropertiesQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImageProcessingPropertiesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImageProcessingPropertiesQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImageProcessingPropertiesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxWeightFilterPhases !== undefined) this.maxWeightFilterPhases = data.maxWeightFilterPhases; + if (data.maxWeightFilterDimension !== undefined) this.maxWeightFilterDimension = data.maxWeightFilterDimension; + if (data.maxBlockMatchRegion !== undefined) this.maxBlockMatchRegion = data.maxBlockMatchRegion; + if (data.maxBoxFilterBlockSize !== undefined) this.maxBoxFilterBlockSize = data.maxBoxFilterBlockSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageProcessingPropertiesQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxWeightFilterPhases(): number { + return this.#view.getUint32(16, LE); + } + + set maxWeightFilterPhases(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxWeightFilterDimension(): Extent2D { + return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); + } + + set maxWeightFilterDimension(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } + + get maxBlockMatchRegion(): Extent2D { + return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); + } + + set maxBlockMatchRegion(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 28); + } + + get maxBoxFilterBlockSize(): Extent2D { + return new Extent2D(this.#data.subarray(36, 36 + Extent2D.size)); + } + + set maxBoxFilterBlockSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 36); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageRobustnessFeatures.ts b/api/struct/PhysicalDeviceImageRobustnessFeatures.ts new file mode 100644 index 0000000..e7f4353 --- /dev/null +++ b/api/struct/PhysicalDeviceImageRobustnessFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceImageRobustnessFeatures { + pNext?: AnyPointer; + robustImageAccess?: Bool32; +} + +export class PhysicalDeviceImageRobustnessFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImageRobustnessFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageRobustnessFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImageRobustnessFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImageRobustnessFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImageRobustnessFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.robustImageAccess !== undefined) this.robustImageAccess = data.robustImageAccess; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageRobustnessFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get robustImageAccess(): number { + return this.#view.getUint32(16, LE); + } + + set robustImageAccess(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageRobustnessFeaturesEXT.ts b/api/struct/PhysicalDeviceImageRobustnessFeaturesEXT.ts new file mode 100644 index 0000000..a5ec715 --- /dev/null +++ b/api/struct/PhysicalDeviceImageRobustnessFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceImageRobustnessFeatures } from "./PhysicalDeviceImageRobustnessFeatures.ts"; + export type PhysicalDeviceImageRobustnessFeaturesEXT = PhysicalDeviceImageRobustnessFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageViewImageFormatInfoEXT.ts b/api/struct/PhysicalDeviceImageViewImageFormatInfoEXT.ts new file mode 100644 index 0000000..a0835ec --- /dev/null +++ b/api/struct/PhysicalDeviceImageViewImageFormatInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageViewType } from "../enum.ts"; + +export interface InitPhysicalDeviceImageViewImageFormatInfoEXT { + pNext?: AnyPointer; + imageViewType?: ImageViewType; +} + +export class PhysicalDeviceImageViewImageFormatInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImageViewImageFormatInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageViewImageFormatInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImageViewImageFormatInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImageViewImageFormatInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImageViewImageFormatInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageViewType !== undefined) this.imageViewType = data.imageViewType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageViewImageFormatInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageViewType(): number { + return this.#view.getUint32(16, LE); + } + + set imageViewType(value: ImageViewType) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImageViewMinLodFeaturesEXT.ts b/api/struct/PhysicalDeviceImageViewMinLodFeaturesEXT.ts new file mode 100644 index 0000000..7694551 --- /dev/null +++ b/api/struct/PhysicalDeviceImageViewMinLodFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceImageViewMinLodFeaturesEXT { + pNext?: AnyPointer; + minLod?: Bool32; +} + +export class PhysicalDeviceImageViewMinLodFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImageViewMinLodFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageViewMinLodFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImageViewMinLodFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImageViewMinLodFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImageViewMinLodFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minLod !== undefined) this.minLod = data.minLod; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageViewMinLodFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minLod(): number { + return this.#view.getUint32(16, LE); + } + + set minLod(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImagelessFramebufferFeatures.ts b/api/struct/PhysicalDeviceImagelessFramebufferFeatures.ts new file mode 100644 index 0000000..eedaf18 --- /dev/null +++ b/api/struct/PhysicalDeviceImagelessFramebufferFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceImagelessFramebufferFeatures { + pNext?: AnyPointer; + imagelessFramebuffer?: Bool32; +} + +export class PhysicalDeviceImagelessFramebufferFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceImagelessFramebufferFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImagelessFramebufferFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceImagelessFramebufferFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceImagelessFramebufferFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceImagelessFramebufferFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imagelessFramebuffer !== undefined) this.imagelessFramebuffer = data.imagelessFramebuffer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImagelessFramebufferFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imagelessFramebuffer(): number { + return this.#view.getUint32(16, LE); + } + + set imagelessFramebuffer(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceImagelessFramebufferFeaturesKHR.ts b/api/struct/PhysicalDeviceImagelessFramebufferFeaturesKHR.ts new file mode 100644 index 0000000..18b8f9a --- /dev/null +++ b/api/struct/PhysicalDeviceImagelessFramebufferFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceImagelessFramebufferFeatures } from "./PhysicalDeviceImagelessFramebufferFeatures.ts"; + export type PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceIndexTypeUint8FeaturesEXT.ts b/api/struct/PhysicalDeviceIndexTypeUint8FeaturesEXT.ts new file mode 100644 index 0000000..604c6b9 --- /dev/null +++ b/api/struct/PhysicalDeviceIndexTypeUint8FeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceIndexTypeUint8FeaturesEXT { + pNext?: AnyPointer; + indexTypeUint8?: Bool32; +} + +export class PhysicalDeviceIndexTypeUint8FeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceIndexTypeUint8FeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceIndexTypeUint8FeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceIndexTypeUint8FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceIndexTypeUint8FeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceIndexTypeUint8FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.indexTypeUint8 !== undefined) this.indexTypeUint8 = data.indexTypeUint8; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceIndexTypeUint8FeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get indexTypeUint8(): number { + return this.#view.getUint32(16, LE); + } + + set indexTypeUint8(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceInheritedViewportScissorFeaturesNV.ts b/api/struct/PhysicalDeviceInheritedViewportScissorFeaturesNV.ts new file mode 100644 index 0000000..e2e9c6a --- /dev/null +++ b/api/struct/PhysicalDeviceInheritedViewportScissorFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceInheritedViewportScissorFeaturesNV { + pNext?: AnyPointer; + inheritedViewportScissor2D?: Bool32; +} + +export class PhysicalDeviceInheritedViewportScissorFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceInheritedViewportScissorFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceInheritedViewportScissorFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceInheritedViewportScissorFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceInheritedViewportScissorFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceInheritedViewportScissorFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.inheritedViewportScissor2D !== undefined) this.inheritedViewportScissor2D = data.inheritedViewportScissor2D; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInheritedViewportScissorFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get inheritedViewportScissor2D(): number { + return this.#view.getUint32(16, LE); + } + + set inheritedViewportScissor2D(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceInlineUniformBlockFeatures.ts b/api/struct/PhysicalDeviceInlineUniformBlockFeatures.ts new file mode 100644 index 0000000..c47f699 --- /dev/null +++ b/api/struct/PhysicalDeviceInlineUniformBlockFeatures.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceInlineUniformBlockFeatures { + pNext?: AnyPointer; + inlineUniformBlock?: Bool32; + descriptorBindingInlineUniformBlockUpdateAfterBind?: Bool32; +} + +export class PhysicalDeviceInlineUniformBlockFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceInlineUniformBlockFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceInlineUniformBlockFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceInlineUniformBlockFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.inlineUniformBlock !== undefined) this.inlineUniformBlock = data.inlineUniformBlock; + if (data.descriptorBindingInlineUniformBlockUpdateAfterBind !== undefined) this.descriptorBindingInlineUniformBlockUpdateAfterBind = data.descriptorBindingInlineUniformBlockUpdateAfterBind; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInlineUniformBlockFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get inlineUniformBlock(): number { + return this.#view.getUint32(16, LE); + } + + set inlineUniformBlock(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get descriptorBindingInlineUniformBlockUpdateAfterBind(): number { + return this.#view.getUint32(20, LE); + } + + set descriptorBindingInlineUniformBlockUpdateAfterBind(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceInlineUniformBlockFeaturesEXT.ts b/api/struct/PhysicalDeviceInlineUniformBlockFeaturesEXT.ts new file mode 100644 index 0000000..c88e624 --- /dev/null +++ b/api/struct/PhysicalDeviceInlineUniformBlockFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceInlineUniformBlockFeatures } from "./PhysicalDeviceInlineUniformBlockFeatures.ts"; + export type PhysicalDeviceInlineUniformBlockFeaturesEXT = PhysicalDeviceInlineUniformBlockFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceInlineUniformBlockProperties.ts b/api/struct/PhysicalDeviceInlineUniformBlockProperties.ts new file mode 100644 index 0000000..a3102cc --- /dev/null +++ b/api/struct/PhysicalDeviceInlineUniformBlockProperties.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceInlineUniformBlockProperties { + pNext?: AnyPointer; + maxInlineUniformBlockSize?: number; + maxPerStageDescriptorInlineUniformBlocks?: number; + maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks?: number; + maxDescriptorSetInlineUniformBlocks?: number; + maxDescriptorSetUpdateAfterBindInlineUniformBlocks?: number; +} + +export class PhysicalDeviceInlineUniformBlockProperties implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceInlineUniformBlockProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceInlineUniformBlockProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceInlineUniformBlockProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxInlineUniformBlockSize !== undefined) this.maxInlineUniformBlockSize = data.maxInlineUniformBlockSize; + if (data.maxPerStageDescriptorInlineUniformBlocks !== undefined) this.maxPerStageDescriptorInlineUniformBlocks = data.maxPerStageDescriptorInlineUniformBlocks; + if (data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks !== undefined) this.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; + if (data.maxDescriptorSetInlineUniformBlocks !== undefined) this.maxDescriptorSetInlineUniformBlocks = data.maxDescriptorSetInlineUniformBlocks; + if (data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks !== undefined) this.maxDescriptorSetUpdateAfterBindInlineUniformBlocks = data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInlineUniformBlockProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxInlineUniformBlockSize(): number { + return this.#view.getUint32(16, LE); + } + + set maxInlineUniformBlockSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxPerStageDescriptorInlineUniformBlocks(): number { + return this.#view.getUint32(20, LE); + } + + set maxPerStageDescriptorInlineUniformBlocks(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(): number { + return this.#view.getUint32(24, LE); + } + + set maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get maxDescriptorSetInlineUniformBlocks(): number { + return this.#view.getUint32(28, LE); + } + + set maxDescriptorSetInlineUniformBlocks(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindInlineUniformBlocks(): number { + return this.#view.getUint32(32, LE); + } + + set maxDescriptorSetUpdateAfterBindInlineUniformBlocks(value: number) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceInlineUniformBlockPropertiesEXT.ts b/api/struct/PhysicalDeviceInlineUniformBlockPropertiesEXT.ts new file mode 100644 index 0000000..d614539 --- /dev/null +++ b/api/struct/PhysicalDeviceInlineUniformBlockPropertiesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceInlineUniformBlockProperties } from "./PhysicalDeviceInlineUniformBlockProperties.ts"; + export type PhysicalDeviceInlineUniformBlockPropertiesEXT = PhysicalDeviceInlineUniformBlockProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceInvocationMaskFeaturesHUAWEI.ts b/api/struct/PhysicalDeviceInvocationMaskFeaturesHUAWEI.ts new file mode 100644 index 0000000..5b57ecd --- /dev/null +++ b/api/struct/PhysicalDeviceInvocationMaskFeaturesHUAWEI.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceInvocationMaskFeaturesHUAWEI { + pNext?: AnyPointer; + invocationMask?: Bool32; +} + +export class PhysicalDeviceInvocationMaskFeaturesHUAWEI implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceInvocationMaskFeaturesHUAWEI); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceInvocationMaskFeaturesHUAWEI) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceInvocationMaskFeaturesHUAWEI.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceInvocationMaskFeaturesHUAWEI.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceInvocationMaskFeaturesHUAWEI.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.invocationMask !== undefined) this.invocationMask = data.invocationMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInvocationMaskFeaturesHUAWEI.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get invocationMask(): number { + return this.#view.getUint32(16, LE); + } + + set invocationMask(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceLegacyDitheringFeaturesEXT.ts b/api/struct/PhysicalDeviceLegacyDitheringFeaturesEXT.ts new file mode 100644 index 0000000..dc3d6a0 --- /dev/null +++ b/api/struct/PhysicalDeviceLegacyDitheringFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceLegacyDitheringFeaturesEXT { + pNext?: AnyPointer; + legacyDithering?: Bool32; +} + +export class PhysicalDeviceLegacyDitheringFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceLegacyDitheringFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLegacyDitheringFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceLegacyDitheringFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceLegacyDitheringFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceLegacyDitheringFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.legacyDithering !== undefined) this.legacyDithering = data.legacyDithering; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLegacyDitheringFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get legacyDithering(): number { + return this.#view.getUint32(16, LE); + } + + set legacyDithering(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceLimits.ts b/api/struct/PhysicalDeviceLimits.ts new file mode 100644 index 0000000..79d8808 --- /dev/null +++ b/api/struct/PhysicalDeviceLimits.ts @@ -0,0 +1,1110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceSize, SampleCountFlags, Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceLimits { + maxImageDimension1D?: number; + maxImageDimension2D?: number; + maxImageDimension3D?: number; + maxImageDimensionCube?: number; + maxImageArrayLayers?: number; + maxTexelBufferElements?: number; + maxUniformBufferRange?: number; + maxStorageBufferRange?: number; + maxPushConstantsSize?: number; + maxMemoryAllocationCount?: number; + maxSamplerAllocationCount?: number; + bufferImageGranularity?: DeviceSize; + sparseAddressSpaceSize?: DeviceSize; + maxBoundDescriptorSets?: number; + maxPerStageDescriptorSamplers?: number; + maxPerStageDescriptorUniformBuffers?: number; + maxPerStageDescriptorStorageBuffers?: number; + maxPerStageDescriptorSampledImages?: number; + maxPerStageDescriptorStorageImages?: number; + maxPerStageDescriptorInputAttachments?: number; + maxPerStageResources?: number; + maxDescriptorSetSamplers?: number; + maxDescriptorSetUniformBuffers?: number; + maxDescriptorSetUniformBuffersDynamic?: number; + maxDescriptorSetStorageBuffers?: number; + maxDescriptorSetStorageBuffersDynamic?: number; + maxDescriptorSetSampledImages?: number; + maxDescriptorSetStorageImages?: number; + maxDescriptorSetInputAttachments?: number; + maxVertexInputAttributes?: number; + maxVertexInputBindings?: number; + maxVertexInputAttributeOffset?: number; + maxVertexInputBindingStride?: number; + maxVertexOutputComponents?: number; + maxTessellationGenerationLevel?: number; + maxTessellationPatchSize?: number; + maxTessellationControlPerVertexInputComponents?: number; + maxTessellationControlPerVertexOutputComponents?: number; + maxTessellationControlPerPatchOutputComponents?: number; + maxTessellationControlTotalOutputComponents?: number; + maxTessellationEvaluationInputComponents?: number; + maxTessellationEvaluationOutputComponents?: number; + maxGeometryShaderInvocations?: number; + maxGeometryInputComponents?: number; + maxGeometryOutputComponents?: number; + maxGeometryOutputVertices?: number; + maxGeometryTotalOutputComponents?: number; + maxFragmentInputComponents?: number; + maxFragmentOutputAttachments?: number; + maxFragmentDualSrcAttachments?: number; + maxFragmentCombinedOutputResources?: number; + maxComputeSharedMemorySize?: number; + maxComputeWorkGroupCount?: Uint32Array; + maxComputeWorkGroupInvocations?: number; + maxComputeWorkGroupSize?: Uint32Array; + subPixelPrecisionBits?: number; + subTexelPrecisionBits?: number; + mipmapPrecisionBits?: number; + maxDrawIndexedIndexValue?: number; + maxDrawIndirectCount?: number; + maxSamplerLodBias?: number; + maxSamplerAnisotropy?: number; + maxViewports?: number; + maxViewportDimensions?: Uint32Array; + viewportBoundsRange?: Float32Array; + viewportSubPixelBits?: number; + minMemoryMapAlignment?: number | bigint; + minTexelBufferOffsetAlignment?: DeviceSize; + minUniformBufferOffsetAlignment?: DeviceSize; + minStorageBufferOffsetAlignment?: DeviceSize; + minTexelOffset?: number; + maxTexelOffset?: number; + minTexelGatherOffset?: number; + maxTexelGatherOffset?: number; + minInterpolationOffset?: number; + maxInterpolationOffset?: number; + subPixelInterpolationOffsetBits?: number; + maxFramebufferWidth?: number; + maxFramebufferHeight?: number; + maxFramebufferLayers?: number; + framebufferColorSampleCounts?: SampleCountFlags; + framebufferDepthSampleCounts?: SampleCountFlags; + framebufferStencilSampleCounts?: SampleCountFlags; + framebufferNoAttachmentsSampleCounts?: SampleCountFlags; + maxColorAttachments?: number; + sampledImageColorSampleCounts?: SampleCountFlags; + sampledImageIntegerSampleCounts?: SampleCountFlags; + sampledImageDepthSampleCounts?: SampleCountFlags; + sampledImageStencilSampleCounts?: SampleCountFlags; + storageImageSampleCounts?: SampleCountFlags; + maxSampleMaskWords?: number; + timestampComputeAndGraphics?: Bool32; + timestampPeriod?: number; + maxClipDistances?: number; + maxCullDistances?: number; + maxCombinedClipAndCullDistances?: number; + discreteQueuePriorities?: number; + pointSizeRange?: Float32Array; + lineWidthRange?: Float32Array; + pointSizeGranularity?: number; + lineWidthGranularity?: number; + strictLines?: Bool32; + standardSampleLocations?: Bool32; + optimalBufferCopyOffsetAlignment?: DeviceSize; + optimalBufferCopyRowPitchAlignment?: DeviceSize; + nonCoherentAtomSize?: DeviceSize; +} + +export class PhysicalDeviceLimits implements BaseStruct { + static size = 504; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceLimits); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLimits) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceLimits.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceLimits.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceLimits.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.maxImageDimension1D !== undefined) this.maxImageDimension1D = data.maxImageDimension1D; + if (data.maxImageDimension2D !== undefined) this.maxImageDimension2D = data.maxImageDimension2D; + if (data.maxImageDimension3D !== undefined) this.maxImageDimension3D = data.maxImageDimension3D; + if (data.maxImageDimensionCube !== undefined) this.maxImageDimensionCube = data.maxImageDimensionCube; + if (data.maxImageArrayLayers !== undefined) this.maxImageArrayLayers = data.maxImageArrayLayers; + if (data.maxTexelBufferElements !== undefined) this.maxTexelBufferElements = data.maxTexelBufferElements; + if (data.maxUniformBufferRange !== undefined) this.maxUniformBufferRange = data.maxUniformBufferRange; + if (data.maxStorageBufferRange !== undefined) this.maxStorageBufferRange = data.maxStorageBufferRange; + if (data.maxPushConstantsSize !== undefined) this.maxPushConstantsSize = data.maxPushConstantsSize; + if (data.maxMemoryAllocationCount !== undefined) this.maxMemoryAllocationCount = data.maxMemoryAllocationCount; + if (data.maxSamplerAllocationCount !== undefined) this.maxSamplerAllocationCount = data.maxSamplerAllocationCount; + if (data.bufferImageGranularity !== undefined) this.bufferImageGranularity = data.bufferImageGranularity; + if (data.sparseAddressSpaceSize !== undefined) this.sparseAddressSpaceSize = data.sparseAddressSpaceSize; + if (data.maxBoundDescriptorSets !== undefined) this.maxBoundDescriptorSets = data.maxBoundDescriptorSets; + if (data.maxPerStageDescriptorSamplers !== undefined) this.maxPerStageDescriptorSamplers = data.maxPerStageDescriptorSamplers; + if (data.maxPerStageDescriptorUniformBuffers !== undefined) this.maxPerStageDescriptorUniformBuffers = data.maxPerStageDescriptorUniformBuffers; + if (data.maxPerStageDescriptorStorageBuffers !== undefined) this.maxPerStageDescriptorStorageBuffers = data.maxPerStageDescriptorStorageBuffers; + if (data.maxPerStageDescriptorSampledImages !== undefined) this.maxPerStageDescriptorSampledImages = data.maxPerStageDescriptorSampledImages; + if (data.maxPerStageDescriptorStorageImages !== undefined) this.maxPerStageDescriptorStorageImages = data.maxPerStageDescriptorStorageImages; + if (data.maxPerStageDescriptorInputAttachments !== undefined) this.maxPerStageDescriptorInputAttachments = data.maxPerStageDescriptorInputAttachments; + if (data.maxPerStageResources !== undefined) this.maxPerStageResources = data.maxPerStageResources; + if (data.maxDescriptorSetSamplers !== undefined) this.maxDescriptorSetSamplers = data.maxDescriptorSetSamplers; + if (data.maxDescriptorSetUniformBuffers !== undefined) this.maxDescriptorSetUniformBuffers = data.maxDescriptorSetUniformBuffers; + if (data.maxDescriptorSetUniformBuffersDynamic !== undefined) this.maxDescriptorSetUniformBuffersDynamic = data.maxDescriptorSetUniformBuffersDynamic; + if (data.maxDescriptorSetStorageBuffers !== undefined) this.maxDescriptorSetStorageBuffers = data.maxDescriptorSetStorageBuffers; + if (data.maxDescriptorSetStorageBuffersDynamic !== undefined) this.maxDescriptorSetStorageBuffersDynamic = data.maxDescriptorSetStorageBuffersDynamic; + if (data.maxDescriptorSetSampledImages !== undefined) this.maxDescriptorSetSampledImages = data.maxDescriptorSetSampledImages; + if (data.maxDescriptorSetStorageImages !== undefined) this.maxDescriptorSetStorageImages = data.maxDescriptorSetStorageImages; + if (data.maxDescriptorSetInputAttachments !== undefined) this.maxDescriptorSetInputAttachments = data.maxDescriptorSetInputAttachments; + if (data.maxVertexInputAttributes !== undefined) this.maxVertexInputAttributes = data.maxVertexInputAttributes; + if (data.maxVertexInputBindings !== undefined) this.maxVertexInputBindings = data.maxVertexInputBindings; + if (data.maxVertexInputAttributeOffset !== undefined) this.maxVertexInputAttributeOffset = data.maxVertexInputAttributeOffset; + if (data.maxVertexInputBindingStride !== undefined) this.maxVertexInputBindingStride = data.maxVertexInputBindingStride; + if (data.maxVertexOutputComponents !== undefined) this.maxVertexOutputComponents = data.maxVertexOutputComponents; + if (data.maxTessellationGenerationLevel !== undefined) this.maxTessellationGenerationLevel = data.maxTessellationGenerationLevel; + if (data.maxTessellationPatchSize !== undefined) this.maxTessellationPatchSize = data.maxTessellationPatchSize; + if (data.maxTessellationControlPerVertexInputComponents !== undefined) this.maxTessellationControlPerVertexInputComponents = data.maxTessellationControlPerVertexInputComponents; + if (data.maxTessellationControlPerVertexOutputComponents !== undefined) this.maxTessellationControlPerVertexOutputComponents = data.maxTessellationControlPerVertexOutputComponents; + if (data.maxTessellationControlPerPatchOutputComponents !== undefined) this.maxTessellationControlPerPatchOutputComponents = data.maxTessellationControlPerPatchOutputComponents; + if (data.maxTessellationControlTotalOutputComponents !== undefined) this.maxTessellationControlTotalOutputComponents = data.maxTessellationControlTotalOutputComponents; + if (data.maxTessellationEvaluationInputComponents !== undefined) this.maxTessellationEvaluationInputComponents = data.maxTessellationEvaluationInputComponents; + if (data.maxTessellationEvaluationOutputComponents !== undefined) this.maxTessellationEvaluationOutputComponents = data.maxTessellationEvaluationOutputComponents; + if (data.maxGeometryShaderInvocations !== undefined) this.maxGeometryShaderInvocations = data.maxGeometryShaderInvocations; + if (data.maxGeometryInputComponents !== undefined) this.maxGeometryInputComponents = data.maxGeometryInputComponents; + if (data.maxGeometryOutputComponents !== undefined) this.maxGeometryOutputComponents = data.maxGeometryOutputComponents; + if (data.maxGeometryOutputVertices !== undefined) this.maxGeometryOutputVertices = data.maxGeometryOutputVertices; + if (data.maxGeometryTotalOutputComponents !== undefined) this.maxGeometryTotalOutputComponents = data.maxGeometryTotalOutputComponents; + if (data.maxFragmentInputComponents !== undefined) this.maxFragmentInputComponents = data.maxFragmentInputComponents; + if (data.maxFragmentOutputAttachments !== undefined) this.maxFragmentOutputAttachments = data.maxFragmentOutputAttachments; + if (data.maxFragmentDualSrcAttachments !== undefined) this.maxFragmentDualSrcAttachments = data.maxFragmentDualSrcAttachments; + if (data.maxFragmentCombinedOutputResources !== undefined) this.maxFragmentCombinedOutputResources = data.maxFragmentCombinedOutputResources; + if (data.maxComputeSharedMemorySize !== undefined) this.maxComputeSharedMemorySize = data.maxComputeSharedMemorySize; + if (data.maxComputeWorkGroupCount !== undefined) this.maxComputeWorkGroupCount = data.maxComputeWorkGroupCount; + if (data.maxComputeWorkGroupInvocations !== undefined) this.maxComputeWorkGroupInvocations = data.maxComputeWorkGroupInvocations; + if (data.maxComputeWorkGroupSize !== undefined) this.maxComputeWorkGroupSize = data.maxComputeWorkGroupSize; + if (data.subPixelPrecisionBits !== undefined) this.subPixelPrecisionBits = data.subPixelPrecisionBits; + if (data.subTexelPrecisionBits !== undefined) this.subTexelPrecisionBits = data.subTexelPrecisionBits; + if (data.mipmapPrecisionBits !== undefined) this.mipmapPrecisionBits = data.mipmapPrecisionBits; + if (data.maxDrawIndexedIndexValue !== undefined) this.maxDrawIndexedIndexValue = data.maxDrawIndexedIndexValue; + if (data.maxDrawIndirectCount !== undefined) this.maxDrawIndirectCount = data.maxDrawIndirectCount; + if (data.maxSamplerLodBias !== undefined) this.maxSamplerLodBias = data.maxSamplerLodBias; + if (data.maxSamplerAnisotropy !== undefined) this.maxSamplerAnisotropy = data.maxSamplerAnisotropy; + if (data.maxViewports !== undefined) this.maxViewports = data.maxViewports; + if (data.maxViewportDimensions !== undefined) this.maxViewportDimensions = data.maxViewportDimensions; + if (data.viewportBoundsRange !== undefined) this.viewportBoundsRange = data.viewportBoundsRange; + if (data.viewportSubPixelBits !== undefined) this.viewportSubPixelBits = data.viewportSubPixelBits; + if (data.minMemoryMapAlignment !== undefined) this.minMemoryMapAlignment = data.minMemoryMapAlignment; + if (data.minTexelBufferOffsetAlignment !== undefined) this.minTexelBufferOffsetAlignment = data.minTexelBufferOffsetAlignment; + if (data.minUniformBufferOffsetAlignment !== undefined) this.minUniformBufferOffsetAlignment = data.minUniformBufferOffsetAlignment; + if (data.minStorageBufferOffsetAlignment !== undefined) this.minStorageBufferOffsetAlignment = data.minStorageBufferOffsetAlignment; + if (data.minTexelOffset !== undefined) this.minTexelOffset = data.minTexelOffset; + if (data.maxTexelOffset !== undefined) this.maxTexelOffset = data.maxTexelOffset; + if (data.minTexelGatherOffset !== undefined) this.minTexelGatherOffset = data.minTexelGatherOffset; + if (data.maxTexelGatherOffset !== undefined) this.maxTexelGatherOffset = data.maxTexelGatherOffset; + if (data.minInterpolationOffset !== undefined) this.minInterpolationOffset = data.minInterpolationOffset; + if (data.maxInterpolationOffset !== undefined) this.maxInterpolationOffset = data.maxInterpolationOffset; + if (data.subPixelInterpolationOffsetBits !== undefined) this.subPixelInterpolationOffsetBits = data.subPixelInterpolationOffsetBits; + if (data.maxFramebufferWidth !== undefined) this.maxFramebufferWidth = data.maxFramebufferWidth; + if (data.maxFramebufferHeight !== undefined) this.maxFramebufferHeight = data.maxFramebufferHeight; + if (data.maxFramebufferLayers !== undefined) this.maxFramebufferLayers = data.maxFramebufferLayers; + if (data.framebufferColorSampleCounts !== undefined) this.framebufferColorSampleCounts = data.framebufferColorSampleCounts; + if (data.framebufferDepthSampleCounts !== undefined) this.framebufferDepthSampleCounts = data.framebufferDepthSampleCounts; + if (data.framebufferStencilSampleCounts !== undefined) this.framebufferStencilSampleCounts = data.framebufferStencilSampleCounts; + if (data.framebufferNoAttachmentsSampleCounts !== undefined) this.framebufferNoAttachmentsSampleCounts = data.framebufferNoAttachmentsSampleCounts; + if (data.maxColorAttachments !== undefined) this.maxColorAttachments = data.maxColorAttachments; + if (data.sampledImageColorSampleCounts !== undefined) this.sampledImageColorSampleCounts = data.sampledImageColorSampleCounts; + if (data.sampledImageIntegerSampleCounts !== undefined) this.sampledImageIntegerSampleCounts = data.sampledImageIntegerSampleCounts; + if (data.sampledImageDepthSampleCounts !== undefined) this.sampledImageDepthSampleCounts = data.sampledImageDepthSampleCounts; + if (data.sampledImageStencilSampleCounts !== undefined) this.sampledImageStencilSampleCounts = data.sampledImageStencilSampleCounts; + if (data.storageImageSampleCounts !== undefined) this.storageImageSampleCounts = data.storageImageSampleCounts; + if (data.maxSampleMaskWords !== undefined) this.maxSampleMaskWords = data.maxSampleMaskWords; + if (data.timestampComputeAndGraphics !== undefined) this.timestampComputeAndGraphics = data.timestampComputeAndGraphics; + if (data.timestampPeriod !== undefined) this.timestampPeriod = data.timestampPeriod; + if (data.maxClipDistances !== undefined) this.maxClipDistances = data.maxClipDistances; + if (data.maxCullDistances !== undefined) this.maxCullDistances = data.maxCullDistances; + if (data.maxCombinedClipAndCullDistances !== undefined) this.maxCombinedClipAndCullDistances = data.maxCombinedClipAndCullDistances; + if (data.discreteQueuePriorities !== undefined) this.discreteQueuePriorities = data.discreteQueuePriorities; + if (data.pointSizeRange !== undefined) this.pointSizeRange = data.pointSizeRange; + if (data.lineWidthRange !== undefined) this.lineWidthRange = data.lineWidthRange; + if (data.pointSizeGranularity !== undefined) this.pointSizeGranularity = data.pointSizeGranularity; + if (data.lineWidthGranularity !== undefined) this.lineWidthGranularity = data.lineWidthGranularity; + if (data.strictLines !== undefined) this.strictLines = data.strictLines; + if (data.standardSampleLocations !== undefined) this.standardSampleLocations = data.standardSampleLocations; + if (data.optimalBufferCopyOffsetAlignment !== undefined) this.optimalBufferCopyOffsetAlignment = data.optimalBufferCopyOffsetAlignment; + if (data.optimalBufferCopyRowPitchAlignment !== undefined) this.optimalBufferCopyRowPitchAlignment = data.optimalBufferCopyRowPitchAlignment; + if (data.nonCoherentAtomSize !== undefined) this.nonCoherentAtomSize = data.nonCoherentAtomSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLimits.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get maxImageDimension1D(): number { + return this.#view.getUint32(0, LE); + } + + set maxImageDimension1D(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get maxImageDimension2D(): number { + return this.#view.getUint32(4, LE); + } + + set maxImageDimension2D(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get maxImageDimension3D(): number { + return this.#view.getUint32(8, LE); + } + + set maxImageDimension3D(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get maxImageDimensionCube(): number { + return this.#view.getUint32(12, LE); + } + + set maxImageDimensionCube(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get maxImageArrayLayers(): number { + return this.#view.getUint32(16, LE); + } + + set maxImageArrayLayers(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxTexelBufferElements(): number { + return this.#view.getUint32(20, LE); + } + + set maxTexelBufferElements(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxUniformBufferRange(): number { + return this.#view.getUint32(24, LE); + } + + set maxUniformBufferRange(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get maxStorageBufferRange(): number { + return this.#view.getUint32(28, LE); + } + + set maxStorageBufferRange(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get maxPushConstantsSize(): number { + return this.#view.getUint32(32, LE); + } + + set maxPushConstantsSize(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get maxMemoryAllocationCount(): number { + return this.#view.getUint32(36, LE); + } + + set maxMemoryAllocationCount(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get maxSamplerAllocationCount(): number { + return this.#view.getUint32(40, LE); + } + + set maxSamplerAllocationCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get bufferImageGranularity(): bigint { + return this.#view.getBigUint64(48, LE); + } + + set bufferImageGranularity(value: DeviceSize) { + this.#view.setBigUint64(48, BigInt(value), LE); + } + + get sparseAddressSpaceSize(): bigint { + return this.#view.getBigUint64(56, LE); + } + + set sparseAddressSpaceSize(value: DeviceSize) { + this.#view.setBigUint64(56, BigInt(value), LE); + } + + get maxBoundDescriptorSets(): number { + return this.#view.getUint32(64, LE); + } + + set maxBoundDescriptorSets(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get maxPerStageDescriptorSamplers(): number { + return this.#view.getUint32(68, LE); + } + + set maxPerStageDescriptorSamplers(value: number) { + this.#view.setUint32(68, Number(value), LE); + } + + get maxPerStageDescriptorUniformBuffers(): number { + return this.#view.getUint32(72, LE); + } + + set maxPerStageDescriptorUniformBuffers(value: number) { + this.#view.setUint32(72, Number(value), LE); + } + + get maxPerStageDescriptorStorageBuffers(): number { + return this.#view.getUint32(76, LE); + } + + set maxPerStageDescriptorStorageBuffers(value: number) { + this.#view.setUint32(76, Number(value), LE); + } + + get maxPerStageDescriptorSampledImages(): number { + return this.#view.getUint32(80, LE); + } + + set maxPerStageDescriptorSampledImages(value: number) { + this.#view.setUint32(80, Number(value), LE); + } + + get maxPerStageDescriptorStorageImages(): number { + return this.#view.getUint32(84, LE); + } + + set maxPerStageDescriptorStorageImages(value: number) { + this.#view.setUint32(84, Number(value), LE); + } + + get maxPerStageDescriptorInputAttachments(): number { + return this.#view.getUint32(88, LE); + } + + set maxPerStageDescriptorInputAttachments(value: number) { + this.#view.setUint32(88, Number(value), LE); + } + + get maxPerStageResources(): number { + return this.#view.getUint32(92, LE); + } + + set maxPerStageResources(value: number) { + this.#view.setUint32(92, Number(value), LE); + } + + get maxDescriptorSetSamplers(): number { + return this.#view.getUint32(96, LE); + } + + set maxDescriptorSetSamplers(value: number) { + this.#view.setUint32(96, Number(value), LE); + } + + get maxDescriptorSetUniformBuffers(): number { + return this.#view.getUint32(100, LE); + } + + set maxDescriptorSetUniformBuffers(value: number) { + this.#view.setUint32(100, Number(value), LE); + } + + get maxDescriptorSetUniformBuffersDynamic(): number { + return this.#view.getUint32(104, LE); + } + + set maxDescriptorSetUniformBuffersDynamic(value: number) { + this.#view.setUint32(104, Number(value), LE); + } + + get maxDescriptorSetStorageBuffers(): number { + return this.#view.getUint32(108, LE); + } + + set maxDescriptorSetStorageBuffers(value: number) { + this.#view.setUint32(108, Number(value), LE); + } + + get maxDescriptorSetStorageBuffersDynamic(): number { + return this.#view.getUint32(112, LE); + } + + set maxDescriptorSetStorageBuffersDynamic(value: number) { + this.#view.setUint32(112, Number(value), LE); + } + + get maxDescriptorSetSampledImages(): number { + return this.#view.getUint32(116, LE); + } + + set maxDescriptorSetSampledImages(value: number) { + this.#view.setUint32(116, Number(value), LE); + } + + get maxDescriptorSetStorageImages(): number { + return this.#view.getUint32(120, LE); + } + + set maxDescriptorSetStorageImages(value: number) { + this.#view.setUint32(120, Number(value), LE); + } + + get maxDescriptorSetInputAttachments(): number { + return this.#view.getUint32(124, LE); + } + + set maxDescriptorSetInputAttachments(value: number) { + this.#view.setUint32(124, Number(value), LE); + } + + get maxVertexInputAttributes(): number { + return this.#view.getUint32(128, LE); + } + + set maxVertexInputAttributes(value: number) { + this.#view.setUint32(128, Number(value), LE); + } + + get maxVertexInputBindings(): number { + return this.#view.getUint32(132, LE); + } + + set maxVertexInputBindings(value: number) { + this.#view.setUint32(132, Number(value), LE); + } + + get maxVertexInputAttributeOffset(): number { + return this.#view.getUint32(136, LE); + } + + set maxVertexInputAttributeOffset(value: number) { + this.#view.setUint32(136, Number(value), LE); + } + + get maxVertexInputBindingStride(): number { + return this.#view.getUint32(140, LE); + } + + set maxVertexInputBindingStride(value: number) { + this.#view.setUint32(140, Number(value), LE); + } + + get maxVertexOutputComponents(): number { + return this.#view.getUint32(144, LE); + } + + set maxVertexOutputComponents(value: number) { + this.#view.setUint32(144, Number(value), LE); + } + + get maxTessellationGenerationLevel(): number { + return this.#view.getUint32(148, LE); + } + + set maxTessellationGenerationLevel(value: number) { + this.#view.setUint32(148, Number(value), LE); + } + + get maxTessellationPatchSize(): number { + return this.#view.getUint32(152, LE); + } + + set maxTessellationPatchSize(value: number) { + this.#view.setUint32(152, Number(value), LE); + } + + get maxTessellationControlPerVertexInputComponents(): number { + return this.#view.getUint32(156, LE); + } + + set maxTessellationControlPerVertexInputComponents(value: number) { + this.#view.setUint32(156, Number(value), LE); + } + + get maxTessellationControlPerVertexOutputComponents(): number { + return this.#view.getUint32(160, LE); + } + + set maxTessellationControlPerVertexOutputComponents(value: number) { + this.#view.setUint32(160, Number(value), LE); + } + + get maxTessellationControlPerPatchOutputComponents(): number { + return this.#view.getUint32(164, LE); + } + + set maxTessellationControlPerPatchOutputComponents(value: number) { + this.#view.setUint32(164, Number(value), LE); + } + + get maxTessellationControlTotalOutputComponents(): number { + return this.#view.getUint32(168, LE); + } + + set maxTessellationControlTotalOutputComponents(value: number) { + this.#view.setUint32(168, Number(value), LE); + } + + get maxTessellationEvaluationInputComponents(): number { + return this.#view.getUint32(172, LE); + } + + set maxTessellationEvaluationInputComponents(value: number) { + this.#view.setUint32(172, Number(value), LE); + } + + get maxTessellationEvaluationOutputComponents(): number { + return this.#view.getUint32(176, LE); + } + + set maxTessellationEvaluationOutputComponents(value: number) { + this.#view.setUint32(176, Number(value), LE); + } + + get maxGeometryShaderInvocations(): number { + return this.#view.getUint32(180, LE); + } + + set maxGeometryShaderInvocations(value: number) { + this.#view.setUint32(180, Number(value), LE); + } + + get maxGeometryInputComponents(): number { + return this.#view.getUint32(184, LE); + } + + set maxGeometryInputComponents(value: number) { + this.#view.setUint32(184, Number(value), LE); + } + + get maxGeometryOutputComponents(): number { + return this.#view.getUint32(188, LE); + } + + set maxGeometryOutputComponents(value: number) { + this.#view.setUint32(188, Number(value), LE); + } + + get maxGeometryOutputVertices(): number { + return this.#view.getUint32(192, LE); + } + + set maxGeometryOutputVertices(value: number) { + this.#view.setUint32(192, Number(value), LE); + } + + get maxGeometryTotalOutputComponents(): number { + return this.#view.getUint32(196, LE); + } + + set maxGeometryTotalOutputComponents(value: number) { + this.#view.setUint32(196, Number(value), LE); + } + + get maxFragmentInputComponents(): number { + return this.#view.getUint32(200, LE); + } + + set maxFragmentInputComponents(value: number) { + this.#view.setUint32(200, Number(value), LE); + } + + get maxFragmentOutputAttachments(): number { + return this.#view.getUint32(204, LE); + } + + set maxFragmentOutputAttachments(value: number) { + this.#view.setUint32(204, Number(value), LE); + } + + get maxFragmentDualSrcAttachments(): number { + return this.#view.getUint32(208, LE); + } + + set maxFragmentDualSrcAttachments(value: number) { + this.#view.setUint32(208, Number(value), LE); + } + + get maxFragmentCombinedOutputResources(): number { + return this.#view.getUint32(212, LE); + } + + set maxFragmentCombinedOutputResources(value: number) { + this.#view.setUint32(212, Number(value), LE); + } + + get maxComputeSharedMemorySize(): number { + return this.#view.getUint32(216, LE); + } + + set maxComputeSharedMemorySize(value: number) { + this.#view.setUint32(216, Number(value), LE); + } + + get maxComputeWorkGroupCount(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 220, 3); + } + + set maxComputeWorkGroupCount(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 220); + } + + get maxComputeWorkGroupInvocations(): number { + return this.#view.getUint32(232, LE); + } + + set maxComputeWorkGroupInvocations(value: number) { + this.#view.setUint32(232, Number(value), LE); + } + + get maxComputeWorkGroupSize(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 236, 3); + } + + set maxComputeWorkGroupSize(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 236); + } + + get subPixelPrecisionBits(): number { + return this.#view.getUint32(248, LE); + } + + set subPixelPrecisionBits(value: number) { + this.#view.setUint32(248, Number(value), LE); + } + + get subTexelPrecisionBits(): number { + return this.#view.getUint32(252, LE); + } + + set subTexelPrecisionBits(value: number) { + this.#view.setUint32(252, Number(value), LE); + } + + get mipmapPrecisionBits(): number { + return this.#view.getUint32(256, LE); + } + + set mipmapPrecisionBits(value: number) { + this.#view.setUint32(256, Number(value), LE); + } + + get maxDrawIndexedIndexValue(): number { + return this.#view.getUint32(260, LE); + } + + set maxDrawIndexedIndexValue(value: number) { + this.#view.setUint32(260, Number(value), LE); + } + + get maxDrawIndirectCount(): number { + return this.#view.getUint32(264, LE); + } + + set maxDrawIndirectCount(value: number) { + this.#view.setUint32(264, Number(value), LE); + } + + get maxSamplerLodBias(): number { + return this.#view.getFloat32(268, LE); + } + + set maxSamplerLodBias(value: number) { + this.#view.setFloat32(268, Number(value), LE); + } + + get maxSamplerAnisotropy(): number { + return this.#view.getFloat32(272, LE); + } + + set maxSamplerAnisotropy(value: number) { + this.#view.setFloat32(272, Number(value), LE); + } + + get maxViewports(): number { + return this.#view.getUint32(276, LE); + } + + set maxViewports(value: number) { + this.#view.setUint32(276, Number(value), LE); + } + + get maxViewportDimensions(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 280, 2); + } + + set maxViewportDimensions(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 280); + } + + get viewportBoundsRange(): Float32Array { + return new Float32Array(this.#data.buffer, this.#data.byteOffset + 288, 2); + } + + set viewportBoundsRange(value: Float32Array) { + this.#data.set(new Uint8Array(value.buffer), 288); + } + + get viewportSubPixelBits(): number { + return this.#view.getUint32(296, LE); + } + + set viewportSubPixelBits(value: number) { + this.#view.setUint32(296, Number(value), LE); + } + + get minMemoryMapAlignment(): bigint { + return this.#view.getBigUint64(304, LE); + } + + set minMemoryMapAlignment(value: number | bigint) { + this.#view.setBigUint64(304, BigInt(value), LE); + } + + get minTexelBufferOffsetAlignment(): bigint { + return this.#view.getBigUint64(312, LE); + } + + set minTexelBufferOffsetAlignment(value: DeviceSize) { + this.#view.setBigUint64(312, BigInt(value), LE); + } + + get minUniformBufferOffsetAlignment(): bigint { + return this.#view.getBigUint64(320, LE); + } + + set minUniformBufferOffsetAlignment(value: DeviceSize) { + this.#view.setBigUint64(320, BigInt(value), LE); + } + + get minStorageBufferOffsetAlignment(): bigint { + return this.#view.getBigUint64(328, LE); + } + + set minStorageBufferOffsetAlignment(value: DeviceSize) { + this.#view.setBigUint64(328, BigInt(value), LE); + } + + get minTexelOffset(): number { + return this.#view.getInt32(336, LE); + } + + set minTexelOffset(value: number) { + this.#view.setInt32(336, Number(value), LE); + } + + get maxTexelOffset(): number { + return this.#view.getUint32(340, LE); + } + + set maxTexelOffset(value: number) { + this.#view.setUint32(340, Number(value), LE); + } + + get minTexelGatherOffset(): number { + return this.#view.getInt32(344, LE); + } + + set minTexelGatherOffset(value: number) { + this.#view.setInt32(344, Number(value), LE); + } + + get maxTexelGatherOffset(): number { + return this.#view.getUint32(348, LE); + } + + set maxTexelGatherOffset(value: number) { + this.#view.setUint32(348, Number(value), LE); + } + + get minInterpolationOffset(): number { + return this.#view.getFloat32(352, LE); + } + + set minInterpolationOffset(value: number) { + this.#view.setFloat32(352, Number(value), LE); + } + + get maxInterpolationOffset(): number { + return this.#view.getFloat32(356, LE); + } + + set maxInterpolationOffset(value: number) { + this.#view.setFloat32(356, Number(value), LE); + } + + get subPixelInterpolationOffsetBits(): number { + return this.#view.getUint32(360, LE); + } + + set subPixelInterpolationOffsetBits(value: number) { + this.#view.setUint32(360, Number(value), LE); + } + + get maxFramebufferWidth(): number { + return this.#view.getUint32(364, LE); + } + + set maxFramebufferWidth(value: number) { + this.#view.setUint32(364, Number(value), LE); + } + + get maxFramebufferHeight(): number { + return this.#view.getUint32(368, LE); + } + + set maxFramebufferHeight(value: number) { + this.#view.setUint32(368, Number(value), LE); + } + + get maxFramebufferLayers(): number { + return this.#view.getUint32(372, LE); + } + + set maxFramebufferLayers(value: number) { + this.#view.setUint32(372, Number(value), LE); + } + + get framebufferColorSampleCounts(): number { + return this.#view.getUint32(376, LE); + } + + set framebufferColorSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(376, Number(value), LE); + } + + get framebufferDepthSampleCounts(): number { + return this.#view.getUint32(380, LE); + } + + set framebufferDepthSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(380, Number(value), LE); + } + + get framebufferStencilSampleCounts(): number { + return this.#view.getUint32(384, LE); + } + + set framebufferStencilSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(384, Number(value), LE); + } + + get framebufferNoAttachmentsSampleCounts(): number { + return this.#view.getUint32(388, LE); + } + + set framebufferNoAttachmentsSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(388, Number(value), LE); + } + + get maxColorAttachments(): number { + return this.#view.getUint32(392, LE); + } + + set maxColorAttachments(value: number) { + this.#view.setUint32(392, Number(value), LE); + } + + get sampledImageColorSampleCounts(): number { + return this.#view.getUint32(396, LE); + } + + set sampledImageColorSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(396, Number(value), LE); + } + + get sampledImageIntegerSampleCounts(): number { + return this.#view.getUint32(400, LE); + } + + set sampledImageIntegerSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(400, Number(value), LE); + } + + get sampledImageDepthSampleCounts(): number { + return this.#view.getUint32(404, LE); + } + + set sampledImageDepthSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(404, Number(value), LE); + } + + get sampledImageStencilSampleCounts(): number { + return this.#view.getUint32(408, LE); + } + + set sampledImageStencilSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(408, Number(value), LE); + } + + get storageImageSampleCounts(): number { + return this.#view.getUint32(412, LE); + } + + set storageImageSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(412, Number(value), LE); + } + + get maxSampleMaskWords(): number { + return this.#view.getUint32(416, LE); + } + + set maxSampleMaskWords(value: number) { + this.#view.setUint32(416, Number(value), LE); + } + + get timestampComputeAndGraphics(): number { + return this.#view.getUint32(420, LE); + } + + set timestampComputeAndGraphics(value: Bool32) { + this.#view.setUint32(420, Number(value), LE); + } + + get timestampPeriod(): number { + return this.#view.getFloat32(424, LE); + } + + set timestampPeriod(value: number) { + this.#view.setFloat32(424, Number(value), LE); + } + + get maxClipDistances(): number { + return this.#view.getUint32(428, LE); + } + + set maxClipDistances(value: number) { + this.#view.setUint32(428, Number(value), LE); + } + + get maxCullDistances(): number { + return this.#view.getUint32(432, LE); + } + + set maxCullDistances(value: number) { + this.#view.setUint32(432, Number(value), LE); + } + + get maxCombinedClipAndCullDistances(): number { + return this.#view.getUint32(436, LE); + } + + set maxCombinedClipAndCullDistances(value: number) { + this.#view.setUint32(436, Number(value), LE); + } + + get discreteQueuePriorities(): number { + return this.#view.getUint32(440, LE); + } + + set discreteQueuePriorities(value: number) { + this.#view.setUint32(440, Number(value), LE); + } + + get pointSizeRange(): Float32Array { + return new Float32Array(this.#data.buffer, this.#data.byteOffset + 444, 2); + } + + set pointSizeRange(value: Float32Array) { + this.#data.set(new Uint8Array(value.buffer), 444); + } + + get lineWidthRange(): Float32Array { + return new Float32Array(this.#data.buffer, this.#data.byteOffset + 452, 2); + } + + set lineWidthRange(value: Float32Array) { + this.#data.set(new Uint8Array(value.buffer), 452); + } + + get pointSizeGranularity(): number { + return this.#view.getFloat32(460, LE); + } + + set pointSizeGranularity(value: number) { + this.#view.setFloat32(460, Number(value), LE); + } + + get lineWidthGranularity(): number { + return this.#view.getFloat32(464, LE); + } + + set lineWidthGranularity(value: number) { + this.#view.setFloat32(464, Number(value), LE); + } + + get strictLines(): number { + return this.#view.getUint32(468, LE); + } + + set strictLines(value: Bool32) { + this.#view.setUint32(468, Number(value), LE); + } + + get standardSampleLocations(): number { + return this.#view.getUint32(472, LE); + } + + set standardSampleLocations(value: Bool32) { + this.#view.setUint32(472, Number(value), LE); + } + + get optimalBufferCopyOffsetAlignment(): bigint { + return this.#view.getBigUint64(480, LE); + } + + set optimalBufferCopyOffsetAlignment(value: DeviceSize) { + this.#view.setBigUint64(480, BigInt(value), LE); + } + + get optimalBufferCopyRowPitchAlignment(): bigint { + return this.#view.getBigUint64(488, LE); + } + + set optimalBufferCopyRowPitchAlignment(value: DeviceSize) { + this.#view.setBigUint64(488, BigInt(value), LE); + } + + get nonCoherentAtomSize(): bigint { + return this.#view.getBigUint64(496, LE); + } + + set nonCoherentAtomSize(value: DeviceSize) { + this.#view.setBigUint64(496, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceLineRasterizationFeaturesEXT.ts b/api/struct/PhysicalDeviceLineRasterizationFeaturesEXT.ts new file mode 100644 index 0000000..dcbe8f5 --- /dev/null +++ b/api/struct/PhysicalDeviceLineRasterizationFeaturesEXT.ts @@ -0,0 +1,130 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceLineRasterizationFeaturesEXT { + pNext?: AnyPointer; + rectangularLines?: Bool32; + bresenhamLines?: Bool32; + smoothLines?: Bool32; + stippledRectangularLines?: Bool32; + stippledBresenhamLines?: Bool32; + stippledSmoothLines?: Bool32; +} + +export class PhysicalDeviceLineRasterizationFeaturesEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceLineRasterizationFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLineRasterizationFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceLineRasterizationFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceLineRasterizationFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceLineRasterizationFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.rectangularLines !== undefined) this.rectangularLines = data.rectangularLines; + if (data.bresenhamLines !== undefined) this.bresenhamLines = data.bresenhamLines; + if (data.smoothLines !== undefined) this.smoothLines = data.smoothLines; + if (data.stippledRectangularLines !== undefined) this.stippledRectangularLines = data.stippledRectangularLines; + if (data.stippledBresenhamLines !== undefined) this.stippledBresenhamLines = data.stippledBresenhamLines; + if (data.stippledSmoothLines !== undefined) this.stippledSmoothLines = data.stippledSmoothLines; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLineRasterizationFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get rectangularLines(): number { + return this.#view.getUint32(16, LE); + } + + set rectangularLines(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get bresenhamLines(): number { + return this.#view.getUint32(20, LE); + } + + set bresenhamLines(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get smoothLines(): number { + return this.#view.getUint32(24, LE); + } + + set smoothLines(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get stippledRectangularLines(): number { + return this.#view.getUint32(28, LE); + } + + set stippledRectangularLines(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get stippledBresenhamLines(): number { + return this.#view.getUint32(32, LE); + } + + set stippledBresenhamLines(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get stippledSmoothLines(): number { + return this.#view.getUint32(36, LE); + } + + set stippledSmoothLines(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceLineRasterizationPropertiesEXT.ts b/api/struct/PhysicalDeviceLineRasterizationPropertiesEXT.ts new file mode 100644 index 0000000..f11d747 --- /dev/null +++ b/api/struct/PhysicalDeviceLineRasterizationPropertiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceLineRasterizationPropertiesEXT { + pNext?: AnyPointer; + lineSubPixelPrecisionBits?: number; +} + +export class PhysicalDeviceLineRasterizationPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceLineRasterizationPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLineRasterizationPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceLineRasterizationPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceLineRasterizationPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceLineRasterizationPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.lineSubPixelPrecisionBits !== undefined) this.lineSubPixelPrecisionBits = data.lineSubPixelPrecisionBits; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLineRasterizationPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get lineSubPixelPrecisionBits(): number { + return this.#view.getUint32(16, LE); + } + + set lineSubPixelPrecisionBits(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceLinearColorAttachmentFeaturesNV.ts b/api/struct/PhysicalDeviceLinearColorAttachmentFeaturesNV.ts new file mode 100644 index 0000000..07d90ca --- /dev/null +++ b/api/struct/PhysicalDeviceLinearColorAttachmentFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceLinearColorAttachmentFeaturesNV { + pNext?: AnyPointer; + linearColorAttachment?: Bool32; +} + +export class PhysicalDeviceLinearColorAttachmentFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceLinearColorAttachmentFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLinearColorAttachmentFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceLinearColorAttachmentFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceLinearColorAttachmentFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceLinearColorAttachmentFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.linearColorAttachment !== undefined) this.linearColorAttachment = data.linearColorAttachment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLinearColorAttachmentFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get linearColorAttachment(): number { + return this.#view.getUint32(16, LE); + } + + set linearColorAttachment(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMaintenance3Properties.ts b/api/struct/PhysicalDeviceMaintenance3Properties.ts new file mode 100644 index 0000000..4fef3b4 --- /dev/null +++ b/api/struct/PhysicalDeviceMaintenance3Properties.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitPhysicalDeviceMaintenance3Properties { + pNext?: AnyPointer; + maxPerSetDescriptors?: number; + maxMemoryAllocationSize?: DeviceSize; +} + +export class PhysicalDeviceMaintenance3Properties implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMaintenance3Properties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMaintenance3Properties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMaintenance3Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMaintenance3Properties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMaintenance3Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxPerSetDescriptors !== undefined) this.maxPerSetDescriptors = data.maxPerSetDescriptors; + if (data.maxMemoryAllocationSize !== undefined) this.maxMemoryAllocationSize = data.maxMemoryAllocationSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMaintenance3Properties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxPerSetDescriptors(): number { + return this.#view.getUint32(16, LE); + } + + set maxPerSetDescriptors(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxMemoryAllocationSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set maxMemoryAllocationSize(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMaintenance3PropertiesKHR.ts b/api/struct/PhysicalDeviceMaintenance3PropertiesKHR.ts new file mode 100644 index 0000000..946cf3d --- /dev/null +++ b/api/struct/PhysicalDeviceMaintenance3PropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceMaintenance3Properties } from "./PhysicalDeviceMaintenance3Properties.ts"; + export type PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMaintenance4Features.ts b/api/struct/PhysicalDeviceMaintenance4Features.ts new file mode 100644 index 0000000..315235b --- /dev/null +++ b/api/struct/PhysicalDeviceMaintenance4Features.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMaintenance4Features { + pNext?: AnyPointer; + maintenance4?: Bool32; +} + +export class PhysicalDeviceMaintenance4Features implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMaintenance4Features); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMaintenance4Features) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMaintenance4Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMaintenance4Features.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMaintenance4Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maintenance4 !== undefined) this.maintenance4 = data.maintenance4; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMaintenance4Features.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maintenance4(): number { + return this.#view.getUint32(16, LE); + } + + set maintenance4(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMaintenance4FeaturesKHR.ts b/api/struct/PhysicalDeviceMaintenance4FeaturesKHR.ts new file mode 100644 index 0000000..deb1088 --- /dev/null +++ b/api/struct/PhysicalDeviceMaintenance4FeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceMaintenance4Features } from "./PhysicalDeviceMaintenance4Features.ts"; + export type PhysicalDeviceMaintenance4FeaturesKHR = PhysicalDeviceMaintenance4Features; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMaintenance4Properties.ts b/api/struct/PhysicalDeviceMaintenance4Properties.ts new file mode 100644 index 0000000..7e1a8da --- /dev/null +++ b/api/struct/PhysicalDeviceMaintenance4Properties.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitPhysicalDeviceMaintenance4Properties { + pNext?: AnyPointer; + maxBufferSize?: DeviceSize; +} + +export class PhysicalDeviceMaintenance4Properties implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMaintenance4Properties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMaintenance4Properties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMaintenance4Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMaintenance4Properties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMaintenance4Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxBufferSize !== undefined) this.maxBufferSize = data.maxBufferSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMaintenance4Properties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxBufferSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set maxBufferSize(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMaintenance4PropertiesKHR.ts b/api/struct/PhysicalDeviceMaintenance4PropertiesKHR.ts new file mode 100644 index 0000000..0cb742c --- /dev/null +++ b/api/struct/PhysicalDeviceMaintenance4PropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceMaintenance4Properties } from "./PhysicalDeviceMaintenance4Properties.ts"; + export type PhysicalDeviceMaintenance4PropertiesKHR = PhysicalDeviceMaintenance4Properties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMemoryBudgetPropertiesEXT.ts b/api/struct/PhysicalDeviceMemoryBudgetPropertiesEXT.ts new file mode 100644 index 0000000..47111bb --- /dev/null +++ b/api/struct/PhysicalDeviceMemoryBudgetPropertiesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitPhysicalDeviceMemoryBudgetPropertiesEXT { + pNext?: AnyPointer; + heapBudget?: BigUint64Array; + heapUsage?: BigUint64Array; +} + +export class PhysicalDeviceMemoryBudgetPropertiesEXT implements BaseStruct { + static size = 272; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMemoryBudgetPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryBudgetPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMemoryBudgetPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMemoryBudgetPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMemoryBudgetPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.heapBudget !== undefined) this.heapBudget = data.heapBudget; + if (data.heapUsage !== undefined) this.heapUsage = data.heapUsage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryBudgetPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get heapBudget(): BigUint64Array { + return new BigUint64Array(this.#data.buffer, this.#data.byteOffset + 16, 16); + } + + set heapBudget(value: BigUint64Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } + + get heapUsage(): BigUint64Array { + return new BigUint64Array(this.#data.buffer, this.#data.byteOffset + 144, 16); + } + + set heapUsage(value: BigUint64Array) { + this.#data.set(new Uint8Array(value.buffer), 144); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMemoryDecompressionFeaturesNV.ts b/api/struct/PhysicalDeviceMemoryDecompressionFeaturesNV.ts new file mode 100644 index 0000000..1d66d5f --- /dev/null +++ b/api/struct/PhysicalDeviceMemoryDecompressionFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMemoryDecompressionFeaturesNV { + pNext?: AnyPointer; + memoryDecompression?: Bool32; +} + +export class PhysicalDeviceMemoryDecompressionFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMemoryDecompressionFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryDecompressionFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMemoryDecompressionFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryDecompression !== undefined) this.memoryDecompression = data.memoryDecompression; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryDecompressionFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryDecompression(): number { + return this.#view.getUint32(16, LE); + } + + set memoryDecompression(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMemoryDecompressionPropertiesNV.ts b/api/struct/PhysicalDeviceMemoryDecompressionPropertiesNV.ts new file mode 100644 index 0000000..5e0ff8c --- /dev/null +++ b/api/struct/PhysicalDeviceMemoryDecompressionPropertiesNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { MemoryDecompressionMethodFlagsNV } from "../def.ts"; + +export interface InitPhysicalDeviceMemoryDecompressionPropertiesNV { + pNext?: AnyPointer; + decompressionMethods?: MemoryDecompressionMethodFlagsNV; + maxDecompressionIndirectCount?: number | bigint; +} + +export class PhysicalDeviceMemoryDecompressionPropertiesNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMemoryDecompressionPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryDecompressionPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMemoryDecompressionPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.decompressionMethods !== undefined) this.decompressionMethods = data.decompressionMethods; + if (data.maxDecompressionIndirectCount !== undefined) this.maxDecompressionIndirectCount = data.maxDecompressionIndirectCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryDecompressionPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get decompressionMethods(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set decompressionMethods(value: MemoryDecompressionMethodFlagsNV) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get maxDecompressionIndirectCount(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set maxDecompressionIndirectCount(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMemoryPriorityFeaturesEXT.ts b/api/struct/PhysicalDeviceMemoryPriorityFeaturesEXT.ts new file mode 100644 index 0000000..37c2970 --- /dev/null +++ b/api/struct/PhysicalDeviceMemoryPriorityFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMemoryPriorityFeaturesEXT { + pNext?: AnyPointer; + memoryPriority?: Bool32; +} + +export class PhysicalDeviceMemoryPriorityFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMemoryPriorityFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryPriorityFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMemoryPriorityFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMemoryPriorityFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMemoryPriorityFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryPriority !== undefined) this.memoryPriority = data.memoryPriority; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryPriorityFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryPriority(): number { + return this.#view.getUint32(16, LE); + } + + set memoryPriority(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMemoryProperties.ts b/api/struct/PhysicalDeviceMemoryProperties.ts new file mode 100644 index 0000000..15f1358 --- /dev/null +++ b/api/struct/PhysicalDeviceMemoryProperties.ts @@ -0,0 +1,113 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {MemoryType} from "./MemoryType.ts"; +import {MemoryHeap} from "./MemoryHeap.ts"; + +export interface InitPhysicalDeviceMemoryProperties { + memoryTypeCount?: number; + memoryTypes?: MemoryType[]; + memoryHeapCount?: number; + memoryHeaps?: MemoryHeap[]; +} + +export class PhysicalDeviceMemoryProperties implements BaseStruct { + static size = 520; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMemoryProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMemoryProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMemoryProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMemoryProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.memoryTypeCount !== undefined) this.memoryTypeCount = data.memoryTypeCount; + if (data.memoryTypes !== undefined) this.memoryTypes = data.memoryTypes; + if (data.memoryHeapCount !== undefined) this.memoryHeapCount = data.memoryHeapCount; + if (data.memoryHeaps !== undefined) this.memoryHeaps = data.memoryHeaps; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get memoryTypeCount(): number { + return this.#view.getUint32(0, LE); + } + + set memoryTypeCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get memoryTypes(): MemoryType[] { + const result: MemoryType[] = []; + for (let i = 0; i < 32; i++) { + result.push((() => { + return new MemoryType(this.#data.subarray(4 + i * 8, 4 + i * 8 + MemoryType.size)); + })()); + } + return result; + } + + set memoryTypes(value: MemoryType[]) { + for (let i = 0; i < value.length; i++) { + if (value[i][BUFFER].byteLength < MemoryType.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[i][BUFFER], 4 + i * 8); + } + } + + get memoryHeapCount(): number { + return this.#view.getUint32(260, LE); + } + + set memoryHeapCount(value: number) { + this.#view.setUint32(260, Number(value), LE); + } + + get memoryHeaps(): MemoryHeap[] { + const result: MemoryHeap[] = []; + for (let i = 0; i < 16; i++) { + result.push((() => { + return new MemoryHeap(this.#data.subarray(264 + i * 16, 264 + i * 16 + MemoryHeap.size)); + })()); + } + return result; + } + + set memoryHeaps(value: MemoryHeap[]) { + for (let i = 0; i < value.length; i++) { + if (value[i][BUFFER].byteLength < MemoryHeap.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[i][BUFFER], 264 + i * 16); + } + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMemoryProperties2.ts b/api/struct/PhysicalDeviceMemoryProperties2.ts new file mode 100644 index 0000000..d968ac3 --- /dev/null +++ b/api/struct/PhysicalDeviceMemoryProperties2.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PhysicalDeviceMemoryProperties} from "./PhysicalDeviceMemoryProperties.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceMemoryProperties2 { + pNext?: AnyPointer; + memoryProperties?: PhysicalDeviceMemoryProperties; +} + +export class PhysicalDeviceMemoryProperties2 implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMemoryProperties2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryProperties2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMemoryProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMemoryProperties2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMemoryProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryProperties !== undefined) this.memoryProperties = data.memoryProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryProperties2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_PROPERTIES_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryProperties(): PhysicalDeviceMemoryProperties { + return new PhysicalDeviceMemoryProperties(this.#data.subarray(16, 16 + PhysicalDeviceMemoryProperties.size)); + } + + set memoryProperties(value: PhysicalDeviceMemoryProperties) { + if (value[BUFFER].byteLength < PhysicalDeviceMemoryProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMemoryProperties2KHR.ts b/api/struct/PhysicalDeviceMemoryProperties2KHR.ts new file mode 100644 index 0000000..62f7a89 --- /dev/null +++ b/api/struct/PhysicalDeviceMemoryProperties2KHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceMemoryProperties2 } from "./PhysicalDeviceMemoryProperties2.ts"; + export type PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMeshShaderFeaturesEXT.ts b/api/struct/PhysicalDeviceMeshShaderFeaturesEXT.ts new file mode 100644 index 0000000..8b30bca --- /dev/null +++ b/api/struct/PhysicalDeviceMeshShaderFeaturesEXT.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMeshShaderFeaturesEXT { + pNext?: AnyPointer; + taskShader?: Bool32; + meshShader?: Bool32; + multiviewMeshShader?: Bool32; + primitiveFragmentShadingRateMeshShader?: Bool32; + meshShaderQueries?: Bool32; +} + +export class PhysicalDeviceMeshShaderFeaturesEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMeshShaderFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMeshShaderFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMeshShaderFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.taskShader !== undefined) this.taskShader = data.taskShader; + if (data.meshShader !== undefined) this.meshShader = data.meshShader; + if (data.multiviewMeshShader !== undefined) this.multiviewMeshShader = data.multiviewMeshShader; + if (data.primitiveFragmentShadingRateMeshShader !== undefined) this.primitiveFragmentShadingRateMeshShader = data.primitiveFragmentShadingRateMeshShader; + if (data.meshShaderQueries !== undefined) this.meshShaderQueries = data.meshShaderQueries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get taskShader(): number { + return this.#view.getUint32(16, LE); + } + + set taskShader(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get meshShader(): number { + return this.#view.getUint32(20, LE); + } + + set meshShader(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get multiviewMeshShader(): number { + return this.#view.getUint32(24, LE); + } + + set multiviewMeshShader(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get primitiveFragmentShadingRateMeshShader(): number { + return this.#view.getUint32(28, LE); + } + + set primitiveFragmentShadingRateMeshShader(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get meshShaderQueries(): number { + return this.#view.getUint32(32, LE); + } + + set meshShaderQueries(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMeshShaderFeaturesNV.ts b/api/struct/PhysicalDeviceMeshShaderFeaturesNV.ts new file mode 100644 index 0000000..ab8546f --- /dev/null +++ b/api/struct/PhysicalDeviceMeshShaderFeaturesNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMeshShaderFeaturesNV { + pNext?: AnyPointer; + taskShader?: Bool32; + meshShader?: Bool32; +} + +export class PhysicalDeviceMeshShaderFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMeshShaderFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMeshShaderFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMeshShaderFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.taskShader !== undefined) this.taskShader = data.taskShader; + if (data.meshShader !== undefined) this.meshShader = data.meshShader; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get taskShader(): number { + return this.#view.getUint32(16, LE); + } + + set taskShader(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get meshShader(): number { + return this.#view.getUint32(20, LE); + } + + set meshShader(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMeshShaderPropertiesEXT.ts b/api/struct/PhysicalDeviceMeshShaderPropertiesEXT.ts new file mode 100644 index 0000000..26d2fae --- /dev/null +++ b/api/struct/PhysicalDeviceMeshShaderPropertiesEXT.ts @@ -0,0 +1,350 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMeshShaderPropertiesEXT { + pNext?: AnyPointer; + maxTaskWorkGroupTotalCount?: number; + maxTaskWorkGroupCount?: Uint32Array; + maxTaskWorkGroupInvocations?: number; + maxTaskWorkGroupSize?: Uint32Array; + maxTaskPayloadSize?: number; + maxTaskSharedMemorySize?: number; + maxTaskPayloadAndSharedMemorySize?: number; + maxMeshWorkGroupTotalCount?: number; + maxMeshWorkGroupCount?: Uint32Array; + maxMeshWorkGroupInvocations?: number; + maxMeshWorkGroupSize?: Uint32Array; + maxMeshSharedMemorySize?: number; + maxMeshPayloadAndSharedMemorySize?: number; + maxMeshOutputMemorySize?: number; + maxMeshPayloadAndOutputMemorySize?: number; + maxMeshOutputComponents?: number; + maxMeshOutputVertices?: number; + maxMeshOutputPrimitives?: number; + maxMeshOutputLayers?: number; + maxMeshMultiviewViewCount?: number; + meshOutputPerVertexGranularity?: number; + meshOutputPerPrimitiveGranularity?: number; + maxPreferredTaskWorkGroupInvocations?: number; + maxPreferredMeshWorkGroupInvocations?: number; + prefersLocalInvocationVertexOutput?: Bool32; + prefersLocalInvocationPrimitiveOutput?: Bool32; + prefersCompactVertexOutput?: Bool32; + prefersCompactPrimitiveOutput?: Bool32; +} + +export class PhysicalDeviceMeshShaderPropertiesEXT implements BaseStruct { + static size = 160; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMeshShaderPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMeshShaderPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMeshShaderPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxTaskWorkGroupTotalCount !== undefined) this.maxTaskWorkGroupTotalCount = data.maxTaskWorkGroupTotalCount; + if (data.maxTaskWorkGroupCount !== undefined) this.maxTaskWorkGroupCount = data.maxTaskWorkGroupCount; + if (data.maxTaskWorkGroupInvocations !== undefined) this.maxTaskWorkGroupInvocations = data.maxTaskWorkGroupInvocations; + if (data.maxTaskWorkGroupSize !== undefined) this.maxTaskWorkGroupSize = data.maxTaskWorkGroupSize; + if (data.maxTaskPayloadSize !== undefined) this.maxTaskPayloadSize = data.maxTaskPayloadSize; + if (data.maxTaskSharedMemorySize !== undefined) this.maxTaskSharedMemorySize = data.maxTaskSharedMemorySize; + if (data.maxTaskPayloadAndSharedMemorySize !== undefined) this.maxTaskPayloadAndSharedMemorySize = data.maxTaskPayloadAndSharedMemorySize; + if (data.maxMeshWorkGroupTotalCount !== undefined) this.maxMeshWorkGroupTotalCount = data.maxMeshWorkGroupTotalCount; + if (data.maxMeshWorkGroupCount !== undefined) this.maxMeshWorkGroupCount = data.maxMeshWorkGroupCount; + if (data.maxMeshWorkGroupInvocations !== undefined) this.maxMeshWorkGroupInvocations = data.maxMeshWorkGroupInvocations; + if (data.maxMeshWorkGroupSize !== undefined) this.maxMeshWorkGroupSize = data.maxMeshWorkGroupSize; + if (data.maxMeshSharedMemorySize !== undefined) this.maxMeshSharedMemorySize = data.maxMeshSharedMemorySize; + if (data.maxMeshPayloadAndSharedMemorySize !== undefined) this.maxMeshPayloadAndSharedMemorySize = data.maxMeshPayloadAndSharedMemorySize; + if (data.maxMeshOutputMemorySize !== undefined) this.maxMeshOutputMemorySize = data.maxMeshOutputMemorySize; + if (data.maxMeshPayloadAndOutputMemorySize !== undefined) this.maxMeshPayloadAndOutputMemorySize = data.maxMeshPayloadAndOutputMemorySize; + if (data.maxMeshOutputComponents !== undefined) this.maxMeshOutputComponents = data.maxMeshOutputComponents; + if (data.maxMeshOutputVertices !== undefined) this.maxMeshOutputVertices = data.maxMeshOutputVertices; + if (data.maxMeshOutputPrimitives !== undefined) this.maxMeshOutputPrimitives = data.maxMeshOutputPrimitives; + if (data.maxMeshOutputLayers !== undefined) this.maxMeshOutputLayers = data.maxMeshOutputLayers; + if (data.maxMeshMultiviewViewCount !== undefined) this.maxMeshMultiviewViewCount = data.maxMeshMultiviewViewCount; + if (data.meshOutputPerVertexGranularity !== undefined) this.meshOutputPerVertexGranularity = data.meshOutputPerVertexGranularity; + if (data.meshOutputPerPrimitiveGranularity !== undefined) this.meshOutputPerPrimitiveGranularity = data.meshOutputPerPrimitiveGranularity; + if (data.maxPreferredTaskWorkGroupInvocations !== undefined) this.maxPreferredTaskWorkGroupInvocations = data.maxPreferredTaskWorkGroupInvocations; + if (data.maxPreferredMeshWorkGroupInvocations !== undefined) this.maxPreferredMeshWorkGroupInvocations = data.maxPreferredMeshWorkGroupInvocations; + if (data.prefersLocalInvocationVertexOutput !== undefined) this.prefersLocalInvocationVertexOutput = data.prefersLocalInvocationVertexOutput; + if (data.prefersLocalInvocationPrimitiveOutput !== undefined) this.prefersLocalInvocationPrimitiveOutput = data.prefersLocalInvocationPrimitiveOutput; + if (data.prefersCompactVertexOutput !== undefined) this.prefersCompactVertexOutput = data.prefersCompactVertexOutput; + if (data.prefersCompactPrimitiveOutput !== undefined) this.prefersCompactPrimitiveOutput = data.prefersCompactPrimitiveOutput; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxTaskWorkGroupTotalCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxTaskWorkGroupTotalCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxTaskWorkGroupCount(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 20, 3); + } + + set maxTaskWorkGroupCount(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } + + get maxTaskWorkGroupInvocations(): number { + return this.#view.getUint32(32, LE); + } + + set maxTaskWorkGroupInvocations(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get maxTaskWorkGroupSize(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 36, 3); + } + + set maxTaskWorkGroupSize(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 36); + } + + get maxTaskPayloadSize(): number { + return this.#view.getUint32(48, LE); + } + + set maxTaskPayloadSize(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get maxTaskSharedMemorySize(): number { + return this.#view.getUint32(52, LE); + } + + set maxTaskSharedMemorySize(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get maxTaskPayloadAndSharedMemorySize(): number { + return this.#view.getUint32(56, LE); + } + + set maxTaskPayloadAndSharedMemorySize(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get maxMeshWorkGroupTotalCount(): number { + return this.#view.getUint32(60, LE); + } + + set maxMeshWorkGroupTotalCount(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get maxMeshWorkGroupCount(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 64, 3); + } + + set maxMeshWorkGroupCount(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 64); + } + + get maxMeshWorkGroupInvocations(): number { + return this.#view.getUint32(76, LE); + } + + set maxMeshWorkGroupInvocations(value: number) { + this.#view.setUint32(76, Number(value), LE); + } + + get maxMeshWorkGroupSize(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 80, 3); + } + + set maxMeshWorkGroupSize(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 80); + } + + get maxMeshSharedMemorySize(): number { + return this.#view.getUint32(92, LE); + } + + set maxMeshSharedMemorySize(value: number) { + this.#view.setUint32(92, Number(value), LE); + } + + get maxMeshPayloadAndSharedMemorySize(): number { + return this.#view.getUint32(96, LE); + } + + set maxMeshPayloadAndSharedMemorySize(value: number) { + this.#view.setUint32(96, Number(value), LE); + } + + get maxMeshOutputMemorySize(): number { + return this.#view.getUint32(100, LE); + } + + set maxMeshOutputMemorySize(value: number) { + this.#view.setUint32(100, Number(value), LE); + } + + get maxMeshPayloadAndOutputMemorySize(): number { + return this.#view.getUint32(104, LE); + } + + set maxMeshPayloadAndOutputMemorySize(value: number) { + this.#view.setUint32(104, Number(value), LE); + } + + get maxMeshOutputComponents(): number { + return this.#view.getUint32(108, LE); + } + + set maxMeshOutputComponents(value: number) { + this.#view.setUint32(108, Number(value), LE); + } + + get maxMeshOutputVertices(): number { + return this.#view.getUint32(112, LE); + } + + set maxMeshOutputVertices(value: number) { + this.#view.setUint32(112, Number(value), LE); + } + + get maxMeshOutputPrimitives(): number { + return this.#view.getUint32(116, LE); + } + + set maxMeshOutputPrimitives(value: number) { + this.#view.setUint32(116, Number(value), LE); + } + + get maxMeshOutputLayers(): number { + return this.#view.getUint32(120, LE); + } + + set maxMeshOutputLayers(value: number) { + this.#view.setUint32(120, Number(value), LE); + } + + get maxMeshMultiviewViewCount(): number { + return this.#view.getUint32(124, LE); + } + + set maxMeshMultiviewViewCount(value: number) { + this.#view.setUint32(124, Number(value), LE); + } + + get meshOutputPerVertexGranularity(): number { + return this.#view.getUint32(128, LE); + } + + set meshOutputPerVertexGranularity(value: number) { + this.#view.setUint32(128, Number(value), LE); + } + + get meshOutputPerPrimitiveGranularity(): number { + return this.#view.getUint32(132, LE); + } + + set meshOutputPerPrimitiveGranularity(value: number) { + this.#view.setUint32(132, Number(value), LE); + } + + get maxPreferredTaskWorkGroupInvocations(): number { + return this.#view.getUint32(136, LE); + } + + set maxPreferredTaskWorkGroupInvocations(value: number) { + this.#view.setUint32(136, Number(value), LE); + } + + get maxPreferredMeshWorkGroupInvocations(): number { + return this.#view.getUint32(140, LE); + } + + set maxPreferredMeshWorkGroupInvocations(value: number) { + this.#view.setUint32(140, Number(value), LE); + } + + get prefersLocalInvocationVertexOutput(): number { + return this.#view.getUint32(144, LE); + } + + set prefersLocalInvocationVertexOutput(value: Bool32) { + this.#view.setUint32(144, Number(value), LE); + } + + get prefersLocalInvocationPrimitiveOutput(): number { + return this.#view.getUint32(148, LE); + } + + set prefersLocalInvocationPrimitiveOutput(value: Bool32) { + this.#view.setUint32(148, Number(value), LE); + } + + get prefersCompactVertexOutput(): number { + return this.#view.getUint32(152, LE); + } + + set prefersCompactVertexOutput(value: Bool32) { + this.#view.setUint32(152, Number(value), LE); + } + + get prefersCompactPrimitiveOutput(): number { + return this.#view.getUint32(156, LE); + } + + set prefersCompactPrimitiveOutput(value: Bool32) { + this.#view.setUint32(156, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMeshShaderPropertiesNV.ts b/api/struct/PhysicalDeviceMeshShaderPropertiesNV.ts new file mode 100644 index 0000000..adcc83b --- /dev/null +++ b/api/struct/PhysicalDeviceMeshShaderPropertiesNV.ts @@ -0,0 +1,199 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceMeshShaderPropertiesNV { + pNext?: AnyPointer; + maxDrawMeshTasksCount?: number; + maxTaskWorkGroupInvocations?: number; + maxTaskWorkGroupSize?: Uint32Array; + maxTaskTotalMemorySize?: number; + maxTaskOutputCount?: number; + maxMeshWorkGroupInvocations?: number; + maxMeshWorkGroupSize?: Uint32Array; + maxMeshTotalMemorySize?: number; + maxMeshOutputVertices?: number; + maxMeshOutputPrimitives?: number; + maxMeshMultiviewViewCount?: number; + meshOutputPerVertexGranularity?: number; + meshOutputPerPrimitiveGranularity?: number; +} + +export class PhysicalDeviceMeshShaderPropertiesNV implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMeshShaderPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMeshShaderPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMeshShaderPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxDrawMeshTasksCount !== undefined) this.maxDrawMeshTasksCount = data.maxDrawMeshTasksCount; + if (data.maxTaskWorkGroupInvocations !== undefined) this.maxTaskWorkGroupInvocations = data.maxTaskWorkGroupInvocations; + if (data.maxTaskWorkGroupSize !== undefined) this.maxTaskWorkGroupSize = data.maxTaskWorkGroupSize; + if (data.maxTaskTotalMemorySize !== undefined) this.maxTaskTotalMemorySize = data.maxTaskTotalMemorySize; + if (data.maxTaskOutputCount !== undefined) this.maxTaskOutputCount = data.maxTaskOutputCount; + if (data.maxMeshWorkGroupInvocations !== undefined) this.maxMeshWorkGroupInvocations = data.maxMeshWorkGroupInvocations; + if (data.maxMeshWorkGroupSize !== undefined) this.maxMeshWorkGroupSize = data.maxMeshWorkGroupSize; + if (data.maxMeshTotalMemorySize !== undefined) this.maxMeshTotalMemorySize = data.maxMeshTotalMemorySize; + if (data.maxMeshOutputVertices !== undefined) this.maxMeshOutputVertices = data.maxMeshOutputVertices; + if (data.maxMeshOutputPrimitives !== undefined) this.maxMeshOutputPrimitives = data.maxMeshOutputPrimitives; + if (data.maxMeshMultiviewViewCount !== undefined) this.maxMeshMultiviewViewCount = data.maxMeshMultiviewViewCount; + if (data.meshOutputPerVertexGranularity !== undefined) this.meshOutputPerVertexGranularity = data.meshOutputPerVertexGranularity; + if (data.meshOutputPerPrimitiveGranularity !== undefined) this.meshOutputPerPrimitiveGranularity = data.meshOutputPerPrimitiveGranularity; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxDrawMeshTasksCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxDrawMeshTasksCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxTaskWorkGroupInvocations(): number { + return this.#view.getUint32(20, LE); + } + + set maxTaskWorkGroupInvocations(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxTaskWorkGroupSize(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 24, 3); + } + + set maxTaskWorkGroupSize(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 24); + } + + get maxTaskTotalMemorySize(): number { + return this.#view.getUint32(36, LE); + } + + set maxTaskTotalMemorySize(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get maxTaskOutputCount(): number { + return this.#view.getUint32(40, LE); + } + + set maxTaskOutputCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get maxMeshWorkGroupInvocations(): number { + return this.#view.getUint32(44, LE); + } + + set maxMeshWorkGroupInvocations(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get maxMeshWorkGroupSize(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 48, 3); + } + + set maxMeshWorkGroupSize(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 48); + } + + get maxMeshTotalMemorySize(): number { + return this.#view.getUint32(60, LE); + } + + set maxMeshTotalMemorySize(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get maxMeshOutputVertices(): number { + return this.#view.getUint32(64, LE); + } + + set maxMeshOutputVertices(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get maxMeshOutputPrimitives(): number { + return this.#view.getUint32(68, LE); + } + + set maxMeshOutputPrimitives(value: number) { + this.#view.setUint32(68, Number(value), LE); + } + + get maxMeshMultiviewViewCount(): number { + return this.#view.getUint32(72, LE); + } + + set maxMeshMultiviewViewCount(value: number) { + this.#view.setUint32(72, Number(value), LE); + } + + get meshOutputPerVertexGranularity(): number { + return this.#view.getUint32(76, LE); + } + + set meshOutputPerVertexGranularity(value: number) { + this.#view.setUint32(76, Number(value), LE); + } + + get meshOutputPerPrimitiveGranularity(): number { + return this.#view.getUint32(80, LE); + } + + set meshOutputPerPrimitiveGranularity(value: number) { + this.#view.setUint32(80, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMultiDrawFeaturesEXT.ts b/api/struct/PhysicalDeviceMultiDrawFeaturesEXT.ts new file mode 100644 index 0000000..7239c5b --- /dev/null +++ b/api/struct/PhysicalDeviceMultiDrawFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMultiDrawFeaturesEXT { + pNext?: AnyPointer; + multiDraw?: Bool32; +} + +export class PhysicalDeviceMultiDrawFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMultiDrawFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiDrawFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMultiDrawFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMultiDrawFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMultiDrawFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.multiDraw !== undefined) this.multiDraw = data.multiDraw; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiDrawFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get multiDraw(): number { + return this.#view.getUint32(16, LE); + } + + set multiDraw(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMultiDrawPropertiesEXT.ts b/api/struct/PhysicalDeviceMultiDrawPropertiesEXT.ts new file mode 100644 index 0000000..5fe0aee --- /dev/null +++ b/api/struct/PhysicalDeviceMultiDrawPropertiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceMultiDrawPropertiesEXT { + pNext?: AnyPointer; + maxMultiDrawCount?: number; +} + +export class PhysicalDeviceMultiDrawPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMultiDrawPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiDrawPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMultiDrawPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMultiDrawPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMultiDrawPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxMultiDrawCount !== undefined) this.maxMultiDrawCount = data.maxMultiDrawCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiDrawPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxMultiDrawCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxMultiDrawCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.ts b/api/struct/PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.ts new file mode 100644 index 0000000..c611047 --- /dev/null +++ b/api/struct/PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT { + pNext?: AnyPointer; + multisampledRenderToSingleSampled?: Bool32; +} + +export class PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.multisampledRenderToSingleSampled !== undefined) this.multisampledRenderToSingleSampled = data.multisampledRenderToSingleSampled; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get multisampledRenderToSingleSampled(): number { + return this.#view.getUint32(16, LE); + } + + set multisampledRenderToSingleSampled(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMultiviewFeatures.ts b/api/struct/PhysicalDeviceMultiviewFeatures.ts new file mode 100644 index 0000000..e6b7c92 --- /dev/null +++ b/api/struct/PhysicalDeviceMultiviewFeatures.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMultiviewFeatures { + pNext?: AnyPointer; + multiview?: Bool32; + multiviewGeometryShader?: Bool32; + multiviewTessellationShader?: Bool32; +} + +export class PhysicalDeviceMultiviewFeatures implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMultiviewFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiviewFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMultiviewFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMultiviewFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMultiviewFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.multiview !== undefined) this.multiview = data.multiview; + if (data.multiviewGeometryShader !== undefined) this.multiviewGeometryShader = data.multiviewGeometryShader; + if (data.multiviewTessellationShader !== undefined) this.multiviewTessellationShader = data.multiviewTessellationShader; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiviewFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MULTIVIEW_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get multiview(): number { + return this.#view.getUint32(16, LE); + } + + set multiview(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get multiviewGeometryShader(): number { + return this.#view.getUint32(20, LE); + } + + set multiviewGeometryShader(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get multiviewTessellationShader(): number { + return this.#view.getUint32(24, LE); + } + + set multiviewTessellationShader(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMultiviewFeaturesKHR.ts b/api/struct/PhysicalDeviceMultiviewFeaturesKHR.ts new file mode 100644 index 0000000..9ef6cd3 --- /dev/null +++ b/api/struct/PhysicalDeviceMultiviewFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceMultiviewFeatures } from "./PhysicalDeviceMultiviewFeatures.ts"; + export type PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.ts b/api/struct/PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.ts new file mode 100644 index 0000000..d18266c --- /dev/null +++ b/api/struct/PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { + pNext?: AnyPointer; + perViewPositionAllComponents?: Bool32; +} + +export class PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.perViewPositionAllComponents !== undefined) this.perViewPositionAllComponents = data.perViewPositionAllComponents; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get perViewPositionAllComponents(): number { + return this.#view.getUint32(16, LE); + } + + set perViewPositionAllComponents(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMultiviewProperties.ts b/api/struct/PhysicalDeviceMultiviewProperties.ts new file mode 100644 index 0000000..be08eb4 --- /dev/null +++ b/api/struct/PhysicalDeviceMultiviewProperties.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceMultiviewProperties { + pNext?: AnyPointer; + maxMultiviewViewCount?: number; + maxMultiviewInstanceIndex?: number; +} + +export class PhysicalDeviceMultiviewProperties implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMultiviewProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiviewProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMultiviewProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMultiviewProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMultiviewProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxMultiviewViewCount !== undefined) this.maxMultiviewViewCount = data.maxMultiviewViewCount; + if (data.maxMultiviewInstanceIndex !== undefined) this.maxMultiviewInstanceIndex = data.maxMultiviewInstanceIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiviewProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxMultiviewViewCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxMultiviewViewCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxMultiviewInstanceIndex(): number { + return this.#view.getUint32(20, LE); + } + + set maxMultiviewInstanceIndex(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMultiviewPropertiesKHR.ts b/api/struct/PhysicalDeviceMultiviewPropertiesKHR.ts new file mode 100644 index 0000000..6646cf1 --- /dev/null +++ b/api/struct/PhysicalDeviceMultiviewPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceMultiviewProperties } from "./PhysicalDeviceMultiviewProperties.ts"; + export type PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMutableDescriptorTypeFeaturesEXT.ts b/api/struct/PhysicalDeviceMutableDescriptorTypeFeaturesEXT.ts new file mode 100644 index 0000000..e5c546c --- /dev/null +++ b/api/struct/PhysicalDeviceMutableDescriptorTypeFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceMutableDescriptorTypeFeaturesEXT { + pNext?: AnyPointer; + mutableDescriptorType?: Bool32; +} + +export class PhysicalDeviceMutableDescriptorTypeFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceMutableDescriptorTypeFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMutableDescriptorTypeFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.mutableDescriptorType !== undefined) this.mutableDescriptorType = data.mutableDescriptorType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get mutableDescriptorType(): number { + return this.#view.getUint32(16, LE); + } + + set mutableDescriptorType(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceMutableDescriptorTypeFeaturesVALVE.ts b/api/struct/PhysicalDeviceMutableDescriptorTypeFeaturesVALVE.ts new file mode 100644 index 0000000..275be3d --- /dev/null +++ b/api/struct/PhysicalDeviceMutableDescriptorTypeFeaturesVALVE.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceMutableDescriptorTypeFeaturesEXT } from "./PhysicalDeviceMutableDescriptorTypeFeaturesEXT.ts"; + export type PhysicalDeviceMutableDescriptorTypeFeaturesVALVE = PhysicalDeviceMutableDescriptorTypeFeaturesEXT; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.ts b/api/struct/PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.ts new file mode 100644 index 0000000..b8bec01 --- /dev/null +++ b/api/struct/PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceNonSeamlessCubeMapFeaturesEXT { + pNext?: AnyPointer; + nonSeamlessCubeMap?: Bool32; +} + +export class PhysicalDeviceNonSeamlessCubeMapFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceNonSeamlessCubeMapFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceNonSeamlessCubeMapFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.nonSeamlessCubeMap !== undefined) this.nonSeamlessCubeMap = data.nonSeamlessCubeMap; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get nonSeamlessCubeMap(): number { + return this.#view.getUint32(16, LE); + } + + set nonSeamlessCubeMap(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceOpacityMicromapFeaturesEXT.ts b/api/struct/PhysicalDeviceOpacityMicromapFeaturesEXT.ts new file mode 100644 index 0000000..b59c44d --- /dev/null +++ b/api/struct/PhysicalDeviceOpacityMicromapFeaturesEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceOpacityMicromapFeaturesEXT { + pNext?: AnyPointer; + micromap?: Bool32; + micromapCaptureReplay?: Bool32; + micromapHostCommands?: Bool32; +} + +export class PhysicalDeviceOpacityMicromapFeaturesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceOpacityMicromapFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceOpacityMicromapFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceOpacityMicromapFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.micromap !== undefined) this.micromap = data.micromap; + if (data.micromapCaptureReplay !== undefined) this.micromapCaptureReplay = data.micromapCaptureReplay; + if (data.micromapHostCommands !== undefined) this.micromapHostCommands = data.micromapHostCommands; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpacityMicromapFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get micromap(): number { + return this.#view.getUint32(16, LE); + } + + set micromap(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get micromapCaptureReplay(): number { + return this.#view.getUint32(20, LE); + } + + set micromapCaptureReplay(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get micromapHostCommands(): number { + return this.#view.getUint32(24, LE); + } + + set micromapHostCommands(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceOpacityMicromapPropertiesEXT.ts b/api/struct/PhysicalDeviceOpacityMicromapPropertiesEXT.ts new file mode 100644 index 0000000..20e9cc1 --- /dev/null +++ b/api/struct/PhysicalDeviceOpacityMicromapPropertiesEXT.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceOpacityMicromapPropertiesEXT { + pNext?: AnyPointer; + maxOpacity2StateSubdivisionLevel?: number; + maxOpacity4StateSubdivisionLevel?: number; +} + +export class PhysicalDeviceOpacityMicromapPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceOpacityMicromapPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceOpacityMicromapPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceOpacityMicromapPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxOpacity2StateSubdivisionLevel !== undefined) this.maxOpacity2StateSubdivisionLevel = data.maxOpacity2StateSubdivisionLevel; + if (data.maxOpacity4StateSubdivisionLevel !== undefined) this.maxOpacity4StateSubdivisionLevel = data.maxOpacity4StateSubdivisionLevel; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpacityMicromapPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxOpacity2StateSubdivisionLevel(): number { + return this.#view.getUint32(16, LE); + } + + set maxOpacity2StateSubdivisionLevel(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxOpacity4StateSubdivisionLevel(): number { + return this.#view.getUint32(20, LE); + } + + set maxOpacity4StateSubdivisionLevel(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceOpticalFlowFeaturesNV.ts b/api/struct/PhysicalDeviceOpticalFlowFeaturesNV.ts new file mode 100644 index 0000000..77de9ca --- /dev/null +++ b/api/struct/PhysicalDeviceOpticalFlowFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceOpticalFlowFeaturesNV { + pNext?: AnyPointer; + opticalFlow?: Bool32; +} + +export class PhysicalDeviceOpticalFlowFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceOpticalFlowFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceOpticalFlowFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceOpticalFlowFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceOpticalFlowFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceOpticalFlowFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.opticalFlow !== undefined) this.opticalFlow = data.opticalFlow; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpticalFlowFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get opticalFlow(): number { + return this.#view.getUint32(16, LE); + } + + set opticalFlow(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceOpticalFlowPropertiesNV.ts b/api/struct/PhysicalDeviceOpticalFlowPropertiesNV.ts new file mode 100644 index 0000000..1b7ca52 --- /dev/null +++ b/api/struct/PhysicalDeviceOpticalFlowPropertiesNV.ts @@ -0,0 +1,180 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { OpticalFlowGridSizeFlagsNV, Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceOpticalFlowPropertiesNV { + pNext?: AnyPointer; + supportedOutputGridSizes?: OpticalFlowGridSizeFlagsNV; + supportedHintGridSizes?: OpticalFlowGridSizeFlagsNV; + hintSupported?: Bool32; + costSupported?: Bool32; + bidirectionalFlowSupported?: Bool32; + globalFlowSupported?: Bool32; + minWidth?: number; + minHeight?: number; + maxWidth?: number; + maxHeight?: number; + maxNumRegionsOfInterest?: number; +} + +export class PhysicalDeviceOpticalFlowPropertiesNV implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceOpticalFlowPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceOpticalFlowPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceOpticalFlowPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceOpticalFlowPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceOpticalFlowPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.supportedOutputGridSizes !== undefined) this.supportedOutputGridSizes = data.supportedOutputGridSizes; + if (data.supportedHintGridSizes !== undefined) this.supportedHintGridSizes = data.supportedHintGridSizes; + if (data.hintSupported !== undefined) this.hintSupported = data.hintSupported; + if (data.costSupported !== undefined) this.costSupported = data.costSupported; + if (data.bidirectionalFlowSupported !== undefined) this.bidirectionalFlowSupported = data.bidirectionalFlowSupported; + if (data.globalFlowSupported !== undefined) this.globalFlowSupported = data.globalFlowSupported; + if (data.minWidth !== undefined) this.minWidth = data.minWidth; + if (data.minHeight !== undefined) this.minHeight = data.minHeight; + if (data.maxWidth !== undefined) this.maxWidth = data.maxWidth; + if (data.maxHeight !== undefined) this.maxHeight = data.maxHeight; + if (data.maxNumRegionsOfInterest !== undefined) this.maxNumRegionsOfInterest = data.maxNumRegionsOfInterest; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpticalFlowPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get supportedOutputGridSizes(): number { + return this.#view.getUint32(16, LE); + } + + set supportedOutputGridSizes(value: OpticalFlowGridSizeFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get supportedHintGridSizes(): number { + return this.#view.getUint32(20, LE); + } + + set supportedHintGridSizes(value: OpticalFlowGridSizeFlagsNV) { + this.#view.setUint32(20, Number(value), LE); + } + + get hintSupported(): number { + return this.#view.getUint32(24, LE); + } + + set hintSupported(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get costSupported(): number { + return this.#view.getUint32(28, LE); + } + + set costSupported(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get bidirectionalFlowSupported(): number { + return this.#view.getUint32(32, LE); + } + + set bidirectionalFlowSupported(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get globalFlowSupported(): number { + return this.#view.getUint32(36, LE); + } + + set globalFlowSupported(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get minWidth(): number { + return this.#view.getUint32(40, LE); + } + + set minWidth(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get minHeight(): number { + return this.#view.getUint32(44, LE); + } + + set minHeight(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get maxWidth(): number { + return this.#view.getUint32(48, LE); + } + + set maxWidth(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get maxHeight(): number { + return this.#view.getUint32(52, LE); + } + + set maxHeight(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get maxNumRegionsOfInterest(): number { + return this.#view.getUint32(56, LE); + } + + set maxNumRegionsOfInterest(value: number) { + this.#view.setUint32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePCIBusInfoPropertiesEXT.ts b/api/struct/PhysicalDevicePCIBusInfoPropertiesEXT.ts new file mode 100644 index 0000000..4914a92 --- /dev/null +++ b/api/struct/PhysicalDevicePCIBusInfoPropertiesEXT.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDevicePCIBusInfoPropertiesEXT { + pNext?: AnyPointer; + pciDomain?: number; + pciBus?: number; + pciDevice?: number; + pciFunction?: number; +} + +export class PhysicalDevicePCIBusInfoPropertiesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePCIBusInfoPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePCIBusInfoPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePCIBusInfoPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePCIBusInfoPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePCIBusInfoPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pciDomain !== undefined) this.pciDomain = data.pciDomain; + if (data.pciBus !== undefined) this.pciBus = data.pciBus; + if (data.pciDevice !== undefined) this.pciDevice = data.pciDevice; + if (data.pciFunction !== undefined) this.pciFunction = data.pciFunction; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePCIBusInfoPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pciDomain(): number { + return this.#view.getUint32(16, LE); + } + + set pciDomain(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pciBus(): number { + return this.#view.getUint32(20, LE); + } + + set pciBus(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pciDevice(): number { + return this.#view.getUint32(24, LE); + } + + set pciDevice(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pciFunction(): number { + return this.#view.getUint32(28, LE); + } + + set pciFunction(value: number) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.ts b/api/struct/PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.ts new file mode 100644 index 0000000..44a6d31 --- /dev/null +++ b/api/struct/PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT { + pNext?: AnyPointer; + pageableDeviceLocalMemory?: Bool32; +} + +export class PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pageableDeviceLocalMemory !== undefined) this.pageableDeviceLocalMemory = data.pageableDeviceLocalMemory; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pageableDeviceLocalMemory(): number { + return this.#view.getUint32(16, LE); + } + + set pageableDeviceLocalMemory(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePerformanceQueryFeaturesKHR.ts b/api/struct/PhysicalDevicePerformanceQueryFeaturesKHR.ts new file mode 100644 index 0000000..e59d223 --- /dev/null +++ b/api/struct/PhysicalDevicePerformanceQueryFeaturesKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePerformanceQueryFeaturesKHR { + pNext?: AnyPointer; + performanceCounterQueryPools?: Bool32; + performanceCounterMultipleQueryPools?: Bool32; +} + +export class PhysicalDevicePerformanceQueryFeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePerformanceQueryFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePerformanceQueryFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePerformanceQueryFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePerformanceQueryFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePerformanceQueryFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.performanceCounterQueryPools !== undefined) this.performanceCounterQueryPools = data.performanceCounterQueryPools; + if (data.performanceCounterMultipleQueryPools !== undefined) this.performanceCounterMultipleQueryPools = data.performanceCounterMultipleQueryPools; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePerformanceQueryFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get performanceCounterQueryPools(): number { + return this.#view.getUint32(16, LE); + } + + set performanceCounterQueryPools(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get performanceCounterMultipleQueryPools(): number { + return this.#view.getUint32(20, LE); + } + + set performanceCounterMultipleQueryPools(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePerformanceQueryPropertiesKHR.ts b/api/struct/PhysicalDevicePerformanceQueryPropertiesKHR.ts new file mode 100644 index 0000000..4bed3bf --- /dev/null +++ b/api/struct/PhysicalDevicePerformanceQueryPropertiesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePerformanceQueryPropertiesKHR { + pNext?: AnyPointer; + allowCommandBufferQueryCopies?: Bool32; +} + +export class PhysicalDevicePerformanceQueryPropertiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePerformanceQueryPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePerformanceQueryPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePerformanceQueryPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePerformanceQueryPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePerformanceQueryPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.allowCommandBufferQueryCopies !== undefined) this.allowCommandBufferQueryCopies = data.allowCommandBufferQueryCopies; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePerformanceQueryPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get allowCommandBufferQueryCopies(): number { + return this.#view.getUint32(16, LE); + } + + set allowCommandBufferQueryCopies(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePipelineCreationCacheControlFeatures.ts b/api/struct/PhysicalDevicePipelineCreationCacheControlFeatures.ts new file mode 100644 index 0000000..daedeab --- /dev/null +++ b/api/struct/PhysicalDevicePipelineCreationCacheControlFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePipelineCreationCacheControlFeatures { + pNext?: AnyPointer; + pipelineCreationCacheControl?: Bool32; +} + +export class PhysicalDevicePipelineCreationCacheControlFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePipelineCreationCacheControlFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineCreationCacheControlFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePipelineCreationCacheControlFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePipelineCreationCacheControlFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePipelineCreationCacheControlFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipelineCreationCacheControl !== undefined) this.pipelineCreationCacheControl = data.pipelineCreationCacheControl; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineCreationCacheControlFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipelineCreationCacheControl(): number { + return this.#view.getUint32(16, LE); + } + + set pipelineCreationCacheControl(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePipelineCreationCacheControlFeaturesEXT.ts b/api/struct/PhysicalDevicePipelineCreationCacheControlFeaturesEXT.ts new file mode 100644 index 0000000..0023828 --- /dev/null +++ b/api/struct/PhysicalDevicePipelineCreationCacheControlFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDevicePipelineCreationCacheControlFeatures } from "./PhysicalDevicePipelineCreationCacheControlFeatures.ts"; + export type PhysicalDevicePipelineCreationCacheControlFeaturesEXT = PhysicalDevicePipelineCreationCacheControlFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.ts b/api/struct/PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.ts new file mode 100644 index 0000000..dedfec9 --- /dev/null +++ b/api/struct/PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePipelineExecutablePropertiesFeaturesKHR { + pNext?: AnyPointer; + pipelineExecutableInfo?: Bool32; +} + +export class PhysicalDevicePipelineExecutablePropertiesFeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePipelineExecutablePropertiesFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineExecutablePropertiesFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipelineExecutableInfo !== undefined) this.pipelineExecutableInfo = data.pipelineExecutableInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipelineExecutableInfo(): number { + return this.#view.getUint32(16, LE); + } + + set pipelineExecutableInfo(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePipelinePropertiesFeaturesEXT.ts b/api/struct/PhysicalDevicePipelinePropertiesFeaturesEXT.ts new file mode 100644 index 0000000..4e934cd --- /dev/null +++ b/api/struct/PhysicalDevicePipelinePropertiesFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePipelinePropertiesFeaturesEXT { + pNext?: AnyPointer; + pipelinePropertiesIdentifier?: Bool32; +} + +export class PhysicalDevicePipelinePropertiesFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePipelinePropertiesFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelinePropertiesFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePipelinePropertiesFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePipelinePropertiesFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePipelinePropertiesFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipelinePropertiesIdentifier !== undefined) this.pipelinePropertiesIdentifier = data.pipelinePropertiesIdentifier; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelinePropertiesFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipelinePropertiesIdentifier(): number { + return this.#view.getUint32(16, LE); + } + + set pipelinePropertiesIdentifier(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePipelineProtectedAccessFeaturesEXT.ts b/api/struct/PhysicalDevicePipelineProtectedAccessFeaturesEXT.ts new file mode 100644 index 0000000..36d2f04 --- /dev/null +++ b/api/struct/PhysicalDevicePipelineProtectedAccessFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePipelineProtectedAccessFeaturesEXT { + pNext?: AnyPointer; + pipelineProtectedAccess?: Bool32; +} + +export class PhysicalDevicePipelineProtectedAccessFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePipelineProtectedAccessFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineProtectedAccessFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePipelineProtectedAccessFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePipelineProtectedAccessFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePipelineProtectedAccessFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipelineProtectedAccess !== undefined) this.pipelineProtectedAccess = data.pipelineProtectedAccess; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineProtectedAccessFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipelineProtectedAccess(): number { + return this.#view.getUint32(16, LE); + } + + set pipelineProtectedAccess(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePipelineRobustnessFeaturesEXT.ts b/api/struct/PhysicalDevicePipelineRobustnessFeaturesEXT.ts new file mode 100644 index 0000000..b6d40ff --- /dev/null +++ b/api/struct/PhysicalDevicePipelineRobustnessFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePipelineRobustnessFeaturesEXT { + pNext?: AnyPointer; + pipelineRobustness?: Bool32; +} + +export class PhysicalDevicePipelineRobustnessFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePipelineRobustnessFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineRobustnessFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePipelineRobustnessFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipelineRobustness !== undefined) this.pipelineRobustness = data.pipelineRobustness; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineRobustnessFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipelineRobustness(): number { + return this.#view.getUint32(16, LE); + } + + set pipelineRobustness(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePipelineRobustnessPropertiesEXT.ts b/api/struct/PhysicalDevicePipelineRobustnessPropertiesEXT.ts new file mode 100644 index 0000000..4eca5bd --- /dev/null +++ b/api/struct/PhysicalDevicePipelineRobustnessPropertiesEXT.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PipelineRobustnessBufferBehaviorEXT, PipelineRobustnessImageBehaviorEXT } from "../enum.ts"; + +export interface InitPhysicalDevicePipelineRobustnessPropertiesEXT { + pNext?: AnyPointer; + defaultRobustnessStorageBuffers?: PipelineRobustnessBufferBehaviorEXT; + defaultRobustnessUniformBuffers?: PipelineRobustnessBufferBehaviorEXT; + defaultRobustnessVertexInputs?: PipelineRobustnessBufferBehaviorEXT; + defaultRobustnessImages?: PipelineRobustnessImageBehaviorEXT; +} + +export class PhysicalDevicePipelineRobustnessPropertiesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePipelineRobustnessPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineRobustnessPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePipelineRobustnessPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.defaultRobustnessStorageBuffers !== undefined) this.defaultRobustnessStorageBuffers = data.defaultRobustnessStorageBuffers; + if (data.defaultRobustnessUniformBuffers !== undefined) this.defaultRobustnessUniformBuffers = data.defaultRobustnessUniformBuffers; + if (data.defaultRobustnessVertexInputs !== undefined) this.defaultRobustnessVertexInputs = data.defaultRobustnessVertexInputs; + if (data.defaultRobustnessImages !== undefined) this.defaultRobustnessImages = data.defaultRobustnessImages; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineRobustnessPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get defaultRobustnessStorageBuffers(): number { + return this.#view.getUint32(16, LE); + } + + set defaultRobustnessStorageBuffers(value: PipelineRobustnessBufferBehaviorEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get defaultRobustnessUniformBuffers(): number { + return this.#view.getUint32(20, LE); + } + + set defaultRobustnessUniformBuffers(value: PipelineRobustnessBufferBehaviorEXT) { + this.#view.setUint32(20, Number(value), LE); + } + + get defaultRobustnessVertexInputs(): number { + return this.#view.getUint32(24, LE); + } + + set defaultRobustnessVertexInputs(value: PipelineRobustnessBufferBehaviorEXT) { + this.#view.setUint32(24, Number(value), LE); + } + + get defaultRobustnessImages(): number { + return this.#view.getUint32(28, LE); + } + + set defaultRobustnessImages(value: PipelineRobustnessImageBehaviorEXT) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePointClippingProperties.ts b/api/struct/PhysicalDevicePointClippingProperties.ts new file mode 100644 index 0000000..86fff45 --- /dev/null +++ b/api/struct/PhysicalDevicePointClippingProperties.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PointClippingBehavior } from "../enum.ts"; + +export interface InitPhysicalDevicePointClippingProperties { + pNext?: AnyPointer; + pointClippingBehavior?: PointClippingBehavior; +} + +export class PhysicalDevicePointClippingProperties implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePointClippingProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePointClippingProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePointClippingProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePointClippingProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePointClippingProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pointClippingBehavior !== undefined) this.pointClippingBehavior = data.pointClippingBehavior; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePointClippingProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pointClippingBehavior(): number { + return this.#view.getUint32(16, LE); + } + + set pointClippingBehavior(value: PointClippingBehavior) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePointClippingPropertiesKHR.ts b/api/struct/PhysicalDevicePointClippingPropertiesKHR.ts new file mode 100644 index 0000000..ca68b41 --- /dev/null +++ b/api/struct/PhysicalDevicePointClippingPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDevicePointClippingProperties } from "./PhysicalDevicePointClippingProperties.ts"; + export type PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDevicePortabilitySubsetFeaturesKHR.ts b/api/struct/PhysicalDevicePortabilitySubsetFeaturesKHR.ts new file mode 100644 index 0000000..bbf2bcb --- /dev/null +++ b/api/struct/PhysicalDevicePortabilitySubsetFeaturesKHR.ts @@ -0,0 +1,220 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePortabilitySubsetFeaturesKHR { + pNext?: AnyPointer; + constantAlphaColorBlendFactors?: Bool32; + events?: Bool32; + imageViewFormatReinterpretation?: Bool32; + imageViewFormatSwizzle?: Bool32; + imageView2DOn3DImage?: Bool32; + multisampleArrayImage?: Bool32; + mutableComparisonSamplers?: Bool32; + pointPolygons?: Bool32; + samplerMipLodBias?: Bool32; + separateStencilMaskRef?: Bool32; + shaderSampleRateInterpolationFunctions?: Bool32; + tessellationIsolines?: Bool32; + tessellationPointMode?: Bool32; + triangleFans?: Bool32; + vertexAttributeAccessBeyondStride?: Bool32; +} + +export class PhysicalDevicePortabilitySubsetFeaturesKHR implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePortabilitySubsetFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePortabilitySubsetFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePortabilitySubsetFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.constantAlphaColorBlendFactors !== undefined) this.constantAlphaColorBlendFactors = data.constantAlphaColorBlendFactors; + if (data.events !== undefined) this.events = data.events; + if (data.imageViewFormatReinterpretation !== undefined) this.imageViewFormatReinterpretation = data.imageViewFormatReinterpretation; + if (data.imageViewFormatSwizzle !== undefined) this.imageViewFormatSwizzle = data.imageViewFormatSwizzle; + if (data.imageView2DOn3DImage !== undefined) this.imageView2DOn3DImage = data.imageView2DOn3DImage; + if (data.multisampleArrayImage !== undefined) this.multisampleArrayImage = data.multisampleArrayImage; + if (data.mutableComparisonSamplers !== undefined) this.mutableComparisonSamplers = data.mutableComparisonSamplers; + if (data.pointPolygons !== undefined) this.pointPolygons = data.pointPolygons; + if (data.samplerMipLodBias !== undefined) this.samplerMipLodBias = data.samplerMipLodBias; + if (data.separateStencilMaskRef !== undefined) this.separateStencilMaskRef = data.separateStencilMaskRef; + if (data.shaderSampleRateInterpolationFunctions !== undefined) this.shaderSampleRateInterpolationFunctions = data.shaderSampleRateInterpolationFunctions; + if (data.tessellationIsolines !== undefined) this.tessellationIsolines = data.tessellationIsolines; + if (data.tessellationPointMode !== undefined) this.tessellationPointMode = data.tessellationPointMode; + if (data.triangleFans !== undefined) this.triangleFans = data.triangleFans; + if (data.vertexAttributeAccessBeyondStride !== undefined) this.vertexAttributeAccessBeyondStride = data.vertexAttributeAccessBeyondStride; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePortabilitySubsetFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get constantAlphaColorBlendFactors(): number { + return this.#view.getUint32(16, LE); + } + + set constantAlphaColorBlendFactors(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get events(): number { + return this.#view.getUint32(20, LE); + } + + set events(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get imageViewFormatReinterpretation(): number { + return this.#view.getUint32(24, LE); + } + + set imageViewFormatReinterpretation(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get imageViewFormatSwizzle(): number { + return this.#view.getUint32(28, LE); + } + + set imageViewFormatSwizzle(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get imageView2DOn3DImage(): number { + return this.#view.getUint32(32, LE); + } + + set imageView2DOn3DImage(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get multisampleArrayImage(): number { + return this.#view.getUint32(36, LE); + } + + set multisampleArrayImage(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get mutableComparisonSamplers(): number { + return this.#view.getUint32(40, LE); + } + + set mutableComparisonSamplers(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get pointPolygons(): number { + return this.#view.getUint32(44, LE); + } + + set pointPolygons(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get samplerMipLodBias(): number { + return this.#view.getUint32(48, LE); + } + + set samplerMipLodBias(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get separateStencilMaskRef(): number { + return this.#view.getUint32(52, LE); + } + + set separateStencilMaskRef(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get shaderSampleRateInterpolationFunctions(): number { + return this.#view.getUint32(56, LE); + } + + set shaderSampleRateInterpolationFunctions(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get tessellationIsolines(): number { + return this.#view.getUint32(60, LE); + } + + set tessellationIsolines(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get tessellationPointMode(): number { + return this.#view.getUint32(64, LE); + } + + set tessellationPointMode(value: Bool32) { + this.#view.setUint32(64, Number(value), LE); + } + + get triangleFans(): number { + return this.#view.getUint32(68, LE); + } + + set triangleFans(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get vertexAttributeAccessBeyondStride(): number { + return this.#view.getUint32(72, LE); + } + + set vertexAttributeAccessBeyondStride(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePortabilitySubsetPropertiesKHR.ts b/api/struct/PhysicalDevicePortabilitySubsetPropertiesKHR.ts new file mode 100644 index 0000000..ca5fe1c --- /dev/null +++ b/api/struct/PhysicalDevicePortabilitySubsetPropertiesKHR.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDevicePortabilitySubsetPropertiesKHR { + pNext?: AnyPointer; + minVertexInputBindingStrideAlignment?: number; +} + +export class PhysicalDevicePortabilitySubsetPropertiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePortabilitySubsetPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePortabilitySubsetPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePortabilitySubsetPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minVertexInputBindingStrideAlignment !== undefined) this.minVertexInputBindingStrideAlignment = data.minVertexInputBindingStrideAlignment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePortabilitySubsetPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minVertexInputBindingStrideAlignment(): number { + return this.#view.getUint32(16, LE); + } + + set minVertexInputBindingStrideAlignment(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePresentBarrierFeaturesNV.ts b/api/struct/PhysicalDevicePresentBarrierFeaturesNV.ts new file mode 100644 index 0000000..fdbbd49 --- /dev/null +++ b/api/struct/PhysicalDevicePresentBarrierFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePresentBarrierFeaturesNV { + pNext?: AnyPointer; + presentBarrier?: Bool32; +} + +export class PhysicalDevicePresentBarrierFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePresentBarrierFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePresentBarrierFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePresentBarrierFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePresentBarrierFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePresentBarrierFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.presentBarrier !== undefined) this.presentBarrier = data.presentBarrier; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentBarrierFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get presentBarrier(): number { + return this.#view.getUint32(16, LE); + } + + set presentBarrier(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePresentIdFeaturesKHR.ts b/api/struct/PhysicalDevicePresentIdFeaturesKHR.ts new file mode 100644 index 0000000..aa4d413 --- /dev/null +++ b/api/struct/PhysicalDevicePresentIdFeaturesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePresentIdFeaturesKHR { + pNext?: AnyPointer; + presentId?: Bool32; +} + +export class PhysicalDevicePresentIdFeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePresentIdFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePresentIdFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePresentIdFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePresentIdFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePresentIdFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.presentId !== undefined) this.presentId = data.presentId; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentIdFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get presentId(): number { + return this.#view.getUint32(16, LE); + } + + set presentId(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePresentWaitFeaturesKHR.ts b/api/struct/PhysicalDevicePresentWaitFeaturesKHR.ts new file mode 100644 index 0000000..256cab0 --- /dev/null +++ b/api/struct/PhysicalDevicePresentWaitFeaturesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePresentWaitFeaturesKHR { + pNext?: AnyPointer; + presentWait?: Bool32; +} + +export class PhysicalDevicePresentWaitFeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePresentWaitFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePresentWaitFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePresentWaitFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePresentWaitFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePresentWaitFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.presentWait !== undefined) this.presentWait = data.presentWait; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentWaitFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get presentWait(): number { + return this.#view.getUint32(16, LE); + } + + set presentWait(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePresentationPropertiesANDROID.ts b/api/struct/PhysicalDevicePresentationPropertiesANDROID.ts new file mode 100644 index 0000000..f1a0557 --- /dev/null +++ b/api/struct/PhysicalDevicePresentationPropertiesANDROID.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePresentationPropertiesANDROID { + pNext?: AnyPointer; + sharedImage?: Bool32; +} + +export class PhysicalDevicePresentationPropertiesANDROID implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePresentationPropertiesANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePresentationPropertiesANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePresentationPropertiesANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePresentationPropertiesANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePresentationPropertiesANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.sharedImage !== undefined) this.sharedImage = data.sharedImage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentationPropertiesANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get sharedImage(): number { + return this.#view.getUint32(16, LE); + } + + set sharedImage(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.ts b/api/struct/PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.ts new file mode 100644 index 0000000..2537911 --- /dev/null +++ b/api/struct/PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT { + pNext?: AnyPointer; + primitiveTopologyListRestart?: Bool32; + primitiveTopologyPatchListRestart?: Bool32; +} + +export class PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.primitiveTopologyListRestart !== undefined) this.primitiveTopologyListRestart = data.primitiveTopologyListRestart; + if (data.primitiveTopologyPatchListRestart !== undefined) this.primitiveTopologyPatchListRestart = data.primitiveTopologyPatchListRestart; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get primitiveTopologyListRestart(): number { + return this.#view.getUint32(16, LE); + } + + set primitiveTopologyListRestart(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get primitiveTopologyPatchListRestart(): number { + return this.#view.getUint32(20, LE); + } + + set primitiveTopologyPatchListRestart(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.ts b/api/struct/PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.ts new file mode 100644 index 0000000..f4d34a4 --- /dev/null +++ b/api/struct/PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT { + pNext?: AnyPointer; + primitivesGeneratedQuery?: Bool32; + primitivesGeneratedQueryWithRasterizerDiscard?: Bool32; + primitivesGeneratedQueryWithNonZeroStreams?: Bool32; +} + +export class PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.primitivesGeneratedQuery !== undefined) this.primitivesGeneratedQuery = data.primitivesGeneratedQuery; + if (data.primitivesGeneratedQueryWithRasterizerDiscard !== undefined) this.primitivesGeneratedQueryWithRasterizerDiscard = data.primitivesGeneratedQueryWithRasterizerDiscard; + if (data.primitivesGeneratedQueryWithNonZeroStreams !== undefined) this.primitivesGeneratedQueryWithNonZeroStreams = data.primitivesGeneratedQueryWithNonZeroStreams; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get primitivesGeneratedQuery(): number { + return this.#view.getUint32(16, LE); + } + + set primitivesGeneratedQuery(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get primitivesGeneratedQueryWithRasterizerDiscard(): number { + return this.#view.getUint32(20, LE); + } + + set primitivesGeneratedQueryWithRasterizerDiscard(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get primitivesGeneratedQueryWithNonZeroStreams(): number { + return this.#view.getUint32(24, LE); + } + + set primitivesGeneratedQueryWithNonZeroStreams(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePrivateDataFeatures.ts b/api/struct/PhysicalDevicePrivateDataFeatures.ts new file mode 100644 index 0000000..726d134 --- /dev/null +++ b/api/struct/PhysicalDevicePrivateDataFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDevicePrivateDataFeatures { + pNext?: AnyPointer; + privateData?: Bool32; +} + +export class PhysicalDevicePrivateDataFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePrivateDataFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePrivateDataFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePrivateDataFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePrivateDataFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePrivateDataFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.privateData !== undefined) this.privateData = data.privateData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePrivateDataFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get privateData(): number { + return this.#view.getUint32(16, LE); + } + + set privateData(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePrivateDataFeaturesEXT.ts b/api/struct/PhysicalDevicePrivateDataFeaturesEXT.ts new file mode 100644 index 0000000..4b02188 --- /dev/null +++ b/api/struct/PhysicalDevicePrivateDataFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDevicePrivateDataFeatures } from "./PhysicalDevicePrivateDataFeatures.ts"; + export type PhysicalDevicePrivateDataFeaturesEXT = PhysicalDevicePrivateDataFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceProperties.ts b/api/struct/PhysicalDeviceProperties.ts new file mode 100644 index 0000000..86e74de --- /dev/null +++ b/api/struct/PhysicalDeviceProperties.ts @@ -0,0 +1,148 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PhysicalDeviceLimits} from "./PhysicalDeviceLimits.ts"; +import {PhysicalDeviceSparseProperties} from "./PhysicalDeviceSparseProperties.ts"; +import { PhysicalDeviceType } from "../enum.ts"; + +export interface InitPhysicalDeviceProperties { + apiVersion?: number; + driverVersion?: number; + vendorID?: number; + deviceID?: number; + deviceType?: PhysicalDeviceType; + deviceName?: Uint8Array; + pipelineCacheUUID?: Uint8Array; + limits?: PhysicalDeviceLimits; + sparseProperties?: PhysicalDeviceSparseProperties; +} + +export class PhysicalDeviceProperties implements BaseStruct { + static size = 792; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.apiVersion !== undefined) this.apiVersion = data.apiVersion; + if (data.driverVersion !== undefined) this.driverVersion = data.driverVersion; + if (data.vendorID !== undefined) this.vendorID = data.vendorID; + if (data.deviceID !== undefined) this.deviceID = data.deviceID; + if (data.deviceType !== undefined) this.deviceType = data.deviceType; + if (data.deviceName !== undefined) this.deviceName = data.deviceName; + if (data.pipelineCacheUUID !== undefined) this.pipelineCacheUUID = data.pipelineCacheUUID; + if (data.limits !== undefined) this.limits = data.limits; + if (data.sparseProperties !== undefined) this.sparseProperties = data.sparseProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get apiVersion(): number { + return this.#view.getUint32(0, LE); + } + + set apiVersion(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get driverVersion(): number { + return this.#view.getUint32(4, LE); + } + + set driverVersion(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get vendorID(): number { + return this.#view.getUint32(8, LE); + } + + set vendorID(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get deviceID(): number { + return this.#view.getUint32(12, LE); + } + + set deviceID(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get deviceType(): number { + return this.#view.getUint32(16, LE); + } + + set deviceType(value: PhysicalDeviceType) { + this.#view.setUint32(16, Number(value), LE); + } + + get deviceName(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); + } + + set deviceName(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } + + get pipelineCacheUUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 16); + } + + set pipelineCacheUUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 276); + } + + get limits(): PhysicalDeviceLimits { + return new PhysicalDeviceLimits(this.#data.subarray(296, 296 + PhysicalDeviceLimits.size)); + } + + set limits(value: PhysicalDeviceLimits) { + if (value[BUFFER].byteLength < PhysicalDeviceLimits.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 296); + } + + get sparseProperties(): PhysicalDeviceSparseProperties { + return new PhysicalDeviceSparseProperties(this.#data.subarray(768, 768 + PhysicalDeviceSparseProperties.size)); + } + + set sparseProperties(value: PhysicalDeviceSparseProperties) { + if (value[BUFFER].byteLength < PhysicalDeviceSparseProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 768); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceProperties2.ts b/api/struct/PhysicalDeviceProperties2.ts new file mode 100644 index 0000000..8eb979e --- /dev/null +++ b/api/struct/PhysicalDeviceProperties2.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PhysicalDeviceProperties} from "./PhysicalDeviceProperties.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceProperties2 { + pNext?: AnyPointer; + properties?: PhysicalDeviceProperties; +} + +export class PhysicalDeviceProperties2 implements BaseStruct { + static size = 536; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceProperties2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProperties2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceProperties2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.properties !== undefined) this.properties = data.properties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProperties2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PROPERTIES_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get properties(): PhysicalDeviceProperties { + return new PhysicalDeviceProperties(this.#data.subarray(16, 16 + PhysicalDeviceProperties.size)); + } + + set properties(value: PhysicalDeviceProperties) { + if (value[BUFFER].byteLength < PhysicalDeviceProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceProperties2KHR.ts b/api/struct/PhysicalDeviceProperties2KHR.ts new file mode 100644 index 0000000..4495b95 --- /dev/null +++ b/api/struct/PhysicalDeviceProperties2KHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceProperties2 } from "./PhysicalDeviceProperties2.ts"; + export type PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceProtectedMemoryFeatures.ts b/api/struct/PhysicalDeviceProtectedMemoryFeatures.ts new file mode 100644 index 0000000..cb6bb2f --- /dev/null +++ b/api/struct/PhysicalDeviceProtectedMemoryFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceProtectedMemoryFeatures { + pNext?: AnyPointer; + protectedMemory?: Bool32; +} + +export class PhysicalDeviceProtectedMemoryFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceProtectedMemoryFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProtectedMemoryFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceProtectedMemoryFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.protectedMemory !== undefined) this.protectedMemory = data.protectedMemory; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProtectedMemoryFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get protectedMemory(): number { + return this.#view.getUint32(16, LE); + } + + set protectedMemory(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceProtectedMemoryProperties.ts b/api/struct/PhysicalDeviceProtectedMemoryProperties.ts new file mode 100644 index 0000000..c7a8dd4 --- /dev/null +++ b/api/struct/PhysicalDeviceProtectedMemoryProperties.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceProtectedMemoryProperties { + pNext?: AnyPointer; + protectedNoFault?: Bool32; +} + +export class PhysicalDeviceProtectedMemoryProperties implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceProtectedMemoryProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProtectedMemoryProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceProtectedMemoryProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.protectedNoFault !== undefined) this.protectedNoFault = data.protectedNoFault; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProtectedMemoryProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get protectedNoFault(): number { + return this.#view.getUint32(16, LE); + } + + set protectedNoFault(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceProvokingVertexFeaturesEXT.ts b/api/struct/PhysicalDeviceProvokingVertexFeaturesEXT.ts new file mode 100644 index 0000000..dbd7816 --- /dev/null +++ b/api/struct/PhysicalDeviceProvokingVertexFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceProvokingVertexFeaturesEXT { + pNext?: AnyPointer; + provokingVertexLast?: Bool32; + transformFeedbackPreservesProvokingVertex?: Bool32; +} + +export class PhysicalDeviceProvokingVertexFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceProvokingVertexFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProvokingVertexFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceProvokingVertexFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceProvokingVertexFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceProvokingVertexFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.provokingVertexLast !== undefined) this.provokingVertexLast = data.provokingVertexLast; + if (data.transformFeedbackPreservesProvokingVertex !== undefined) this.transformFeedbackPreservesProvokingVertex = data.transformFeedbackPreservesProvokingVertex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProvokingVertexFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get provokingVertexLast(): number { + return this.#view.getUint32(16, LE); + } + + set provokingVertexLast(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get transformFeedbackPreservesProvokingVertex(): number { + return this.#view.getUint32(20, LE); + } + + set transformFeedbackPreservesProvokingVertex(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceProvokingVertexPropertiesEXT.ts b/api/struct/PhysicalDeviceProvokingVertexPropertiesEXT.ts new file mode 100644 index 0000000..20c1703 --- /dev/null +++ b/api/struct/PhysicalDeviceProvokingVertexPropertiesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceProvokingVertexPropertiesEXT { + pNext?: AnyPointer; + provokingVertexModePerPipeline?: Bool32; + transformFeedbackPreservesTriangleFanProvokingVertex?: Bool32; +} + +export class PhysicalDeviceProvokingVertexPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceProvokingVertexPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProvokingVertexPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceProvokingVertexPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceProvokingVertexPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceProvokingVertexPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.provokingVertexModePerPipeline !== undefined) this.provokingVertexModePerPipeline = data.provokingVertexModePerPipeline; + if (data.transformFeedbackPreservesTriangleFanProvokingVertex !== undefined) this.transformFeedbackPreservesTriangleFanProvokingVertex = data.transformFeedbackPreservesTriangleFanProvokingVertex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProvokingVertexPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get provokingVertexModePerPipeline(): number { + return this.#view.getUint32(16, LE); + } + + set provokingVertexModePerPipeline(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get transformFeedbackPreservesTriangleFanProvokingVertex(): number { + return this.#view.getUint32(20, LE); + } + + set transformFeedbackPreservesTriangleFanProvokingVertex(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDevicePushDescriptorPropertiesKHR.ts b/api/struct/PhysicalDevicePushDescriptorPropertiesKHR.ts new file mode 100644 index 0000000..fcf3a4d --- /dev/null +++ b/api/struct/PhysicalDevicePushDescriptorPropertiesKHR.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDevicePushDescriptorPropertiesKHR { + pNext?: AnyPointer; + maxPushDescriptors?: number; +} + +export class PhysicalDevicePushDescriptorPropertiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDevicePushDescriptorPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePushDescriptorPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDevicePushDescriptorPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDevicePushDescriptorPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDevicePushDescriptorPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxPushDescriptors !== undefined) this.maxPushDescriptors = data.maxPushDescriptors; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePushDescriptorPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxPushDescriptors(): number { + return this.#view.getUint32(16, LE); + } + + set maxPushDescriptors(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRGBA10X6FormatsFeaturesEXT.ts b/api/struct/PhysicalDeviceRGBA10X6FormatsFeaturesEXT.ts new file mode 100644 index 0000000..e5944e6 --- /dev/null +++ b/api/struct/PhysicalDeviceRGBA10X6FormatsFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceRGBA10X6FormatsFeaturesEXT { + pNext?: AnyPointer; + formatRgba10x6WithoutYCbCrSampler?: Bool32; +} + +export class PhysicalDeviceRGBA10X6FormatsFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRGBA10X6FormatsFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRGBA10X6FormatsFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.formatRgba10x6WithoutYCbCrSampler !== undefined) this.formatRgba10x6WithoutYCbCrSampler = data.formatRgba10x6WithoutYCbCrSampler; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get formatRgba10x6WithoutYCbCrSampler(): number { + return this.#view.getUint32(16, LE); + } + + set formatRgba10x6WithoutYCbCrSampler(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM.ts b/api/struct/PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM.ts new file mode 100644 index 0000000..4805fd5 --- /dev/null +++ b/api/struct/PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT } from "./PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.ts"; + export type PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.ts b/api/struct/PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.ts new file mode 100644 index 0000000..e6f886d --- /dev/null +++ b/api/struct/PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT { + pNext?: AnyPointer; + rasterizationOrderColorAttachmentAccess?: Bool32; + rasterizationOrderDepthAttachmentAccess?: Bool32; + rasterizationOrderStencilAttachmentAccess?: Bool32; +} + +export class PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.rasterizationOrderColorAttachmentAccess !== undefined) this.rasterizationOrderColorAttachmentAccess = data.rasterizationOrderColorAttachmentAccess; + if (data.rasterizationOrderDepthAttachmentAccess !== undefined) this.rasterizationOrderDepthAttachmentAccess = data.rasterizationOrderDepthAttachmentAccess; + if (data.rasterizationOrderStencilAttachmentAccess !== undefined) this.rasterizationOrderStencilAttachmentAccess = data.rasterizationOrderStencilAttachmentAccess; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get rasterizationOrderColorAttachmentAccess(): number { + return this.#view.getUint32(16, LE); + } + + set rasterizationOrderColorAttachmentAccess(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get rasterizationOrderDepthAttachmentAccess(): number { + return this.#view.getUint32(20, LE); + } + + set rasterizationOrderDepthAttachmentAccess(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get rasterizationOrderStencilAttachmentAccess(): number { + return this.#view.getUint32(24, LE); + } + + set rasterizationOrderStencilAttachmentAccess(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRayQueryFeaturesKHR.ts b/api/struct/PhysicalDeviceRayQueryFeaturesKHR.ts new file mode 100644 index 0000000..994378b --- /dev/null +++ b/api/struct/PhysicalDeviceRayQueryFeaturesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceRayQueryFeaturesKHR { + pNext?: AnyPointer; + rayQuery?: Bool32; +} + +export class PhysicalDeviceRayQueryFeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRayQueryFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayQueryFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRayQueryFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRayQueryFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRayQueryFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.rayQuery !== undefined) this.rayQuery = data.rayQuery; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayQueryFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get rayQuery(): number { + return this.#view.getUint32(16, LE); + } + + set rayQuery(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRayTracingInvocationReorderFeaturesNV.ts b/api/struct/PhysicalDeviceRayTracingInvocationReorderFeaturesNV.ts new file mode 100644 index 0000000..d893711 --- /dev/null +++ b/api/struct/PhysicalDeviceRayTracingInvocationReorderFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceRayTracingInvocationReorderFeaturesNV { + pNext?: AnyPointer; + rayTracingInvocationReorder?: Bool32; +} + +export class PhysicalDeviceRayTracingInvocationReorderFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRayTracingInvocationReorderFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingInvocationReorderFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.rayTracingInvocationReorder !== undefined) this.rayTracingInvocationReorder = data.rayTracingInvocationReorder; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get rayTracingInvocationReorder(): number { + return this.#view.getUint32(16, LE); + } + + set rayTracingInvocationReorder(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRayTracingInvocationReorderPropertiesNV.ts b/api/struct/PhysicalDeviceRayTracingInvocationReorderPropertiesNV.ts new file mode 100644 index 0000000..7f98d41 --- /dev/null +++ b/api/struct/PhysicalDeviceRayTracingInvocationReorderPropertiesNV.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, RayTracingInvocationReorderModeNV } from "../enum.ts"; + +export interface InitPhysicalDeviceRayTracingInvocationReorderPropertiesNV { + pNext?: AnyPointer; + rayTracingInvocationReorderReorderingHint?: RayTracingInvocationReorderModeNV; +} + +export class PhysicalDeviceRayTracingInvocationReorderPropertiesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRayTracingInvocationReorderPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingInvocationReorderPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.rayTracingInvocationReorderReorderingHint !== undefined) this.rayTracingInvocationReorderReorderingHint = data.rayTracingInvocationReorderReorderingHint; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get rayTracingInvocationReorderReorderingHint(): number { + return this.#view.getUint32(16, LE); + } + + set rayTracingInvocationReorderReorderingHint(value: RayTracingInvocationReorderModeNV) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRayTracingMaintenance1FeaturesKHR.ts b/api/struct/PhysicalDeviceRayTracingMaintenance1FeaturesKHR.ts new file mode 100644 index 0000000..50cc4cf --- /dev/null +++ b/api/struct/PhysicalDeviceRayTracingMaintenance1FeaturesKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceRayTracingMaintenance1FeaturesKHR { + pNext?: AnyPointer; + rayTracingMaintenance1?: Bool32; + rayTracingPipelineTraceRaysIndirect2?: Bool32; +} + +export class PhysicalDeviceRayTracingMaintenance1FeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRayTracingMaintenance1FeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingMaintenance1FeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.rayTracingMaintenance1 !== undefined) this.rayTracingMaintenance1 = data.rayTracingMaintenance1; + if (data.rayTracingPipelineTraceRaysIndirect2 !== undefined) this.rayTracingPipelineTraceRaysIndirect2 = data.rayTracingPipelineTraceRaysIndirect2; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get rayTracingMaintenance1(): number { + return this.#view.getUint32(16, LE); + } + + set rayTracingMaintenance1(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get rayTracingPipelineTraceRaysIndirect2(): number { + return this.#view.getUint32(20, LE); + } + + set rayTracingPipelineTraceRaysIndirect2(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRayTracingMotionBlurFeaturesNV.ts b/api/struct/PhysicalDeviceRayTracingMotionBlurFeaturesNV.ts new file mode 100644 index 0000000..5c38a22 --- /dev/null +++ b/api/struct/PhysicalDeviceRayTracingMotionBlurFeaturesNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceRayTracingMotionBlurFeaturesNV { + pNext?: AnyPointer; + rayTracingMotionBlur?: Bool32; + rayTracingMotionBlurPipelineTraceRaysIndirect?: Bool32; +} + +export class PhysicalDeviceRayTracingMotionBlurFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRayTracingMotionBlurFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingMotionBlurFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingMotionBlurFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRayTracingMotionBlurFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingMotionBlurFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.rayTracingMotionBlur !== undefined) this.rayTracingMotionBlur = data.rayTracingMotionBlur; + if (data.rayTracingMotionBlurPipelineTraceRaysIndirect !== undefined) this.rayTracingMotionBlurPipelineTraceRaysIndirect = data.rayTracingMotionBlurPipelineTraceRaysIndirect; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingMotionBlurFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get rayTracingMotionBlur(): number { + return this.#view.getUint32(16, LE); + } + + set rayTracingMotionBlur(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get rayTracingMotionBlurPipelineTraceRaysIndirect(): number { + return this.#view.getUint32(20, LE); + } + + set rayTracingMotionBlurPipelineTraceRaysIndirect(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRayTracingPipelineFeaturesKHR.ts b/api/struct/PhysicalDeviceRayTracingPipelineFeaturesKHR.ts new file mode 100644 index 0000000..9a8ced1 --- /dev/null +++ b/api/struct/PhysicalDeviceRayTracingPipelineFeaturesKHR.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceRayTracingPipelineFeaturesKHR { + pNext?: AnyPointer; + rayTracingPipeline?: Bool32; + rayTracingPipelineShaderGroupHandleCaptureReplay?: Bool32; + rayTracingPipelineShaderGroupHandleCaptureReplayMixed?: Bool32; + rayTracingPipelineTraceRaysIndirect?: Bool32; + rayTraversalPrimitiveCulling?: Bool32; +} + +export class PhysicalDeviceRayTracingPipelineFeaturesKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRayTracingPipelineFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingPipelineFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelineFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRayTracingPipelineFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelineFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.rayTracingPipeline !== undefined) this.rayTracingPipeline = data.rayTracingPipeline; + if (data.rayTracingPipelineShaderGroupHandleCaptureReplay !== undefined) this.rayTracingPipelineShaderGroupHandleCaptureReplay = data.rayTracingPipelineShaderGroupHandleCaptureReplay; + if (data.rayTracingPipelineShaderGroupHandleCaptureReplayMixed !== undefined) this.rayTracingPipelineShaderGroupHandleCaptureReplayMixed = data.rayTracingPipelineShaderGroupHandleCaptureReplayMixed; + if (data.rayTracingPipelineTraceRaysIndirect !== undefined) this.rayTracingPipelineTraceRaysIndirect = data.rayTracingPipelineTraceRaysIndirect; + if (data.rayTraversalPrimitiveCulling !== undefined) this.rayTraversalPrimitiveCulling = data.rayTraversalPrimitiveCulling; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingPipelineFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get rayTracingPipeline(): number { + return this.#view.getUint32(16, LE); + } + + set rayTracingPipeline(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get rayTracingPipelineShaderGroupHandleCaptureReplay(): number { + return this.#view.getUint32(20, LE); + } + + set rayTracingPipelineShaderGroupHandleCaptureReplay(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get rayTracingPipelineShaderGroupHandleCaptureReplayMixed(): number { + return this.#view.getUint32(24, LE); + } + + set rayTracingPipelineShaderGroupHandleCaptureReplayMixed(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get rayTracingPipelineTraceRaysIndirect(): number { + return this.#view.getUint32(28, LE); + } + + set rayTracingPipelineTraceRaysIndirect(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get rayTraversalPrimitiveCulling(): number { + return this.#view.getUint32(32, LE); + } + + set rayTraversalPrimitiveCulling(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRayTracingPipelinePropertiesKHR.ts b/api/struct/PhysicalDeviceRayTracingPipelinePropertiesKHR.ts new file mode 100644 index 0000000..8fad131 --- /dev/null +++ b/api/struct/PhysicalDeviceRayTracingPipelinePropertiesKHR.ts @@ -0,0 +1,149 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceRayTracingPipelinePropertiesKHR { + pNext?: AnyPointer; + shaderGroupHandleSize?: number; + maxRayRecursionDepth?: number; + maxShaderGroupStride?: number; + shaderGroupBaseAlignment?: number; + shaderGroupHandleCaptureReplaySize?: number; + maxRayDispatchInvocationCount?: number; + shaderGroupHandleAlignment?: number; + maxRayHitAttributeSize?: number; +} + +export class PhysicalDeviceRayTracingPipelinePropertiesKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRayTracingPipelinePropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingPipelinePropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelinePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRayTracingPipelinePropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelinePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderGroupHandleSize !== undefined) this.shaderGroupHandleSize = data.shaderGroupHandleSize; + if (data.maxRayRecursionDepth !== undefined) this.maxRayRecursionDepth = data.maxRayRecursionDepth; + if (data.maxShaderGroupStride !== undefined) this.maxShaderGroupStride = data.maxShaderGroupStride; + if (data.shaderGroupBaseAlignment !== undefined) this.shaderGroupBaseAlignment = data.shaderGroupBaseAlignment; + if (data.shaderGroupHandleCaptureReplaySize !== undefined) this.shaderGroupHandleCaptureReplaySize = data.shaderGroupHandleCaptureReplaySize; + if (data.maxRayDispatchInvocationCount !== undefined) this.maxRayDispatchInvocationCount = data.maxRayDispatchInvocationCount; + if (data.shaderGroupHandleAlignment !== undefined) this.shaderGroupHandleAlignment = data.shaderGroupHandleAlignment; + if (data.maxRayHitAttributeSize !== undefined) this.maxRayHitAttributeSize = data.maxRayHitAttributeSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingPipelinePropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderGroupHandleSize(): number { + return this.#view.getUint32(16, LE); + } + + set shaderGroupHandleSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxRayRecursionDepth(): number { + return this.#view.getUint32(20, LE); + } + + set maxRayRecursionDepth(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxShaderGroupStride(): number { + return this.#view.getUint32(24, LE); + } + + set maxShaderGroupStride(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get shaderGroupBaseAlignment(): number { + return this.#view.getUint32(28, LE); + } + + set shaderGroupBaseAlignment(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get shaderGroupHandleCaptureReplaySize(): number { + return this.#view.getUint32(32, LE); + } + + set shaderGroupHandleCaptureReplaySize(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get maxRayDispatchInvocationCount(): number { + return this.#view.getUint32(36, LE); + } + + set maxRayDispatchInvocationCount(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get shaderGroupHandleAlignment(): number { + return this.#view.getUint32(40, LE); + } + + set shaderGroupHandleAlignment(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get maxRayHitAttributeSize(): number { + return this.#view.getUint32(44, LE); + } + + set maxRayHitAttributeSize(value: number) { + this.#view.setUint32(44, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRayTracingPropertiesNV.ts b/api/struct/PhysicalDeviceRayTracingPropertiesNV.ts new file mode 100644 index 0000000..957d79d --- /dev/null +++ b/api/struct/PhysicalDeviceRayTracingPropertiesNV.ts @@ -0,0 +1,149 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceRayTracingPropertiesNV { + pNext?: AnyPointer; + shaderGroupHandleSize?: number; + maxRecursionDepth?: number; + maxShaderGroupStride?: number; + shaderGroupBaseAlignment?: number; + maxGeometryCount?: number | bigint; + maxInstanceCount?: number | bigint; + maxTriangleCount?: number | bigint; + maxDescriptorSetAccelerationStructures?: number; +} + +export class PhysicalDeviceRayTracingPropertiesNV implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRayTracingPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRayTracingPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRayTracingPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderGroupHandleSize !== undefined) this.shaderGroupHandleSize = data.shaderGroupHandleSize; + if (data.maxRecursionDepth !== undefined) this.maxRecursionDepth = data.maxRecursionDepth; + if (data.maxShaderGroupStride !== undefined) this.maxShaderGroupStride = data.maxShaderGroupStride; + if (data.shaderGroupBaseAlignment !== undefined) this.shaderGroupBaseAlignment = data.shaderGroupBaseAlignment; + if (data.maxGeometryCount !== undefined) this.maxGeometryCount = data.maxGeometryCount; + if (data.maxInstanceCount !== undefined) this.maxInstanceCount = data.maxInstanceCount; + if (data.maxTriangleCount !== undefined) this.maxTriangleCount = data.maxTriangleCount; + if (data.maxDescriptorSetAccelerationStructures !== undefined) this.maxDescriptorSetAccelerationStructures = data.maxDescriptorSetAccelerationStructures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderGroupHandleSize(): number { + return this.#view.getUint32(16, LE); + } + + set shaderGroupHandleSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxRecursionDepth(): number { + return this.#view.getUint32(20, LE); + } + + set maxRecursionDepth(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxShaderGroupStride(): number { + return this.#view.getUint32(24, LE); + } + + set maxShaderGroupStride(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get shaderGroupBaseAlignment(): number { + return this.#view.getUint32(28, LE); + } + + set shaderGroupBaseAlignment(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get maxGeometryCount(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set maxGeometryCount(value: number | bigint) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get maxInstanceCount(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set maxInstanceCount(value: number | bigint) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get maxTriangleCount(): bigint { + return this.#view.getBigUint64(48, LE); + } + + set maxTriangleCount(value: number | bigint) { + this.#view.setBigUint64(48, BigInt(value), LE); + } + + get maxDescriptorSetAccelerationStructures(): number { + return this.#view.getUint32(56, LE); + } + + set maxDescriptorSetAccelerationStructures(value: number) { + this.#view.setUint32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRepresentativeFragmentTestFeaturesNV.ts b/api/struct/PhysicalDeviceRepresentativeFragmentTestFeaturesNV.ts new file mode 100644 index 0000000..814f852 --- /dev/null +++ b/api/struct/PhysicalDeviceRepresentativeFragmentTestFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceRepresentativeFragmentTestFeaturesNV { + pNext?: AnyPointer; + representativeFragmentTest?: Bool32; +} + +export class PhysicalDeviceRepresentativeFragmentTestFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRepresentativeFragmentTestFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRepresentativeFragmentTestFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.representativeFragmentTest !== undefined) this.representativeFragmentTest = data.representativeFragmentTest; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get representativeFragmentTest(): number { + return this.#view.getUint32(16, LE); + } + + set representativeFragmentTest(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRobustness2FeaturesEXT.ts b/api/struct/PhysicalDeviceRobustness2FeaturesEXT.ts new file mode 100644 index 0000000..32ead2d --- /dev/null +++ b/api/struct/PhysicalDeviceRobustness2FeaturesEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceRobustness2FeaturesEXT { + pNext?: AnyPointer; + robustBufferAccess2?: Bool32; + robustImageAccess2?: Bool32; + nullDescriptor?: Bool32; +} + +export class PhysicalDeviceRobustness2FeaturesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRobustness2FeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRobustness2FeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRobustness2FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRobustness2FeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRobustness2FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.robustBufferAccess2 !== undefined) this.robustBufferAccess2 = data.robustBufferAccess2; + if (data.robustImageAccess2 !== undefined) this.robustImageAccess2 = data.robustImageAccess2; + if (data.nullDescriptor !== undefined) this.nullDescriptor = data.nullDescriptor; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRobustness2FeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get robustBufferAccess2(): number { + return this.#view.getUint32(16, LE); + } + + set robustBufferAccess2(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get robustImageAccess2(): number { + return this.#view.getUint32(20, LE); + } + + set robustImageAccess2(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get nullDescriptor(): number { + return this.#view.getUint32(24, LE); + } + + set nullDescriptor(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceRobustness2PropertiesEXT.ts b/api/struct/PhysicalDeviceRobustness2PropertiesEXT.ts new file mode 100644 index 0000000..244445c --- /dev/null +++ b/api/struct/PhysicalDeviceRobustness2PropertiesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitPhysicalDeviceRobustness2PropertiesEXT { + pNext?: AnyPointer; + robustStorageBufferAccessSizeAlignment?: DeviceSize; + robustUniformBufferAccessSizeAlignment?: DeviceSize; +} + +export class PhysicalDeviceRobustness2PropertiesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceRobustness2PropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRobustness2PropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceRobustness2PropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceRobustness2PropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceRobustness2PropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.robustStorageBufferAccessSizeAlignment !== undefined) this.robustStorageBufferAccessSizeAlignment = data.robustStorageBufferAccessSizeAlignment; + if (data.robustUniformBufferAccessSizeAlignment !== undefined) this.robustUniformBufferAccessSizeAlignment = data.robustUniformBufferAccessSizeAlignment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRobustness2PropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get robustStorageBufferAccessSizeAlignment(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set robustStorageBufferAccessSizeAlignment(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get robustUniformBufferAccessSizeAlignment(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set robustUniformBufferAccessSizeAlignment(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSampleLocationsPropertiesEXT.ts b/api/struct/PhysicalDeviceSampleLocationsPropertiesEXT.ts new file mode 100644 index 0000000..640d005 --- /dev/null +++ b/api/struct/PhysicalDeviceSampleLocationsPropertiesEXT.ts @@ -0,0 +1,124 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; +import { SampleCountFlags, Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSampleLocationsPropertiesEXT { + pNext?: AnyPointer; + sampleLocationSampleCounts?: SampleCountFlags; + maxSampleLocationGridSize?: Extent2D; + sampleLocationCoordinateRange?: Float32Array; + sampleLocationSubPixelBits?: number; + variableSampleLocations?: Bool32; +} + +export class PhysicalDeviceSampleLocationsPropertiesEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSampleLocationsPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSampleLocationsPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSampleLocationsPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSampleLocationsPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSampleLocationsPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.sampleLocationSampleCounts !== undefined) this.sampleLocationSampleCounts = data.sampleLocationSampleCounts; + if (data.maxSampleLocationGridSize !== undefined) this.maxSampleLocationGridSize = data.maxSampleLocationGridSize; + if (data.sampleLocationCoordinateRange !== undefined) this.sampleLocationCoordinateRange = data.sampleLocationCoordinateRange; + if (data.sampleLocationSubPixelBits !== undefined) this.sampleLocationSubPixelBits = data.sampleLocationSubPixelBits; + if (data.variableSampleLocations !== undefined) this.variableSampleLocations = data.variableSampleLocations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSampleLocationsPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get sampleLocationSampleCounts(): number { + return this.#view.getUint32(16, LE); + } + + set sampleLocationSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxSampleLocationGridSize(): Extent2D { + return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); + } + + set maxSampleLocationGridSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } + + get sampleLocationCoordinateRange(): Float32Array { + return new Float32Array(this.#data.buffer, this.#data.byteOffset + 28, 2); + } + + set sampleLocationCoordinateRange(value: Float32Array) { + this.#data.set(new Uint8Array(value.buffer), 28); + } + + get sampleLocationSubPixelBits(): number { + return this.#view.getUint32(36, LE); + } + + set sampleLocationSubPixelBits(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get variableSampleLocations(): number { + return this.#view.getUint32(40, LE); + } + + set variableSampleLocations(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSamplerFilterMinmaxProperties.ts b/api/struct/PhysicalDeviceSamplerFilterMinmaxProperties.ts new file mode 100644 index 0000000..351a658 --- /dev/null +++ b/api/struct/PhysicalDeviceSamplerFilterMinmaxProperties.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSamplerFilterMinmaxProperties { + pNext?: AnyPointer; + filterMinmaxSingleComponentFormats?: Bool32; + filterMinmaxImageComponentMapping?: Bool32; +} + +export class PhysicalDeviceSamplerFilterMinmaxProperties implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSamplerFilterMinmaxProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSamplerFilterMinmaxProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSamplerFilterMinmaxProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSamplerFilterMinmaxProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSamplerFilterMinmaxProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.filterMinmaxSingleComponentFormats !== undefined) this.filterMinmaxSingleComponentFormats = data.filterMinmaxSingleComponentFormats; + if (data.filterMinmaxImageComponentMapping !== undefined) this.filterMinmaxImageComponentMapping = data.filterMinmaxImageComponentMapping; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSamplerFilterMinmaxProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get filterMinmaxSingleComponentFormats(): number { + return this.#view.getUint32(16, LE); + } + + set filterMinmaxSingleComponentFormats(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get filterMinmaxImageComponentMapping(): number { + return this.#view.getUint32(20, LE); + } + + set filterMinmaxImageComponentMapping(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSamplerFilterMinmaxPropertiesEXT.ts b/api/struct/PhysicalDeviceSamplerFilterMinmaxPropertiesEXT.ts new file mode 100644 index 0000000..4c2e466 --- /dev/null +++ b/api/struct/PhysicalDeviceSamplerFilterMinmaxPropertiesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceSamplerFilterMinmaxProperties } from "./PhysicalDeviceSamplerFilterMinmaxProperties.ts"; + export type PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSamplerYcbcrConversionFeatures.ts b/api/struct/PhysicalDeviceSamplerYcbcrConversionFeatures.ts new file mode 100644 index 0000000..aa7cfa0 --- /dev/null +++ b/api/struct/PhysicalDeviceSamplerYcbcrConversionFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSamplerYcbcrConversionFeatures { + pNext?: AnyPointer; + samplerYcbcrConversion?: Bool32; +} + +export class PhysicalDeviceSamplerYcbcrConversionFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSamplerYcbcrConversionFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSamplerYcbcrConversionFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSamplerYcbcrConversionFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSamplerYcbcrConversionFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSamplerYcbcrConversionFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.samplerYcbcrConversion !== undefined) this.samplerYcbcrConversion = data.samplerYcbcrConversion; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSamplerYcbcrConversionFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get samplerYcbcrConversion(): number { + return this.#view.getUint32(16, LE); + } + + set samplerYcbcrConversion(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSamplerYcbcrConversionFeaturesKHR.ts b/api/struct/PhysicalDeviceSamplerYcbcrConversionFeaturesKHR.ts new file mode 100644 index 0000000..d12f194 --- /dev/null +++ b/api/struct/PhysicalDeviceSamplerYcbcrConversionFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceSamplerYcbcrConversionFeatures } from "./PhysicalDeviceSamplerYcbcrConversionFeatures.ts"; + export type PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceScalarBlockLayoutFeatures.ts b/api/struct/PhysicalDeviceScalarBlockLayoutFeatures.ts new file mode 100644 index 0000000..f6aab33 --- /dev/null +++ b/api/struct/PhysicalDeviceScalarBlockLayoutFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceScalarBlockLayoutFeatures { + pNext?: AnyPointer; + scalarBlockLayout?: Bool32; +} + +export class PhysicalDeviceScalarBlockLayoutFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceScalarBlockLayoutFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceScalarBlockLayoutFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceScalarBlockLayoutFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceScalarBlockLayoutFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceScalarBlockLayoutFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.scalarBlockLayout !== undefined) this.scalarBlockLayout = data.scalarBlockLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceScalarBlockLayoutFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get scalarBlockLayout(): number { + return this.#view.getUint32(16, LE); + } + + set scalarBlockLayout(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceScalarBlockLayoutFeaturesEXT.ts b/api/struct/PhysicalDeviceScalarBlockLayoutFeaturesEXT.ts new file mode 100644 index 0000000..305c1f7 --- /dev/null +++ b/api/struct/PhysicalDeviceScalarBlockLayoutFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceScalarBlockLayoutFeatures } from "./PhysicalDeviceScalarBlockLayoutFeatures.ts"; + export type PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSeparateDepthStencilLayoutsFeatures.ts b/api/struct/PhysicalDeviceSeparateDepthStencilLayoutsFeatures.ts new file mode 100644 index 0000000..78ae05b --- /dev/null +++ b/api/struct/PhysicalDeviceSeparateDepthStencilLayoutsFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSeparateDepthStencilLayoutsFeatures { + pNext?: AnyPointer; + separateDepthStencilLayouts?: Bool32; +} + +export class PhysicalDeviceSeparateDepthStencilLayoutsFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSeparateDepthStencilLayoutsFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSeparateDepthStencilLayoutsFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.separateDepthStencilLayouts !== undefined) this.separateDepthStencilLayouts = data.separateDepthStencilLayouts; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get separateDepthStencilLayouts(): number { + return this.#view.getUint32(16, LE); + } + + set separateDepthStencilLayouts(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR.ts b/api/struct/PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR.ts new file mode 100644 index 0000000..f23c547 --- /dev/null +++ b/api/struct/PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceSeparateDepthStencilLayoutsFeatures } from "./PhysicalDeviceSeparateDepthStencilLayoutsFeatures.ts"; + export type PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderAtomicFloat2FeaturesEXT.ts b/api/struct/PhysicalDeviceShaderAtomicFloat2FeaturesEXT.ts new file mode 100644 index 0000000..563df63 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderAtomicFloat2FeaturesEXT.ts @@ -0,0 +1,190 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderAtomicFloat2FeaturesEXT { + pNext?: AnyPointer; + shaderBufferFloat16Atomics?: Bool32; + shaderBufferFloat16AtomicAdd?: Bool32; + shaderBufferFloat16AtomicMinMax?: Bool32; + shaderBufferFloat32AtomicMinMax?: Bool32; + shaderBufferFloat64AtomicMinMax?: Bool32; + shaderSharedFloat16Atomics?: Bool32; + shaderSharedFloat16AtomicAdd?: Bool32; + shaderSharedFloat16AtomicMinMax?: Bool32; + shaderSharedFloat32AtomicMinMax?: Bool32; + shaderSharedFloat64AtomicMinMax?: Bool32; + shaderImageFloat32AtomicMinMax?: Bool32; + sparseImageFloat32AtomicMinMax?: Bool32; +} + +export class PhysicalDeviceShaderAtomicFloat2FeaturesEXT implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderAtomicFloat2FeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderAtomicFloat2FeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderBufferFloat16Atomics !== undefined) this.shaderBufferFloat16Atomics = data.shaderBufferFloat16Atomics; + if (data.shaderBufferFloat16AtomicAdd !== undefined) this.shaderBufferFloat16AtomicAdd = data.shaderBufferFloat16AtomicAdd; + if (data.shaderBufferFloat16AtomicMinMax !== undefined) this.shaderBufferFloat16AtomicMinMax = data.shaderBufferFloat16AtomicMinMax; + if (data.shaderBufferFloat32AtomicMinMax !== undefined) this.shaderBufferFloat32AtomicMinMax = data.shaderBufferFloat32AtomicMinMax; + if (data.shaderBufferFloat64AtomicMinMax !== undefined) this.shaderBufferFloat64AtomicMinMax = data.shaderBufferFloat64AtomicMinMax; + if (data.shaderSharedFloat16Atomics !== undefined) this.shaderSharedFloat16Atomics = data.shaderSharedFloat16Atomics; + if (data.shaderSharedFloat16AtomicAdd !== undefined) this.shaderSharedFloat16AtomicAdd = data.shaderSharedFloat16AtomicAdd; + if (data.shaderSharedFloat16AtomicMinMax !== undefined) this.shaderSharedFloat16AtomicMinMax = data.shaderSharedFloat16AtomicMinMax; + if (data.shaderSharedFloat32AtomicMinMax !== undefined) this.shaderSharedFloat32AtomicMinMax = data.shaderSharedFloat32AtomicMinMax; + if (data.shaderSharedFloat64AtomicMinMax !== undefined) this.shaderSharedFloat64AtomicMinMax = data.shaderSharedFloat64AtomicMinMax; + if (data.shaderImageFloat32AtomicMinMax !== undefined) this.shaderImageFloat32AtomicMinMax = data.shaderImageFloat32AtomicMinMax; + if (data.sparseImageFloat32AtomicMinMax !== undefined) this.sparseImageFloat32AtomicMinMax = data.sparseImageFloat32AtomicMinMax; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderBufferFloat16Atomics(): number { + return this.#view.getUint32(16, LE); + } + + set shaderBufferFloat16Atomics(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get shaderBufferFloat16AtomicAdd(): number { + return this.#view.getUint32(20, LE); + } + + set shaderBufferFloat16AtomicAdd(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get shaderBufferFloat16AtomicMinMax(): number { + return this.#view.getUint32(24, LE); + } + + set shaderBufferFloat16AtomicMinMax(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get shaderBufferFloat32AtomicMinMax(): number { + return this.#view.getUint32(28, LE); + } + + set shaderBufferFloat32AtomicMinMax(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get shaderBufferFloat64AtomicMinMax(): number { + return this.#view.getUint32(32, LE); + } + + set shaderBufferFloat64AtomicMinMax(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get shaderSharedFloat16Atomics(): number { + return this.#view.getUint32(36, LE); + } + + set shaderSharedFloat16Atomics(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get shaderSharedFloat16AtomicAdd(): number { + return this.#view.getUint32(40, LE); + } + + set shaderSharedFloat16AtomicAdd(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get shaderSharedFloat16AtomicMinMax(): number { + return this.#view.getUint32(44, LE); + } + + set shaderSharedFloat16AtomicMinMax(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get shaderSharedFloat32AtomicMinMax(): number { + return this.#view.getUint32(48, LE); + } + + set shaderSharedFloat32AtomicMinMax(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get shaderSharedFloat64AtomicMinMax(): number { + return this.#view.getUint32(52, LE); + } + + set shaderSharedFloat64AtomicMinMax(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get shaderImageFloat32AtomicMinMax(): number { + return this.#view.getUint32(56, LE); + } + + set shaderImageFloat32AtomicMinMax(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get sparseImageFloat32AtomicMinMax(): number { + return this.#view.getUint32(60, LE); + } + + set sparseImageFloat32AtomicMinMax(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderAtomicFloatFeaturesEXT.ts b/api/struct/PhysicalDeviceShaderAtomicFloatFeaturesEXT.ts new file mode 100644 index 0000000..dc7a064 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderAtomicFloatFeaturesEXT.ts @@ -0,0 +1,190 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderAtomicFloatFeaturesEXT { + pNext?: AnyPointer; + shaderBufferFloat32Atomics?: Bool32; + shaderBufferFloat32AtomicAdd?: Bool32; + shaderBufferFloat64Atomics?: Bool32; + shaderBufferFloat64AtomicAdd?: Bool32; + shaderSharedFloat32Atomics?: Bool32; + shaderSharedFloat32AtomicAdd?: Bool32; + shaderSharedFloat64Atomics?: Bool32; + shaderSharedFloat64AtomicAdd?: Bool32; + shaderImageFloat32Atomics?: Bool32; + shaderImageFloat32AtomicAdd?: Bool32; + sparseImageFloat32Atomics?: Bool32; + sparseImageFloat32AtomicAdd?: Bool32; +} + +export class PhysicalDeviceShaderAtomicFloatFeaturesEXT implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderAtomicFloatFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderAtomicFloatFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloatFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderAtomicFloatFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloatFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderBufferFloat32Atomics !== undefined) this.shaderBufferFloat32Atomics = data.shaderBufferFloat32Atomics; + if (data.shaderBufferFloat32AtomicAdd !== undefined) this.shaderBufferFloat32AtomicAdd = data.shaderBufferFloat32AtomicAdd; + if (data.shaderBufferFloat64Atomics !== undefined) this.shaderBufferFloat64Atomics = data.shaderBufferFloat64Atomics; + if (data.shaderBufferFloat64AtomicAdd !== undefined) this.shaderBufferFloat64AtomicAdd = data.shaderBufferFloat64AtomicAdd; + if (data.shaderSharedFloat32Atomics !== undefined) this.shaderSharedFloat32Atomics = data.shaderSharedFloat32Atomics; + if (data.shaderSharedFloat32AtomicAdd !== undefined) this.shaderSharedFloat32AtomicAdd = data.shaderSharedFloat32AtomicAdd; + if (data.shaderSharedFloat64Atomics !== undefined) this.shaderSharedFloat64Atomics = data.shaderSharedFloat64Atomics; + if (data.shaderSharedFloat64AtomicAdd !== undefined) this.shaderSharedFloat64AtomicAdd = data.shaderSharedFloat64AtomicAdd; + if (data.shaderImageFloat32Atomics !== undefined) this.shaderImageFloat32Atomics = data.shaderImageFloat32Atomics; + if (data.shaderImageFloat32AtomicAdd !== undefined) this.shaderImageFloat32AtomicAdd = data.shaderImageFloat32AtomicAdd; + if (data.sparseImageFloat32Atomics !== undefined) this.sparseImageFloat32Atomics = data.sparseImageFloat32Atomics; + if (data.sparseImageFloat32AtomicAdd !== undefined) this.sparseImageFloat32AtomicAdd = data.sparseImageFloat32AtomicAdd; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderAtomicFloatFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderBufferFloat32Atomics(): number { + return this.#view.getUint32(16, LE); + } + + set shaderBufferFloat32Atomics(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get shaderBufferFloat32AtomicAdd(): number { + return this.#view.getUint32(20, LE); + } + + set shaderBufferFloat32AtomicAdd(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get shaderBufferFloat64Atomics(): number { + return this.#view.getUint32(24, LE); + } + + set shaderBufferFloat64Atomics(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get shaderBufferFloat64AtomicAdd(): number { + return this.#view.getUint32(28, LE); + } + + set shaderBufferFloat64AtomicAdd(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get shaderSharedFloat32Atomics(): number { + return this.#view.getUint32(32, LE); + } + + set shaderSharedFloat32Atomics(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get shaderSharedFloat32AtomicAdd(): number { + return this.#view.getUint32(36, LE); + } + + set shaderSharedFloat32AtomicAdd(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get shaderSharedFloat64Atomics(): number { + return this.#view.getUint32(40, LE); + } + + set shaderSharedFloat64Atomics(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get shaderSharedFloat64AtomicAdd(): number { + return this.#view.getUint32(44, LE); + } + + set shaderSharedFloat64AtomicAdd(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get shaderImageFloat32Atomics(): number { + return this.#view.getUint32(48, LE); + } + + set shaderImageFloat32Atomics(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get shaderImageFloat32AtomicAdd(): number { + return this.#view.getUint32(52, LE); + } + + set shaderImageFloat32AtomicAdd(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get sparseImageFloat32Atomics(): number { + return this.#view.getUint32(56, LE); + } + + set sparseImageFloat32Atomics(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get sparseImageFloat32AtomicAdd(): number { + return this.#view.getUint32(60, LE); + } + + set sparseImageFloat32AtomicAdd(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderAtomicInt64Features.ts b/api/struct/PhysicalDeviceShaderAtomicInt64Features.ts new file mode 100644 index 0000000..2eb5389 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderAtomicInt64Features.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderAtomicInt64Features { + pNext?: AnyPointer; + shaderBufferInt64Atomics?: Bool32; + shaderSharedInt64Atomics?: Bool32; +} + +export class PhysicalDeviceShaderAtomicInt64Features implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderAtomicInt64Features); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderAtomicInt64Features) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderAtomicInt64Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderAtomicInt64Features.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderAtomicInt64Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderBufferInt64Atomics !== undefined) this.shaderBufferInt64Atomics = data.shaderBufferInt64Atomics; + if (data.shaderSharedInt64Atomics !== undefined) this.shaderSharedInt64Atomics = data.shaderSharedInt64Atomics; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderAtomicInt64Features.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderBufferInt64Atomics(): number { + return this.#view.getUint32(16, LE); + } + + set shaderBufferInt64Atomics(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get shaderSharedInt64Atomics(): number { + return this.#view.getUint32(20, LE); + } + + set shaderSharedInt64Atomics(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderAtomicInt64FeaturesKHR.ts b/api/struct/PhysicalDeviceShaderAtomicInt64FeaturesKHR.ts new file mode 100644 index 0000000..9decbf9 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderAtomicInt64FeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceShaderAtomicInt64Features } from "./PhysicalDeviceShaderAtomicInt64Features.ts"; + export type PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderClockFeaturesKHR.ts b/api/struct/PhysicalDeviceShaderClockFeaturesKHR.ts new file mode 100644 index 0000000..621302c --- /dev/null +++ b/api/struct/PhysicalDeviceShaderClockFeaturesKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderClockFeaturesKHR { + pNext?: AnyPointer; + shaderSubgroupClock?: Bool32; + shaderDeviceClock?: Bool32; +} + +export class PhysicalDeviceShaderClockFeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderClockFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderClockFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderClockFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderClockFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderClockFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderSubgroupClock !== undefined) this.shaderSubgroupClock = data.shaderSubgroupClock; + if (data.shaderDeviceClock !== undefined) this.shaderDeviceClock = data.shaderDeviceClock; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderClockFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderSubgroupClock(): number { + return this.#view.getUint32(16, LE); + } + + set shaderSubgroupClock(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get shaderDeviceClock(): number { + return this.#view.getUint32(20, LE); + } + + set shaderDeviceClock(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderCoreBuiltinsFeaturesARM.ts b/api/struct/PhysicalDeviceShaderCoreBuiltinsFeaturesARM.ts new file mode 100644 index 0000000..c3cccf7 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderCoreBuiltinsFeaturesARM.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderCoreBuiltinsFeaturesARM { + pNext?: AnyPointer; + shaderCoreBuiltins?: Bool32; +} + +export class PhysicalDeviceShaderCoreBuiltinsFeaturesARM implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderCoreBuiltinsFeaturesARM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderCoreBuiltinsFeaturesARM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderCoreBuiltins !== undefined) this.shaderCoreBuiltins = data.shaderCoreBuiltins; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderCoreBuiltins(): number { + return this.#view.getUint32(16, LE); + } + + set shaderCoreBuiltins(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderCoreBuiltinsPropertiesARM.ts b/api/struct/PhysicalDeviceShaderCoreBuiltinsPropertiesARM.ts new file mode 100644 index 0000000..5391777 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderCoreBuiltinsPropertiesARM.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceShaderCoreBuiltinsPropertiesARM { + pNext?: AnyPointer; + shaderCoreMask?: number | bigint; + shaderCoreCount?: number; + shaderWarpsPerCore?: number; +} + +export class PhysicalDeviceShaderCoreBuiltinsPropertiesARM implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderCoreBuiltinsPropertiesARM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderCoreBuiltinsPropertiesARM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderCoreMask !== undefined) this.shaderCoreMask = data.shaderCoreMask; + if (data.shaderCoreCount !== undefined) this.shaderCoreCount = data.shaderCoreCount; + if (data.shaderWarpsPerCore !== undefined) this.shaderWarpsPerCore = data.shaderWarpsPerCore; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderCoreMask(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set shaderCoreMask(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get shaderCoreCount(): number { + return this.#view.getUint32(24, LE); + } + + set shaderCoreCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get shaderWarpsPerCore(): number { + return this.#view.getUint32(28, LE); + } + + set shaderWarpsPerCore(value: number) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderCoreProperties2AMD.ts b/api/struct/PhysicalDeviceShaderCoreProperties2AMD.ts new file mode 100644 index 0000000..286c8f0 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderCoreProperties2AMD.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ShaderCorePropertiesFlagsAMD } from "../def.ts"; + +export interface InitPhysicalDeviceShaderCoreProperties2AMD { + pNext?: AnyPointer; + shaderCoreFeatures?: ShaderCorePropertiesFlagsAMD; + activeComputeUnitCount?: number; +} + +export class PhysicalDeviceShaderCoreProperties2AMD implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderCoreProperties2AMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderCoreProperties2AMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderCoreProperties2AMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderCoreProperties2AMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderCoreProperties2AMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderCoreFeatures !== undefined) this.shaderCoreFeatures = data.shaderCoreFeatures; + if (data.activeComputeUnitCount !== undefined) this.activeComputeUnitCount = data.activeComputeUnitCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCoreProperties2AMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderCoreFeatures(): number { + return this.#view.getUint32(16, LE); + } + + set shaderCoreFeatures(value: ShaderCorePropertiesFlagsAMD) { + this.#view.setUint32(16, Number(value), LE); + } + + get activeComputeUnitCount(): number { + return this.#view.getUint32(20, LE); + } + + set activeComputeUnitCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderCorePropertiesAMD.ts b/api/struct/PhysicalDeviceShaderCorePropertiesAMD.ts new file mode 100644 index 0000000..66ed640 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderCorePropertiesAMD.ts @@ -0,0 +1,209 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceShaderCorePropertiesAMD { + pNext?: AnyPointer; + shaderEngineCount?: number; + shaderArraysPerEngineCount?: number; + computeUnitsPerShaderArray?: number; + simdPerComputeUnit?: number; + wavefrontsPerSimd?: number; + wavefrontSize?: number; + sgprsPerSimd?: number; + minSgprAllocation?: number; + maxSgprAllocation?: number; + sgprAllocationGranularity?: number; + vgprsPerSimd?: number; + minVgprAllocation?: number; + maxVgprAllocation?: number; + vgprAllocationGranularity?: number; +} + +export class PhysicalDeviceShaderCorePropertiesAMD implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderCorePropertiesAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderCorePropertiesAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderCorePropertiesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderCorePropertiesAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderCorePropertiesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderEngineCount !== undefined) this.shaderEngineCount = data.shaderEngineCount; + if (data.shaderArraysPerEngineCount !== undefined) this.shaderArraysPerEngineCount = data.shaderArraysPerEngineCount; + if (data.computeUnitsPerShaderArray !== undefined) this.computeUnitsPerShaderArray = data.computeUnitsPerShaderArray; + if (data.simdPerComputeUnit !== undefined) this.simdPerComputeUnit = data.simdPerComputeUnit; + if (data.wavefrontsPerSimd !== undefined) this.wavefrontsPerSimd = data.wavefrontsPerSimd; + if (data.wavefrontSize !== undefined) this.wavefrontSize = data.wavefrontSize; + if (data.sgprsPerSimd !== undefined) this.sgprsPerSimd = data.sgprsPerSimd; + if (data.minSgprAllocation !== undefined) this.minSgprAllocation = data.minSgprAllocation; + if (data.maxSgprAllocation !== undefined) this.maxSgprAllocation = data.maxSgprAllocation; + if (data.sgprAllocationGranularity !== undefined) this.sgprAllocationGranularity = data.sgprAllocationGranularity; + if (data.vgprsPerSimd !== undefined) this.vgprsPerSimd = data.vgprsPerSimd; + if (data.minVgprAllocation !== undefined) this.minVgprAllocation = data.minVgprAllocation; + if (data.maxVgprAllocation !== undefined) this.maxVgprAllocation = data.maxVgprAllocation; + if (data.vgprAllocationGranularity !== undefined) this.vgprAllocationGranularity = data.vgprAllocationGranularity; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCorePropertiesAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderEngineCount(): number { + return this.#view.getUint32(16, LE); + } + + set shaderEngineCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get shaderArraysPerEngineCount(): number { + return this.#view.getUint32(20, LE); + } + + set shaderArraysPerEngineCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get computeUnitsPerShaderArray(): number { + return this.#view.getUint32(24, LE); + } + + set computeUnitsPerShaderArray(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get simdPerComputeUnit(): number { + return this.#view.getUint32(28, LE); + } + + set simdPerComputeUnit(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get wavefrontsPerSimd(): number { + return this.#view.getUint32(32, LE); + } + + set wavefrontsPerSimd(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get wavefrontSize(): number { + return this.#view.getUint32(36, LE); + } + + set wavefrontSize(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get sgprsPerSimd(): number { + return this.#view.getUint32(40, LE); + } + + set sgprsPerSimd(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get minSgprAllocation(): number { + return this.#view.getUint32(44, LE); + } + + set minSgprAllocation(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get maxSgprAllocation(): number { + return this.#view.getUint32(48, LE); + } + + set maxSgprAllocation(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get sgprAllocationGranularity(): number { + return this.#view.getUint32(52, LE); + } + + set sgprAllocationGranularity(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get vgprsPerSimd(): number { + return this.#view.getUint32(56, LE); + } + + set vgprsPerSimd(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get minVgprAllocation(): number { + return this.#view.getUint32(60, LE); + } + + set minVgprAllocation(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get maxVgprAllocation(): number { + return this.#view.getUint32(64, LE); + } + + set maxVgprAllocation(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get vgprAllocationGranularity(): number { + return this.#view.getUint32(68, LE); + } + + set vgprAllocationGranularity(value: number) { + this.#view.setUint32(68, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderDemoteToHelperInvocationFeatures.ts b/api/struct/PhysicalDeviceShaderDemoteToHelperInvocationFeatures.ts new file mode 100644 index 0000000..0c5accf --- /dev/null +++ b/api/struct/PhysicalDeviceShaderDemoteToHelperInvocationFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderDemoteToHelperInvocationFeatures { + pNext?: AnyPointer; + shaderDemoteToHelperInvocation?: Bool32; +} + +export class PhysicalDeviceShaderDemoteToHelperInvocationFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderDemoteToHelperInvocationFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderDemoteToHelperInvocationFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderDemoteToHelperInvocation !== undefined) this.shaderDemoteToHelperInvocation = data.shaderDemoteToHelperInvocation; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderDemoteToHelperInvocation(): number { + return this.#view.getUint32(16, LE); + } + + set shaderDemoteToHelperInvocation(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT.ts b/api/struct/PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT.ts new file mode 100644 index 0000000..941b53b --- /dev/null +++ b/api/struct/PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceShaderDemoteToHelperInvocationFeatures } from "./PhysicalDeviceShaderDemoteToHelperInvocationFeatures.ts"; + export type PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = PhysicalDeviceShaderDemoteToHelperInvocationFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderDrawParameterFeatures.ts b/api/struct/PhysicalDeviceShaderDrawParameterFeatures.ts new file mode 100644 index 0000000..7f97acd --- /dev/null +++ b/api/struct/PhysicalDeviceShaderDrawParameterFeatures.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceShaderDrawParametersFeatures } from "./PhysicalDeviceShaderDrawParametersFeatures.ts"; + export type PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderDrawParametersFeatures.ts b/api/struct/PhysicalDeviceShaderDrawParametersFeatures.ts new file mode 100644 index 0000000..bf7689b --- /dev/null +++ b/api/struct/PhysicalDeviceShaderDrawParametersFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderDrawParametersFeatures { + pNext?: AnyPointer; + shaderDrawParameters?: Bool32; +} + +export class PhysicalDeviceShaderDrawParametersFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderDrawParametersFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderDrawParametersFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderDrawParametersFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderDrawParametersFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderDrawParametersFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderDrawParameters !== undefined) this.shaderDrawParameters = data.shaderDrawParameters; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderDrawParametersFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderDrawParameters(): number { + return this.#view.getUint32(16, LE); + } + + set shaderDrawParameters(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.ts b/api/struct/PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.ts new file mode 100644 index 0000000..e191948 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD { + pNext?: AnyPointer; + shaderEarlyAndLateFragmentTests?: Bool32; +} + +export class PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderEarlyAndLateFragmentTests !== undefined) this.shaderEarlyAndLateFragmentTests = data.shaderEarlyAndLateFragmentTests; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderEarlyAndLateFragmentTests(): number { + return this.#view.getUint32(16, LE); + } + + set shaderEarlyAndLateFragmentTests(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderFloat16Int8Features.ts b/api/struct/PhysicalDeviceShaderFloat16Int8Features.ts new file mode 100644 index 0000000..3ad36f4 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderFloat16Int8Features.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderFloat16Int8Features { + pNext?: AnyPointer; + shaderFloat16?: Bool32; + shaderInt8?: Bool32; +} + +export class PhysicalDeviceShaderFloat16Int8Features implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderFloat16Int8Features); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderFloat16Int8Features) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderFloat16Int8Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderFloat16Int8Features.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderFloat16Int8Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderFloat16 !== undefined) this.shaderFloat16 = data.shaderFloat16; + if (data.shaderInt8 !== undefined) this.shaderInt8 = data.shaderInt8; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderFloat16Int8Features.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderFloat16(): number { + return this.#view.getUint32(16, LE); + } + + set shaderFloat16(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get shaderInt8(): number { + return this.#view.getUint32(20, LE); + } + + set shaderInt8(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderFloat16Int8FeaturesKHR.ts b/api/struct/PhysicalDeviceShaderFloat16Int8FeaturesKHR.ts new file mode 100644 index 0000000..93b7069 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderFloat16Int8FeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceShaderFloat16Int8Features } from "./PhysicalDeviceShaderFloat16Int8Features.ts"; + export type PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.ts b/api/struct/PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.ts new file mode 100644 index 0000000..b33e179 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderImageAtomicInt64FeaturesEXT { + pNext?: AnyPointer; + shaderImageInt64Atomics?: Bool32; + sparseImageInt64Atomics?: Bool32; +} + +export class PhysicalDeviceShaderImageAtomicInt64FeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderImageAtomicInt64FeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderImageAtomicInt64FeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderImageInt64Atomics !== undefined) this.shaderImageInt64Atomics = data.shaderImageInt64Atomics; + if (data.sparseImageInt64Atomics !== undefined) this.sparseImageInt64Atomics = data.sparseImageInt64Atomics; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderImageInt64Atomics(): number { + return this.#view.getUint32(16, LE); + } + + set shaderImageInt64Atomics(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get sparseImageInt64Atomics(): number { + return this.#view.getUint32(20, LE); + } + + set sparseImageInt64Atomics(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderImageFootprintFeaturesNV.ts b/api/struct/PhysicalDeviceShaderImageFootprintFeaturesNV.ts new file mode 100644 index 0000000..b3df4d1 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderImageFootprintFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderImageFootprintFeaturesNV { + pNext?: AnyPointer; + imageFootprint?: Bool32; +} + +export class PhysicalDeviceShaderImageFootprintFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderImageFootprintFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderImageFootprintFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderImageFootprintFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderImageFootprintFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderImageFootprintFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageFootprint !== undefined) this.imageFootprint = data.imageFootprint; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderImageFootprintFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageFootprint(): number { + return this.#view.getUint32(16, LE); + } + + set imageFootprint(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderIntegerDotProductFeatures.ts b/api/struct/PhysicalDeviceShaderIntegerDotProductFeatures.ts new file mode 100644 index 0000000..2419914 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderIntegerDotProductFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderIntegerDotProductFeatures { + pNext?: AnyPointer; + shaderIntegerDotProduct?: Bool32; +} + +export class PhysicalDeviceShaderIntegerDotProductFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderIntegerDotProductFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderIntegerDotProductFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderIntegerDotProductFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderIntegerDotProduct !== undefined) this.shaderIntegerDotProduct = data.shaderIntegerDotProduct; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderIntegerDotProductFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderIntegerDotProduct(): number { + return this.#view.getUint32(16, LE); + } + + set shaderIntegerDotProduct(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderIntegerDotProductFeaturesKHR.ts b/api/struct/PhysicalDeviceShaderIntegerDotProductFeaturesKHR.ts new file mode 100644 index 0000000..601862d --- /dev/null +++ b/api/struct/PhysicalDeviceShaderIntegerDotProductFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceShaderIntegerDotProductFeatures } from "./PhysicalDeviceShaderIntegerDotProductFeatures.ts"; + export type PhysicalDeviceShaderIntegerDotProductFeaturesKHR = PhysicalDeviceShaderIntegerDotProductFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderIntegerDotProductProperties.ts b/api/struct/PhysicalDeviceShaderIntegerDotProductProperties.ts new file mode 100644 index 0000000..9c30221 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderIntegerDotProductProperties.ts @@ -0,0 +1,370 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderIntegerDotProductProperties { + pNext?: AnyPointer; + integerDotProduct8BitUnsignedAccelerated?: Bool32; + integerDotProduct8BitSignedAccelerated?: Bool32; + integerDotProduct8BitMixedSignednessAccelerated?: Bool32; + integerDotProduct4x8BitPackedUnsignedAccelerated?: Bool32; + integerDotProduct4x8BitPackedSignedAccelerated?: Bool32; + integerDotProduct4x8BitPackedMixedSignednessAccelerated?: Bool32; + integerDotProduct16BitUnsignedAccelerated?: Bool32; + integerDotProduct16BitSignedAccelerated?: Bool32; + integerDotProduct16BitMixedSignednessAccelerated?: Bool32; + integerDotProduct32BitUnsignedAccelerated?: Bool32; + integerDotProduct32BitSignedAccelerated?: Bool32; + integerDotProduct32BitMixedSignednessAccelerated?: Bool32; + integerDotProduct64BitUnsignedAccelerated?: Bool32; + integerDotProduct64BitSignedAccelerated?: Bool32; + integerDotProduct64BitMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating8BitUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating8BitSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating16BitUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating16BitSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating32BitUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating32BitSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating64BitUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating64BitSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated?: Bool32; +} + +export class PhysicalDeviceShaderIntegerDotProductProperties implements BaseStruct { + static size = 136; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderIntegerDotProductProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderIntegerDotProductProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderIntegerDotProductProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.integerDotProduct8BitUnsignedAccelerated !== undefined) this.integerDotProduct8BitUnsignedAccelerated = data.integerDotProduct8BitUnsignedAccelerated; + if (data.integerDotProduct8BitSignedAccelerated !== undefined) this.integerDotProduct8BitSignedAccelerated = data.integerDotProduct8BitSignedAccelerated; + if (data.integerDotProduct8BitMixedSignednessAccelerated !== undefined) this.integerDotProduct8BitMixedSignednessAccelerated = data.integerDotProduct8BitMixedSignednessAccelerated; + if (data.integerDotProduct4x8BitPackedUnsignedAccelerated !== undefined) this.integerDotProduct4x8BitPackedUnsignedAccelerated = data.integerDotProduct4x8BitPackedUnsignedAccelerated; + if (data.integerDotProduct4x8BitPackedSignedAccelerated !== undefined) this.integerDotProduct4x8BitPackedSignedAccelerated = data.integerDotProduct4x8BitPackedSignedAccelerated; + if (data.integerDotProduct4x8BitPackedMixedSignednessAccelerated !== undefined) this.integerDotProduct4x8BitPackedMixedSignednessAccelerated = data.integerDotProduct4x8BitPackedMixedSignednessAccelerated; + if (data.integerDotProduct16BitUnsignedAccelerated !== undefined) this.integerDotProduct16BitUnsignedAccelerated = data.integerDotProduct16BitUnsignedAccelerated; + if (data.integerDotProduct16BitSignedAccelerated !== undefined) this.integerDotProduct16BitSignedAccelerated = data.integerDotProduct16BitSignedAccelerated; + if (data.integerDotProduct16BitMixedSignednessAccelerated !== undefined) this.integerDotProduct16BitMixedSignednessAccelerated = data.integerDotProduct16BitMixedSignednessAccelerated; + if (data.integerDotProduct32BitUnsignedAccelerated !== undefined) this.integerDotProduct32BitUnsignedAccelerated = data.integerDotProduct32BitUnsignedAccelerated; + if (data.integerDotProduct32BitSignedAccelerated !== undefined) this.integerDotProduct32BitSignedAccelerated = data.integerDotProduct32BitSignedAccelerated; + if (data.integerDotProduct32BitMixedSignednessAccelerated !== undefined) this.integerDotProduct32BitMixedSignednessAccelerated = data.integerDotProduct32BitMixedSignednessAccelerated; + if (data.integerDotProduct64BitUnsignedAccelerated !== undefined) this.integerDotProduct64BitUnsignedAccelerated = data.integerDotProduct64BitUnsignedAccelerated; + if (data.integerDotProduct64BitSignedAccelerated !== undefined) this.integerDotProduct64BitSignedAccelerated = data.integerDotProduct64BitSignedAccelerated; + if (data.integerDotProduct64BitMixedSignednessAccelerated !== undefined) this.integerDotProduct64BitMixedSignednessAccelerated = data.integerDotProduct64BitMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating8BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitSignedAccelerated = data.integerDotProductAccumulatingSaturating8BitSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating16BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitSignedAccelerated = data.integerDotProductAccumulatingSaturating16BitSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating32BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitSignedAccelerated = data.integerDotProductAccumulatingSaturating32BitSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating64BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitSignedAccelerated = data.integerDotProductAccumulatingSaturating64BitSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderIntegerDotProductProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get integerDotProduct8BitUnsignedAccelerated(): number { + return this.#view.getUint32(16, LE); + } + + set integerDotProduct8BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get integerDotProduct8BitSignedAccelerated(): number { + return this.#view.getUint32(20, LE); + } + + set integerDotProduct8BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get integerDotProduct8BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(24, LE); + } + + set integerDotProduct8BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get integerDotProduct4x8BitPackedUnsignedAccelerated(): number { + return this.#view.getUint32(28, LE); + } + + set integerDotProduct4x8BitPackedUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get integerDotProduct4x8BitPackedSignedAccelerated(): number { + return this.#view.getUint32(32, LE); + } + + set integerDotProduct4x8BitPackedSignedAccelerated(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get integerDotProduct4x8BitPackedMixedSignednessAccelerated(): number { + return this.#view.getUint32(36, LE); + } + + set integerDotProduct4x8BitPackedMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get integerDotProduct16BitUnsignedAccelerated(): number { + return this.#view.getUint32(40, LE); + } + + set integerDotProduct16BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get integerDotProduct16BitSignedAccelerated(): number { + return this.#view.getUint32(44, LE); + } + + set integerDotProduct16BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get integerDotProduct16BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(48, LE); + } + + set integerDotProduct16BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get integerDotProduct32BitUnsignedAccelerated(): number { + return this.#view.getUint32(52, LE); + } + + set integerDotProduct32BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get integerDotProduct32BitSignedAccelerated(): number { + return this.#view.getUint32(56, LE); + } + + set integerDotProduct32BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get integerDotProduct32BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(60, LE); + } + + set integerDotProduct32BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get integerDotProduct64BitUnsignedAccelerated(): number { + return this.#view.getUint32(64, LE); + } + + set integerDotProduct64BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(64, Number(value), LE); + } + + get integerDotProduct64BitSignedAccelerated(): number { + return this.#view.getUint32(68, LE); + } + + set integerDotProduct64BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get integerDotProduct64BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(72, LE); + } + + set integerDotProduct64BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(): number { + return this.#view.getUint32(76, LE); + } + + set integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating8BitSignedAccelerated(): number { + return this.#view.getUint32(80, LE); + } + + set integerDotProductAccumulatingSaturating8BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(80, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(84, LE); + } + + set integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(84, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(): number { + return this.#view.getUint32(88, LE); + } + + set integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(88, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(): number { + return this.#view.getUint32(92, LE); + } + + set integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(value: Bool32) { + this.#view.setUint32(92, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(): number { + return this.#view.getUint32(96, LE); + } + + set integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(96, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(): number { + return this.#view.getUint32(100, LE); + } + + set integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(100, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating16BitSignedAccelerated(): number { + return this.#view.getUint32(104, LE); + } + + set integerDotProductAccumulatingSaturating16BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(104, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(108, LE); + } + + set integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(108, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(): number { + return this.#view.getUint32(112, LE); + } + + set integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(112, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating32BitSignedAccelerated(): number { + return this.#view.getUint32(116, LE); + } + + set integerDotProductAccumulatingSaturating32BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(116, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(120, LE); + } + + set integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(120, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(): number { + return this.#view.getUint32(124, LE); + } + + set integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(124, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating64BitSignedAccelerated(): number { + return this.#view.getUint32(128, LE); + } + + set integerDotProductAccumulatingSaturating64BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(128, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(132, LE); + } + + set integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(132, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderIntegerDotProductPropertiesKHR.ts b/api/struct/PhysicalDeviceShaderIntegerDotProductPropertiesKHR.ts new file mode 100644 index 0000000..fef3eab --- /dev/null +++ b/api/struct/PhysicalDeviceShaderIntegerDotProductPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceShaderIntegerDotProductProperties } from "./PhysicalDeviceShaderIntegerDotProductProperties.ts"; + export type PhysicalDeviceShaderIntegerDotProductPropertiesKHR = PhysicalDeviceShaderIntegerDotProductProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.ts b/api/struct/PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.ts new file mode 100644 index 0000000..9cf631a --- /dev/null +++ b/api/struct/PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL { + pNext?: AnyPointer; + shaderIntegerFunctions2?: Bool32; +} + +export class PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderIntegerFunctions2 !== undefined) this.shaderIntegerFunctions2 = data.shaderIntegerFunctions2; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderIntegerFunctions2(): number { + return this.#view.getUint32(16, LE); + } + + set shaderIntegerFunctions2(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderModuleIdentifierFeaturesEXT.ts b/api/struct/PhysicalDeviceShaderModuleIdentifierFeaturesEXT.ts new file mode 100644 index 0000000..b089700 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderModuleIdentifierFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderModuleIdentifierFeaturesEXT { + pNext?: AnyPointer; + shaderModuleIdentifier?: Bool32; +} + +export class PhysicalDeviceShaderModuleIdentifierFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderModuleIdentifierFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderModuleIdentifierFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderModuleIdentifier !== undefined) this.shaderModuleIdentifier = data.shaderModuleIdentifier; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderModuleIdentifier(): number { + return this.#view.getUint32(16, LE); + } + + set shaderModuleIdentifier(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderModuleIdentifierPropertiesEXT.ts b/api/struct/PhysicalDeviceShaderModuleIdentifierPropertiesEXT.ts new file mode 100644 index 0000000..b035422 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderModuleIdentifierPropertiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceShaderModuleIdentifierPropertiesEXT { + pNext?: AnyPointer; + shaderModuleIdentifierAlgorithmUUID?: Uint8Array; +} + +export class PhysicalDeviceShaderModuleIdentifierPropertiesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderModuleIdentifierPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderModuleIdentifierPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderModuleIdentifierAlgorithmUUID !== undefined) this.shaderModuleIdentifierAlgorithmUUID = data.shaderModuleIdentifierAlgorithmUUID; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderModuleIdentifierAlgorithmUUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); + } + + set shaderModuleIdentifierAlgorithmUUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderSMBuiltinsFeaturesNV.ts b/api/struct/PhysicalDeviceShaderSMBuiltinsFeaturesNV.ts new file mode 100644 index 0000000..560371d --- /dev/null +++ b/api/struct/PhysicalDeviceShaderSMBuiltinsFeaturesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderSMBuiltinsFeaturesNV { + pNext?: AnyPointer; + shaderSMBuiltins?: Bool32; +} + +export class PhysicalDeviceShaderSMBuiltinsFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderSMBuiltinsFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderSMBuiltinsFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderSMBuiltinsFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderSMBuiltins !== undefined) this.shaderSMBuiltins = data.shaderSMBuiltins; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSMBuiltinsFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderSMBuiltins(): number { + return this.#view.getUint32(16, LE); + } + + set shaderSMBuiltins(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderSMBuiltinsPropertiesNV.ts b/api/struct/PhysicalDeviceShaderSMBuiltinsPropertiesNV.ts new file mode 100644 index 0000000..7d2ad10 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderSMBuiltinsPropertiesNV.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceShaderSMBuiltinsPropertiesNV { + pNext?: AnyPointer; + shaderSMCount?: number; + shaderWarpsPerSM?: number; +} + +export class PhysicalDeviceShaderSMBuiltinsPropertiesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderSMBuiltinsPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderSMBuiltinsPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderSMBuiltinsPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderSMCount !== undefined) this.shaderSMCount = data.shaderSMCount; + if (data.shaderWarpsPerSM !== undefined) this.shaderWarpsPerSM = data.shaderWarpsPerSM; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSMBuiltinsPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderSMCount(): number { + return this.#view.getUint32(16, LE); + } + + set shaderSMCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get shaderWarpsPerSM(): number { + return this.#view.getUint32(20, LE); + } + + set shaderWarpsPerSM(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderSubgroupExtendedTypesFeatures.ts b/api/struct/PhysicalDeviceShaderSubgroupExtendedTypesFeatures.ts new file mode 100644 index 0000000..2d99369 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderSubgroupExtendedTypesFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderSubgroupExtendedTypesFeatures { + pNext?: AnyPointer; + shaderSubgroupExtendedTypes?: Bool32; +} + +export class PhysicalDeviceShaderSubgroupExtendedTypesFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderSubgroupExtendedTypesFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderSubgroupExtendedTypesFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderSubgroupExtendedTypes !== undefined) this.shaderSubgroupExtendedTypes = data.shaderSubgroupExtendedTypes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderSubgroupExtendedTypes(): number { + return this.#view.getUint32(16, LE); + } + + set shaderSubgroupExtendedTypes(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR.ts b/api/struct/PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR.ts new file mode 100644 index 0000000..9620e9f --- /dev/null +++ b/api/struct/PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceShaderSubgroupExtendedTypesFeatures } from "./PhysicalDeviceShaderSubgroupExtendedTypesFeatures.ts"; + export type PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.ts b/api/struct/PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.ts new file mode 100644 index 0000000..f54b658 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR { + pNext?: AnyPointer; + shaderSubgroupUniformControlFlow?: Bool32; +} + +export class PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderSubgroupUniformControlFlow !== undefined) this.shaderSubgroupUniformControlFlow = data.shaderSubgroupUniformControlFlow; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderSubgroupUniformControlFlow(): number { + return this.#view.getUint32(16, LE); + } + + set shaderSubgroupUniformControlFlow(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderTerminateInvocationFeatures.ts b/api/struct/PhysicalDeviceShaderTerminateInvocationFeatures.ts new file mode 100644 index 0000000..27e0ae8 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderTerminateInvocationFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShaderTerminateInvocationFeatures { + pNext?: AnyPointer; + shaderTerminateInvocation?: Bool32; +} + +export class PhysicalDeviceShaderTerminateInvocationFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShaderTerminateInvocationFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderTerminateInvocationFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShaderTerminateInvocationFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShaderTerminateInvocationFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShaderTerminateInvocationFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderTerminateInvocation !== undefined) this.shaderTerminateInvocation = data.shaderTerminateInvocation; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderTerminateInvocationFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderTerminateInvocation(): number { + return this.#view.getUint32(16, LE); + } + + set shaderTerminateInvocation(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShaderTerminateInvocationFeaturesKHR.ts b/api/struct/PhysicalDeviceShaderTerminateInvocationFeaturesKHR.ts new file mode 100644 index 0000000..9fce416 --- /dev/null +++ b/api/struct/PhysicalDeviceShaderTerminateInvocationFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceShaderTerminateInvocationFeatures } from "./PhysicalDeviceShaderTerminateInvocationFeatures.ts"; + export type PhysicalDeviceShaderTerminateInvocationFeaturesKHR = PhysicalDeviceShaderTerminateInvocationFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShadingRateImageFeaturesNV.ts b/api/struct/PhysicalDeviceShadingRateImageFeaturesNV.ts new file mode 100644 index 0000000..c23df85 --- /dev/null +++ b/api/struct/PhysicalDeviceShadingRateImageFeaturesNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceShadingRateImageFeaturesNV { + pNext?: AnyPointer; + shadingRateImage?: Bool32; + shadingRateCoarseSampleOrder?: Bool32; +} + +export class PhysicalDeviceShadingRateImageFeaturesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShadingRateImageFeaturesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShadingRateImageFeaturesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShadingRateImageFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShadingRateImageFeaturesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShadingRateImageFeaturesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shadingRateImage !== undefined) this.shadingRateImage = data.shadingRateImage; + if (data.shadingRateCoarseSampleOrder !== undefined) this.shadingRateCoarseSampleOrder = data.shadingRateCoarseSampleOrder; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShadingRateImageFeaturesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shadingRateImage(): number { + return this.#view.getUint32(16, LE); + } + + set shadingRateImage(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get shadingRateCoarseSampleOrder(): number { + return this.#view.getUint32(20, LE); + } + + set shadingRateCoarseSampleOrder(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceShadingRateImagePropertiesNV.ts b/api/struct/PhysicalDeviceShadingRateImagePropertiesNV.ts new file mode 100644 index 0000000..2f6ef20 --- /dev/null +++ b/api/struct/PhysicalDeviceShadingRateImagePropertiesNV.ts @@ -0,0 +1,103 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceShadingRateImagePropertiesNV { + pNext?: AnyPointer; + shadingRateTexelSize?: Extent2D; + shadingRatePaletteSize?: number; + shadingRateMaxCoarseSamples?: number; +} + +export class PhysicalDeviceShadingRateImagePropertiesNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceShadingRateImagePropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShadingRateImagePropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceShadingRateImagePropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceShadingRateImagePropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceShadingRateImagePropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shadingRateTexelSize !== undefined) this.shadingRateTexelSize = data.shadingRateTexelSize; + if (data.shadingRatePaletteSize !== undefined) this.shadingRatePaletteSize = data.shadingRatePaletteSize; + if (data.shadingRateMaxCoarseSamples !== undefined) this.shadingRateMaxCoarseSamples = data.shadingRateMaxCoarseSamples; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShadingRateImagePropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shadingRateTexelSize(): Extent2D { + return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); + } + + set shadingRateTexelSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get shadingRatePaletteSize(): number { + return this.#view.getUint32(24, LE); + } + + set shadingRatePaletteSize(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get shadingRateMaxCoarseSamples(): number { + return this.#view.getUint32(28, LE); + } + + set shadingRateMaxCoarseSamples(value: number) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSparseImageFormatInfo2.ts b/api/struct/PhysicalDeviceSparseImageFormatInfo2.ts new file mode 100644 index 0000000..b140b1a --- /dev/null +++ b/api/struct/PhysicalDeviceSparseImageFormatInfo2.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format, ImageType, SampleCountFlagBits, ImageTiling } from "../enum.ts"; +import { ImageUsageFlags } from "../def.ts"; + +export interface InitPhysicalDeviceSparseImageFormatInfo2 { + pNext?: AnyPointer; + format?: Format; + type?: ImageType; + samples?: SampleCountFlagBits; + usage?: ImageUsageFlags; + tiling?: ImageTiling; +} + +export class PhysicalDeviceSparseImageFormatInfo2 implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSparseImageFormatInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSparseImageFormatInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSparseImageFormatInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSparseImageFormatInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSparseImageFormatInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.format !== undefined) this.format = data.format; + if (data.type !== undefined) this.type = data.type; + if (data.samples !== undefined) this.samples = data.samples; + if (data.usage !== undefined) this.usage = data.usage; + if (data.tiling !== undefined) this.tiling = data.tiling; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSparseImageFormatInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get format(): number { + return this.#view.getUint32(16, LE); + } + + set format(value: Format) { + this.#view.setUint32(16, Number(value), LE); + } + + get type(): number { + return this.#view.getUint32(20, LE); + } + + set type(value: ImageType) { + this.#view.setUint32(20, Number(value), LE); + } + + get samples(): number { + return this.#view.getUint32(24, LE); + } + + set samples(value: SampleCountFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } + + get usage(): number { + return this.#view.getUint32(28, LE); + } + + set usage(value: ImageUsageFlags) { + this.#view.setUint32(28, Number(value), LE); + } + + get tiling(): number { + return this.#view.getUint32(32, LE); + } + + set tiling(value: ImageTiling) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSparseImageFormatInfo2KHR.ts b/api/struct/PhysicalDeviceSparseImageFormatInfo2KHR.ts new file mode 100644 index 0000000..ba8081a --- /dev/null +++ b/api/struct/PhysicalDeviceSparseImageFormatInfo2KHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceSparseImageFormatInfo2 } from "./PhysicalDeviceSparseImageFormatInfo2.ts"; + export type PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSparseProperties.ts b/api/struct/PhysicalDeviceSparseProperties.ts new file mode 100644 index 0000000..74fb5b4 --- /dev/null +++ b/api/struct/PhysicalDeviceSparseProperties.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSparseProperties { + residencyStandard2DBlockShape?: Bool32; + residencyStandard2DMultisampleBlockShape?: Bool32; + residencyStandard3DBlockShape?: Bool32; + residencyAlignedMipSize?: Bool32; + residencyNonResidentStrict?: Bool32; +} + +export class PhysicalDeviceSparseProperties implements BaseStruct { + static size = 20; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSparseProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSparseProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSparseProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSparseProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSparseProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.residencyStandard2DBlockShape !== undefined) this.residencyStandard2DBlockShape = data.residencyStandard2DBlockShape; + if (data.residencyStandard2DMultisampleBlockShape !== undefined) this.residencyStandard2DMultisampleBlockShape = data.residencyStandard2DMultisampleBlockShape; + if (data.residencyStandard3DBlockShape !== undefined) this.residencyStandard3DBlockShape = data.residencyStandard3DBlockShape; + if (data.residencyAlignedMipSize !== undefined) this.residencyAlignedMipSize = data.residencyAlignedMipSize; + if (data.residencyNonResidentStrict !== undefined) this.residencyNonResidentStrict = data.residencyNonResidentStrict; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSparseProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get residencyStandard2DBlockShape(): number { + return this.#view.getUint32(0, LE); + } + + set residencyStandard2DBlockShape(value: Bool32) { + this.#view.setUint32(0, Number(value), LE); + } + + get residencyStandard2DMultisampleBlockShape(): number { + return this.#view.getUint32(4, LE); + } + + set residencyStandard2DMultisampleBlockShape(value: Bool32) { + this.#view.setUint32(4, Number(value), LE); + } + + get residencyStandard3DBlockShape(): number { + return this.#view.getUint32(8, LE); + } + + set residencyStandard3DBlockShape(value: Bool32) { + this.#view.setUint32(8, Number(value), LE); + } + + get residencyAlignedMipSize(): number { + return this.#view.getUint32(12, LE); + } + + set residencyAlignedMipSize(value: Bool32) { + this.#view.setUint32(12, Number(value), LE); + } + + get residencyNonResidentStrict(): number { + return this.#view.getUint32(16, LE); + } + + set residencyNonResidentStrict(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSubgroupProperties.ts b/api/struct/PhysicalDeviceSubgroupProperties.ts new file mode 100644 index 0000000..320f53d --- /dev/null +++ b/api/struct/PhysicalDeviceSubgroupProperties.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ShaderStageFlags, SubgroupFeatureFlags, Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSubgroupProperties { + pNext?: AnyPointer; + subgroupSize?: number; + supportedStages?: ShaderStageFlags; + supportedOperations?: SubgroupFeatureFlags; + quadOperationsInAllStages?: Bool32; +} + +export class PhysicalDeviceSubgroupProperties implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSubgroupProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubgroupProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSubgroupProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSubgroupProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSubgroupProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.subgroupSize !== undefined) this.subgroupSize = data.subgroupSize; + if (data.supportedStages !== undefined) this.supportedStages = data.supportedStages; + if (data.supportedOperations !== undefined) this.supportedOperations = data.supportedOperations; + if (data.quadOperationsInAllStages !== undefined) this.quadOperationsInAllStages = data.quadOperationsInAllStages; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubgroupProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SUBGROUP_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get subgroupSize(): number { + return this.#view.getUint32(16, LE); + } + + set subgroupSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get supportedStages(): number { + return this.#view.getUint32(20, LE); + } + + set supportedStages(value: ShaderStageFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get supportedOperations(): number { + return this.#view.getUint32(24, LE); + } + + set supportedOperations(value: SubgroupFeatureFlags) { + this.#view.setUint32(24, Number(value), LE); + } + + get quadOperationsInAllStages(): number { + return this.#view.getUint32(28, LE); + } + + set quadOperationsInAllStages(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSubgroupSizeControlFeatures.ts b/api/struct/PhysicalDeviceSubgroupSizeControlFeatures.ts new file mode 100644 index 0000000..73ea435 --- /dev/null +++ b/api/struct/PhysicalDeviceSubgroupSizeControlFeatures.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSubgroupSizeControlFeatures { + pNext?: AnyPointer; + subgroupSizeControl?: Bool32; + computeFullSubgroups?: Bool32; +} + +export class PhysicalDeviceSubgroupSizeControlFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSubgroupSizeControlFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubgroupSizeControlFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSubgroupSizeControlFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.subgroupSizeControl !== undefined) this.subgroupSizeControl = data.subgroupSizeControl; + if (data.computeFullSubgroups !== undefined) this.computeFullSubgroups = data.computeFullSubgroups; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubgroupSizeControlFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get subgroupSizeControl(): number { + return this.#view.getUint32(16, LE); + } + + set subgroupSizeControl(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get computeFullSubgroups(): number { + return this.#view.getUint32(20, LE); + } + + set computeFullSubgroups(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSubgroupSizeControlFeaturesEXT.ts b/api/struct/PhysicalDeviceSubgroupSizeControlFeaturesEXT.ts new file mode 100644 index 0000000..ca81335 --- /dev/null +++ b/api/struct/PhysicalDeviceSubgroupSizeControlFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceSubgroupSizeControlFeatures } from "./PhysicalDeviceSubgroupSizeControlFeatures.ts"; + export type PhysicalDeviceSubgroupSizeControlFeaturesEXT = PhysicalDeviceSubgroupSizeControlFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSubgroupSizeControlProperties.ts b/api/struct/PhysicalDeviceSubgroupSizeControlProperties.ts new file mode 100644 index 0000000..734dded --- /dev/null +++ b/api/struct/PhysicalDeviceSubgroupSizeControlProperties.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ShaderStageFlags } from "../def.ts"; + +export interface InitPhysicalDeviceSubgroupSizeControlProperties { + pNext?: AnyPointer; + minSubgroupSize?: number; + maxSubgroupSize?: number; + maxComputeWorkgroupSubgroups?: number; + requiredSubgroupSizeStages?: ShaderStageFlags; +} + +export class PhysicalDeviceSubgroupSizeControlProperties implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSubgroupSizeControlProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubgroupSizeControlProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSubgroupSizeControlProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minSubgroupSize !== undefined) this.minSubgroupSize = data.minSubgroupSize; + if (data.maxSubgroupSize !== undefined) this.maxSubgroupSize = data.maxSubgroupSize; + if (data.maxComputeWorkgroupSubgroups !== undefined) this.maxComputeWorkgroupSubgroups = data.maxComputeWorkgroupSubgroups; + if (data.requiredSubgroupSizeStages !== undefined) this.requiredSubgroupSizeStages = data.requiredSubgroupSizeStages; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubgroupSizeControlProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minSubgroupSize(): number { + return this.#view.getUint32(16, LE); + } + + set minSubgroupSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxSubgroupSize(): number { + return this.#view.getUint32(20, LE); + } + + set maxSubgroupSize(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxComputeWorkgroupSubgroups(): number { + return this.#view.getUint32(24, LE); + } + + set maxComputeWorkgroupSubgroups(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get requiredSubgroupSizeStages(): number { + return this.#view.getUint32(28, LE); + } + + set requiredSubgroupSizeStages(value: ShaderStageFlags) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSubgroupSizeControlPropertiesEXT.ts b/api/struct/PhysicalDeviceSubgroupSizeControlPropertiesEXT.ts new file mode 100644 index 0000000..e6a0afe --- /dev/null +++ b/api/struct/PhysicalDeviceSubgroupSizeControlPropertiesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceSubgroupSizeControlProperties } from "./PhysicalDeviceSubgroupSizeControlProperties.ts"; + export type PhysicalDeviceSubgroupSizeControlPropertiesEXT = PhysicalDeviceSubgroupSizeControlProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.ts b/api/struct/PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.ts new file mode 100644 index 0000000..999fd1a --- /dev/null +++ b/api/struct/PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSubpassMergeFeedbackFeaturesEXT { + pNext?: AnyPointer; + subpassMergeFeedback?: Bool32; +} + +export class PhysicalDeviceSubpassMergeFeedbackFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSubpassMergeFeedbackFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubpassMergeFeedbackFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.subpassMergeFeedback !== undefined) this.subpassMergeFeedback = data.subpassMergeFeedback; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get subpassMergeFeedback(): number { + return this.#view.getUint32(16, LE); + } + + set subpassMergeFeedback(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSubpassShadingFeaturesHUAWEI.ts b/api/struct/PhysicalDeviceSubpassShadingFeaturesHUAWEI.ts new file mode 100644 index 0000000..7a3e0d1 --- /dev/null +++ b/api/struct/PhysicalDeviceSubpassShadingFeaturesHUAWEI.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSubpassShadingFeaturesHUAWEI { + pNext?: AnyPointer; + subpassShading?: Bool32; +} + +export class PhysicalDeviceSubpassShadingFeaturesHUAWEI implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSubpassShadingFeaturesHUAWEI); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubpassShadingFeaturesHUAWEI) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSubpassShadingFeaturesHUAWEI.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSubpassShadingFeaturesHUAWEI.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSubpassShadingFeaturesHUAWEI.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.subpassShading !== undefined) this.subpassShading = data.subpassShading; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubpassShadingFeaturesHUAWEI.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get subpassShading(): number { + return this.#view.getUint32(16, LE); + } + + set subpassShading(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSubpassShadingPropertiesHUAWEI.ts b/api/struct/PhysicalDeviceSubpassShadingPropertiesHUAWEI.ts new file mode 100644 index 0000000..20b4847 --- /dev/null +++ b/api/struct/PhysicalDeviceSubpassShadingPropertiesHUAWEI.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceSubpassShadingPropertiesHUAWEI { + pNext?: AnyPointer; + maxSubpassShadingWorkgroupSizeAspectRatio?: number; +} + +export class PhysicalDeviceSubpassShadingPropertiesHUAWEI implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSubpassShadingPropertiesHUAWEI); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubpassShadingPropertiesHUAWEI) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSubpassShadingPropertiesHUAWEI.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSubpassShadingPropertiesHUAWEI.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSubpassShadingPropertiesHUAWEI.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxSubpassShadingWorkgroupSizeAspectRatio !== undefined) this.maxSubpassShadingWorkgroupSizeAspectRatio = data.maxSubpassShadingWorkgroupSizeAspectRatio; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubpassShadingPropertiesHUAWEI.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxSubpassShadingWorkgroupSizeAspectRatio(): number { + return this.#view.getUint32(16, LE); + } + + set maxSubpassShadingWorkgroupSizeAspectRatio(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSurfaceInfo2KHR.ts b/api/struct/PhysicalDeviceSurfaceInfo2KHR.ts new file mode 100644 index 0000000..3939007 --- /dev/null +++ b/api/struct/PhysicalDeviceSurfaceInfo2KHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { SurfaceKHR } from "../def.ts"; + +export interface InitPhysicalDeviceSurfaceInfo2KHR { + pNext?: AnyPointer; + surface?: SurfaceKHR; +} + +export class PhysicalDeviceSurfaceInfo2KHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSurfaceInfo2KHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSurfaceInfo2KHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSurfaceInfo2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSurfaceInfo2KHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSurfaceInfo2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.surface !== undefined) this.surface = data.surface; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSurfaceInfo2KHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SURFACE_INFO_2_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get surface(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set surface(value: SurfaceKHR) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSynchronization2Features.ts b/api/struct/PhysicalDeviceSynchronization2Features.ts new file mode 100644 index 0000000..ae6f7ae --- /dev/null +++ b/api/struct/PhysicalDeviceSynchronization2Features.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceSynchronization2Features { + pNext?: AnyPointer; + synchronization2?: Bool32; +} + +export class PhysicalDeviceSynchronization2Features implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceSynchronization2Features); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSynchronization2Features) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceSynchronization2Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceSynchronization2Features.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceSynchronization2Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.synchronization2 !== undefined) this.synchronization2 = data.synchronization2; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSynchronization2Features.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get synchronization2(): number { + return this.#view.getUint32(16, LE); + } + + set synchronization2(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceSynchronization2FeaturesKHR.ts b/api/struct/PhysicalDeviceSynchronization2FeaturesKHR.ts new file mode 100644 index 0000000..6cc298a --- /dev/null +++ b/api/struct/PhysicalDeviceSynchronization2FeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceSynchronization2Features } from "./PhysicalDeviceSynchronization2Features.ts"; + export type PhysicalDeviceSynchronization2FeaturesKHR = PhysicalDeviceSynchronization2Features; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTexelBufferAlignmentFeaturesEXT.ts b/api/struct/PhysicalDeviceTexelBufferAlignmentFeaturesEXT.ts new file mode 100644 index 0000000..f1ae098 --- /dev/null +++ b/api/struct/PhysicalDeviceTexelBufferAlignmentFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceTexelBufferAlignmentFeaturesEXT { + pNext?: AnyPointer; + texelBufferAlignment?: Bool32; +} + +export class PhysicalDeviceTexelBufferAlignmentFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceTexelBufferAlignmentFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTexelBufferAlignmentFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.texelBufferAlignment !== undefined) this.texelBufferAlignment = data.texelBufferAlignment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get texelBufferAlignment(): number { + return this.#view.getUint32(16, LE); + } + + set texelBufferAlignment(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTexelBufferAlignmentProperties.ts b/api/struct/PhysicalDeviceTexelBufferAlignmentProperties.ts new file mode 100644 index 0000000..f9ebb7c --- /dev/null +++ b/api/struct/PhysicalDeviceTexelBufferAlignmentProperties.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize, Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceTexelBufferAlignmentProperties { + pNext?: AnyPointer; + storageTexelBufferOffsetAlignmentBytes?: DeviceSize; + storageTexelBufferOffsetSingleTexelAlignment?: Bool32; + uniformTexelBufferOffsetAlignmentBytes?: DeviceSize; + uniformTexelBufferOffsetSingleTexelAlignment?: Bool32; +} + +export class PhysicalDeviceTexelBufferAlignmentProperties implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceTexelBufferAlignmentProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTexelBufferAlignmentProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceTexelBufferAlignmentProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.storageTexelBufferOffsetAlignmentBytes !== undefined) this.storageTexelBufferOffsetAlignmentBytes = data.storageTexelBufferOffsetAlignmentBytes; + if (data.storageTexelBufferOffsetSingleTexelAlignment !== undefined) this.storageTexelBufferOffsetSingleTexelAlignment = data.storageTexelBufferOffsetSingleTexelAlignment; + if (data.uniformTexelBufferOffsetAlignmentBytes !== undefined) this.uniformTexelBufferOffsetAlignmentBytes = data.uniformTexelBufferOffsetAlignmentBytes; + if (data.uniformTexelBufferOffsetSingleTexelAlignment !== undefined) this.uniformTexelBufferOffsetSingleTexelAlignment = data.uniformTexelBufferOffsetSingleTexelAlignment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTexelBufferAlignmentProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get storageTexelBufferOffsetAlignmentBytes(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set storageTexelBufferOffsetAlignmentBytes(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get storageTexelBufferOffsetSingleTexelAlignment(): number { + return this.#view.getUint32(24, LE); + } + + set storageTexelBufferOffsetSingleTexelAlignment(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get uniformTexelBufferOffsetAlignmentBytes(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set uniformTexelBufferOffsetAlignmentBytes(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get uniformTexelBufferOffsetSingleTexelAlignment(): number { + return this.#view.getUint32(40, LE); + } + + set uniformTexelBufferOffsetSingleTexelAlignment(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTexelBufferAlignmentPropertiesEXT.ts b/api/struct/PhysicalDeviceTexelBufferAlignmentPropertiesEXT.ts new file mode 100644 index 0000000..a48c5b5 --- /dev/null +++ b/api/struct/PhysicalDeviceTexelBufferAlignmentPropertiesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceTexelBufferAlignmentProperties } from "./PhysicalDeviceTexelBufferAlignmentProperties.ts"; + export type PhysicalDeviceTexelBufferAlignmentPropertiesEXT = PhysicalDeviceTexelBufferAlignmentProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTextureCompressionASTCHDRFeatures.ts b/api/struct/PhysicalDeviceTextureCompressionASTCHDRFeatures.ts new file mode 100644 index 0000000..248ad60 --- /dev/null +++ b/api/struct/PhysicalDeviceTextureCompressionASTCHDRFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceTextureCompressionASTCHDRFeatures { + pNext?: AnyPointer; + textureCompressionASTC_HDR?: Bool32; +} + +export class PhysicalDeviceTextureCompressionASTCHDRFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceTextureCompressionASTCHDRFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTextureCompressionASTCHDRFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceTextureCompressionASTCHDRFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceTextureCompressionASTCHDRFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceTextureCompressionASTCHDRFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.textureCompressionASTC_HDR !== undefined) this.textureCompressionASTC_HDR = data.textureCompressionASTC_HDR; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTextureCompressionASTCHDRFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get textureCompressionASTC_HDR(): number { + return this.#view.getUint32(16, LE); + } + + set textureCompressionASTC_HDR(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT.ts b/api/struct/PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT.ts new file mode 100644 index 0000000..5b2fe51 --- /dev/null +++ b/api/struct/PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceTextureCompressionASTCHDRFeatures } from "./PhysicalDeviceTextureCompressionASTCHDRFeatures.ts"; + export type PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT = PhysicalDeviceTextureCompressionASTCHDRFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTilePropertiesFeaturesQCOM.ts b/api/struct/PhysicalDeviceTilePropertiesFeaturesQCOM.ts new file mode 100644 index 0000000..388d317 --- /dev/null +++ b/api/struct/PhysicalDeviceTilePropertiesFeaturesQCOM.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceTilePropertiesFeaturesQCOM { + pNext?: AnyPointer; + tileProperties?: Bool32; +} + +export class PhysicalDeviceTilePropertiesFeaturesQCOM implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceTilePropertiesFeaturesQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTilePropertiesFeaturesQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceTilePropertiesFeaturesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceTilePropertiesFeaturesQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceTilePropertiesFeaturesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.tileProperties !== undefined) this.tileProperties = data.tileProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTilePropertiesFeaturesQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get tileProperties(): number { + return this.#view.getUint32(16, LE); + } + + set tileProperties(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTimelineSemaphoreFeatures.ts b/api/struct/PhysicalDeviceTimelineSemaphoreFeatures.ts new file mode 100644 index 0000000..1f62d54 --- /dev/null +++ b/api/struct/PhysicalDeviceTimelineSemaphoreFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceTimelineSemaphoreFeatures { + pNext?: AnyPointer; + timelineSemaphore?: Bool32; +} + +export class PhysicalDeviceTimelineSemaphoreFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceTimelineSemaphoreFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTimelineSemaphoreFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceTimelineSemaphoreFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.timelineSemaphore !== undefined) this.timelineSemaphore = data.timelineSemaphore; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTimelineSemaphoreFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get timelineSemaphore(): number { + return this.#view.getUint32(16, LE); + } + + set timelineSemaphore(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTimelineSemaphoreFeaturesKHR.ts b/api/struct/PhysicalDeviceTimelineSemaphoreFeaturesKHR.ts new file mode 100644 index 0000000..97bf4fd --- /dev/null +++ b/api/struct/PhysicalDeviceTimelineSemaphoreFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceTimelineSemaphoreFeatures } from "./PhysicalDeviceTimelineSemaphoreFeatures.ts"; + export type PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTimelineSemaphoreProperties.ts b/api/struct/PhysicalDeviceTimelineSemaphoreProperties.ts new file mode 100644 index 0000000..3410e1c --- /dev/null +++ b/api/struct/PhysicalDeviceTimelineSemaphoreProperties.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceTimelineSemaphoreProperties { + pNext?: AnyPointer; + maxTimelineSemaphoreValueDifference?: number | bigint; +} + +export class PhysicalDeviceTimelineSemaphoreProperties implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceTimelineSemaphoreProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTimelineSemaphoreProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceTimelineSemaphoreProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxTimelineSemaphoreValueDifference !== undefined) this.maxTimelineSemaphoreValueDifference = data.maxTimelineSemaphoreValueDifference; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTimelineSemaphoreProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxTimelineSemaphoreValueDifference(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set maxTimelineSemaphoreValueDifference(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTimelineSemaphorePropertiesKHR.ts b/api/struct/PhysicalDeviceTimelineSemaphorePropertiesKHR.ts new file mode 100644 index 0000000..7917d4a --- /dev/null +++ b/api/struct/PhysicalDeviceTimelineSemaphorePropertiesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceTimelineSemaphoreProperties } from "./PhysicalDeviceTimelineSemaphoreProperties.ts"; + export type PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceToolProperties.ts b/api/struct/PhysicalDeviceToolProperties.ts new file mode 100644 index 0000000..3622a87 --- /dev/null +++ b/api/struct/PhysicalDeviceToolProperties.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ToolPurposeFlags } from "../def.ts"; + +export interface InitPhysicalDeviceToolProperties { + pNext?: AnyPointer; + name?: Uint8Array; + version?: Uint8Array; + purposes?: ToolPurposeFlags; + description?: Uint8Array; + layer?: Uint8Array; +} + +export class PhysicalDeviceToolProperties implements BaseStruct { + static size = 1048; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceToolProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceToolProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceToolProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceToolProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceToolProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.name !== undefined) this.name = data.name; + if (data.version !== undefined) this.version = data.version; + if (data.purposes !== undefined) this.purposes = data.purposes; + if (data.description !== undefined) this.description = data.description; + if (data.layer !== undefined) this.layer = data.layer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceToolProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_TOOL_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get name(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); + } + + set name(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } + + get version(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 272, 256); + } + + set version(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 272); + } + + get purposes(): number { + return this.#view.getUint32(528, LE); + } + + set purposes(value: ToolPurposeFlags) { + this.#view.setUint32(528, Number(value), LE); + } + + get description(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 532, 256); + } + + set description(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 532); + } + + get layer(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 788, 256); + } + + set layer(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 788); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceToolPropertiesEXT.ts b/api/struct/PhysicalDeviceToolPropertiesEXT.ts new file mode 100644 index 0000000..60fc8c9 --- /dev/null +++ b/api/struct/PhysicalDeviceToolPropertiesEXT.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceToolProperties } from "./PhysicalDeviceToolProperties.ts"; + export type PhysicalDeviceToolPropertiesEXT = PhysicalDeviceToolProperties; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTransformFeedbackFeaturesEXT.ts b/api/struct/PhysicalDeviceTransformFeedbackFeaturesEXT.ts new file mode 100644 index 0000000..c6a7691 --- /dev/null +++ b/api/struct/PhysicalDeviceTransformFeedbackFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceTransformFeedbackFeaturesEXT { + pNext?: AnyPointer; + transformFeedback?: Bool32; + geometryStreams?: Bool32; +} + +export class PhysicalDeviceTransformFeedbackFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceTransformFeedbackFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTransformFeedbackFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceTransformFeedbackFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.transformFeedback !== undefined) this.transformFeedback = data.transformFeedback; + if (data.geometryStreams !== undefined) this.geometryStreams = data.geometryStreams; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTransformFeedbackFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get transformFeedback(): number { + return this.#view.getUint32(16, LE); + } + + set transformFeedback(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get geometryStreams(): number { + return this.#view.getUint32(20, LE); + } + + set geometryStreams(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceTransformFeedbackPropertiesEXT.ts b/api/struct/PhysicalDeviceTransformFeedbackPropertiesEXT.ts new file mode 100644 index 0000000..89a6569 --- /dev/null +++ b/api/struct/PhysicalDeviceTransformFeedbackPropertiesEXT.ts @@ -0,0 +1,170 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceSize, Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceTransformFeedbackPropertiesEXT { + pNext?: AnyPointer; + maxTransformFeedbackStreams?: number; + maxTransformFeedbackBuffers?: number; + maxTransformFeedbackBufferSize?: DeviceSize; + maxTransformFeedbackStreamDataSize?: number; + maxTransformFeedbackBufferDataSize?: number; + maxTransformFeedbackBufferDataStride?: number; + transformFeedbackQueries?: Bool32; + transformFeedbackStreamsLinesTriangles?: Bool32; + transformFeedbackRasterizationStreamSelect?: Bool32; + transformFeedbackDraw?: Bool32; +} + +export class PhysicalDeviceTransformFeedbackPropertiesEXT implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceTransformFeedbackPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTransformFeedbackPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceTransformFeedbackPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxTransformFeedbackStreams !== undefined) this.maxTransformFeedbackStreams = data.maxTransformFeedbackStreams; + if (data.maxTransformFeedbackBuffers !== undefined) this.maxTransformFeedbackBuffers = data.maxTransformFeedbackBuffers; + if (data.maxTransformFeedbackBufferSize !== undefined) this.maxTransformFeedbackBufferSize = data.maxTransformFeedbackBufferSize; + if (data.maxTransformFeedbackStreamDataSize !== undefined) this.maxTransformFeedbackStreamDataSize = data.maxTransformFeedbackStreamDataSize; + if (data.maxTransformFeedbackBufferDataSize !== undefined) this.maxTransformFeedbackBufferDataSize = data.maxTransformFeedbackBufferDataSize; + if (data.maxTransformFeedbackBufferDataStride !== undefined) this.maxTransformFeedbackBufferDataStride = data.maxTransformFeedbackBufferDataStride; + if (data.transformFeedbackQueries !== undefined) this.transformFeedbackQueries = data.transformFeedbackQueries; + if (data.transformFeedbackStreamsLinesTriangles !== undefined) this.transformFeedbackStreamsLinesTriangles = data.transformFeedbackStreamsLinesTriangles; + if (data.transformFeedbackRasterizationStreamSelect !== undefined) this.transformFeedbackRasterizationStreamSelect = data.transformFeedbackRasterizationStreamSelect; + if (data.transformFeedbackDraw !== undefined) this.transformFeedbackDraw = data.transformFeedbackDraw; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTransformFeedbackPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxTransformFeedbackStreams(): number { + return this.#view.getUint32(16, LE); + } + + set maxTransformFeedbackStreams(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxTransformFeedbackBuffers(): number { + return this.#view.getUint32(20, LE); + } + + set maxTransformFeedbackBuffers(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxTransformFeedbackBufferSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set maxTransformFeedbackBufferSize(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get maxTransformFeedbackStreamDataSize(): number { + return this.#view.getUint32(32, LE); + } + + set maxTransformFeedbackStreamDataSize(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get maxTransformFeedbackBufferDataSize(): number { + return this.#view.getUint32(36, LE); + } + + set maxTransformFeedbackBufferDataSize(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get maxTransformFeedbackBufferDataStride(): number { + return this.#view.getUint32(40, LE); + } + + set maxTransformFeedbackBufferDataStride(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get transformFeedbackQueries(): number { + return this.#view.getUint32(44, LE); + } + + set transformFeedbackQueries(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get transformFeedbackStreamsLinesTriangles(): number { + return this.#view.getUint32(48, LE); + } + + set transformFeedbackStreamsLinesTriangles(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get transformFeedbackRasterizationStreamSelect(): number { + return this.#view.getUint32(52, LE); + } + + set transformFeedbackRasterizationStreamSelect(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get transformFeedbackDraw(): number { + return this.#view.getUint32(56, LE); + } + + set transformFeedbackDraw(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceUniformBufferStandardLayoutFeatures.ts b/api/struct/PhysicalDeviceUniformBufferStandardLayoutFeatures.ts new file mode 100644 index 0000000..be07d12 --- /dev/null +++ b/api/struct/PhysicalDeviceUniformBufferStandardLayoutFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceUniformBufferStandardLayoutFeatures { + pNext?: AnyPointer; + uniformBufferStandardLayout?: Bool32; +} + +export class PhysicalDeviceUniformBufferStandardLayoutFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceUniformBufferStandardLayoutFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceUniformBufferStandardLayoutFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceUniformBufferStandardLayoutFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceUniformBufferStandardLayoutFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceUniformBufferStandardLayoutFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.uniformBufferStandardLayout !== undefined) this.uniformBufferStandardLayout = data.uniformBufferStandardLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceUniformBufferStandardLayoutFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get uniformBufferStandardLayout(): number { + return this.#view.getUint32(16, LE); + } + + set uniformBufferStandardLayout(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR.ts b/api/struct/PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR.ts new file mode 100644 index 0000000..e4a2e83 --- /dev/null +++ b/api/struct/PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceUniformBufferStandardLayoutFeatures } from "./PhysicalDeviceUniformBufferStandardLayoutFeatures.ts"; + export type PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVariablePointerFeatures.ts b/api/struct/PhysicalDeviceVariablePointerFeatures.ts new file mode 100644 index 0000000..822cfa6 --- /dev/null +++ b/api/struct/PhysicalDeviceVariablePointerFeatures.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceVariablePointersFeatures } from "./PhysicalDeviceVariablePointersFeatures.ts"; + export type PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVariablePointerFeaturesKHR.ts b/api/struct/PhysicalDeviceVariablePointerFeaturesKHR.ts new file mode 100644 index 0000000..d14182b --- /dev/null +++ b/api/struct/PhysicalDeviceVariablePointerFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceVariablePointersFeatures } from "./PhysicalDeviceVariablePointersFeatures.ts"; + export type PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVariablePointersFeatures.ts b/api/struct/PhysicalDeviceVariablePointersFeatures.ts new file mode 100644 index 0000000..af1364a --- /dev/null +++ b/api/struct/PhysicalDeviceVariablePointersFeatures.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceVariablePointersFeatures { + pNext?: AnyPointer; + variablePointersStorageBuffer?: Bool32; + variablePointers?: Bool32; +} + +export class PhysicalDeviceVariablePointersFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVariablePointersFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVariablePointersFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVariablePointersFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVariablePointersFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVariablePointersFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.variablePointersStorageBuffer !== undefined) this.variablePointersStorageBuffer = data.variablePointersStorageBuffer; + if (data.variablePointers !== undefined) this.variablePointers = data.variablePointers; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVariablePointersFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get variablePointersStorageBuffer(): number { + return this.#view.getUint32(16, LE); + } + + set variablePointersStorageBuffer(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get variablePointers(): number { + return this.#view.getUint32(20, LE); + } + + set variablePointers(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVariablePointersFeaturesKHR.ts b/api/struct/PhysicalDeviceVariablePointersFeaturesKHR.ts new file mode 100644 index 0000000..e9952ee --- /dev/null +++ b/api/struct/PhysicalDeviceVariablePointersFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceVariablePointersFeatures } from "./PhysicalDeviceVariablePointersFeatures.ts"; + export type PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVertexAttributeDivisorFeaturesEXT.ts b/api/struct/PhysicalDeviceVertexAttributeDivisorFeaturesEXT.ts new file mode 100644 index 0000000..7fe9063 --- /dev/null +++ b/api/struct/PhysicalDeviceVertexAttributeDivisorFeaturesEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceVertexAttributeDivisorFeaturesEXT { + pNext?: AnyPointer; + vertexAttributeInstanceRateDivisor?: Bool32; + vertexAttributeInstanceRateZeroDivisor?: Bool32; +} + +export class PhysicalDeviceVertexAttributeDivisorFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVertexAttributeDivisorFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVertexAttributeDivisorFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.vertexAttributeInstanceRateDivisor !== undefined) this.vertexAttributeInstanceRateDivisor = data.vertexAttributeInstanceRateDivisor; + if (data.vertexAttributeInstanceRateZeroDivisor !== undefined) this.vertexAttributeInstanceRateZeroDivisor = data.vertexAttributeInstanceRateZeroDivisor; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get vertexAttributeInstanceRateDivisor(): number { + return this.#view.getUint32(16, LE); + } + + set vertexAttributeInstanceRateDivisor(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get vertexAttributeInstanceRateZeroDivisor(): number { + return this.#view.getUint32(20, LE); + } + + set vertexAttributeInstanceRateZeroDivisor(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVertexAttributeDivisorPropertiesEXT.ts b/api/struct/PhysicalDeviceVertexAttributeDivisorPropertiesEXT.ts new file mode 100644 index 0000000..b339dfc --- /dev/null +++ b/api/struct/PhysicalDeviceVertexAttributeDivisorPropertiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPhysicalDeviceVertexAttributeDivisorPropertiesEXT { + pNext?: AnyPointer; + maxVertexAttribDivisor?: number; +} + +export class PhysicalDeviceVertexAttributeDivisorPropertiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVertexAttributeDivisorPropertiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVertexAttributeDivisorPropertiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxVertexAttribDivisor !== undefined) this.maxVertexAttribDivisor = data.maxVertexAttribDivisor; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxVertexAttribDivisor(): number { + return this.#view.getUint32(16, LE); + } + + set maxVertexAttribDivisor(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVertexInputDynamicStateFeaturesEXT.ts b/api/struct/PhysicalDeviceVertexInputDynamicStateFeaturesEXT.ts new file mode 100644 index 0000000..fe63b7b --- /dev/null +++ b/api/struct/PhysicalDeviceVertexInputDynamicStateFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceVertexInputDynamicStateFeaturesEXT { + pNext?: AnyPointer; + vertexInputDynamicState?: Bool32; +} + +export class PhysicalDeviceVertexInputDynamicStateFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVertexInputDynamicStateFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVertexInputDynamicStateFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.vertexInputDynamicState !== undefined) this.vertexInputDynamicState = data.vertexInputDynamicState; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get vertexInputDynamicState(): number { + return this.#view.getUint32(16, LE); + } + + set vertexInputDynamicState(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVideoFormatInfoKHR.ts b/api/struct/PhysicalDeviceVideoFormatInfoKHR.ts new file mode 100644 index 0000000..ea05f5e --- /dev/null +++ b/api/struct/PhysicalDeviceVideoFormatInfoKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ImageUsageFlags } from "../def.ts"; + +export interface InitPhysicalDeviceVideoFormatInfoKHR { + pNext?: AnyPointer; + imageUsage?: ImageUsageFlags; +} + +export class PhysicalDeviceVideoFormatInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVideoFormatInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVideoFormatInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVideoFormatInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVideoFormatInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVideoFormatInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageUsage !== undefined) this.imageUsage = data.imageUsage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVideoFormatInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageUsage(): number { + return this.#view.getUint32(16, LE); + } + + set imageUsage(value: ImageUsageFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVulkan11Features.ts b/api/struct/PhysicalDeviceVulkan11Features.ts new file mode 100644 index 0000000..51fe6b1 --- /dev/null +++ b/api/struct/PhysicalDeviceVulkan11Features.ts @@ -0,0 +1,190 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceVulkan11Features { + pNext?: AnyPointer; + storageBuffer16BitAccess?: Bool32; + uniformAndStorageBuffer16BitAccess?: Bool32; + storagePushConstant16?: Bool32; + storageInputOutput16?: Bool32; + multiview?: Bool32; + multiviewGeometryShader?: Bool32; + multiviewTessellationShader?: Bool32; + variablePointersStorageBuffer?: Bool32; + variablePointers?: Bool32; + protectedMemory?: Bool32; + samplerYcbcrConversion?: Bool32; + shaderDrawParameters?: Bool32; +} + +export class PhysicalDeviceVulkan11Features implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVulkan11Features); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan11Features) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVulkan11Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVulkan11Features.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVulkan11Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.storageBuffer16BitAccess !== undefined) this.storageBuffer16BitAccess = data.storageBuffer16BitAccess; + if (data.uniformAndStorageBuffer16BitAccess !== undefined) this.uniformAndStorageBuffer16BitAccess = data.uniformAndStorageBuffer16BitAccess; + if (data.storagePushConstant16 !== undefined) this.storagePushConstant16 = data.storagePushConstant16; + if (data.storageInputOutput16 !== undefined) this.storageInputOutput16 = data.storageInputOutput16; + if (data.multiview !== undefined) this.multiview = data.multiview; + if (data.multiviewGeometryShader !== undefined) this.multiviewGeometryShader = data.multiviewGeometryShader; + if (data.multiviewTessellationShader !== undefined) this.multiviewTessellationShader = data.multiviewTessellationShader; + if (data.variablePointersStorageBuffer !== undefined) this.variablePointersStorageBuffer = data.variablePointersStorageBuffer; + if (data.variablePointers !== undefined) this.variablePointers = data.variablePointers; + if (data.protectedMemory !== undefined) this.protectedMemory = data.protectedMemory; + if (data.samplerYcbcrConversion !== undefined) this.samplerYcbcrConversion = data.samplerYcbcrConversion; + if (data.shaderDrawParameters !== undefined) this.shaderDrawParameters = data.shaderDrawParameters; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan11Features.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get storageBuffer16BitAccess(): number { + return this.#view.getUint32(16, LE); + } + + set storageBuffer16BitAccess(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get uniformAndStorageBuffer16BitAccess(): number { + return this.#view.getUint32(20, LE); + } + + set uniformAndStorageBuffer16BitAccess(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get storagePushConstant16(): number { + return this.#view.getUint32(24, LE); + } + + set storagePushConstant16(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get storageInputOutput16(): number { + return this.#view.getUint32(28, LE); + } + + set storageInputOutput16(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get multiview(): number { + return this.#view.getUint32(32, LE); + } + + set multiview(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get multiviewGeometryShader(): number { + return this.#view.getUint32(36, LE); + } + + set multiviewGeometryShader(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get multiviewTessellationShader(): number { + return this.#view.getUint32(40, LE); + } + + set multiviewTessellationShader(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get variablePointersStorageBuffer(): number { + return this.#view.getUint32(44, LE); + } + + set variablePointersStorageBuffer(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get variablePointers(): number { + return this.#view.getUint32(48, LE); + } + + set variablePointers(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get protectedMemory(): number { + return this.#view.getUint32(52, LE); + } + + set protectedMemory(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get samplerYcbcrConversion(): number { + return this.#view.getUint32(56, LE); + } + + set samplerYcbcrConversion(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get shaderDrawParameters(): number { + return this.#view.getUint32(60, LE); + } + + set shaderDrawParameters(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVulkan11Properties.ts b/api/struct/PhysicalDeviceVulkan11Properties.ts new file mode 100644 index 0000000..048f12e --- /dev/null +++ b/api/struct/PhysicalDeviceVulkan11Properties.ts @@ -0,0 +1,220 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PointClippingBehavior } from "../enum.ts"; +import { Bool32, ShaderStageFlags, SubgroupFeatureFlags, DeviceSize } from "../def.ts"; + +export interface InitPhysicalDeviceVulkan11Properties { + pNext?: AnyPointer; + deviceUUID?: Uint8Array; + driverUUID?: Uint8Array; + deviceLUID?: Uint8Array; + deviceNodeMask?: number; + deviceLUIDValid?: Bool32; + subgroupSize?: number; + subgroupSupportedStages?: ShaderStageFlags; + subgroupSupportedOperations?: SubgroupFeatureFlags; + subgroupQuadOperationsInAllStages?: Bool32; + pointClippingBehavior?: PointClippingBehavior; + maxMultiviewViewCount?: number; + maxMultiviewInstanceIndex?: number; + protectedNoFault?: Bool32; + maxPerSetDescriptors?: number; + maxMemoryAllocationSize?: DeviceSize; +} + +export class PhysicalDeviceVulkan11Properties implements BaseStruct { + static size = 112; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVulkan11Properties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan11Properties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVulkan11Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVulkan11Properties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVulkan11Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.deviceUUID !== undefined) this.deviceUUID = data.deviceUUID; + if (data.driverUUID !== undefined) this.driverUUID = data.driverUUID; + if (data.deviceLUID !== undefined) this.deviceLUID = data.deviceLUID; + if (data.deviceNodeMask !== undefined) this.deviceNodeMask = data.deviceNodeMask; + if (data.deviceLUIDValid !== undefined) this.deviceLUIDValid = data.deviceLUIDValid; + if (data.subgroupSize !== undefined) this.subgroupSize = data.subgroupSize; + if (data.subgroupSupportedStages !== undefined) this.subgroupSupportedStages = data.subgroupSupportedStages; + if (data.subgroupSupportedOperations !== undefined) this.subgroupSupportedOperations = data.subgroupSupportedOperations; + if (data.subgroupQuadOperationsInAllStages !== undefined) this.subgroupQuadOperationsInAllStages = data.subgroupQuadOperationsInAllStages; + if (data.pointClippingBehavior !== undefined) this.pointClippingBehavior = data.pointClippingBehavior; + if (data.maxMultiviewViewCount !== undefined) this.maxMultiviewViewCount = data.maxMultiviewViewCount; + if (data.maxMultiviewInstanceIndex !== undefined) this.maxMultiviewInstanceIndex = data.maxMultiviewInstanceIndex; + if (data.protectedNoFault !== undefined) this.protectedNoFault = data.protectedNoFault; + if (data.maxPerSetDescriptors !== undefined) this.maxPerSetDescriptors = data.maxPerSetDescriptors; + if (data.maxMemoryAllocationSize !== undefined) this.maxMemoryAllocationSize = data.maxMemoryAllocationSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan11Properties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get deviceUUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); + } + + set deviceUUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } + + get driverUUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 32, 16); + } + + set driverUUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 32); + } + + get deviceLUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 48, 8); + } + + set deviceLUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 48); + } + + get deviceNodeMask(): number { + return this.#view.getUint32(56, LE); + } + + set deviceNodeMask(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get deviceLUIDValid(): number { + return this.#view.getUint32(60, LE); + } + + set deviceLUIDValid(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get subgroupSize(): number { + return this.#view.getUint32(64, LE); + } + + set subgroupSize(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get subgroupSupportedStages(): number { + return this.#view.getUint32(68, LE); + } + + set subgroupSupportedStages(value: ShaderStageFlags) { + this.#view.setUint32(68, Number(value), LE); + } + + get subgroupSupportedOperations(): number { + return this.#view.getUint32(72, LE); + } + + set subgroupSupportedOperations(value: SubgroupFeatureFlags) { + this.#view.setUint32(72, Number(value), LE); + } + + get subgroupQuadOperationsInAllStages(): number { + return this.#view.getUint32(76, LE); + } + + set subgroupQuadOperationsInAllStages(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } + + get pointClippingBehavior(): number { + return this.#view.getUint32(80, LE); + } + + set pointClippingBehavior(value: PointClippingBehavior) { + this.#view.setUint32(80, Number(value), LE); + } + + get maxMultiviewViewCount(): number { + return this.#view.getUint32(84, LE); + } + + set maxMultiviewViewCount(value: number) { + this.#view.setUint32(84, Number(value), LE); + } + + get maxMultiviewInstanceIndex(): number { + return this.#view.getUint32(88, LE); + } + + set maxMultiviewInstanceIndex(value: number) { + this.#view.setUint32(88, Number(value), LE); + } + + get protectedNoFault(): number { + return this.#view.getUint32(92, LE); + } + + set protectedNoFault(value: Bool32) { + this.#view.setUint32(92, Number(value), LE); + } + + get maxPerSetDescriptors(): number { + return this.#view.getUint32(96, LE); + } + + set maxPerSetDescriptors(value: number) { + this.#view.setUint32(96, Number(value), LE); + } + + get maxMemoryAllocationSize(): bigint { + return this.#view.getBigUint64(104, LE); + } + + set maxMemoryAllocationSize(value: DeviceSize) { + this.#view.setBigUint64(104, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVulkan12Features.ts b/api/struct/PhysicalDeviceVulkan12Features.ts new file mode 100644 index 0000000..b313d87 --- /dev/null +++ b/api/struct/PhysicalDeviceVulkan12Features.ts @@ -0,0 +1,540 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceVulkan12Features { + pNext?: AnyPointer; + samplerMirrorClampToEdge?: Bool32; + drawIndirectCount?: Bool32; + storageBuffer8BitAccess?: Bool32; + uniformAndStorageBuffer8BitAccess?: Bool32; + storagePushConstant8?: Bool32; + shaderBufferInt64Atomics?: Bool32; + shaderSharedInt64Atomics?: Bool32; + shaderFloat16?: Bool32; + shaderInt8?: Bool32; + descriptorIndexing?: Bool32; + shaderInputAttachmentArrayDynamicIndexing?: Bool32; + shaderUniformTexelBufferArrayDynamicIndexing?: Bool32; + shaderStorageTexelBufferArrayDynamicIndexing?: Bool32; + shaderUniformBufferArrayNonUniformIndexing?: Bool32; + shaderSampledImageArrayNonUniformIndexing?: Bool32; + shaderStorageBufferArrayNonUniformIndexing?: Bool32; + shaderStorageImageArrayNonUniformIndexing?: Bool32; + shaderInputAttachmentArrayNonUniformIndexing?: Bool32; + shaderUniformTexelBufferArrayNonUniformIndexing?: Bool32; + shaderStorageTexelBufferArrayNonUniformIndexing?: Bool32; + descriptorBindingUniformBufferUpdateAfterBind?: Bool32; + descriptorBindingSampledImageUpdateAfterBind?: Bool32; + descriptorBindingStorageImageUpdateAfterBind?: Bool32; + descriptorBindingStorageBufferUpdateAfterBind?: Bool32; + descriptorBindingUniformTexelBufferUpdateAfterBind?: Bool32; + descriptorBindingStorageTexelBufferUpdateAfterBind?: Bool32; + descriptorBindingUpdateUnusedWhilePending?: Bool32; + descriptorBindingPartiallyBound?: Bool32; + descriptorBindingVariableDescriptorCount?: Bool32; + runtimeDescriptorArray?: Bool32; + samplerFilterMinmax?: Bool32; + scalarBlockLayout?: Bool32; + imagelessFramebuffer?: Bool32; + uniformBufferStandardLayout?: Bool32; + shaderSubgroupExtendedTypes?: Bool32; + separateDepthStencilLayouts?: Bool32; + hostQueryReset?: Bool32; + timelineSemaphore?: Bool32; + bufferDeviceAddress?: Bool32; + bufferDeviceAddressCaptureReplay?: Bool32; + bufferDeviceAddressMultiDevice?: Bool32; + vulkanMemoryModel?: Bool32; + vulkanMemoryModelDeviceScope?: Bool32; + vulkanMemoryModelAvailabilityVisibilityChains?: Bool32; + shaderOutputViewportIndex?: Bool32; + shaderOutputLayer?: Bool32; + subgroupBroadcastDynamicId?: Bool32; +} + +export class PhysicalDeviceVulkan12Features implements BaseStruct { + static size = 208; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVulkan12Features); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan12Features) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVulkan12Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVulkan12Features.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVulkan12Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.samplerMirrorClampToEdge !== undefined) this.samplerMirrorClampToEdge = data.samplerMirrorClampToEdge; + if (data.drawIndirectCount !== undefined) this.drawIndirectCount = data.drawIndirectCount; + if (data.storageBuffer8BitAccess !== undefined) this.storageBuffer8BitAccess = data.storageBuffer8BitAccess; + if (data.uniformAndStorageBuffer8BitAccess !== undefined) this.uniformAndStorageBuffer8BitAccess = data.uniformAndStorageBuffer8BitAccess; + if (data.storagePushConstant8 !== undefined) this.storagePushConstant8 = data.storagePushConstant8; + if (data.shaderBufferInt64Atomics !== undefined) this.shaderBufferInt64Atomics = data.shaderBufferInt64Atomics; + if (data.shaderSharedInt64Atomics !== undefined) this.shaderSharedInt64Atomics = data.shaderSharedInt64Atomics; + if (data.shaderFloat16 !== undefined) this.shaderFloat16 = data.shaderFloat16; + if (data.shaderInt8 !== undefined) this.shaderInt8 = data.shaderInt8; + if (data.descriptorIndexing !== undefined) this.descriptorIndexing = data.descriptorIndexing; + if (data.shaderInputAttachmentArrayDynamicIndexing !== undefined) this.shaderInputAttachmentArrayDynamicIndexing = data.shaderInputAttachmentArrayDynamicIndexing; + if (data.shaderUniformTexelBufferArrayDynamicIndexing !== undefined) this.shaderUniformTexelBufferArrayDynamicIndexing = data.shaderUniformTexelBufferArrayDynamicIndexing; + if (data.shaderStorageTexelBufferArrayDynamicIndexing !== undefined) this.shaderStorageTexelBufferArrayDynamicIndexing = data.shaderStorageTexelBufferArrayDynamicIndexing; + if (data.shaderUniformBufferArrayNonUniformIndexing !== undefined) this.shaderUniformBufferArrayNonUniformIndexing = data.shaderUniformBufferArrayNonUniformIndexing; + if (data.shaderSampledImageArrayNonUniformIndexing !== undefined) this.shaderSampledImageArrayNonUniformIndexing = data.shaderSampledImageArrayNonUniformIndexing; + if (data.shaderStorageBufferArrayNonUniformIndexing !== undefined) this.shaderStorageBufferArrayNonUniformIndexing = data.shaderStorageBufferArrayNonUniformIndexing; + if (data.shaderStorageImageArrayNonUniformIndexing !== undefined) this.shaderStorageImageArrayNonUniformIndexing = data.shaderStorageImageArrayNonUniformIndexing; + if (data.shaderInputAttachmentArrayNonUniformIndexing !== undefined) this.shaderInputAttachmentArrayNonUniformIndexing = data.shaderInputAttachmentArrayNonUniformIndexing; + if (data.shaderUniformTexelBufferArrayNonUniformIndexing !== undefined) this.shaderUniformTexelBufferArrayNonUniformIndexing = data.shaderUniformTexelBufferArrayNonUniformIndexing; + if (data.shaderStorageTexelBufferArrayNonUniformIndexing !== undefined) this.shaderStorageTexelBufferArrayNonUniformIndexing = data.shaderStorageTexelBufferArrayNonUniformIndexing; + if (data.descriptorBindingUniformBufferUpdateAfterBind !== undefined) this.descriptorBindingUniformBufferUpdateAfterBind = data.descriptorBindingUniformBufferUpdateAfterBind; + if (data.descriptorBindingSampledImageUpdateAfterBind !== undefined) this.descriptorBindingSampledImageUpdateAfterBind = data.descriptorBindingSampledImageUpdateAfterBind; + if (data.descriptorBindingStorageImageUpdateAfterBind !== undefined) this.descriptorBindingStorageImageUpdateAfterBind = data.descriptorBindingStorageImageUpdateAfterBind; + if (data.descriptorBindingStorageBufferUpdateAfterBind !== undefined) this.descriptorBindingStorageBufferUpdateAfterBind = data.descriptorBindingStorageBufferUpdateAfterBind; + if (data.descriptorBindingUniformTexelBufferUpdateAfterBind !== undefined) this.descriptorBindingUniformTexelBufferUpdateAfterBind = data.descriptorBindingUniformTexelBufferUpdateAfterBind; + if (data.descriptorBindingStorageTexelBufferUpdateAfterBind !== undefined) this.descriptorBindingStorageTexelBufferUpdateAfterBind = data.descriptorBindingStorageTexelBufferUpdateAfterBind; + if (data.descriptorBindingUpdateUnusedWhilePending !== undefined) this.descriptorBindingUpdateUnusedWhilePending = data.descriptorBindingUpdateUnusedWhilePending; + if (data.descriptorBindingPartiallyBound !== undefined) this.descriptorBindingPartiallyBound = data.descriptorBindingPartiallyBound; + if (data.descriptorBindingVariableDescriptorCount !== undefined) this.descriptorBindingVariableDescriptorCount = data.descriptorBindingVariableDescriptorCount; + if (data.runtimeDescriptorArray !== undefined) this.runtimeDescriptorArray = data.runtimeDescriptorArray; + if (data.samplerFilterMinmax !== undefined) this.samplerFilterMinmax = data.samplerFilterMinmax; + if (data.scalarBlockLayout !== undefined) this.scalarBlockLayout = data.scalarBlockLayout; + if (data.imagelessFramebuffer !== undefined) this.imagelessFramebuffer = data.imagelessFramebuffer; + if (data.uniformBufferStandardLayout !== undefined) this.uniformBufferStandardLayout = data.uniformBufferStandardLayout; + if (data.shaderSubgroupExtendedTypes !== undefined) this.shaderSubgroupExtendedTypes = data.shaderSubgroupExtendedTypes; + if (data.separateDepthStencilLayouts !== undefined) this.separateDepthStencilLayouts = data.separateDepthStencilLayouts; + if (data.hostQueryReset !== undefined) this.hostQueryReset = data.hostQueryReset; + if (data.timelineSemaphore !== undefined) this.timelineSemaphore = data.timelineSemaphore; + if (data.bufferDeviceAddress !== undefined) this.bufferDeviceAddress = data.bufferDeviceAddress; + if (data.bufferDeviceAddressCaptureReplay !== undefined) this.bufferDeviceAddressCaptureReplay = data.bufferDeviceAddressCaptureReplay; + if (data.bufferDeviceAddressMultiDevice !== undefined) this.bufferDeviceAddressMultiDevice = data.bufferDeviceAddressMultiDevice; + if (data.vulkanMemoryModel !== undefined) this.vulkanMemoryModel = data.vulkanMemoryModel; + if (data.vulkanMemoryModelDeviceScope !== undefined) this.vulkanMemoryModelDeviceScope = data.vulkanMemoryModelDeviceScope; + if (data.vulkanMemoryModelAvailabilityVisibilityChains !== undefined) this.vulkanMemoryModelAvailabilityVisibilityChains = data.vulkanMemoryModelAvailabilityVisibilityChains; + if (data.shaderOutputViewportIndex !== undefined) this.shaderOutputViewportIndex = data.shaderOutputViewportIndex; + if (data.shaderOutputLayer !== undefined) this.shaderOutputLayer = data.shaderOutputLayer; + if (data.subgroupBroadcastDynamicId !== undefined) this.subgroupBroadcastDynamicId = data.subgroupBroadcastDynamicId; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan12Features.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get samplerMirrorClampToEdge(): number { + return this.#view.getUint32(16, LE); + } + + set samplerMirrorClampToEdge(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get drawIndirectCount(): number { + return this.#view.getUint32(20, LE); + } + + set drawIndirectCount(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get storageBuffer8BitAccess(): number { + return this.#view.getUint32(24, LE); + } + + set storageBuffer8BitAccess(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get uniformAndStorageBuffer8BitAccess(): number { + return this.#view.getUint32(28, LE); + } + + set uniformAndStorageBuffer8BitAccess(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get storagePushConstant8(): number { + return this.#view.getUint32(32, LE); + } + + set storagePushConstant8(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get shaderBufferInt64Atomics(): number { + return this.#view.getUint32(36, LE); + } + + set shaderBufferInt64Atomics(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get shaderSharedInt64Atomics(): number { + return this.#view.getUint32(40, LE); + } + + set shaderSharedInt64Atomics(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get shaderFloat16(): number { + return this.#view.getUint32(44, LE); + } + + set shaderFloat16(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get shaderInt8(): number { + return this.#view.getUint32(48, LE); + } + + set shaderInt8(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get descriptorIndexing(): number { + return this.#view.getUint32(52, LE); + } + + set descriptorIndexing(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get shaderInputAttachmentArrayDynamicIndexing(): number { + return this.#view.getUint32(56, LE); + } + + set shaderInputAttachmentArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get shaderUniformTexelBufferArrayDynamicIndexing(): number { + return this.#view.getUint32(60, LE); + } + + set shaderUniformTexelBufferArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get shaderStorageTexelBufferArrayDynamicIndexing(): number { + return this.#view.getUint32(64, LE); + } + + set shaderStorageTexelBufferArrayDynamicIndexing(value: Bool32) { + this.#view.setUint32(64, Number(value), LE); + } + + get shaderUniformBufferArrayNonUniformIndexing(): number { + return this.#view.getUint32(68, LE); + } + + set shaderUniformBufferArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get shaderSampledImageArrayNonUniformIndexing(): number { + return this.#view.getUint32(72, LE); + } + + set shaderSampledImageArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } + + get shaderStorageBufferArrayNonUniformIndexing(): number { + return this.#view.getUint32(76, LE); + } + + set shaderStorageBufferArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } + + get shaderStorageImageArrayNonUniformIndexing(): number { + return this.#view.getUint32(80, LE); + } + + set shaderStorageImageArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(80, Number(value), LE); + } + + get shaderInputAttachmentArrayNonUniformIndexing(): number { + return this.#view.getUint32(84, LE); + } + + set shaderInputAttachmentArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(84, Number(value), LE); + } + + get shaderUniformTexelBufferArrayNonUniformIndexing(): number { + return this.#view.getUint32(88, LE); + } + + set shaderUniformTexelBufferArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(88, Number(value), LE); + } + + get shaderStorageTexelBufferArrayNonUniformIndexing(): number { + return this.#view.getUint32(92, LE); + } + + set shaderStorageTexelBufferArrayNonUniformIndexing(value: Bool32) { + this.#view.setUint32(92, Number(value), LE); + } + + get descriptorBindingUniformBufferUpdateAfterBind(): number { + return this.#view.getUint32(96, LE); + } + + set descriptorBindingUniformBufferUpdateAfterBind(value: Bool32) { + this.#view.setUint32(96, Number(value), LE); + } + + get descriptorBindingSampledImageUpdateAfterBind(): number { + return this.#view.getUint32(100, LE); + } + + set descriptorBindingSampledImageUpdateAfterBind(value: Bool32) { + this.#view.setUint32(100, Number(value), LE); + } + + get descriptorBindingStorageImageUpdateAfterBind(): number { + return this.#view.getUint32(104, LE); + } + + set descriptorBindingStorageImageUpdateAfterBind(value: Bool32) { + this.#view.setUint32(104, Number(value), LE); + } + + get descriptorBindingStorageBufferUpdateAfterBind(): number { + return this.#view.getUint32(108, LE); + } + + set descriptorBindingStorageBufferUpdateAfterBind(value: Bool32) { + this.#view.setUint32(108, Number(value), LE); + } + + get descriptorBindingUniformTexelBufferUpdateAfterBind(): number { + return this.#view.getUint32(112, LE); + } + + set descriptorBindingUniformTexelBufferUpdateAfterBind(value: Bool32) { + this.#view.setUint32(112, Number(value), LE); + } + + get descriptorBindingStorageTexelBufferUpdateAfterBind(): number { + return this.#view.getUint32(116, LE); + } + + set descriptorBindingStorageTexelBufferUpdateAfterBind(value: Bool32) { + this.#view.setUint32(116, Number(value), LE); + } + + get descriptorBindingUpdateUnusedWhilePending(): number { + return this.#view.getUint32(120, LE); + } + + set descriptorBindingUpdateUnusedWhilePending(value: Bool32) { + this.#view.setUint32(120, Number(value), LE); + } + + get descriptorBindingPartiallyBound(): number { + return this.#view.getUint32(124, LE); + } + + set descriptorBindingPartiallyBound(value: Bool32) { + this.#view.setUint32(124, Number(value), LE); + } + + get descriptorBindingVariableDescriptorCount(): number { + return this.#view.getUint32(128, LE); + } + + set descriptorBindingVariableDescriptorCount(value: Bool32) { + this.#view.setUint32(128, Number(value), LE); + } + + get runtimeDescriptorArray(): number { + return this.#view.getUint32(132, LE); + } + + set runtimeDescriptorArray(value: Bool32) { + this.#view.setUint32(132, Number(value), LE); + } + + get samplerFilterMinmax(): number { + return this.#view.getUint32(136, LE); + } + + set samplerFilterMinmax(value: Bool32) { + this.#view.setUint32(136, Number(value), LE); + } + + get scalarBlockLayout(): number { + return this.#view.getUint32(140, LE); + } + + set scalarBlockLayout(value: Bool32) { + this.#view.setUint32(140, Number(value), LE); + } + + get imagelessFramebuffer(): number { + return this.#view.getUint32(144, LE); + } + + set imagelessFramebuffer(value: Bool32) { + this.#view.setUint32(144, Number(value), LE); + } + + get uniformBufferStandardLayout(): number { + return this.#view.getUint32(148, LE); + } + + set uniformBufferStandardLayout(value: Bool32) { + this.#view.setUint32(148, Number(value), LE); + } + + get shaderSubgroupExtendedTypes(): number { + return this.#view.getUint32(152, LE); + } + + set shaderSubgroupExtendedTypes(value: Bool32) { + this.#view.setUint32(152, Number(value), LE); + } + + get separateDepthStencilLayouts(): number { + return this.#view.getUint32(156, LE); + } + + set separateDepthStencilLayouts(value: Bool32) { + this.#view.setUint32(156, Number(value), LE); + } + + get hostQueryReset(): number { + return this.#view.getUint32(160, LE); + } + + set hostQueryReset(value: Bool32) { + this.#view.setUint32(160, Number(value), LE); + } + + get timelineSemaphore(): number { + return this.#view.getUint32(164, LE); + } + + set timelineSemaphore(value: Bool32) { + this.#view.setUint32(164, Number(value), LE); + } + + get bufferDeviceAddress(): number { + return this.#view.getUint32(168, LE); + } + + set bufferDeviceAddress(value: Bool32) { + this.#view.setUint32(168, Number(value), LE); + } + + get bufferDeviceAddressCaptureReplay(): number { + return this.#view.getUint32(172, LE); + } + + set bufferDeviceAddressCaptureReplay(value: Bool32) { + this.#view.setUint32(172, Number(value), LE); + } + + get bufferDeviceAddressMultiDevice(): number { + return this.#view.getUint32(176, LE); + } + + set bufferDeviceAddressMultiDevice(value: Bool32) { + this.#view.setUint32(176, Number(value), LE); + } + + get vulkanMemoryModel(): number { + return this.#view.getUint32(180, LE); + } + + set vulkanMemoryModel(value: Bool32) { + this.#view.setUint32(180, Number(value), LE); + } + + get vulkanMemoryModelDeviceScope(): number { + return this.#view.getUint32(184, LE); + } + + set vulkanMemoryModelDeviceScope(value: Bool32) { + this.#view.setUint32(184, Number(value), LE); + } + + get vulkanMemoryModelAvailabilityVisibilityChains(): number { + return this.#view.getUint32(188, LE); + } + + set vulkanMemoryModelAvailabilityVisibilityChains(value: Bool32) { + this.#view.setUint32(188, Number(value), LE); + } + + get shaderOutputViewportIndex(): number { + return this.#view.getUint32(192, LE); + } + + set shaderOutputViewportIndex(value: Bool32) { + this.#view.setUint32(192, Number(value), LE); + } + + get shaderOutputLayer(): number { + return this.#view.getUint32(196, LE); + } + + set shaderOutputLayer(value: Bool32) { + this.#view.setUint32(196, Number(value), LE); + } + + get subgroupBroadcastDynamicId(): number { + return this.#view.getUint32(200, LE); + } + + set subgroupBroadcastDynamicId(value: Bool32) { + this.#view.setUint32(200, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVulkan12Properties.ts b/api/struct/PhysicalDeviceVulkan12Properties.ts new file mode 100644 index 0000000..45e7853 --- /dev/null +++ b/api/struct/PhysicalDeviceVulkan12Properties.ts @@ -0,0 +1,594 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ConformanceVersion} from "./ConformanceVersion.ts"; +import { StructureType, DriverId, ShaderFloatControlsIndependence } from "../enum.ts"; +import { Bool32, ResolveModeFlags, SampleCountFlags } from "../def.ts"; + +export interface InitPhysicalDeviceVulkan12Properties { + pNext?: AnyPointer; + driverID?: DriverId; + driverName?: Uint8Array; + driverInfo?: Uint8Array; + conformanceVersion?: ConformanceVersion; + denormBehaviorIndependence?: ShaderFloatControlsIndependence; + roundingModeIndependence?: ShaderFloatControlsIndependence; + shaderSignedZeroInfNanPreserveFloat16?: Bool32; + shaderSignedZeroInfNanPreserveFloat32?: Bool32; + shaderSignedZeroInfNanPreserveFloat64?: Bool32; + shaderDenormPreserveFloat16?: Bool32; + shaderDenormPreserveFloat32?: Bool32; + shaderDenormPreserveFloat64?: Bool32; + shaderDenormFlushToZeroFloat16?: Bool32; + shaderDenormFlushToZeroFloat32?: Bool32; + shaderDenormFlushToZeroFloat64?: Bool32; + shaderRoundingModeRTEFloat16?: Bool32; + shaderRoundingModeRTEFloat32?: Bool32; + shaderRoundingModeRTEFloat64?: Bool32; + shaderRoundingModeRTZFloat16?: Bool32; + shaderRoundingModeRTZFloat32?: Bool32; + shaderRoundingModeRTZFloat64?: Bool32; + maxUpdateAfterBindDescriptorsInAllPools?: number; + shaderUniformBufferArrayNonUniformIndexingNative?: Bool32; + shaderSampledImageArrayNonUniformIndexingNative?: Bool32; + shaderStorageBufferArrayNonUniformIndexingNative?: Bool32; + shaderStorageImageArrayNonUniformIndexingNative?: Bool32; + shaderInputAttachmentArrayNonUniformIndexingNative?: Bool32; + robustBufferAccessUpdateAfterBind?: Bool32; + quadDivergentImplicitLod?: Bool32; + maxPerStageDescriptorUpdateAfterBindSamplers?: number; + maxPerStageDescriptorUpdateAfterBindUniformBuffers?: number; + maxPerStageDescriptorUpdateAfterBindStorageBuffers?: number; + maxPerStageDescriptorUpdateAfterBindSampledImages?: number; + maxPerStageDescriptorUpdateAfterBindStorageImages?: number; + maxPerStageDescriptorUpdateAfterBindInputAttachments?: number; + maxPerStageUpdateAfterBindResources?: number; + maxDescriptorSetUpdateAfterBindSamplers?: number; + maxDescriptorSetUpdateAfterBindUniformBuffers?: number; + maxDescriptorSetUpdateAfterBindUniformBuffersDynamic?: number; + maxDescriptorSetUpdateAfterBindStorageBuffers?: number; + maxDescriptorSetUpdateAfterBindStorageBuffersDynamic?: number; + maxDescriptorSetUpdateAfterBindSampledImages?: number; + maxDescriptorSetUpdateAfterBindStorageImages?: number; + maxDescriptorSetUpdateAfterBindInputAttachments?: number; + supportedDepthResolveModes?: ResolveModeFlags; + supportedStencilResolveModes?: ResolveModeFlags; + independentResolveNone?: Bool32; + independentResolve?: Bool32; + filterMinmaxSingleComponentFormats?: Bool32; + filterMinmaxImageComponentMapping?: Bool32; + maxTimelineSemaphoreValueDifference?: number | bigint; + framebufferIntegerColorSampleCounts?: SampleCountFlags; +} + +export class PhysicalDeviceVulkan12Properties implements BaseStruct { + static size = 736; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVulkan12Properties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan12Properties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVulkan12Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVulkan12Properties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVulkan12Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.driverID !== undefined) this.driverID = data.driverID; + if (data.driverName !== undefined) this.driverName = data.driverName; + if (data.driverInfo !== undefined) this.driverInfo = data.driverInfo; + if (data.conformanceVersion !== undefined) this.conformanceVersion = data.conformanceVersion; + if (data.denormBehaviorIndependence !== undefined) this.denormBehaviorIndependence = data.denormBehaviorIndependence; + if (data.roundingModeIndependence !== undefined) this.roundingModeIndependence = data.roundingModeIndependence; + if (data.shaderSignedZeroInfNanPreserveFloat16 !== undefined) this.shaderSignedZeroInfNanPreserveFloat16 = data.shaderSignedZeroInfNanPreserveFloat16; + if (data.shaderSignedZeroInfNanPreserveFloat32 !== undefined) this.shaderSignedZeroInfNanPreserveFloat32 = data.shaderSignedZeroInfNanPreserveFloat32; + if (data.shaderSignedZeroInfNanPreserveFloat64 !== undefined) this.shaderSignedZeroInfNanPreserveFloat64 = data.shaderSignedZeroInfNanPreserveFloat64; + if (data.shaderDenormPreserveFloat16 !== undefined) this.shaderDenormPreserveFloat16 = data.shaderDenormPreserveFloat16; + if (data.shaderDenormPreserveFloat32 !== undefined) this.shaderDenormPreserveFloat32 = data.shaderDenormPreserveFloat32; + if (data.shaderDenormPreserveFloat64 !== undefined) this.shaderDenormPreserveFloat64 = data.shaderDenormPreserveFloat64; + if (data.shaderDenormFlushToZeroFloat16 !== undefined) this.shaderDenormFlushToZeroFloat16 = data.shaderDenormFlushToZeroFloat16; + if (data.shaderDenormFlushToZeroFloat32 !== undefined) this.shaderDenormFlushToZeroFloat32 = data.shaderDenormFlushToZeroFloat32; + if (data.shaderDenormFlushToZeroFloat64 !== undefined) this.shaderDenormFlushToZeroFloat64 = data.shaderDenormFlushToZeroFloat64; + if (data.shaderRoundingModeRTEFloat16 !== undefined) this.shaderRoundingModeRTEFloat16 = data.shaderRoundingModeRTEFloat16; + if (data.shaderRoundingModeRTEFloat32 !== undefined) this.shaderRoundingModeRTEFloat32 = data.shaderRoundingModeRTEFloat32; + if (data.shaderRoundingModeRTEFloat64 !== undefined) this.shaderRoundingModeRTEFloat64 = data.shaderRoundingModeRTEFloat64; + if (data.shaderRoundingModeRTZFloat16 !== undefined) this.shaderRoundingModeRTZFloat16 = data.shaderRoundingModeRTZFloat16; + if (data.shaderRoundingModeRTZFloat32 !== undefined) this.shaderRoundingModeRTZFloat32 = data.shaderRoundingModeRTZFloat32; + if (data.shaderRoundingModeRTZFloat64 !== undefined) this.shaderRoundingModeRTZFloat64 = data.shaderRoundingModeRTZFloat64; + if (data.maxUpdateAfterBindDescriptorsInAllPools !== undefined) this.maxUpdateAfterBindDescriptorsInAllPools = data.maxUpdateAfterBindDescriptorsInAllPools; + if (data.shaderUniformBufferArrayNonUniformIndexingNative !== undefined) this.shaderUniformBufferArrayNonUniformIndexingNative = data.shaderUniformBufferArrayNonUniformIndexingNative; + if (data.shaderSampledImageArrayNonUniformIndexingNative !== undefined) this.shaderSampledImageArrayNonUniformIndexingNative = data.shaderSampledImageArrayNonUniformIndexingNative; + if (data.shaderStorageBufferArrayNonUniformIndexingNative !== undefined) this.shaderStorageBufferArrayNonUniformIndexingNative = data.shaderStorageBufferArrayNonUniformIndexingNative; + if (data.shaderStorageImageArrayNonUniformIndexingNative !== undefined) this.shaderStorageImageArrayNonUniformIndexingNative = data.shaderStorageImageArrayNonUniformIndexingNative; + if (data.shaderInputAttachmentArrayNonUniformIndexingNative !== undefined) this.shaderInputAttachmentArrayNonUniformIndexingNative = data.shaderInputAttachmentArrayNonUniformIndexingNative; + if (data.robustBufferAccessUpdateAfterBind !== undefined) this.robustBufferAccessUpdateAfterBind = data.robustBufferAccessUpdateAfterBind; + if (data.quadDivergentImplicitLod !== undefined) this.quadDivergentImplicitLod = data.quadDivergentImplicitLod; + if (data.maxPerStageDescriptorUpdateAfterBindSamplers !== undefined) this.maxPerStageDescriptorUpdateAfterBindSamplers = data.maxPerStageDescriptorUpdateAfterBindSamplers; + if (data.maxPerStageDescriptorUpdateAfterBindUniformBuffers !== undefined) this.maxPerStageDescriptorUpdateAfterBindUniformBuffers = data.maxPerStageDescriptorUpdateAfterBindUniformBuffers; + if (data.maxPerStageDescriptorUpdateAfterBindStorageBuffers !== undefined) this.maxPerStageDescriptorUpdateAfterBindStorageBuffers = data.maxPerStageDescriptorUpdateAfterBindStorageBuffers; + if (data.maxPerStageDescriptorUpdateAfterBindSampledImages !== undefined) this.maxPerStageDescriptorUpdateAfterBindSampledImages = data.maxPerStageDescriptorUpdateAfterBindSampledImages; + if (data.maxPerStageDescriptorUpdateAfterBindStorageImages !== undefined) this.maxPerStageDescriptorUpdateAfterBindStorageImages = data.maxPerStageDescriptorUpdateAfterBindStorageImages; + if (data.maxPerStageDescriptorUpdateAfterBindInputAttachments !== undefined) this.maxPerStageDescriptorUpdateAfterBindInputAttachments = data.maxPerStageDescriptorUpdateAfterBindInputAttachments; + if (data.maxPerStageUpdateAfterBindResources !== undefined) this.maxPerStageUpdateAfterBindResources = data.maxPerStageUpdateAfterBindResources; + if (data.maxDescriptorSetUpdateAfterBindSamplers !== undefined) this.maxDescriptorSetUpdateAfterBindSamplers = data.maxDescriptorSetUpdateAfterBindSamplers; + if (data.maxDescriptorSetUpdateAfterBindUniformBuffers !== undefined) this.maxDescriptorSetUpdateAfterBindUniformBuffers = data.maxDescriptorSetUpdateAfterBindUniformBuffers; + if (data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic !== undefined) this.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; + if (data.maxDescriptorSetUpdateAfterBindStorageBuffers !== undefined) this.maxDescriptorSetUpdateAfterBindStorageBuffers = data.maxDescriptorSetUpdateAfterBindStorageBuffers; + if (data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic !== undefined) this.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; + if (data.maxDescriptorSetUpdateAfterBindSampledImages !== undefined) this.maxDescriptorSetUpdateAfterBindSampledImages = data.maxDescriptorSetUpdateAfterBindSampledImages; + if (data.maxDescriptorSetUpdateAfterBindStorageImages !== undefined) this.maxDescriptorSetUpdateAfterBindStorageImages = data.maxDescriptorSetUpdateAfterBindStorageImages; + if (data.maxDescriptorSetUpdateAfterBindInputAttachments !== undefined) this.maxDescriptorSetUpdateAfterBindInputAttachments = data.maxDescriptorSetUpdateAfterBindInputAttachments; + if (data.supportedDepthResolveModes !== undefined) this.supportedDepthResolveModes = data.supportedDepthResolveModes; + if (data.supportedStencilResolveModes !== undefined) this.supportedStencilResolveModes = data.supportedStencilResolveModes; + if (data.independentResolveNone !== undefined) this.independentResolveNone = data.independentResolveNone; + if (data.independentResolve !== undefined) this.independentResolve = data.independentResolve; + if (data.filterMinmaxSingleComponentFormats !== undefined) this.filterMinmaxSingleComponentFormats = data.filterMinmaxSingleComponentFormats; + if (data.filterMinmaxImageComponentMapping !== undefined) this.filterMinmaxImageComponentMapping = data.filterMinmaxImageComponentMapping; + if (data.maxTimelineSemaphoreValueDifference !== undefined) this.maxTimelineSemaphoreValueDifference = data.maxTimelineSemaphoreValueDifference; + if (data.framebufferIntegerColorSampleCounts !== undefined) this.framebufferIntegerColorSampleCounts = data.framebufferIntegerColorSampleCounts; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan12Properties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get driverID(): number { + return this.#view.getUint32(16, LE); + } + + set driverID(value: DriverId) { + this.#view.setUint32(16, Number(value), LE); + } + + get driverName(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); + } + + set driverName(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } + + get driverInfo(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); + } + + set driverInfo(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 276); + } + + get conformanceVersion(): ConformanceVersion { + return new ConformanceVersion(this.#data.subarray(532, 532 + ConformanceVersion.size)); + } + + set conformanceVersion(value: ConformanceVersion) { + if (value[BUFFER].byteLength < ConformanceVersion.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 532); + } + + get denormBehaviorIndependence(): number { + return this.#view.getUint32(536, LE); + } + + set denormBehaviorIndependence(value: ShaderFloatControlsIndependence) { + this.#view.setUint32(536, Number(value), LE); + } + + get roundingModeIndependence(): number { + return this.#view.getUint32(540, LE); + } + + set roundingModeIndependence(value: ShaderFloatControlsIndependence) { + this.#view.setUint32(540, Number(value), LE); + } + + get shaderSignedZeroInfNanPreserveFloat16(): number { + return this.#view.getUint32(544, LE); + } + + set shaderSignedZeroInfNanPreserveFloat16(value: Bool32) { + this.#view.setUint32(544, Number(value), LE); + } + + get shaderSignedZeroInfNanPreserveFloat32(): number { + return this.#view.getUint32(548, LE); + } + + set shaderSignedZeroInfNanPreserveFloat32(value: Bool32) { + this.#view.setUint32(548, Number(value), LE); + } + + get shaderSignedZeroInfNanPreserveFloat64(): number { + return this.#view.getUint32(552, LE); + } + + set shaderSignedZeroInfNanPreserveFloat64(value: Bool32) { + this.#view.setUint32(552, Number(value), LE); + } + + get shaderDenormPreserveFloat16(): number { + return this.#view.getUint32(556, LE); + } + + set shaderDenormPreserveFloat16(value: Bool32) { + this.#view.setUint32(556, Number(value), LE); + } + + get shaderDenormPreserveFloat32(): number { + return this.#view.getUint32(560, LE); + } + + set shaderDenormPreserveFloat32(value: Bool32) { + this.#view.setUint32(560, Number(value), LE); + } + + get shaderDenormPreserveFloat64(): number { + return this.#view.getUint32(564, LE); + } + + set shaderDenormPreserveFloat64(value: Bool32) { + this.#view.setUint32(564, Number(value), LE); + } + + get shaderDenormFlushToZeroFloat16(): number { + return this.#view.getUint32(568, LE); + } + + set shaderDenormFlushToZeroFloat16(value: Bool32) { + this.#view.setUint32(568, Number(value), LE); + } + + get shaderDenormFlushToZeroFloat32(): number { + return this.#view.getUint32(572, LE); + } + + set shaderDenormFlushToZeroFloat32(value: Bool32) { + this.#view.setUint32(572, Number(value), LE); + } + + get shaderDenormFlushToZeroFloat64(): number { + return this.#view.getUint32(576, LE); + } + + set shaderDenormFlushToZeroFloat64(value: Bool32) { + this.#view.setUint32(576, Number(value), LE); + } + + get shaderRoundingModeRTEFloat16(): number { + return this.#view.getUint32(580, LE); + } + + set shaderRoundingModeRTEFloat16(value: Bool32) { + this.#view.setUint32(580, Number(value), LE); + } + + get shaderRoundingModeRTEFloat32(): number { + return this.#view.getUint32(584, LE); + } + + set shaderRoundingModeRTEFloat32(value: Bool32) { + this.#view.setUint32(584, Number(value), LE); + } + + get shaderRoundingModeRTEFloat64(): number { + return this.#view.getUint32(588, LE); + } + + set shaderRoundingModeRTEFloat64(value: Bool32) { + this.#view.setUint32(588, Number(value), LE); + } + + get shaderRoundingModeRTZFloat16(): number { + return this.#view.getUint32(592, LE); + } + + set shaderRoundingModeRTZFloat16(value: Bool32) { + this.#view.setUint32(592, Number(value), LE); + } + + get shaderRoundingModeRTZFloat32(): number { + return this.#view.getUint32(596, LE); + } + + set shaderRoundingModeRTZFloat32(value: Bool32) { + this.#view.setUint32(596, Number(value), LE); + } + + get shaderRoundingModeRTZFloat64(): number { + return this.#view.getUint32(600, LE); + } + + set shaderRoundingModeRTZFloat64(value: Bool32) { + this.#view.setUint32(600, Number(value), LE); + } + + get maxUpdateAfterBindDescriptorsInAllPools(): number { + return this.#view.getUint32(604, LE); + } + + set maxUpdateAfterBindDescriptorsInAllPools(value: number) { + this.#view.setUint32(604, Number(value), LE); + } + + get shaderUniformBufferArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(608, LE); + } + + set shaderUniformBufferArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(608, Number(value), LE); + } + + get shaderSampledImageArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(612, LE); + } + + set shaderSampledImageArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(612, Number(value), LE); + } + + get shaderStorageBufferArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(616, LE); + } + + set shaderStorageBufferArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(616, Number(value), LE); + } + + get shaderStorageImageArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(620, LE); + } + + set shaderStorageImageArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(620, Number(value), LE); + } + + get shaderInputAttachmentArrayNonUniformIndexingNative(): number { + return this.#view.getUint32(624, LE); + } + + set shaderInputAttachmentArrayNonUniformIndexingNative(value: Bool32) { + this.#view.setUint32(624, Number(value), LE); + } + + get robustBufferAccessUpdateAfterBind(): number { + return this.#view.getUint32(628, LE); + } + + set robustBufferAccessUpdateAfterBind(value: Bool32) { + this.#view.setUint32(628, Number(value), LE); + } + + get quadDivergentImplicitLod(): number { + return this.#view.getUint32(632, LE); + } + + set quadDivergentImplicitLod(value: Bool32) { + this.#view.setUint32(632, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindSamplers(): number { + return this.#view.getUint32(636, LE); + } + + set maxPerStageDescriptorUpdateAfterBindSamplers(value: number) { + this.#view.setUint32(636, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindUniformBuffers(): number { + return this.#view.getUint32(640, LE); + } + + set maxPerStageDescriptorUpdateAfterBindUniformBuffers(value: number) { + this.#view.setUint32(640, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindStorageBuffers(): number { + return this.#view.getUint32(644, LE); + } + + set maxPerStageDescriptorUpdateAfterBindStorageBuffers(value: number) { + this.#view.setUint32(644, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindSampledImages(): number { + return this.#view.getUint32(648, LE); + } + + set maxPerStageDescriptorUpdateAfterBindSampledImages(value: number) { + this.#view.setUint32(648, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindStorageImages(): number { + return this.#view.getUint32(652, LE); + } + + set maxPerStageDescriptorUpdateAfterBindStorageImages(value: number) { + this.#view.setUint32(652, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindInputAttachments(): number { + return this.#view.getUint32(656, LE); + } + + set maxPerStageDescriptorUpdateAfterBindInputAttachments(value: number) { + this.#view.setUint32(656, Number(value), LE); + } + + get maxPerStageUpdateAfterBindResources(): number { + return this.#view.getUint32(660, LE); + } + + set maxPerStageUpdateAfterBindResources(value: number) { + this.#view.setUint32(660, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindSamplers(): number { + return this.#view.getUint32(664, LE); + } + + set maxDescriptorSetUpdateAfterBindSamplers(value: number) { + this.#view.setUint32(664, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindUniformBuffers(): number { + return this.#view.getUint32(668, LE); + } + + set maxDescriptorSetUpdateAfterBindUniformBuffers(value: number) { + this.#view.setUint32(668, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(): number { + return this.#view.getUint32(672, LE); + } + + set maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(value: number) { + this.#view.setUint32(672, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindStorageBuffers(): number { + return this.#view.getUint32(676, LE); + } + + set maxDescriptorSetUpdateAfterBindStorageBuffers(value: number) { + this.#view.setUint32(676, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(): number { + return this.#view.getUint32(680, LE); + } + + set maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(value: number) { + this.#view.setUint32(680, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindSampledImages(): number { + return this.#view.getUint32(684, LE); + } + + set maxDescriptorSetUpdateAfterBindSampledImages(value: number) { + this.#view.setUint32(684, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindStorageImages(): number { + return this.#view.getUint32(688, LE); + } + + set maxDescriptorSetUpdateAfterBindStorageImages(value: number) { + this.#view.setUint32(688, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindInputAttachments(): number { + return this.#view.getUint32(692, LE); + } + + set maxDescriptorSetUpdateAfterBindInputAttachments(value: number) { + this.#view.setUint32(692, Number(value), LE); + } + + get supportedDepthResolveModes(): number { + return this.#view.getUint32(696, LE); + } + + set supportedDepthResolveModes(value: ResolveModeFlags) { + this.#view.setUint32(696, Number(value), LE); + } + + get supportedStencilResolveModes(): number { + return this.#view.getUint32(700, LE); + } + + set supportedStencilResolveModes(value: ResolveModeFlags) { + this.#view.setUint32(700, Number(value), LE); + } + + get independentResolveNone(): number { + return this.#view.getUint32(704, LE); + } + + set independentResolveNone(value: Bool32) { + this.#view.setUint32(704, Number(value), LE); + } + + get independentResolve(): number { + return this.#view.getUint32(708, LE); + } + + set independentResolve(value: Bool32) { + this.#view.setUint32(708, Number(value), LE); + } + + get filterMinmaxSingleComponentFormats(): number { + return this.#view.getUint32(712, LE); + } + + set filterMinmaxSingleComponentFormats(value: Bool32) { + this.#view.setUint32(712, Number(value), LE); + } + + get filterMinmaxImageComponentMapping(): number { + return this.#view.getUint32(716, LE); + } + + set filterMinmaxImageComponentMapping(value: Bool32) { + this.#view.setUint32(716, Number(value), LE); + } + + get maxTimelineSemaphoreValueDifference(): bigint { + return this.#view.getBigUint64(720, LE); + } + + set maxTimelineSemaphoreValueDifference(value: number | bigint) { + this.#view.setBigUint64(720, BigInt(value), LE); + } + + get framebufferIntegerColorSampleCounts(): number { + return this.#view.getUint32(728, LE); + } + + set framebufferIntegerColorSampleCounts(value: SampleCountFlags) { + this.#view.setUint32(728, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVulkan13Features.ts b/api/struct/PhysicalDeviceVulkan13Features.ts new file mode 100644 index 0000000..3d842e9 --- /dev/null +++ b/api/struct/PhysicalDeviceVulkan13Features.ts @@ -0,0 +1,220 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceVulkan13Features { + pNext?: AnyPointer; + robustImageAccess?: Bool32; + inlineUniformBlock?: Bool32; + descriptorBindingInlineUniformBlockUpdateAfterBind?: Bool32; + pipelineCreationCacheControl?: Bool32; + privateData?: Bool32; + shaderDemoteToHelperInvocation?: Bool32; + shaderTerminateInvocation?: Bool32; + subgroupSizeControl?: Bool32; + computeFullSubgroups?: Bool32; + synchronization2?: Bool32; + textureCompressionASTC_HDR?: Bool32; + shaderZeroInitializeWorkgroupMemory?: Bool32; + dynamicRendering?: Bool32; + shaderIntegerDotProduct?: Bool32; + maintenance4?: Bool32; +} + +export class PhysicalDeviceVulkan13Features implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVulkan13Features); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan13Features) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVulkan13Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVulkan13Features.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVulkan13Features.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.robustImageAccess !== undefined) this.robustImageAccess = data.robustImageAccess; + if (data.inlineUniformBlock !== undefined) this.inlineUniformBlock = data.inlineUniformBlock; + if (data.descriptorBindingInlineUniformBlockUpdateAfterBind !== undefined) this.descriptorBindingInlineUniformBlockUpdateAfterBind = data.descriptorBindingInlineUniformBlockUpdateAfterBind; + if (data.pipelineCreationCacheControl !== undefined) this.pipelineCreationCacheControl = data.pipelineCreationCacheControl; + if (data.privateData !== undefined) this.privateData = data.privateData; + if (data.shaderDemoteToHelperInvocation !== undefined) this.shaderDemoteToHelperInvocation = data.shaderDemoteToHelperInvocation; + if (data.shaderTerminateInvocation !== undefined) this.shaderTerminateInvocation = data.shaderTerminateInvocation; + if (data.subgroupSizeControl !== undefined) this.subgroupSizeControl = data.subgroupSizeControl; + if (data.computeFullSubgroups !== undefined) this.computeFullSubgroups = data.computeFullSubgroups; + if (data.synchronization2 !== undefined) this.synchronization2 = data.synchronization2; + if (data.textureCompressionASTC_HDR !== undefined) this.textureCompressionASTC_HDR = data.textureCompressionASTC_HDR; + if (data.shaderZeroInitializeWorkgroupMemory !== undefined) this.shaderZeroInitializeWorkgroupMemory = data.shaderZeroInitializeWorkgroupMemory; + if (data.dynamicRendering !== undefined) this.dynamicRendering = data.dynamicRendering; + if (data.shaderIntegerDotProduct !== undefined) this.shaderIntegerDotProduct = data.shaderIntegerDotProduct; + if (data.maintenance4 !== undefined) this.maintenance4 = data.maintenance4; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan13Features.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get robustImageAccess(): number { + return this.#view.getUint32(16, LE); + } + + set robustImageAccess(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get inlineUniformBlock(): number { + return this.#view.getUint32(20, LE); + } + + set inlineUniformBlock(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get descriptorBindingInlineUniformBlockUpdateAfterBind(): number { + return this.#view.getUint32(24, LE); + } + + set descriptorBindingInlineUniformBlockUpdateAfterBind(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get pipelineCreationCacheControl(): number { + return this.#view.getUint32(28, LE); + } + + set pipelineCreationCacheControl(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } + + get privateData(): number { + return this.#view.getUint32(32, LE); + } + + set privateData(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get shaderDemoteToHelperInvocation(): number { + return this.#view.getUint32(36, LE); + } + + set shaderDemoteToHelperInvocation(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get shaderTerminateInvocation(): number { + return this.#view.getUint32(40, LE); + } + + set shaderTerminateInvocation(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get subgroupSizeControl(): number { + return this.#view.getUint32(44, LE); + } + + set subgroupSizeControl(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } + + get computeFullSubgroups(): number { + return this.#view.getUint32(48, LE); + } + + set computeFullSubgroups(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get synchronization2(): number { + return this.#view.getUint32(52, LE); + } + + set synchronization2(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get textureCompressionASTC_HDR(): number { + return this.#view.getUint32(56, LE); + } + + set textureCompressionASTC_HDR(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get shaderZeroInitializeWorkgroupMemory(): number { + return this.#view.getUint32(60, LE); + } + + set shaderZeroInitializeWorkgroupMemory(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get dynamicRendering(): number { + return this.#view.getUint32(64, LE); + } + + set dynamicRendering(value: Bool32) { + this.#view.setUint32(64, Number(value), LE); + } + + get shaderIntegerDotProduct(): number { + return this.#view.getUint32(68, LE); + } + + set shaderIntegerDotProduct(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get maintenance4(): number { + return this.#view.getUint32(72, LE); + } + + set maintenance4(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVulkan13Properties.ts b/api/struct/PhysicalDeviceVulkan13Properties.ts new file mode 100644 index 0000000..fdd5bbd --- /dev/null +++ b/api/struct/PhysicalDeviceVulkan13Properties.ts @@ -0,0 +1,520 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ShaderStageFlags, Bool32, DeviceSize } from "../def.ts"; + +export interface InitPhysicalDeviceVulkan13Properties { + pNext?: AnyPointer; + minSubgroupSize?: number; + maxSubgroupSize?: number; + maxComputeWorkgroupSubgroups?: number; + requiredSubgroupSizeStages?: ShaderStageFlags; + maxInlineUniformBlockSize?: number; + maxPerStageDescriptorInlineUniformBlocks?: number; + maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks?: number; + maxDescriptorSetInlineUniformBlocks?: number; + maxDescriptorSetUpdateAfterBindInlineUniformBlocks?: number; + maxInlineUniformTotalSize?: number; + integerDotProduct8BitUnsignedAccelerated?: Bool32; + integerDotProduct8BitSignedAccelerated?: Bool32; + integerDotProduct8BitMixedSignednessAccelerated?: Bool32; + integerDotProduct4x8BitPackedUnsignedAccelerated?: Bool32; + integerDotProduct4x8BitPackedSignedAccelerated?: Bool32; + integerDotProduct4x8BitPackedMixedSignednessAccelerated?: Bool32; + integerDotProduct16BitUnsignedAccelerated?: Bool32; + integerDotProduct16BitSignedAccelerated?: Bool32; + integerDotProduct16BitMixedSignednessAccelerated?: Bool32; + integerDotProduct32BitUnsignedAccelerated?: Bool32; + integerDotProduct32BitSignedAccelerated?: Bool32; + integerDotProduct32BitMixedSignednessAccelerated?: Bool32; + integerDotProduct64BitUnsignedAccelerated?: Bool32; + integerDotProduct64BitSignedAccelerated?: Bool32; + integerDotProduct64BitMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating8BitUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating8BitSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating16BitUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating16BitSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating32BitUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating32BitSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated?: Bool32; + integerDotProductAccumulatingSaturating64BitUnsignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating64BitSignedAccelerated?: Bool32; + integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated?: Bool32; + storageTexelBufferOffsetAlignmentBytes?: DeviceSize; + storageTexelBufferOffsetSingleTexelAlignment?: Bool32; + uniformTexelBufferOffsetAlignmentBytes?: DeviceSize; + uniformTexelBufferOffsetSingleTexelAlignment?: Bool32; + maxBufferSize?: DeviceSize; +} + +export class PhysicalDeviceVulkan13Properties implements BaseStruct { + static size = 216; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVulkan13Properties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan13Properties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVulkan13Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVulkan13Properties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVulkan13Properties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minSubgroupSize !== undefined) this.minSubgroupSize = data.minSubgroupSize; + if (data.maxSubgroupSize !== undefined) this.maxSubgroupSize = data.maxSubgroupSize; + if (data.maxComputeWorkgroupSubgroups !== undefined) this.maxComputeWorkgroupSubgroups = data.maxComputeWorkgroupSubgroups; + if (data.requiredSubgroupSizeStages !== undefined) this.requiredSubgroupSizeStages = data.requiredSubgroupSizeStages; + if (data.maxInlineUniformBlockSize !== undefined) this.maxInlineUniformBlockSize = data.maxInlineUniformBlockSize; + if (data.maxPerStageDescriptorInlineUniformBlocks !== undefined) this.maxPerStageDescriptorInlineUniformBlocks = data.maxPerStageDescriptorInlineUniformBlocks; + if (data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks !== undefined) this.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; + if (data.maxDescriptorSetInlineUniformBlocks !== undefined) this.maxDescriptorSetInlineUniformBlocks = data.maxDescriptorSetInlineUniformBlocks; + if (data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks !== undefined) this.maxDescriptorSetUpdateAfterBindInlineUniformBlocks = data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks; + if (data.maxInlineUniformTotalSize !== undefined) this.maxInlineUniformTotalSize = data.maxInlineUniformTotalSize; + if (data.integerDotProduct8BitUnsignedAccelerated !== undefined) this.integerDotProduct8BitUnsignedAccelerated = data.integerDotProduct8BitUnsignedAccelerated; + if (data.integerDotProduct8BitSignedAccelerated !== undefined) this.integerDotProduct8BitSignedAccelerated = data.integerDotProduct8BitSignedAccelerated; + if (data.integerDotProduct8BitMixedSignednessAccelerated !== undefined) this.integerDotProduct8BitMixedSignednessAccelerated = data.integerDotProduct8BitMixedSignednessAccelerated; + if (data.integerDotProduct4x8BitPackedUnsignedAccelerated !== undefined) this.integerDotProduct4x8BitPackedUnsignedAccelerated = data.integerDotProduct4x8BitPackedUnsignedAccelerated; + if (data.integerDotProduct4x8BitPackedSignedAccelerated !== undefined) this.integerDotProduct4x8BitPackedSignedAccelerated = data.integerDotProduct4x8BitPackedSignedAccelerated; + if (data.integerDotProduct4x8BitPackedMixedSignednessAccelerated !== undefined) this.integerDotProduct4x8BitPackedMixedSignednessAccelerated = data.integerDotProduct4x8BitPackedMixedSignednessAccelerated; + if (data.integerDotProduct16BitUnsignedAccelerated !== undefined) this.integerDotProduct16BitUnsignedAccelerated = data.integerDotProduct16BitUnsignedAccelerated; + if (data.integerDotProduct16BitSignedAccelerated !== undefined) this.integerDotProduct16BitSignedAccelerated = data.integerDotProduct16BitSignedAccelerated; + if (data.integerDotProduct16BitMixedSignednessAccelerated !== undefined) this.integerDotProduct16BitMixedSignednessAccelerated = data.integerDotProduct16BitMixedSignednessAccelerated; + if (data.integerDotProduct32BitUnsignedAccelerated !== undefined) this.integerDotProduct32BitUnsignedAccelerated = data.integerDotProduct32BitUnsignedAccelerated; + if (data.integerDotProduct32BitSignedAccelerated !== undefined) this.integerDotProduct32BitSignedAccelerated = data.integerDotProduct32BitSignedAccelerated; + if (data.integerDotProduct32BitMixedSignednessAccelerated !== undefined) this.integerDotProduct32BitMixedSignednessAccelerated = data.integerDotProduct32BitMixedSignednessAccelerated; + if (data.integerDotProduct64BitUnsignedAccelerated !== undefined) this.integerDotProduct64BitUnsignedAccelerated = data.integerDotProduct64BitUnsignedAccelerated; + if (data.integerDotProduct64BitSignedAccelerated !== undefined) this.integerDotProduct64BitSignedAccelerated = data.integerDotProduct64BitSignedAccelerated; + if (data.integerDotProduct64BitMixedSignednessAccelerated !== undefined) this.integerDotProduct64BitMixedSignednessAccelerated = data.integerDotProduct64BitMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating8BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitSignedAccelerated = data.integerDotProductAccumulatingSaturating8BitSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating16BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitSignedAccelerated = data.integerDotProductAccumulatingSaturating16BitSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating32BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitSignedAccelerated = data.integerDotProductAccumulatingSaturating32BitSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; + if (data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; + if (data.integerDotProductAccumulatingSaturating64BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitSignedAccelerated = data.integerDotProductAccumulatingSaturating64BitSignedAccelerated; + if (data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; + if (data.storageTexelBufferOffsetAlignmentBytes !== undefined) this.storageTexelBufferOffsetAlignmentBytes = data.storageTexelBufferOffsetAlignmentBytes; + if (data.storageTexelBufferOffsetSingleTexelAlignment !== undefined) this.storageTexelBufferOffsetSingleTexelAlignment = data.storageTexelBufferOffsetSingleTexelAlignment; + if (data.uniformTexelBufferOffsetAlignmentBytes !== undefined) this.uniformTexelBufferOffsetAlignmentBytes = data.uniformTexelBufferOffsetAlignmentBytes; + if (data.uniformTexelBufferOffsetSingleTexelAlignment !== undefined) this.uniformTexelBufferOffsetSingleTexelAlignment = data.uniformTexelBufferOffsetSingleTexelAlignment; + if (data.maxBufferSize !== undefined) this.maxBufferSize = data.maxBufferSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan13Properties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minSubgroupSize(): number { + return this.#view.getUint32(16, LE); + } + + set minSubgroupSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxSubgroupSize(): number { + return this.#view.getUint32(20, LE); + } + + set maxSubgroupSize(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxComputeWorkgroupSubgroups(): number { + return this.#view.getUint32(24, LE); + } + + set maxComputeWorkgroupSubgroups(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get requiredSubgroupSizeStages(): number { + return this.#view.getUint32(28, LE); + } + + set requiredSubgroupSizeStages(value: ShaderStageFlags) { + this.#view.setUint32(28, Number(value), LE); + } + + get maxInlineUniformBlockSize(): number { + return this.#view.getUint32(32, LE); + } + + set maxInlineUniformBlockSize(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get maxPerStageDescriptorInlineUniformBlocks(): number { + return this.#view.getUint32(36, LE); + } + + set maxPerStageDescriptorInlineUniformBlocks(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(): number { + return this.#view.getUint32(40, LE); + } + + set maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get maxDescriptorSetInlineUniformBlocks(): number { + return this.#view.getUint32(44, LE); + } + + set maxDescriptorSetInlineUniformBlocks(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get maxDescriptorSetUpdateAfterBindInlineUniformBlocks(): number { + return this.#view.getUint32(48, LE); + } + + set maxDescriptorSetUpdateAfterBindInlineUniformBlocks(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get maxInlineUniformTotalSize(): number { + return this.#view.getUint32(52, LE); + } + + set maxInlineUniformTotalSize(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get integerDotProduct8BitUnsignedAccelerated(): number { + return this.#view.getUint32(56, LE); + } + + set integerDotProduct8BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get integerDotProduct8BitSignedAccelerated(): number { + return this.#view.getUint32(60, LE); + } + + set integerDotProduct8BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(60, Number(value), LE); + } + + get integerDotProduct8BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(64, LE); + } + + set integerDotProduct8BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(64, Number(value), LE); + } + + get integerDotProduct4x8BitPackedUnsignedAccelerated(): number { + return this.#view.getUint32(68, LE); + } + + set integerDotProduct4x8BitPackedUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get integerDotProduct4x8BitPackedSignedAccelerated(): number { + return this.#view.getUint32(72, LE); + } + + set integerDotProduct4x8BitPackedSignedAccelerated(value: Bool32) { + this.#view.setUint32(72, Number(value), LE); + } + + get integerDotProduct4x8BitPackedMixedSignednessAccelerated(): number { + return this.#view.getUint32(76, LE); + } + + set integerDotProduct4x8BitPackedMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } + + get integerDotProduct16BitUnsignedAccelerated(): number { + return this.#view.getUint32(80, LE); + } + + set integerDotProduct16BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(80, Number(value), LE); + } + + get integerDotProduct16BitSignedAccelerated(): number { + return this.#view.getUint32(84, LE); + } + + set integerDotProduct16BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(84, Number(value), LE); + } + + get integerDotProduct16BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(88, LE); + } + + set integerDotProduct16BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(88, Number(value), LE); + } + + get integerDotProduct32BitUnsignedAccelerated(): number { + return this.#view.getUint32(92, LE); + } + + set integerDotProduct32BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(92, Number(value), LE); + } + + get integerDotProduct32BitSignedAccelerated(): number { + return this.#view.getUint32(96, LE); + } + + set integerDotProduct32BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(96, Number(value), LE); + } + + get integerDotProduct32BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(100, LE); + } + + set integerDotProduct32BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(100, Number(value), LE); + } + + get integerDotProduct64BitUnsignedAccelerated(): number { + return this.#view.getUint32(104, LE); + } + + set integerDotProduct64BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(104, Number(value), LE); + } + + get integerDotProduct64BitSignedAccelerated(): number { + return this.#view.getUint32(108, LE); + } + + set integerDotProduct64BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(108, Number(value), LE); + } + + get integerDotProduct64BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(112, LE); + } + + set integerDotProduct64BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(112, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(): number { + return this.#view.getUint32(116, LE); + } + + set integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(116, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating8BitSignedAccelerated(): number { + return this.#view.getUint32(120, LE); + } + + set integerDotProductAccumulatingSaturating8BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(120, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(124, LE); + } + + set integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(124, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(): number { + return this.#view.getUint32(128, LE); + } + + set integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(128, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(): number { + return this.#view.getUint32(132, LE); + } + + set integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(value: Bool32) { + this.#view.setUint32(132, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(): number { + return this.#view.getUint32(136, LE); + } + + set integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(136, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(): number { + return this.#view.getUint32(140, LE); + } + + set integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(140, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating16BitSignedAccelerated(): number { + return this.#view.getUint32(144, LE); + } + + set integerDotProductAccumulatingSaturating16BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(144, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(148, LE); + } + + set integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(148, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(): number { + return this.#view.getUint32(152, LE); + } + + set integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(152, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating32BitSignedAccelerated(): number { + return this.#view.getUint32(156, LE); + } + + set integerDotProductAccumulatingSaturating32BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(156, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(160, LE); + } + + set integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(160, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(): number { + return this.#view.getUint32(164, LE); + } + + set integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(value: Bool32) { + this.#view.setUint32(164, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating64BitSignedAccelerated(): number { + return this.#view.getUint32(168, LE); + } + + set integerDotProductAccumulatingSaturating64BitSignedAccelerated(value: Bool32) { + this.#view.setUint32(168, Number(value), LE); + } + + get integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(): number { + return this.#view.getUint32(172, LE); + } + + set integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(value: Bool32) { + this.#view.setUint32(172, Number(value), LE); + } + + get storageTexelBufferOffsetAlignmentBytes(): bigint { + return this.#view.getBigUint64(176, LE); + } + + set storageTexelBufferOffsetAlignmentBytes(value: DeviceSize) { + this.#view.setBigUint64(176, BigInt(value), LE); + } + + get storageTexelBufferOffsetSingleTexelAlignment(): number { + return this.#view.getUint32(184, LE); + } + + set storageTexelBufferOffsetSingleTexelAlignment(value: Bool32) { + this.#view.setUint32(184, Number(value), LE); + } + + get uniformTexelBufferOffsetAlignmentBytes(): bigint { + return this.#view.getBigUint64(192, LE); + } + + set uniformTexelBufferOffsetAlignmentBytes(value: DeviceSize) { + this.#view.setBigUint64(192, BigInt(value), LE); + } + + get uniformTexelBufferOffsetSingleTexelAlignment(): number { + return this.#view.getUint32(200, LE); + } + + set uniformTexelBufferOffsetSingleTexelAlignment(value: Bool32) { + this.#view.setUint32(200, Number(value), LE); + } + + get maxBufferSize(): bigint { + return this.#view.getBigUint64(208, LE); + } + + set maxBufferSize(value: DeviceSize) { + this.#view.setBigUint64(208, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVulkanMemoryModelFeatures.ts b/api/struct/PhysicalDeviceVulkanMemoryModelFeatures.ts new file mode 100644 index 0000000..6a60df4 --- /dev/null +++ b/api/struct/PhysicalDeviceVulkanMemoryModelFeatures.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceVulkanMemoryModelFeatures { + pNext?: AnyPointer; + vulkanMemoryModel?: Bool32; + vulkanMemoryModelDeviceScope?: Bool32; + vulkanMemoryModelAvailabilityVisibilityChains?: Bool32; +} + +export class PhysicalDeviceVulkanMemoryModelFeatures implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceVulkanMemoryModelFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkanMemoryModelFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceVulkanMemoryModelFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceVulkanMemoryModelFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceVulkanMemoryModelFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.vulkanMemoryModel !== undefined) this.vulkanMemoryModel = data.vulkanMemoryModel; + if (data.vulkanMemoryModelDeviceScope !== undefined) this.vulkanMemoryModelDeviceScope = data.vulkanMemoryModelDeviceScope; + if (data.vulkanMemoryModelAvailabilityVisibilityChains !== undefined) this.vulkanMemoryModelAvailabilityVisibilityChains = data.vulkanMemoryModelAvailabilityVisibilityChains; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkanMemoryModelFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get vulkanMemoryModel(): number { + return this.#view.getUint32(16, LE); + } + + set vulkanMemoryModel(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get vulkanMemoryModelDeviceScope(): number { + return this.#view.getUint32(20, LE); + } + + set vulkanMemoryModelDeviceScope(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get vulkanMemoryModelAvailabilityVisibilityChains(): number { + return this.#view.getUint32(24, LE); + } + + set vulkanMemoryModelAvailabilityVisibilityChains(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceVulkanMemoryModelFeaturesKHR.ts b/api/struct/PhysicalDeviceVulkanMemoryModelFeaturesKHR.ts new file mode 100644 index 0000000..1a81c47 --- /dev/null +++ b/api/struct/PhysicalDeviceVulkanMemoryModelFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceVulkanMemoryModelFeatures } from "./PhysicalDeviceVulkanMemoryModelFeatures.ts"; + export type PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures; \ No newline at end of file diff --git a/api/struct/PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.ts b/api/struct/PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.ts new file mode 100644 index 0000000..56d5f2a --- /dev/null +++ b/api/struct/PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR { + pNext?: AnyPointer; + workgroupMemoryExplicitLayout?: Bool32; + workgroupMemoryExplicitLayoutScalarBlockLayout?: Bool32; + workgroupMemoryExplicitLayout8BitAccess?: Bool32; + workgroupMemoryExplicitLayout16BitAccess?: Bool32; +} + +export class PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.workgroupMemoryExplicitLayout !== undefined) this.workgroupMemoryExplicitLayout = data.workgroupMemoryExplicitLayout; + if (data.workgroupMemoryExplicitLayoutScalarBlockLayout !== undefined) this.workgroupMemoryExplicitLayoutScalarBlockLayout = data.workgroupMemoryExplicitLayoutScalarBlockLayout; + if (data.workgroupMemoryExplicitLayout8BitAccess !== undefined) this.workgroupMemoryExplicitLayout8BitAccess = data.workgroupMemoryExplicitLayout8BitAccess; + if (data.workgroupMemoryExplicitLayout16BitAccess !== undefined) this.workgroupMemoryExplicitLayout16BitAccess = data.workgroupMemoryExplicitLayout16BitAccess; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get workgroupMemoryExplicitLayout(): number { + return this.#view.getUint32(16, LE); + } + + set workgroupMemoryExplicitLayout(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get workgroupMemoryExplicitLayoutScalarBlockLayout(): number { + return this.#view.getUint32(20, LE); + } + + set workgroupMemoryExplicitLayoutScalarBlockLayout(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get workgroupMemoryExplicitLayout8BitAccess(): number { + return this.#view.getUint32(24, LE); + } + + set workgroupMemoryExplicitLayout8BitAccess(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get workgroupMemoryExplicitLayout16BitAccess(): number { + return this.#view.getUint32(28, LE); + } + + set workgroupMemoryExplicitLayout16BitAccess(value: Bool32) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.ts b/api/struct/PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.ts new file mode 100644 index 0000000..bee7758 --- /dev/null +++ b/api/struct/PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { + pNext?: AnyPointer; + ycbcr2plane444Formats?: Bool32; +} + +export class PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.ycbcr2plane444Formats !== undefined) this.ycbcr2plane444Formats = data.ycbcr2plane444Formats; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get ycbcr2plane444Formats(): number { + return this.#view.getUint32(16, LE); + } + + set ycbcr2plane444Formats(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceYcbcrImageArraysFeaturesEXT.ts b/api/struct/PhysicalDeviceYcbcrImageArraysFeaturesEXT.ts new file mode 100644 index 0000000..abe4729 --- /dev/null +++ b/api/struct/PhysicalDeviceYcbcrImageArraysFeaturesEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceYcbcrImageArraysFeaturesEXT { + pNext?: AnyPointer; + ycbcrImageArrays?: Bool32; +} + +export class PhysicalDeviceYcbcrImageArraysFeaturesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceYcbcrImageArraysFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceYcbcrImageArraysFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceYcbcrImageArraysFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceYcbcrImageArraysFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceYcbcrImageArraysFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.ycbcrImageArrays !== undefined) this.ycbcrImageArrays = data.ycbcrImageArrays; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceYcbcrImageArraysFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get ycbcrImageArrays(): number { + return this.#view.getUint32(16, LE); + } + + set ycbcrImageArrays(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.ts b/api/struct/PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.ts new file mode 100644 index 0000000..2ad8fcc --- /dev/null +++ b/api/struct/PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures { + pNext?: AnyPointer; + shaderZeroInitializeWorkgroupMemory?: Bool32; +} + +export class PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shaderZeroInitializeWorkgroupMemory !== undefined) this.shaderZeroInitializeWorkgroupMemory = data.shaderZeroInitializeWorkgroupMemory; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shaderZeroInitializeWorkgroupMemory(): number { + return this.#view.getUint32(16, LE); + } + + set shaderZeroInitializeWorkgroupMemory(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR.ts b/api/struct/PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR.ts new file mode 100644 index 0000000..7d7951c --- /dev/null +++ b/api/struct/PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR.ts @@ -0,0 +1,2 @@ + import { PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures } from "./PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.ts"; + export type PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; \ No newline at end of file diff --git a/api/struct/PipelineCacheCreateInfo.ts b/api/struct/PipelineCacheCreateInfo.ts new file mode 100644 index 0000000..5b963a1 --- /dev/null +++ b/api/struct/PipelineCacheCreateInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineCacheCreateFlags } from "../def.ts"; + +export interface InitPipelineCacheCreateInfo { + pNext?: AnyPointer; + flags?: PipelineCacheCreateFlags; + initialDataSize?: number | bigint; + pInitialData?: AnyPointer; +} + +export class PipelineCacheCreateInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineCacheCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCacheCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineCacheCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineCacheCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineCacheCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.initialDataSize !== undefined) this.initialDataSize = data.initialDataSize; + if (data.pInitialData !== undefined) this.pInitialData = data.pInitialData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCacheCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_CACHE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineCacheCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get initialDataSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set initialDataSize(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get pInitialData(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pInitialData(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineCacheHeaderVersionOne.ts b/api/struct/PipelineCacheHeaderVersionOne.ts new file mode 100644 index 0000000..d35132a --- /dev/null +++ b/api/struct/PipelineCacheHeaderVersionOne.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { PipelineCacheHeaderVersion } from "../enum.ts"; + +export interface InitPipelineCacheHeaderVersionOne { + headerSize?: number; + headerVersion?: PipelineCacheHeaderVersion; + vendorID?: number; + deviceID?: number; + pipelineCacheUUID?: Uint8Array; +} + +export class PipelineCacheHeaderVersionOne implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineCacheHeaderVersionOne); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCacheHeaderVersionOne) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineCacheHeaderVersionOne.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineCacheHeaderVersionOne.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineCacheHeaderVersionOne.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.headerSize !== undefined) this.headerSize = data.headerSize; + if (data.headerVersion !== undefined) this.headerVersion = data.headerVersion; + if (data.vendorID !== undefined) this.vendorID = data.vendorID; + if (data.deviceID !== undefined) this.deviceID = data.deviceID; + if (data.pipelineCacheUUID !== undefined) this.pipelineCacheUUID = data.pipelineCacheUUID; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCacheHeaderVersionOne.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get headerSize(): number { + return this.#view.getUint32(0, LE); + } + + set headerSize(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get headerVersion(): number { + return this.#view.getUint32(4, LE); + } + + set headerVersion(value: PipelineCacheHeaderVersion) { + this.#view.setUint32(4, Number(value), LE); + } + + get vendorID(): number { + return this.#view.getUint32(8, LE); + } + + set vendorID(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get deviceID(): number { + return this.#view.getUint32(12, LE); + } + + set deviceID(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get pipelineCacheUUID(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); + } + + set pipelineCacheUUID(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } +} \ No newline at end of file diff --git a/api/struct/PipelineColorBlendAdvancedStateCreateInfoEXT.ts b/api/struct/PipelineColorBlendAdvancedStateCreateInfoEXT.ts new file mode 100644 index 0000000..d486260 --- /dev/null +++ b/api/struct/PipelineColorBlendAdvancedStateCreateInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, BlendOverlapEXT } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPipelineColorBlendAdvancedStateCreateInfoEXT { + pNext?: AnyPointer; + srcPremultiplied?: Bool32; + dstPremultiplied?: Bool32; + blendOverlap?: BlendOverlapEXT; +} + +export class PipelineColorBlendAdvancedStateCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineColorBlendAdvancedStateCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineColorBlendAdvancedStateCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineColorBlendAdvancedStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineColorBlendAdvancedStateCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineColorBlendAdvancedStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcPremultiplied !== undefined) this.srcPremultiplied = data.srcPremultiplied; + if (data.dstPremultiplied !== undefined) this.dstPremultiplied = data.dstPremultiplied; + if (data.blendOverlap !== undefined) this.blendOverlap = data.blendOverlap; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorBlendAdvancedStateCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcPremultiplied(): number { + return this.#view.getUint32(16, LE); + } + + set srcPremultiplied(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get dstPremultiplied(): number { + return this.#view.getUint32(20, LE); + } + + set dstPremultiplied(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get blendOverlap(): number { + return this.#view.getUint32(24, LE); + } + + set blendOverlap(value: BlendOverlapEXT) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineColorBlendAttachmentState.ts b/api/struct/PipelineColorBlendAttachmentState.ts new file mode 100644 index 0000000..998c90e --- /dev/null +++ b/api/struct/PipelineColorBlendAttachmentState.ts @@ -0,0 +1,131 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { BlendFactor, BlendOp } from "../enum.ts"; +import { Bool32, ColorComponentFlags } from "../def.ts"; + +export interface InitPipelineColorBlendAttachmentState { + blendEnable?: Bool32; + srcColorBlendFactor?: BlendFactor; + dstColorBlendFactor?: BlendFactor; + colorBlendOp?: BlendOp; + srcAlphaBlendFactor?: BlendFactor; + dstAlphaBlendFactor?: BlendFactor; + alphaBlendOp?: BlendOp; + colorWriteMask?: ColorComponentFlags; +} + +export class PipelineColorBlendAttachmentState implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineColorBlendAttachmentState); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineColorBlendAttachmentState) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineColorBlendAttachmentState.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineColorBlendAttachmentState.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineColorBlendAttachmentState.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.blendEnable !== undefined) this.blendEnable = data.blendEnable; + if (data.srcColorBlendFactor !== undefined) this.srcColorBlendFactor = data.srcColorBlendFactor; + if (data.dstColorBlendFactor !== undefined) this.dstColorBlendFactor = data.dstColorBlendFactor; + if (data.colorBlendOp !== undefined) this.colorBlendOp = data.colorBlendOp; + if (data.srcAlphaBlendFactor !== undefined) this.srcAlphaBlendFactor = data.srcAlphaBlendFactor; + if (data.dstAlphaBlendFactor !== undefined) this.dstAlphaBlendFactor = data.dstAlphaBlendFactor; + if (data.alphaBlendOp !== undefined) this.alphaBlendOp = data.alphaBlendOp; + if (data.colorWriteMask !== undefined) this.colorWriteMask = data.colorWriteMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorBlendAttachmentState.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get blendEnable(): number { + return this.#view.getUint32(0, LE); + } + + set blendEnable(value: Bool32) { + this.#view.setUint32(0, Number(value), LE); + } + + get srcColorBlendFactor(): number { + return this.#view.getUint32(4, LE); + } + + set srcColorBlendFactor(value: BlendFactor) { + this.#view.setUint32(4, Number(value), LE); + } + + get dstColorBlendFactor(): number { + return this.#view.getUint32(8, LE); + } + + set dstColorBlendFactor(value: BlendFactor) { + this.#view.setUint32(8, Number(value), LE); + } + + get colorBlendOp(): number { + return this.#view.getUint32(12, LE); + } + + set colorBlendOp(value: BlendOp) { + this.#view.setUint32(12, Number(value), LE); + } + + get srcAlphaBlendFactor(): number { + return this.#view.getUint32(16, LE); + } + + set srcAlphaBlendFactor(value: BlendFactor) { + this.#view.setUint32(16, Number(value), LE); + } + + get dstAlphaBlendFactor(): number { + return this.#view.getUint32(20, LE); + } + + set dstAlphaBlendFactor(value: BlendFactor) { + this.#view.setUint32(20, Number(value), LE); + } + + get alphaBlendOp(): number { + return this.#view.getUint32(24, LE); + } + + set alphaBlendOp(value: BlendOp) { + this.#view.setUint32(24, Number(value), LE); + } + + get colorWriteMask(): number { + return this.#view.getUint32(28, LE); + } + + set colorWriteMask(value: ColorComponentFlags) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineColorBlendStateCreateInfo.ts b/api/struct/PipelineColorBlendStateCreateInfo.ts new file mode 100644 index 0000000..e181bd4 --- /dev/null +++ b/api/struct/PipelineColorBlendStateCreateInfo.ts @@ -0,0 +1,131 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PipelineColorBlendAttachmentState} from "./PipelineColorBlendAttachmentState.ts"; +import { StructureType, LogicOp } from "../enum.ts"; +import { PipelineColorBlendStateCreateFlags, Bool32 } from "../def.ts"; + +export interface InitPipelineColorBlendStateCreateInfo { + pNext?: AnyPointer; + flags?: PipelineColorBlendStateCreateFlags; + logicOpEnable?: Bool32; + logicOp?: LogicOp; + attachmentCount?: number; + pAttachments?: AnyPointer; + blendConstants?: Float32Array; +} + +export class PipelineColorBlendStateCreateInfo implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineColorBlendStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineColorBlendStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineColorBlendStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineColorBlendStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineColorBlendStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.logicOpEnable !== undefined) this.logicOpEnable = data.logicOpEnable; + if (data.logicOp !== undefined) this.logicOp = data.logicOp; + if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; + if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; + if (data.blendConstants !== undefined) this.blendConstants = data.blendConstants; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorBlendStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineColorBlendStateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get logicOpEnable(): number { + return this.#view.getUint32(20, LE); + } + + set logicOpEnable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get logicOp(): number { + return this.#view.getUint32(24, LE); + } + + set logicOp(value: LogicOp) { + this.#view.setUint32(24, Number(value), LE); + } + + get attachmentCount(): number { + return this.#view.getUint32(28, LE); + } + + set attachmentCount(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get pAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pAttachments(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get blendConstants(): Float32Array { + return new Float32Array(this.#data.buffer, this.#data.byteOffset + 40, 4); + } + + set blendConstants(value: Float32Array) { + this.#data.set(new Uint8Array(value.buffer), 40); + } +} \ No newline at end of file diff --git a/api/struct/PipelineColorWriteCreateInfoEXT.ts b/api/struct/PipelineColorWriteCreateInfoEXT.ts new file mode 100644 index 0000000..4d2fa47 --- /dev/null +++ b/api/struct/PipelineColorWriteCreateInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPipelineColorWriteCreateInfoEXT { + pNext?: AnyPointer; + attachmentCount?: number; + pColorWriteEnables?: AnyPointer; +} + +export class PipelineColorWriteCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineColorWriteCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineColorWriteCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineColorWriteCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineColorWriteCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineColorWriteCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; + if (data.pColorWriteEnables !== undefined) this.pColorWriteEnables = data.pColorWriteEnables; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorWriteCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_COLOR_WRITE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get attachmentCount(): number { + return this.#view.getUint32(16, LE); + } + + set attachmentCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pColorWriteEnables(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pColorWriteEnables(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineCompilerControlCreateInfoAMD.ts b/api/struct/PipelineCompilerControlCreateInfoAMD.ts new file mode 100644 index 0000000..8c120c6 --- /dev/null +++ b/api/struct/PipelineCompilerControlCreateInfoAMD.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineCompilerControlFlagsAMD } from "../def.ts"; + +export interface InitPipelineCompilerControlCreateInfoAMD { + pNext?: AnyPointer; + compilerControlFlags?: PipelineCompilerControlFlagsAMD; +} + +export class PipelineCompilerControlCreateInfoAMD implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineCompilerControlCreateInfoAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCompilerControlCreateInfoAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineCompilerControlCreateInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineCompilerControlCreateInfoAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineCompilerControlCreateInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.compilerControlFlags !== undefined) this.compilerControlFlags = data.compilerControlFlags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCompilerControlCreateInfoAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get compilerControlFlags(): number { + return this.#view.getUint32(16, LE); + } + + set compilerControlFlags(value: PipelineCompilerControlFlagsAMD) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineCoverageModulationStateCreateInfoNV.ts b/api/struct/PipelineCoverageModulationStateCreateInfoNV.ts new file mode 100644 index 0000000..753b7da --- /dev/null +++ b/api/struct/PipelineCoverageModulationStateCreateInfoNV.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CoverageModulationModeNV } from "../enum.ts"; +import { PipelineCoverageModulationStateCreateFlagsNV, Bool32 } from "../def.ts"; + +export interface InitPipelineCoverageModulationStateCreateInfoNV { + pNext?: AnyPointer; + flags?: PipelineCoverageModulationStateCreateFlagsNV; + coverageModulationMode?: CoverageModulationModeNV; + coverageModulationTableEnable?: Bool32; + coverageModulationTableCount?: number; + pCoverageModulationTable?: AnyPointer; +} + +export class PipelineCoverageModulationStateCreateInfoNV implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineCoverageModulationStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCoverageModulationStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineCoverageModulationStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineCoverageModulationStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineCoverageModulationStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.coverageModulationMode !== undefined) this.coverageModulationMode = data.coverageModulationMode; + if (data.coverageModulationTableEnable !== undefined) this.coverageModulationTableEnable = data.coverageModulationTableEnable; + if (data.coverageModulationTableCount !== undefined) this.coverageModulationTableCount = data.coverageModulationTableCount; + if (data.pCoverageModulationTable !== undefined) this.pCoverageModulationTable = data.pCoverageModulationTable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCoverageModulationStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineCoverageModulationStateCreateFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get coverageModulationMode(): number { + return this.#view.getUint32(20, LE); + } + + set coverageModulationMode(value: CoverageModulationModeNV) { + this.#view.setUint32(20, Number(value), LE); + } + + get coverageModulationTableEnable(): number { + return this.#view.getUint32(24, LE); + } + + set coverageModulationTableEnable(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get coverageModulationTableCount(): number { + return this.#view.getUint32(28, LE); + } + + set coverageModulationTableCount(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get pCoverageModulationTable(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pCoverageModulationTable(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineCoverageReductionStateCreateInfoNV.ts b/api/struct/PipelineCoverageReductionStateCreateInfoNV.ts new file mode 100644 index 0000000..04784c7 --- /dev/null +++ b/api/struct/PipelineCoverageReductionStateCreateInfoNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, CoverageReductionModeNV } from "../enum.ts"; +import { PipelineCoverageReductionStateCreateFlagsNV } from "../def.ts"; + +export interface InitPipelineCoverageReductionStateCreateInfoNV { + pNext?: AnyPointer; + flags?: PipelineCoverageReductionStateCreateFlagsNV; + coverageReductionMode?: CoverageReductionModeNV; +} + +export class PipelineCoverageReductionStateCreateInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineCoverageReductionStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCoverageReductionStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineCoverageReductionStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineCoverageReductionStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineCoverageReductionStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.coverageReductionMode !== undefined) this.coverageReductionMode = data.coverageReductionMode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCoverageReductionStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineCoverageReductionStateCreateFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get coverageReductionMode(): number { + return this.#view.getUint32(20, LE); + } + + set coverageReductionMode(value: CoverageReductionModeNV) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineCoverageToColorStateCreateInfoNV.ts b/api/struct/PipelineCoverageToColorStateCreateInfoNV.ts new file mode 100644 index 0000000..01ea9b7 --- /dev/null +++ b/api/struct/PipelineCoverageToColorStateCreateInfoNV.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineCoverageToColorStateCreateFlagsNV, Bool32 } from "../def.ts"; + +export interface InitPipelineCoverageToColorStateCreateInfoNV { + pNext?: AnyPointer; + flags?: PipelineCoverageToColorStateCreateFlagsNV; + coverageToColorEnable?: Bool32; + coverageToColorLocation?: number; +} + +export class PipelineCoverageToColorStateCreateInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineCoverageToColorStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCoverageToColorStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineCoverageToColorStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineCoverageToColorStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineCoverageToColorStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.coverageToColorEnable !== undefined) this.coverageToColorEnable = data.coverageToColorEnable; + if (data.coverageToColorLocation !== undefined) this.coverageToColorLocation = data.coverageToColorLocation; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCoverageToColorStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineCoverageToColorStateCreateFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get coverageToColorEnable(): number { + return this.#view.getUint32(20, LE); + } + + set coverageToColorEnable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get coverageToColorLocation(): number { + return this.#view.getUint32(24, LE); + } + + set coverageToColorLocation(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineCreationFeedback.ts b/api/struct/PipelineCreationFeedback.ts new file mode 100644 index 0000000..76fe849 --- /dev/null +++ b/api/struct/PipelineCreationFeedback.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { PipelineCreationFeedbackFlags } from "../def.ts"; + +export interface InitPipelineCreationFeedback { + flags?: PipelineCreationFeedbackFlags; + duration?: number | bigint; +} + +export class PipelineCreationFeedback implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineCreationFeedback); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCreationFeedback) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineCreationFeedback.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineCreationFeedback.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineCreationFeedback.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.duration !== undefined) this.duration = data.duration; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCreationFeedback.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): number { + return this.#view.getUint32(0, LE); + } + + set flags(value: PipelineCreationFeedbackFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get duration(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set duration(value: number | bigint) { + this.#view.setBigUint64(8, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineCreationFeedbackCreateInfo.ts b/api/struct/PipelineCreationFeedbackCreateInfo.ts new file mode 100644 index 0000000..aa76771 --- /dev/null +++ b/api/struct/PipelineCreationFeedbackCreateInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PipelineCreationFeedback} from "./PipelineCreationFeedback.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPipelineCreationFeedbackCreateInfo { + pNext?: AnyPointer; + pPipelineCreationFeedback?: AnyPointer; + pipelineStageCreationFeedbackCount?: number; + pPipelineStageCreationFeedbacks?: AnyPointer; +} + +export class PipelineCreationFeedbackCreateInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineCreationFeedbackCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCreationFeedbackCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineCreationFeedbackCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineCreationFeedbackCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineCreationFeedbackCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pPipelineCreationFeedback !== undefined) this.pPipelineCreationFeedback = data.pPipelineCreationFeedback; + if (data.pipelineStageCreationFeedbackCount !== undefined) this.pipelineStageCreationFeedbackCount = data.pipelineStageCreationFeedbackCount; + if (data.pPipelineStageCreationFeedbacks !== undefined) this.pPipelineStageCreationFeedbacks = data.pPipelineStageCreationFeedbacks; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCreationFeedbackCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_CREATION_FEEDBACK_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pPipelineCreationFeedback(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pPipelineCreationFeedback(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get pipelineStageCreationFeedbackCount(): number { + return this.#view.getUint32(24, LE); + } + + set pipelineStageCreationFeedbackCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pPipelineStageCreationFeedbacks(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pPipelineStageCreationFeedbacks(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineCreationFeedbackCreateInfoEXT.ts b/api/struct/PipelineCreationFeedbackCreateInfoEXT.ts new file mode 100644 index 0000000..0385cbb --- /dev/null +++ b/api/struct/PipelineCreationFeedbackCreateInfoEXT.ts @@ -0,0 +1,2 @@ + import { PipelineCreationFeedbackCreateInfo } from "./PipelineCreationFeedbackCreateInfo.ts"; + export type PipelineCreationFeedbackCreateInfoEXT = PipelineCreationFeedbackCreateInfo; \ No newline at end of file diff --git a/api/struct/PipelineCreationFeedbackEXT.ts b/api/struct/PipelineCreationFeedbackEXT.ts new file mode 100644 index 0000000..eacc1c2 --- /dev/null +++ b/api/struct/PipelineCreationFeedbackEXT.ts @@ -0,0 +1,2 @@ + import { PipelineCreationFeedback } from "./PipelineCreationFeedback.ts"; + export type PipelineCreationFeedbackEXT = PipelineCreationFeedback; \ No newline at end of file diff --git a/api/struct/PipelineDepthStencilStateCreateInfo.ts b/api/struct/PipelineDepthStencilStateCreateInfo.ts new file mode 100644 index 0000000..0f2c46a --- /dev/null +++ b/api/struct/PipelineDepthStencilStateCreateInfo.ts @@ -0,0 +1,177 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StencilOpState} from "./StencilOpState.ts"; +import { StructureType, CompareOp } from "../enum.ts"; +import { PipelineDepthStencilStateCreateFlags, Bool32 } from "../def.ts"; + +export interface InitPipelineDepthStencilStateCreateInfo { + pNext?: AnyPointer; + flags?: PipelineDepthStencilStateCreateFlags; + depthTestEnable?: Bool32; + depthWriteEnable?: Bool32; + depthCompareOp?: CompareOp; + depthBoundsTestEnable?: Bool32; + stencilTestEnable?: Bool32; + front?: StencilOpState; + back?: StencilOpState; + minDepthBounds?: number; + maxDepthBounds?: number; +} + +export class PipelineDepthStencilStateCreateInfo implements BaseStruct { + static size = 104; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineDepthStencilStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineDepthStencilStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineDepthStencilStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineDepthStencilStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineDepthStencilStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.depthTestEnable !== undefined) this.depthTestEnable = data.depthTestEnable; + if (data.depthWriteEnable !== undefined) this.depthWriteEnable = data.depthWriteEnable; + if (data.depthCompareOp !== undefined) this.depthCompareOp = data.depthCompareOp; + if (data.depthBoundsTestEnable !== undefined) this.depthBoundsTestEnable = data.depthBoundsTestEnable; + if (data.stencilTestEnable !== undefined) this.stencilTestEnable = data.stencilTestEnable; + if (data.front !== undefined) this.front = data.front; + if (data.back !== undefined) this.back = data.back; + if (data.minDepthBounds !== undefined) this.minDepthBounds = data.minDepthBounds; + if (data.maxDepthBounds !== undefined) this.maxDepthBounds = data.maxDepthBounds; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineDepthStencilStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineDepthStencilStateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get depthTestEnable(): number { + return this.#view.getUint32(20, LE); + } + + set depthTestEnable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get depthWriteEnable(): number { + return this.#view.getUint32(24, LE); + } + + set depthWriteEnable(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get depthCompareOp(): number { + return this.#view.getUint32(28, LE); + } + + set depthCompareOp(value: CompareOp) { + this.#view.setUint32(28, Number(value), LE); + } + + get depthBoundsTestEnable(): number { + return this.#view.getUint32(32, LE); + } + + set depthBoundsTestEnable(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get stencilTestEnable(): number { + return this.#view.getUint32(36, LE); + } + + set stencilTestEnable(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get front(): StencilOpState { + return new StencilOpState(this.#data.subarray(40, 40 + StencilOpState.size)); + } + + set front(value: StencilOpState) { + if (value[BUFFER].byteLength < StencilOpState.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } + + get back(): StencilOpState { + return new StencilOpState(this.#data.subarray(68, 68 + StencilOpState.size)); + } + + set back(value: StencilOpState) { + if (value[BUFFER].byteLength < StencilOpState.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 68); + } + + get minDepthBounds(): number { + return this.#view.getFloat32(96, LE); + } + + set minDepthBounds(value: number) { + this.#view.setFloat32(96, Number(value), LE); + } + + get maxDepthBounds(): number { + return this.#view.getFloat32(100, LE); + } + + set maxDepthBounds(value: number) { + this.#view.setFloat32(100, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineDiscardRectangleStateCreateInfoEXT.ts b/api/struct/PipelineDiscardRectangleStateCreateInfoEXT.ts new file mode 100644 index 0000000..c1e63e6 --- /dev/null +++ b/api/struct/PipelineDiscardRectangleStateCreateInfoEXT.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; +import { StructureType, DiscardRectangleModeEXT } from "../enum.ts"; +import { PipelineDiscardRectangleStateCreateFlagsEXT } from "../def.ts"; + +export interface InitPipelineDiscardRectangleStateCreateInfoEXT { + pNext?: AnyPointer; + flags?: PipelineDiscardRectangleStateCreateFlagsEXT; + discardRectangleMode?: DiscardRectangleModeEXT; + discardRectangleCount?: number; + pDiscardRectangles?: AnyPointer; +} + +export class PipelineDiscardRectangleStateCreateInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineDiscardRectangleStateCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineDiscardRectangleStateCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineDiscardRectangleStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineDiscardRectangleStateCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineDiscardRectangleStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.discardRectangleMode !== undefined) this.discardRectangleMode = data.discardRectangleMode; + if (data.discardRectangleCount !== undefined) this.discardRectangleCount = data.discardRectangleCount; + if (data.pDiscardRectangles !== undefined) this.pDiscardRectangles = data.pDiscardRectangles; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineDiscardRectangleStateCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineDiscardRectangleStateCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get discardRectangleMode(): number { + return this.#view.getUint32(20, LE); + } + + set discardRectangleMode(value: DiscardRectangleModeEXT) { + this.#view.setUint32(20, Number(value), LE); + } + + get discardRectangleCount(): number { + return this.#view.getUint32(24, LE); + } + + set discardRectangleCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pDiscardRectangles(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pDiscardRectangles(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineDynamicStateCreateInfo.ts b/api/struct/PipelineDynamicStateCreateInfo.ts new file mode 100644 index 0000000..1e8cc34 --- /dev/null +++ b/api/struct/PipelineDynamicStateCreateInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, DynamicState } from "../enum.ts"; +import { PipelineDynamicStateCreateFlags } from "../def.ts"; + +export interface InitPipelineDynamicStateCreateInfo { + pNext?: AnyPointer; + flags?: PipelineDynamicStateCreateFlags; + dynamicStateCount?: number; + pDynamicStates?: AnyPointer; +} + +export class PipelineDynamicStateCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineDynamicStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineDynamicStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineDynamicStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineDynamicStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineDynamicStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.dynamicStateCount !== undefined) this.dynamicStateCount = data.dynamicStateCount; + if (data.pDynamicStates !== undefined) this.pDynamicStates = data.pDynamicStates; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineDynamicStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_DYNAMIC_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineDynamicStateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get dynamicStateCount(): number { + return this.#view.getUint32(20, LE); + } + + set dynamicStateCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pDynamicStates(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDynamicStates(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineExecutableInfoKHR.ts b/api/struct/PipelineExecutableInfoKHR.ts new file mode 100644 index 0000000..694ee34 --- /dev/null +++ b/api/struct/PipelineExecutableInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Pipeline } from "../def.ts"; + +export interface InitPipelineExecutableInfoKHR { + pNext?: AnyPointer; + pipeline?: Pipeline; + executableIndex?: number; +} + +export class PipelineExecutableInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineExecutableInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineExecutableInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineExecutableInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineExecutableInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineExecutableInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipeline !== undefined) this.pipeline = data.pipeline; + if (data.executableIndex !== undefined) this.executableIndex = data.executableIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutableInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_EXECUTABLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipeline(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pipeline(value: Pipeline) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get executableIndex(): number { + return this.#view.getUint32(24, LE); + } + + set executableIndex(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineExecutableInternalRepresentationKHR.ts b/api/struct/PipelineExecutableInternalRepresentationKHR.ts new file mode 100644 index 0000000..d45f34d --- /dev/null +++ b/api/struct/PipelineExecutableInternalRepresentationKHR.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPipelineExecutableInternalRepresentationKHR { + pNext?: AnyPointer; + name?: Uint8Array; + description?: Uint8Array; + isText?: Bool32; + dataSize?: number | bigint; + pData?: AnyPointer; +} + +export class PipelineExecutableInternalRepresentationKHR implements BaseStruct { + static size = 552; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineExecutableInternalRepresentationKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineExecutableInternalRepresentationKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineExecutableInternalRepresentationKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineExecutableInternalRepresentationKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineExecutableInternalRepresentationKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.name !== undefined) this.name = data.name; + if (data.description !== undefined) this.description = data.description; + if (data.isText !== undefined) this.isText = data.isText; + if (data.dataSize !== undefined) this.dataSize = data.dataSize; + if (data.pData !== undefined) this.pData = data.pData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutableInternalRepresentationKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get name(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); + } + + set name(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } + + get description(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 272, 256); + } + + set description(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 272); + } + + get isText(): number { + return this.#view.getUint32(528, LE); + } + + set isText(value: Bool32) { + this.#view.setUint32(528, Number(value), LE); + } + + get dataSize(): bigint { + return this.#view.getBigUint64(536, LE); + } + + set dataSize(value: number | bigint) { + this.#view.setBigUint64(536, BigInt(value), LE); + } + + get pData(): Deno.PointerValue { + return pointerFromView(this.#view, 544, LE); + } + + set pData(value: AnyPointer) { + this.#view.setBigUint64(544, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineExecutablePropertiesKHR.ts b/api/struct/PipelineExecutablePropertiesKHR.ts new file mode 100644 index 0000000..a909ef1 --- /dev/null +++ b/api/struct/PipelineExecutablePropertiesKHR.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ShaderStageFlags } from "../def.ts"; + +export interface InitPipelineExecutablePropertiesKHR { + pNext?: AnyPointer; + stages?: ShaderStageFlags; + name?: Uint8Array; + description?: Uint8Array; + subgroupSize?: number; +} + +export class PipelineExecutablePropertiesKHR implements BaseStruct { + static size = 536; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineExecutablePropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineExecutablePropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineExecutablePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineExecutablePropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineExecutablePropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stages !== undefined) this.stages = data.stages; + if (data.name !== undefined) this.name = data.name; + if (data.description !== undefined) this.description = data.description; + if (data.subgroupSize !== undefined) this.subgroupSize = data.subgroupSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutablePropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_EXECUTABLE_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stages(): number { + return this.#view.getUint32(16, LE); + } + + set stages(value: ShaderStageFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get name(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); + } + + set name(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } + + get description(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); + } + + set description(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 276); + } + + get subgroupSize(): number { + return this.#view.getUint32(532, LE); + } + + set subgroupSize(value: number) { + this.#view.setUint32(532, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineExecutableStatisticKHR.ts b/api/struct/PipelineExecutableStatisticKHR.ts new file mode 100644 index 0000000..5f88df0 --- /dev/null +++ b/api/struct/PipelineExecutableStatisticKHR.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PipelineExecutableStatisticFormatKHR } from "../enum.ts"; +import { PipelineExecutableStatisticValueKHR } from "../union.ts"; + +export interface InitPipelineExecutableStatisticKHR { + pNext?: AnyPointer; + name?: Uint8Array; + description?: Uint8Array; + format?: PipelineExecutableStatisticFormatKHR; + value?: PipelineExecutableStatisticValueKHR; +} + +export class PipelineExecutableStatisticKHR implements BaseStruct { + static size = 544; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineExecutableStatisticKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineExecutableStatisticKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineExecutableStatisticKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineExecutableStatisticKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineExecutableStatisticKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.name !== undefined) this.name = data.name; + if (data.description !== undefined) this.description = data.description; + if (data.format !== undefined) this.format = data.format; + if (data.value !== undefined) this.value = data.value; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutableStatisticKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_EXECUTABLE_STATISTIC_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get name(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); + } + + set name(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } + + get description(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 272, 256); + } + + set description(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 272); + } + + get format(): number { + return this.#view.getUint32(528, LE); + } + + set format(value: PipelineExecutableStatisticFormatKHR) { + this.#view.setUint32(528, Number(value), LE); + } + + get value(): unknown { + throw new Error(`Unknown type: {"union":["u32","i64","u64","f64"]}`); + } + + set value(value: PipelineExecutableStatisticValueKHR) { + throw new Error(`Unknown type: {"union":["u32","i64","u64","f64"]}`); + } +} \ No newline at end of file diff --git a/api/struct/PipelineFragmentShadingRateEnumStateCreateInfoNV.ts b/api/struct/PipelineFragmentShadingRateEnumStateCreateInfoNV.ts new file mode 100644 index 0000000..e36d958 --- /dev/null +++ b/api/struct/PipelineFragmentShadingRateEnumStateCreateInfoNV.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, FragmentShadingRateTypeNV, FragmentShadingRateNV, FragmentShadingRateCombinerOpKHR } from "../enum.ts"; + +export interface InitPipelineFragmentShadingRateEnumStateCreateInfoNV { + pNext?: AnyPointer; + shadingRateType?: FragmentShadingRateTypeNV; + shadingRate?: FragmentShadingRateNV; + combinerOps?: Uint32Array; +} + +export class PipelineFragmentShadingRateEnumStateCreateInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineFragmentShadingRateEnumStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineFragmentShadingRateEnumStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineFragmentShadingRateEnumStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineFragmentShadingRateEnumStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineFragmentShadingRateEnumStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shadingRateType !== undefined) this.shadingRateType = data.shadingRateType; + if (data.shadingRate !== undefined) this.shadingRate = data.shadingRate; + if (data.combinerOps !== undefined) this.combinerOps = data.combinerOps; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineFragmentShadingRateEnumStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shadingRateType(): number { + return this.#view.getUint32(16, LE); + } + + set shadingRateType(value: FragmentShadingRateTypeNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get shadingRate(): number { + return this.#view.getUint32(20, LE); + } + + set shadingRate(value: FragmentShadingRateNV) { + this.#view.setUint32(20, Number(value), LE); + } + + get combinerOps(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 24, 2); + } + + set combinerOps(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 24); + } +} \ No newline at end of file diff --git a/api/struct/PipelineFragmentShadingRateStateCreateInfoKHR.ts b/api/struct/PipelineFragmentShadingRateStateCreateInfoKHR.ts new file mode 100644 index 0000000..51b7b38 --- /dev/null +++ b/api/struct/PipelineFragmentShadingRateStateCreateInfoKHR.ts @@ -0,0 +1,93 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType, FragmentShadingRateCombinerOpKHR } from "../enum.ts"; + +export interface InitPipelineFragmentShadingRateStateCreateInfoKHR { + pNext?: AnyPointer; + fragmentSize?: Extent2D; + combinerOps?: Uint32Array; +} + +export class PipelineFragmentShadingRateStateCreateInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineFragmentShadingRateStateCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineFragmentShadingRateStateCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineFragmentShadingRateStateCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineFragmentShadingRateStateCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineFragmentShadingRateStateCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentSize !== undefined) this.fragmentSize = data.fragmentSize; + if (data.combinerOps !== undefined) this.combinerOps = data.combinerOps; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineFragmentShadingRateStateCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentSize(): Extent2D { + return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); + } + + set fragmentSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get combinerOps(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 24, 2); + } + + set combinerOps(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 24); + } +} \ No newline at end of file diff --git a/api/struct/PipelineInfoEXT.ts b/api/struct/PipelineInfoEXT.ts new file mode 100644 index 0000000..a857189 --- /dev/null +++ b/api/struct/PipelineInfoEXT.ts @@ -0,0 +1,2 @@ + import { PipelineInfoKHR } from "./PipelineInfoKHR.ts"; + export type PipelineInfoEXT = PipelineInfoKHR; \ No newline at end of file diff --git a/api/struct/PipelineInfoKHR.ts b/api/struct/PipelineInfoKHR.ts new file mode 100644 index 0000000..03ddf28 --- /dev/null +++ b/api/struct/PipelineInfoKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Pipeline } from "../def.ts"; + +export interface InitPipelineInfoKHR { + pNext?: AnyPointer; + pipeline?: Pipeline; +} + +export class PipelineInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipeline !== undefined) this.pipeline = data.pipeline; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipeline(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pipeline(value: Pipeline) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineInputAssemblyStateCreateInfo.ts b/api/struct/PipelineInputAssemblyStateCreateInfo.ts new file mode 100644 index 0000000..5b3d1ba --- /dev/null +++ b/api/struct/PipelineInputAssemblyStateCreateInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PrimitiveTopology } from "../enum.ts"; +import { PipelineInputAssemblyStateCreateFlags, Bool32 } from "../def.ts"; + +export interface InitPipelineInputAssemblyStateCreateInfo { + pNext?: AnyPointer; + flags?: PipelineInputAssemblyStateCreateFlags; + topology?: PrimitiveTopology; + primitiveRestartEnable?: Bool32; +} + +export class PipelineInputAssemblyStateCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineInputAssemblyStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineInputAssemblyStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineInputAssemblyStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineInputAssemblyStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineInputAssemblyStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.topology !== undefined) this.topology = data.topology; + if (data.primitiveRestartEnable !== undefined) this.primitiveRestartEnable = data.primitiveRestartEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineInputAssemblyStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineInputAssemblyStateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get topology(): number { + return this.#view.getUint32(20, LE); + } + + set topology(value: PrimitiveTopology) { + this.#view.setUint32(20, Number(value), LE); + } + + get primitiveRestartEnable(): number { + return this.#view.getUint32(24, LE); + } + + set primitiveRestartEnable(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineLayoutCreateInfo.ts b/api/struct/PipelineLayoutCreateInfo.ts new file mode 100644 index 0000000..c38dab3 --- /dev/null +++ b/api/struct/PipelineLayoutCreateInfo.ts @@ -0,0 +1,121 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PushConstantRange} from "./PushConstantRange.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineLayoutCreateFlags, DescriptorSetLayout } from "../def.ts"; + +export interface InitPipelineLayoutCreateInfo { + pNext?: AnyPointer; + flags?: PipelineLayoutCreateFlags; + setLayoutCount?: number; + pSetLayouts?: AnyPointer; + pushConstantRangeCount?: number; + pPushConstantRanges?: AnyPointer; +} + +export class PipelineLayoutCreateInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineLayoutCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineLayoutCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineLayoutCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineLayoutCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineLayoutCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.setLayoutCount !== undefined) this.setLayoutCount = data.setLayoutCount; + if (data.pSetLayouts !== undefined) this.pSetLayouts = data.pSetLayouts; + if (data.pushConstantRangeCount !== undefined) this.pushConstantRangeCount = data.pushConstantRangeCount; + if (data.pPushConstantRanges !== undefined) this.pPushConstantRanges = data.pPushConstantRanges; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineLayoutCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_LAYOUT_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineLayoutCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get setLayoutCount(): number { + return this.#view.getUint32(20, LE); + } + + set setLayoutCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pSetLayouts(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pSetLayouts(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pushConstantRangeCount(): number { + return this.#view.getUint32(32, LE); + } + + set pushConstantRangeCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pPushConstantRanges(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pPushConstantRanges(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineLibraryCreateInfoKHR.ts b/api/struct/PipelineLibraryCreateInfoKHR.ts new file mode 100644 index 0000000..0e5e22a --- /dev/null +++ b/api/struct/PipelineLibraryCreateInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Pipeline } from "../def.ts"; + +export interface InitPipelineLibraryCreateInfoKHR { + pNext?: AnyPointer; + libraryCount?: number; + pLibraries?: AnyPointer; +} + +export class PipelineLibraryCreateInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineLibraryCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineLibraryCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineLibraryCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineLibraryCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineLibraryCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.libraryCount !== undefined) this.libraryCount = data.libraryCount; + if (data.pLibraries !== undefined) this.pLibraries = data.pLibraries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineLibraryCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_LIBRARY_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get libraryCount(): number { + return this.#view.getUint32(16, LE); + } + + set libraryCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pLibraries(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pLibraries(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineMultisampleStateCreateInfo.ts b/api/struct/PipelineMultisampleStateCreateInfo.ts new file mode 100644 index 0000000..565ddb3 --- /dev/null +++ b/api/struct/PipelineMultisampleStateCreateInfo.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SampleCountFlagBits } from "../enum.ts"; +import { PipelineMultisampleStateCreateFlags, Bool32, SampleMask } from "../def.ts"; + +export interface InitPipelineMultisampleStateCreateInfo { + pNext?: AnyPointer; + flags?: PipelineMultisampleStateCreateFlags; + rasterizationSamples?: SampleCountFlagBits; + sampleShadingEnable?: Bool32; + minSampleShading?: number; + pSampleMask?: AnyPointer; + alphaToCoverageEnable?: Bool32; + alphaToOneEnable?: Bool32; +} + +export class PipelineMultisampleStateCreateInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineMultisampleStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineMultisampleStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineMultisampleStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineMultisampleStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineMultisampleStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.rasterizationSamples !== undefined) this.rasterizationSamples = data.rasterizationSamples; + if (data.sampleShadingEnable !== undefined) this.sampleShadingEnable = data.sampleShadingEnable; + if (data.minSampleShading !== undefined) this.minSampleShading = data.minSampleShading; + if (data.pSampleMask !== undefined) this.pSampleMask = data.pSampleMask; + if (data.alphaToCoverageEnable !== undefined) this.alphaToCoverageEnable = data.alphaToCoverageEnable; + if (data.alphaToOneEnable !== undefined) this.alphaToOneEnable = data.alphaToOneEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineMultisampleStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineMultisampleStateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get rasterizationSamples(): number { + return this.#view.getUint32(20, LE); + } + + set rasterizationSamples(value: SampleCountFlagBits) { + this.#view.setUint32(20, Number(value), LE); + } + + get sampleShadingEnable(): number { + return this.#view.getUint32(24, LE); + } + + set sampleShadingEnable(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get minSampleShading(): number { + return this.#view.getFloat32(28, LE); + } + + set minSampleShading(value: number) { + this.#view.setFloat32(28, Number(value), LE); + } + + get pSampleMask(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pSampleMask(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get alphaToCoverageEnable(): number { + return this.#view.getUint32(40, LE); + } + + set alphaToCoverageEnable(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get alphaToOneEnable(): number { + return this.#view.getUint32(44, LE); + } + + set alphaToOneEnable(value: Bool32) { + this.#view.setUint32(44, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelinePropertiesIdentifierEXT.ts b/api/struct/PipelinePropertiesIdentifierEXT.ts new file mode 100644 index 0000000..9cd7ce4 --- /dev/null +++ b/api/struct/PipelinePropertiesIdentifierEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPipelinePropertiesIdentifierEXT { + pNext?: AnyPointer; + pipelineIdentifier?: Uint8Array; +} + +export class PipelinePropertiesIdentifierEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelinePropertiesIdentifierEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelinePropertiesIdentifierEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelinePropertiesIdentifierEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelinePropertiesIdentifierEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelinePropertiesIdentifierEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pipelineIdentifier !== undefined) this.pipelineIdentifier = data.pipelineIdentifier; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelinePropertiesIdentifierEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_PROPERTIES_IDENTIFIER_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pipelineIdentifier(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); + } + + set pipelineIdentifier(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 16); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRasterizationConservativeStateCreateInfoEXT.ts b/api/struct/PipelineRasterizationConservativeStateCreateInfoEXT.ts new file mode 100644 index 0000000..e76f3f2 --- /dev/null +++ b/api/struct/PipelineRasterizationConservativeStateCreateInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ConservativeRasterizationModeEXT } from "../enum.ts"; +import { PipelineRasterizationConservativeStateCreateFlagsEXT } from "../def.ts"; + +export interface InitPipelineRasterizationConservativeStateCreateInfoEXT { + pNext?: AnyPointer; + flags?: PipelineRasterizationConservativeStateCreateFlagsEXT; + conservativeRasterizationMode?: ConservativeRasterizationModeEXT; + extraPrimitiveOverestimationSize?: number; +} + +export class PipelineRasterizationConservativeStateCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRasterizationConservativeStateCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationConservativeStateCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRasterizationConservativeStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRasterizationConservativeStateCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRasterizationConservativeStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.conservativeRasterizationMode !== undefined) this.conservativeRasterizationMode = data.conservativeRasterizationMode; + if (data.extraPrimitiveOverestimationSize !== undefined) this.extraPrimitiveOverestimationSize = data.extraPrimitiveOverestimationSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationConservativeStateCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineRasterizationConservativeStateCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get conservativeRasterizationMode(): number { + return this.#view.getUint32(20, LE); + } + + set conservativeRasterizationMode(value: ConservativeRasterizationModeEXT) { + this.#view.setUint32(20, Number(value), LE); + } + + get extraPrimitiveOverestimationSize(): number { + return this.#view.getFloat32(24, LE); + } + + set extraPrimitiveOverestimationSize(value: number) { + this.#view.setFloat32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRasterizationDepthClipStateCreateInfoEXT.ts b/api/struct/PipelineRasterizationDepthClipStateCreateInfoEXT.ts new file mode 100644 index 0000000..b1d5222 --- /dev/null +++ b/api/struct/PipelineRasterizationDepthClipStateCreateInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineRasterizationDepthClipStateCreateFlagsEXT, Bool32 } from "../def.ts"; + +export interface InitPipelineRasterizationDepthClipStateCreateInfoEXT { + pNext?: AnyPointer; + flags?: PipelineRasterizationDepthClipStateCreateFlagsEXT; + depthClipEnable?: Bool32; +} + +export class PipelineRasterizationDepthClipStateCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRasterizationDepthClipStateCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationDepthClipStateCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRasterizationDepthClipStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRasterizationDepthClipStateCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRasterizationDepthClipStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.depthClipEnable !== undefined) this.depthClipEnable = data.depthClipEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationDepthClipStateCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineRasterizationDepthClipStateCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get depthClipEnable(): number { + return this.#view.getUint32(20, LE); + } + + set depthClipEnable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRasterizationLineStateCreateInfoEXT.ts b/api/struct/PipelineRasterizationLineStateCreateInfoEXT.ts new file mode 100644 index 0000000..e357ed8 --- /dev/null +++ b/api/struct/PipelineRasterizationLineStateCreateInfoEXT.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, LineRasterizationModeEXT } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPipelineRasterizationLineStateCreateInfoEXT { + pNext?: AnyPointer; + lineRasterizationMode?: LineRasterizationModeEXT; + stippledLineEnable?: Bool32; + lineStippleFactor?: number; + lineStipplePattern?: number; +} + +export class PipelineRasterizationLineStateCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRasterizationLineStateCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationLineStateCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRasterizationLineStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRasterizationLineStateCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRasterizationLineStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.lineRasterizationMode !== undefined) this.lineRasterizationMode = data.lineRasterizationMode; + if (data.stippledLineEnable !== undefined) this.stippledLineEnable = data.stippledLineEnable; + if (data.lineStippleFactor !== undefined) this.lineStippleFactor = data.lineStippleFactor; + if (data.lineStipplePattern !== undefined) this.lineStipplePattern = data.lineStipplePattern; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationLineStateCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get lineRasterizationMode(): number { + return this.#view.getUint32(16, LE); + } + + set lineRasterizationMode(value: LineRasterizationModeEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get stippledLineEnable(): number { + return this.#view.getUint32(20, LE); + } + + set stippledLineEnable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get lineStippleFactor(): number { + return this.#view.getUint32(24, LE); + } + + set lineStippleFactor(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get lineStipplePattern(): number { + return this.#view.getUint16(28, LE); + } + + set lineStipplePattern(value: number) { + this.#view.setUint16(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRasterizationProvokingVertexStateCreateInfoEXT.ts b/api/struct/PipelineRasterizationProvokingVertexStateCreateInfoEXT.ts new file mode 100644 index 0000000..18c4f73 --- /dev/null +++ b/api/struct/PipelineRasterizationProvokingVertexStateCreateInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ProvokingVertexModeEXT } from "../enum.ts"; + +export interface InitPipelineRasterizationProvokingVertexStateCreateInfoEXT { + pNext?: AnyPointer; + provokingVertexMode?: ProvokingVertexModeEXT; +} + +export class PipelineRasterizationProvokingVertexStateCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRasterizationProvokingVertexStateCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationProvokingVertexStateCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRasterizationProvokingVertexStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRasterizationProvokingVertexStateCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRasterizationProvokingVertexStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.provokingVertexMode !== undefined) this.provokingVertexMode = data.provokingVertexMode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationProvokingVertexStateCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get provokingVertexMode(): number { + return this.#view.getUint32(16, LE); + } + + set provokingVertexMode(value: ProvokingVertexModeEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRasterizationStateCreateInfo.ts b/api/struct/PipelineRasterizationStateCreateInfo.ts new file mode 100644 index 0000000..2c3051f --- /dev/null +++ b/api/struct/PipelineRasterizationStateCreateInfo.ts @@ -0,0 +1,180 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PolygonMode, FrontFace } from "../enum.ts"; +import { PipelineRasterizationStateCreateFlags, Bool32, CullModeFlags } from "../def.ts"; + +export interface InitPipelineRasterizationStateCreateInfo { + pNext?: AnyPointer; + flags?: PipelineRasterizationStateCreateFlags; + depthClampEnable?: Bool32; + rasterizerDiscardEnable?: Bool32; + polygonMode?: PolygonMode; + cullMode?: CullModeFlags; + frontFace?: FrontFace; + depthBiasEnable?: Bool32; + depthBiasConstantFactor?: number; + depthBiasClamp?: number; + depthBiasSlopeFactor?: number; + lineWidth?: number; +} + +export class PipelineRasterizationStateCreateInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRasterizationStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRasterizationStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRasterizationStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRasterizationStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.depthClampEnable !== undefined) this.depthClampEnable = data.depthClampEnable; + if (data.rasterizerDiscardEnable !== undefined) this.rasterizerDiscardEnable = data.rasterizerDiscardEnable; + if (data.polygonMode !== undefined) this.polygonMode = data.polygonMode; + if (data.cullMode !== undefined) this.cullMode = data.cullMode; + if (data.frontFace !== undefined) this.frontFace = data.frontFace; + if (data.depthBiasEnable !== undefined) this.depthBiasEnable = data.depthBiasEnable; + if (data.depthBiasConstantFactor !== undefined) this.depthBiasConstantFactor = data.depthBiasConstantFactor; + if (data.depthBiasClamp !== undefined) this.depthBiasClamp = data.depthBiasClamp; + if (data.depthBiasSlopeFactor !== undefined) this.depthBiasSlopeFactor = data.depthBiasSlopeFactor; + if (data.lineWidth !== undefined) this.lineWidth = data.lineWidth; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_RASTERIZATION_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineRasterizationStateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get depthClampEnable(): number { + return this.#view.getUint32(20, LE); + } + + set depthClampEnable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get rasterizerDiscardEnable(): number { + return this.#view.getUint32(24, LE); + } + + set rasterizerDiscardEnable(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get polygonMode(): number { + return this.#view.getUint32(28, LE); + } + + set polygonMode(value: PolygonMode) { + this.#view.setUint32(28, Number(value), LE); + } + + get cullMode(): number { + return this.#view.getUint32(32, LE); + } + + set cullMode(value: CullModeFlags) { + this.#view.setUint32(32, Number(value), LE); + } + + get frontFace(): number { + return this.#view.getUint32(36, LE); + } + + set frontFace(value: FrontFace) { + this.#view.setUint32(36, Number(value), LE); + } + + get depthBiasEnable(): number { + return this.#view.getUint32(40, LE); + } + + set depthBiasEnable(value: Bool32) { + this.#view.setUint32(40, Number(value), LE); + } + + get depthBiasConstantFactor(): number { + return this.#view.getFloat32(44, LE); + } + + set depthBiasConstantFactor(value: number) { + this.#view.setFloat32(44, Number(value), LE); + } + + get depthBiasClamp(): number { + return this.#view.getFloat32(48, LE); + } + + set depthBiasClamp(value: number) { + this.#view.setFloat32(48, Number(value), LE); + } + + get depthBiasSlopeFactor(): number { + return this.#view.getFloat32(52, LE); + } + + set depthBiasSlopeFactor(value: number) { + this.#view.setFloat32(52, Number(value), LE); + } + + get lineWidth(): number { + return this.#view.getFloat32(56, LE); + } + + set lineWidth(value: number) { + this.#view.setFloat32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRasterizationStateRasterizationOrderAMD.ts b/api/struct/PipelineRasterizationStateRasterizationOrderAMD.ts new file mode 100644 index 0000000..cb66aba --- /dev/null +++ b/api/struct/PipelineRasterizationStateRasterizationOrderAMD.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, RasterizationOrderAMD } from "../enum.ts"; + +export interface InitPipelineRasterizationStateRasterizationOrderAMD { + pNext?: AnyPointer; + rasterizationOrder?: RasterizationOrderAMD; +} + +export class PipelineRasterizationStateRasterizationOrderAMD implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRasterizationStateRasterizationOrderAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationStateRasterizationOrderAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRasterizationStateRasterizationOrderAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRasterizationStateRasterizationOrderAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRasterizationStateRasterizationOrderAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.rasterizationOrder !== undefined) this.rasterizationOrder = data.rasterizationOrder; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationStateRasterizationOrderAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get rasterizationOrder(): number { + return this.#view.getUint32(16, LE); + } + + set rasterizationOrder(value: RasterizationOrderAMD) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRasterizationStateStreamCreateInfoEXT.ts b/api/struct/PipelineRasterizationStateStreamCreateInfoEXT.ts new file mode 100644 index 0000000..557e6a4 --- /dev/null +++ b/api/struct/PipelineRasterizationStateStreamCreateInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineRasterizationStateStreamCreateFlagsEXT } from "../def.ts"; + +export interface InitPipelineRasterizationStateStreamCreateInfoEXT { + pNext?: AnyPointer; + flags?: PipelineRasterizationStateStreamCreateFlagsEXT; + rasterizationStream?: number; +} + +export class PipelineRasterizationStateStreamCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRasterizationStateStreamCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationStateStreamCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRasterizationStateStreamCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRasterizationStateStreamCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRasterizationStateStreamCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.rasterizationStream !== undefined) this.rasterizationStream = data.rasterizationStream; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationStateStreamCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineRasterizationStateStreamCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get rasterizationStream(): number { + return this.#view.getUint32(20, LE); + } + + set rasterizationStream(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRenderingCreateInfo.ts b/api/struct/PipelineRenderingCreateInfo.ts new file mode 100644 index 0000000..b759d6b --- /dev/null +++ b/api/struct/PipelineRenderingCreateInfo.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format } from "../enum.ts"; + +export interface InitPipelineRenderingCreateInfo { + pNext?: AnyPointer; + viewMask?: number; + colorAttachmentCount?: number; + pColorAttachmentFormats?: AnyPointer; + depthAttachmentFormat?: Format; + stencilAttachmentFormat?: Format; +} + +export class PipelineRenderingCreateInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRenderingCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRenderingCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRenderingCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRenderingCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRenderingCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.viewMask !== undefined) this.viewMask = data.viewMask; + if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; + if (data.pColorAttachmentFormats !== undefined) this.pColorAttachmentFormats = data.pColorAttachmentFormats; + if (data.depthAttachmentFormat !== undefined) this.depthAttachmentFormat = data.depthAttachmentFormat; + if (data.stencilAttachmentFormat !== undefined) this.stencilAttachmentFormat = data.stencilAttachmentFormat; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRenderingCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_RENDERING_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get viewMask(): number { + return this.#view.getUint32(16, LE); + } + + set viewMask(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get colorAttachmentCount(): number { + return this.#view.getUint32(20, LE); + } + + set colorAttachmentCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pColorAttachmentFormats(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pColorAttachmentFormats(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get depthAttachmentFormat(): number { + return this.#view.getUint32(32, LE); + } + + set depthAttachmentFormat(value: Format) { + this.#view.setUint32(32, Number(value), LE); + } + + get stencilAttachmentFormat(): number { + return this.#view.getUint32(36, LE); + } + + set stencilAttachmentFormat(value: Format) { + this.#view.setUint32(36, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRenderingCreateInfoKHR.ts b/api/struct/PipelineRenderingCreateInfoKHR.ts new file mode 100644 index 0000000..f89f14e --- /dev/null +++ b/api/struct/PipelineRenderingCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { PipelineRenderingCreateInfo } from "./PipelineRenderingCreateInfo.ts"; + export type PipelineRenderingCreateInfoKHR = PipelineRenderingCreateInfo; \ No newline at end of file diff --git a/api/struct/PipelineRepresentativeFragmentTestStateCreateInfoNV.ts b/api/struct/PipelineRepresentativeFragmentTestStateCreateInfoNV.ts new file mode 100644 index 0000000..7929100 --- /dev/null +++ b/api/struct/PipelineRepresentativeFragmentTestStateCreateInfoNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPipelineRepresentativeFragmentTestStateCreateInfoNV { + pNext?: AnyPointer; + representativeFragmentTestEnable?: Bool32; +} + +export class PipelineRepresentativeFragmentTestStateCreateInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRepresentativeFragmentTestStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRepresentativeFragmentTestStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRepresentativeFragmentTestStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRepresentativeFragmentTestStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRepresentativeFragmentTestStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.representativeFragmentTestEnable !== undefined) this.representativeFragmentTestEnable = data.representativeFragmentTestEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRepresentativeFragmentTestStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get representativeFragmentTestEnable(): number { + return this.#view.getUint32(16, LE); + } + + set representativeFragmentTestEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineRobustnessCreateInfoEXT.ts b/api/struct/PipelineRobustnessCreateInfoEXT.ts new file mode 100644 index 0000000..957f96e --- /dev/null +++ b/api/struct/PipelineRobustnessCreateInfoEXT.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, PipelineRobustnessBufferBehaviorEXT, PipelineRobustnessImageBehaviorEXT } from "../enum.ts"; + +export interface InitPipelineRobustnessCreateInfoEXT { + pNext?: AnyPointer; + storageBuffers?: PipelineRobustnessBufferBehaviorEXT; + uniformBuffers?: PipelineRobustnessBufferBehaviorEXT; + vertexInputs?: PipelineRobustnessBufferBehaviorEXT; + images?: PipelineRobustnessImageBehaviorEXT; +} + +export class PipelineRobustnessCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineRobustnessCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRobustnessCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineRobustnessCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineRobustnessCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineRobustnessCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.storageBuffers !== undefined) this.storageBuffers = data.storageBuffers; + if (data.uniformBuffers !== undefined) this.uniformBuffers = data.uniformBuffers; + if (data.vertexInputs !== undefined) this.vertexInputs = data.vertexInputs; + if (data.images !== undefined) this.images = data.images; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRobustnessCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_ROBUSTNESS_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get storageBuffers(): number { + return this.#view.getUint32(16, LE); + } + + set storageBuffers(value: PipelineRobustnessBufferBehaviorEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get uniformBuffers(): number { + return this.#view.getUint32(20, LE); + } + + set uniformBuffers(value: PipelineRobustnessBufferBehaviorEXT) { + this.#view.setUint32(20, Number(value), LE); + } + + get vertexInputs(): number { + return this.#view.getUint32(24, LE); + } + + set vertexInputs(value: PipelineRobustnessBufferBehaviorEXT) { + this.#view.setUint32(24, Number(value), LE); + } + + get images(): number { + return this.#view.getUint32(28, LE); + } + + set images(value: PipelineRobustnessImageBehaviorEXT) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineSampleLocationsStateCreateInfoEXT.ts b/api/struct/PipelineSampleLocationsStateCreateInfoEXT.ts new file mode 100644 index 0000000..4923358 --- /dev/null +++ b/api/struct/PipelineSampleLocationsStateCreateInfoEXT.ts @@ -0,0 +1,94 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SampleLocationsInfoEXT} from "./SampleLocationsInfoEXT.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPipelineSampleLocationsStateCreateInfoEXT { + pNext?: AnyPointer; + sampleLocationsEnable?: Bool32; + sampleLocationsInfo?: SampleLocationsInfoEXT; +} + +export class PipelineSampleLocationsStateCreateInfoEXT implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineSampleLocationsStateCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineSampleLocationsStateCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineSampleLocationsStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineSampleLocationsStateCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineSampleLocationsStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.sampleLocationsEnable !== undefined) this.sampleLocationsEnable = data.sampleLocationsEnable; + if (data.sampleLocationsInfo !== undefined) this.sampleLocationsInfo = data.sampleLocationsInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineSampleLocationsStateCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get sampleLocationsEnable(): number { + return this.#view.getUint32(16, LE); + } + + set sampleLocationsEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get sampleLocationsInfo(): SampleLocationsInfoEXT { + return new SampleLocationsInfoEXT(this.#data.subarray(24, 24 + SampleLocationsInfoEXT.size)); + } + + set sampleLocationsInfo(value: SampleLocationsInfoEXT) { + if (value[BUFFER].byteLength < SampleLocationsInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } +} \ No newline at end of file diff --git a/api/struct/PipelineShaderStageCreateInfo.ts b/api/struct/PipelineShaderStageCreateInfo.ts new file mode 100644 index 0000000..e7df28a --- /dev/null +++ b/api/struct/PipelineShaderStageCreateInfo.ts @@ -0,0 +1,121 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SpecializationInfo} from "./SpecializationInfo.ts"; +import { StructureType, ShaderStageFlagBits } from "../enum.ts"; +import { PipelineShaderStageCreateFlags, ShaderModule } from "../def.ts"; + +export interface InitPipelineShaderStageCreateInfo { + pNext?: AnyPointer; + flags?: PipelineShaderStageCreateFlags; + stage?: ShaderStageFlagBits; + module?: ShaderModule; + pName?: AnyPointer; + pSpecializationInfo?: AnyPointer; +} + +export class PipelineShaderStageCreateInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineShaderStageCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineShaderStageCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineShaderStageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineShaderStageCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineShaderStageCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.stage !== undefined) this.stage = data.stage; + if (data.module !== undefined) this.module = data.module; + if (data.pName !== undefined) this.pName = data.pName; + if (data.pSpecializationInfo !== undefined) this.pSpecializationInfo = data.pSpecializationInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineShaderStageCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_SHADER_STAGE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineShaderStageCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get stage(): number { + return this.#view.getUint32(20, LE); + } + + set stage(value: ShaderStageFlagBits) { + this.#view.setUint32(20, Number(value), LE); + } + + get module(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set module(value: ShaderModule) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pName(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pName(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pSpecializationInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pSpecializationInfo(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineShaderStageModuleIdentifierCreateInfoEXT.ts b/api/struct/PipelineShaderStageModuleIdentifierCreateInfoEXT.ts new file mode 100644 index 0000000..1f893d5 --- /dev/null +++ b/api/struct/PipelineShaderStageModuleIdentifierCreateInfoEXT.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPipelineShaderStageModuleIdentifierCreateInfoEXT { + pNext?: AnyPointer; + identifierSize?: number; + pIdentifier?: AnyPointer; +} + +export class PipelineShaderStageModuleIdentifierCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineShaderStageModuleIdentifierCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineShaderStageModuleIdentifierCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineShaderStageModuleIdentifierCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineShaderStageModuleIdentifierCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineShaderStageModuleIdentifierCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.identifierSize !== undefined) this.identifierSize = data.identifierSize; + if (data.pIdentifier !== undefined) this.pIdentifier = data.pIdentifier; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineShaderStageModuleIdentifierCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get identifierSize(): number { + return this.#view.getUint32(16, LE); + } + + set identifierSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pIdentifier(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pIdentifier(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineShaderStageRequiredSubgroupSizeCreateInfo.ts b/api/struct/PipelineShaderStageRequiredSubgroupSizeCreateInfo.ts new file mode 100644 index 0000000..856f401 --- /dev/null +++ b/api/struct/PipelineShaderStageRequiredSubgroupSizeCreateInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPipelineShaderStageRequiredSubgroupSizeCreateInfo { + pNext?: AnyPointer; + requiredSubgroupSize?: number; +} + +export class PipelineShaderStageRequiredSubgroupSizeCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineShaderStageRequiredSubgroupSizeCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineShaderStageRequiredSubgroupSizeCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineShaderStageRequiredSubgroupSizeCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineShaderStageRequiredSubgroupSizeCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineShaderStageRequiredSubgroupSizeCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.requiredSubgroupSize !== undefined) this.requiredSubgroupSize = data.requiredSubgroupSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineShaderStageRequiredSubgroupSizeCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get requiredSubgroupSize(): number { + return this.#view.getUint32(16, LE); + } + + set requiredSubgroupSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT.ts b/api/struct/PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT.ts new file mode 100644 index 0000000..8829954 --- /dev/null +++ b/api/struct/PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT.ts @@ -0,0 +1,2 @@ + import { PipelineShaderStageRequiredSubgroupSizeCreateInfo } from "./PipelineShaderStageRequiredSubgroupSizeCreateInfo.ts"; + export type PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo; \ No newline at end of file diff --git a/api/struct/PipelineTessellationDomainOriginStateCreateInfo.ts b/api/struct/PipelineTessellationDomainOriginStateCreateInfo.ts new file mode 100644 index 0000000..4da7fe0 --- /dev/null +++ b/api/struct/PipelineTessellationDomainOriginStateCreateInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, TessellationDomainOrigin } from "../enum.ts"; + +export interface InitPipelineTessellationDomainOriginStateCreateInfo { + pNext?: AnyPointer; + domainOrigin?: TessellationDomainOrigin; +} + +export class PipelineTessellationDomainOriginStateCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineTessellationDomainOriginStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineTessellationDomainOriginStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineTessellationDomainOriginStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineTessellationDomainOriginStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineTessellationDomainOriginStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.domainOrigin !== undefined) this.domainOrigin = data.domainOrigin; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineTessellationDomainOriginStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get domainOrigin(): number { + return this.#view.getUint32(16, LE); + } + + set domainOrigin(value: TessellationDomainOrigin) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineTessellationDomainOriginStateCreateInfoKHR.ts b/api/struct/PipelineTessellationDomainOriginStateCreateInfoKHR.ts new file mode 100644 index 0000000..5a0816e --- /dev/null +++ b/api/struct/PipelineTessellationDomainOriginStateCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { PipelineTessellationDomainOriginStateCreateInfo } from "./PipelineTessellationDomainOriginStateCreateInfo.ts"; + export type PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo; \ No newline at end of file diff --git a/api/struct/PipelineTessellationStateCreateInfo.ts b/api/struct/PipelineTessellationStateCreateInfo.ts new file mode 100644 index 0000000..e2c12da --- /dev/null +++ b/api/struct/PipelineTessellationStateCreateInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineTessellationStateCreateFlags } from "../def.ts"; + +export interface InitPipelineTessellationStateCreateInfo { + pNext?: AnyPointer; + flags?: PipelineTessellationStateCreateFlags; + patchControlPoints?: number; +} + +export class PipelineTessellationStateCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineTessellationStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineTessellationStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineTessellationStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineTessellationStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineTessellationStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.patchControlPoints !== undefined) this.patchControlPoints = data.patchControlPoints; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineTessellationStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_TESSELLATION_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineTessellationStateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get patchControlPoints(): number { + return this.#view.getUint32(20, LE); + } + + set patchControlPoints(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineVertexInputDivisorStateCreateInfoEXT.ts b/api/struct/PipelineVertexInputDivisorStateCreateInfoEXT.ts new file mode 100644 index 0000000..625bc63 --- /dev/null +++ b/api/struct/PipelineVertexInputDivisorStateCreateInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VertexInputBindingDivisorDescriptionEXT} from "./VertexInputBindingDivisorDescriptionEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPipelineVertexInputDivisorStateCreateInfoEXT { + pNext?: AnyPointer; + vertexBindingDivisorCount?: number; + pVertexBindingDivisors?: AnyPointer; +} + +export class PipelineVertexInputDivisorStateCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineVertexInputDivisorStateCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineVertexInputDivisorStateCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineVertexInputDivisorStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineVertexInputDivisorStateCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineVertexInputDivisorStateCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.vertexBindingDivisorCount !== undefined) this.vertexBindingDivisorCount = data.vertexBindingDivisorCount; + if (data.pVertexBindingDivisors !== undefined) this.pVertexBindingDivisors = data.pVertexBindingDivisors; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineVertexInputDivisorStateCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get vertexBindingDivisorCount(): number { + return this.#view.getUint32(16, LE); + } + + set vertexBindingDivisorCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pVertexBindingDivisors(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pVertexBindingDivisors(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineVertexInputStateCreateInfo.ts b/api/struct/PipelineVertexInputStateCreateInfo.ts new file mode 100644 index 0000000..afcf780 --- /dev/null +++ b/api/struct/PipelineVertexInputStateCreateInfo.ts @@ -0,0 +1,122 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VertexInputBindingDescription} from "./VertexInputBindingDescription.ts"; +import {VertexInputAttributeDescription} from "./VertexInputAttributeDescription.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineVertexInputStateCreateFlags } from "../def.ts"; + +export interface InitPipelineVertexInputStateCreateInfo { + pNext?: AnyPointer; + flags?: PipelineVertexInputStateCreateFlags; + vertexBindingDescriptionCount?: number; + pVertexBindingDescriptions?: AnyPointer; + vertexAttributeDescriptionCount?: number; + pVertexAttributeDescriptions?: AnyPointer; +} + +export class PipelineVertexInputStateCreateInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineVertexInputStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineVertexInputStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineVertexInputStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineVertexInputStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineVertexInputStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.vertexBindingDescriptionCount !== undefined) this.vertexBindingDescriptionCount = data.vertexBindingDescriptionCount; + if (data.pVertexBindingDescriptions !== undefined) this.pVertexBindingDescriptions = data.pVertexBindingDescriptions; + if (data.vertexAttributeDescriptionCount !== undefined) this.vertexAttributeDescriptionCount = data.vertexAttributeDescriptionCount; + if (data.pVertexAttributeDescriptions !== undefined) this.pVertexAttributeDescriptions = data.pVertexAttributeDescriptions; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineVertexInputStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineVertexInputStateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get vertexBindingDescriptionCount(): number { + return this.#view.getUint32(20, LE); + } + + set vertexBindingDescriptionCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pVertexBindingDescriptions(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pVertexBindingDescriptions(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get vertexAttributeDescriptionCount(): number { + return this.#view.getUint32(32, LE); + } + + set vertexAttributeDescriptionCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pVertexAttributeDescriptions(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pVertexAttributeDescriptions(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineViewportCoarseSampleOrderStateCreateInfoNV.ts b/api/struct/PipelineViewportCoarseSampleOrderStateCreateInfoNV.ts new file mode 100644 index 0000000..374453a --- /dev/null +++ b/api/struct/PipelineViewportCoarseSampleOrderStateCreateInfoNV.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {CoarseSampleOrderCustomNV} from "./CoarseSampleOrderCustomNV.ts"; +import { StructureType, CoarseSampleOrderTypeNV } from "../enum.ts"; + +export interface InitPipelineViewportCoarseSampleOrderStateCreateInfoNV { + pNext?: AnyPointer; + sampleOrderType?: CoarseSampleOrderTypeNV; + customSampleOrderCount?: number; + pCustomSampleOrders?: AnyPointer; +} + +export class PipelineViewportCoarseSampleOrderStateCreateInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineViewportCoarseSampleOrderStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportCoarseSampleOrderStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineViewportCoarseSampleOrderStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineViewportCoarseSampleOrderStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineViewportCoarseSampleOrderStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.sampleOrderType !== undefined) this.sampleOrderType = data.sampleOrderType; + if (data.customSampleOrderCount !== undefined) this.customSampleOrderCount = data.customSampleOrderCount; + if (data.pCustomSampleOrders !== undefined) this.pCustomSampleOrders = data.pCustomSampleOrders; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportCoarseSampleOrderStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get sampleOrderType(): number { + return this.#view.getUint32(16, LE); + } + + set sampleOrderType(value: CoarseSampleOrderTypeNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get customSampleOrderCount(): number { + return this.#view.getUint32(20, LE); + } + + set customSampleOrderCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pCustomSampleOrders(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pCustomSampleOrders(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineViewportDepthClipControlCreateInfoEXT.ts b/api/struct/PipelineViewportDepthClipControlCreateInfoEXT.ts new file mode 100644 index 0000000..e92912a --- /dev/null +++ b/api/struct/PipelineViewportDepthClipControlCreateInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPipelineViewportDepthClipControlCreateInfoEXT { + pNext?: AnyPointer; + negativeOneToOne?: Bool32; +} + +export class PipelineViewportDepthClipControlCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineViewportDepthClipControlCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportDepthClipControlCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineViewportDepthClipControlCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineViewportDepthClipControlCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineViewportDepthClipControlCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.negativeOneToOne !== undefined) this.negativeOneToOne = data.negativeOneToOne; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportDepthClipControlCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get negativeOneToOne(): number { + return this.#view.getUint32(16, LE); + } + + set negativeOneToOne(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineViewportExclusiveScissorStateCreateInfoNV.ts b/api/struct/PipelineViewportExclusiveScissorStateCreateInfoNV.ts new file mode 100644 index 0000000..b4b4f8f --- /dev/null +++ b/api/struct/PipelineViewportExclusiveScissorStateCreateInfoNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPipelineViewportExclusiveScissorStateCreateInfoNV { + pNext?: AnyPointer; + exclusiveScissorCount?: number; + pExclusiveScissors?: AnyPointer; +} + +export class PipelineViewportExclusiveScissorStateCreateInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineViewportExclusiveScissorStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportExclusiveScissorStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineViewportExclusiveScissorStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineViewportExclusiveScissorStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineViewportExclusiveScissorStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.exclusiveScissorCount !== undefined) this.exclusiveScissorCount = data.exclusiveScissorCount; + if (data.pExclusiveScissors !== undefined) this.pExclusiveScissors = data.pExclusiveScissors; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportExclusiveScissorStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get exclusiveScissorCount(): number { + return this.#view.getUint32(16, LE); + } + + set exclusiveScissorCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pExclusiveScissors(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pExclusiveScissors(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineViewportShadingRateImageStateCreateInfoNV.ts b/api/struct/PipelineViewportShadingRateImageStateCreateInfoNV.ts new file mode 100644 index 0000000..3ec5dc1 --- /dev/null +++ b/api/struct/PipelineViewportShadingRateImageStateCreateInfoNV.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ShadingRatePaletteNV} from "./ShadingRatePaletteNV.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPipelineViewportShadingRateImageStateCreateInfoNV { + pNext?: AnyPointer; + shadingRateImageEnable?: Bool32; + viewportCount?: number; + pShadingRatePalettes?: AnyPointer; +} + +export class PipelineViewportShadingRateImageStateCreateInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineViewportShadingRateImageStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportShadingRateImageStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineViewportShadingRateImageStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineViewportShadingRateImageStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineViewportShadingRateImageStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.shadingRateImageEnable !== undefined) this.shadingRateImageEnable = data.shadingRateImageEnable; + if (data.viewportCount !== undefined) this.viewportCount = data.viewportCount; + if (data.pShadingRatePalettes !== undefined) this.pShadingRatePalettes = data.pShadingRatePalettes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportShadingRateImageStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get shadingRateImageEnable(): number { + return this.#view.getUint32(16, LE); + } + + set shadingRateImageEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get viewportCount(): number { + return this.#view.getUint32(20, LE); + } + + set viewportCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pShadingRatePalettes(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pShadingRatePalettes(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineViewportStateCreateInfo.ts b/api/struct/PipelineViewportStateCreateInfo.ts new file mode 100644 index 0000000..7cd710a --- /dev/null +++ b/api/struct/PipelineViewportStateCreateInfo.ts @@ -0,0 +1,122 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Viewport} from "./Viewport.ts"; +import {Rect2D} from "./Rect2D.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineViewportStateCreateFlags } from "../def.ts"; + +export interface InitPipelineViewportStateCreateInfo { + pNext?: AnyPointer; + flags?: PipelineViewportStateCreateFlags; + viewportCount?: number; + pViewports?: AnyPointer; + scissorCount?: number; + pScissors?: AnyPointer; +} + +export class PipelineViewportStateCreateInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineViewportStateCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportStateCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineViewportStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineViewportStateCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineViewportStateCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.viewportCount !== undefined) this.viewportCount = data.viewportCount; + if (data.pViewports !== undefined) this.pViewports = data.pViewports; + if (data.scissorCount !== undefined) this.scissorCount = data.scissorCount; + if (data.pScissors !== undefined) this.pScissors = data.pScissors; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportStateCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_VIEWPORT_STATE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineViewportStateCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get viewportCount(): number { + return this.#view.getUint32(20, LE); + } + + set viewportCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pViewports(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pViewports(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get scissorCount(): number { + return this.#view.getUint32(32, LE); + } + + set scissorCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pScissors(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pScissors(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineViewportSwizzleStateCreateInfoNV.ts b/api/struct/PipelineViewportSwizzleStateCreateInfoNV.ts new file mode 100644 index 0000000..4b349f0 --- /dev/null +++ b/api/struct/PipelineViewportSwizzleStateCreateInfoNV.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ViewportSwizzleNV} from "./ViewportSwizzleNV.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineViewportSwizzleStateCreateFlagsNV } from "../def.ts"; + +export interface InitPipelineViewportSwizzleStateCreateInfoNV { + pNext?: AnyPointer; + flags?: PipelineViewportSwizzleStateCreateFlagsNV; + viewportCount?: number; + pViewportSwizzles?: AnyPointer; +} + +export class PipelineViewportSwizzleStateCreateInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineViewportSwizzleStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportSwizzleStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineViewportSwizzleStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineViewportSwizzleStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineViewportSwizzleStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.viewportCount !== undefined) this.viewportCount = data.viewportCount; + if (data.pViewportSwizzles !== undefined) this.pViewportSwizzles = data.pViewportSwizzles; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportSwizzleStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineViewportSwizzleStateCreateFlagsNV) { + this.#view.setUint32(16, Number(value), LE); + } + + get viewportCount(): number { + return this.#view.getUint32(20, LE); + } + + set viewportCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pViewportSwizzles(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pViewportSwizzles(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PipelineViewportWScalingStateCreateInfoNV.ts b/api/struct/PipelineViewportWScalingStateCreateInfoNV.ts new file mode 100644 index 0000000..be1c017 --- /dev/null +++ b/api/struct/PipelineViewportWScalingStateCreateInfoNV.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ViewportWScalingNV} from "./ViewportWScalingNV.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitPipelineViewportWScalingStateCreateInfoNV { + pNext?: AnyPointer; + viewportWScalingEnable?: Bool32; + viewportCount?: number; + pViewportWScalings?: AnyPointer; +} + +export class PipelineViewportWScalingStateCreateInfoNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPipelineViewportWScalingStateCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportWScalingStateCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PipelineViewportWScalingStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PipelineViewportWScalingStateCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PipelineViewportWScalingStateCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.viewportWScalingEnable !== undefined) this.viewportWScalingEnable = data.viewportWScalingEnable; + if (data.viewportCount !== undefined) this.viewportCount = data.viewportCount; + if (data.pViewportWScalings !== undefined) this.pViewportWScalings = data.pViewportWScalings; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportWScalingStateCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get viewportWScalingEnable(): number { + return this.#view.getUint32(16, LE); + } + + set viewportWScalingEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } + + get viewportCount(): number { + return this.#view.getUint32(20, LE); + } + + set viewportCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pViewportWScalings(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pViewportWScalings(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PresentFrameTokenGGP.ts b/api/struct/PresentFrameTokenGGP.ts new file mode 100644 index 0000000..b729cca --- /dev/null +++ b/api/struct/PresentFrameTokenGGP.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPresentFrameTokenGGP { + pNext?: AnyPointer; + frameToken?: number | bigint; +} + +export class PresentFrameTokenGGP implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPresentFrameTokenGGP); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPresentFrameTokenGGP) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PresentFrameTokenGGP.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PresentFrameTokenGGP.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PresentFrameTokenGGP.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.frameToken !== undefined) this.frameToken = data.frameToken; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentFrameTokenGGP.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PRESENT_FRAME_TOKEN_GGP; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get frameToken(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set frameToken(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PresentIdKHR.ts b/api/struct/PresentIdKHR.ts new file mode 100644 index 0000000..3665614 --- /dev/null +++ b/api/struct/PresentIdKHR.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPresentIdKHR { + pNext?: AnyPointer; + swapchainCount?: number; + pPresentIds?: AnyPointer; +} + +export class PresentIdKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPresentIdKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPresentIdKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PresentIdKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PresentIdKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PresentIdKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; + if (data.pPresentIds !== undefined) this.pPresentIds = data.pPresentIds; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentIdKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PRESENT_ID_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get swapchainCount(): number { + return this.#view.getUint32(16, LE); + } + + set swapchainCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pPresentIds(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pPresentIds(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PresentInfoKHR.ts b/api/struct/PresentInfoKHR.ts new file mode 100644 index 0000000..ad479b6 --- /dev/null +++ b/api/struct/PresentInfoKHR.ts @@ -0,0 +1,130 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Result } from "../enum.ts"; +import { Semaphore, SwapchainKHR } from "../def.ts"; + +export interface InitPresentInfoKHR { + pNext?: AnyPointer; + waitSemaphoreCount?: number; + pWaitSemaphores?: AnyPointer; + swapchainCount?: number; + pSwapchains?: AnyPointer; + pImageIndices?: AnyPointer; + pResults?: AnyPointer; +} + +export class PresentInfoKHR implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPresentInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPresentInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PresentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PresentInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PresentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.waitSemaphoreCount !== undefined) this.waitSemaphoreCount = data.waitSemaphoreCount; + if (data.pWaitSemaphores !== undefined) this.pWaitSemaphores = data.pWaitSemaphores; + if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; + if (data.pSwapchains !== undefined) this.pSwapchains = data.pSwapchains; + if (data.pImageIndices !== undefined) this.pImageIndices = data.pImageIndices; + if (data.pResults !== undefined) this.pResults = data.pResults; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PRESENT_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get waitSemaphoreCount(): number { + return this.#view.getUint32(16, LE); + } + + set waitSemaphoreCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pWaitSemaphores(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pWaitSemaphores(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get swapchainCount(): number { + return this.#view.getUint32(32, LE); + } + + set swapchainCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pSwapchains(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pSwapchains(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get pImageIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pImageIndices(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get pResults(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pResults(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PresentRegionKHR.ts b/api/struct/PresentRegionKHR.ts new file mode 100644 index 0000000..de38a11 --- /dev/null +++ b/api/struct/PresentRegionKHR.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {RectLayerKHR} from "./RectLayerKHR.ts"; + +export interface InitPresentRegionKHR { + rectangleCount?: number; + pRectangles?: AnyPointer; +} + +export class PresentRegionKHR implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPresentRegionKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPresentRegionKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PresentRegionKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PresentRegionKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PresentRegionKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.rectangleCount !== undefined) this.rectangleCount = data.rectangleCount; + if (data.pRectangles !== undefined) this.pRectangles = data.pRectangles; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentRegionKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get rectangleCount(): number { + return this.#view.getUint32(0, LE); + } + + set rectangleCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get pRectangles(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pRectangles(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PresentRegionsKHR.ts b/api/struct/PresentRegionsKHR.ts new file mode 100644 index 0000000..54a016e --- /dev/null +++ b/api/struct/PresentRegionsKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PresentRegionKHR} from "./PresentRegionKHR.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPresentRegionsKHR { + pNext?: AnyPointer; + swapchainCount?: number; + pRegions?: AnyPointer; +} + +export class PresentRegionsKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPresentRegionsKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPresentRegionsKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PresentRegionsKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PresentRegionsKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PresentRegionsKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; + if (data.pRegions !== undefined) this.pRegions = data.pRegions; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentRegionsKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PRESENT_REGIONS_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get swapchainCount(): number { + return this.#view.getUint32(16, LE); + } + + set swapchainCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pRegions(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pRegions(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PresentTimeGOOGLE.ts b/api/struct/PresentTimeGOOGLE.ts new file mode 100644 index 0000000..f146537 --- /dev/null +++ b/api/struct/PresentTimeGOOGLE.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitPresentTimeGOOGLE { + presentID?: number; + desiredPresentTime?: number | bigint; +} + +export class PresentTimeGOOGLE implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPresentTimeGOOGLE); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPresentTimeGOOGLE) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PresentTimeGOOGLE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PresentTimeGOOGLE.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PresentTimeGOOGLE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.presentID !== undefined) this.presentID = data.presentID; + if (data.desiredPresentTime !== undefined) this.desiredPresentTime = data.desiredPresentTime; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentTimeGOOGLE.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get presentID(): number { + return this.#view.getUint32(0, LE); + } + + set presentID(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get desiredPresentTime(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set desiredPresentTime(value: number | bigint) { + this.#view.setBigUint64(8, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PresentTimesInfoGOOGLE.ts b/api/struct/PresentTimesInfoGOOGLE.ts new file mode 100644 index 0000000..f213eca --- /dev/null +++ b/api/struct/PresentTimesInfoGOOGLE.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PresentTimeGOOGLE} from "./PresentTimeGOOGLE.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitPresentTimesInfoGOOGLE { + pNext?: AnyPointer; + swapchainCount?: number; + pTimes?: AnyPointer; +} + +export class PresentTimesInfoGOOGLE implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPresentTimesInfoGOOGLE); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPresentTimesInfoGOOGLE) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PresentTimesInfoGOOGLE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PresentTimesInfoGOOGLE.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PresentTimesInfoGOOGLE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; + if (data.pTimes !== undefined) this.pTimes = data.pTimes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentTimesInfoGOOGLE.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PRESENT_TIMES_INFO_GOOGLE; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get swapchainCount(): number { + return this.#view.getUint32(16, LE); + } + + set swapchainCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pTimes(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pTimes(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/PrivateDataSlotCreateInfo.ts b/api/struct/PrivateDataSlotCreateInfo.ts new file mode 100644 index 0000000..903bb70 --- /dev/null +++ b/api/struct/PrivateDataSlotCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PrivateDataSlotCreateFlags } from "../def.ts"; + +export interface InitPrivateDataSlotCreateInfo { + pNext?: AnyPointer; + flags?: PrivateDataSlotCreateFlags; +} + +export class PrivateDataSlotCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPrivateDataSlotCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPrivateDataSlotCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PrivateDataSlotCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PrivateDataSlotCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PrivateDataSlotCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PrivateDataSlotCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PRIVATE_DATA_SLOT_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PrivateDataSlotCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PrivateDataSlotCreateInfoEXT.ts b/api/struct/PrivateDataSlotCreateInfoEXT.ts new file mode 100644 index 0000000..33e4cb5 --- /dev/null +++ b/api/struct/PrivateDataSlotCreateInfoEXT.ts @@ -0,0 +1,2 @@ + import { PrivateDataSlotCreateInfo } from "./PrivateDataSlotCreateInfo.ts"; + export type PrivateDataSlotCreateInfoEXT = PrivateDataSlotCreateInfo; \ No newline at end of file diff --git a/api/struct/ProtectedSubmitInfo.ts b/api/struct/ProtectedSubmitInfo.ts new file mode 100644 index 0000000..14f017a --- /dev/null +++ b/api/struct/ProtectedSubmitInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitProtectedSubmitInfo { + pNext?: AnyPointer; + protectedSubmit?: Bool32; +} + +export class ProtectedSubmitInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitProtectedSubmitInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitProtectedSubmitInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ProtectedSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ProtectedSubmitInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ProtectedSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.protectedSubmit !== undefined) this.protectedSubmit = data.protectedSubmit; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ProtectedSubmitInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.PROTECTED_SUBMIT_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get protectedSubmit(): number { + return this.#view.getUint32(16, LE); + } + + set protectedSubmit(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/PushConstantRange.ts b/api/struct/PushConstantRange.ts new file mode 100644 index 0000000..26af461 --- /dev/null +++ b/api/struct/PushConstantRange.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ShaderStageFlags } from "../def.ts"; + +export interface InitPushConstantRange { + stageFlags?: ShaderStageFlags; + offset?: number; + size?: number; +} + +export class PushConstantRange implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitPushConstantRange); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitPushConstantRange) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(PushConstantRange.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < PushConstantRange.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(PushConstantRange.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.stageFlags !== undefined) this.stageFlags = data.stageFlags; + if (data.offset !== undefined) this.offset = data.offset; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PushConstantRange.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get stageFlags(): number { + return this.#view.getUint32(0, LE); + } + + set stageFlags(value: ShaderStageFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get offset(): number { + return this.#view.getUint32(4, LE); + } + + set offset(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get size(): number { + return this.#view.getUint32(8, LE); + } + + set size(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/QueryPoolCreateInfo.ts b/api/struct/QueryPoolCreateInfo.ts new file mode 100644 index 0000000..0d3dc09 --- /dev/null +++ b/api/struct/QueryPoolCreateInfo.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, QueryType } from "../enum.ts"; +import { QueryPoolCreateFlags, QueryPipelineStatisticFlags } from "../def.ts"; + +export interface InitQueryPoolCreateInfo { + pNext?: AnyPointer; + flags?: QueryPoolCreateFlags; + queryType?: QueryType; + queryCount?: number; + pipelineStatistics?: QueryPipelineStatisticFlags; +} + +export class QueryPoolCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueryPoolCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueryPoolCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueryPoolCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueryPoolCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueryPoolCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.queryType !== undefined) this.queryType = data.queryType; + if (data.queryCount !== undefined) this.queryCount = data.queryCount; + if (data.pipelineStatistics !== undefined) this.pipelineStatistics = data.pipelineStatistics; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueryPoolCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.QUERY_POOL_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: QueryPoolCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get queryType(): number { + return this.#view.getUint32(20, LE); + } + + set queryType(value: QueryType) { + this.#view.setUint32(20, Number(value), LE); + } + + get queryCount(): number { + return this.#view.getUint32(24, LE); + } + + set queryCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pipelineStatistics(): number { + return this.#view.getUint32(28, LE); + } + + set pipelineStatistics(value: QueryPipelineStatisticFlags) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/QueryPoolCreateInfoINTEL.ts b/api/struct/QueryPoolCreateInfoINTEL.ts new file mode 100644 index 0000000..e284880 --- /dev/null +++ b/api/struct/QueryPoolCreateInfoINTEL.ts @@ -0,0 +1,2 @@ + import { QueryPoolPerformanceQueryCreateInfoINTEL } from "./QueryPoolPerformanceQueryCreateInfoINTEL.ts"; + export type QueryPoolCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL; \ No newline at end of file diff --git a/api/struct/QueryPoolPerformanceCreateInfoKHR.ts b/api/struct/QueryPoolPerformanceCreateInfoKHR.ts new file mode 100644 index 0000000..8f675b9 --- /dev/null +++ b/api/struct/QueryPoolPerformanceCreateInfoKHR.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitQueryPoolPerformanceCreateInfoKHR { + pNext?: AnyPointer; + queueFamilyIndex?: number; + counterIndexCount?: number; + pCounterIndices?: AnyPointer; +} + +export class QueryPoolPerformanceCreateInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueryPoolPerformanceCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueryPoolPerformanceCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueryPoolPerformanceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueryPoolPerformanceCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueryPoolPerformanceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; + if (data.counterIndexCount !== undefined) this.counterIndexCount = data.counterIndexCount; + if (data.pCounterIndices !== undefined) this.pCounterIndices = data.pCounterIndices; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueryPoolPerformanceCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get queueFamilyIndex(): number { + return this.#view.getUint32(16, LE); + } + + set queueFamilyIndex(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get counterIndexCount(): number { + return this.#view.getUint32(20, LE); + } + + set counterIndexCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pCounterIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pCounterIndices(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/QueryPoolPerformanceQueryCreateInfoINTEL.ts b/api/struct/QueryPoolPerformanceQueryCreateInfoINTEL.ts new file mode 100644 index 0000000..387d77e --- /dev/null +++ b/api/struct/QueryPoolPerformanceQueryCreateInfoINTEL.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, QueryPoolSamplingModeINTEL } from "../enum.ts"; + +export interface InitQueryPoolPerformanceQueryCreateInfoINTEL { + pNext?: AnyPointer; + performanceCountersSampling?: QueryPoolSamplingModeINTEL; +} + +export class QueryPoolPerformanceQueryCreateInfoINTEL implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueryPoolPerformanceQueryCreateInfoINTEL); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueryPoolPerformanceQueryCreateInfoINTEL) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueryPoolPerformanceQueryCreateInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueryPoolPerformanceQueryCreateInfoINTEL.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueryPoolPerformanceQueryCreateInfoINTEL.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.performanceCountersSampling !== undefined) this.performanceCountersSampling = data.performanceCountersSampling; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueryPoolPerformanceQueryCreateInfoINTEL.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get performanceCountersSampling(): number { + return this.#view.getUint32(16, LE); + } + + set performanceCountersSampling(value: QueryPoolSamplingModeINTEL) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/QueueFamilyCheckpointProperties2NV.ts b/api/struct/QueueFamilyCheckpointProperties2NV.ts new file mode 100644 index 0000000..b455b8a --- /dev/null +++ b/api/struct/QueueFamilyCheckpointProperties2NV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineStageFlags2 } from "../def.ts"; + +export interface InitQueueFamilyCheckpointProperties2NV { + pNext?: AnyPointer; + checkpointExecutionStageMask?: PipelineStageFlags2; +} + +export class QueueFamilyCheckpointProperties2NV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueueFamilyCheckpointProperties2NV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyCheckpointProperties2NV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueueFamilyCheckpointProperties2NV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueueFamilyCheckpointProperties2NV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueueFamilyCheckpointProperties2NV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.checkpointExecutionStageMask !== undefined) this.checkpointExecutionStageMask = data.checkpointExecutionStageMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyCheckpointProperties2NV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get checkpointExecutionStageMask(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set checkpointExecutionStageMask(value: PipelineStageFlags2) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/QueueFamilyCheckpointPropertiesNV.ts b/api/struct/QueueFamilyCheckpointPropertiesNV.ts new file mode 100644 index 0000000..0463a89 --- /dev/null +++ b/api/struct/QueueFamilyCheckpointPropertiesNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineStageFlags } from "../def.ts"; + +export interface InitQueueFamilyCheckpointPropertiesNV { + pNext?: AnyPointer; + checkpointExecutionStageMask?: PipelineStageFlags; +} + +export class QueueFamilyCheckpointPropertiesNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueueFamilyCheckpointPropertiesNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyCheckpointPropertiesNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueueFamilyCheckpointPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueueFamilyCheckpointPropertiesNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueueFamilyCheckpointPropertiesNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.checkpointExecutionStageMask !== undefined) this.checkpointExecutionStageMask = data.checkpointExecutionStageMask; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyCheckpointPropertiesNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get checkpointExecutionStageMask(): number { + return this.#view.getUint32(16, LE); + } + + set checkpointExecutionStageMask(value: PipelineStageFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/QueueFamilyGlobalPriorityPropertiesEXT.ts b/api/struct/QueueFamilyGlobalPriorityPropertiesEXT.ts new file mode 100644 index 0000000..b67ddc7 --- /dev/null +++ b/api/struct/QueueFamilyGlobalPriorityPropertiesEXT.ts @@ -0,0 +1,2 @@ + import { QueueFamilyGlobalPriorityPropertiesKHR } from "./QueueFamilyGlobalPriorityPropertiesKHR.ts"; + export type QueueFamilyGlobalPriorityPropertiesEXT = QueueFamilyGlobalPriorityPropertiesKHR; \ No newline at end of file diff --git a/api/struct/QueueFamilyGlobalPriorityPropertiesKHR.ts b/api/struct/QueueFamilyGlobalPriorityPropertiesKHR.ts new file mode 100644 index 0000000..cd2ac2d --- /dev/null +++ b/api/struct/QueueFamilyGlobalPriorityPropertiesKHR.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, QueueGlobalPriorityKHR } from "../enum.ts"; + +export interface InitQueueFamilyGlobalPriorityPropertiesKHR { + pNext?: AnyPointer; + priorityCount?: number; + priorities?: Uint32Array; +} + +export class QueueFamilyGlobalPriorityPropertiesKHR implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueueFamilyGlobalPriorityPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyGlobalPriorityPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueueFamilyGlobalPriorityPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueueFamilyGlobalPriorityPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueueFamilyGlobalPriorityPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.priorityCount !== undefined) this.priorityCount = data.priorityCount; + if (data.priorities !== undefined) this.priorities = data.priorities; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyGlobalPriorityPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get priorityCount(): number { + return this.#view.getUint32(16, LE); + } + + set priorityCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get priorities(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 20, 16); + } + + set priorities(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } +} \ No newline at end of file diff --git a/api/struct/QueueFamilyProperties.ts b/api/struct/QueueFamilyProperties.ts new file mode 100644 index 0000000..23be731 --- /dev/null +++ b/api/struct/QueueFamilyProperties.ts @@ -0,0 +1,94 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { QueueFlags } from "../def.ts"; + +export interface InitQueueFamilyProperties { + queueFlags?: QueueFlags; + queueCount?: number; + timestampValidBits?: number; + minImageTransferGranularity?: Extent3D; +} + +export class QueueFamilyProperties implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueueFamilyProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueueFamilyProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueueFamilyProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueueFamilyProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.queueFlags !== undefined) this.queueFlags = data.queueFlags; + if (data.queueCount !== undefined) this.queueCount = data.queueCount; + if (data.timestampValidBits !== undefined) this.timestampValidBits = data.timestampValidBits; + if (data.minImageTransferGranularity !== undefined) this.minImageTransferGranularity = data.minImageTransferGranularity; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get queueFlags(): number { + return this.#view.getUint32(0, LE); + } + + set queueFlags(value: QueueFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get queueCount(): number { + return this.#view.getUint32(4, LE); + } + + set queueCount(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get timestampValidBits(): number { + return this.#view.getUint32(8, LE); + } + + set timestampValidBits(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get minImageTransferGranularity(): Extent3D { + return new Extent3D(this.#data.subarray(12, 12 + Extent3D.size)); + } + + set minImageTransferGranularity(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 12); + } +} \ No newline at end of file diff --git a/api/struct/QueueFamilyProperties2.ts b/api/struct/QueueFamilyProperties2.ts new file mode 100644 index 0000000..4c89650 --- /dev/null +++ b/api/struct/QueueFamilyProperties2.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {QueueFamilyProperties} from "./QueueFamilyProperties.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitQueueFamilyProperties2 { + pNext?: AnyPointer; + queueFamilyProperties?: QueueFamilyProperties; +} + +export class QueueFamilyProperties2 implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueueFamilyProperties2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyProperties2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueueFamilyProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueueFamilyProperties2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueueFamilyProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.queueFamilyProperties !== undefined) this.queueFamilyProperties = data.queueFamilyProperties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyProperties2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.QUEUE_FAMILY_PROPERTIES_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get queueFamilyProperties(): QueueFamilyProperties { + return new QueueFamilyProperties(this.#data.subarray(16, 16 + QueueFamilyProperties.size)); + } + + set queueFamilyProperties(value: QueueFamilyProperties) { + if (value[BUFFER].byteLength < QueueFamilyProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/QueueFamilyProperties2KHR.ts b/api/struct/QueueFamilyProperties2KHR.ts new file mode 100644 index 0000000..f2d7d23 --- /dev/null +++ b/api/struct/QueueFamilyProperties2KHR.ts @@ -0,0 +1,2 @@ + import { QueueFamilyProperties2 } from "./QueueFamilyProperties2.ts"; + export type QueueFamilyProperties2KHR = QueueFamilyProperties2; \ No newline at end of file diff --git a/api/struct/QueueFamilyQueryResultStatusPropertiesKHR.ts b/api/struct/QueueFamilyQueryResultStatusPropertiesKHR.ts new file mode 100644 index 0000000..0bc30c4 --- /dev/null +++ b/api/struct/QueueFamilyQueryResultStatusPropertiesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitQueueFamilyQueryResultStatusPropertiesKHR { + pNext?: AnyPointer; + queryResultStatusSupport?: Bool32; +} + +export class QueueFamilyQueryResultStatusPropertiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueueFamilyQueryResultStatusPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyQueryResultStatusPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueueFamilyQueryResultStatusPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueueFamilyQueryResultStatusPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueueFamilyQueryResultStatusPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.queryResultStatusSupport !== undefined) this.queryResultStatusSupport = data.queryResultStatusSupport; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyQueryResultStatusPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get queryResultStatusSupport(): number { + return this.#view.getUint32(16, LE); + } + + set queryResultStatusSupport(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/QueueFamilyVideoPropertiesKHR.ts b/api/struct/QueueFamilyVideoPropertiesKHR.ts new file mode 100644 index 0000000..6b6522d --- /dev/null +++ b/api/struct/QueueFamilyVideoPropertiesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { VideoCodecOperationFlagsKHR } from "../def.ts"; + +export interface InitQueueFamilyVideoPropertiesKHR { + pNext?: AnyPointer; + videoCodecOperations?: VideoCodecOperationFlagsKHR; +} + +export class QueueFamilyVideoPropertiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitQueueFamilyVideoPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyVideoPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(QueueFamilyVideoPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < QueueFamilyVideoPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(QueueFamilyVideoPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.videoCodecOperations !== undefined) this.videoCodecOperations = data.videoCodecOperations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyVideoPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.QUEUE_FAMILY_VIDEO_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get videoCodecOperations(): number { + return this.#view.getUint32(16, LE); + } + + set videoCodecOperations(value: VideoCodecOperationFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RayTracingPipelineCreateInfoKHR.ts b/api/struct/RayTracingPipelineCreateInfoKHR.ts new file mode 100644 index 0000000..a68f0ec --- /dev/null +++ b/api/struct/RayTracingPipelineCreateInfoKHR.ts @@ -0,0 +1,195 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PipelineShaderStageCreateInfo} from "./PipelineShaderStageCreateInfo.ts"; +import {RayTracingShaderGroupCreateInfoKHR} from "./RayTracingShaderGroupCreateInfoKHR.ts"; +import {PipelineLibraryCreateInfoKHR} from "./PipelineLibraryCreateInfoKHR.ts"; +import {RayTracingPipelineInterfaceCreateInfoKHR} from "./RayTracingPipelineInterfaceCreateInfoKHR.ts"; +import {PipelineDynamicStateCreateInfo} from "./PipelineDynamicStateCreateInfo.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineCreateFlags, PipelineLayout, Pipeline } from "../def.ts"; + +export interface InitRayTracingPipelineCreateInfoKHR { + pNext?: AnyPointer; + flags?: PipelineCreateFlags; + stageCount?: number; + pStages?: AnyPointer; + groupCount?: number; + pGroups?: AnyPointer; + maxPipelineRayRecursionDepth?: number; + pLibraryInfo?: AnyPointer; + pLibraryInterface?: AnyPointer; + pDynamicState?: AnyPointer; + layout?: PipelineLayout; + basePipelineHandle?: Pipeline; + basePipelineIndex?: number; +} + +export class RayTracingPipelineCreateInfoKHR implements BaseStruct { + static size = 104; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRayTracingPipelineCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingPipelineCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RayTracingPipelineCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RayTracingPipelineCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RayTracingPipelineCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.stageCount !== undefined) this.stageCount = data.stageCount; + if (data.pStages !== undefined) this.pStages = data.pStages; + if (data.groupCount !== undefined) this.groupCount = data.groupCount; + if (data.pGroups !== undefined) this.pGroups = data.pGroups; + if (data.maxPipelineRayRecursionDepth !== undefined) this.maxPipelineRayRecursionDepth = data.maxPipelineRayRecursionDepth; + if (data.pLibraryInfo !== undefined) this.pLibraryInfo = data.pLibraryInfo; + if (data.pLibraryInterface !== undefined) this.pLibraryInterface = data.pLibraryInterface; + if (data.pDynamicState !== undefined) this.pDynamicState = data.pDynamicState; + if (data.layout !== undefined) this.layout = data.layout; + if (data.basePipelineHandle !== undefined) this.basePipelineHandle = data.basePipelineHandle; + if (data.basePipelineIndex !== undefined) this.basePipelineIndex = data.basePipelineIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingPipelineCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RAY_TRACING_PIPELINE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get stageCount(): number { + return this.#view.getUint32(20, LE); + } + + set stageCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pStages(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStages(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get groupCount(): number { + return this.#view.getUint32(32, LE); + } + + set groupCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pGroups(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pGroups(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get maxPipelineRayRecursionDepth(): number { + return this.#view.getUint32(48, LE); + } + + set maxPipelineRayRecursionDepth(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pLibraryInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pLibraryInfo(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get pLibraryInterface(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pLibraryInterface(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } + + get pDynamicState(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set pDynamicState(value: AnyPointer) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } + + get layout(): Deno.PointerValue { + return pointerFromView(this.#view, 80, LE); + } + + set layout(value: PipelineLayout) { + this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); + } + + get basePipelineHandle(): Deno.PointerValue { + return pointerFromView(this.#view, 88, LE); + } + + set basePipelineHandle(value: Pipeline) { + this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); + } + + get basePipelineIndex(): number { + return this.#view.getInt32(96, LE); + } + + set basePipelineIndex(value: number) { + this.#view.setInt32(96, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RayTracingPipelineCreateInfoNV.ts b/api/struct/RayTracingPipelineCreateInfoNV.ts new file mode 100644 index 0000000..6ef9646 --- /dev/null +++ b/api/struct/RayTracingPipelineCreateInfoNV.ts @@ -0,0 +1,162 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {PipelineShaderStageCreateInfo} from "./PipelineShaderStageCreateInfo.ts"; +import {RayTracingShaderGroupCreateInfoNV} from "./RayTracingShaderGroupCreateInfoNV.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineCreateFlags, PipelineLayout, Pipeline } from "../def.ts"; + +export interface InitRayTracingPipelineCreateInfoNV { + pNext?: AnyPointer; + flags?: PipelineCreateFlags; + stageCount?: number; + pStages?: AnyPointer; + groupCount?: number; + pGroups?: AnyPointer; + maxRecursionDepth?: number; + layout?: PipelineLayout; + basePipelineHandle?: Pipeline; + basePipelineIndex?: number; +} + +export class RayTracingPipelineCreateInfoNV implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRayTracingPipelineCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingPipelineCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RayTracingPipelineCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RayTracingPipelineCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RayTracingPipelineCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.stageCount !== undefined) this.stageCount = data.stageCount; + if (data.pStages !== undefined) this.pStages = data.pStages; + if (data.groupCount !== undefined) this.groupCount = data.groupCount; + if (data.pGroups !== undefined) this.pGroups = data.pGroups; + if (data.maxRecursionDepth !== undefined) this.maxRecursionDepth = data.maxRecursionDepth; + if (data.layout !== undefined) this.layout = data.layout; + if (data.basePipelineHandle !== undefined) this.basePipelineHandle = data.basePipelineHandle; + if (data.basePipelineIndex !== undefined) this.basePipelineIndex = data.basePipelineIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingPipelineCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RAY_TRACING_PIPELINE_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: PipelineCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get stageCount(): number { + return this.#view.getUint32(20, LE); + } + + set stageCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pStages(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStages(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get groupCount(): number { + return this.#view.getUint32(32, LE); + } + + set groupCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pGroups(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pGroups(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get maxRecursionDepth(): number { + return this.#view.getUint32(48, LE); + } + + set maxRecursionDepth(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get layout(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set layout(value: PipelineLayout) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get basePipelineHandle(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set basePipelineHandle(value: Pipeline) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } + + get basePipelineIndex(): number { + return this.#view.getInt32(72, LE); + } + + set basePipelineIndex(value: number) { + this.#view.setInt32(72, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RayTracingPipelineInterfaceCreateInfoKHR.ts b/api/struct/RayTracingPipelineInterfaceCreateInfoKHR.ts new file mode 100644 index 0000000..97e3f8a --- /dev/null +++ b/api/struct/RayTracingPipelineInterfaceCreateInfoKHR.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitRayTracingPipelineInterfaceCreateInfoKHR { + pNext?: AnyPointer; + maxPipelineRayPayloadSize?: number; + maxPipelineRayHitAttributeSize?: number; +} + +export class RayTracingPipelineInterfaceCreateInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRayTracingPipelineInterfaceCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingPipelineInterfaceCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RayTracingPipelineInterfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RayTracingPipelineInterfaceCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RayTracingPipelineInterfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxPipelineRayPayloadSize !== undefined) this.maxPipelineRayPayloadSize = data.maxPipelineRayPayloadSize; + if (data.maxPipelineRayHitAttributeSize !== undefined) this.maxPipelineRayHitAttributeSize = data.maxPipelineRayHitAttributeSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingPipelineInterfaceCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxPipelineRayPayloadSize(): number { + return this.#view.getUint32(16, LE); + } + + set maxPipelineRayPayloadSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxPipelineRayHitAttributeSize(): number { + return this.#view.getUint32(20, LE); + } + + set maxPipelineRayHitAttributeSize(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RayTracingShaderGroupCreateInfoKHR.ts b/api/struct/RayTracingShaderGroupCreateInfoKHR.ts new file mode 100644 index 0000000..ce5bda6 --- /dev/null +++ b/api/struct/RayTracingShaderGroupCreateInfoKHR.ts @@ -0,0 +1,129 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, RayTracingShaderGroupTypeKHR } from "../enum.ts"; + +export interface InitRayTracingShaderGroupCreateInfoKHR { + pNext?: AnyPointer; + type?: RayTracingShaderGroupTypeKHR; + generalShader?: number; + closestHitShader?: number; + anyHitShader?: number; + intersectionShader?: number; + pShaderGroupCaptureReplayHandle?: AnyPointer; +} + +export class RayTracingShaderGroupCreateInfoKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRayTracingShaderGroupCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingShaderGroupCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RayTracingShaderGroupCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.type !== undefined) this.type = data.type; + if (data.generalShader !== undefined) this.generalShader = data.generalShader; + if (data.closestHitShader !== undefined) this.closestHitShader = data.closestHitShader; + if (data.anyHitShader !== undefined) this.anyHitShader = data.anyHitShader; + if (data.intersectionShader !== undefined) this.intersectionShader = data.intersectionShader; + if (data.pShaderGroupCaptureReplayHandle !== undefined) this.pShaderGroupCaptureReplayHandle = data.pShaderGroupCaptureReplayHandle; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingShaderGroupCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get type(): number { + return this.#view.getUint32(16, LE); + } + + set type(value: RayTracingShaderGroupTypeKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get generalShader(): number { + return this.#view.getUint32(20, LE); + } + + set generalShader(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get closestHitShader(): number { + return this.#view.getUint32(24, LE); + } + + set closestHitShader(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get anyHitShader(): number { + return this.#view.getUint32(28, LE); + } + + set anyHitShader(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get intersectionShader(): number { + return this.#view.getUint32(32, LE); + } + + set intersectionShader(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pShaderGroupCaptureReplayHandle(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pShaderGroupCaptureReplayHandle(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RayTracingShaderGroupCreateInfoNV.ts b/api/struct/RayTracingShaderGroupCreateInfoNV.ts new file mode 100644 index 0000000..9dad448 --- /dev/null +++ b/api/struct/RayTracingShaderGroupCreateInfoNV.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, RayTracingShaderGroupTypeKHR } from "../enum.ts"; + +export interface InitRayTracingShaderGroupCreateInfoNV { + pNext?: AnyPointer; + type?: RayTracingShaderGroupTypeKHR; + generalShader?: number; + closestHitShader?: number; + anyHitShader?: number; + intersectionShader?: number; +} + +export class RayTracingShaderGroupCreateInfoNV implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRayTracingShaderGroupCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingShaderGroupCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RayTracingShaderGroupCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.type !== undefined) this.type = data.type; + if (data.generalShader !== undefined) this.generalShader = data.generalShader; + if (data.closestHitShader !== undefined) this.closestHitShader = data.closestHitShader; + if (data.anyHitShader !== undefined) this.anyHitShader = data.anyHitShader; + if (data.intersectionShader !== undefined) this.intersectionShader = data.intersectionShader; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingShaderGroupCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get type(): number { + return this.#view.getUint32(16, LE); + } + + set type(value: RayTracingShaderGroupTypeKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get generalShader(): number { + return this.#view.getUint32(20, LE); + } + + set generalShader(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get closestHitShader(): number { + return this.#view.getUint32(24, LE); + } + + set closestHitShader(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get anyHitShader(): number { + return this.#view.getUint32(28, LE); + } + + set anyHitShader(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get intersectionShader(): number { + return this.#view.getUint32(32, LE); + } + + set intersectionShader(value: number) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/Rect2D.ts b/api/struct/Rect2D.ts new file mode 100644 index 0000000..36bb93e --- /dev/null +++ b/api/struct/Rect2D.ts @@ -0,0 +1,77 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Offset2D} from "./Offset2D.ts"; +import {Extent2D} from "./Extent2D.ts"; + +export interface InitRect2D { + offset?: Offset2D; + extent?: Extent2D; +} + +export class Rect2D implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRect2D); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRect2D) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(Rect2D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < Rect2D.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(Rect2D.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.offset !== undefined) this.offset = data.offset; + if (data.extent !== undefined) this.extent = data.extent; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Rect2D.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get offset(): Offset2D { + return new Offset2D(this.#data.subarray(0, 0 + Offset2D.size)); + } + + set offset(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get extent(): Extent2D { + return new Extent2D(this.#data.subarray(8, 8 + Extent2D.size)); + } + + set extent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 8); + } +} \ No newline at end of file diff --git a/api/struct/RectLayerKHR.ts b/api/struct/RectLayerKHR.ts new file mode 100644 index 0000000..cb7706b --- /dev/null +++ b/api/struct/RectLayerKHR.ts @@ -0,0 +1,87 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Offset2D} from "./Offset2D.ts"; +import {Extent2D} from "./Extent2D.ts"; + +export interface InitRectLayerKHR { + offset?: Offset2D; + extent?: Extent2D; + layer?: number; +} + +export class RectLayerKHR implements BaseStruct { + static size = 20; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRectLayerKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRectLayerKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RectLayerKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RectLayerKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RectLayerKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.offset !== undefined) this.offset = data.offset; + if (data.extent !== undefined) this.extent = data.extent; + if (data.layer !== undefined) this.layer = data.layer; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RectLayerKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get offset(): Offset2D { + return new Offset2D(this.#data.subarray(0, 0 + Offset2D.size)); + } + + set offset(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get extent(): Extent2D { + return new Extent2D(this.#data.subarray(8, 8 + Extent2D.size)); + } + + set extent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 8); + } + + get layer(): number { + return this.#view.getUint32(16, LE); + } + + set layer(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RefreshCycleDurationGOOGLE.ts b/api/struct/RefreshCycleDurationGOOGLE.ts new file mode 100644 index 0000000..f36c238 --- /dev/null +++ b/api/struct/RefreshCycleDurationGOOGLE.ts @@ -0,0 +1,59 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitRefreshCycleDurationGOOGLE { + refreshDuration?: number | bigint; +} + +export class RefreshCycleDurationGOOGLE implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRefreshCycleDurationGOOGLE); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRefreshCycleDurationGOOGLE) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RefreshCycleDurationGOOGLE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RefreshCycleDurationGOOGLE.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RefreshCycleDurationGOOGLE.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.refreshDuration !== undefined) this.refreshDuration = data.refreshDuration; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RefreshCycleDurationGOOGLE.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get refreshDuration(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set refreshDuration(value: number | bigint) { + this.#view.setBigUint64(0, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassAttachmentBeginInfo.ts b/api/struct/RenderPassAttachmentBeginInfo.ts new file mode 100644 index 0000000..10aec2c --- /dev/null +++ b/api/struct/RenderPassAttachmentBeginInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ImageView } from "../def.ts"; + +export interface InitRenderPassAttachmentBeginInfo { + pNext?: AnyPointer; + attachmentCount?: number; + pAttachments?: AnyPointer; +} + +export class RenderPassAttachmentBeginInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassAttachmentBeginInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassAttachmentBeginInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassAttachmentBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassAttachmentBeginInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassAttachmentBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; + if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassAttachmentBeginInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_ATTACHMENT_BEGIN_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get attachmentCount(): number { + return this.#view.getUint32(16, LE); + } + + set attachmentCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAttachments(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassAttachmentBeginInfoKHR.ts b/api/struct/RenderPassAttachmentBeginInfoKHR.ts new file mode 100644 index 0000000..d96dcff --- /dev/null +++ b/api/struct/RenderPassAttachmentBeginInfoKHR.ts @@ -0,0 +1,2 @@ + import { RenderPassAttachmentBeginInfo } from "./RenderPassAttachmentBeginInfo.ts"; + export type RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo; \ No newline at end of file diff --git a/api/struct/RenderPassBeginInfo.ts b/api/struct/RenderPassBeginInfo.ts new file mode 100644 index 0000000..5930c56 --- /dev/null +++ b/api/struct/RenderPassBeginInfo.ts @@ -0,0 +1,125 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; +import { StructureType } from "../enum.ts"; +import { RenderPass, Framebuffer } from "../def.ts"; +import { ClearValue } from "../union.ts"; + +export interface InitRenderPassBeginInfo { + pNext?: AnyPointer; + renderPass?: RenderPass; + framebuffer?: Framebuffer; + renderArea?: Rect2D; + clearValueCount?: number; + pClearValues?: AnyPointer; +} + +export class RenderPassBeginInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassBeginInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassBeginInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassBeginInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.renderPass !== undefined) this.renderPass = data.renderPass; + if (data.framebuffer !== undefined) this.framebuffer = data.framebuffer; + if (data.renderArea !== undefined) this.renderArea = data.renderArea; + if (data.clearValueCount !== undefined) this.clearValueCount = data.clearValueCount; + if (data.pClearValues !== undefined) this.pClearValues = data.pClearValues; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassBeginInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_BEGIN_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get renderPass(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set renderPass(value: RenderPass) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get framebuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set framebuffer(value: Framebuffer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get renderArea(): Rect2D { + return new Rect2D(this.#data.subarray(32, 32 + Rect2D.size)); + } + + set renderArea(value: Rect2D) { + if (value[BUFFER].byteLength < Rect2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get clearValueCount(): number { + return this.#view.getUint32(48, LE); + } + + set clearValueCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pClearValues(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pClearValues(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassCreateInfo.ts b/api/struct/RenderPassCreateInfo.ts new file mode 100644 index 0000000..67a4d3a --- /dev/null +++ b/api/struct/RenderPassCreateInfo.ts @@ -0,0 +1,143 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AttachmentDescription} from "./AttachmentDescription.ts"; +import {SubpassDescription} from "./SubpassDescription.ts"; +import {SubpassDependency} from "./SubpassDependency.ts"; +import { StructureType } from "../enum.ts"; +import { RenderPassCreateFlags } from "../def.ts"; + +export interface InitRenderPassCreateInfo { + pNext?: AnyPointer; + flags?: RenderPassCreateFlags; + attachmentCount?: number; + pAttachments?: AnyPointer; + subpassCount?: number; + pSubpasses?: AnyPointer; + dependencyCount?: number; + pDependencies?: AnyPointer; +} + +export class RenderPassCreateInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; + if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; + if (data.subpassCount !== undefined) this.subpassCount = data.subpassCount; + if (data.pSubpasses !== undefined) this.pSubpasses = data.pSubpasses; + if (data.dependencyCount !== undefined) this.dependencyCount = data.dependencyCount; + if (data.pDependencies !== undefined) this.pDependencies = data.pDependencies; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: RenderPassCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get attachmentCount(): number { + return this.#view.getUint32(20, LE); + } + + set attachmentCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAttachments(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get subpassCount(): number { + return this.#view.getUint32(32, LE); + } + + set subpassCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pSubpasses(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pSubpasses(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get dependencyCount(): number { + return this.#view.getUint32(48, LE); + } + + set dependencyCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pDependencies(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pDependencies(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassCreateInfo2.ts b/api/struct/RenderPassCreateInfo2.ts new file mode 100644 index 0000000..fa72678 --- /dev/null +++ b/api/struct/RenderPassCreateInfo2.ts @@ -0,0 +1,163 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AttachmentDescription2} from "./AttachmentDescription2.ts"; +import {SubpassDescription2} from "./SubpassDescription2.ts"; +import {SubpassDependency2} from "./SubpassDependency2.ts"; +import { StructureType } from "../enum.ts"; +import { RenderPassCreateFlags } from "../def.ts"; + +export interface InitRenderPassCreateInfo2 { + pNext?: AnyPointer; + flags?: RenderPassCreateFlags; + attachmentCount?: number; + pAttachments?: AnyPointer; + subpassCount?: number; + pSubpasses?: AnyPointer; + dependencyCount?: number; + pDependencies?: AnyPointer; + correlatedViewMaskCount?: number; + pCorrelatedViewMasks?: AnyPointer; +} + +export class RenderPassCreateInfo2 implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassCreateInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreateInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassCreateInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassCreateInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassCreateInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; + if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; + if (data.subpassCount !== undefined) this.subpassCount = data.subpassCount; + if (data.pSubpasses !== undefined) this.pSubpasses = data.pSubpasses; + if (data.dependencyCount !== undefined) this.dependencyCount = data.dependencyCount; + if (data.pDependencies !== undefined) this.pDependencies = data.pDependencies; + if (data.correlatedViewMaskCount !== undefined) this.correlatedViewMaskCount = data.correlatedViewMaskCount; + if (data.pCorrelatedViewMasks !== undefined) this.pCorrelatedViewMasks = data.pCorrelatedViewMasks; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreateInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_CREATE_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: RenderPassCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get attachmentCount(): number { + return this.#view.getUint32(20, LE); + } + + set attachmentCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAttachments(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get subpassCount(): number { + return this.#view.getUint32(32, LE); + } + + set subpassCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pSubpasses(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pSubpasses(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get dependencyCount(): number { + return this.#view.getUint32(48, LE); + } + + set dependencyCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pDependencies(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pDependencies(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get correlatedViewMaskCount(): number { + return this.#view.getUint32(64, LE); + } + + set correlatedViewMaskCount(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get pCorrelatedViewMasks(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set pCorrelatedViewMasks(value: AnyPointer) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassCreateInfo2KHR.ts b/api/struct/RenderPassCreateInfo2KHR.ts new file mode 100644 index 0000000..48399fc --- /dev/null +++ b/api/struct/RenderPassCreateInfo2KHR.ts @@ -0,0 +1,2 @@ + import { RenderPassCreateInfo2 } from "./RenderPassCreateInfo2.ts"; + export type RenderPassCreateInfo2KHR = RenderPassCreateInfo2; \ No newline at end of file diff --git a/api/struct/RenderPassCreationControlEXT.ts b/api/struct/RenderPassCreationControlEXT.ts new file mode 100644 index 0000000..0f38153 --- /dev/null +++ b/api/struct/RenderPassCreationControlEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitRenderPassCreationControlEXT { + pNext?: AnyPointer; + disallowMerging?: Bool32; +} + +export class RenderPassCreationControlEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassCreationControlEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreationControlEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassCreationControlEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassCreationControlEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassCreationControlEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.disallowMerging !== undefined) this.disallowMerging = data.disallowMerging; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreationControlEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_CREATION_CONTROL_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get disallowMerging(): number { + return this.#view.getUint32(16, LE); + } + + set disallowMerging(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassCreationFeedbackCreateInfoEXT.ts b/api/struct/RenderPassCreationFeedbackCreateInfoEXT.ts new file mode 100644 index 0000000..736bfa1 --- /dev/null +++ b/api/struct/RenderPassCreationFeedbackCreateInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {RenderPassCreationFeedbackInfoEXT} from "./RenderPassCreationFeedbackInfoEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitRenderPassCreationFeedbackCreateInfoEXT { + pNext?: AnyPointer; + pRenderPassFeedback?: AnyPointer; +} + +export class RenderPassCreationFeedbackCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassCreationFeedbackCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreationFeedbackCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassCreationFeedbackCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassCreationFeedbackCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassCreationFeedbackCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pRenderPassFeedback !== undefined) this.pRenderPassFeedback = data.pRenderPassFeedback; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreationFeedbackCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pRenderPassFeedback(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pRenderPassFeedback(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassCreationFeedbackInfoEXT.ts b/api/struct/RenderPassCreationFeedbackInfoEXT.ts new file mode 100644 index 0000000..efd6945 --- /dev/null +++ b/api/struct/RenderPassCreationFeedbackInfoEXT.ts @@ -0,0 +1,59 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitRenderPassCreationFeedbackInfoEXT { + postMergeSubpassCount?: number; +} + +export class RenderPassCreationFeedbackInfoEXT implements BaseStruct { + static size = 4; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassCreationFeedbackInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreationFeedbackInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassCreationFeedbackInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassCreationFeedbackInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassCreationFeedbackInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.postMergeSubpassCount !== undefined) this.postMergeSubpassCount = data.postMergeSubpassCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreationFeedbackInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get postMergeSubpassCount(): number { + return this.#view.getUint32(0, LE); + } + + set postMergeSubpassCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassFragmentDensityMapCreateInfoEXT.ts b/api/struct/RenderPassFragmentDensityMapCreateInfoEXT.ts new file mode 100644 index 0000000..39be870 --- /dev/null +++ b/api/struct/RenderPassFragmentDensityMapCreateInfoEXT.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AttachmentReference} from "./AttachmentReference.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitRenderPassFragmentDensityMapCreateInfoEXT { + pNext?: AnyPointer; + fragmentDensityMapAttachment?: AttachmentReference; +} + +export class RenderPassFragmentDensityMapCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassFragmentDensityMapCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassFragmentDensityMapCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassFragmentDensityMapCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassFragmentDensityMapCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassFragmentDensityMapCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentDensityMapAttachment !== undefined) this.fragmentDensityMapAttachment = data.fragmentDensityMapAttachment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassFragmentDensityMapCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentDensityMapAttachment(): AttachmentReference { + return new AttachmentReference(this.#data.subarray(16, 16 + AttachmentReference.size)); + } + + set fragmentDensityMapAttachment(value: AttachmentReference) { + if (value[BUFFER].byteLength < AttachmentReference.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassInputAttachmentAspectCreateInfo.ts b/api/struct/RenderPassInputAttachmentAspectCreateInfo.ts new file mode 100644 index 0000000..74c74be --- /dev/null +++ b/api/struct/RenderPassInputAttachmentAspectCreateInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {InputAttachmentAspectReference} from "./InputAttachmentAspectReference.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitRenderPassInputAttachmentAspectCreateInfo { + pNext?: AnyPointer; + aspectReferenceCount?: number; + pAspectReferences?: AnyPointer; +} + +export class RenderPassInputAttachmentAspectCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassInputAttachmentAspectCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassInputAttachmentAspectCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassInputAttachmentAspectCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassInputAttachmentAspectCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassInputAttachmentAspectCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.aspectReferenceCount !== undefined) this.aspectReferenceCount = data.aspectReferenceCount; + if (data.pAspectReferences !== undefined) this.pAspectReferences = data.pAspectReferences; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassInputAttachmentAspectCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get aspectReferenceCount(): number { + return this.#view.getUint32(16, LE); + } + + set aspectReferenceCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pAspectReferences(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAspectReferences(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassInputAttachmentAspectCreateInfoKHR.ts b/api/struct/RenderPassInputAttachmentAspectCreateInfoKHR.ts new file mode 100644 index 0000000..6d65e49 --- /dev/null +++ b/api/struct/RenderPassInputAttachmentAspectCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { RenderPassInputAttachmentAspectCreateInfo } from "./RenderPassInputAttachmentAspectCreateInfo.ts"; + export type RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo; \ No newline at end of file diff --git a/api/struct/RenderPassMultiviewCreateInfo.ts b/api/struct/RenderPassMultiviewCreateInfo.ts new file mode 100644 index 0000000..989c91b --- /dev/null +++ b/api/struct/RenderPassMultiviewCreateInfo.ts @@ -0,0 +1,129 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitRenderPassMultiviewCreateInfo { + pNext?: AnyPointer; + subpassCount?: number; + pViewMasks?: AnyPointer; + dependencyCount?: number; + pViewOffsets?: AnyPointer; + correlationMaskCount?: number; + pCorrelationMasks?: AnyPointer; +} + +export class RenderPassMultiviewCreateInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassMultiviewCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassMultiviewCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassMultiviewCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassMultiviewCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassMultiviewCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.subpassCount !== undefined) this.subpassCount = data.subpassCount; + if (data.pViewMasks !== undefined) this.pViewMasks = data.pViewMasks; + if (data.dependencyCount !== undefined) this.dependencyCount = data.dependencyCount; + if (data.pViewOffsets !== undefined) this.pViewOffsets = data.pViewOffsets; + if (data.correlationMaskCount !== undefined) this.correlationMaskCount = data.correlationMaskCount; + if (data.pCorrelationMasks !== undefined) this.pCorrelationMasks = data.pCorrelationMasks; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassMultiviewCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_MULTIVIEW_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get subpassCount(): number { + return this.#view.getUint32(16, LE); + } + + set subpassCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pViewMasks(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pViewMasks(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get dependencyCount(): number { + return this.#view.getUint32(32, LE); + } + + set dependencyCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pViewOffsets(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pViewOffsets(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get correlationMaskCount(): number { + return this.#view.getUint32(48, LE); + } + + set correlationMaskCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pCorrelationMasks(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pCorrelationMasks(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassMultiviewCreateInfoKHR.ts b/api/struct/RenderPassMultiviewCreateInfoKHR.ts new file mode 100644 index 0000000..d147163 --- /dev/null +++ b/api/struct/RenderPassMultiviewCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { RenderPassMultiviewCreateInfo } from "./RenderPassMultiviewCreateInfo.ts"; + export type RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo; \ No newline at end of file diff --git a/api/struct/RenderPassSampleLocationsBeginInfoEXT.ts b/api/struct/RenderPassSampleLocationsBeginInfoEXT.ts new file mode 100644 index 0000000..4f77064 --- /dev/null +++ b/api/struct/RenderPassSampleLocationsBeginInfoEXT.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AttachmentSampleLocationsEXT} from "./AttachmentSampleLocationsEXT.ts"; +import {SubpassSampleLocationsEXT} from "./SubpassSampleLocationsEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitRenderPassSampleLocationsBeginInfoEXT { + pNext?: AnyPointer; + attachmentInitialSampleLocationsCount?: number; + pAttachmentInitialSampleLocations?: AnyPointer; + postSubpassSampleLocationsCount?: number; + pPostSubpassSampleLocations?: AnyPointer; +} + +export class RenderPassSampleLocationsBeginInfoEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassSampleLocationsBeginInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassSampleLocationsBeginInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassSampleLocationsBeginInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassSampleLocationsBeginInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassSampleLocationsBeginInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.attachmentInitialSampleLocationsCount !== undefined) this.attachmentInitialSampleLocationsCount = data.attachmentInitialSampleLocationsCount; + if (data.pAttachmentInitialSampleLocations !== undefined) this.pAttachmentInitialSampleLocations = data.pAttachmentInitialSampleLocations; + if (data.postSubpassSampleLocationsCount !== undefined) this.postSubpassSampleLocationsCount = data.postSubpassSampleLocationsCount; + if (data.pPostSubpassSampleLocations !== undefined) this.pPostSubpassSampleLocations = data.pPostSubpassSampleLocations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassSampleLocationsBeginInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get attachmentInitialSampleLocationsCount(): number { + return this.#view.getUint32(16, LE); + } + + set attachmentInitialSampleLocationsCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pAttachmentInitialSampleLocations(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAttachmentInitialSampleLocations(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get postSubpassSampleLocationsCount(): number { + return this.#view.getUint32(32, LE); + } + + set postSubpassSampleLocationsCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pPostSubpassSampleLocations(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pPostSubpassSampleLocations(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassSubpassFeedbackCreateInfoEXT.ts b/api/struct/RenderPassSubpassFeedbackCreateInfoEXT.ts new file mode 100644 index 0000000..2734dc8 --- /dev/null +++ b/api/struct/RenderPassSubpassFeedbackCreateInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {RenderPassSubpassFeedbackInfoEXT} from "./RenderPassSubpassFeedbackInfoEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitRenderPassSubpassFeedbackCreateInfoEXT { + pNext?: AnyPointer; + pSubpassFeedback?: AnyPointer; +} + +export class RenderPassSubpassFeedbackCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassSubpassFeedbackCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassSubpassFeedbackCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassSubpassFeedbackCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassSubpassFeedbackCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassSubpassFeedbackCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pSubpassFeedback !== undefined) this.pSubpassFeedback = data.pSubpassFeedback; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassSubpassFeedbackCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pSubpassFeedback(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pSubpassFeedback(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassSubpassFeedbackInfoEXT.ts b/api/struct/RenderPassSubpassFeedbackInfoEXT.ts new file mode 100644 index 0000000..342f58e --- /dev/null +++ b/api/struct/RenderPassSubpassFeedbackInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { SubpassMergeStatusEXT } from "../enum.ts"; + +export interface InitRenderPassSubpassFeedbackInfoEXT { + subpassMergeStatus?: SubpassMergeStatusEXT; + description?: Uint8Array; + postMergeIndex?: number; +} + +export class RenderPassSubpassFeedbackInfoEXT implements BaseStruct { + static size = 264; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassSubpassFeedbackInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassSubpassFeedbackInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassSubpassFeedbackInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassSubpassFeedbackInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassSubpassFeedbackInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.subpassMergeStatus !== undefined) this.subpassMergeStatus = data.subpassMergeStatus; + if (data.description !== undefined) this.description = data.description; + if (data.postMergeIndex !== undefined) this.postMergeIndex = data.postMergeIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassSubpassFeedbackInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get subpassMergeStatus(): number { + return this.#view.getUint32(0, LE); + } + + set subpassMergeStatus(value: SubpassMergeStatusEXT) { + this.#view.setUint32(0, Number(value), LE); + } + + get description(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 4, 256); + } + + set description(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 4); + } + + get postMergeIndex(): number { + return this.#view.getUint32(260, LE); + } + + set postMergeIndex(value: number) { + this.#view.setUint32(260, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderPassTransformBeginInfoQCOM.ts b/api/struct/RenderPassTransformBeginInfoQCOM.ts new file mode 100644 index 0000000..c725641 --- /dev/null +++ b/api/struct/RenderPassTransformBeginInfoQCOM.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SurfaceTransformFlagBitsKHR } from "../enum.ts"; + +export interface InitRenderPassTransformBeginInfoQCOM { + pNext?: AnyPointer; + transform?: SurfaceTransformFlagBitsKHR; +} + +export class RenderPassTransformBeginInfoQCOM implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderPassTransformBeginInfoQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassTransformBeginInfoQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderPassTransformBeginInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderPassTransformBeginInfoQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderPassTransformBeginInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.transform !== undefined) this.transform = data.transform; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassTransformBeginInfoQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get transform(): number { + return this.#view.getUint32(16, LE); + } + + set transform(value: SurfaceTransformFlagBitsKHR) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderingAttachmentInfo.ts b/api/struct/RenderingAttachmentInfo.ts new file mode 100644 index 0000000..e6af796 --- /dev/null +++ b/api/struct/RenderingAttachmentInfo.ts @@ -0,0 +1,151 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageLayout, ResolveModeFlagBits, AttachmentLoadOp, AttachmentStoreOp } from "../enum.ts"; +import { ImageView } from "../def.ts"; +import { ClearValue } from "../union.ts"; + +export interface InitRenderingAttachmentInfo { + pNext?: AnyPointer; + imageView?: ImageView; + imageLayout?: ImageLayout; + resolveMode?: ResolveModeFlagBits; + resolveImageView?: ImageView; + resolveImageLayout?: ImageLayout; + loadOp?: AttachmentLoadOp; + storeOp?: AttachmentStoreOp; + clearValue?: ClearValue; +} + +export class RenderingAttachmentInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderingAttachmentInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderingAttachmentInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderingAttachmentInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderingAttachmentInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderingAttachmentInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageView !== undefined) this.imageView = data.imageView; + if (data.imageLayout !== undefined) this.imageLayout = data.imageLayout; + if (data.resolveMode !== undefined) this.resolveMode = data.resolveMode; + if (data.resolveImageView !== undefined) this.resolveImageView = data.resolveImageView; + if (data.resolveImageLayout !== undefined) this.resolveImageLayout = data.resolveImageLayout; + if (data.loadOp !== undefined) this.loadOp = data.loadOp; + if (data.storeOp !== undefined) this.storeOp = data.storeOp; + if (data.clearValue !== undefined) this.clearValue = data.clearValue; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingAttachmentInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDERING_ATTACHMENT_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageView(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set imageView(value: ImageView) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get imageLayout(): number { + return this.#view.getUint32(24, LE); + } + + set imageLayout(value: ImageLayout) { + this.#view.setUint32(24, Number(value), LE); + } + + get resolveMode(): number { + return this.#view.getUint32(28, LE); + } + + set resolveMode(value: ResolveModeFlagBits) { + this.#view.setUint32(28, Number(value), LE); + } + + get resolveImageView(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set resolveImageView(value: ImageView) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get resolveImageLayout(): number { + return this.#view.getUint32(40, LE); + } + + set resolveImageLayout(value: ImageLayout) { + this.#view.setUint32(40, Number(value), LE); + } + + get loadOp(): number { + return this.#view.getUint32(44, LE); + } + + set loadOp(value: AttachmentLoadOp) { + this.#view.setUint32(44, Number(value), LE); + } + + get storeOp(): number { + return this.#view.getUint32(48, LE); + } + + set storeOp(value: AttachmentStoreOp) { + this.#view.setUint32(48, Number(value), LE); + } + + get clearValue(): unknown { + throw new Error(`Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}`); + } + + set clearValue(value: ClearValue) { + throw new Error(`Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}`); + } +} \ No newline at end of file diff --git a/api/struct/RenderingAttachmentInfoKHR.ts b/api/struct/RenderingAttachmentInfoKHR.ts new file mode 100644 index 0000000..9964be5 --- /dev/null +++ b/api/struct/RenderingAttachmentInfoKHR.ts @@ -0,0 +1,2 @@ + import { RenderingAttachmentInfo } from "./RenderingAttachmentInfo.ts"; + export type RenderingAttachmentInfoKHR = RenderingAttachmentInfo; \ No newline at end of file diff --git a/api/struct/RenderingFragmentDensityMapAttachmentInfoEXT.ts b/api/struct/RenderingFragmentDensityMapAttachmentInfoEXT.ts new file mode 100644 index 0000000..0135496 --- /dev/null +++ b/api/struct/RenderingFragmentDensityMapAttachmentInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; +import { ImageView } from "../def.ts"; + +export interface InitRenderingFragmentDensityMapAttachmentInfoEXT { + pNext?: AnyPointer; + imageView?: ImageView; + imageLayout?: ImageLayout; +} + +export class RenderingFragmentDensityMapAttachmentInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderingFragmentDensityMapAttachmentInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderingFragmentDensityMapAttachmentInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderingFragmentDensityMapAttachmentInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderingFragmentDensityMapAttachmentInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderingFragmentDensityMapAttachmentInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageView !== undefined) this.imageView = data.imageView; + if (data.imageLayout !== undefined) this.imageLayout = data.imageLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingFragmentDensityMapAttachmentInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageView(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set imageView(value: ImageView) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get imageLayout(): number { + return this.#view.getUint32(24, LE); + } + + set imageLayout(value: ImageLayout) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderingFragmentShadingRateAttachmentInfoKHR.ts b/api/struct/RenderingFragmentShadingRateAttachmentInfoKHR.ts new file mode 100644 index 0000000..fd60402 --- /dev/null +++ b/api/struct/RenderingFragmentShadingRateAttachmentInfoKHR.ts @@ -0,0 +1,104 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; +import { ImageView } from "../def.ts"; + +export interface InitRenderingFragmentShadingRateAttachmentInfoKHR { + pNext?: AnyPointer; + imageView?: ImageView; + imageLayout?: ImageLayout; + shadingRateAttachmentTexelSize?: Extent2D; +} + +export class RenderingFragmentShadingRateAttachmentInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderingFragmentShadingRateAttachmentInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderingFragmentShadingRateAttachmentInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderingFragmentShadingRateAttachmentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderingFragmentShadingRateAttachmentInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderingFragmentShadingRateAttachmentInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.imageView !== undefined) this.imageView = data.imageView; + if (data.imageLayout !== undefined) this.imageLayout = data.imageLayout; + if (data.shadingRateAttachmentTexelSize !== undefined) this.shadingRateAttachmentTexelSize = data.shadingRateAttachmentTexelSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingFragmentShadingRateAttachmentInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get imageView(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set imageView(value: ImageView) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get imageLayout(): number { + return this.#view.getUint32(24, LE); + } + + set imageLayout(value: ImageLayout) { + this.#view.setUint32(24, Number(value), LE); + } + + get shadingRateAttachmentTexelSize(): Extent2D { + return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); + } + + set shadingRateAttachmentTexelSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 28); + } +} \ No newline at end of file diff --git a/api/struct/RenderingInfo.ts b/api/struct/RenderingInfo.ts new file mode 100644 index 0000000..dab7cbc --- /dev/null +++ b/api/struct/RenderingInfo.ts @@ -0,0 +1,155 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Rect2D} from "./Rect2D.ts"; +import {RenderingAttachmentInfo} from "./RenderingAttachmentInfo.ts"; +import { StructureType } from "../enum.ts"; +import { RenderingFlags } from "../def.ts"; + +export interface InitRenderingInfo { + pNext?: AnyPointer; + flags?: RenderingFlags; + renderArea?: Rect2D; + layerCount?: number; + viewMask?: number; + colorAttachmentCount?: number; + pColorAttachments?: AnyPointer; + pDepthAttachment?: AnyPointer; + pStencilAttachment?: AnyPointer; +} + +export class RenderingInfo implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitRenderingInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitRenderingInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(RenderingInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < RenderingInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(RenderingInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.renderArea !== undefined) this.renderArea = data.renderArea; + if (data.layerCount !== undefined) this.layerCount = data.layerCount; + if (data.viewMask !== undefined) this.viewMask = data.viewMask; + if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; + if (data.pColorAttachments !== undefined) this.pColorAttachments = data.pColorAttachments; + if (data.pDepthAttachment !== undefined) this.pDepthAttachment = data.pDepthAttachment; + if (data.pStencilAttachment !== undefined) this.pStencilAttachment = data.pStencilAttachment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RENDERING_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: RenderingFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get renderArea(): Rect2D { + return new Rect2D(this.#data.subarray(20, 20 + Rect2D.size)); + } + + set renderArea(value: Rect2D) { + if (value[BUFFER].byteLength < Rect2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } + + get layerCount(): number { + return this.#view.getUint32(36, LE); + } + + set layerCount(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get viewMask(): number { + return this.#view.getUint32(40, LE); + } + + set viewMask(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get colorAttachmentCount(): number { + return this.#view.getUint32(44, LE); + } + + set colorAttachmentCount(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get pColorAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pColorAttachments(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get pDepthAttachment(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pDepthAttachment(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get pStencilAttachment(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pStencilAttachment(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/RenderingInfoKHR.ts b/api/struct/RenderingInfoKHR.ts new file mode 100644 index 0000000..6b75d66 --- /dev/null +++ b/api/struct/RenderingInfoKHR.ts @@ -0,0 +1,2 @@ + import { RenderingInfo } from "./RenderingInfo.ts"; + export type RenderingInfoKHR = RenderingInfo; \ No newline at end of file diff --git a/api/struct/ResolveImageInfo2.ts b/api/struct/ResolveImageInfo2.ts new file mode 100644 index 0000000..b037d45 --- /dev/null +++ b/api/struct/ResolveImageInfo2.ts @@ -0,0 +1,131 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageResolve2} from "./ImageResolve2.ts"; +import { StructureType, ImageLayout } from "../enum.ts"; +import { Image } from "../def.ts"; + +export interface InitResolveImageInfo2 { + pNext?: AnyPointer; + srcImage?: Image; + srcImageLayout?: ImageLayout; + dstImage?: Image; + dstImageLayout?: ImageLayout; + regionCount?: number; + pRegions?: AnyPointer; +} + +export class ResolveImageInfo2 implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitResolveImageInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitResolveImageInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ResolveImageInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ResolveImageInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ResolveImageInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcImage !== undefined) this.srcImage = data.srcImage; + if (data.srcImageLayout !== undefined) this.srcImageLayout = data.srcImageLayout; + if (data.dstImage !== undefined) this.dstImage = data.dstImage; + if (data.dstImageLayout !== undefined) this.dstImageLayout = data.dstImageLayout; + if (data.regionCount !== undefined) this.regionCount = data.regionCount; + if (data.pRegions !== undefined) this.pRegions = data.pRegions; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ResolveImageInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.RESOLVE_IMAGE_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcImage(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set srcImage(value: Image) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get srcImageLayout(): number { + return this.#view.getUint32(24, LE); + } + + set srcImageLayout(value: ImageLayout) { + this.#view.setUint32(24, Number(value), LE); + } + + get dstImage(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set dstImage(value: Image) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get dstImageLayout(): number { + return this.#view.getUint32(40, LE); + } + + set dstImageLayout(value: ImageLayout) { + this.#view.setUint32(40, Number(value), LE); + } + + get regionCount(): number { + return this.#view.getUint32(44, LE); + } + + set regionCount(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get pRegions(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pRegions(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ResolveImageInfo2KHR.ts b/api/struct/ResolveImageInfo2KHR.ts new file mode 100644 index 0000000..88720e4 --- /dev/null +++ b/api/struct/ResolveImageInfo2KHR.ts @@ -0,0 +1,2 @@ + import { ResolveImageInfo2 } from "./ResolveImageInfo2.ts"; + export type ResolveImageInfo2KHR = ResolveImageInfo2; \ No newline at end of file diff --git a/api/struct/SRTDataNV.ts b/api/struct/SRTDataNV.ts new file mode 100644 index 0000000..09554bd --- /dev/null +++ b/api/struct/SRTDataNV.ts @@ -0,0 +1,209 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitSRTDataNV { + sx?: number; + a?: number; + b?: number; + pvx?: number; + sy?: number; + c?: number; + pvy?: number; + sz?: number; + pvz?: number; + qx?: number; + qy?: number; + qz?: number; + qw?: number; + tx?: number; + ty?: number; + tz?: number; +} + +export class SRTDataNV implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSRTDataNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSRTDataNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SRTDataNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SRTDataNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SRTDataNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.sx !== undefined) this.sx = data.sx; + if (data.a !== undefined) this.a = data.a; + if (data.b !== undefined) this.b = data.b; + if (data.pvx !== undefined) this.pvx = data.pvx; + if (data.sy !== undefined) this.sy = data.sy; + if (data.c !== undefined) this.c = data.c; + if (data.pvy !== undefined) this.pvy = data.pvy; + if (data.sz !== undefined) this.sz = data.sz; + if (data.pvz !== undefined) this.pvz = data.pvz; + if (data.qx !== undefined) this.qx = data.qx; + if (data.qy !== undefined) this.qy = data.qy; + if (data.qz !== undefined) this.qz = data.qz; + if (data.qw !== undefined) this.qw = data.qw; + if (data.tx !== undefined) this.tx = data.tx; + if (data.ty !== undefined) this.ty = data.ty; + if (data.tz !== undefined) this.tz = data.tz; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SRTDataNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get sx(): number { + return this.#view.getFloat32(0, LE); + } + + set sx(value: number) { + this.#view.setFloat32(0, Number(value), LE); + } + + get a(): number { + return this.#view.getFloat32(4, LE); + } + + set a(value: number) { + this.#view.setFloat32(4, Number(value), LE); + } + + get b(): number { + return this.#view.getFloat32(8, LE); + } + + set b(value: number) { + this.#view.setFloat32(8, Number(value), LE); + } + + get pvx(): number { + return this.#view.getFloat32(12, LE); + } + + set pvx(value: number) { + this.#view.setFloat32(12, Number(value), LE); + } + + get sy(): number { + return this.#view.getFloat32(16, LE); + } + + set sy(value: number) { + this.#view.setFloat32(16, Number(value), LE); + } + + get c(): number { + return this.#view.getFloat32(20, LE); + } + + set c(value: number) { + this.#view.setFloat32(20, Number(value), LE); + } + + get pvy(): number { + return this.#view.getFloat32(24, LE); + } + + set pvy(value: number) { + this.#view.setFloat32(24, Number(value), LE); + } + + get sz(): number { + return this.#view.getFloat32(28, LE); + } + + set sz(value: number) { + this.#view.setFloat32(28, Number(value), LE); + } + + get pvz(): number { + return this.#view.getFloat32(32, LE); + } + + set pvz(value: number) { + this.#view.setFloat32(32, Number(value), LE); + } + + get qx(): number { + return this.#view.getFloat32(36, LE); + } + + set qx(value: number) { + this.#view.setFloat32(36, Number(value), LE); + } + + get qy(): number { + return this.#view.getFloat32(40, LE); + } + + set qy(value: number) { + this.#view.setFloat32(40, Number(value), LE); + } + + get qz(): number { + return this.#view.getFloat32(44, LE); + } + + set qz(value: number) { + this.#view.setFloat32(44, Number(value), LE); + } + + get qw(): number { + return this.#view.getFloat32(48, LE); + } + + set qw(value: number) { + this.#view.setFloat32(48, Number(value), LE); + } + + get tx(): number { + return this.#view.getFloat32(52, LE); + } + + set tx(value: number) { + this.#view.setFloat32(52, Number(value), LE); + } + + get ty(): number { + return this.#view.getFloat32(56, LE); + } + + set ty(value: number) { + this.#view.setFloat32(56, Number(value), LE); + } + + get tz(): number { + return this.#view.getFloat32(60, LE); + } + + set tz(value: number) { + this.#view.setFloat32(60, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SampleLocationEXT.ts b/api/struct/SampleLocationEXT.ts new file mode 100644 index 0000000..2cda381 --- /dev/null +++ b/api/struct/SampleLocationEXT.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitSampleLocationEXT { + x?: number; + y?: number; +} + +export class SampleLocationEXT implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSampleLocationEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSampleLocationEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SampleLocationEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SampleLocationEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SampleLocationEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.x !== undefined) this.x = data.x; + if (data.y !== undefined) this.y = data.y; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SampleLocationEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get x(): number { + return this.#view.getFloat32(0, LE); + } + + set x(value: number) { + this.#view.setFloat32(0, Number(value), LE); + } + + get y(): number { + return this.#view.getFloat32(4, LE); + } + + set y(value: number) { + this.#view.setFloat32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SampleLocationsInfoEXT.ts b/api/struct/SampleLocationsInfoEXT.ts new file mode 100644 index 0000000..def0963 --- /dev/null +++ b/api/struct/SampleLocationsInfoEXT.ts @@ -0,0 +1,114 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import {SampleLocationEXT} from "./SampleLocationEXT.ts"; +import { StructureType, SampleCountFlagBits } from "../enum.ts"; + +export interface InitSampleLocationsInfoEXT { + pNext?: AnyPointer; + sampleLocationsPerPixel?: SampleCountFlagBits; + sampleLocationGridSize?: Extent2D; + sampleLocationsCount?: number; + pSampleLocations?: AnyPointer; +} + +export class SampleLocationsInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSampleLocationsInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSampleLocationsInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SampleLocationsInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SampleLocationsInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SampleLocationsInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.sampleLocationsPerPixel !== undefined) this.sampleLocationsPerPixel = data.sampleLocationsPerPixel; + if (data.sampleLocationGridSize !== undefined) this.sampleLocationGridSize = data.sampleLocationGridSize; + if (data.sampleLocationsCount !== undefined) this.sampleLocationsCount = data.sampleLocationsCount; + if (data.pSampleLocations !== undefined) this.pSampleLocations = data.pSampleLocations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SampleLocationsInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SAMPLE_LOCATIONS_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get sampleLocationsPerPixel(): number { + return this.#view.getUint32(16, LE); + } + + set sampleLocationsPerPixel(value: SampleCountFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } + + get sampleLocationGridSize(): Extent2D { + return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); + } + + set sampleLocationGridSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } + + get sampleLocationsCount(): number { + return this.#view.getUint32(28, LE); + } + + set sampleLocationsCount(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get pSampleLocations(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pSampleLocations(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SamplerBorderColorComponentMappingCreateInfoEXT.ts b/api/struct/SamplerBorderColorComponentMappingCreateInfoEXT.ts new file mode 100644 index 0000000..da5bfa7 --- /dev/null +++ b/api/struct/SamplerBorderColorComponentMappingCreateInfoEXT.ts @@ -0,0 +1,94 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ComponentMapping} from "./ComponentMapping.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitSamplerBorderColorComponentMappingCreateInfoEXT { + pNext?: AnyPointer; + components?: ComponentMapping; + srgb?: Bool32; +} + +export class SamplerBorderColorComponentMappingCreateInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSamplerBorderColorComponentMappingCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerBorderColorComponentMappingCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SamplerBorderColorComponentMappingCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SamplerBorderColorComponentMappingCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SamplerBorderColorComponentMappingCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.components !== undefined) this.components = data.components; + if (data.srgb !== undefined) this.srgb = data.srgb; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerBorderColorComponentMappingCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get components(): ComponentMapping { + return new ComponentMapping(this.#data.subarray(16, 16 + ComponentMapping.size)); + } + + set components(value: ComponentMapping) { + if (value[BUFFER].byteLength < ComponentMapping.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get srgb(): number { + return this.#view.getUint32(32, LE); + } + + set srgb(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SamplerCaptureDescriptorDataInfoEXT.ts b/api/struct/SamplerCaptureDescriptorDataInfoEXT.ts new file mode 100644 index 0000000..9d44efb --- /dev/null +++ b/api/struct/SamplerCaptureDescriptorDataInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Sampler } from "../def.ts"; + +export interface InitSamplerCaptureDescriptorDataInfoEXT { + pNext?: AnyPointer; + sampler?: Sampler; +} + +export class SamplerCaptureDescriptorDataInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSamplerCaptureDescriptorDataInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerCaptureDescriptorDataInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SamplerCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SamplerCaptureDescriptorDataInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SamplerCaptureDescriptorDataInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.sampler !== undefined) this.sampler = data.sampler; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerCaptureDescriptorDataInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get sampler(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set sampler(value: Sampler) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SamplerCreateInfo.ts b/api/struct/SamplerCreateInfo.ts new file mode 100644 index 0000000..60fcac6 --- /dev/null +++ b/api/struct/SamplerCreateInfo.ts @@ -0,0 +1,230 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Filter, SamplerMipmapMode, SamplerAddressMode, CompareOp, BorderColor } from "../enum.ts"; +import { SamplerCreateFlags, Bool32 } from "../def.ts"; + +export interface InitSamplerCreateInfo { + pNext?: AnyPointer; + flags?: SamplerCreateFlags; + magFilter?: Filter; + minFilter?: Filter; + mipmapMode?: SamplerMipmapMode; + addressModeU?: SamplerAddressMode; + addressModeV?: SamplerAddressMode; + addressModeW?: SamplerAddressMode; + mipLodBias?: number; + anisotropyEnable?: Bool32; + maxAnisotropy?: number; + compareEnable?: Bool32; + compareOp?: CompareOp; + minLod?: number; + maxLod?: number; + borderColor?: BorderColor; + unnormalizedCoordinates?: Bool32; +} + +export class SamplerCreateInfo implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSamplerCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SamplerCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SamplerCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SamplerCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.magFilter !== undefined) this.magFilter = data.magFilter; + if (data.minFilter !== undefined) this.minFilter = data.minFilter; + if (data.mipmapMode !== undefined) this.mipmapMode = data.mipmapMode; + if (data.addressModeU !== undefined) this.addressModeU = data.addressModeU; + if (data.addressModeV !== undefined) this.addressModeV = data.addressModeV; + if (data.addressModeW !== undefined) this.addressModeW = data.addressModeW; + if (data.mipLodBias !== undefined) this.mipLodBias = data.mipLodBias; + if (data.anisotropyEnable !== undefined) this.anisotropyEnable = data.anisotropyEnable; + if (data.maxAnisotropy !== undefined) this.maxAnisotropy = data.maxAnisotropy; + if (data.compareEnable !== undefined) this.compareEnable = data.compareEnable; + if (data.compareOp !== undefined) this.compareOp = data.compareOp; + if (data.minLod !== undefined) this.minLod = data.minLod; + if (data.maxLod !== undefined) this.maxLod = data.maxLod; + if (data.borderColor !== undefined) this.borderColor = data.borderColor; + if (data.unnormalizedCoordinates !== undefined) this.unnormalizedCoordinates = data.unnormalizedCoordinates; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SAMPLER_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: SamplerCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get magFilter(): number { + return this.#view.getUint32(20, LE); + } + + set magFilter(value: Filter) { + this.#view.setUint32(20, Number(value), LE); + } + + get minFilter(): number { + return this.#view.getUint32(24, LE); + } + + set minFilter(value: Filter) { + this.#view.setUint32(24, Number(value), LE); + } + + get mipmapMode(): number { + return this.#view.getUint32(28, LE); + } + + set mipmapMode(value: SamplerMipmapMode) { + this.#view.setUint32(28, Number(value), LE); + } + + get addressModeU(): number { + return this.#view.getUint32(32, LE); + } + + set addressModeU(value: SamplerAddressMode) { + this.#view.setUint32(32, Number(value), LE); + } + + get addressModeV(): number { + return this.#view.getUint32(36, LE); + } + + set addressModeV(value: SamplerAddressMode) { + this.#view.setUint32(36, Number(value), LE); + } + + get addressModeW(): number { + return this.#view.getUint32(40, LE); + } + + set addressModeW(value: SamplerAddressMode) { + this.#view.setUint32(40, Number(value), LE); + } + + get mipLodBias(): number { + return this.#view.getFloat32(44, LE); + } + + set mipLodBias(value: number) { + this.#view.setFloat32(44, Number(value), LE); + } + + get anisotropyEnable(): number { + return this.#view.getUint32(48, LE); + } + + set anisotropyEnable(value: Bool32) { + this.#view.setUint32(48, Number(value), LE); + } + + get maxAnisotropy(): number { + return this.#view.getFloat32(52, LE); + } + + set maxAnisotropy(value: number) { + this.#view.setFloat32(52, Number(value), LE); + } + + get compareEnable(): number { + return this.#view.getUint32(56, LE); + } + + set compareEnable(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } + + get compareOp(): number { + return this.#view.getUint32(60, LE); + } + + set compareOp(value: CompareOp) { + this.#view.setUint32(60, Number(value), LE); + } + + get minLod(): number { + return this.#view.getFloat32(64, LE); + } + + set minLod(value: number) { + this.#view.setFloat32(64, Number(value), LE); + } + + get maxLod(): number { + return this.#view.getFloat32(68, LE); + } + + set maxLod(value: number) { + this.#view.setFloat32(68, Number(value), LE); + } + + get borderColor(): number { + return this.#view.getUint32(72, LE); + } + + set borderColor(value: BorderColor) { + this.#view.setUint32(72, Number(value), LE); + } + + get unnormalizedCoordinates(): number { + return this.#view.getUint32(76, LE); + } + + set unnormalizedCoordinates(value: Bool32) { + this.#view.setUint32(76, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SamplerCustomBorderColorCreateInfoEXT.ts b/api/struct/SamplerCustomBorderColorCreateInfoEXT.ts new file mode 100644 index 0000000..77e58f0 --- /dev/null +++ b/api/struct/SamplerCustomBorderColorCreateInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format } from "../enum.ts"; +import { ClearColorValue } from "../union.ts"; + +export interface InitSamplerCustomBorderColorCreateInfoEXT { + pNext?: AnyPointer; + customBorderColor?: ClearColorValue; + format?: Format; +} + +export class SamplerCustomBorderColorCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSamplerCustomBorderColorCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerCustomBorderColorCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SamplerCustomBorderColorCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SamplerCustomBorderColorCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SamplerCustomBorderColorCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.customBorderColor !== undefined) this.customBorderColor = data.customBorderColor; + if (data.format !== undefined) this.format = data.format; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerCustomBorderColorCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get customBorderColor(): unknown { + throw new Error(`Unknown type: {"union":["f32","i32","u32"]}`); + } + + set customBorderColor(value: ClearColorValue) { + throw new Error(`Unknown type: {"union":["f32","i32","u32"]}`); + } + + get format(): number { + return this.#view.getUint32(20, LE); + } + + set format(value: Format) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SamplerReductionModeCreateInfo.ts b/api/struct/SamplerReductionModeCreateInfo.ts new file mode 100644 index 0000000..5613bb3 --- /dev/null +++ b/api/struct/SamplerReductionModeCreateInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SamplerReductionMode } from "../enum.ts"; + +export interface InitSamplerReductionModeCreateInfo { + pNext?: AnyPointer; + reductionMode?: SamplerReductionMode; +} + +export class SamplerReductionModeCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSamplerReductionModeCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerReductionModeCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SamplerReductionModeCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SamplerReductionModeCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SamplerReductionModeCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.reductionMode !== undefined) this.reductionMode = data.reductionMode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerReductionModeCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SAMPLER_REDUCTION_MODE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get reductionMode(): number { + return this.#view.getUint32(16, LE); + } + + set reductionMode(value: SamplerReductionMode) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SamplerReductionModeCreateInfoEXT.ts b/api/struct/SamplerReductionModeCreateInfoEXT.ts new file mode 100644 index 0000000..e9bc481 --- /dev/null +++ b/api/struct/SamplerReductionModeCreateInfoEXT.ts @@ -0,0 +1,2 @@ + import { SamplerReductionModeCreateInfo } from "./SamplerReductionModeCreateInfo.ts"; + export type SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo; \ No newline at end of file diff --git a/api/struct/SamplerYcbcrConversionCreateInfo.ts b/api/struct/SamplerYcbcrConversionCreateInfo.ts new file mode 100644 index 0000000..09fca41 --- /dev/null +++ b/api/struct/SamplerYcbcrConversionCreateInfo.ts @@ -0,0 +1,154 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ComponentMapping} from "./ComponentMapping.ts"; +import { StructureType, Format, SamplerYcbcrModelConversion, SamplerYcbcrRange, ChromaLocation, Filter } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitSamplerYcbcrConversionCreateInfo { + pNext?: AnyPointer; + format?: Format; + ycbcrModel?: SamplerYcbcrModelConversion; + ycbcrRange?: SamplerYcbcrRange; + components?: ComponentMapping; + xChromaOffset?: ChromaLocation; + yChromaOffset?: ChromaLocation; + chromaFilter?: Filter; + forceExplicitReconstruction?: Bool32; +} + +export class SamplerYcbcrConversionCreateInfo implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSamplerYcbcrConversionCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerYcbcrConversionCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SamplerYcbcrConversionCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SamplerYcbcrConversionCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SamplerYcbcrConversionCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.format !== undefined) this.format = data.format; + if (data.ycbcrModel !== undefined) this.ycbcrModel = data.ycbcrModel; + if (data.ycbcrRange !== undefined) this.ycbcrRange = data.ycbcrRange; + if (data.components !== undefined) this.components = data.components; + if (data.xChromaOffset !== undefined) this.xChromaOffset = data.xChromaOffset; + if (data.yChromaOffset !== undefined) this.yChromaOffset = data.yChromaOffset; + if (data.chromaFilter !== undefined) this.chromaFilter = data.chromaFilter; + if (data.forceExplicitReconstruction !== undefined) this.forceExplicitReconstruction = data.forceExplicitReconstruction; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerYcbcrConversionCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SAMPLER_YCBCR_CONVERSION_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get format(): number { + return this.#view.getUint32(16, LE); + } + + set format(value: Format) { + this.#view.setUint32(16, Number(value), LE); + } + + get ycbcrModel(): number { + return this.#view.getUint32(20, LE); + } + + set ycbcrModel(value: SamplerYcbcrModelConversion) { + this.#view.setUint32(20, Number(value), LE); + } + + get ycbcrRange(): number { + return this.#view.getUint32(24, LE); + } + + set ycbcrRange(value: SamplerYcbcrRange) { + this.#view.setUint32(24, Number(value), LE); + } + + get components(): ComponentMapping { + return new ComponentMapping(this.#data.subarray(28, 28 + ComponentMapping.size)); + } + + set components(value: ComponentMapping) { + if (value[BUFFER].byteLength < ComponentMapping.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 28); + } + + get xChromaOffset(): number { + return this.#view.getUint32(44, LE); + } + + set xChromaOffset(value: ChromaLocation) { + this.#view.setUint32(44, Number(value), LE); + } + + get yChromaOffset(): number { + return this.#view.getUint32(48, LE); + } + + set yChromaOffset(value: ChromaLocation) { + this.#view.setUint32(48, Number(value), LE); + } + + get chromaFilter(): number { + return this.#view.getUint32(52, LE); + } + + set chromaFilter(value: Filter) { + this.#view.setUint32(52, Number(value), LE); + } + + get forceExplicitReconstruction(): number { + return this.#view.getUint32(56, LE); + } + + set forceExplicitReconstruction(value: Bool32) { + this.#view.setUint32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SamplerYcbcrConversionCreateInfoKHR.ts b/api/struct/SamplerYcbcrConversionCreateInfoKHR.ts new file mode 100644 index 0000000..4f9cc54 --- /dev/null +++ b/api/struct/SamplerYcbcrConversionCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { SamplerYcbcrConversionCreateInfo } from "./SamplerYcbcrConversionCreateInfo.ts"; + export type SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo; \ No newline at end of file diff --git a/api/struct/SamplerYcbcrConversionImageFormatProperties.ts b/api/struct/SamplerYcbcrConversionImageFormatProperties.ts new file mode 100644 index 0000000..41e6849 --- /dev/null +++ b/api/struct/SamplerYcbcrConversionImageFormatProperties.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSamplerYcbcrConversionImageFormatProperties { + pNext?: AnyPointer; + combinedImageSamplerDescriptorCount?: number; +} + +export class SamplerYcbcrConversionImageFormatProperties implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSamplerYcbcrConversionImageFormatProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerYcbcrConversionImageFormatProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SamplerYcbcrConversionImageFormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SamplerYcbcrConversionImageFormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SamplerYcbcrConversionImageFormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.combinedImageSamplerDescriptorCount !== undefined) this.combinedImageSamplerDescriptorCount = data.combinedImageSamplerDescriptorCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerYcbcrConversionImageFormatProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get combinedImageSamplerDescriptorCount(): number { + return this.#view.getUint32(16, LE); + } + + set combinedImageSamplerDescriptorCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SamplerYcbcrConversionImageFormatPropertiesKHR.ts b/api/struct/SamplerYcbcrConversionImageFormatPropertiesKHR.ts new file mode 100644 index 0000000..123feba --- /dev/null +++ b/api/struct/SamplerYcbcrConversionImageFormatPropertiesKHR.ts @@ -0,0 +1,2 @@ + import { SamplerYcbcrConversionImageFormatProperties } from "./SamplerYcbcrConversionImageFormatProperties.ts"; + export type SamplerYcbcrConversionImageFormatPropertiesKHR = SamplerYcbcrConversionImageFormatProperties; \ No newline at end of file diff --git a/api/struct/SamplerYcbcrConversionInfo.ts b/api/struct/SamplerYcbcrConversionInfo.ts new file mode 100644 index 0000000..e5bddd2 --- /dev/null +++ b/api/struct/SamplerYcbcrConversionInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { SamplerYcbcrConversion } from "../def.ts"; + +export interface InitSamplerYcbcrConversionInfo { + pNext?: AnyPointer; + conversion?: SamplerYcbcrConversion; +} + +export class SamplerYcbcrConversionInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSamplerYcbcrConversionInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerYcbcrConversionInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SamplerYcbcrConversionInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SamplerYcbcrConversionInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SamplerYcbcrConversionInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.conversion !== undefined) this.conversion = data.conversion; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerYcbcrConversionInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SAMPLER_YCBCR_CONVERSION_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get conversion(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set conversion(value: SamplerYcbcrConversion) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SamplerYcbcrConversionInfoKHR.ts b/api/struct/SamplerYcbcrConversionInfoKHR.ts new file mode 100644 index 0000000..c7c717b --- /dev/null +++ b/api/struct/SamplerYcbcrConversionInfoKHR.ts @@ -0,0 +1,2 @@ + import { SamplerYcbcrConversionInfo } from "./SamplerYcbcrConversionInfo.ts"; + export type SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo; \ No newline at end of file diff --git a/api/struct/ScreenSurfaceCreateInfoQNX.ts b/api/struct/ScreenSurfaceCreateInfoQNX.ts new file mode 100644 index 0000000..6449098 --- /dev/null +++ b/api/struct/ScreenSurfaceCreateInfoQNX.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ScreenSurfaceCreateFlagsQNX } from "../def.ts"; + +export interface InitScreenSurfaceCreateInfoQNX { + pNext?: AnyPointer; + flags?: ScreenSurfaceCreateFlagsQNX; + context?: AnyPointer; + window?: AnyPointer; +} + +export class ScreenSurfaceCreateInfoQNX implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitScreenSurfaceCreateInfoQNX); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitScreenSurfaceCreateInfoQNX) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ScreenSurfaceCreateInfoQNX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ScreenSurfaceCreateInfoQNX.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ScreenSurfaceCreateInfoQNX.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.context !== undefined) this.context = data.context; + if (data.window !== undefined) this.window = data.window; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ScreenSurfaceCreateInfoQNX.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SCREEN_SURFACE_CREATE_INFO_QNX; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: ScreenSurfaceCreateFlagsQNX) { + this.#view.setUint32(16, Number(value), LE); + } + + get context(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set context(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get window(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set window(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SemaphoreCreateInfo.ts b/api/struct/SemaphoreCreateInfo.ts new file mode 100644 index 0000000..b58534a --- /dev/null +++ b/api/struct/SemaphoreCreateInfo.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { SemaphoreCreateFlags } from "../def.ts"; + +export interface InitSemaphoreCreateInfo { + pNext?: AnyPointer; + flags?: SemaphoreCreateFlags; +} + +export class SemaphoreCreateInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSemaphoreCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SemaphoreCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SemaphoreCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SemaphoreCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SEMAPHORE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: SemaphoreCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SemaphoreGetFdInfoKHR.ts b/api/struct/SemaphoreGetFdInfoKHR.ts new file mode 100644 index 0000000..8db01f0 --- /dev/null +++ b/api/struct/SemaphoreGetFdInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalSemaphoreHandleTypeFlagBits } from "../enum.ts"; +import { Semaphore } from "../def.ts"; + +export interface InitSemaphoreGetFdInfoKHR { + pNext?: AnyPointer; + semaphore?: Semaphore; + handleType?: ExternalSemaphoreHandleTypeFlagBits; +} + +export class SemaphoreGetFdInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSemaphoreGetFdInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreGetFdInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SemaphoreGetFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SemaphoreGetFdInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SemaphoreGetFdInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreGetFdInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SEMAPHORE_GET_FD_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SemaphoreGetWin32HandleInfoKHR.ts b/api/struct/SemaphoreGetWin32HandleInfoKHR.ts new file mode 100644 index 0000000..c2a7526 --- /dev/null +++ b/api/struct/SemaphoreGetWin32HandleInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalSemaphoreHandleTypeFlagBits } from "../enum.ts"; +import { Semaphore } from "../def.ts"; + +export interface InitSemaphoreGetWin32HandleInfoKHR { + pNext?: AnyPointer; + semaphore?: Semaphore; + handleType?: ExternalSemaphoreHandleTypeFlagBits; +} + +export class SemaphoreGetWin32HandleInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSemaphoreGetWin32HandleInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreGetWin32HandleInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SemaphoreGetWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SemaphoreGetWin32HandleInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SemaphoreGetWin32HandleInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreGetWin32HandleInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SemaphoreGetZirconHandleInfoFUCHSIA.ts b/api/struct/SemaphoreGetZirconHandleInfoFUCHSIA.ts new file mode 100644 index 0000000..ecee776 --- /dev/null +++ b/api/struct/SemaphoreGetZirconHandleInfoFUCHSIA.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ExternalSemaphoreHandleTypeFlagBits } from "../enum.ts"; +import { Semaphore } from "../def.ts"; + +export interface InitSemaphoreGetZirconHandleInfoFUCHSIA { + pNext?: AnyPointer; + semaphore?: Semaphore; + handleType?: ExternalSemaphoreHandleTypeFlagBits; +} + +export class SemaphoreGetZirconHandleInfoFUCHSIA implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSemaphoreGetZirconHandleInfoFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreGetZirconHandleInfoFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SemaphoreGetZirconHandleInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SemaphoreGetZirconHandleInfoFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SemaphoreGetZirconHandleInfoFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.handleType !== undefined) this.handleType = data.handleType; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreGetZirconHandleInfoFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get handleType(): number { + return this.#view.getUint32(24, LE); + } + + set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SemaphoreSignalInfo.ts b/api/struct/SemaphoreSignalInfo.ts new file mode 100644 index 0000000..0f24ae5 --- /dev/null +++ b/api/struct/SemaphoreSignalInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Semaphore } from "../def.ts"; + +export interface InitSemaphoreSignalInfo { + pNext?: AnyPointer; + semaphore?: Semaphore; + value?: number | bigint; +} + +export class SemaphoreSignalInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSemaphoreSignalInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreSignalInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SemaphoreSignalInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SemaphoreSignalInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SemaphoreSignalInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.value !== undefined) this.value = data.value; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreSignalInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SEMAPHORE_SIGNAL_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get value(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set value(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SemaphoreSignalInfoKHR.ts b/api/struct/SemaphoreSignalInfoKHR.ts new file mode 100644 index 0000000..f9842af --- /dev/null +++ b/api/struct/SemaphoreSignalInfoKHR.ts @@ -0,0 +1,2 @@ + import { SemaphoreSignalInfo } from "./SemaphoreSignalInfo.ts"; + export type SemaphoreSignalInfoKHR = SemaphoreSignalInfo; \ No newline at end of file diff --git a/api/struct/SemaphoreSubmitInfo.ts b/api/struct/SemaphoreSubmitInfo.ts new file mode 100644 index 0000000..efe4e91 --- /dev/null +++ b/api/struct/SemaphoreSubmitInfo.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Semaphore, PipelineStageFlags2 } from "../def.ts"; + +export interface InitSemaphoreSubmitInfo { + pNext?: AnyPointer; + semaphore?: Semaphore; + value?: number | bigint; + stageMask?: PipelineStageFlags2; + deviceIndex?: number; +} + +export class SemaphoreSubmitInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSemaphoreSubmitInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreSubmitInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SemaphoreSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SemaphoreSubmitInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SemaphoreSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphore !== undefined) this.semaphore = data.semaphore; + if (data.value !== undefined) this.value = data.value; + if (data.stageMask !== undefined) this.stageMask = data.stageMask; + if (data.deviceIndex !== undefined) this.deviceIndex = data.deviceIndex; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreSubmitInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SEMAPHORE_SUBMIT_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphore(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set semaphore(value: Semaphore) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get value(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set value(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get stageMask(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set stageMask(value: PipelineStageFlags2) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get deviceIndex(): number { + return this.#view.getUint32(40, LE); + } + + set deviceIndex(value: number) { + this.#view.setUint32(40, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SemaphoreSubmitInfoKHR.ts b/api/struct/SemaphoreSubmitInfoKHR.ts new file mode 100644 index 0000000..771a381 --- /dev/null +++ b/api/struct/SemaphoreSubmitInfoKHR.ts @@ -0,0 +1,2 @@ + import { SemaphoreSubmitInfo } from "./SemaphoreSubmitInfo.ts"; + export type SemaphoreSubmitInfoKHR = SemaphoreSubmitInfo; \ No newline at end of file diff --git a/api/struct/SemaphoreTypeCreateInfo.ts b/api/struct/SemaphoreTypeCreateInfo.ts new file mode 100644 index 0000000..ae4d83c --- /dev/null +++ b/api/struct/SemaphoreTypeCreateInfo.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SemaphoreType } from "../enum.ts"; + +export interface InitSemaphoreTypeCreateInfo { + pNext?: AnyPointer; + semaphoreType?: SemaphoreType; + initialValue?: number | bigint; +} + +export class SemaphoreTypeCreateInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSemaphoreTypeCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreTypeCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SemaphoreTypeCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SemaphoreTypeCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SemaphoreTypeCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.semaphoreType !== undefined) this.semaphoreType = data.semaphoreType; + if (data.initialValue !== undefined) this.initialValue = data.initialValue; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreTypeCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SEMAPHORE_TYPE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get semaphoreType(): number { + return this.#view.getUint32(16, LE); + } + + set semaphoreType(value: SemaphoreType) { + this.#view.setUint32(16, Number(value), LE); + } + + get initialValue(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set initialValue(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SemaphoreTypeCreateInfoKHR.ts b/api/struct/SemaphoreTypeCreateInfoKHR.ts new file mode 100644 index 0000000..fb5c894 --- /dev/null +++ b/api/struct/SemaphoreTypeCreateInfoKHR.ts @@ -0,0 +1,2 @@ + import { SemaphoreTypeCreateInfo } from "./SemaphoreTypeCreateInfo.ts"; + export type SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo; \ No newline at end of file diff --git a/api/struct/SemaphoreWaitInfo.ts b/api/struct/SemaphoreWaitInfo.ts new file mode 100644 index 0000000..13fa25a --- /dev/null +++ b/api/struct/SemaphoreWaitInfo.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { SemaphoreWaitFlags, Semaphore } from "../def.ts"; + +export interface InitSemaphoreWaitInfo { + pNext?: AnyPointer; + flags?: SemaphoreWaitFlags; + semaphoreCount?: number; + pSemaphores?: AnyPointer; + pValues?: AnyPointer; +} + +export class SemaphoreWaitInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSemaphoreWaitInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreWaitInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SemaphoreWaitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SemaphoreWaitInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SemaphoreWaitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.semaphoreCount !== undefined) this.semaphoreCount = data.semaphoreCount; + if (data.pSemaphores !== undefined) this.pSemaphores = data.pSemaphores; + if (data.pValues !== undefined) this.pValues = data.pValues; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreWaitInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SEMAPHORE_WAIT_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: SemaphoreWaitFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get semaphoreCount(): number { + return this.#view.getUint32(20, LE); + } + + set semaphoreCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pSemaphores(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pSemaphores(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pValues(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pValues(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SemaphoreWaitInfoKHR.ts b/api/struct/SemaphoreWaitInfoKHR.ts new file mode 100644 index 0000000..66154b1 --- /dev/null +++ b/api/struct/SemaphoreWaitInfoKHR.ts @@ -0,0 +1,2 @@ + import { SemaphoreWaitInfo } from "./SemaphoreWaitInfo.ts"; + export type SemaphoreWaitInfoKHR = SemaphoreWaitInfo; \ No newline at end of file diff --git a/api/struct/SetStateFlagsIndirectCommandNV.ts b/api/struct/SetStateFlagsIndirectCommandNV.ts new file mode 100644 index 0000000..398c8b6 --- /dev/null +++ b/api/struct/SetStateFlagsIndirectCommandNV.ts @@ -0,0 +1,59 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitSetStateFlagsIndirectCommandNV { + data?: number; +} + +export class SetStateFlagsIndirectCommandNV implements BaseStruct { + static size = 4; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSetStateFlagsIndirectCommandNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSetStateFlagsIndirectCommandNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SetStateFlagsIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SetStateFlagsIndirectCommandNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SetStateFlagsIndirectCommandNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.data !== undefined) this.data = data.data; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SetStateFlagsIndirectCommandNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get data(): number { + return this.#view.getUint32(0, LE); + } + + set data(value: number) { + this.#view.setUint32(0, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ShaderModuleCreateInfo.ts b/api/struct/ShaderModuleCreateInfo.ts new file mode 100644 index 0000000..1c0826e --- /dev/null +++ b/api/struct/ShaderModuleCreateInfo.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ShaderModuleCreateFlags } from "../def.ts"; + +export interface InitShaderModuleCreateInfo { + pNext?: AnyPointer; + flags?: ShaderModuleCreateFlags; + codeSize?: number | bigint; + pCode?: AnyPointer; +} + +export class ShaderModuleCreateInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitShaderModuleCreateInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitShaderModuleCreateInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ShaderModuleCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ShaderModuleCreateInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ShaderModuleCreateInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.codeSize !== undefined) this.codeSize = data.codeSize; + if (data.pCode !== undefined) this.pCode = data.pCode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderModuleCreateInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SHADER_MODULE_CREATE_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: ShaderModuleCreateFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get codeSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set codeSize(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get pCode(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pCode(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ShaderModuleIdentifierEXT.ts b/api/struct/ShaderModuleIdentifierEXT.ts new file mode 100644 index 0000000..80ec984 --- /dev/null +++ b/api/struct/ShaderModuleIdentifierEXT.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitShaderModuleIdentifierEXT { + pNext?: AnyPointer; + identifierSize?: number; + identifier?: Uint8Array; +} + +export class ShaderModuleIdentifierEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitShaderModuleIdentifierEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitShaderModuleIdentifierEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ShaderModuleIdentifierEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ShaderModuleIdentifierEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ShaderModuleIdentifierEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.identifierSize !== undefined) this.identifierSize = data.identifierSize; + if (data.identifier !== undefined) this.identifier = data.identifier; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderModuleIdentifierEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SHADER_MODULE_IDENTIFIER_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get identifierSize(): number { + return this.#view.getUint32(16, LE); + } + + set identifierSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get identifier(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 32); + } + + set identifier(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } +} \ No newline at end of file diff --git a/api/struct/ShaderModuleValidationCacheCreateInfoEXT.ts b/api/struct/ShaderModuleValidationCacheCreateInfoEXT.ts new file mode 100644 index 0000000..ae1396e --- /dev/null +++ b/api/struct/ShaderModuleValidationCacheCreateInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ValidationCacheEXT } from "../def.ts"; + +export interface InitShaderModuleValidationCacheCreateInfoEXT { + pNext?: AnyPointer; + validationCache?: ValidationCacheEXT; +} + +export class ShaderModuleValidationCacheCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitShaderModuleValidationCacheCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitShaderModuleValidationCacheCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ShaderModuleValidationCacheCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ShaderModuleValidationCacheCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ShaderModuleValidationCacheCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.validationCache !== undefined) this.validationCache = data.validationCache; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderModuleValidationCacheCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get validationCache(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set validationCache(value: ValidationCacheEXT) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ShaderResourceUsageAMD.ts b/api/struct/ShaderResourceUsageAMD.ts new file mode 100644 index 0000000..b66794b --- /dev/null +++ b/api/struct/ShaderResourceUsageAMD.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitShaderResourceUsageAMD { + numUsedVgprs?: number; + numUsedSgprs?: number; + ldsSizePerLocalWorkGroup?: number; + ldsUsageSizeInBytes?: number | bigint; + scratchMemUsageInBytes?: number | bigint; +} + +export class ShaderResourceUsageAMD implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitShaderResourceUsageAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitShaderResourceUsageAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ShaderResourceUsageAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ShaderResourceUsageAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ShaderResourceUsageAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.numUsedVgprs !== undefined) this.numUsedVgprs = data.numUsedVgprs; + if (data.numUsedSgprs !== undefined) this.numUsedSgprs = data.numUsedSgprs; + if (data.ldsSizePerLocalWorkGroup !== undefined) this.ldsSizePerLocalWorkGroup = data.ldsSizePerLocalWorkGroup; + if (data.ldsUsageSizeInBytes !== undefined) this.ldsUsageSizeInBytes = data.ldsUsageSizeInBytes; + if (data.scratchMemUsageInBytes !== undefined) this.scratchMemUsageInBytes = data.scratchMemUsageInBytes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderResourceUsageAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get numUsedVgprs(): number { + return this.#view.getUint32(0, LE); + } + + set numUsedVgprs(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get numUsedSgprs(): number { + return this.#view.getUint32(4, LE); + } + + set numUsedSgprs(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get ldsSizePerLocalWorkGroup(): number { + return this.#view.getUint32(8, LE); + } + + set ldsSizePerLocalWorkGroup(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get ldsUsageSizeInBytes(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set ldsUsageSizeInBytes(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get scratchMemUsageInBytes(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set scratchMemUsageInBytes(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ShaderStatisticsInfoAMD.ts b/api/struct/ShaderStatisticsInfoAMD.ts new file mode 100644 index 0000000..de48564 --- /dev/null +++ b/api/struct/ShaderStatisticsInfoAMD.ts @@ -0,0 +1,124 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ShaderResourceUsageAMD} from "./ShaderResourceUsageAMD.ts"; +import { ShaderStageFlags } from "../def.ts"; + +export interface InitShaderStatisticsInfoAMD { + shaderStageMask?: ShaderStageFlags; + resourceUsage?: ShaderResourceUsageAMD; + numPhysicalVgprs?: number; + numPhysicalSgprs?: number; + numAvailableVgprs?: number; + numAvailableSgprs?: number; + computeWorkGroupSize?: Uint32Array; +} + +export class ShaderStatisticsInfoAMD implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitShaderStatisticsInfoAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitShaderStatisticsInfoAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ShaderStatisticsInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ShaderStatisticsInfoAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ShaderStatisticsInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.shaderStageMask !== undefined) this.shaderStageMask = data.shaderStageMask; + if (data.resourceUsage !== undefined) this.resourceUsage = data.resourceUsage; + if (data.numPhysicalVgprs !== undefined) this.numPhysicalVgprs = data.numPhysicalVgprs; + if (data.numPhysicalSgprs !== undefined) this.numPhysicalSgprs = data.numPhysicalSgprs; + if (data.numAvailableVgprs !== undefined) this.numAvailableVgprs = data.numAvailableVgprs; + if (data.numAvailableSgprs !== undefined) this.numAvailableSgprs = data.numAvailableSgprs; + if (data.computeWorkGroupSize !== undefined) this.computeWorkGroupSize = data.computeWorkGroupSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderStatisticsInfoAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get shaderStageMask(): number { + return this.#view.getUint32(0, LE); + } + + set shaderStageMask(value: ShaderStageFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get resourceUsage(): ShaderResourceUsageAMD { + return new ShaderResourceUsageAMD(this.#data.subarray(8, 8 + ShaderResourceUsageAMD.size)); + } + + set resourceUsage(value: ShaderResourceUsageAMD) { + if (value[BUFFER].byteLength < ShaderResourceUsageAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 8); + } + + get numPhysicalVgprs(): number { + return this.#view.getUint32(40, LE); + } + + set numPhysicalVgprs(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get numPhysicalSgprs(): number { + return this.#view.getUint32(44, LE); + } + + set numPhysicalSgprs(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get numAvailableVgprs(): number { + return this.#view.getUint32(48, LE); + } + + set numAvailableVgprs(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get numAvailableSgprs(): number { + return this.#view.getUint32(52, LE); + } + + set numAvailableSgprs(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get computeWorkGroupSize(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 56, 3); + } + + set computeWorkGroupSize(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 56); + } +} \ No newline at end of file diff --git a/api/struct/ShadingRatePaletteNV.ts b/api/struct/ShadingRatePaletteNV.ts new file mode 100644 index 0000000..44a1a3f --- /dev/null +++ b/api/struct/ShadingRatePaletteNV.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ShadingRatePaletteEntryNV } from "../enum.ts"; + +export interface InitShadingRatePaletteNV { + shadingRatePaletteEntryCount?: number; + pShadingRatePaletteEntries?: AnyPointer; +} + +export class ShadingRatePaletteNV implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitShadingRatePaletteNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitShadingRatePaletteNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ShadingRatePaletteNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ShadingRatePaletteNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ShadingRatePaletteNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.shadingRatePaletteEntryCount !== undefined) this.shadingRatePaletteEntryCount = data.shadingRatePaletteEntryCount; + if (data.pShadingRatePaletteEntries !== undefined) this.pShadingRatePaletteEntries = data.pShadingRatePaletteEntries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShadingRatePaletteNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get shadingRatePaletteEntryCount(): number { + return this.#view.getUint32(0, LE); + } + + set shadingRatePaletteEntryCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get pShadingRatePaletteEntries(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pShadingRatePaletteEntries(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SharedPresentSurfaceCapabilitiesKHR.ts b/api/struct/SharedPresentSurfaceCapabilitiesKHR.ts new file mode 100644 index 0000000..e89cfaa --- /dev/null +++ b/api/struct/SharedPresentSurfaceCapabilitiesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ImageUsageFlags } from "../def.ts"; + +export interface InitSharedPresentSurfaceCapabilitiesKHR { + pNext?: AnyPointer; + sharedPresentSupportedUsageFlags?: ImageUsageFlags; +} + +export class SharedPresentSurfaceCapabilitiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSharedPresentSurfaceCapabilitiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSharedPresentSurfaceCapabilitiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SharedPresentSurfaceCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SharedPresentSurfaceCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SharedPresentSurfaceCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.sharedPresentSupportedUsageFlags !== undefined) this.sharedPresentSupportedUsageFlags = data.sharedPresentSupportedUsageFlags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SharedPresentSurfaceCapabilitiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SHARED_PRESENT_SURFACE_CAPABILITIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get sharedPresentSupportedUsageFlags(): number { + return this.#view.getUint32(16, LE); + } + + set sharedPresentSupportedUsageFlags(value: ImageUsageFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SparseBufferMemoryBindInfo.ts b/api/struct/SparseBufferMemoryBindInfo.ts new file mode 100644 index 0000000..72d71e4 --- /dev/null +++ b/api/struct/SparseBufferMemoryBindInfo.ts @@ -0,0 +1,81 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SparseMemoryBind} from "./SparseMemoryBind.ts"; +import { Buffer } from "../def.ts"; + +export interface InitSparseBufferMemoryBindInfo { + buffer?: Buffer; + bindCount?: number; + pBinds?: AnyPointer; +} + +export class SparseBufferMemoryBindInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSparseBufferMemoryBindInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSparseBufferMemoryBindInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SparseBufferMemoryBindInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SparseBufferMemoryBindInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SparseBufferMemoryBindInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.buffer !== undefined) this.buffer = data.buffer; + if (data.bindCount !== undefined) this.bindCount = data.bindCount; + if (data.pBinds !== undefined) this.pBinds = data.pBinds; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseBufferMemoryBindInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get buffer(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set buffer(value: Buffer) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get bindCount(): number { + return this.#view.getUint32(8, LE); + } + + set bindCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get pBinds(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pBinds(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SparseImageFormatProperties.ts b/api/struct/SparseImageFormatProperties.ts new file mode 100644 index 0000000..d50eb1a --- /dev/null +++ b/api/struct/SparseImageFormatProperties.ts @@ -0,0 +1,84 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { ImageAspectFlags, SparseImageFormatFlags } from "../def.ts"; + +export interface InitSparseImageFormatProperties { + aspectMask?: ImageAspectFlags; + imageGranularity?: Extent3D; + flags?: SparseImageFormatFlags; +} + +export class SparseImageFormatProperties implements BaseStruct { + static size = 20; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSparseImageFormatProperties); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageFormatProperties) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SparseImageFormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SparseImageFormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SparseImageFormatProperties.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; + if (data.imageGranularity !== undefined) this.imageGranularity = data.imageGranularity; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageFormatProperties.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get aspectMask(): number { + return this.#view.getUint32(0, LE); + } + + set aspectMask(value: ImageAspectFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get imageGranularity(): Extent3D { + return new Extent3D(this.#data.subarray(4, 4 + Extent3D.size)); + } + + set imageGranularity(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 4); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: SparseImageFormatFlags) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SparseImageFormatProperties2.ts b/api/struct/SparseImageFormatProperties2.ts new file mode 100644 index 0000000..b832bca --- /dev/null +++ b/api/struct/SparseImageFormatProperties2.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SparseImageFormatProperties} from "./SparseImageFormatProperties.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSparseImageFormatProperties2 { + pNext?: AnyPointer; + properties?: SparseImageFormatProperties; +} + +export class SparseImageFormatProperties2 implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSparseImageFormatProperties2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageFormatProperties2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SparseImageFormatProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SparseImageFormatProperties2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SparseImageFormatProperties2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.properties !== undefined) this.properties = data.properties; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageFormatProperties2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SPARSE_IMAGE_FORMAT_PROPERTIES_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get properties(): SparseImageFormatProperties { + return new SparseImageFormatProperties(this.#data.subarray(16, 16 + SparseImageFormatProperties.size)); + } + + set properties(value: SparseImageFormatProperties) { + if (value[BUFFER].byteLength < SparseImageFormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/SparseImageFormatProperties2KHR.ts b/api/struct/SparseImageFormatProperties2KHR.ts new file mode 100644 index 0000000..d08441b --- /dev/null +++ b/api/struct/SparseImageFormatProperties2KHR.ts @@ -0,0 +1,2 @@ + import { SparseImageFormatProperties2 } from "./SparseImageFormatProperties2.ts"; + export type SparseImageFormatProperties2KHR = SparseImageFormatProperties2; \ No newline at end of file diff --git a/api/struct/SparseImageMemoryBind.ts b/api/struct/SparseImageMemoryBind.ts new file mode 100644 index 0000000..f9974cd --- /dev/null +++ b/api/struct/SparseImageMemoryBind.ts @@ -0,0 +1,122 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ImageSubresource} from "./ImageSubresource.ts"; +import {Offset3D} from "./Offset3D.ts"; +import {Extent3D} from "./Extent3D.ts"; +import { DeviceMemory, DeviceSize, SparseMemoryBindFlags } from "../def.ts"; + +export interface InitSparseImageMemoryBind { + subresource?: ImageSubresource; + offset?: Offset3D; + extent?: Extent3D; + memory?: DeviceMemory; + memoryOffset?: DeviceSize; + flags?: SparseMemoryBindFlags; +} + +export class SparseImageMemoryBind implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSparseImageMemoryBind); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageMemoryBind) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SparseImageMemoryBind.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SparseImageMemoryBind.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SparseImageMemoryBind.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.subresource !== undefined) this.subresource = data.subresource; + if (data.offset !== undefined) this.offset = data.offset; + if (data.extent !== undefined) this.extent = data.extent; + if (data.memory !== undefined) this.memory = data.memory; + if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryBind.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get subresource(): ImageSubresource { + return new ImageSubresource(this.#data.subarray(0, 0 + ImageSubresource.size)); + } + + set subresource(value: ImageSubresource) { + if (value[BUFFER].byteLength < ImageSubresource.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get offset(): Offset3D { + return new Offset3D(this.#data.subarray(12, 12 + Offset3D.size)); + } + + set offset(value: Offset3D) { + if (value[BUFFER].byteLength < Offset3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 12); + } + + get extent(): Extent3D { + return new Extent3D(this.#data.subarray(24, 24 + Extent3D.size)); + } + + set extent(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get memoryOffset(): bigint { + return this.#view.getBigUint64(48, LE); + } + + set memoryOffset(value: DeviceSize) { + this.#view.setBigUint64(48, BigInt(value), LE); + } + + get flags(): number { + return this.#view.getUint32(56, LE); + } + + set flags(value: SparseMemoryBindFlags) { + this.#view.setUint32(56, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SparseImageMemoryBindInfo.ts b/api/struct/SparseImageMemoryBindInfo.ts new file mode 100644 index 0000000..9eb6770 --- /dev/null +++ b/api/struct/SparseImageMemoryBindInfo.ts @@ -0,0 +1,81 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SparseImageMemoryBind} from "./SparseImageMemoryBind.ts"; +import { Image } from "../def.ts"; + +export interface InitSparseImageMemoryBindInfo { + image?: Image; + bindCount?: number; + pBinds?: AnyPointer; +} + +export class SparseImageMemoryBindInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSparseImageMemoryBindInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageMemoryBindInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SparseImageMemoryBindInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SparseImageMemoryBindInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SparseImageMemoryBindInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.image !== undefined) this.image = data.image; + if (data.bindCount !== undefined) this.bindCount = data.bindCount; + if (data.pBinds !== undefined) this.pBinds = data.pBinds; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryBindInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get bindCount(): number { + return this.#view.getUint32(8, LE); + } + + set bindCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get pBinds(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pBinds(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SparseImageMemoryRequirements.ts b/api/struct/SparseImageMemoryRequirements.ts new file mode 100644 index 0000000..3bdf783 --- /dev/null +++ b/api/struct/SparseImageMemoryRequirements.ts @@ -0,0 +1,104 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SparseImageFormatProperties} from "./SparseImageFormatProperties.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitSparseImageMemoryRequirements { + formatProperties?: SparseImageFormatProperties; + imageMipTailFirstLod?: number; + imageMipTailSize?: DeviceSize; + imageMipTailOffset?: DeviceSize; + imageMipTailStride?: DeviceSize; +} + +export class SparseImageMemoryRequirements implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSparseImageMemoryRequirements); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageMemoryRequirements) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SparseImageMemoryRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SparseImageMemoryRequirements.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SparseImageMemoryRequirements.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.formatProperties !== undefined) this.formatProperties = data.formatProperties; + if (data.imageMipTailFirstLod !== undefined) this.imageMipTailFirstLod = data.imageMipTailFirstLod; + if (data.imageMipTailSize !== undefined) this.imageMipTailSize = data.imageMipTailSize; + if (data.imageMipTailOffset !== undefined) this.imageMipTailOffset = data.imageMipTailOffset; + if (data.imageMipTailStride !== undefined) this.imageMipTailStride = data.imageMipTailStride; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryRequirements.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get formatProperties(): SparseImageFormatProperties { + return new SparseImageFormatProperties(this.#data.subarray(0, 0 + SparseImageFormatProperties.size)); + } + + set formatProperties(value: SparseImageFormatProperties) { + if (value[BUFFER].byteLength < SparseImageFormatProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get imageMipTailFirstLod(): number { + return this.#view.getUint32(20, LE); + } + + set imageMipTailFirstLod(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get imageMipTailSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set imageMipTailSize(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get imageMipTailOffset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set imageMipTailOffset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get imageMipTailStride(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set imageMipTailStride(value: DeviceSize) { + this.#view.setBigUint64(40, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SparseImageMemoryRequirements2.ts b/api/struct/SparseImageMemoryRequirements2.ts new file mode 100644 index 0000000..a449f7c --- /dev/null +++ b/api/struct/SparseImageMemoryRequirements2.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SparseImageMemoryRequirements} from "./SparseImageMemoryRequirements.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSparseImageMemoryRequirements2 { + pNext?: AnyPointer; + memoryRequirements?: SparseImageMemoryRequirements; +} + +export class SparseImageMemoryRequirements2 implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSparseImageMemoryRequirements2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageMemoryRequirements2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SparseImageMemoryRequirements2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SparseImageMemoryRequirements2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SparseImageMemoryRequirements2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryRequirements !== undefined) this.memoryRequirements = data.memoryRequirements; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryRequirements2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SPARSE_IMAGE_MEMORY_REQUIREMENTS_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryRequirements(): SparseImageMemoryRequirements { + return new SparseImageMemoryRequirements(this.#data.subarray(16, 16 + SparseImageMemoryRequirements.size)); + } + + set memoryRequirements(value: SparseImageMemoryRequirements) { + if (value[BUFFER].byteLength < SparseImageMemoryRequirements.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/SparseImageMemoryRequirements2KHR.ts b/api/struct/SparseImageMemoryRequirements2KHR.ts new file mode 100644 index 0000000..f81a0ee --- /dev/null +++ b/api/struct/SparseImageMemoryRequirements2KHR.ts @@ -0,0 +1,2 @@ + import { SparseImageMemoryRequirements2 } from "./SparseImageMemoryRequirements2.ts"; + export type SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2; \ No newline at end of file diff --git a/api/struct/SparseImageOpaqueMemoryBindInfo.ts b/api/struct/SparseImageOpaqueMemoryBindInfo.ts new file mode 100644 index 0000000..74dbaf7 --- /dev/null +++ b/api/struct/SparseImageOpaqueMemoryBindInfo.ts @@ -0,0 +1,81 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SparseMemoryBind} from "./SparseMemoryBind.ts"; +import { Image } from "../def.ts"; + +export interface InitSparseImageOpaqueMemoryBindInfo { + image?: Image; + bindCount?: number; + pBinds?: AnyPointer; +} + +export class SparseImageOpaqueMemoryBindInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSparseImageOpaqueMemoryBindInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageOpaqueMemoryBindInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SparseImageOpaqueMemoryBindInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SparseImageOpaqueMemoryBindInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SparseImageOpaqueMemoryBindInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.image !== undefined) this.image = data.image; + if (data.bindCount !== undefined) this.bindCount = data.bindCount; + if (data.pBinds !== undefined) this.pBinds = data.pBinds; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageOpaqueMemoryBindInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get image(): Deno.PointerValue { + return pointerFromView(this.#view, 0, LE); + } + + set image(value: Image) { + this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); + } + + get bindCount(): number { + return this.#view.getUint32(8, LE); + } + + set bindCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get pBinds(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pBinds(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SparseMemoryBind.ts b/api/struct/SparseMemoryBind.ts new file mode 100644 index 0000000..12fe4de --- /dev/null +++ b/api/struct/SparseMemoryBind.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceSize, DeviceMemory, SparseMemoryBindFlags } from "../def.ts"; + +export interface InitSparseMemoryBind { + resourceOffset?: DeviceSize; + size?: DeviceSize; + memory?: DeviceMemory; + memoryOffset?: DeviceSize; + flags?: SparseMemoryBindFlags; +} + +export class SparseMemoryBind implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSparseMemoryBind); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSparseMemoryBind) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SparseMemoryBind.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SparseMemoryBind.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SparseMemoryBind.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.resourceOffset !== undefined) this.resourceOffset = data.resourceOffset; + if (data.size !== undefined) this.size = data.size; + if (data.memory !== undefined) this.memory = data.memory; + if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseMemoryBind.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get resourceOffset(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set resourceOffset(value: DeviceSize) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get memory(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set memory(value: DeviceMemory) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get memoryOffset(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set memoryOffset(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get flags(): number { + return this.#view.getUint32(32, LE); + } + + set flags(value: SparseMemoryBindFlags) { + this.#view.setUint32(32, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SpecializationInfo.ts b/api/struct/SpecializationInfo.ts new file mode 100644 index 0000000..b564adb --- /dev/null +++ b/api/struct/SpecializationInfo.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SpecializationMapEntry} from "./SpecializationMapEntry.ts"; + +export interface InitSpecializationInfo { + mapEntryCount?: number; + pMapEntries?: AnyPointer; + dataSize?: number | bigint; + pData?: AnyPointer; +} + +export class SpecializationInfo implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSpecializationInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSpecializationInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SpecializationInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SpecializationInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SpecializationInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.mapEntryCount !== undefined) this.mapEntryCount = data.mapEntryCount; + if (data.pMapEntries !== undefined) this.pMapEntries = data.pMapEntries; + if (data.dataSize !== undefined) this.dataSize = data.dataSize; + if (data.pData !== undefined) this.pData = data.pData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SpecializationInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get mapEntryCount(): number { + return this.#view.getUint32(0, LE); + } + + set mapEntryCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get pMapEntries(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pMapEntries(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dataSize(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set dataSize(value: number | bigint) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get pData(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pData(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SpecializationMapEntry.ts b/api/struct/SpecializationMapEntry.ts new file mode 100644 index 0000000..14f8a16 --- /dev/null +++ b/api/struct/SpecializationMapEntry.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitSpecializationMapEntry { + constantID?: number; + offset?: number; + size?: number | bigint; +} + +export class SpecializationMapEntry implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSpecializationMapEntry); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSpecializationMapEntry) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SpecializationMapEntry.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SpecializationMapEntry.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SpecializationMapEntry.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.constantID !== undefined) this.constantID = data.constantID; + if (data.offset !== undefined) this.offset = data.offset; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SpecializationMapEntry.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get constantID(): number { + return this.#view.getUint32(0, LE); + } + + set constantID(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get offset(): number { + return this.#view.getUint32(4, LE); + } + + set offset(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set size(value: number | bigint) { + this.#view.setBigUint64(8, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoDecodeH264PictureInfo.ts b/api/struct/StdVideoDecodeH264PictureInfo.ts new file mode 100644 index 0000000..608709e --- /dev/null +++ b/api/struct/StdVideoDecodeH264PictureInfo.ts @@ -0,0 +1,134 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoDecodeH264PictureInfoFlags} from "./StdVideoDecodeH264PictureInfoFlags.ts"; + +export interface InitStdVideoDecodeH264PictureInfo { + flags?: StdVideoDecodeH264PictureInfoFlags; + seq_parameter_set_id?: number; + pic_parameter_set_id?: number; + reserved1?: number; + reserved2?: number; + frame_num?: number; + idr_pic_id?: number; + PicOrderCnt?: Int32Array; +} + +/** requires tag is for PicOrderCnt, which needs the enum type */ +export class StdVideoDecodeH264PictureInfo implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoDecodeH264PictureInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH264PictureInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoDecodeH264PictureInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoDecodeH264PictureInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoDecodeH264PictureInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.seq_parameter_set_id !== undefined) this.seq_parameter_set_id = data.seq_parameter_set_id; + if (data.pic_parameter_set_id !== undefined) this.pic_parameter_set_id = data.pic_parameter_set_id; + if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; + if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; + if (data.frame_num !== undefined) this.frame_num = data.frame_num; + if (data.idr_pic_id !== undefined) this.idr_pic_id = data.idr_pic_id; + if (data.PicOrderCnt !== undefined) this.PicOrderCnt = data.PicOrderCnt; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264PictureInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoDecodeH264PictureInfoFlags { + return new StdVideoDecodeH264PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH264PictureInfoFlags.size)); + } + + set flags(value: StdVideoDecodeH264PictureInfoFlags) { + if (value[BUFFER].byteLength < StdVideoDecodeH264PictureInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get seq_parameter_set_id(): number { + return this.#view.getUint8(24); + } + + set seq_parameter_set_id(value: number) { + this.#view.setUint8(24, Number(value)); + } + + get pic_parameter_set_id(): number { + return this.#view.getUint8(25); + } + + set pic_parameter_set_id(value: number) { + this.#view.setUint8(25, Number(value)); + } + + get reserved1(): number { + return this.#view.getUint8(26); + } + + set reserved1(value: number) { + this.#view.setUint8(26, Number(value)); + } + + get reserved2(): number { + return this.#view.getUint8(27); + } + + set reserved2(value: number) { + this.#view.setUint8(27, Number(value)); + } + + get frame_num(): number { + return this.#view.getUint16(28, LE); + } + + set frame_num(value: number) { + this.#view.setUint16(28, Number(value), LE); + } + + get idr_pic_id(): number { + return this.#view.getUint16(30, LE); + } + + set idr_pic_id(value: number) { + this.#view.setUint16(30, Number(value), LE); + } + + get PicOrderCnt(): Int32Array { + return new Int32Array(this.#data.buffer, this.#data.byteOffset + 32, 2); + } + + set PicOrderCnt(value: Int32Array) { + this.#data.set(new Uint8Array(value.buffer), 32); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoDecodeH264PictureInfoFlags.ts b/api/struct/StdVideoDecodeH264PictureInfoFlags.ts new file mode 100644 index 0000000..b0462f7 --- /dev/null +++ b/api/struct/StdVideoDecodeH264PictureInfoFlags.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoDecodeH264PictureInfoFlags { + field_pic_flag?: number; + is_intra?: number; + IdrPicFlag?: number; + bottom_field_flag?: number; + is_reference?: number; + complementary_field_pair?: number; +} + +export class StdVideoDecodeH264PictureInfoFlags implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoDecodeH264PictureInfoFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH264PictureInfoFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoDecodeH264PictureInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoDecodeH264PictureInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoDecodeH264PictureInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.field_pic_flag !== undefined) this.field_pic_flag = data.field_pic_flag; + if (data.is_intra !== undefined) this.is_intra = data.is_intra; + if (data.IdrPicFlag !== undefined) this.IdrPicFlag = data.IdrPicFlag; + if (data.bottom_field_flag !== undefined) this.bottom_field_flag = data.bottom_field_flag; + if (data.is_reference !== undefined) this.is_reference = data.is_reference; + if (data.complementary_field_pair !== undefined) this.complementary_field_pair = data.complementary_field_pair; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264PictureInfoFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get field_pic_flag(): number { + return this.#view.getUint32(0, LE); + } + + set field_pic_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get is_intra(): number { + return this.#view.getUint32(4, LE); + } + + set is_intra(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get IdrPicFlag(): number { + return this.#view.getUint32(8, LE); + } + + set IdrPicFlag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get bottom_field_flag(): number { + return this.#view.getUint32(12, LE); + } + + set bottom_field_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get is_reference(): number { + return this.#view.getUint32(16, LE); + } + + set is_reference(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get complementary_field_pair(): number { + return this.#view.getUint32(20, LE); + } + + set complementary_field_pair(value: number) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoDecodeH264ReferenceInfo.ts b/api/struct/StdVideoDecodeH264ReferenceInfo.ts new file mode 100644 index 0000000..261f3e7 --- /dev/null +++ b/api/struct/StdVideoDecodeH264ReferenceInfo.ts @@ -0,0 +1,93 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoDecodeH264ReferenceInfoFlags} from "./StdVideoDecodeH264ReferenceInfoFlags.ts"; + +export interface InitStdVideoDecodeH264ReferenceInfo { + flags?: StdVideoDecodeH264ReferenceInfoFlags; + FrameNum?: number; + reserved?: number; + PicOrderCnt?: Int32Array; +} + +export class StdVideoDecodeH264ReferenceInfo implements BaseStruct { + static size = 28; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoDecodeH264ReferenceInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH264ReferenceInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoDecodeH264ReferenceInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.FrameNum !== undefined) this.FrameNum = data.FrameNum; + if (data.reserved !== undefined) this.reserved = data.reserved; + if (data.PicOrderCnt !== undefined) this.PicOrderCnt = data.PicOrderCnt; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264ReferenceInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoDecodeH264ReferenceInfoFlags { + return new StdVideoDecodeH264ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH264ReferenceInfoFlags.size)); + } + + set flags(value: StdVideoDecodeH264ReferenceInfoFlags) { + if (value[BUFFER].byteLength < StdVideoDecodeH264ReferenceInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get FrameNum(): number { + return this.#view.getUint16(16, LE); + } + + set FrameNum(value: number) { + this.#view.setUint16(16, Number(value), LE); + } + + get reserved(): number { + return this.#view.getUint16(18, LE); + } + + set reserved(value: number) { + this.#view.setUint16(18, Number(value), LE); + } + + get PicOrderCnt(): Int32Array { + return new Int32Array(this.#data.buffer, this.#data.byteOffset + 20, 2); + } + + set PicOrderCnt(value: Int32Array) { + this.#data.set(new Uint8Array(value.buffer), 20); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoDecodeH264ReferenceInfoFlags.ts b/api/struct/StdVideoDecodeH264ReferenceInfoFlags.ts new file mode 100644 index 0000000..7173d37 --- /dev/null +++ b/api/struct/StdVideoDecodeH264ReferenceInfoFlags.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoDecodeH264ReferenceInfoFlags { + top_field_flag?: number; + bottom_field_flag?: number; + used_for_long_term_reference?: number; + is_non_existing?: number; +} + +export class StdVideoDecodeH264ReferenceInfoFlags implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoDecodeH264ReferenceInfoFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH264ReferenceInfoFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoDecodeH264ReferenceInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.top_field_flag !== undefined) this.top_field_flag = data.top_field_flag; + if (data.bottom_field_flag !== undefined) this.bottom_field_flag = data.bottom_field_flag; + if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; + if (data.is_non_existing !== undefined) this.is_non_existing = data.is_non_existing; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264ReferenceInfoFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get top_field_flag(): number { + return this.#view.getUint32(0, LE); + } + + set top_field_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get bottom_field_flag(): number { + return this.#view.getUint32(4, LE); + } + + set bottom_field_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get used_for_long_term_reference(): number { + return this.#view.getUint32(8, LE); + } + + set used_for_long_term_reference(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get is_non_existing(): number { + return this.#view.getUint32(12, LE); + } + + set is_non_existing(value: number) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoDecodeH265PictureInfo.ts b/api/struct/StdVideoDecodeH265PictureInfo.ts new file mode 100644 index 0000000..a8ab7cc --- /dev/null +++ b/api/struct/StdVideoDecodeH265PictureInfo.ts @@ -0,0 +1,163 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoDecodeH265PictureInfoFlags} from "./StdVideoDecodeH265PictureInfoFlags.ts"; + +export interface InitStdVideoDecodeH265PictureInfo { + flags?: StdVideoDecodeH265PictureInfoFlags; + sps_video_parameter_set_id?: number; + pps_seq_parameter_set_id?: number; + pps_pic_parameter_set_id?: number; + NumDeltaPocsOfRefRpsIdx?: number; + PicOrderCntVal?: number; + NumBitsForSTRefPicSetInSlice?: number; + reserved?: number; + RefPicSetStCurrBefore?: Uint8Array; + RefPicSetStCurrAfter?: Uint8Array; + RefPicSetLtCurr?: Uint8Array; +} + +export class StdVideoDecodeH265PictureInfo implements BaseStruct { + static size = 52; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoDecodeH265PictureInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH265PictureInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoDecodeH265PictureInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoDecodeH265PictureInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoDecodeH265PictureInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.sps_video_parameter_set_id !== undefined) this.sps_video_parameter_set_id = data.sps_video_parameter_set_id; + if (data.pps_seq_parameter_set_id !== undefined) this.pps_seq_parameter_set_id = data.pps_seq_parameter_set_id; + if (data.pps_pic_parameter_set_id !== undefined) this.pps_pic_parameter_set_id = data.pps_pic_parameter_set_id; + if (data.NumDeltaPocsOfRefRpsIdx !== undefined) this.NumDeltaPocsOfRefRpsIdx = data.NumDeltaPocsOfRefRpsIdx; + if (data.PicOrderCntVal !== undefined) this.PicOrderCntVal = data.PicOrderCntVal; + if (data.NumBitsForSTRefPicSetInSlice !== undefined) this.NumBitsForSTRefPicSetInSlice = data.NumBitsForSTRefPicSetInSlice; + if (data.reserved !== undefined) this.reserved = data.reserved; + if (data.RefPicSetStCurrBefore !== undefined) this.RefPicSetStCurrBefore = data.RefPicSetStCurrBefore; + if (data.RefPicSetStCurrAfter !== undefined) this.RefPicSetStCurrAfter = data.RefPicSetStCurrAfter; + if (data.RefPicSetLtCurr !== undefined) this.RefPicSetLtCurr = data.RefPicSetLtCurr; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265PictureInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoDecodeH265PictureInfoFlags { + return new StdVideoDecodeH265PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH265PictureInfoFlags.size)); + } + + set flags(value: StdVideoDecodeH265PictureInfoFlags) { + if (value[BUFFER].byteLength < StdVideoDecodeH265PictureInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get sps_video_parameter_set_id(): number { + return this.#view.getUint8(16); + } + + set sps_video_parameter_set_id(value: number) { + this.#view.setUint8(16, Number(value)); + } + + get pps_seq_parameter_set_id(): number { + return this.#view.getUint8(17); + } + + set pps_seq_parameter_set_id(value: number) { + this.#view.setUint8(17, Number(value)); + } + + get pps_pic_parameter_set_id(): number { + return this.#view.getUint8(18); + } + + set pps_pic_parameter_set_id(value: number) { + this.#view.setUint8(18, Number(value)); + } + + get NumDeltaPocsOfRefRpsIdx(): number { + return this.#view.getUint8(19); + } + + set NumDeltaPocsOfRefRpsIdx(value: number) { + this.#view.setUint8(19, Number(value)); + } + + get PicOrderCntVal(): number { + return this.#view.getInt32(20, LE); + } + + set PicOrderCntVal(value: number) { + this.#view.setInt32(20, Number(value), LE); + } + + get NumBitsForSTRefPicSetInSlice(): number { + return this.#view.getUint16(24, LE); + } + + set NumBitsForSTRefPicSetInSlice(value: number) { + this.#view.setUint16(24, Number(value), LE); + } + + get reserved(): number { + return this.#view.getUint16(26, LE); + } + + set reserved(value: number) { + this.#view.setUint16(26, Number(value), LE); + } + + get RefPicSetStCurrBefore(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 28, 8); + } + + set RefPicSetStCurrBefore(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 28); + } + + get RefPicSetStCurrAfter(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 36, 8); + } + + set RefPicSetStCurrAfter(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 36); + } + + get RefPicSetLtCurr(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 44, 8); + } + + set RefPicSetLtCurr(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 44); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoDecodeH265PictureInfoFlags.ts b/api/struct/StdVideoDecodeH265PictureInfoFlags.ts new file mode 100644 index 0000000..6f7238b --- /dev/null +++ b/api/struct/StdVideoDecodeH265PictureInfoFlags.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoDecodeH265PictureInfoFlags { + IrapPicFlag?: number; + IdrPicFlag?: number; + IsReference?: number; + short_term_ref_pic_set_sps_flag?: number; +} + +export class StdVideoDecodeH265PictureInfoFlags implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoDecodeH265PictureInfoFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH265PictureInfoFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoDecodeH265PictureInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoDecodeH265PictureInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoDecodeH265PictureInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.IrapPicFlag !== undefined) this.IrapPicFlag = data.IrapPicFlag; + if (data.IdrPicFlag !== undefined) this.IdrPicFlag = data.IdrPicFlag; + if (data.IsReference !== undefined) this.IsReference = data.IsReference; + if (data.short_term_ref_pic_set_sps_flag !== undefined) this.short_term_ref_pic_set_sps_flag = data.short_term_ref_pic_set_sps_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265PictureInfoFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get IrapPicFlag(): number { + return this.#view.getUint32(0, LE); + } + + set IrapPicFlag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get IdrPicFlag(): number { + return this.#view.getUint32(4, LE); + } + + set IdrPicFlag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get IsReference(): number { + return this.#view.getUint32(8, LE); + } + + set IsReference(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get short_term_ref_pic_set_sps_flag(): number { + return this.#view.getUint32(12, LE); + } + + set short_term_ref_pic_set_sps_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoDecodeH265ReferenceInfo.ts b/api/struct/StdVideoDecodeH265ReferenceInfo.ts new file mode 100644 index 0000000..9f53d3d --- /dev/null +++ b/api/struct/StdVideoDecodeH265ReferenceInfo.ts @@ -0,0 +1,73 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoDecodeH265ReferenceInfoFlags} from "./StdVideoDecodeH265ReferenceInfoFlags.ts"; + +export interface InitStdVideoDecodeH265ReferenceInfo { + flags?: StdVideoDecodeH265ReferenceInfoFlags; + PicOrderCntVal?: number; +} + +export class StdVideoDecodeH265ReferenceInfo implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoDecodeH265ReferenceInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH265ReferenceInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoDecodeH265ReferenceInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.PicOrderCntVal !== undefined) this.PicOrderCntVal = data.PicOrderCntVal; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265ReferenceInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoDecodeH265ReferenceInfoFlags { + return new StdVideoDecodeH265ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH265ReferenceInfoFlags.size)); + } + + set flags(value: StdVideoDecodeH265ReferenceInfoFlags) { + if (value[BUFFER].byteLength < StdVideoDecodeH265ReferenceInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get PicOrderCntVal(): number { + return this.#view.getInt32(8, LE); + } + + set PicOrderCntVal(value: number) { + this.#view.setInt32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoDecodeH265ReferenceInfoFlags.ts b/api/struct/StdVideoDecodeH265ReferenceInfoFlags.ts new file mode 100644 index 0000000..9e95dd2 --- /dev/null +++ b/api/struct/StdVideoDecodeH265ReferenceInfoFlags.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoDecodeH265ReferenceInfoFlags { + used_for_long_term_reference?: number; + unused_for_reference?: number; +} + +export class StdVideoDecodeH265ReferenceInfoFlags implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoDecodeH265ReferenceInfoFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH265ReferenceInfoFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoDecodeH265ReferenceInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; + if (data.unused_for_reference !== undefined) this.unused_for_reference = data.unused_for_reference; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265ReferenceInfoFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get used_for_long_term_reference(): number { + return this.#view.getUint32(0, LE); + } + + set used_for_long_term_reference(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get unused_for_reference(): number { + return this.#view.getUint32(4, LE); + } + + set unused_for_reference(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264PictureInfo.ts b/api/struct/StdVideoEncodeH264PictureInfo.ts new file mode 100644 index 0000000..5428d6c --- /dev/null +++ b/api/struct/StdVideoEncodeH264PictureInfo.ts @@ -0,0 +1,114 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH264PictureInfoFlags} from "./StdVideoEncodeH264PictureInfoFlags.ts"; +import { StdVideoH264PictureType } from "../enum.ts"; + +export interface InitStdVideoEncodeH264PictureInfo { + flags?: StdVideoEncodeH264PictureInfoFlags; + seq_parameter_set_id?: number; + pic_parameter_set_id?: number; + pictureType?: StdVideoH264PictureType; + frame_num?: number; + PicOrderCnt?: number; +} + +export class StdVideoEncodeH264PictureInfo implements BaseStruct { + static size = 28; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264PictureInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264PictureInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264PictureInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264PictureInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264PictureInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.seq_parameter_set_id !== undefined) this.seq_parameter_set_id = data.seq_parameter_set_id; + if (data.pic_parameter_set_id !== undefined) this.pic_parameter_set_id = data.pic_parameter_set_id; + if (data.pictureType !== undefined) this.pictureType = data.pictureType; + if (data.frame_num !== undefined) this.frame_num = data.frame_num; + if (data.PicOrderCnt !== undefined) this.PicOrderCnt = data.PicOrderCnt; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264PictureInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH264PictureInfoFlags { + return new StdVideoEncodeH264PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264PictureInfoFlags.size)); + } + + set flags(value: StdVideoEncodeH264PictureInfoFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH264PictureInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get seq_parameter_set_id(): number { + return this.#view.getUint8(12); + } + + set seq_parameter_set_id(value: number) { + this.#view.setUint8(12, Number(value)); + } + + get pic_parameter_set_id(): number { + return this.#view.getUint8(13); + } + + set pic_parameter_set_id(value: number) { + this.#view.setUint8(13, Number(value)); + } + + get pictureType(): number { + return this.#view.getUint32(16, LE); + } + + set pictureType(value: StdVideoH264PictureType) { + this.#view.setUint32(16, Number(value), LE); + } + + get frame_num(): number { + return this.#view.getUint32(20, LE); + } + + set frame_num(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get PicOrderCnt(): number { + return this.#view.getInt32(24, LE); + } + + set PicOrderCnt(value: number) { + this.#view.setInt32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264PictureInfoFlags.ts b/api/struct/StdVideoEncodeH264PictureInfoFlags.ts new file mode 100644 index 0000000..dd2b8ea --- /dev/null +++ b/api/struct/StdVideoEncodeH264PictureInfoFlags.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH264PictureInfoFlags { + idr_flag?: number; + is_reference_flag?: number; + used_for_long_term_reference?: number; +} + +export class StdVideoEncodeH264PictureInfoFlags implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264PictureInfoFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264PictureInfoFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264PictureInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264PictureInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264PictureInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.idr_flag !== undefined) this.idr_flag = data.idr_flag; + if (data.is_reference_flag !== undefined) this.is_reference_flag = data.is_reference_flag; + if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264PictureInfoFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get idr_flag(): number { + return this.#view.getUint32(0, LE); + } + + set idr_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get is_reference_flag(): number { + return this.#view.getUint32(4, LE); + } + + set is_reference_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get used_for_long_term_reference(): number { + return this.#view.getUint32(8, LE); + } + + set used_for_long_term_reference(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264RefListModEntry.ts b/api/struct/StdVideoEncodeH264RefListModEntry.ts new file mode 100644 index 0000000..4bbd219 --- /dev/null +++ b/api/struct/StdVideoEncodeH264RefListModEntry.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StdVideoH264ModificationOfPicNumsIdc } from "../enum.ts"; + +export interface InitStdVideoEncodeH264RefListModEntry { + modification_of_pic_nums_idc?: StdVideoH264ModificationOfPicNumsIdc; + abs_diff_pic_num_minus1?: number; + long_term_pic_num?: number; +} + +export class StdVideoEncodeH264RefListModEntry implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264RefListModEntry); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264RefListModEntry) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264RefListModEntry.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264RefListModEntry.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264RefListModEntry.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.modification_of_pic_nums_idc !== undefined) this.modification_of_pic_nums_idc = data.modification_of_pic_nums_idc; + if (data.abs_diff_pic_num_minus1 !== undefined) this.abs_diff_pic_num_minus1 = data.abs_diff_pic_num_minus1; + if (data.long_term_pic_num !== undefined) this.long_term_pic_num = data.long_term_pic_num; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefListModEntry.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get modification_of_pic_nums_idc(): number { + return this.#view.getUint32(0, LE); + } + + set modification_of_pic_nums_idc(value: StdVideoH264ModificationOfPicNumsIdc) { + this.#view.setUint32(0, Number(value), LE); + } + + get abs_diff_pic_num_minus1(): number { + return this.#view.getUint16(4, LE); + } + + set abs_diff_pic_num_minus1(value: number) { + this.#view.setUint16(4, Number(value), LE); + } + + get long_term_pic_num(): number { + return this.#view.getUint16(6, LE); + } + + set long_term_pic_num(value: number) { + this.#view.setUint16(6, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264RefMemMgmtCtrlOperations.ts b/api/struct/StdVideoEncodeH264RefMemMgmtCtrlOperations.ts new file mode 100644 index 0000000..710185a --- /dev/null +++ b/api/struct/StdVideoEncodeH264RefMemMgmtCtrlOperations.ts @@ -0,0 +1,125 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH264RefMgmtFlags} from "./StdVideoEncodeH264RefMgmtFlags.ts"; +import {StdVideoEncodeH264RefListModEntry} from "./StdVideoEncodeH264RefListModEntry.ts"; +import {StdVideoEncodeH264RefPicMarkingEntry} from "./StdVideoEncodeH264RefPicMarkingEntry.ts"; + +export interface InitStdVideoEncodeH264RefMemMgmtCtrlOperations { + flags?: StdVideoEncodeH264RefMgmtFlags; + refList0ModOpCount?: number; + pRefList0ModOperations?: AnyPointer; + refList1ModOpCount?: number; + pRefList1ModOperations?: AnyPointer; + refPicMarkingOpCount?: number; + pRefPicMarkingOperations?: AnyPointer; +} + +export class StdVideoEncodeH264RefMemMgmtCtrlOperations implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264RefMemMgmtCtrlOperations); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264RefMemMgmtCtrlOperations) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264RefMemMgmtCtrlOperations.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264RefMemMgmtCtrlOperations.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264RefMemMgmtCtrlOperations.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.refList0ModOpCount !== undefined) this.refList0ModOpCount = data.refList0ModOpCount; + if (data.pRefList0ModOperations !== undefined) this.pRefList0ModOperations = data.pRefList0ModOperations; + if (data.refList1ModOpCount !== undefined) this.refList1ModOpCount = data.refList1ModOpCount; + if (data.pRefList1ModOperations !== undefined) this.pRefList1ModOperations = data.pRefList1ModOperations; + if (data.refPicMarkingOpCount !== undefined) this.refPicMarkingOpCount = data.refPicMarkingOpCount; + if (data.pRefPicMarkingOperations !== undefined) this.pRefPicMarkingOperations = data.pRefPicMarkingOperations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefMemMgmtCtrlOperations.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH264RefMgmtFlags { + return new StdVideoEncodeH264RefMgmtFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264RefMgmtFlags.size)); + } + + set flags(value: StdVideoEncodeH264RefMgmtFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH264RefMgmtFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get refList0ModOpCount(): number { + return this.#view.getUint8(8); + } + + set refList0ModOpCount(value: number) { + this.#view.setUint8(8, Number(value)); + } + + get pRefList0ModOperations(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pRefList0ModOperations(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get refList1ModOpCount(): number { + return this.#view.getUint8(24); + } + + set refList1ModOpCount(value: number) { + this.#view.setUint8(24, Number(value)); + } + + get pRefList1ModOperations(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pRefList1ModOperations(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get refPicMarkingOpCount(): number { + return this.#view.getUint8(40); + } + + set refPicMarkingOpCount(value: number) { + this.#view.setUint8(40, Number(value)); + } + + get pRefPicMarkingOperations(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pRefPicMarkingOperations(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264RefMgmtFlags.ts b/api/struct/StdVideoEncodeH264RefMgmtFlags.ts new file mode 100644 index 0000000..07c7f76 --- /dev/null +++ b/api/struct/StdVideoEncodeH264RefMgmtFlags.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH264RefMgmtFlags { + ref_pic_list_modification_l0_flag?: number; + ref_pic_list_modification_l1_flag?: number; +} + +export class StdVideoEncodeH264RefMgmtFlags implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264RefMgmtFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264RefMgmtFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264RefMgmtFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264RefMgmtFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264RefMgmtFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.ref_pic_list_modification_l0_flag !== undefined) this.ref_pic_list_modification_l0_flag = data.ref_pic_list_modification_l0_flag; + if (data.ref_pic_list_modification_l1_flag !== undefined) this.ref_pic_list_modification_l1_flag = data.ref_pic_list_modification_l1_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefMgmtFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get ref_pic_list_modification_l0_flag(): number { + return this.#view.getUint32(0, LE); + } + + set ref_pic_list_modification_l0_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get ref_pic_list_modification_l1_flag(): number { + return this.#view.getUint32(4, LE); + } + + set ref_pic_list_modification_l1_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264RefPicMarkingEntry.ts b/api/struct/StdVideoEncodeH264RefPicMarkingEntry.ts new file mode 100644 index 0000000..c5f726e --- /dev/null +++ b/api/struct/StdVideoEncodeH264RefPicMarkingEntry.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StdVideoH264MemMgmtControlOp } from "../enum.ts"; + +export interface InitStdVideoEncodeH264RefPicMarkingEntry { + operation?: StdVideoH264MemMgmtControlOp; + difference_of_pic_nums_minus1?: number; + long_term_pic_num?: number; + long_term_frame_idx?: number; + max_long_term_frame_idx_plus1?: number; +} + +export class StdVideoEncodeH264RefPicMarkingEntry implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264RefPicMarkingEntry); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264RefPicMarkingEntry) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264RefPicMarkingEntry.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264RefPicMarkingEntry.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264RefPicMarkingEntry.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.operation !== undefined) this.operation = data.operation; + if (data.difference_of_pic_nums_minus1 !== undefined) this.difference_of_pic_nums_minus1 = data.difference_of_pic_nums_minus1; + if (data.long_term_pic_num !== undefined) this.long_term_pic_num = data.long_term_pic_num; + if (data.long_term_frame_idx !== undefined) this.long_term_frame_idx = data.long_term_frame_idx; + if (data.max_long_term_frame_idx_plus1 !== undefined) this.max_long_term_frame_idx_plus1 = data.max_long_term_frame_idx_plus1; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefPicMarkingEntry.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get operation(): number { + return this.#view.getUint32(0, LE); + } + + set operation(value: StdVideoH264MemMgmtControlOp) { + this.#view.setUint32(0, Number(value), LE); + } + + get difference_of_pic_nums_minus1(): number { + return this.#view.getUint16(4, LE); + } + + set difference_of_pic_nums_minus1(value: number) { + this.#view.setUint16(4, Number(value), LE); + } + + get long_term_pic_num(): number { + return this.#view.getUint16(6, LE); + } + + set long_term_pic_num(value: number) { + this.#view.setUint16(6, Number(value), LE); + } + + get long_term_frame_idx(): number { + return this.#view.getUint16(8, LE); + } + + set long_term_frame_idx(value: number) { + this.#view.setUint16(8, Number(value), LE); + } + + get max_long_term_frame_idx_plus1(): number { + return this.#view.getUint16(10, LE); + } + + set max_long_term_frame_idx_plus1(value: number) { + this.#view.setUint16(10, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264ReferenceInfo.ts b/api/struct/StdVideoEncodeH264ReferenceInfo.ts new file mode 100644 index 0000000..a9b913d --- /dev/null +++ b/api/struct/StdVideoEncodeH264ReferenceInfo.ts @@ -0,0 +1,103 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH264ReferenceInfoFlags} from "./StdVideoEncodeH264ReferenceInfoFlags.ts"; + +export interface InitStdVideoEncodeH264ReferenceInfo { + flags?: StdVideoEncodeH264ReferenceInfoFlags; + FrameNum?: number; + PicOrderCnt?: number; + long_term_pic_num?: number; + long_term_frame_idx?: number; +} + +export class StdVideoEncodeH264ReferenceInfo implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264ReferenceInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264ReferenceInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264ReferenceInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.FrameNum !== undefined) this.FrameNum = data.FrameNum; + if (data.PicOrderCnt !== undefined) this.PicOrderCnt = data.PicOrderCnt; + if (data.long_term_pic_num !== undefined) this.long_term_pic_num = data.long_term_pic_num; + if (data.long_term_frame_idx !== undefined) this.long_term_frame_idx = data.long_term_frame_idx; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264ReferenceInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH264ReferenceInfoFlags { + return new StdVideoEncodeH264ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264ReferenceInfoFlags.size)); + } + + set flags(value: StdVideoEncodeH264ReferenceInfoFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH264ReferenceInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get FrameNum(): number { + return this.#view.getUint32(4, LE); + } + + set FrameNum(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get PicOrderCnt(): number { + return this.#view.getInt32(8, LE); + } + + set PicOrderCnt(value: number) { + this.#view.setInt32(8, Number(value), LE); + } + + get long_term_pic_num(): number { + return this.#view.getUint16(12, LE); + } + + set long_term_pic_num(value: number) { + this.#view.setUint16(12, Number(value), LE); + } + + get long_term_frame_idx(): number { + return this.#view.getUint16(14, LE); + } + + set long_term_frame_idx(value: number) { + this.#view.setUint16(14, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264ReferenceInfoFlags.ts b/api/struct/StdVideoEncodeH264ReferenceInfoFlags.ts new file mode 100644 index 0000000..db1f9ec --- /dev/null +++ b/api/struct/StdVideoEncodeH264ReferenceInfoFlags.ts @@ -0,0 +1,59 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH264ReferenceInfoFlags { + used_for_long_term_reference?: number; +} + +export class StdVideoEncodeH264ReferenceInfoFlags implements BaseStruct { + static size = 4; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264ReferenceInfoFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264ReferenceInfoFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264ReferenceInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264ReferenceInfoFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get used_for_long_term_reference(): number { + return this.#view.getUint32(0, LE); + } + + set used_for_long_term_reference(value: number) { + this.#view.setUint32(0, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264SliceHeader.ts b/api/struct/StdVideoEncodeH264SliceHeader.ts new file mode 100644 index 0000000..53dfb9b --- /dev/null +++ b/api/struct/StdVideoEncodeH264SliceHeader.ts @@ -0,0 +1,165 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH264SliceHeaderFlags} from "./StdVideoEncodeH264SliceHeaderFlags.ts"; +import {StdVideoEncodeH264WeightTable} from "./StdVideoEncodeH264WeightTable.ts"; +import { StdVideoH264SliceType, StdVideoH264CabacInitIdc, StdVideoH264DisableDeblockingFilterIdc } from "../enum.ts"; + +export interface InitStdVideoEncodeH264SliceHeader { + flags?: StdVideoEncodeH264SliceHeaderFlags; + first_mb_in_slice?: number; + slice_type?: StdVideoH264SliceType; + idr_pic_id?: number; + num_ref_idx_l0_active_minus1?: number; + num_ref_idx_l1_active_minus1?: number; + cabac_init_idc?: StdVideoH264CabacInitIdc; + disable_deblocking_filter_idc?: StdVideoH264DisableDeblockingFilterIdc; + slice_alpha_c0_offset_div2?: number; + slice_beta_offset_div2?: number; + pWeightTable?: AnyPointer; +} + +export class StdVideoEncodeH264SliceHeader implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264SliceHeader); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264SliceHeader) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264SliceHeader.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264SliceHeader.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264SliceHeader.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.first_mb_in_slice !== undefined) this.first_mb_in_slice = data.first_mb_in_slice; + if (data.slice_type !== undefined) this.slice_type = data.slice_type; + if (data.idr_pic_id !== undefined) this.idr_pic_id = data.idr_pic_id; + if (data.num_ref_idx_l0_active_minus1 !== undefined) this.num_ref_idx_l0_active_minus1 = data.num_ref_idx_l0_active_minus1; + if (data.num_ref_idx_l1_active_minus1 !== undefined) this.num_ref_idx_l1_active_minus1 = data.num_ref_idx_l1_active_minus1; + if (data.cabac_init_idc !== undefined) this.cabac_init_idc = data.cabac_init_idc; + if (data.disable_deblocking_filter_idc !== undefined) this.disable_deblocking_filter_idc = data.disable_deblocking_filter_idc; + if (data.slice_alpha_c0_offset_div2 !== undefined) this.slice_alpha_c0_offset_div2 = data.slice_alpha_c0_offset_div2; + if (data.slice_beta_offset_div2 !== undefined) this.slice_beta_offset_div2 = data.slice_beta_offset_div2; + if (data.pWeightTable !== undefined) this.pWeightTable = data.pWeightTable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264SliceHeader.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH264SliceHeaderFlags { + return new StdVideoEncodeH264SliceHeaderFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264SliceHeaderFlags.size)); + } + + set flags(value: StdVideoEncodeH264SliceHeaderFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH264SliceHeaderFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get first_mb_in_slice(): number { + return this.#view.getUint32(20, LE); + } + + set first_mb_in_slice(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get slice_type(): number { + return this.#view.getUint32(24, LE); + } + + set slice_type(value: StdVideoH264SliceType) { + this.#view.setUint32(24, Number(value), LE); + } + + get idr_pic_id(): number { + return this.#view.getUint16(28, LE); + } + + set idr_pic_id(value: number) { + this.#view.setUint16(28, Number(value), LE); + } + + get num_ref_idx_l0_active_minus1(): number { + return this.#view.getUint8(30); + } + + set num_ref_idx_l0_active_minus1(value: number) { + this.#view.setUint8(30, Number(value)); + } + + get num_ref_idx_l1_active_minus1(): number { + return this.#view.getUint8(31); + } + + set num_ref_idx_l1_active_minus1(value: number) { + this.#view.setUint8(31, Number(value)); + } + + get cabac_init_idc(): number { + return this.#view.getUint32(32, LE); + } + + set cabac_init_idc(value: StdVideoH264CabacInitIdc) { + this.#view.setUint32(32, Number(value), LE); + } + + get disable_deblocking_filter_idc(): number { + return this.#view.getUint32(36, LE); + } + + set disable_deblocking_filter_idc(value: StdVideoH264DisableDeblockingFilterIdc) { + this.#view.setUint32(36, Number(value), LE); + } + + get slice_alpha_c0_offset_div2(): number { + return this.#view.getInt8(40); + } + + set slice_alpha_c0_offset_div2(value: number) { + this.#view.setInt8(40, Number(value)); + } + + get slice_beta_offset_div2(): number { + return this.#view.getInt8(41); + } + + set slice_beta_offset_div2(value: number) { + this.#view.setInt8(41, Number(value)); + } + + get pWeightTable(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pWeightTable(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264SliceHeaderFlags.ts b/api/struct/StdVideoEncodeH264SliceHeaderFlags.ts new file mode 100644 index 0000000..13af7a1 --- /dev/null +++ b/api/struct/StdVideoEncodeH264SliceHeaderFlags.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH264SliceHeaderFlags { + direct_spatial_mv_pred_flag?: number; + num_ref_idx_active_override_flag?: number; + no_output_of_prior_pics_flag?: number; + adaptive_ref_pic_marking_mode_flag?: number; + no_prior_references_available_flag?: number; +} + +export class StdVideoEncodeH264SliceHeaderFlags implements BaseStruct { + static size = 20; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264SliceHeaderFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264SliceHeaderFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264SliceHeaderFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264SliceHeaderFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264SliceHeaderFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.direct_spatial_mv_pred_flag !== undefined) this.direct_spatial_mv_pred_flag = data.direct_spatial_mv_pred_flag; + if (data.num_ref_idx_active_override_flag !== undefined) this.num_ref_idx_active_override_flag = data.num_ref_idx_active_override_flag; + if (data.no_output_of_prior_pics_flag !== undefined) this.no_output_of_prior_pics_flag = data.no_output_of_prior_pics_flag; + if (data.adaptive_ref_pic_marking_mode_flag !== undefined) this.adaptive_ref_pic_marking_mode_flag = data.adaptive_ref_pic_marking_mode_flag; + if (data.no_prior_references_available_flag !== undefined) this.no_prior_references_available_flag = data.no_prior_references_available_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264SliceHeaderFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get direct_spatial_mv_pred_flag(): number { + return this.#view.getUint32(0, LE); + } + + set direct_spatial_mv_pred_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get num_ref_idx_active_override_flag(): number { + return this.#view.getUint32(4, LE); + } + + set num_ref_idx_active_override_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get no_output_of_prior_pics_flag(): number { + return this.#view.getUint32(8, LE); + } + + set no_output_of_prior_pics_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get adaptive_ref_pic_marking_mode_flag(): number { + return this.#view.getUint32(12, LE); + } + + set adaptive_ref_pic_marking_mode_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get no_prior_references_available_flag(): number { + return this.#view.getUint32(16, LE); + } + + set no_prior_references_available_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264WeightTable.ts b/api/struct/StdVideoEncodeH264WeightTable.ts new file mode 100644 index 0000000..1a73154 --- /dev/null +++ b/api/struct/StdVideoEncodeH264WeightTable.ts @@ -0,0 +1,163 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH264WeightTableFlags} from "./StdVideoEncodeH264WeightTableFlags.ts"; + +export interface InitStdVideoEncodeH264WeightTable { + flags?: StdVideoEncodeH264WeightTableFlags; + luma_log2_weight_denom?: number; + chroma_log2_weight_denom?: number; + luma_weight_l0?: Int8Array; + luma_offset_l0?: Int8Array; + chroma_weight_l0?: Int8Array; + chroma_offset_l0?: Int8Array; + luma_weight_l1?: Int8Array; + luma_offset_l1?: Int8Array; + chroma_weight_l1?: Int8Array; + chroma_offset_l1?: Int8Array; +} + +export class StdVideoEncodeH264WeightTable implements BaseStruct { + static size = 404; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264WeightTable); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264WeightTable) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264WeightTable.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264WeightTable.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264WeightTable.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.luma_log2_weight_denom !== undefined) this.luma_log2_weight_denom = data.luma_log2_weight_denom; + if (data.chroma_log2_weight_denom !== undefined) this.chroma_log2_weight_denom = data.chroma_log2_weight_denom; + if (data.luma_weight_l0 !== undefined) this.luma_weight_l0 = data.luma_weight_l0; + if (data.luma_offset_l0 !== undefined) this.luma_offset_l0 = data.luma_offset_l0; + if (data.chroma_weight_l0 !== undefined) this.chroma_weight_l0 = data.chroma_weight_l0; + if (data.chroma_offset_l0 !== undefined) this.chroma_offset_l0 = data.chroma_offset_l0; + if (data.luma_weight_l1 !== undefined) this.luma_weight_l1 = data.luma_weight_l1; + if (data.luma_offset_l1 !== undefined) this.luma_offset_l1 = data.luma_offset_l1; + if (data.chroma_weight_l1 !== undefined) this.chroma_weight_l1 = data.chroma_weight_l1; + if (data.chroma_offset_l1 !== undefined) this.chroma_offset_l1 = data.chroma_offset_l1; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264WeightTable.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH264WeightTableFlags { + return new StdVideoEncodeH264WeightTableFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264WeightTableFlags.size)); + } + + set flags(value: StdVideoEncodeH264WeightTableFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH264WeightTableFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get luma_log2_weight_denom(): number { + return this.#view.getUint8(16); + } + + set luma_log2_weight_denom(value: number) { + this.#view.setUint8(16, Number(value)); + } + + get chroma_log2_weight_denom(): number { + return this.#view.getUint8(17); + } + + set chroma_log2_weight_denom(value: number) { + this.#view.setUint8(17, Number(value)); + } + + get luma_weight_l0(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 18, 32); + } + + set luma_weight_l0(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 18); + } + + get luma_offset_l0(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 50, 32); + } + + set luma_offset_l0(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 50); + } + + get chroma_weight_l0(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 82, 64); + } + + set chroma_weight_l0(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 82); + } + + get chroma_offset_l0(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 146, 64); + } + + set chroma_offset_l0(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 146); + } + + get luma_weight_l1(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 210, 32); + } + + set luma_weight_l1(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 210); + } + + get luma_offset_l1(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 242, 32); + } + + set luma_offset_l1(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 242); + } + + get chroma_weight_l1(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 274, 64); + } + + set chroma_weight_l1(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 274); + } + + get chroma_offset_l1(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 338, 64); + } + + set chroma_offset_l1(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 338); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH264WeightTableFlags.ts b/api/struct/StdVideoEncodeH264WeightTableFlags.ts new file mode 100644 index 0000000..681c735 --- /dev/null +++ b/api/struct/StdVideoEncodeH264WeightTableFlags.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH264WeightTableFlags { + luma_weight_l0_flag?: number; + chroma_weight_l0_flag?: number; + luma_weight_l1_flag?: number; + chroma_weight_l1_flag?: number; +} + +export class StdVideoEncodeH264WeightTableFlags implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH264WeightTableFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264WeightTableFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH264WeightTableFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH264WeightTableFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH264WeightTableFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.luma_weight_l0_flag !== undefined) this.luma_weight_l0_flag = data.luma_weight_l0_flag; + if (data.chroma_weight_l0_flag !== undefined) this.chroma_weight_l0_flag = data.chroma_weight_l0_flag; + if (data.luma_weight_l1_flag !== undefined) this.luma_weight_l1_flag = data.luma_weight_l1_flag; + if (data.chroma_weight_l1_flag !== undefined) this.chroma_weight_l1_flag = data.chroma_weight_l1_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264WeightTableFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get luma_weight_l0_flag(): number { + return this.#view.getUint32(0, LE); + } + + set luma_weight_l0_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get chroma_weight_l0_flag(): number { + return this.#view.getUint32(4, LE); + } + + set chroma_weight_l0_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get luma_weight_l1_flag(): number { + return this.#view.getUint32(8, LE); + } + + set luma_weight_l1_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get chroma_weight_l1_flag(): number { + return this.#view.getUint32(12, LE); + } + + set chroma_weight_l1_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265PictureInfo.ts b/api/struct/StdVideoEncodeH265PictureInfo.ts new file mode 100644 index 0000000..2c22873 --- /dev/null +++ b/api/struct/StdVideoEncodeH265PictureInfo.ts @@ -0,0 +1,124 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH265PictureInfoFlags} from "./StdVideoEncodeH265PictureInfoFlags.ts"; +import { StdVideoH265PictureType } from "../enum.ts"; + +export interface InitStdVideoEncodeH265PictureInfo { + flags?: StdVideoEncodeH265PictureInfoFlags; + PictureType?: StdVideoH265PictureType; + sps_video_parameter_set_id?: number; + pps_seq_parameter_set_id?: number; + pps_pic_parameter_set_id?: number; + PicOrderCntVal?: number; + TemporalId?: number; +} + +export class StdVideoEncodeH265PictureInfo implements BaseStruct { + static size = 36; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265PictureInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265PictureInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265PictureInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265PictureInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265PictureInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.PictureType !== undefined) this.PictureType = data.PictureType; + if (data.sps_video_parameter_set_id !== undefined) this.sps_video_parameter_set_id = data.sps_video_parameter_set_id; + if (data.pps_seq_parameter_set_id !== undefined) this.pps_seq_parameter_set_id = data.pps_seq_parameter_set_id; + if (data.pps_pic_parameter_set_id !== undefined) this.pps_pic_parameter_set_id = data.pps_pic_parameter_set_id; + if (data.PicOrderCntVal !== undefined) this.PicOrderCntVal = data.PicOrderCntVal; + if (data.TemporalId !== undefined) this.TemporalId = data.TemporalId; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265PictureInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH265PictureInfoFlags { + return new StdVideoEncodeH265PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265PictureInfoFlags.size)); + } + + set flags(value: StdVideoEncodeH265PictureInfoFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH265PictureInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get PictureType(): number { + return this.#view.getUint32(20, LE); + } + + set PictureType(value: StdVideoH265PictureType) { + this.#view.setUint32(20, Number(value), LE); + } + + get sps_video_parameter_set_id(): number { + return this.#view.getUint8(24); + } + + set sps_video_parameter_set_id(value: number) { + this.#view.setUint8(24, Number(value)); + } + + get pps_seq_parameter_set_id(): number { + return this.#view.getUint8(25); + } + + set pps_seq_parameter_set_id(value: number) { + this.#view.setUint8(25, Number(value)); + } + + get pps_pic_parameter_set_id(): number { + return this.#view.getUint8(26); + } + + set pps_pic_parameter_set_id(value: number) { + this.#view.setUint8(26, Number(value)); + } + + get PicOrderCntVal(): number { + return this.#view.getInt32(28, LE); + } + + set PicOrderCntVal(value: number) { + this.#view.setInt32(28, Number(value), LE); + } + + get TemporalId(): number { + return this.#view.getUint8(32); + } + + set TemporalId(value: number) { + this.#view.setUint8(32, Number(value)); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265PictureInfoFlags.ts b/api/struct/StdVideoEncodeH265PictureInfoFlags.ts new file mode 100644 index 0000000..8968580 --- /dev/null +++ b/api/struct/StdVideoEncodeH265PictureInfoFlags.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH265PictureInfoFlags { + is_reference_flag?: number; + IrapPicFlag?: number; + long_term_flag?: number; + discardable_flag?: number; + cross_layer_bla_flag?: number; +} + +export class StdVideoEncodeH265PictureInfoFlags implements BaseStruct { + static size = 20; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265PictureInfoFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265PictureInfoFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265PictureInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265PictureInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265PictureInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.is_reference_flag !== undefined) this.is_reference_flag = data.is_reference_flag; + if (data.IrapPicFlag !== undefined) this.IrapPicFlag = data.IrapPicFlag; + if (data.long_term_flag !== undefined) this.long_term_flag = data.long_term_flag; + if (data.discardable_flag !== undefined) this.discardable_flag = data.discardable_flag; + if (data.cross_layer_bla_flag !== undefined) this.cross_layer_bla_flag = data.cross_layer_bla_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265PictureInfoFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get is_reference_flag(): number { + return this.#view.getUint32(0, LE); + } + + set is_reference_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get IrapPicFlag(): number { + return this.#view.getUint32(4, LE); + } + + set IrapPicFlag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get long_term_flag(): number { + return this.#view.getUint32(8, LE); + } + + set long_term_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get discardable_flag(): number { + return this.#view.getUint32(12, LE); + } + + set discardable_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get cross_layer_bla_flag(): number { + return this.#view.getUint32(16, LE); + } + + set cross_layer_bla_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265ReferenceInfo.ts b/api/struct/StdVideoEncodeH265ReferenceInfo.ts new file mode 100644 index 0000000..a0807d8 --- /dev/null +++ b/api/struct/StdVideoEncodeH265ReferenceInfo.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH265ReferenceInfoFlags} from "./StdVideoEncodeH265ReferenceInfoFlags.ts"; + +export interface InitStdVideoEncodeH265ReferenceInfo { + flags?: StdVideoEncodeH265ReferenceInfoFlags; + PicOrderCntVal?: number; + TemporalId?: number; +} + +export class StdVideoEncodeH265ReferenceInfo implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265ReferenceInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265ReferenceInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265ReferenceInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.PicOrderCntVal !== undefined) this.PicOrderCntVal = data.PicOrderCntVal; + if (data.TemporalId !== undefined) this.TemporalId = data.TemporalId; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH265ReferenceInfoFlags { + return new StdVideoEncodeH265ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265ReferenceInfoFlags.size)); + } + + set flags(value: StdVideoEncodeH265ReferenceInfoFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH265ReferenceInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get PicOrderCntVal(): number { + return this.#view.getInt32(8, LE); + } + + set PicOrderCntVal(value: number) { + this.#view.setInt32(8, Number(value), LE); + } + + get TemporalId(): number { + return this.#view.getUint8(12); + } + + set TemporalId(value: number) { + this.#view.setUint8(12, Number(value)); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265ReferenceInfoFlags.ts b/api/struct/StdVideoEncodeH265ReferenceInfoFlags.ts new file mode 100644 index 0000000..0ca82c6 --- /dev/null +++ b/api/struct/StdVideoEncodeH265ReferenceInfoFlags.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH265ReferenceInfoFlags { + used_for_long_term_reference?: number; + unused_for_reference?: number; +} + +export class StdVideoEncodeH265ReferenceInfoFlags implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265ReferenceInfoFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265ReferenceInfoFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265ReferenceInfoFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfoFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; + if (data.unused_for_reference !== undefined) this.unused_for_reference = data.unused_for_reference; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceInfoFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get used_for_long_term_reference(): number { + return this.#view.getUint32(0, LE); + } + + set used_for_long_term_reference(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get unused_for_reference(): number { + return this.#view.getUint32(4, LE); + } + + set unused_for_reference(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265ReferenceModificationFlags.ts b/api/struct/StdVideoEncodeH265ReferenceModificationFlags.ts new file mode 100644 index 0000000..f76faa2 --- /dev/null +++ b/api/struct/StdVideoEncodeH265ReferenceModificationFlags.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH265ReferenceModificationFlags { + ref_pic_list_modification_flag_l0?: number; + ref_pic_list_modification_flag_l1?: number; +} + +export class StdVideoEncodeH265ReferenceModificationFlags implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265ReferenceModificationFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265ReferenceModificationFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModificationFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265ReferenceModificationFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModificationFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.ref_pic_list_modification_flag_l0 !== undefined) this.ref_pic_list_modification_flag_l0 = data.ref_pic_list_modification_flag_l0; + if (data.ref_pic_list_modification_flag_l1 !== undefined) this.ref_pic_list_modification_flag_l1 = data.ref_pic_list_modification_flag_l1; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceModificationFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get ref_pic_list_modification_flag_l0(): number { + return this.#view.getUint32(0, LE); + } + + set ref_pic_list_modification_flag_l0(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get ref_pic_list_modification_flag_l1(): number { + return this.#view.getUint32(4, LE); + } + + set ref_pic_list_modification_flag_l1(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265ReferenceModifications.ts b/api/struct/StdVideoEncodeH265ReferenceModifications.ts new file mode 100644 index 0000000..cf66820 --- /dev/null +++ b/api/struct/StdVideoEncodeH265ReferenceModifications.ts @@ -0,0 +1,103 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH265ReferenceModificationFlags} from "./StdVideoEncodeH265ReferenceModificationFlags.ts"; + +export interface InitStdVideoEncodeH265ReferenceModifications { + flags?: StdVideoEncodeH265ReferenceModificationFlags; + referenceList0ModificationsCount?: number; + pReferenceList0Modifications?: AnyPointer; + referenceList1ModificationsCount?: number; + pReferenceList1Modifications?: AnyPointer; +} + +export class StdVideoEncodeH265ReferenceModifications implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265ReferenceModifications); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265ReferenceModifications) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModifications.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265ReferenceModifications.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModifications.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.referenceList0ModificationsCount !== undefined) this.referenceList0ModificationsCount = data.referenceList0ModificationsCount; + if (data.pReferenceList0Modifications !== undefined) this.pReferenceList0Modifications = data.pReferenceList0Modifications; + if (data.referenceList1ModificationsCount !== undefined) this.referenceList1ModificationsCount = data.referenceList1ModificationsCount; + if (data.pReferenceList1Modifications !== undefined) this.pReferenceList1Modifications = data.pReferenceList1Modifications; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceModifications.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH265ReferenceModificationFlags { + return new StdVideoEncodeH265ReferenceModificationFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265ReferenceModificationFlags.size)); + } + + set flags(value: StdVideoEncodeH265ReferenceModificationFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH265ReferenceModificationFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get referenceList0ModificationsCount(): number { + return this.#view.getUint8(8); + } + + set referenceList0ModificationsCount(value: number) { + this.#view.setUint8(8, Number(value)); + } + + get pReferenceList0Modifications(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pReferenceList0Modifications(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get referenceList1ModificationsCount(): number { + return this.#view.getUint8(24); + } + + set referenceList1ModificationsCount(value: number) { + this.#view.setUint8(24, Number(value)); + } + + get pReferenceList1Modifications(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pReferenceList1Modifications(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265SliceSegmentHeader.ts b/api/struct/StdVideoEncodeH265SliceSegmentHeader.ts new file mode 100644 index 0000000..5813926 --- /dev/null +++ b/api/struct/StdVideoEncodeH265SliceSegmentHeader.ts @@ -0,0 +1,237 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH265SliceSegmentHeaderFlags} from "./StdVideoEncodeH265SliceSegmentHeaderFlags.ts"; +import {StdVideoH265ShortTermRefPicSet} from "./StdVideoH265ShortTermRefPicSet.ts"; +import {StdVideoEncodeH265SliceSegmentLongTermRefPics} from "./StdVideoEncodeH265SliceSegmentLongTermRefPics.ts"; +import {StdVideoEncodeH265WeightTable} from "./StdVideoEncodeH265WeightTable.ts"; +import { StdVideoH265SliceType } from "../enum.ts"; + +export interface InitStdVideoEncodeH265SliceSegmentHeader { + flags?: StdVideoEncodeH265SliceSegmentHeaderFlags; + slice_type?: StdVideoH265SliceType; + slice_segment_address?: number; + short_term_ref_pic_set_idx?: number; + collocated_ref_idx?: number; + num_ref_idx_l0_active_minus1?: number; + num_ref_idx_l1_active_minus1?: number; + MaxNumMergeCand?: number; + slice_cb_qp_offset?: number; + slice_cr_qp_offset?: number; + slice_beta_offset_div2?: number; + slice_tc_offset_div2?: number; + slice_act_y_qp_offset?: number; + slice_act_cb_qp_offset?: number; + slice_act_cr_qp_offset?: number; + pShortTermRefPicSet?: AnyPointer; + pLongTermRefPics?: AnyPointer; + pWeightTable?: AnyPointer; +} + +export class StdVideoEncodeH265SliceSegmentHeader implements BaseStruct { + static size = 112; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265SliceSegmentHeader); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265SliceSegmentHeader) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeader.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265SliceSegmentHeader.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeader.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.slice_type !== undefined) this.slice_type = data.slice_type; + if (data.slice_segment_address !== undefined) this.slice_segment_address = data.slice_segment_address; + if (data.short_term_ref_pic_set_idx !== undefined) this.short_term_ref_pic_set_idx = data.short_term_ref_pic_set_idx; + if (data.collocated_ref_idx !== undefined) this.collocated_ref_idx = data.collocated_ref_idx; + if (data.num_ref_idx_l0_active_minus1 !== undefined) this.num_ref_idx_l0_active_minus1 = data.num_ref_idx_l0_active_minus1; + if (data.num_ref_idx_l1_active_minus1 !== undefined) this.num_ref_idx_l1_active_minus1 = data.num_ref_idx_l1_active_minus1; + if (data.MaxNumMergeCand !== undefined) this.MaxNumMergeCand = data.MaxNumMergeCand; + if (data.slice_cb_qp_offset !== undefined) this.slice_cb_qp_offset = data.slice_cb_qp_offset; + if (data.slice_cr_qp_offset !== undefined) this.slice_cr_qp_offset = data.slice_cr_qp_offset; + if (data.slice_beta_offset_div2 !== undefined) this.slice_beta_offset_div2 = data.slice_beta_offset_div2; + if (data.slice_tc_offset_div2 !== undefined) this.slice_tc_offset_div2 = data.slice_tc_offset_div2; + if (data.slice_act_y_qp_offset !== undefined) this.slice_act_y_qp_offset = data.slice_act_y_qp_offset; + if (data.slice_act_cb_qp_offset !== undefined) this.slice_act_cb_qp_offset = data.slice_act_cb_qp_offset; + if (data.slice_act_cr_qp_offset !== undefined) this.slice_act_cr_qp_offset = data.slice_act_cr_qp_offset; + if (data.pShortTermRefPicSet !== undefined) this.pShortTermRefPicSet = data.pShortTermRefPicSet; + if (data.pLongTermRefPics !== undefined) this.pLongTermRefPics = data.pLongTermRefPics; + if (data.pWeightTable !== undefined) this.pWeightTable = data.pWeightTable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265SliceSegmentHeader.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH265SliceSegmentHeaderFlags { + return new StdVideoEncodeH265SliceSegmentHeaderFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265SliceSegmentHeaderFlags.size)); + } + + set flags(value: StdVideoEncodeH265SliceSegmentHeaderFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH265SliceSegmentHeaderFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get slice_type(): number { + return this.#view.getUint32(64, LE); + } + + set slice_type(value: StdVideoH265SliceType) { + this.#view.setUint32(64, Number(value), LE); + } + + get slice_segment_address(): number { + return this.#view.getUint32(68, LE); + } + + set slice_segment_address(value: number) { + this.#view.setUint32(68, Number(value), LE); + } + + get short_term_ref_pic_set_idx(): number { + return this.#view.getUint8(72); + } + + set short_term_ref_pic_set_idx(value: number) { + this.#view.setUint8(72, Number(value)); + } + + get collocated_ref_idx(): number { + return this.#view.getUint8(73); + } + + set collocated_ref_idx(value: number) { + this.#view.setUint8(73, Number(value)); + } + + get num_ref_idx_l0_active_minus1(): number { + return this.#view.getUint8(74); + } + + set num_ref_idx_l0_active_minus1(value: number) { + this.#view.setUint8(74, Number(value)); + } + + get num_ref_idx_l1_active_minus1(): number { + return this.#view.getUint8(75); + } + + set num_ref_idx_l1_active_minus1(value: number) { + this.#view.setUint8(75, Number(value)); + } + + get MaxNumMergeCand(): number { + return this.#view.getUint8(76); + } + + set MaxNumMergeCand(value: number) { + this.#view.setUint8(76, Number(value)); + } + + get slice_cb_qp_offset(): number { + return this.#view.getInt8(77); + } + + set slice_cb_qp_offset(value: number) { + this.#view.setInt8(77, Number(value)); + } + + get slice_cr_qp_offset(): number { + return this.#view.getInt8(78); + } + + set slice_cr_qp_offset(value: number) { + this.#view.setInt8(78, Number(value)); + } + + get slice_beta_offset_div2(): number { + return this.#view.getInt8(79); + } + + set slice_beta_offset_div2(value: number) { + this.#view.setInt8(79, Number(value)); + } + + get slice_tc_offset_div2(): number { + return this.#view.getInt8(80); + } + + set slice_tc_offset_div2(value: number) { + this.#view.setInt8(80, Number(value)); + } + + get slice_act_y_qp_offset(): number { + return this.#view.getInt8(81); + } + + set slice_act_y_qp_offset(value: number) { + this.#view.setInt8(81, Number(value)); + } + + get slice_act_cb_qp_offset(): number { + return this.#view.getInt8(82); + } + + set slice_act_cb_qp_offset(value: number) { + this.#view.setInt8(82, Number(value)); + } + + get slice_act_cr_qp_offset(): number { + return this.#view.getInt8(83); + } + + set slice_act_cr_qp_offset(value: number) { + this.#view.setInt8(83, Number(value)); + } + + get pShortTermRefPicSet(): Deno.PointerValue { + return pointerFromView(this.#view, 88, LE); + } + + set pShortTermRefPicSet(value: AnyPointer) { + this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); + } + + get pLongTermRefPics(): Deno.PointerValue { + return pointerFromView(this.#view, 96, LE); + } + + set pLongTermRefPics(value: AnyPointer) { + this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); + } + + get pWeightTable(): Deno.PointerValue { + return pointerFromView(this.#view, 104, LE); + } + + set pWeightTable(value: AnyPointer) { + this.#view.setBigUint64(104, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265SliceSegmentHeaderFlags.ts b/api/struct/StdVideoEncodeH265SliceSegmentHeaderFlags.ts new file mode 100644 index 0000000..eadd616 --- /dev/null +++ b/api/struct/StdVideoEncodeH265SliceSegmentHeaderFlags.ts @@ -0,0 +1,209 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH265SliceSegmentHeaderFlags { + first_slice_segment_in_pic_flag?: number; + no_output_of_prior_pics_flag?: number; + dependent_slice_segment_flag?: number; + pic_output_flag?: number; + short_term_ref_pic_set_sps_flag?: number; + slice_temporal_mvp_enable_flag?: number; + slice_sao_luma_flag?: number; + slice_sao_chroma_flag?: number; + num_ref_idx_active_override_flag?: number; + mvd_l1_zero_flag?: number; + cabac_init_flag?: number; + cu_chroma_qp_offset_enabled_flag?: number; + deblocking_filter_override_flag?: number; + slice_deblocking_filter_disabled_flag?: number; + collocated_from_l0_flag?: number; + slice_loop_filter_across_slices_enabled_flag?: number; +} + +export class StdVideoEncodeH265SliceSegmentHeaderFlags implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265SliceSegmentHeaderFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265SliceSegmentHeaderFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeaderFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265SliceSegmentHeaderFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeaderFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.first_slice_segment_in_pic_flag !== undefined) this.first_slice_segment_in_pic_flag = data.first_slice_segment_in_pic_flag; + if (data.no_output_of_prior_pics_flag !== undefined) this.no_output_of_prior_pics_flag = data.no_output_of_prior_pics_flag; + if (data.dependent_slice_segment_flag !== undefined) this.dependent_slice_segment_flag = data.dependent_slice_segment_flag; + if (data.pic_output_flag !== undefined) this.pic_output_flag = data.pic_output_flag; + if (data.short_term_ref_pic_set_sps_flag !== undefined) this.short_term_ref_pic_set_sps_flag = data.short_term_ref_pic_set_sps_flag; + if (data.slice_temporal_mvp_enable_flag !== undefined) this.slice_temporal_mvp_enable_flag = data.slice_temporal_mvp_enable_flag; + if (data.slice_sao_luma_flag !== undefined) this.slice_sao_luma_flag = data.slice_sao_luma_flag; + if (data.slice_sao_chroma_flag !== undefined) this.slice_sao_chroma_flag = data.slice_sao_chroma_flag; + if (data.num_ref_idx_active_override_flag !== undefined) this.num_ref_idx_active_override_flag = data.num_ref_idx_active_override_flag; + if (data.mvd_l1_zero_flag !== undefined) this.mvd_l1_zero_flag = data.mvd_l1_zero_flag; + if (data.cabac_init_flag !== undefined) this.cabac_init_flag = data.cabac_init_flag; + if (data.cu_chroma_qp_offset_enabled_flag !== undefined) this.cu_chroma_qp_offset_enabled_flag = data.cu_chroma_qp_offset_enabled_flag; + if (data.deblocking_filter_override_flag !== undefined) this.deblocking_filter_override_flag = data.deblocking_filter_override_flag; + if (data.slice_deblocking_filter_disabled_flag !== undefined) this.slice_deblocking_filter_disabled_flag = data.slice_deblocking_filter_disabled_flag; + if (data.collocated_from_l0_flag !== undefined) this.collocated_from_l0_flag = data.collocated_from_l0_flag; + if (data.slice_loop_filter_across_slices_enabled_flag !== undefined) this.slice_loop_filter_across_slices_enabled_flag = data.slice_loop_filter_across_slices_enabled_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265SliceSegmentHeaderFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get first_slice_segment_in_pic_flag(): number { + return this.#view.getUint32(0, LE); + } + + set first_slice_segment_in_pic_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get no_output_of_prior_pics_flag(): number { + return this.#view.getUint32(4, LE); + } + + set no_output_of_prior_pics_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get dependent_slice_segment_flag(): number { + return this.#view.getUint32(8, LE); + } + + set dependent_slice_segment_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get pic_output_flag(): number { + return this.#view.getUint32(12, LE); + } + + set pic_output_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get short_term_ref_pic_set_sps_flag(): number { + return this.#view.getUint32(16, LE); + } + + set short_term_ref_pic_set_sps_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get slice_temporal_mvp_enable_flag(): number { + return this.#view.getUint32(20, LE); + } + + set slice_temporal_mvp_enable_flag(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get slice_sao_luma_flag(): number { + return this.#view.getUint32(24, LE); + } + + set slice_sao_luma_flag(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get slice_sao_chroma_flag(): number { + return this.#view.getUint32(28, LE); + } + + set slice_sao_chroma_flag(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get num_ref_idx_active_override_flag(): number { + return this.#view.getUint32(32, LE); + } + + set num_ref_idx_active_override_flag(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get mvd_l1_zero_flag(): number { + return this.#view.getUint32(36, LE); + } + + set mvd_l1_zero_flag(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get cabac_init_flag(): number { + return this.#view.getUint32(40, LE); + } + + set cabac_init_flag(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get cu_chroma_qp_offset_enabled_flag(): number { + return this.#view.getUint32(44, LE); + } + + set cu_chroma_qp_offset_enabled_flag(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get deblocking_filter_override_flag(): number { + return this.#view.getUint32(48, LE); + } + + set deblocking_filter_override_flag(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get slice_deblocking_filter_disabled_flag(): number { + return this.#view.getUint32(52, LE); + } + + set slice_deblocking_filter_disabled_flag(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get collocated_from_l0_flag(): number { + return this.#view.getUint32(56, LE); + } + + set collocated_from_l0_flag(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get slice_loop_filter_across_slices_enabled_flag(): number { + return this.#view.getUint32(60, LE); + } + + set slice_loop_filter_across_slices_enabled_flag(value: number) { + this.#view.setUint32(60, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265SliceSegmentLongTermRefPics.ts b/api/struct/StdVideoEncodeH265SliceSegmentLongTermRefPics.ts new file mode 100644 index 0000000..8d3fdc1 --- /dev/null +++ b/api/struct/StdVideoEncodeH265SliceSegmentLongTermRefPics.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH265SliceSegmentLongTermRefPics { + num_long_term_sps?: number; + num_long_term_pics?: number; + lt_idx_sps?: Uint8Array; + poc_lsb_lt?: Uint8Array; + used_by_curr_pic_lt_flag?: number; + delta_poc_msb_present_flag?: Uint8Array; + delta_poc_msb_cycle_lt?: Uint8Array; +} + +export class StdVideoEncodeH265SliceSegmentLongTermRefPics implements BaseStruct { + static size = 148; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265SliceSegmentLongTermRefPics); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265SliceSegmentLongTermRefPics) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentLongTermRefPics.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265SliceSegmentLongTermRefPics.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentLongTermRefPics.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.num_long_term_sps !== undefined) this.num_long_term_sps = data.num_long_term_sps; + if (data.num_long_term_pics !== undefined) this.num_long_term_pics = data.num_long_term_pics; + if (data.lt_idx_sps !== undefined) this.lt_idx_sps = data.lt_idx_sps; + if (data.poc_lsb_lt !== undefined) this.poc_lsb_lt = data.poc_lsb_lt; + if (data.used_by_curr_pic_lt_flag !== undefined) this.used_by_curr_pic_lt_flag = data.used_by_curr_pic_lt_flag; + if (data.delta_poc_msb_present_flag !== undefined) this.delta_poc_msb_present_flag = data.delta_poc_msb_present_flag; + if (data.delta_poc_msb_cycle_lt !== undefined) this.delta_poc_msb_cycle_lt = data.delta_poc_msb_cycle_lt; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265SliceSegmentLongTermRefPics.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get num_long_term_sps(): number { + return this.#view.getUint8(0); + } + + set num_long_term_sps(value: number) { + this.#view.setUint8(0, Number(value)); + } + + get num_long_term_pics(): number { + return this.#view.getUint8(1); + } + + set num_long_term_pics(value: number) { + this.#view.setUint8(1, Number(value)); + } + + get lt_idx_sps(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 2, 32); + } + + set lt_idx_sps(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 2); + } + + get poc_lsb_lt(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 34, 16); + } + + set poc_lsb_lt(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 34); + } + + get used_by_curr_pic_lt_flag(): number { + return this.#view.getUint16(50, LE); + } + + set used_by_curr_pic_lt_flag(value: number) { + this.#view.setUint16(50, Number(value), LE); + } + + get delta_poc_msb_present_flag(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 52, 48); + } + + set delta_poc_msb_present_flag(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 52); + } + + get delta_poc_msb_cycle_lt(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 100, 48); + } + + set delta_poc_msb_cycle_lt(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 100); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265WeightTable.ts b/api/struct/StdVideoEncodeH265WeightTable.ts new file mode 100644 index 0000000..7834d56 --- /dev/null +++ b/api/struct/StdVideoEncodeH265WeightTable.ts @@ -0,0 +1,163 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH265WeightTableFlags} from "./StdVideoEncodeH265WeightTableFlags.ts"; + +export interface InitStdVideoEncodeH265WeightTable { + flags?: StdVideoEncodeH265WeightTableFlags; + luma_log2_weight_denom?: number; + delta_chroma_log2_weight_denom?: number; + delta_luma_weight_l0?: Int8Array; + luma_offset_l0?: Int8Array; + delta_chroma_weight_l0?: Int8Array; + delta_chroma_offset_l0?: Int8Array; + delta_luma_weight_l1?: Int8Array; + luma_offset_l1?: Int8Array; + delta_chroma_weight_l1?: Int8Array; + delta_chroma_offset_l1?: Int8Array; +} + +export class StdVideoEncodeH265WeightTable implements BaseStruct { + static size = 190; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265WeightTable); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265WeightTable) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265WeightTable.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265WeightTable.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265WeightTable.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.luma_log2_weight_denom !== undefined) this.luma_log2_weight_denom = data.luma_log2_weight_denom; + if (data.delta_chroma_log2_weight_denom !== undefined) this.delta_chroma_log2_weight_denom = data.delta_chroma_log2_weight_denom; + if (data.delta_luma_weight_l0 !== undefined) this.delta_luma_weight_l0 = data.delta_luma_weight_l0; + if (data.luma_offset_l0 !== undefined) this.luma_offset_l0 = data.luma_offset_l0; + if (data.delta_chroma_weight_l0 !== undefined) this.delta_chroma_weight_l0 = data.delta_chroma_weight_l0; + if (data.delta_chroma_offset_l0 !== undefined) this.delta_chroma_offset_l0 = data.delta_chroma_offset_l0; + if (data.delta_luma_weight_l1 !== undefined) this.delta_luma_weight_l1 = data.delta_luma_weight_l1; + if (data.luma_offset_l1 !== undefined) this.luma_offset_l1 = data.luma_offset_l1; + if (data.delta_chroma_weight_l1 !== undefined) this.delta_chroma_weight_l1 = data.delta_chroma_weight_l1; + if (data.delta_chroma_offset_l1 !== undefined) this.delta_chroma_offset_l1 = data.delta_chroma_offset_l1; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265WeightTable.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoEncodeH265WeightTableFlags { + return new StdVideoEncodeH265WeightTableFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265WeightTableFlags.size)); + } + + set flags(value: StdVideoEncodeH265WeightTableFlags) { + if (value[BUFFER].byteLength < StdVideoEncodeH265WeightTableFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get luma_log2_weight_denom(): number { + return this.#view.getUint8(8); + } + + set luma_log2_weight_denom(value: number) { + this.#view.setUint8(8, Number(value)); + } + + get delta_chroma_log2_weight_denom(): number { + return this.#view.getInt8(9); + } + + set delta_chroma_log2_weight_denom(value: number) { + this.#view.setInt8(9, Number(value)); + } + + get delta_luma_weight_l0(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 10, 15); + } + + set delta_luma_weight_l0(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 10); + } + + get luma_offset_l0(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 25, 15); + } + + set luma_offset_l0(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 25); + } + + get delta_chroma_weight_l0(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 40, 30); + } + + set delta_chroma_weight_l0(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 40); + } + + get delta_chroma_offset_l0(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 70, 30); + } + + set delta_chroma_offset_l0(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 70); + } + + get delta_luma_weight_l1(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 100, 15); + } + + set delta_luma_weight_l1(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 100); + } + + get luma_offset_l1(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 115, 15); + } + + set luma_offset_l1(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 115); + } + + get delta_chroma_weight_l1(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 130, 30); + } + + set delta_chroma_weight_l1(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 130); + } + + get delta_chroma_offset_l1(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 160, 30); + } + + set delta_chroma_offset_l1(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 160); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoEncodeH265WeightTableFlags.ts b/api/struct/StdVideoEncodeH265WeightTableFlags.ts new file mode 100644 index 0000000..2dcad5e --- /dev/null +++ b/api/struct/StdVideoEncodeH265WeightTableFlags.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoEncodeH265WeightTableFlags { + luma_weight_l0_flag?: number; + chroma_weight_l0_flag?: number; + luma_weight_l1_flag?: number; + chroma_weight_l1_flag?: number; +} + +export class StdVideoEncodeH265WeightTableFlags implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoEncodeH265WeightTableFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265WeightTableFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoEncodeH265WeightTableFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoEncodeH265WeightTableFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoEncodeH265WeightTableFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.luma_weight_l0_flag !== undefined) this.luma_weight_l0_flag = data.luma_weight_l0_flag; + if (data.chroma_weight_l0_flag !== undefined) this.chroma_weight_l0_flag = data.chroma_weight_l0_flag; + if (data.luma_weight_l1_flag !== undefined) this.luma_weight_l1_flag = data.luma_weight_l1_flag; + if (data.chroma_weight_l1_flag !== undefined) this.chroma_weight_l1_flag = data.chroma_weight_l1_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265WeightTableFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get luma_weight_l0_flag(): number { + return this.#view.getUint16(0, LE); + } + + set luma_weight_l0_flag(value: number) { + this.#view.setUint16(0, Number(value), LE); + } + + get chroma_weight_l0_flag(): number { + return this.#view.getUint16(2, LE); + } + + set chroma_weight_l0_flag(value: number) { + this.#view.setUint16(2, Number(value), LE); + } + + get luma_weight_l1_flag(): number { + return this.#view.getUint16(4, LE); + } + + set luma_weight_l1_flag(value: number) { + this.#view.setUint16(4, Number(value), LE); + } + + get chroma_weight_l1_flag(): number { + return this.#view.getUint16(6, LE); + } + + set chroma_weight_l1_flag(value: number) { + this.#view.setUint16(6, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH264HrdParameters.ts b/api/struct/StdVideoH264HrdParameters.ts new file mode 100644 index 0000000..4416493 --- /dev/null +++ b/api/struct/StdVideoH264HrdParameters.ts @@ -0,0 +1,160 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH264HrdParameters { + cpb_cnt_minus1?: number; + bit_rate_scale?: number; + cpb_size_scale?: number; + reserved1?: number; + bit_rate_value_minus1?: Uint32Array; + cpb_size_value_minus1?: Uint32Array; + cbr_flag?: Uint8Array; + initial_cpb_removal_delay_length_minus1?: number; + cpb_removal_delay_length_minus1?: number; + dpb_output_delay_length_minus1?: number; + time_offset_length?: number; +} + +/** hrd_parameters */ +export class StdVideoH264HrdParameters implements BaseStruct { + static size = 308; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH264HrdParameters); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264HrdParameters) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH264HrdParameters.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH264HrdParameters.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH264HrdParameters.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.cpb_cnt_minus1 !== undefined) this.cpb_cnt_minus1 = data.cpb_cnt_minus1; + if (data.bit_rate_scale !== undefined) this.bit_rate_scale = data.bit_rate_scale; + if (data.cpb_size_scale !== undefined) this.cpb_size_scale = data.cpb_size_scale; + if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; + if (data.bit_rate_value_minus1 !== undefined) this.bit_rate_value_minus1 = data.bit_rate_value_minus1; + if (data.cpb_size_value_minus1 !== undefined) this.cpb_size_value_minus1 = data.cpb_size_value_minus1; + if (data.cbr_flag !== undefined) this.cbr_flag = data.cbr_flag; + if (data.initial_cpb_removal_delay_length_minus1 !== undefined) this.initial_cpb_removal_delay_length_minus1 = data.initial_cpb_removal_delay_length_minus1; + if (data.cpb_removal_delay_length_minus1 !== undefined) this.cpb_removal_delay_length_minus1 = data.cpb_removal_delay_length_minus1; + if (data.dpb_output_delay_length_minus1 !== undefined) this.dpb_output_delay_length_minus1 = data.dpb_output_delay_length_minus1; + if (data.time_offset_length !== undefined) this.time_offset_length = data.time_offset_length; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264HrdParameters.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get cpb_cnt_minus1(): number { + return this.#view.getUint8(0); + } + + set cpb_cnt_minus1(value: number) { + this.#view.setUint8(0, Number(value)); + } + + get bit_rate_scale(): number { + return this.#view.getUint8(1); + } + + set bit_rate_scale(value: number) { + this.#view.setUint8(1, Number(value)); + } + + get cpb_size_scale(): number { + return this.#view.getUint8(2); + } + + set cpb_size_scale(value: number) { + this.#view.setUint8(2, Number(value)); + } + + get reserved1(): number { + return this.#view.getUint8(3); + } + + set reserved1(value: number) { + this.#view.setUint8(3, Number(value)); + } + + get bit_rate_value_minus1(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 4, 32); + } + + set bit_rate_value_minus1(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 4); + } + + get cpb_size_value_minus1(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 132, 32); + } + + set cpb_size_value_minus1(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 132); + } + + get cbr_flag(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 260, 32); + } + + set cbr_flag(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 260); + } + + get initial_cpb_removal_delay_length_minus1(): number { + return this.#view.getUint32(292, LE); + } + + set initial_cpb_removal_delay_length_minus1(value: number) { + this.#view.setUint32(292, Number(value), LE); + } + + get cpb_removal_delay_length_minus1(): number { + return this.#view.getUint32(296, LE); + } + + set cpb_removal_delay_length_minus1(value: number) { + this.#view.setUint32(296, Number(value), LE); + } + + get dpb_output_delay_length_minus1(): number { + return this.#view.getUint32(300, LE); + } + + set dpb_output_delay_length_minus1(value: number) { + this.#view.setUint32(300, Number(value), LE); + } + + get time_offset_length(): number { + return this.#view.getUint32(304, LE); + } + + set time_offset_length(value: number) { + this.#view.setUint32(304, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH264PictureParameterSet.ts b/api/struct/StdVideoH264PictureParameterSet.ts new file mode 100644 index 0000000..86aaa62 --- /dev/null +++ b/api/struct/StdVideoH264PictureParameterSet.ts @@ -0,0 +1,165 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH264PpsFlags} from "./StdVideoH264PpsFlags.ts"; +import {StdVideoH264ScalingLists} from "./StdVideoH264ScalingLists.ts"; +import { StdVideoH264WeightedBipredIdc } from "../enum.ts"; + +export interface InitStdVideoH264PictureParameterSet { + flags?: StdVideoH264PpsFlags; + seq_parameter_set_id?: number; + pic_parameter_set_id?: number; + num_ref_idx_l0_default_active_minus1?: number; + num_ref_idx_l1_default_active_minus1?: number; + weighted_bipred_idc?: StdVideoH264WeightedBipredIdc; + pic_init_qp_minus26?: number; + pic_init_qs_minus26?: number; + chroma_qp_index_offset?: number; + second_chroma_qp_index_offset?: number; + pScalingLists?: AnyPointer; +} + +export class StdVideoH264PictureParameterSet implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH264PictureParameterSet); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264PictureParameterSet) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH264PictureParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH264PictureParameterSet.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH264PictureParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.seq_parameter_set_id !== undefined) this.seq_parameter_set_id = data.seq_parameter_set_id; + if (data.pic_parameter_set_id !== undefined) this.pic_parameter_set_id = data.pic_parameter_set_id; + if (data.num_ref_idx_l0_default_active_minus1 !== undefined) this.num_ref_idx_l0_default_active_minus1 = data.num_ref_idx_l0_default_active_minus1; + if (data.num_ref_idx_l1_default_active_minus1 !== undefined) this.num_ref_idx_l1_default_active_minus1 = data.num_ref_idx_l1_default_active_minus1; + if (data.weighted_bipred_idc !== undefined) this.weighted_bipred_idc = data.weighted_bipred_idc; + if (data.pic_init_qp_minus26 !== undefined) this.pic_init_qp_minus26 = data.pic_init_qp_minus26; + if (data.pic_init_qs_minus26 !== undefined) this.pic_init_qs_minus26 = data.pic_init_qs_minus26; + if (data.chroma_qp_index_offset !== undefined) this.chroma_qp_index_offset = data.chroma_qp_index_offset; + if (data.second_chroma_qp_index_offset !== undefined) this.second_chroma_qp_index_offset = data.second_chroma_qp_index_offset; + if (data.pScalingLists !== undefined) this.pScalingLists = data.pScalingLists; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264PictureParameterSet.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH264PpsFlags { + return new StdVideoH264PpsFlags(this.#data.subarray(0, 0 + StdVideoH264PpsFlags.size)); + } + + set flags(value: StdVideoH264PpsFlags) { + if (value[BUFFER].byteLength < StdVideoH264PpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get seq_parameter_set_id(): number { + return this.#view.getUint8(32); + } + + set seq_parameter_set_id(value: number) { + this.#view.setUint8(32, Number(value)); + } + + get pic_parameter_set_id(): number { + return this.#view.getUint8(33); + } + + set pic_parameter_set_id(value: number) { + this.#view.setUint8(33, Number(value)); + } + + get num_ref_idx_l0_default_active_minus1(): number { + return this.#view.getUint8(34); + } + + set num_ref_idx_l0_default_active_minus1(value: number) { + this.#view.setUint8(34, Number(value)); + } + + get num_ref_idx_l1_default_active_minus1(): number { + return this.#view.getUint8(35); + } + + set num_ref_idx_l1_default_active_minus1(value: number) { + this.#view.setUint8(35, Number(value)); + } + + get weighted_bipred_idc(): number { + return this.#view.getUint32(36, LE); + } + + set weighted_bipred_idc(value: StdVideoH264WeightedBipredIdc) { + this.#view.setUint32(36, Number(value), LE); + } + + get pic_init_qp_minus26(): number { + return this.#view.getInt8(40); + } + + set pic_init_qp_minus26(value: number) { + this.#view.setInt8(40, Number(value)); + } + + get pic_init_qs_minus26(): number { + return this.#view.getInt8(41); + } + + set pic_init_qs_minus26(value: number) { + this.#view.setInt8(41, Number(value)); + } + + get chroma_qp_index_offset(): number { + return this.#view.getInt8(42); + } + + set chroma_qp_index_offset(value: number) { + this.#view.setInt8(42, Number(value)); + } + + get second_chroma_qp_index_offset(): number { + return this.#view.getInt8(43); + } + + set second_chroma_qp_index_offset(value: number) { + this.#view.setInt8(43, Number(value)); + } + + get pScalingLists(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pScalingLists(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH264PpsFlags.ts b/api/struct/StdVideoH264PpsFlags.ts new file mode 100644 index 0000000..24f71ca --- /dev/null +++ b/api/struct/StdVideoH264PpsFlags.ts @@ -0,0 +1,129 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH264PpsFlags { + transform_8x8_mode_flag?: number; + redundant_pic_cnt_present_flag?: number; + constrained_intra_pred_flag?: number; + deblocking_filter_control_present_flag?: number; + weighted_pred_flag?: number; + bottom_field_pic_order_in_frame_present_flag?: number; + entropy_coding_mode_flag?: number; + pic_scaling_matrix_present_flag?: number; +} + +export class StdVideoH264PpsFlags implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH264PpsFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264PpsFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH264PpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH264PpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH264PpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.transform_8x8_mode_flag !== undefined) this.transform_8x8_mode_flag = data.transform_8x8_mode_flag; + if (data.redundant_pic_cnt_present_flag !== undefined) this.redundant_pic_cnt_present_flag = data.redundant_pic_cnt_present_flag; + if (data.constrained_intra_pred_flag !== undefined) this.constrained_intra_pred_flag = data.constrained_intra_pred_flag; + if (data.deblocking_filter_control_present_flag !== undefined) this.deblocking_filter_control_present_flag = data.deblocking_filter_control_present_flag; + if (data.weighted_pred_flag !== undefined) this.weighted_pred_flag = data.weighted_pred_flag; + if (data.bottom_field_pic_order_in_frame_present_flag !== undefined) this.bottom_field_pic_order_in_frame_present_flag = data.bottom_field_pic_order_in_frame_present_flag; + if (data.entropy_coding_mode_flag !== undefined) this.entropy_coding_mode_flag = data.entropy_coding_mode_flag; + if (data.pic_scaling_matrix_present_flag !== undefined) this.pic_scaling_matrix_present_flag = data.pic_scaling_matrix_present_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264PpsFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get transform_8x8_mode_flag(): number { + return this.#view.getUint32(0, LE); + } + + set transform_8x8_mode_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get redundant_pic_cnt_present_flag(): number { + return this.#view.getUint32(4, LE); + } + + set redundant_pic_cnt_present_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get constrained_intra_pred_flag(): number { + return this.#view.getUint32(8, LE); + } + + set constrained_intra_pred_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get deblocking_filter_control_present_flag(): number { + return this.#view.getUint32(12, LE); + } + + set deblocking_filter_control_present_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get weighted_pred_flag(): number { + return this.#view.getUint32(16, LE); + } + + set weighted_pred_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get bottom_field_pic_order_in_frame_present_flag(): number { + return this.#view.getUint32(20, LE); + } + + set bottom_field_pic_order_in_frame_present_flag(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get entropy_coding_mode_flag(): number { + return this.#view.getUint32(24, LE); + } + + set entropy_coding_mode_flag(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pic_scaling_matrix_present_flag(): number { + return this.#view.getUint32(28, LE); + } + + set pic_scaling_matrix_present_flag(value: number) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH264ScalingLists.ts b/api/struct/StdVideoH264ScalingLists.ts new file mode 100644 index 0000000..f8f52e2 --- /dev/null +++ b/api/struct/StdVideoH264ScalingLists.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH264ScalingLists { + scaling_list_present_mask?: number; + use_default_scaling_matrix_mask?: number; + ScalingList4x4?: Uint8Array; + ScalingList8x8?: Uint8Array; +} + +export class StdVideoH264ScalingLists implements BaseStruct { + static size = 484; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH264ScalingLists); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264ScalingLists) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH264ScalingLists.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH264ScalingLists.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH264ScalingLists.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.scaling_list_present_mask !== undefined) this.scaling_list_present_mask = data.scaling_list_present_mask; + if (data.use_default_scaling_matrix_mask !== undefined) this.use_default_scaling_matrix_mask = data.use_default_scaling_matrix_mask; + if (data.ScalingList4x4 !== undefined) this.ScalingList4x4 = data.ScalingList4x4; + if (data.ScalingList8x8 !== undefined) this.ScalingList8x8 = data.ScalingList8x8; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264ScalingLists.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get scaling_list_present_mask(): number { + return this.#view.getUint16(0, LE); + } + + set scaling_list_present_mask(value: number) { + this.#view.setUint16(0, Number(value), LE); + } + + get use_default_scaling_matrix_mask(): number { + return this.#view.getUint16(2, LE); + } + + set use_default_scaling_matrix_mask(value: number) { + this.#view.setUint16(2, Number(value), LE); + } + + get ScalingList4x4(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 4, 96); + } + + set ScalingList4x4(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 4); + } + + get ScalingList8x8(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 100, 384); + } + + set ScalingList8x8(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 100); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH264SequenceParameterSet.ts b/api/struct/StdVideoH264SequenceParameterSet.ts new file mode 100644 index 0000000..13f7e46 --- /dev/null +++ b/api/struct/StdVideoH264SequenceParameterSet.ts @@ -0,0 +1,306 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH264SpsFlags} from "./StdVideoH264SpsFlags.ts"; +import {StdVideoH264ScalingLists} from "./StdVideoH264ScalingLists.ts"; +import {StdVideoH264SequenceParameterSetVui} from "./StdVideoH264SequenceParameterSetVui.ts"; +import { StdVideoH264ProfileIdc, StdVideoH264LevelIdc, StdVideoH264ChromaFormatIdc, StdVideoH264PocType } from "../enum.ts"; + +export interface InitStdVideoH264SequenceParameterSet { + flags?: StdVideoH264SpsFlags; + profile_idc?: StdVideoH264ProfileIdc; + level_idc?: StdVideoH264LevelIdc; + chroma_format_idc?: StdVideoH264ChromaFormatIdc; + seq_parameter_set_id?: number; + bit_depth_luma_minus8?: number; + bit_depth_chroma_minus8?: number; + log2_max_frame_num_minus4?: number; + pic_order_cnt_type?: StdVideoH264PocType; + offset_for_non_ref_pic?: number; + offset_for_top_to_bottom_field?: number; + log2_max_pic_order_cnt_lsb_minus4?: number; + num_ref_frames_in_pic_order_cnt_cycle?: number; + max_num_ref_frames?: number; + reserved1?: number; + pic_width_in_mbs_minus1?: number; + pic_height_in_map_units_minus1?: number; + frame_crop_left_offset?: number; + frame_crop_right_offset?: number; + frame_crop_top_offset?: number; + frame_crop_bottom_offset?: number; + reserved2?: number; + pOffsetForRefFrame?: AnyPointer; + pScalingLists?: AnyPointer; + pSequenceParameterSetVui?: AnyPointer; +} + +export class StdVideoH264SequenceParameterSet implements BaseStruct { + static size = 152; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH264SequenceParameterSet); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264SequenceParameterSet) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH264SequenceParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH264SequenceParameterSet.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH264SequenceParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.profile_idc !== undefined) this.profile_idc = data.profile_idc; + if (data.level_idc !== undefined) this.level_idc = data.level_idc; + if (data.chroma_format_idc !== undefined) this.chroma_format_idc = data.chroma_format_idc; + if (data.seq_parameter_set_id !== undefined) this.seq_parameter_set_id = data.seq_parameter_set_id; + if (data.bit_depth_luma_minus8 !== undefined) this.bit_depth_luma_minus8 = data.bit_depth_luma_minus8; + if (data.bit_depth_chroma_minus8 !== undefined) this.bit_depth_chroma_minus8 = data.bit_depth_chroma_minus8; + if (data.log2_max_frame_num_minus4 !== undefined) this.log2_max_frame_num_minus4 = data.log2_max_frame_num_minus4; + if (data.pic_order_cnt_type !== undefined) this.pic_order_cnt_type = data.pic_order_cnt_type; + if (data.offset_for_non_ref_pic !== undefined) this.offset_for_non_ref_pic = data.offset_for_non_ref_pic; + if (data.offset_for_top_to_bottom_field !== undefined) this.offset_for_top_to_bottom_field = data.offset_for_top_to_bottom_field; + if (data.log2_max_pic_order_cnt_lsb_minus4 !== undefined) this.log2_max_pic_order_cnt_lsb_minus4 = data.log2_max_pic_order_cnt_lsb_minus4; + if (data.num_ref_frames_in_pic_order_cnt_cycle !== undefined) this.num_ref_frames_in_pic_order_cnt_cycle = data.num_ref_frames_in_pic_order_cnt_cycle; + if (data.max_num_ref_frames !== undefined) this.max_num_ref_frames = data.max_num_ref_frames; + if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; + if (data.pic_width_in_mbs_minus1 !== undefined) this.pic_width_in_mbs_minus1 = data.pic_width_in_mbs_minus1; + if (data.pic_height_in_map_units_minus1 !== undefined) this.pic_height_in_map_units_minus1 = data.pic_height_in_map_units_minus1; + if (data.frame_crop_left_offset !== undefined) this.frame_crop_left_offset = data.frame_crop_left_offset; + if (data.frame_crop_right_offset !== undefined) this.frame_crop_right_offset = data.frame_crop_right_offset; + if (data.frame_crop_top_offset !== undefined) this.frame_crop_top_offset = data.frame_crop_top_offset; + if (data.frame_crop_bottom_offset !== undefined) this.frame_crop_bottom_offset = data.frame_crop_bottom_offset; + if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; + if (data.pOffsetForRefFrame !== undefined) this.pOffsetForRefFrame = data.pOffsetForRefFrame; + if (data.pScalingLists !== undefined) this.pScalingLists = data.pScalingLists; + if (data.pSequenceParameterSetVui !== undefined) this.pSequenceParameterSetVui = data.pSequenceParameterSetVui; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SequenceParameterSet.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH264SpsFlags { + return new StdVideoH264SpsFlags(this.#data.subarray(0, 0 + StdVideoH264SpsFlags.size)); + } + + set flags(value: StdVideoH264SpsFlags) { + if (value[BUFFER].byteLength < StdVideoH264SpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get profile_idc(): number { + return this.#view.getUint32(64, LE); + } + + set profile_idc(value: StdVideoH264ProfileIdc) { + this.#view.setUint32(64, Number(value), LE); + } + + get level_idc(): number { + return this.#view.getUint32(68, LE); + } + + set level_idc(value: StdVideoH264LevelIdc) { + this.#view.setUint32(68, Number(value), LE); + } + + get chroma_format_idc(): number { + return this.#view.getUint32(72, LE); + } + + set chroma_format_idc(value: StdVideoH264ChromaFormatIdc) { + this.#view.setUint32(72, Number(value), LE); + } + + get seq_parameter_set_id(): number { + return this.#view.getUint8(76); + } + + set seq_parameter_set_id(value: number) { + this.#view.setUint8(76, Number(value)); + } + + get bit_depth_luma_minus8(): number { + return this.#view.getUint8(77); + } + + set bit_depth_luma_minus8(value: number) { + this.#view.setUint8(77, Number(value)); + } + + get bit_depth_chroma_minus8(): number { + return this.#view.getUint8(78); + } + + set bit_depth_chroma_minus8(value: number) { + this.#view.setUint8(78, Number(value)); + } + + get log2_max_frame_num_minus4(): number { + return this.#view.getUint8(79); + } + + set log2_max_frame_num_minus4(value: number) { + this.#view.setUint8(79, Number(value)); + } + + get pic_order_cnt_type(): number { + return this.#view.getUint32(80, LE); + } + + set pic_order_cnt_type(value: StdVideoH264PocType) { + this.#view.setUint32(80, Number(value), LE); + } + + get offset_for_non_ref_pic(): number { + return this.#view.getInt32(84, LE); + } + + set offset_for_non_ref_pic(value: number) { + this.#view.setInt32(84, Number(value), LE); + } + + get offset_for_top_to_bottom_field(): number { + return this.#view.getInt32(88, LE); + } + + set offset_for_top_to_bottom_field(value: number) { + this.#view.setInt32(88, Number(value), LE); + } + + get log2_max_pic_order_cnt_lsb_minus4(): number { + return this.#view.getUint8(92); + } + + set log2_max_pic_order_cnt_lsb_minus4(value: number) { + this.#view.setUint8(92, Number(value)); + } + + get num_ref_frames_in_pic_order_cnt_cycle(): number { + return this.#view.getUint8(93); + } + + set num_ref_frames_in_pic_order_cnt_cycle(value: number) { + this.#view.setUint8(93, Number(value)); + } + + get max_num_ref_frames(): number { + return this.#view.getUint8(94); + } + + set max_num_ref_frames(value: number) { + this.#view.setUint8(94, Number(value)); + } + + get reserved1(): number { + return this.#view.getUint8(95); + } + + set reserved1(value: number) { + this.#view.setUint8(95, Number(value)); + } + + get pic_width_in_mbs_minus1(): number { + return this.#view.getUint32(96, LE); + } + + set pic_width_in_mbs_minus1(value: number) { + this.#view.setUint32(96, Number(value), LE); + } + + get pic_height_in_map_units_minus1(): number { + return this.#view.getUint32(100, LE); + } + + set pic_height_in_map_units_minus1(value: number) { + this.#view.setUint32(100, Number(value), LE); + } + + get frame_crop_left_offset(): number { + return this.#view.getUint32(104, LE); + } + + set frame_crop_left_offset(value: number) { + this.#view.setUint32(104, Number(value), LE); + } + + get frame_crop_right_offset(): number { + return this.#view.getUint32(108, LE); + } + + set frame_crop_right_offset(value: number) { + this.#view.setUint32(108, Number(value), LE); + } + + get frame_crop_top_offset(): number { + return this.#view.getUint32(112, LE); + } + + set frame_crop_top_offset(value: number) { + this.#view.setUint32(112, Number(value), LE); + } + + get frame_crop_bottom_offset(): number { + return this.#view.getUint32(116, LE); + } + + set frame_crop_bottom_offset(value: number) { + this.#view.setUint32(116, Number(value), LE); + } + + get reserved2(): number { + return this.#view.getUint32(120, LE); + } + + set reserved2(value: number) { + this.#view.setUint32(120, Number(value), LE); + } + + get pOffsetForRefFrame(): Deno.PointerValue { + return pointerFromView(this.#view, 128, LE); + } + + set pOffsetForRefFrame(value: AnyPointer) { + this.#view.setBigUint64(128, BigInt(anyPointer(value)), LE); + } + + get pScalingLists(): Deno.PointerValue { + return pointerFromView(this.#view, 136, LE); + } + + set pScalingLists(value: AnyPointer) { + this.#view.setBigUint64(136, BigInt(anyPointer(value)), LE); + } + + get pSequenceParameterSetVui(): Deno.PointerValue { + return pointerFromView(this.#view, 144, LE); + } + + set pSequenceParameterSetVui(value: AnyPointer) { + this.#view.setBigUint64(144, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH264SequenceParameterSetVui.ts b/api/struct/StdVideoH264SequenceParameterSetVui.ts new file mode 100644 index 0000000..3bf53a4 --- /dev/null +++ b/api/struct/StdVideoH264SequenceParameterSetVui.ts @@ -0,0 +1,215 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH264SpsVuiFlags} from "./StdVideoH264SpsVuiFlags.ts"; +import {StdVideoH264HrdParameters} from "./StdVideoH264HrdParameters.ts"; +import { StdVideoH264AspectRatioIdc } from "../enum.ts"; + +export interface InitStdVideoH264SequenceParameterSetVui { + flags?: StdVideoH264SpsVuiFlags; + aspect_ratio_idc?: StdVideoH264AspectRatioIdc; + sar_width?: number; + sar_height?: number; + video_format?: number; + colour_primaries?: number; + transfer_characteristics?: number; + matrix_coefficients?: number; + num_units_in_tick?: number; + time_scale?: number; + max_num_reorder_frames?: number; + max_dec_frame_buffering?: number; + chroma_sample_loc_type_top_field?: number; + chroma_sample_loc_type_bottom_field?: number; + reserved1?: number; + pHrdParameters?: AnyPointer; +} + +export class StdVideoH264SequenceParameterSetVui implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH264SequenceParameterSetVui); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264SequenceParameterSetVui) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH264SequenceParameterSetVui.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH264SequenceParameterSetVui.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH264SequenceParameterSetVui.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.aspect_ratio_idc !== undefined) this.aspect_ratio_idc = data.aspect_ratio_idc; + if (data.sar_width !== undefined) this.sar_width = data.sar_width; + if (data.sar_height !== undefined) this.sar_height = data.sar_height; + if (data.video_format !== undefined) this.video_format = data.video_format; + if (data.colour_primaries !== undefined) this.colour_primaries = data.colour_primaries; + if (data.transfer_characteristics !== undefined) this.transfer_characteristics = data.transfer_characteristics; + if (data.matrix_coefficients !== undefined) this.matrix_coefficients = data.matrix_coefficients; + if (data.num_units_in_tick !== undefined) this.num_units_in_tick = data.num_units_in_tick; + if (data.time_scale !== undefined) this.time_scale = data.time_scale; + if (data.max_num_reorder_frames !== undefined) this.max_num_reorder_frames = data.max_num_reorder_frames; + if (data.max_dec_frame_buffering !== undefined) this.max_dec_frame_buffering = data.max_dec_frame_buffering; + if (data.chroma_sample_loc_type_top_field !== undefined) this.chroma_sample_loc_type_top_field = data.chroma_sample_loc_type_top_field; + if (data.chroma_sample_loc_type_bottom_field !== undefined) this.chroma_sample_loc_type_bottom_field = data.chroma_sample_loc_type_bottom_field; + if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; + if (data.pHrdParameters !== undefined) this.pHrdParameters = data.pHrdParameters; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SequenceParameterSetVui.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH264SpsVuiFlags { + return new StdVideoH264SpsVuiFlags(this.#data.subarray(0, 0 + StdVideoH264SpsVuiFlags.size)); + } + + set flags(value: StdVideoH264SpsVuiFlags) { + if (value[BUFFER].byteLength < StdVideoH264SpsVuiFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get aspect_ratio_idc(): number { + return this.#view.getUint32(48, LE); + } + + set aspect_ratio_idc(value: StdVideoH264AspectRatioIdc) { + this.#view.setUint32(48, Number(value), LE); + } + + get sar_width(): number { + return this.#view.getUint16(52, LE); + } + + set sar_width(value: number) { + this.#view.setUint16(52, Number(value), LE); + } + + get sar_height(): number { + return this.#view.getUint16(54, LE); + } + + set sar_height(value: number) { + this.#view.setUint16(54, Number(value), LE); + } + + get video_format(): number { + return this.#view.getUint8(56); + } + + set video_format(value: number) { + this.#view.setUint8(56, Number(value)); + } + + get colour_primaries(): number { + return this.#view.getUint8(57); + } + + set colour_primaries(value: number) { + this.#view.setUint8(57, Number(value)); + } + + get transfer_characteristics(): number { + return this.#view.getUint8(58); + } + + set transfer_characteristics(value: number) { + this.#view.setUint8(58, Number(value)); + } + + get matrix_coefficients(): number { + return this.#view.getUint8(59); + } + + set matrix_coefficients(value: number) { + this.#view.setUint8(59, Number(value)); + } + + get num_units_in_tick(): number { + return this.#view.getUint32(60, LE); + } + + set num_units_in_tick(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get time_scale(): number { + return this.#view.getUint32(64, LE); + } + + set time_scale(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get max_num_reorder_frames(): number { + return this.#view.getUint8(68); + } + + set max_num_reorder_frames(value: number) { + this.#view.setUint8(68, Number(value)); + } + + get max_dec_frame_buffering(): number { + return this.#view.getUint8(69); + } + + set max_dec_frame_buffering(value: number) { + this.#view.setUint8(69, Number(value)); + } + + get chroma_sample_loc_type_top_field(): number { + return this.#view.getUint8(70); + } + + set chroma_sample_loc_type_top_field(value: number) { + this.#view.setUint8(70, Number(value)); + } + + get chroma_sample_loc_type_bottom_field(): number { + return this.#view.getUint8(71); + } + + set chroma_sample_loc_type_bottom_field(value: number) { + this.#view.setUint8(71, Number(value)); + } + + get reserved1(): number { + return this.#view.getUint32(72, LE); + } + + set reserved1(value: number) { + this.#view.setUint32(72, Number(value), LE); + } + + get pHrdParameters(): Deno.PointerValue { + return pointerFromView(this.#view, 80, LE); + } + + set pHrdParameters(value: AnyPointer) { + this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH264SpsFlags.ts b/api/struct/StdVideoH264SpsFlags.ts new file mode 100644 index 0000000..1ff696f --- /dev/null +++ b/api/struct/StdVideoH264SpsFlags.ts @@ -0,0 +1,209 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH264SpsFlags { + constraint_set0_flag?: number; + constraint_set1_flag?: number; + constraint_set2_flag?: number; + constraint_set3_flag?: number; + constraint_set4_flag?: number; + constraint_set5_flag?: number; + direct_8x8_inference_flag?: number; + mb_adaptive_frame_field_flag?: number; + frame_mbs_only_flag?: number; + delta_pic_order_always_zero_flag?: number; + separate_colour_plane_flag?: number; + gaps_in_frame_num_value_allowed_flag?: number; + qpprime_y_zero_transform_bypass_flag?: number; + frame_cropping_flag?: number; + seq_scaling_matrix_present_flag?: number; + vui_parameters_present_flag?: number; +} + +export class StdVideoH264SpsFlags implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH264SpsFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264SpsFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH264SpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH264SpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH264SpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.constraint_set0_flag !== undefined) this.constraint_set0_flag = data.constraint_set0_flag; + if (data.constraint_set1_flag !== undefined) this.constraint_set1_flag = data.constraint_set1_flag; + if (data.constraint_set2_flag !== undefined) this.constraint_set2_flag = data.constraint_set2_flag; + if (data.constraint_set3_flag !== undefined) this.constraint_set3_flag = data.constraint_set3_flag; + if (data.constraint_set4_flag !== undefined) this.constraint_set4_flag = data.constraint_set4_flag; + if (data.constraint_set5_flag !== undefined) this.constraint_set5_flag = data.constraint_set5_flag; + if (data.direct_8x8_inference_flag !== undefined) this.direct_8x8_inference_flag = data.direct_8x8_inference_flag; + if (data.mb_adaptive_frame_field_flag !== undefined) this.mb_adaptive_frame_field_flag = data.mb_adaptive_frame_field_flag; + if (data.frame_mbs_only_flag !== undefined) this.frame_mbs_only_flag = data.frame_mbs_only_flag; + if (data.delta_pic_order_always_zero_flag !== undefined) this.delta_pic_order_always_zero_flag = data.delta_pic_order_always_zero_flag; + if (data.separate_colour_plane_flag !== undefined) this.separate_colour_plane_flag = data.separate_colour_plane_flag; + if (data.gaps_in_frame_num_value_allowed_flag !== undefined) this.gaps_in_frame_num_value_allowed_flag = data.gaps_in_frame_num_value_allowed_flag; + if (data.qpprime_y_zero_transform_bypass_flag !== undefined) this.qpprime_y_zero_transform_bypass_flag = data.qpprime_y_zero_transform_bypass_flag; + if (data.frame_cropping_flag !== undefined) this.frame_cropping_flag = data.frame_cropping_flag; + if (data.seq_scaling_matrix_present_flag !== undefined) this.seq_scaling_matrix_present_flag = data.seq_scaling_matrix_present_flag; + if (data.vui_parameters_present_flag !== undefined) this.vui_parameters_present_flag = data.vui_parameters_present_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SpsFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get constraint_set0_flag(): number { + return this.#view.getUint32(0, LE); + } + + set constraint_set0_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get constraint_set1_flag(): number { + return this.#view.getUint32(4, LE); + } + + set constraint_set1_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get constraint_set2_flag(): number { + return this.#view.getUint32(8, LE); + } + + set constraint_set2_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get constraint_set3_flag(): number { + return this.#view.getUint32(12, LE); + } + + set constraint_set3_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get constraint_set4_flag(): number { + return this.#view.getUint32(16, LE); + } + + set constraint_set4_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get constraint_set5_flag(): number { + return this.#view.getUint32(20, LE); + } + + set constraint_set5_flag(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get direct_8x8_inference_flag(): number { + return this.#view.getUint32(24, LE); + } + + set direct_8x8_inference_flag(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get mb_adaptive_frame_field_flag(): number { + return this.#view.getUint32(28, LE); + } + + set mb_adaptive_frame_field_flag(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get frame_mbs_only_flag(): number { + return this.#view.getUint32(32, LE); + } + + set frame_mbs_only_flag(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get delta_pic_order_always_zero_flag(): number { + return this.#view.getUint32(36, LE); + } + + set delta_pic_order_always_zero_flag(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get separate_colour_plane_flag(): number { + return this.#view.getUint32(40, LE); + } + + set separate_colour_plane_flag(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get gaps_in_frame_num_value_allowed_flag(): number { + return this.#view.getUint32(44, LE); + } + + set gaps_in_frame_num_value_allowed_flag(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get qpprime_y_zero_transform_bypass_flag(): number { + return this.#view.getUint32(48, LE); + } + + set qpprime_y_zero_transform_bypass_flag(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get frame_cropping_flag(): number { + return this.#view.getUint32(52, LE); + } + + set frame_cropping_flag(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get seq_scaling_matrix_present_flag(): number { + return this.#view.getUint32(56, LE); + } + + set seq_scaling_matrix_present_flag(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get vui_parameters_present_flag(): number { + return this.#view.getUint32(60, LE); + } + + set vui_parameters_present_flag(value: number) { + this.#view.setUint32(60, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH264SpsVuiFlags.ts b/api/struct/StdVideoH264SpsVuiFlags.ts new file mode 100644 index 0000000..75bd643 --- /dev/null +++ b/api/struct/StdVideoH264SpsVuiFlags.ts @@ -0,0 +1,169 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH264SpsVuiFlags { + aspect_ratio_info_present_flag?: number; + overscan_info_present_flag?: number; + overscan_appropriate_flag?: number; + video_signal_type_present_flag?: number; + video_full_range_flag?: number; + color_description_present_flag?: number; + chroma_loc_info_present_flag?: number; + timing_info_present_flag?: number; + fixed_frame_rate_flag?: number; + bitstream_restriction_flag?: number; + nal_hrd_parameters_present_flag?: number; + vcl_hrd_parameters_present_flag?: number; +} + +export class StdVideoH264SpsVuiFlags implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH264SpsVuiFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264SpsVuiFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH264SpsVuiFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH264SpsVuiFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH264SpsVuiFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.aspect_ratio_info_present_flag !== undefined) this.aspect_ratio_info_present_flag = data.aspect_ratio_info_present_flag; + if (data.overscan_info_present_flag !== undefined) this.overscan_info_present_flag = data.overscan_info_present_flag; + if (data.overscan_appropriate_flag !== undefined) this.overscan_appropriate_flag = data.overscan_appropriate_flag; + if (data.video_signal_type_present_flag !== undefined) this.video_signal_type_present_flag = data.video_signal_type_present_flag; + if (data.video_full_range_flag !== undefined) this.video_full_range_flag = data.video_full_range_flag; + if (data.color_description_present_flag !== undefined) this.color_description_present_flag = data.color_description_present_flag; + if (data.chroma_loc_info_present_flag !== undefined) this.chroma_loc_info_present_flag = data.chroma_loc_info_present_flag; + if (data.timing_info_present_flag !== undefined) this.timing_info_present_flag = data.timing_info_present_flag; + if (data.fixed_frame_rate_flag !== undefined) this.fixed_frame_rate_flag = data.fixed_frame_rate_flag; + if (data.bitstream_restriction_flag !== undefined) this.bitstream_restriction_flag = data.bitstream_restriction_flag; + if (data.nal_hrd_parameters_present_flag !== undefined) this.nal_hrd_parameters_present_flag = data.nal_hrd_parameters_present_flag; + if (data.vcl_hrd_parameters_present_flag !== undefined) this.vcl_hrd_parameters_present_flag = data.vcl_hrd_parameters_present_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SpsVuiFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get aspect_ratio_info_present_flag(): number { + return this.#view.getUint32(0, LE); + } + + set aspect_ratio_info_present_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get overscan_info_present_flag(): number { + return this.#view.getUint32(4, LE); + } + + set overscan_info_present_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get overscan_appropriate_flag(): number { + return this.#view.getUint32(8, LE); + } + + set overscan_appropriate_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get video_signal_type_present_flag(): number { + return this.#view.getUint32(12, LE); + } + + set video_signal_type_present_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get video_full_range_flag(): number { + return this.#view.getUint32(16, LE); + } + + set video_full_range_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get color_description_present_flag(): number { + return this.#view.getUint32(20, LE); + } + + set color_description_present_flag(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get chroma_loc_info_present_flag(): number { + return this.#view.getUint32(24, LE); + } + + set chroma_loc_info_present_flag(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get timing_info_present_flag(): number { + return this.#view.getUint32(28, LE); + } + + set timing_info_present_flag(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get fixed_frame_rate_flag(): number { + return this.#view.getUint32(32, LE); + } + + set fixed_frame_rate_flag(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get bitstream_restriction_flag(): number { + return this.#view.getUint32(36, LE); + } + + set bitstream_restriction_flag(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get nal_hrd_parameters_present_flag(): number { + return this.#view.getUint32(40, LE); + } + + set nal_hrd_parameters_present_flag(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get vcl_hrd_parameters_present_flag(): number { + return this.#view.getUint32(44, LE); + } + + set vcl_hrd_parameters_present_flag(value: number) { + this.#view.setUint32(44, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265DecPicBufMgr.ts b/api/struct/StdVideoH265DecPicBufMgr.ts new file mode 100644 index 0000000..aca7c47 --- /dev/null +++ b/api/struct/StdVideoH265DecPicBufMgr.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265DecPicBufMgr { + max_latency_increase_plus1?: Uint32Array; + max_dec_pic_buffering_minus1?: Uint8Array; + max_num_reorder_pics?: Uint8Array; +} + +/** sps_ or vps_ parameters, based on if the StdVideoH265DecPicBufMgr is used within the StdVideoH265SequenceParameterSet or StdVideoH265VideoParameterSet */ +export class StdVideoH265DecPicBufMgr implements BaseStruct { + static size = 44; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265DecPicBufMgr); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265DecPicBufMgr) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265DecPicBufMgr.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265DecPicBufMgr.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265DecPicBufMgr.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.max_latency_increase_plus1 !== undefined) this.max_latency_increase_plus1 = data.max_latency_increase_plus1; + if (data.max_dec_pic_buffering_minus1 !== undefined) this.max_dec_pic_buffering_minus1 = data.max_dec_pic_buffering_minus1; + if (data.max_num_reorder_pics !== undefined) this.max_num_reorder_pics = data.max_num_reorder_pics; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265DecPicBufMgr.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get max_latency_increase_plus1(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 0, 7); + } + + set max_latency_increase_plus1(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 0); + } + + get max_dec_pic_buffering_minus1(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 28, 7); + } + + set max_dec_pic_buffering_minus1(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 28); + } + + get max_num_reorder_pics(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 35, 7); + } + + set max_num_reorder_pics(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 35); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265HrdFlags.ts b/api/struct/StdVideoH265HrdFlags.ts new file mode 100644 index 0000000..c297897 --- /dev/null +++ b/api/struct/StdVideoH265HrdFlags.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265HrdFlags { + nal_hrd_parameters_present_flag?: number; + vcl_hrd_parameters_present_flag?: number; + sub_pic_hrd_params_present_flag?: number; + sub_pic_cpb_params_in_pic_timing_sei_flag?: number; + fixed_pic_rate_general_flag?: number; + fixed_pic_rate_within_cvs_flag?: number; + low_delay_hrd_flag?: number; +} + +export class StdVideoH265HrdFlags implements BaseStruct { + static size = 28; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265HrdFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265HrdFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265HrdFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265HrdFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265HrdFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.nal_hrd_parameters_present_flag !== undefined) this.nal_hrd_parameters_present_flag = data.nal_hrd_parameters_present_flag; + if (data.vcl_hrd_parameters_present_flag !== undefined) this.vcl_hrd_parameters_present_flag = data.vcl_hrd_parameters_present_flag; + if (data.sub_pic_hrd_params_present_flag !== undefined) this.sub_pic_hrd_params_present_flag = data.sub_pic_hrd_params_present_flag; + if (data.sub_pic_cpb_params_in_pic_timing_sei_flag !== undefined) this.sub_pic_cpb_params_in_pic_timing_sei_flag = data.sub_pic_cpb_params_in_pic_timing_sei_flag; + if (data.fixed_pic_rate_general_flag !== undefined) this.fixed_pic_rate_general_flag = data.fixed_pic_rate_general_flag; + if (data.fixed_pic_rate_within_cvs_flag !== undefined) this.fixed_pic_rate_within_cvs_flag = data.fixed_pic_rate_within_cvs_flag; + if (data.low_delay_hrd_flag !== undefined) this.low_delay_hrd_flag = data.low_delay_hrd_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265HrdFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get nal_hrd_parameters_present_flag(): number { + return this.#view.getUint32(0, LE); + } + + set nal_hrd_parameters_present_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get vcl_hrd_parameters_present_flag(): number { + return this.#view.getUint32(4, LE); + } + + set vcl_hrd_parameters_present_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get sub_pic_hrd_params_present_flag(): number { + return this.#view.getUint32(8, LE); + } + + set sub_pic_hrd_params_present_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get sub_pic_cpb_params_in_pic_timing_sei_flag(): number { + return this.#view.getUint32(12, LE); + } + + set sub_pic_cpb_params_in_pic_timing_sei_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get fixed_pic_rate_general_flag(): number { + return this.#view.getUint32(16, LE); + } + + set fixed_pic_rate_general_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get fixed_pic_rate_within_cvs_flag(): number { + return this.#view.getUint32(20, LE); + } + + set fixed_pic_rate_within_cvs_flag(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get low_delay_hrd_flag(): number { + return this.#view.getUint32(24, LE); + } + + set low_delay_hrd_flag(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265HrdParameters.ts b/api/struct/StdVideoH265HrdParameters.ts new file mode 100644 index 0000000..79e09e5 --- /dev/null +++ b/api/struct/StdVideoH265HrdParameters.ts @@ -0,0 +1,204 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH265HrdFlags} from "./StdVideoH265HrdFlags.ts"; +import {StdVideoH265SubLayerHrdParameters} from "./StdVideoH265SubLayerHrdParameters.ts"; + +export interface InitStdVideoH265HrdParameters { + flags?: StdVideoH265HrdFlags; + tick_divisor_minus2?: number; + du_cpb_removal_delay_increment_length_minus1?: number; + dpb_output_delay_du_length_minus1?: number; + bit_rate_scale?: number; + cpb_size_scale?: number; + cpb_size_du_scale?: number; + initial_cpb_removal_delay_length_minus1?: number; + au_cpb_removal_delay_length_minus1?: number; + dpb_output_delay_length_minus1?: number; + cpb_cnt_minus1?: Uint8Array; + elemental_duration_in_tc_minus1?: Uint16Array; + reserved?: Uint16Array; + pSubLayerHrdParametersNal?: AnyPointer; + pSubLayerHrdParametersVcl?: AnyPointer; +} + +export class StdVideoH265HrdParameters implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265HrdParameters); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265HrdParameters) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265HrdParameters.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265HrdParameters.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265HrdParameters.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.tick_divisor_minus2 !== undefined) this.tick_divisor_minus2 = data.tick_divisor_minus2; + if (data.du_cpb_removal_delay_increment_length_minus1 !== undefined) this.du_cpb_removal_delay_increment_length_minus1 = data.du_cpb_removal_delay_increment_length_minus1; + if (data.dpb_output_delay_du_length_minus1 !== undefined) this.dpb_output_delay_du_length_minus1 = data.dpb_output_delay_du_length_minus1; + if (data.bit_rate_scale !== undefined) this.bit_rate_scale = data.bit_rate_scale; + if (data.cpb_size_scale !== undefined) this.cpb_size_scale = data.cpb_size_scale; + if (data.cpb_size_du_scale !== undefined) this.cpb_size_du_scale = data.cpb_size_du_scale; + if (data.initial_cpb_removal_delay_length_minus1 !== undefined) this.initial_cpb_removal_delay_length_minus1 = data.initial_cpb_removal_delay_length_minus1; + if (data.au_cpb_removal_delay_length_minus1 !== undefined) this.au_cpb_removal_delay_length_minus1 = data.au_cpb_removal_delay_length_minus1; + if (data.dpb_output_delay_length_minus1 !== undefined) this.dpb_output_delay_length_minus1 = data.dpb_output_delay_length_minus1; + if (data.cpb_cnt_minus1 !== undefined) this.cpb_cnt_minus1 = data.cpb_cnt_minus1; + if (data.elemental_duration_in_tc_minus1 !== undefined) this.elemental_duration_in_tc_minus1 = data.elemental_duration_in_tc_minus1; + if (data.reserved !== undefined) this.reserved = data.reserved; + if (data.pSubLayerHrdParametersNal !== undefined) this.pSubLayerHrdParametersNal = data.pSubLayerHrdParametersNal; + if (data.pSubLayerHrdParametersVcl !== undefined) this.pSubLayerHrdParametersVcl = data.pSubLayerHrdParametersVcl; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265HrdParameters.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH265HrdFlags { + return new StdVideoH265HrdFlags(this.#data.subarray(0, 0 + StdVideoH265HrdFlags.size)); + } + + set flags(value: StdVideoH265HrdFlags) { + if (value[BUFFER].byteLength < StdVideoH265HrdFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get tick_divisor_minus2(): number { + return this.#view.getUint8(28); + } + + set tick_divisor_minus2(value: number) { + this.#view.setUint8(28, Number(value)); + } + + get du_cpb_removal_delay_increment_length_minus1(): number { + return this.#view.getUint8(29); + } + + set du_cpb_removal_delay_increment_length_minus1(value: number) { + this.#view.setUint8(29, Number(value)); + } + + get dpb_output_delay_du_length_minus1(): number { + return this.#view.getUint8(30); + } + + set dpb_output_delay_du_length_minus1(value: number) { + this.#view.setUint8(30, Number(value)); + } + + get bit_rate_scale(): number { + return this.#view.getUint8(31); + } + + set bit_rate_scale(value: number) { + this.#view.setUint8(31, Number(value)); + } + + get cpb_size_scale(): number { + return this.#view.getUint8(32); + } + + set cpb_size_scale(value: number) { + this.#view.setUint8(32, Number(value)); + } + + get cpb_size_du_scale(): number { + return this.#view.getUint8(33); + } + + set cpb_size_du_scale(value: number) { + this.#view.setUint8(33, Number(value)); + } + + get initial_cpb_removal_delay_length_minus1(): number { + return this.#view.getUint8(34); + } + + set initial_cpb_removal_delay_length_minus1(value: number) { + this.#view.setUint8(34, Number(value)); + } + + get au_cpb_removal_delay_length_minus1(): number { + return this.#view.getUint8(35); + } + + set au_cpb_removal_delay_length_minus1(value: number) { + this.#view.setUint8(35, Number(value)); + } + + get dpb_output_delay_length_minus1(): number { + return this.#view.getUint8(36); + } + + set dpb_output_delay_length_minus1(value: number) { + this.#view.setUint8(36, Number(value)); + } + + get cpb_cnt_minus1(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 37, 7); + } + + set cpb_cnt_minus1(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 37); + } + + get elemental_duration_in_tc_minus1(): Uint16Array { + return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 44, 7); + } + + set elemental_duration_in_tc_minus1(value: Uint16Array) { + this.#data.set(new Uint8Array(value.buffer), 44); + } + + get reserved(): Uint16Array { + return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 58, 3); + } + + set reserved(value: Uint16Array) { + this.#data.set(new Uint8Array(value.buffer), 58); + } + + get pSubLayerHrdParametersNal(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pSubLayerHrdParametersNal(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } + + get pSubLayerHrdParametersVcl(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set pSubLayerHrdParametersVcl(value: AnyPointer) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265LongTermRefPicsSps.ts b/api/struct/StdVideoH265LongTermRefPicsSps.ts new file mode 100644 index 0000000..b6fbc6e --- /dev/null +++ b/api/struct/StdVideoH265LongTermRefPicsSps.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265LongTermRefPicsSps { + used_by_curr_pic_lt_sps_flag?: number; + lt_ref_pic_poc_lsb_sps?: Uint32Array; +} + +export class StdVideoH265LongTermRefPicsSps implements BaseStruct { + static size = 132; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265LongTermRefPicsSps); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265LongTermRefPicsSps) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265LongTermRefPicsSps.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265LongTermRefPicsSps.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265LongTermRefPicsSps.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.used_by_curr_pic_lt_sps_flag !== undefined) this.used_by_curr_pic_lt_sps_flag = data.used_by_curr_pic_lt_sps_flag; + if (data.lt_ref_pic_poc_lsb_sps !== undefined) this.lt_ref_pic_poc_lsb_sps = data.lt_ref_pic_poc_lsb_sps; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265LongTermRefPicsSps.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get used_by_curr_pic_lt_sps_flag(): number { + return this.#view.getUint32(0, LE); + } + + set used_by_curr_pic_lt_sps_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get lt_ref_pic_poc_lsb_sps(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 4, 32); + } + + set lt_ref_pic_poc_lsb_sps(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 4); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265PictureParameterSet.ts b/api/struct/StdVideoH265PictureParameterSet.ts new file mode 100644 index 0000000..494f771 --- /dev/null +++ b/api/struct/StdVideoH265PictureParameterSet.ts @@ -0,0 +1,415 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH265PpsFlags} from "./StdVideoH265PpsFlags.ts"; +import {StdVideoH265ScalingLists} from "./StdVideoH265ScalingLists.ts"; +import {StdVideoH265PredictorPaletteEntries} from "./StdVideoH265PredictorPaletteEntries.ts"; + +export interface InitStdVideoH265PictureParameterSet { + flags?: StdVideoH265PpsFlags; + pps_pic_parameter_set_id?: number; + pps_seq_parameter_set_id?: number; + sps_video_parameter_set_id?: number; + num_extra_slice_header_bits?: number; + num_ref_idx_l0_default_active_minus1?: number; + num_ref_idx_l1_default_active_minus1?: number; + init_qp_minus26?: number; + diff_cu_qp_delta_depth?: number; + pps_cb_qp_offset?: number; + pps_cr_qp_offset?: number; + pps_beta_offset_div2?: number; + pps_tc_offset_div2?: number; + log2_parallel_merge_level_minus2?: number; + log2_max_transform_skip_block_size_minus2?: number; + diff_cu_chroma_qp_offset_depth?: number; + chroma_qp_offset_list_len_minus1?: number; + cb_qp_offset_list?: Int8Array; + cr_qp_offset_list?: Int8Array; + log2_sao_offset_scale_luma?: number; + log2_sao_offset_scale_chroma?: number; + pps_act_y_qp_offset_plus5?: number; + pps_act_cb_qp_offset_plus5?: number; + pps_act_cr_qp_offset_plus3?: number; + pps_num_palette_predictor_initializers?: number; + luma_bit_depth_entry_minus8?: number; + chroma_bit_depth_entry_minus8?: number; + num_tile_columns_minus1?: number; + num_tile_rows_minus1?: number; + reserved1?: number; + reserved2?: number; + column_width_minus1?: Uint16Array; + row_height_minus1?: Uint16Array; + reserved3?: number; + pScalingLists?: AnyPointer; + pPredictorPaletteEntries?: AnyPointer; +} + +export class StdVideoH265PictureParameterSet implements BaseStruct { + static size = 264; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265PictureParameterSet); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265PictureParameterSet) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265PictureParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265PictureParameterSet.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265PictureParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.pps_pic_parameter_set_id !== undefined) this.pps_pic_parameter_set_id = data.pps_pic_parameter_set_id; + if (data.pps_seq_parameter_set_id !== undefined) this.pps_seq_parameter_set_id = data.pps_seq_parameter_set_id; + if (data.sps_video_parameter_set_id !== undefined) this.sps_video_parameter_set_id = data.sps_video_parameter_set_id; + if (data.num_extra_slice_header_bits !== undefined) this.num_extra_slice_header_bits = data.num_extra_slice_header_bits; + if (data.num_ref_idx_l0_default_active_minus1 !== undefined) this.num_ref_idx_l0_default_active_minus1 = data.num_ref_idx_l0_default_active_minus1; + if (data.num_ref_idx_l1_default_active_minus1 !== undefined) this.num_ref_idx_l1_default_active_minus1 = data.num_ref_idx_l1_default_active_minus1; + if (data.init_qp_minus26 !== undefined) this.init_qp_minus26 = data.init_qp_minus26; + if (data.diff_cu_qp_delta_depth !== undefined) this.diff_cu_qp_delta_depth = data.diff_cu_qp_delta_depth; + if (data.pps_cb_qp_offset !== undefined) this.pps_cb_qp_offset = data.pps_cb_qp_offset; + if (data.pps_cr_qp_offset !== undefined) this.pps_cr_qp_offset = data.pps_cr_qp_offset; + if (data.pps_beta_offset_div2 !== undefined) this.pps_beta_offset_div2 = data.pps_beta_offset_div2; + if (data.pps_tc_offset_div2 !== undefined) this.pps_tc_offset_div2 = data.pps_tc_offset_div2; + if (data.log2_parallel_merge_level_minus2 !== undefined) this.log2_parallel_merge_level_minus2 = data.log2_parallel_merge_level_minus2; + if (data.log2_max_transform_skip_block_size_minus2 !== undefined) this.log2_max_transform_skip_block_size_minus2 = data.log2_max_transform_skip_block_size_minus2; + if (data.diff_cu_chroma_qp_offset_depth !== undefined) this.diff_cu_chroma_qp_offset_depth = data.diff_cu_chroma_qp_offset_depth; + if (data.chroma_qp_offset_list_len_minus1 !== undefined) this.chroma_qp_offset_list_len_minus1 = data.chroma_qp_offset_list_len_minus1; + if (data.cb_qp_offset_list !== undefined) this.cb_qp_offset_list = data.cb_qp_offset_list; + if (data.cr_qp_offset_list !== undefined) this.cr_qp_offset_list = data.cr_qp_offset_list; + if (data.log2_sao_offset_scale_luma !== undefined) this.log2_sao_offset_scale_luma = data.log2_sao_offset_scale_luma; + if (data.log2_sao_offset_scale_chroma !== undefined) this.log2_sao_offset_scale_chroma = data.log2_sao_offset_scale_chroma; + if (data.pps_act_y_qp_offset_plus5 !== undefined) this.pps_act_y_qp_offset_plus5 = data.pps_act_y_qp_offset_plus5; + if (data.pps_act_cb_qp_offset_plus5 !== undefined) this.pps_act_cb_qp_offset_plus5 = data.pps_act_cb_qp_offset_plus5; + if (data.pps_act_cr_qp_offset_plus3 !== undefined) this.pps_act_cr_qp_offset_plus3 = data.pps_act_cr_qp_offset_plus3; + if (data.pps_num_palette_predictor_initializers !== undefined) this.pps_num_palette_predictor_initializers = data.pps_num_palette_predictor_initializers; + if (data.luma_bit_depth_entry_minus8 !== undefined) this.luma_bit_depth_entry_minus8 = data.luma_bit_depth_entry_minus8; + if (data.chroma_bit_depth_entry_minus8 !== undefined) this.chroma_bit_depth_entry_minus8 = data.chroma_bit_depth_entry_minus8; + if (data.num_tile_columns_minus1 !== undefined) this.num_tile_columns_minus1 = data.num_tile_columns_minus1; + if (data.num_tile_rows_minus1 !== undefined) this.num_tile_rows_minus1 = data.num_tile_rows_minus1; + if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; + if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; + if (data.column_width_minus1 !== undefined) this.column_width_minus1 = data.column_width_minus1; + if (data.row_height_minus1 !== undefined) this.row_height_minus1 = data.row_height_minus1; + if (data.reserved3 !== undefined) this.reserved3 = data.reserved3; + if (data.pScalingLists !== undefined) this.pScalingLists = data.pScalingLists; + if (data.pPredictorPaletteEntries !== undefined) this.pPredictorPaletteEntries = data.pPredictorPaletteEntries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265PictureParameterSet.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH265PpsFlags { + return new StdVideoH265PpsFlags(this.#data.subarray(0, 0 + StdVideoH265PpsFlags.size)); + } + + set flags(value: StdVideoH265PpsFlags) { + if (value[BUFFER].byteLength < StdVideoH265PpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get pps_pic_parameter_set_id(): number { + return this.#view.getUint8(124); + } + + set pps_pic_parameter_set_id(value: number) { + this.#view.setUint8(124, Number(value)); + } + + get pps_seq_parameter_set_id(): number { + return this.#view.getUint8(125); + } + + set pps_seq_parameter_set_id(value: number) { + this.#view.setUint8(125, Number(value)); + } + + get sps_video_parameter_set_id(): number { + return this.#view.getUint8(126); + } + + set sps_video_parameter_set_id(value: number) { + this.#view.setUint8(126, Number(value)); + } + + get num_extra_slice_header_bits(): number { + return this.#view.getUint8(127); + } + + set num_extra_slice_header_bits(value: number) { + this.#view.setUint8(127, Number(value)); + } + + get num_ref_idx_l0_default_active_minus1(): number { + return this.#view.getUint8(128); + } + + set num_ref_idx_l0_default_active_minus1(value: number) { + this.#view.setUint8(128, Number(value)); + } + + get num_ref_idx_l1_default_active_minus1(): number { + return this.#view.getUint8(129); + } + + set num_ref_idx_l1_default_active_minus1(value: number) { + this.#view.setUint8(129, Number(value)); + } + + get init_qp_minus26(): number { + return this.#view.getInt8(130); + } + + set init_qp_minus26(value: number) { + this.#view.setInt8(130, Number(value)); + } + + get diff_cu_qp_delta_depth(): number { + return this.#view.getUint8(131); + } + + set diff_cu_qp_delta_depth(value: number) { + this.#view.setUint8(131, Number(value)); + } + + get pps_cb_qp_offset(): number { + return this.#view.getInt8(132); + } + + set pps_cb_qp_offset(value: number) { + this.#view.setInt8(132, Number(value)); + } + + get pps_cr_qp_offset(): number { + return this.#view.getInt8(133); + } + + set pps_cr_qp_offset(value: number) { + this.#view.setInt8(133, Number(value)); + } + + get pps_beta_offset_div2(): number { + return this.#view.getInt8(134); + } + + set pps_beta_offset_div2(value: number) { + this.#view.setInt8(134, Number(value)); + } + + get pps_tc_offset_div2(): number { + return this.#view.getInt8(135); + } + + set pps_tc_offset_div2(value: number) { + this.#view.setInt8(135, Number(value)); + } + + get log2_parallel_merge_level_minus2(): number { + return this.#view.getUint8(136); + } + + set log2_parallel_merge_level_minus2(value: number) { + this.#view.setUint8(136, Number(value)); + } + + get log2_max_transform_skip_block_size_minus2(): number { + return this.#view.getUint8(137); + } + + set log2_max_transform_skip_block_size_minus2(value: number) { + this.#view.setUint8(137, Number(value)); + } + + get diff_cu_chroma_qp_offset_depth(): number { + return this.#view.getUint8(138); + } + + set diff_cu_chroma_qp_offset_depth(value: number) { + this.#view.setUint8(138, Number(value)); + } + + get chroma_qp_offset_list_len_minus1(): number { + return this.#view.getUint8(139); + } + + set chroma_qp_offset_list_len_minus1(value: number) { + this.#view.setUint8(139, Number(value)); + } + + get cb_qp_offset_list(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 140, 6); + } + + set cb_qp_offset_list(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 140); + } + + get cr_qp_offset_list(): Int8Array { + return new Int8Array(this.#data.buffer, this.#data.byteOffset + 146, 6); + } + + set cr_qp_offset_list(value: Int8Array) { + this.#data.set(new Uint8Array(value.buffer), 146); + } + + get log2_sao_offset_scale_luma(): number { + return this.#view.getUint8(152); + } + + set log2_sao_offset_scale_luma(value: number) { + this.#view.setUint8(152, Number(value)); + } + + get log2_sao_offset_scale_chroma(): number { + return this.#view.getUint8(153); + } + + set log2_sao_offset_scale_chroma(value: number) { + this.#view.setUint8(153, Number(value)); + } + + get pps_act_y_qp_offset_plus5(): number { + return this.#view.getInt8(154); + } + + set pps_act_y_qp_offset_plus5(value: number) { + this.#view.setInt8(154, Number(value)); + } + + get pps_act_cb_qp_offset_plus5(): number { + return this.#view.getInt8(155); + } + + set pps_act_cb_qp_offset_plus5(value: number) { + this.#view.setInt8(155, Number(value)); + } + + get pps_act_cr_qp_offset_plus3(): number { + return this.#view.getInt8(156); + } + + set pps_act_cr_qp_offset_plus3(value: number) { + this.#view.setInt8(156, Number(value)); + } + + get pps_num_palette_predictor_initializers(): number { + return this.#view.getUint8(157); + } + + set pps_num_palette_predictor_initializers(value: number) { + this.#view.setUint8(157, Number(value)); + } + + get luma_bit_depth_entry_minus8(): number { + return this.#view.getUint8(158); + } + + set luma_bit_depth_entry_minus8(value: number) { + this.#view.setUint8(158, Number(value)); + } + + get chroma_bit_depth_entry_minus8(): number { + return this.#view.getUint8(159); + } + + set chroma_bit_depth_entry_minus8(value: number) { + this.#view.setUint8(159, Number(value)); + } + + get num_tile_columns_minus1(): number { + return this.#view.getUint8(160); + } + + set num_tile_columns_minus1(value: number) { + this.#view.setUint8(160, Number(value)); + } + + get num_tile_rows_minus1(): number { + return this.#view.getUint8(161); + } + + set num_tile_rows_minus1(value: number) { + this.#view.setUint8(161, Number(value)); + } + + get reserved1(): number { + return this.#view.getUint8(162); + } + + set reserved1(value: number) { + this.#view.setUint8(162, Number(value)); + } + + get reserved2(): number { + return this.#view.getUint8(163); + } + + set reserved2(value: number) { + this.#view.setUint8(163, Number(value)); + } + + get column_width_minus1(): Uint16Array { + return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 164, 19); + } + + set column_width_minus1(value: Uint16Array) { + this.#data.set(new Uint8Array(value.buffer), 164); + } + + get row_height_minus1(): Uint16Array { + return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 202, 21); + } + + set row_height_minus1(value: Uint16Array) { + this.#data.set(new Uint8Array(value.buffer), 202); + } + + get reserved3(): number { + return this.#view.getUint32(244, LE); + } + + set reserved3(value: number) { + this.#view.setUint32(244, Number(value), LE); + } + + get pScalingLists(): Deno.PointerValue { + return pointerFromView(this.#view, 248, LE); + } + + set pScalingLists(value: AnyPointer) { + this.#view.setBigUint64(248, BigInt(anyPointer(value)), LE); + } + + get pPredictorPaletteEntries(): Deno.PointerValue { + return pointerFromView(this.#view, 256, LE); + } + + set pPredictorPaletteEntries(value: AnyPointer) { + this.#view.setBigUint64(256, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265PpsFlags.ts b/api/struct/StdVideoH265PpsFlags.ts new file mode 100644 index 0000000..334fc10 --- /dev/null +++ b/api/struct/StdVideoH265PpsFlags.ts @@ -0,0 +1,359 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265PpsFlags { + dependent_slice_segments_enabled_flag?: number; + output_flag_present_flag?: number; + sign_data_hiding_enabled_flag?: number; + cabac_init_present_flag?: number; + constrained_intra_pred_flag?: number; + transform_skip_enabled_flag?: number; + cu_qp_delta_enabled_flag?: number; + pps_slice_chroma_qp_offsets_present_flag?: number; + weighted_pred_flag?: number; + weighted_bipred_flag?: number; + transquant_bypass_enabled_flag?: number; + tiles_enabled_flag?: number; + entropy_coding_sync_enabled_flag?: number; + uniform_spacing_flag?: number; + loop_filter_across_tiles_enabled_flag?: number; + pps_loop_filter_across_slices_enabled_flag?: number; + deblocking_filter_control_present_flag?: number; + deblocking_filter_override_enabled_flag?: number; + pps_deblocking_filter_disabled_flag?: number; + pps_scaling_list_data_present_flag?: number; + lists_modification_present_flag?: number; + slice_segment_header_extension_present_flag?: number; + pps_extension_present_flag?: number; + cross_component_prediction_enabled_flag?: number; + chroma_qp_offset_list_enabled_flag?: number; + pps_curr_pic_ref_enabled_flag?: number; + residual_adaptive_colour_transform_enabled_flag?: number; + pps_slice_act_qp_offsets_present_flag?: number; + pps_palette_predictor_initializers_present_flag?: number; + monochrome_palette_flag?: number; + pps_range_extension_flag?: number; +} + +export class StdVideoH265PpsFlags implements BaseStruct { + static size = 124; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265PpsFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265PpsFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265PpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265PpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265PpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.dependent_slice_segments_enabled_flag !== undefined) this.dependent_slice_segments_enabled_flag = data.dependent_slice_segments_enabled_flag; + if (data.output_flag_present_flag !== undefined) this.output_flag_present_flag = data.output_flag_present_flag; + if (data.sign_data_hiding_enabled_flag !== undefined) this.sign_data_hiding_enabled_flag = data.sign_data_hiding_enabled_flag; + if (data.cabac_init_present_flag !== undefined) this.cabac_init_present_flag = data.cabac_init_present_flag; + if (data.constrained_intra_pred_flag !== undefined) this.constrained_intra_pred_flag = data.constrained_intra_pred_flag; + if (data.transform_skip_enabled_flag !== undefined) this.transform_skip_enabled_flag = data.transform_skip_enabled_flag; + if (data.cu_qp_delta_enabled_flag !== undefined) this.cu_qp_delta_enabled_flag = data.cu_qp_delta_enabled_flag; + if (data.pps_slice_chroma_qp_offsets_present_flag !== undefined) this.pps_slice_chroma_qp_offsets_present_flag = data.pps_slice_chroma_qp_offsets_present_flag; + if (data.weighted_pred_flag !== undefined) this.weighted_pred_flag = data.weighted_pred_flag; + if (data.weighted_bipred_flag !== undefined) this.weighted_bipred_flag = data.weighted_bipred_flag; + if (data.transquant_bypass_enabled_flag !== undefined) this.transquant_bypass_enabled_flag = data.transquant_bypass_enabled_flag; + if (data.tiles_enabled_flag !== undefined) this.tiles_enabled_flag = data.tiles_enabled_flag; + if (data.entropy_coding_sync_enabled_flag !== undefined) this.entropy_coding_sync_enabled_flag = data.entropy_coding_sync_enabled_flag; + if (data.uniform_spacing_flag !== undefined) this.uniform_spacing_flag = data.uniform_spacing_flag; + if (data.loop_filter_across_tiles_enabled_flag !== undefined) this.loop_filter_across_tiles_enabled_flag = data.loop_filter_across_tiles_enabled_flag; + if (data.pps_loop_filter_across_slices_enabled_flag !== undefined) this.pps_loop_filter_across_slices_enabled_flag = data.pps_loop_filter_across_slices_enabled_flag; + if (data.deblocking_filter_control_present_flag !== undefined) this.deblocking_filter_control_present_flag = data.deblocking_filter_control_present_flag; + if (data.deblocking_filter_override_enabled_flag !== undefined) this.deblocking_filter_override_enabled_flag = data.deblocking_filter_override_enabled_flag; + if (data.pps_deblocking_filter_disabled_flag !== undefined) this.pps_deblocking_filter_disabled_flag = data.pps_deblocking_filter_disabled_flag; + if (data.pps_scaling_list_data_present_flag !== undefined) this.pps_scaling_list_data_present_flag = data.pps_scaling_list_data_present_flag; + if (data.lists_modification_present_flag !== undefined) this.lists_modification_present_flag = data.lists_modification_present_flag; + if (data.slice_segment_header_extension_present_flag !== undefined) this.slice_segment_header_extension_present_flag = data.slice_segment_header_extension_present_flag; + if (data.pps_extension_present_flag !== undefined) this.pps_extension_present_flag = data.pps_extension_present_flag; + if (data.cross_component_prediction_enabled_flag !== undefined) this.cross_component_prediction_enabled_flag = data.cross_component_prediction_enabled_flag; + if (data.chroma_qp_offset_list_enabled_flag !== undefined) this.chroma_qp_offset_list_enabled_flag = data.chroma_qp_offset_list_enabled_flag; + if (data.pps_curr_pic_ref_enabled_flag !== undefined) this.pps_curr_pic_ref_enabled_flag = data.pps_curr_pic_ref_enabled_flag; + if (data.residual_adaptive_colour_transform_enabled_flag !== undefined) this.residual_adaptive_colour_transform_enabled_flag = data.residual_adaptive_colour_transform_enabled_flag; + if (data.pps_slice_act_qp_offsets_present_flag !== undefined) this.pps_slice_act_qp_offsets_present_flag = data.pps_slice_act_qp_offsets_present_flag; + if (data.pps_palette_predictor_initializers_present_flag !== undefined) this.pps_palette_predictor_initializers_present_flag = data.pps_palette_predictor_initializers_present_flag; + if (data.monochrome_palette_flag !== undefined) this.monochrome_palette_flag = data.monochrome_palette_flag; + if (data.pps_range_extension_flag !== undefined) this.pps_range_extension_flag = data.pps_range_extension_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265PpsFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get dependent_slice_segments_enabled_flag(): number { + return this.#view.getUint32(0, LE); + } + + set dependent_slice_segments_enabled_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get output_flag_present_flag(): number { + return this.#view.getUint32(4, LE); + } + + set output_flag_present_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get sign_data_hiding_enabled_flag(): number { + return this.#view.getUint32(8, LE); + } + + set sign_data_hiding_enabled_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get cabac_init_present_flag(): number { + return this.#view.getUint32(12, LE); + } + + set cabac_init_present_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get constrained_intra_pred_flag(): number { + return this.#view.getUint32(16, LE); + } + + set constrained_intra_pred_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get transform_skip_enabled_flag(): number { + return this.#view.getUint32(20, LE); + } + + set transform_skip_enabled_flag(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get cu_qp_delta_enabled_flag(): number { + return this.#view.getUint32(24, LE); + } + + set cu_qp_delta_enabled_flag(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pps_slice_chroma_qp_offsets_present_flag(): number { + return this.#view.getUint32(28, LE); + } + + set pps_slice_chroma_qp_offsets_present_flag(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get weighted_pred_flag(): number { + return this.#view.getUint32(32, LE); + } + + set weighted_pred_flag(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get weighted_bipred_flag(): number { + return this.#view.getUint32(36, LE); + } + + set weighted_bipred_flag(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get transquant_bypass_enabled_flag(): number { + return this.#view.getUint32(40, LE); + } + + set transquant_bypass_enabled_flag(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get tiles_enabled_flag(): number { + return this.#view.getUint32(44, LE); + } + + set tiles_enabled_flag(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get entropy_coding_sync_enabled_flag(): number { + return this.#view.getUint32(48, LE); + } + + set entropy_coding_sync_enabled_flag(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get uniform_spacing_flag(): number { + return this.#view.getUint32(52, LE); + } + + set uniform_spacing_flag(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get loop_filter_across_tiles_enabled_flag(): number { + return this.#view.getUint32(56, LE); + } + + set loop_filter_across_tiles_enabled_flag(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get pps_loop_filter_across_slices_enabled_flag(): number { + return this.#view.getUint32(60, LE); + } + + set pps_loop_filter_across_slices_enabled_flag(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get deblocking_filter_control_present_flag(): number { + return this.#view.getUint32(64, LE); + } + + set deblocking_filter_control_present_flag(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get deblocking_filter_override_enabled_flag(): number { + return this.#view.getUint32(68, LE); + } + + set deblocking_filter_override_enabled_flag(value: number) { + this.#view.setUint32(68, Number(value), LE); + } + + get pps_deblocking_filter_disabled_flag(): number { + return this.#view.getUint32(72, LE); + } + + set pps_deblocking_filter_disabled_flag(value: number) { + this.#view.setUint32(72, Number(value), LE); + } + + get pps_scaling_list_data_present_flag(): number { + return this.#view.getUint32(76, LE); + } + + set pps_scaling_list_data_present_flag(value: number) { + this.#view.setUint32(76, Number(value), LE); + } + + get lists_modification_present_flag(): number { + return this.#view.getUint32(80, LE); + } + + set lists_modification_present_flag(value: number) { + this.#view.setUint32(80, Number(value), LE); + } + + get slice_segment_header_extension_present_flag(): number { + return this.#view.getUint32(84, LE); + } + + set slice_segment_header_extension_present_flag(value: number) { + this.#view.setUint32(84, Number(value), LE); + } + + get pps_extension_present_flag(): number { + return this.#view.getUint32(88, LE); + } + + set pps_extension_present_flag(value: number) { + this.#view.setUint32(88, Number(value), LE); + } + + get cross_component_prediction_enabled_flag(): number { + return this.#view.getUint32(92, LE); + } + + set cross_component_prediction_enabled_flag(value: number) { + this.#view.setUint32(92, Number(value), LE); + } + + get chroma_qp_offset_list_enabled_flag(): number { + return this.#view.getUint32(96, LE); + } + + set chroma_qp_offset_list_enabled_flag(value: number) { + this.#view.setUint32(96, Number(value), LE); + } + + get pps_curr_pic_ref_enabled_flag(): number { + return this.#view.getUint32(100, LE); + } + + set pps_curr_pic_ref_enabled_flag(value: number) { + this.#view.setUint32(100, Number(value), LE); + } + + get residual_adaptive_colour_transform_enabled_flag(): number { + return this.#view.getUint32(104, LE); + } + + set residual_adaptive_colour_transform_enabled_flag(value: number) { + this.#view.setUint32(104, Number(value), LE); + } + + get pps_slice_act_qp_offsets_present_flag(): number { + return this.#view.getUint32(108, LE); + } + + set pps_slice_act_qp_offsets_present_flag(value: number) { + this.#view.setUint32(108, Number(value), LE); + } + + get pps_palette_predictor_initializers_present_flag(): number { + return this.#view.getUint32(112, LE); + } + + set pps_palette_predictor_initializers_present_flag(value: number) { + this.#view.setUint32(112, Number(value), LE); + } + + get monochrome_palette_flag(): number { + return this.#view.getUint32(116, LE); + } + + set monochrome_palette_flag(value: number) { + this.#view.setUint32(116, Number(value), LE); + } + + get pps_range_extension_flag(): number { + return this.#view.getUint32(120, LE); + } + + set pps_range_extension_flag(value: number) { + this.#view.setUint32(120, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265PredictorPaletteEntries.ts b/api/struct/StdVideoH265PredictorPaletteEntries.ts new file mode 100644 index 0000000..c0de8d9 --- /dev/null +++ b/api/struct/StdVideoH265PredictorPaletteEntries.ts @@ -0,0 +1,59 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265PredictorPaletteEntries { + PredictorPaletteEntries?: Uint16Array; +} + +export class StdVideoH265PredictorPaletteEntries implements BaseStruct { + static size = 768; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265PredictorPaletteEntries); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265PredictorPaletteEntries) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265PredictorPaletteEntries.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265PredictorPaletteEntries.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265PredictorPaletteEntries.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.PredictorPaletteEntries !== undefined) this.PredictorPaletteEntries = data.PredictorPaletteEntries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265PredictorPaletteEntries.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get PredictorPaletteEntries(): Uint16Array { + return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 0, 384); + } + + set PredictorPaletteEntries(value: Uint16Array) { + this.#data.set(new Uint8Array(value.buffer), 0); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265ProfileTierLevel.ts b/api/struct/StdVideoH265ProfileTierLevel.ts new file mode 100644 index 0000000..bc9e300 --- /dev/null +++ b/api/struct/StdVideoH265ProfileTierLevel.ts @@ -0,0 +1,85 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH265ProfileTierLevelFlags} from "./StdVideoH265ProfileTierLevelFlags.ts"; +import { StdVideoH265ProfileIdc, StdVideoH265LevelIdc } from "../enum.ts"; + +export interface InitStdVideoH265ProfileTierLevel { + flags?: StdVideoH265ProfileTierLevelFlags; + general_profile_idc?: StdVideoH265ProfileIdc; + general_level_idc?: StdVideoH265LevelIdc; +} + +/** profile_tier_level */ +export class StdVideoH265ProfileTierLevel implements BaseStruct { + static size = 28; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265ProfileTierLevel); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ProfileTierLevel) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265ProfileTierLevel.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265ProfileTierLevel.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265ProfileTierLevel.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.general_profile_idc !== undefined) this.general_profile_idc = data.general_profile_idc; + if (data.general_level_idc !== undefined) this.general_level_idc = data.general_level_idc; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ProfileTierLevel.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH265ProfileTierLevelFlags { + return new StdVideoH265ProfileTierLevelFlags(this.#data.subarray(0, 0 + StdVideoH265ProfileTierLevelFlags.size)); + } + + set flags(value: StdVideoH265ProfileTierLevelFlags) { + if (value[BUFFER].byteLength < StdVideoH265ProfileTierLevelFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get general_profile_idc(): number { + return this.#view.getUint32(20, LE); + } + + set general_profile_idc(value: StdVideoH265ProfileIdc) { + this.#view.setUint32(20, Number(value), LE); + } + + get general_level_idc(): number { + return this.#view.getUint32(24, LE); + } + + set general_level_idc(value: StdVideoH265LevelIdc) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265ProfileTierLevelFlags.ts b/api/struct/StdVideoH265ProfileTierLevelFlags.ts new file mode 100644 index 0000000..499ff73 --- /dev/null +++ b/api/struct/StdVideoH265ProfileTierLevelFlags.ts @@ -0,0 +1,99 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265ProfileTierLevelFlags { + general_tier_flag?: number; + general_progressive_source_flag?: number; + general_interlaced_source_flag?: number; + general_non_packed_constraint_flag?: number; + general_frame_only_constraint_flag?: number; +} + +export class StdVideoH265ProfileTierLevelFlags implements BaseStruct { + static size = 20; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265ProfileTierLevelFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ProfileTierLevelFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265ProfileTierLevelFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265ProfileTierLevelFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265ProfileTierLevelFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.general_tier_flag !== undefined) this.general_tier_flag = data.general_tier_flag; + if (data.general_progressive_source_flag !== undefined) this.general_progressive_source_flag = data.general_progressive_source_flag; + if (data.general_interlaced_source_flag !== undefined) this.general_interlaced_source_flag = data.general_interlaced_source_flag; + if (data.general_non_packed_constraint_flag !== undefined) this.general_non_packed_constraint_flag = data.general_non_packed_constraint_flag; + if (data.general_frame_only_constraint_flag !== undefined) this.general_frame_only_constraint_flag = data.general_frame_only_constraint_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ProfileTierLevelFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get general_tier_flag(): number { + return this.#view.getUint32(0, LE); + } + + set general_tier_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get general_progressive_source_flag(): number { + return this.#view.getUint32(4, LE); + } + + set general_progressive_source_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get general_interlaced_source_flag(): number { + return this.#view.getUint32(8, LE); + } + + set general_interlaced_source_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get general_non_packed_constraint_flag(): number { + return this.#view.getUint32(12, LE); + } + + set general_non_packed_constraint_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get general_frame_only_constraint_flag(): number { + return this.#view.getUint32(16, LE); + } + + set general_frame_only_constraint_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265ScalingLists.ts b/api/struct/StdVideoH265ScalingLists.ts new file mode 100644 index 0000000..41957de --- /dev/null +++ b/api/struct/StdVideoH265ScalingLists.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265ScalingLists { + ScalingList4x4?: Uint8Array; + ScalingList8x8?: Uint8Array; + ScalingList16x16?: Uint8Array; + ScalingList32x32?: Uint8Array; + ScalingListDCCoef16x16?: Uint8Array; + ScalingListDCCoef32x32?: Uint8Array; +} + +export class StdVideoH265ScalingLists implements BaseStruct { + static size = 1000; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265ScalingLists); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ScalingLists) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265ScalingLists.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265ScalingLists.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265ScalingLists.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.ScalingList4x4 !== undefined) this.ScalingList4x4 = data.ScalingList4x4; + if (data.ScalingList8x8 !== undefined) this.ScalingList8x8 = data.ScalingList8x8; + if (data.ScalingList16x16 !== undefined) this.ScalingList16x16 = data.ScalingList16x16; + if (data.ScalingList32x32 !== undefined) this.ScalingList32x32 = data.ScalingList32x32; + if (data.ScalingListDCCoef16x16 !== undefined) this.ScalingListDCCoef16x16 = data.ScalingListDCCoef16x16; + if (data.ScalingListDCCoef32x32 !== undefined) this.ScalingListDCCoef32x32 = data.ScalingListDCCoef32x32; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ScalingLists.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get ScalingList4x4(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 96); + } + + set ScalingList4x4(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 0); + } + + get ScalingList8x8(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 96, 384); + } + + set ScalingList8x8(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 96); + } + + get ScalingList16x16(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 480, 384); + } + + set ScalingList16x16(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 480); + } + + get ScalingList32x32(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 864, 128); + } + + set ScalingList32x32(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 864); + } + + get ScalingListDCCoef16x16(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 992, 6); + } + + set ScalingListDCCoef16x16(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 992); + } + + get ScalingListDCCoef32x32(): Uint8Array { + return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 998, 2); + } + + set ScalingListDCCoef32x32(value: Uint8Array) { + this.#data.set(new Uint8Array(value.buffer), 998); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265SequenceParameterSet.ts b/api/struct/StdVideoH265SequenceParameterSet.ts new file mode 100644 index 0000000..4b605a9 --- /dev/null +++ b/api/struct/StdVideoH265SequenceParameterSet.ts @@ -0,0 +1,451 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH265SpsFlags} from "./StdVideoH265SpsFlags.ts"; +import {StdVideoH265ProfileTierLevel} from "./StdVideoH265ProfileTierLevel.ts"; +import {StdVideoH265DecPicBufMgr} from "./StdVideoH265DecPicBufMgr.ts"; +import {StdVideoH265ScalingLists} from "./StdVideoH265ScalingLists.ts"; +import {StdVideoH265ShortTermRefPicSet} from "./StdVideoH265ShortTermRefPicSet.ts"; +import {StdVideoH265LongTermRefPicsSps} from "./StdVideoH265LongTermRefPicsSps.ts"; +import {StdVideoH265SequenceParameterSetVui} from "./StdVideoH265SequenceParameterSetVui.ts"; +import {StdVideoH265PredictorPaletteEntries} from "./StdVideoH265PredictorPaletteEntries.ts"; +import { StdVideoH265ChromaFormatIdc } from "../enum.ts"; + +export interface InitStdVideoH265SequenceParameterSet { + flags?: StdVideoH265SpsFlags; + chroma_format_idc?: StdVideoH265ChromaFormatIdc; + pic_width_in_luma_samples?: number; + pic_height_in_luma_samples?: number; + sps_video_parameter_set_id?: number; + sps_max_sub_layers_minus1?: number; + sps_seq_parameter_set_id?: number; + bit_depth_luma_minus8?: number; + bit_depth_chroma_minus8?: number; + log2_max_pic_order_cnt_lsb_minus4?: number; + log2_min_luma_coding_block_size_minus3?: number; + log2_diff_max_min_luma_coding_block_size?: number; + log2_min_luma_transform_block_size_minus2?: number; + log2_diff_max_min_luma_transform_block_size?: number; + max_transform_hierarchy_depth_inter?: number; + max_transform_hierarchy_depth_intra?: number; + num_short_term_ref_pic_sets?: number; + num_long_term_ref_pics_sps?: number; + pcm_sample_bit_depth_luma_minus1?: number; + pcm_sample_bit_depth_chroma_minus1?: number; + log2_min_pcm_luma_coding_block_size_minus3?: number; + log2_diff_max_min_pcm_luma_coding_block_size?: number; + reserved1?: number; + reserved2?: number; + palette_max_size?: number; + delta_palette_max_predictor_size?: number; + motion_vector_resolution_control_idc?: number; + sps_num_palette_predictor_initializers_minus1?: number; + conf_win_left_offset?: number; + conf_win_right_offset?: number; + conf_win_top_offset?: number; + conf_win_bottom_offset?: number; + pProfileTierLevel?: AnyPointer; + pDecPicBufMgr?: AnyPointer; + pScalingLists?: AnyPointer; + pShortTermRefPicSet?: AnyPointer; + pLongTermRefPicsSps?: AnyPointer; + pSequenceParameterSetVui?: AnyPointer; + pPredictorPaletteEntries?: AnyPointer; +} + +export class StdVideoH265SequenceParameterSet implements BaseStruct { + static size = 232; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265SequenceParameterSet); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SequenceParameterSet) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265SequenceParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265SequenceParameterSet.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265SequenceParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.chroma_format_idc !== undefined) this.chroma_format_idc = data.chroma_format_idc; + if (data.pic_width_in_luma_samples !== undefined) this.pic_width_in_luma_samples = data.pic_width_in_luma_samples; + if (data.pic_height_in_luma_samples !== undefined) this.pic_height_in_luma_samples = data.pic_height_in_luma_samples; + if (data.sps_video_parameter_set_id !== undefined) this.sps_video_parameter_set_id = data.sps_video_parameter_set_id; + if (data.sps_max_sub_layers_minus1 !== undefined) this.sps_max_sub_layers_minus1 = data.sps_max_sub_layers_minus1; + if (data.sps_seq_parameter_set_id !== undefined) this.sps_seq_parameter_set_id = data.sps_seq_parameter_set_id; + if (data.bit_depth_luma_minus8 !== undefined) this.bit_depth_luma_minus8 = data.bit_depth_luma_minus8; + if (data.bit_depth_chroma_minus8 !== undefined) this.bit_depth_chroma_minus8 = data.bit_depth_chroma_minus8; + if (data.log2_max_pic_order_cnt_lsb_minus4 !== undefined) this.log2_max_pic_order_cnt_lsb_minus4 = data.log2_max_pic_order_cnt_lsb_minus4; + if (data.log2_min_luma_coding_block_size_minus3 !== undefined) this.log2_min_luma_coding_block_size_minus3 = data.log2_min_luma_coding_block_size_minus3; + if (data.log2_diff_max_min_luma_coding_block_size !== undefined) this.log2_diff_max_min_luma_coding_block_size = data.log2_diff_max_min_luma_coding_block_size; + if (data.log2_min_luma_transform_block_size_minus2 !== undefined) this.log2_min_luma_transform_block_size_minus2 = data.log2_min_luma_transform_block_size_minus2; + if (data.log2_diff_max_min_luma_transform_block_size !== undefined) this.log2_diff_max_min_luma_transform_block_size = data.log2_diff_max_min_luma_transform_block_size; + if (data.max_transform_hierarchy_depth_inter !== undefined) this.max_transform_hierarchy_depth_inter = data.max_transform_hierarchy_depth_inter; + if (data.max_transform_hierarchy_depth_intra !== undefined) this.max_transform_hierarchy_depth_intra = data.max_transform_hierarchy_depth_intra; + if (data.num_short_term_ref_pic_sets !== undefined) this.num_short_term_ref_pic_sets = data.num_short_term_ref_pic_sets; + if (data.num_long_term_ref_pics_sps !== undefined) this.num_long_term_ref_pics_sps = data.num_long_term_ref_pics_sps; + if (data.pcm_sample_bit_depth_luma_minus1 !== undefined) this.pcm_sample_bit_depth_luma_minus1 = data.pcm_sample_bit_depth_luma_minus1; + if (data.pcm_sample_bit_depth_chroma_minus1 !== undefined) this.pcm_sample_bit_depth_chroma_minus1 = data.pcm_sample_bit_depth_chroma_minus1; + if (data.log2_min_pcm_luma_coding_block_size_minus3 !== undefined) this.log2_min_pcm_luma_coding_block_size_minus3 = data.log2_min_pcm_luma_coding_block_size_minus3; + if (data.log2_diff_max_min_pcm_luma_coding_block_size !== undefined) this.log2_diff_max_min_pcm_luma_coding_block_size = data.log2_diff_max_min_pcm_luma_coding_block_size; + if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; + if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; + if (data.palette_max_size !== undefined) this.palette_max_size = data.palette_max_size; + if (data.delta_palette_max_predictor_size !== undefined) this.delta_palette_max_predictor_size = data.delta_palette_max_predictor_size; + if (data.motion_vector_resolution_control_idc !== undefined) this.motion_vector_resolution_control_idc = data.motion_vector_resolution_control_idc; + if (data.sps_num_palette_predictor_initializers_minus1 !== undefined) this.sps_num_palette_predictor_initializers_minus1 = data.sps_num_palette_predictor_initializers_minus1; + if (data.conf_win_left_offset !== undefined) this.conf_win_left_offset = data.conf_win_left_offset; + if (data.conf_win_right_offset !== undefined) this.conf_win_right_offset = data.conf_win_right_offset; + if (data.conf_win_top_offset !== undefined) this.conf_win_top_offset = data.conf_win_top_offset; + if (data.conf_win_bottom_offset !== undefined) this.conf_win_bottom_offset = data.conf_win_bottom_offset; + if (data.pProfileTierLevel !== undefined) this.pProfileTierLevel = data.pProfileTierLevel; + if (data.pDecPicBufMgr !== undefined) this.pDecPicBufMgr = data.pDecPicBufMgr; + if (data.pScalingLists !== undefined) this.pScalingLists = data.pScalingLists; + if (data.pShortTermRefPicSet !== undefined) this.pShortTermRefPicSet = data.pShortTermRefPicSet; + if (data.pLongTermRefPicsSps !== undefined) this.pLongTermRefPicsSps = data.pLongTermRefPicsSps; + if (data.pSequenceParameterSetVui !== undefined) this.pSequenceParameterSetVui = data.pSequenceParameterSetVui; + if (data.pPredictorPaletteEntries !== undefined) this.pPredictorPaletteEntries = data.pPredictorPaletteEntries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SequenceParameterSet.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH265SpsFlags { + return new StdVideoH265SpsFlags(this.#data.subarray(0, 0 + StdVideoH265SpsFlags.size)); + } + + set flags(value: StdVideoH265SpsFlags) { + if (value[BUFFER].byteLength < StdVideoH265SpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get chroma_format_idc(): number { + return this.#view.getUint32(120, LE); + } + + set chroma_format_idc(value: StdVideoH265ChromaFormatIdc) { + this.#view.setUint32(120, Number(value), LE); + } + + get pic_width_in_luma_samples(): number { + return this.#view.getUint32(124, LE); + } + + set pic_width_in_luma_samples(value: number) { + this.#view.setUint32(124, Number(value), LE); + } + + get pic_height_in_luma_samples(): number { + return this.#view.getUint32(128, LE); + } + + set pic_height_in_luma_samples(value: number) { + this.#view.setUint32(128, Number(value), LE); + } + + get sps_video_parameter_set_id(): number { + return this.#view.getUint8(132); + } + + set sps_video_parameter_set_id(value: number) { + this.#view.setUint8(132, Number(value)); + } + + get sps_max_sub_layers_minus1(): number { + return this.#view.getUint8(133); + } + + set sps_max_sub_layers_minus1(value: number) { + this.#view.setUint8(133, Number(value)); + } + + get sps_seq_parameter_set_id(): number { + return this.#view.getUint8(134); + } + + set sps_seq_parameter_set_id(value: number) { + this.#view.setUint8(134, Number(value)); + } + + get bit_depth_luma_minus8(): number { + return this.#view.getUint8(135); + } + + set bit_depth_luma_minus8(value: number) { + this.#view.setUint8(135, Number(value)); + } + + get bit_depth_chroma_minus8(): number { + return this.#view.getUint8(136); + } + + set bit_depth_chroma_minus8(value: number) { + this.#view.setUint8(136, Number(value)); + } + + get log2_max_pic_order_cnt_lsb_minus4(): number { + return this.#view.getUint8(137); + } + + set log2_max_pic_order_cnt_lsb_minus4(value: number) { + this.#view.setUint8(137, Number(value)); + } + + get log2_min_luma_coding_block_size_minus3(): number { + return this.#view.getUint8(138); + } + + set log2_min_luma_coding_block_size_minus3(value: number) { + this.#view.setUint8(138, Number(value)); + } + + get log2_diff_max_min_luma_coding_block_size(): number { + return this.#view.getUint8(139); + } + + set log2_diff_max_min_luma_coding_block_size(value: number) { + this.#view.setUint8(139, Number(value)); + } + + get log2_min_luma_transform_block_size_minus2(): number { + return this.#view.getUint8(140); + } + + set log2_min_luma_transform_block_size_minus2(value: number) { + this.#view.setUint8(140, Number(value)); + } + + get log2_diff_max_min_luma_transform_block_size(): number { + return this.#view.getUint8(141); + } + + set log2_diff_max_min_luma_transform_block_size(value: number) { + this.#view.setUint8(141, Number(value)); + } + + get max_transform_hierarchy_depth_inter(): number { + return this.#view.getUint8(142); + } + + set max_transform_hierarchy_depth_inter(value: number) { + this.#view.setUint8(142, Number(value)); + } + + get max_transform_hierarchy_depth_intra(): number { + return this.#view.getUint8(143); + } + + set max_transform_hierarchy_depth_intra(value: number) { + this.#view.setUint8(143, Number(value)); + } + + get num_short_term_ref_pic_sets(): number { + return this.#view.getUint8(144); + } + + set num_short_term_ref_pic_sets(value: number) { + this.#view.setUint8(144, Number(value)); + } + + get num_long_term_ref_pics_sps(): number { + return this.#view.getUint8(145); + } + + set num_long_term_ref_pics_sps(value: number) { + this.#view.setUint8(145, Number(value)); + } + + get pcm_sample_bit_depth_luma_minus1(): number { + return this.#view.getUint8(146); + } + + set pcm_sample_bit_depth_luma_minus1(value: number) { + this.#view.setUint8(146, Number(value)); + } + + get pcm_sample_bit_depth_chroma_minus1(): number { + return this.#view.getUint8(147); + } + + set pcm_sample_bit_depth_chroma_minus1(value: number) { + this.#view.setUint8(147, Number(value)); + } + + get log2_min_pcm_luma_coding_block_size_minus3(): number { + return this.#view.getUint8(148); + } + + set log2_min_pcm_luma_coding_block_size_minus3(value: number) { + this.#view.setUint8(148, Number(value)); + } + + get log2_diff_max_min_pcm_luma_coding_block_size(): number { + return this.#view.getUint8(149); + } + + set log2_diff_max_min_pcm_luma_coding_block_size(value: number) { + this.#view.setUint8(149, Number(value)); + } + + get reserved1(): number { + return this.#view.getUint8(150); + } + + set reserved1(value: number) { + this.#view.setUint8(150, Number(value)); + } + + get reserved2(): number { + return this.#view.getUint8(151); + } + + set reserved2(value: number) { + this.#view.setUint8(151, Number(value)); + } + + get palette_max_size(): number { + return this.#view.getUint8(152); + } + + set palette_max_size(value: number) { + this.#view.setUint8(152, Number(value)); + } + + get delta_palette_max_predictor_size(): number { + return this.#view.getUint8(153); + } + + set delta_palette_max_predictor_size(value: number) { + this.#view.setUint8(153, Number(value)); + } + + get motion_vector_resolution_control_idc(): number { + return this.#view.getUint8(154); + } + + set motion_vector_resolution_control_idc(value: number) { + this.#view.setUint8(154, Number(value)); + } + + get sps_num_palette_predictor_initializers_minus1(): number { + return this.#view.getUint8(155); + } + + set sps_num_palette_predictor_initializers_minus1(value: number) { + this.#view.setUint8(155, Number(value)); + } + + get conf_win_left_offset(): number { + return this.#view.getUint32(156, LE); + } + + set conf_win_left_offset(value: number) { + this.#view.setUint32(156, Number(value), LE); + } + + get conf_win_right_offset(): number { + return this.#view.getUint32(160, LE); + } + + set conf_win_right_offset(value: number) { + this.#view.setUint32(160, Number(value), LE); + } + + get conf_win_top_offset(): number { + return this.#view.getUint32(164, LE); + } + + set conf_win_top_offset(value: number) { + this.#view.setUint32(164, Number(value), LE); + } + + get conf_win_bottom_offset(): number { + return this.#view.getUint32(168, LE); + } + + set conf_win_bottom_offset(value: number) { + this.#view.setUint32(168, Number(value), LE); + } + + get pProfileTierLevel(): Deno.PointerValue { + return pointerFromView(this.#view, 176, LE); + } + + set pProfileTierLevel(value: AnyPointer) { + this.#view.setBigUint64(176, BigInt(anyPointer(value)), LE); + } + + get pDecPicBufMgr(): Deno.PointerValue { + return pointerFromView(this.#view, 184, LE); + } + + set pDecPicBufMgr(value: AnyPointer) { + this.#view.setBigUint64(184, BigInt(anyPointer(value)), LE); + } + + get pScalingLists(): Deno.PointerValue { + return pointerFromView(this.#view, 192, LE); + } + + set pScalingLists(value: AnyPointer) { + this.#view.setBigUint64(192, BigInt(anyPointer(value)), LE); + } + + get pShortTermRefPicSet(): Deno.PointerValue { + return pointerFromView(this.#view, 200, LE); + } + + set pShortTermRefPicSet(value: AnyPointer) { + this.#view.setBigUint64(200, BigInt(anyPointer(value)), LE); + } + + get pLongTermRefPicsSps(): Deno.PointerValue { + return pointerFromView(this.#view, 208, LE); + } + + set pLongTermRefPicsSps(value: AnyPointer) { + this.#view.setBigUint64(208, BigInt(anyPointer(value)), LE); + } + + get pSequenceParameterSetVui(): Deno.PointerValue { + return pointerFromView(this.#view, 216, LE); + } + + set pSequenceParameterSetVui(value: AnyPointer) { + this.#view.setBigUint64(216, BigInt(anyPointer(value)), LE); + } + + get pPredictorPaletteEntries(): Deno.PointerValue { + return pointerFromView(this.#view, 224, LE); + } + + set pPredictorPaletteEntries(value: AnyPointer) { + this.#view.setBigUint64(224, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265SequenceParameterSetVui.ts b/api/struct/StdVideoH265SequenceParameterSetVui.ts new file mode 100644 index 0000000..819f9d1 --- /dev/null +++ b/api/struct/StdVideoH265SequenceParameterSetVui.ts @@ -0,0 +1,315 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH265SpsVuiFlags} from "./StdVideoH265SpsVuiFlags.ts"; +import {StdVideoH265HrdParameters} from "./StdVideoH265HrdParameters.ts"; +import { StdVideoH265AspectRatioIdc } from "../enum.ts"; + +export interface InitStdVideoH265SequenceParameterSetVui { + flags?: StdVideoH265SpsVuiFlags; + aspect_ratio_idc?: StdVideoH265AspectRatioIdc; + sar_width?: number; + sar_height?: number; + video_format?: number; + colour_primaries?: number; + transfer_characteristics?: number; + matrix_coeffs?: number; + chroma_sample_loc_type_top_field?: number; + chroma_sample_loc_type_bottom_field?: number; + reserved1?: number; + reserved2?: number; + def_disp_win_left_offset?: number; + def_disp_win_right_offset?: number; + def_disp_win_top_offset?: number; + def_disp_win_bottom_offset?: number; + vui_num_units_in_tick?: number; + vui_time_scale?: number; + vui_num_ticks_poc_diff_one_minus1?: number; + min_spatial_segmentation_idc?: number; + reserved3?: number; + max_bytes_per_pic_denom?: number; + max_bits_per_min_cu_denom?: number; + log2_max_mv_length_horizontal?: number; + log2_max_mv_length_vertical?: number; + pHrdParameters?: AnyPointer; +} + +export class StdVideoH265SequenceParameterSetVui implements BaseStruct { + static size = 128; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265SequenceParameterSetVui); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SequenceParameterSetVui) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265SequenceParameterSetVui.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265SequenceParameterSetVui.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265SequenceParameterSetVui.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.aspect_ratio_idc !== undefined) this.aspect_ratio_idc = data.aspect_ratio_idc; + if (data.sar_width !== undefined) this.sar_width = data.sar_width; + if (data.sar_height !== undefined) this.sar_height = data.sar_height; + if (data.video_format !== undefined) this.video_format = data.video_format; + if (data.colour_primaries !== undefined) this.colour_primaries = data.colour_primaries; + if (data.transfer_characteristics !== undefined) this.transfer_characteristics = data.transfer_characteristics; + if (data.matrix_coeffs !== undefined) this.matrix_coeffs = data.matrix_coeffs; + if (data.chroma_sample_loc_type_top_field !== undefined) this.chroma_sample_loc_type_top_field = data.chroma_sample_loc_type_top_field; + if (data.chroma_sample_loc_type_bottom_field !== undefined) this.chroma_sample_loc_type_bottom_field = data.chroma_sample_loc_type_bottom_field; + if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; + if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; + if (data.def_disp_win_left_offset !== undefined) this.def_disp_win_left_offset = data.def_disp_win_left_offset; + if (data.def_disp_win_right_offset !== undefined) this.def_disp_win_right_offset = data.def_disp_win_right_offset; + if (data.def_disp_win_top_offset !== undefined) this.def_disp_win_top_offset = data.def_disp_win_top_offset; + if (data.def_disp_win_bottom_offset !== undefined) this.def_disp_win_bottom_offset = data.def_disp_win_bottom_offset; + if (data.vui_num_units_in_tick !== undefined) this.vui_num_units_in_tick = data.vui_num_units_in_tick; + if (data.vui_time_scale !== undefined) this.vui_time_scale = data.vui_time_scale; + if (data.vui_num_ticks_poc_diff_one_minus1 !== undefined) this.vui_num_ticks_poc_diff_one_minus1 = data.vui_num_ticks_poc_diff_one_minus1; + if (data.min_spatial_segmentation_idc !== undefined) this.min_spatial_segmentation_idc = data.min_spatial_segmentation_idc; + if (data.reserved3 !== undefined) this.reserved3 = data.reserved3; + if (data.max_bytes_per_pic_denom !== undefined) this.max_bytes_per_pic_denom = data.max_bytes_per_pic_denom; + if (data.max_bits_per_min_cu_denom !== undefined) this.max_bits_per_min_cu_denom = data.max_bits_per_min_cu_denom; + if (data.log2_max_mv_length_horizontal !== undefined) this.log2_max_mv_length_horizontal = data.log2_max_mv_length_horizontal; + if (data.log2_max_mv_length_vertical !== undefined) this.log2_max_mv_length_vertical = data.log2_max_mv_length_vertical; + if (data.pHrdParameters !== undefined) this.pHrdParameters = data.pHrdParameters; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SequenceParameterSetVui.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH265SpsVuiFlags { + return new StdVideoH265SpsVuiFlags(this.#data.subarray(0, 0 + StdVideoH265SpsVuiFlags.size)); + } + + set flags(value: StdVideoH265SpsVuiFlags) { + if (value[BUFFER].byteLength < StdVideoH265SpsVuiFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get aspect_ratio_idc(): number { + return this.#view.getUint32(72, LE); + } + + set aspect_ratio_idc(value: StdVideoH265AspectRatioIdc) { + this.#view.setUint32(72, Number(value), LE); + } + + get sar_width(): number { + return this.#view.getUint16(76, LE); + } + + set sar_width(value: number) { + this.#view.setUint16(76, Number(value), LE); + } + + get sar_height(): number { + return this.#view.getUint16(78, LE); + } + + set sar_height(value: number) { + this.#view.setUint16(78, Number(value), LE); + } + + get video_format(): number { + return this.#view.getUint8(80); + } + + set video_format(value: number) { + this.#view.setUint8(80, Number(value)); + } + + get colour_primaries(): number { + return this.#view.getUint8(81); + } + + set colour_primaries(value: number) { + this.#view.setUint8(81, Number(value)); + } + + get transfer_characteristics(): number { + return this.#view.getUint8(82); + } + + set transfer_characteristics(value: number) { + this.#view.setUint8(82, Number(value)); + } + + get matrix_coeffs(): number { + return this.#view.getUint8(83); + } + + set matrix_coeffs(value: number) { + this.#view.setUint8(83, Number(value)); + } + + get chroma_sample_loc_type_top_field(): number { + return this.#view.getUint8(84); + } + + set chroma_sample_loc_type_top_field(value: number) { + this.#view.setUint8(84, Number(value)); + } + + get chroma_sample_loc_type_bottom_field(): number { + return this.#view.getUint8(85); + } + + set chroma_sample_loc_type_bottom_field(value: number) { + this.#view.setUint8(85, Number(value)); + } + + get reserved1(): number { + return this.#view.getUint8(86); + } + + set reserved1(value: number) { + this.#view.setUint8(86, Number(value)); + } + + get reserved2(): number { + return this.#view.getUint8(87); + } + + set reserved2(value: number) { + this.#view.setUint8(87, Number(value)); + } + + get def_disp_win_left_offset(): number { + return this.#view.getUint16(88, LE); + } + + set def_disp_win_left_offset(value: number) { + this.#view.setUint16(88, Number(value), LE); + } + + get def_disp_win_right_offset(): number { + return this.#view.getUint16(90, LE); + } + + set def_disp_win_right_offset(value: number) { + this.#view.setUint16(90, Number(value), LE); + } + + get def_disp_win_top_offset(): number { + return this.#view.getUint16(92, LE); + } + + set def_disp_win_top_offset(value: number) { + this.#view.setUint16(92, Number(value), LE); + } + + get def_disp_win_bottom_offset(): number { + return this.#view.getUint16(94, LE); + } + + set def_disp_win_bottom_offset(value: number) { + this.#view.setUint16(94, Number(value), LE); + } + + get vui_num_units_in_tick(): number { + return this.#view.getUint32(96, LE); + } + + set vui_num_units_in_tick(value: number) { + this.#view.setUint32(96, Number(value), LE); + } + + get vui_time_scale(): number { + return this.#view.getUint32(100, LE); + } + + set vui_time_scale(value: number) { + this.#view.setUint32(100, Number(value), LE); + } + + get vui_num_ticks_poc_diff_one_minus1(): number { + return this.#view.getUint32(104, LE); + } + + set vui_num_ticks_poc_diff_one_minus1(value: number) { + this.#view.setUint32(104, Number(value), LE); + } + + get min_spatial_segmentation_idc(): number { + return this.#view.getUint16(108, LE); + } + + set min_spatial_segmentation_idc(value: number) { + this.#view.setUint16(108, Number(value), LE); + } + + get reserved3(): number { + return this.#view.getUint16(110, LE); + } + + set reserved3(value: number) { + this.#view.setUint16(110, Number(value), LE); + } + + get max_bytes_per_pic_denom(): number { + return this.#view.getUint8(112); + } + + set max_bytes_per_pic_denom(value: number) { + this.#view.setUint8(112, Number(value)); + } + + get max_bits_per_min_cu_denom(): number { + return this.#view.getUint8(113); + } + + set max_bits_per_min_cu_denom(value: number) { + this.#view.setUint8(113, Number(value)); + } + + get log2_max_mv_length_horizontal(): number { + return this.#view.getUint8(114); + } + + set log2_max_mv_length_horizontal(value: number) { + this.#view.setUint8(114, Number(value)); + } + + get log2_max_mv_length_vertical(): number { + return this.#view.getUint8(115); + } + + set log2_max_mv_length_vertical(value: number) { + this.#view.setUint8(115, Number(value)); + } + + get pHrdParameters(): Deno.PointerValue { + return pointerFromView(this.#view, 120, LE); + } + + set pHrdParameters(value: AnyPointer) { + this.#view.setBigUint64(120, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265ShortTermRefPicSet.ts b/api/struct/StdVideoH265ShortTermRefPicSet.ts new file mode 100644 index 0000000..97c6736 --- /dev/null +++ b/api/struct/StdVideoH265ShortTermRefPicSet.ts @@ -0,0 +1,193 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH265ShortTermRefPicSetFlags} from "./StdVideoH265ShortTermRefPicSetFlags.ts"; + +export interface InitStdVideoH265ShortTermRefPicSet { + flags?: StdVideoH265ShortTermRefPicSetFlags; + delta_idx_minus1?: number; + use_delta_flag?: number; + abs_delta_rps_minus1?: number; + used_by_curr_pic_flag?: number; + used_by_curr_pic_s0_flag?: number; + used_by_curr_pic_s1_flag?: number; + reserved1?: number; + reserved2?: number; + reserved3?: number; + num_negative_pics?: number; + num_positive_pics?: number; + delta_poc_s0_minus1?: Uint16Array; + delta_poc_s1_minus1?: Uint16Array; +} + +export class StdVideoH265ShortTermRefPicSet implements BaseStruct { + static size = 92; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265ShortTermRefPicSet); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ShortTermRefPicSet) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265ShortTermRefPicSet.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.delta_idx_minus1 !== undefined) this.delta_idx_minus1 = data.delta_idx_minus1; + if (data.use_delta_flag !== undefined) this.use_delta_flag = data.use_delta_flag; + if (data.abs_delta_rps_minus1 !== undefined) this.abs_delta_rps_minus1 = data.abs_delta_rps_minus1; + if (data.used_by_curr_pic_flag !== undefined) this.used_by_curr_pic_flag = data.used_by_curr_pic_flag; + if (data.used_by_curr_pic_s0_flag !== undefined) this.used_by_curr_pic_s0_flag = data.used_by_curr_pic_s0_flag; + if (data.used_by_curr_pic_s1_flag !== undefined) this.used_by_curr_pic_s1_flag = data.used_by_curr_pic_s1_flag; + if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; + if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; + if (data.reserved3 !== undefined) this.reserved3 = data.reserved3; + if (data.num_negative_pics !== undefined) this.num_negative_pics = data.num_negative_pics; + if (data.num_positive_pics !== undefined) this.num_positive_pics = data.num_positive_pics; + if (data.delta_poc_s0_minus1 !== undefined) this.delta_poc_s0_minus1 = data.delta_poc_s0_minus1; + if (data.delta_poc_s1_minus1 !== undefined) this.delta_poc_s1_minus1 = data.delta_poc_s1_minus1; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ShortTermRefPicSet.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH265ShortTermRefPicSetFlags { + return new StdVideoH265ShortTermRefPicSetFlags(this.#data.subarray(0, 0 + StdVideoH265ShortTermRefPicSetFlags.size)); + } + + set flags(value: StdVideoH265ShortTermRefPicSetFlags) { + if (value[BUFFER].byteLength < StdVideoH265ShortTermRefPicSetFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get delta_idx_minus1(): number { + return this.#view.getUint32(8, LE); + } + + set delta_idx_minus1(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get use_delta_flag(): number { + return this.#view.getUint16(12, LE); + } + + set use_delta_flag(value: number) { + this.#view.setUint16(12, Number(value), LE); + } + + get abs_delta_rps_minus1(): number { + return this.#view.getUint16(14, LE); + } + + set abs_delta_rps_minus1(value: number) { + this.#view.setUint16(14, Number(value), LE); + } + + get used_by_curr_pic_flag(): number { + return this.#view.getUint16(16, LE); + } + + set used_by_curr_pic_flag(value: number) { + this.#view.setUint16(16, Number(value), LE); + } + + get used_by_curr_pic_s0_flag(): number { + return this.#view.getUint16(18, LE); + } + + set used_by_curr_pic_s0_flag(value: number) { + this.#view.setUint16(18, Number(value), LE); + } + + get used_by_curr_pic_s1_flag(): number { + return this.#view.getUint16(20, LE); + } + + set used_by_curr_pic_s1_flag(value: number) { + this.#view.setUint16(20, Number(value), LE); + } + + get reserved1(): number { + return this.#view.getUint16(22, LE); + } + + set reserved1(value: number) { + this.#view.setUint16(22, Number(value), LE); + } + + get reserved2(): number { + return this.#view.getUint8(24); + } + + set reserved2(value: number) { + this.#view.setUint8(24, Number(value)); + } + + get reserved3(): number { + return this.#view.getUint8(25); + } + + set reserved3(value: number) { + this.#view.setUint8(25, Number(value)); + } + + get num_negative_pics(): number { + return this.#view.getUint8(26); + } + + set num_negative_pics(value: number) { + this.#view.setUint8(26, Number(value)); + } + + get num_positive_pics(): number { + return this.#view.getUint8(27); + } + + set num_positive_pics(value: number) { + this.#view.setUint8(27, Number(value)); + } + + get delta_poc_s0_minus1(): Uint16Array { + return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 28, 16); + } + + set delta_poc_s0_minus1(value: Uint16Array) { + this.#data.set(new Uint8Array(value.buffer), 28); + } + + get delta_poc_s1_minus1(): Uint16Array { + return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 60, 16); + } + + set delta_poc_s1_minus1(value: Uint16Array) { + this.#data.set(new Uint8Array(value.buffer), 60); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265ShortTermRefPicSetFlags.ts b/api/struct/StdVideoH265ShortTermRefPicSetFlags.ts new file mode 100644 index 0000000..84a0ed8 --- /dev/null +++ b/api/struct/StdVideoH265ShortTermRefPicSetFlags.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265ShortTermRefPicSetFlags { + inter_ref_pic_set_prediction_flag?: number; + delta_rps_sign?: number; +} + +export class StdVideoH265ShortTermRefPicSetFlags implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265ShortTermRefPicSetFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ShortTermRefPicSetFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSetFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265ShortTermRefPicSetFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSetFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.inter_ref_pic_set_prediction_flag !== undefined) this.inter_ref_pic_set_prediction_flag = data.inter_ref_pic_set_prediction_flag; + if (data.delta_rps_sign !== undefined) this.delta_rps_sign = data.delta_rps_sign; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ShortTermRefPicSetFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get inter_ref_pic_set_prediction_flag(): number { + return this.#view.getUint32(0, LE); + } + + set inter_ref_pic_set_prediction_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get delta_rps_sign(): number { + return this.#view.getUint32(4, LE); + } + + set delta_rps_sign(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265SpsFlags.ts b/api/struct/StdVideoH265SpsFlags.ts new file mode 100644 index 0000000..519c635 --- /dev/null +++ b/api/struct/StdVideoH265SpsFlags.ts @@ -0,0 +1,349 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265SpsFlags { + sps_temporal_id_nesting_flag?: number; + separate_colour_plane_flag?: number; + conformance_window_flag?: number; + sps_sub_layer_ordering_info_present_flag?: number; + scaling_list_enabled_flag?: number; + sps_scaling_list_data_present_flag?: number; + amp_enabled_flag?: number; + sample_adaptive_offset_enabled_flag?: number; + pcm_enabled_flag?: number; + pcm_loop_filter_disabled_flag?: number; + long_term_ref_pics_present_flag?: number; + sps_temporal_mvp_enabled_flag?: number; + strong_intra_smoothing_enabled_flag?: number; + vui_parameters_present_flag?: number; + sps_extension_present_flag?: number; + sps_range_extension_flag?: number; + transform_skip_rotation_enabled_flag?: number; + transform_skip_context_enabled_flag?: number; + implicit_rdpcm_enabled_flag?: number; + explicit_rdpcm_enabled_flag?: number; + extended_precision_processing_flag?: number; + intra_smoothing_disabled_flag?: number; + high_precision_offsets_enabled_flag?: number; + persistent_rice_adaptation_enabled_flag?: number; + cabac_bypass_alignment_enabled_flag?: number; + sps_scc_extension_flag?: number; + sps_curr_pic_ref_enabled_flag?: number; + palette_mode_enabled_flag?: number; + sps_palette_predictor_initializers_present_flag?: number; + intra_boundary_filtering_disabled_flag?: number; +} + +export class StdVideoH265SpsFlags implements BaseStruct { + static size = 120; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265SpsFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SpsFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265SpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265SpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265SpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.sps_temporal_id_nesting_flag !== undefined) this.sps_temporal_id_nesting_flag = data.sps_temporal_id_nesting_flag; + if (data.separate_colour_plane_flag !== undefined) this.separate_colour_plane_flag = data.separate_colour_plane_flag; + if (data.conformance_window_flag !== undefined) this.conformance_window_flag = data.conformance_window_flag; + if (data.sps_sub_layer_ordering_info_present_flag !== undefined) this.sps_sub_layer_ordering_info_present_flag = data.sps_sub_layer_ordering_info_present_flag; + if (data.scaling_list_enabled_flag !== undefined) this.scaling_list_enabled_flag = data.scaling_list_enabled_flag; + if (data.sps_scaling_list_data_present_flag !== undefined) this.sps_scaling_list_data_present_flag = data.sps_scaling_list_data_present_flag; + if (data.amp_enabled_flag !== undefined) this.amp_enabled_flag = data.amp_enabled_flag; + if (data.sample_adaptive_offset_enabled_flag !== undefined) this.sample_adaptive_offset_enabled_flag = data.sample_adaptive_offset_enabled_flag; + if (data.pcm_enabled_flag !== undefined) this.pcm_enabled_flag = data.pcm_enabled_flag; + if (data.pcm_loop_filter_disabled_flag !== undefined) this.pcm_loop_filter_disabled_flag = data.pcm_loop_filter_disabled_flag; + if (data.long_term_ref_pics_present_flag !== undefined) this.long_term_ref_pics_present_flag = data.long_term_ref_pics_present_flag; + if (data.sps_temporal_mvp_enabled_flag !== undefined) this.sps_temporal_mvp_enabled_flag = data.sps_temporal_mvp_enabled_flag; + if (data.strong_intra_smoothing_enabled_flag !== undefined) this.strong_intra_smoothing_enabled_flag = data.strong_intra_smoothing_enabled_flag; + if (data.vui_parameters_present_flag !== undefined) this.vui_parameters_present_flag = data.vui_parameters_present_flag; + if (data.sps_extension_present_flag !== undefined) this.sps_extension_present_flag = data.sps_extension_present_flag; + if (data.sps_range_extension_flag !== undefined) this.sps_range_extension_flag = data.sps_range_extension_flag; + if (data.transform_skip_rotation_enabled_flag !== undefined) this.transform_skip_rotation_enabled_flag = data.transform_skip_rotation_enabled_flag; + if (data.transform_skip_context_enabled_flag !== undefined) this.transform_skip_context_enabled_flag = data.transform_skip_context_enabled_flag; + if (data.implicit_rdpcm_enabled_flag !== undefined) this.implicit_rdpcm_enabled_flag = data.implicit_rdpcm_enabled_flag; + if (data.explicit_rdpcm_enabled_flag !== undefined) this.explicit_rdpcm_enabled_flag = data.explicit_rdpcm_enabled_flag; + if (data.extended_precision_processing_flag !== undefined) this.extended_precision_processing_flag = data.extended_precision_processing_flag; + if (data.intra_smoothing_disabled_flag !== undefined) this.intra_smoothing_disabled_flag = data.intra_smoothing_disabled_flag; + if (data.high_precision_offsets_enabled_flag !== undefined) this.high_precision_offsets_enabled_flag = data.high_precision_offsets_enabled_flag; + if (data.persistent_rice_adaptation_enabled_flag !== undefined) this.persistent_rice_adaptation_enabled_flag = data.persistent_rice_adaptation_enabled_flag; + if (data.cabac_bypass_alignment_enabled_flag !== undefined) this.cabac_bypass_alignment_enabled_flag = data.cabac_bypass_alignment_enabled_flag; + if (data.sps_scc_extension_flag !== undefined) this.sps_scc_extension_flag = data.sps_scc_extension_flag; + if (data.sps_curr_pic_ref_enabled_flag !== undefined) this.sps_curr_pic_ref_enabled_flag = data.sps_curr_pic_ref_enabled_flag; + if (data.palette_mode_enabled_flag !== undefined) this.palette_mode_enabled_flag = data.palette_mode_enabled_flag; + if (data.sps_palette_predictor_initializers_present_flag !== undefined) this.sps_palette_predictor_initializers_present_flag = data.sps_palette_predictor_initializers_present_flag; + if (data.intra_boundary_filtering_disabled_flag !== undefined) this.intra_boundary_filtering_disabled_flag = data.intra_boundary_filtering_disabled_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SpsFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get sps_temporal_id_nesting_flag(): number { + return this.#view.getUint32(0, LE); + } + + set sps_temporal_id_nesting_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get separate_colour_plane_flag(): number { + return this.#view.getUint32(4, LE); + } + + set separate_colour_plane_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get conformance_window_flag(): number { + return this.#view.getUint32(8, LE); + } + + set conformance_window_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get sps_sub_layer_ordering_info_present_flag(): number { + return this.#view.getUint32(12, LE); + } + + set sps_sub_layer_ordering_info_present_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get scaling_list_enabled_flag(): number { + return this.#view.getUint32(16, LE); + } + + set scaling_list_enabled_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get sps_scaling_list_data_present_flag(): number { + return this.#view.getUint32(20, LE); + } + + set sps_scaling_list_data_present_flag(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get amp_enabled_flag(): number { + return this.#view.getUint32(24, LE); + } + + set amp_enabled_flag(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get sample_adaptive_offset_enabled_flag(): number { + return this.#view.getUint32(28, LE); + } + + set sample_adaptive_offset_enabled_flag(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get pcm_enabled_flag(): number { + return this.#view.getUint32(32, LE); + } + + set pcm_enabled_flag(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pcm_loop_filter_disabled_flag(): number { + return this.#view.getUint32(36, LE); + } + + set pcm_loop_filter_disabled_flag(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get long_term_ref_pics_present_flag(): number { + return this.#view.getUint32(40, LE); + } + + set long_term_ref_pics_present_flag(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get sps_temporal_mvp_enabled_flag(): number { + return this.#view.getUint32(44, LE); + } + + set sps_temporal_mvp_enabled_flag(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get strong_intra_smoothing_enabled_flag(): number { + return this.#view.getUint32(48, LE); + } + + set strong_intra_smoothing_enabled_flag(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get vui_parameters_present_flag(): number { + return this.#view.getUint32(52, LE); + } + + set vui_parameters_present_flag(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get sps_extension_present_flag(): number { + return this.#view.getUint32(56, LE); + } + + set sps_extension_present_flag(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get sps_range_extension_flag(): number { + return this.#view.getUint32(60, LE); + } + + set sps_range_extension_flag(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get transform_skip_rotation_enabled_flag(): number { + return this.#view.getUint32(64, LE); + } + + set transform_skip_rotation_enabled_flag(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get transform_skip_context_enabled_flag(): number { + return this.#view.getUint32(68, LE); + } + + set transform_skip_context_enabled_flag(value: number) { + this.#view.setUint32(68, Number(value), LE); + } + + get implicit_rdpcm_enabled_flag(): number { + return this.#view.getUint32(72, LE); + } + + set implicit_rdpcm_enabled_flag(value: number) { + this.#view.setUint32(72, Number(value), LE); + } + + get explicit_rdpcm_enabled_flag(): number { + return this.#view.getUint32(76, LE); + } + + set explicit_rdpcm_enabled_flag(value: number) { + this.#view.setUint32(76, Number(value), LE); + } + + get extended_precision_processing_flag(): number { + return this.#view.getUint32(80, LE); + } + + set extended_precision_processing_flag(value: number) { + this.#view.setUint32(80, Number(value), LE); + } + + get intra_smoothing_disabled_flag(): number { + return this.#view.getUint32(84, LE); + } + + set intra_smoothing_disabled_flag(value: number) { + this.#view.setUint32(84, Number(value), LE); + } + + get high_precision_offsets_enabled_flag(): number { + return this.#view.getUint32(88, LE); + } + + set high_precision_offsets_enabled_flag(value: number) { + this.#view.setUint32(88, Number(value), LE); + } + + get persistent_rice_adaptation_enabled_flag(): number { + return this.#view.getUint32(92, LE); + } + + set persistent_rice_adaptation_enabled_flag(value: number) { + this.#view.setUint32(92, Number(value), LE); + } + + get cabac_bypass_alignment_enabled_flag(): number { + return this.#view.getUint32(96, LE); + } + + set cabac_bypass_alignment_enabled_flag(value: number) { + this.#view.setUint32(96, Number(value), LE); + } + + get sps_scc_extension_flag(): number { + return this.#view.getUint32(100, LE); + } + + set sps_scc_extension_flag(value: number) { + this.#view.setUint32(100, Number(value), LE); + } + + get sps_curr_pic_ref_enabled_flag(): number { + return this.#view.getUint32(104, LE); + } + + set sps_curr_pic_ref_enabled_flag(value: number) { + this.#view.setUint32(104, Number(value), LE); + } + + get palette_mode_enabled_flag(): number { + return this.#view.getUint32(108, LE); + } + + set palette_mode_enabled_flag(value: number) { + this.#view.setUint32(108, Number(value), LE); + } + + get sps_palette_predictor_initializers_present_flag(): number { + return this.#view.getUint32(112, LE); + } + + set sps_palette_predictor_initializers_present_flag(value: number) { + this.#view.setUint32(112, Number(value), LE); + } + + get intra_boundary_filtering_disabled_flag(): number { + return this.#view.getUint32(116, LE); + } + + set intra_boundary_filtering_disabled_flag(value: number) { + this.#view.setUint32(116, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265SpsVuiFlags.ts b/api/struct/StdVideoH265SpsVuiFlags.ts new file mode 100644 index 0000000..986f088 --- /dev/null +++ b/api/struct/StdVideoH265SpsVuiFlags.ts @@ -0,0 +1,229 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265SpsVuiFlags { + aspect_ratio_info_present_flag?: number; + overscan_info_present_flag?: number; + overscan_appropriate_flag?: number; + video_signal_type_present_flag?: number; + video_full_range_flag?: number; + colour_description_present_flag?: number; + chroma_loc_info_present_flag?: number; + neutral_chroma_indication_flag?: number; + field_seq_flag?: number; + frame_field_info_present_flag?: number; + default_display_window_flag?: number; + vui_timing_info_present_flag?: number; + vui_poc_proportional_to_timing_flag?: number; + vui_hrd_parameters_present_flag?: number; + bitstream_restriction_flag?: number; + tiles_fixed_structure_flag?: number; + motion_vectors_over_pic_boundaries_flag?: number; + restricted_ref_pic_lists_flag?: number; +} + +export class StdVideoH265SpsVuiFlags implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265SpsVuiFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SpsVuiFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265SpsVuiFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265SpsVuiFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265SpsVuiFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.aspect_ratio_info_present_flag !== undefined) this.aspect_ratio_info_present_flag = data.aspect_ratio_info_present_flag; + if (data.overscan_info_present_flag !== undefined) this.overscan_info_present_flag = data.overscan_info_present_flag; + if (data.overscan_appropriate_flag !== undefined) this.overscan_appropriate_flag = data.overscan_appropriate_flag; + if (data.video_signal_type_present_flag !== undefined) this.video_signal_type_present_flag = data.video_signal_type_present_flag; + if (data.video_full_range_flag !== undefined) this.video_full_range_flag = data.video_full_range_flag; + if (data.colour_description_present_flag !== undefined) this.colour_description_present_flag = data.colour_description_present_flag; + if (data.chroma_loc_info_present_flag !== undefined) this.chroma_loc_info_present_flag = data.chroma_loc_info_present_flag; + if (data.neutral_chroma_indication_flag !== undefined) this.neutral_chroma_indication_flag = data.neutral_chroma_indication_flag; + if (data.field_seq_flag !== undefined) this.field_seq_flag = data.field_seq_flag; + if (data.frame_field_info_present_flag !== undefined) this.frame_field_info_present_flag = data.frame_field_info_present_flag; + if (data.default_display_window_flag !== undefined) this.default_display_window_flag = data.default_display_window_flag; + if (data.vui_timing_info_present_flag !== undefined) this.vui_timing_info_present_flag = data.vui_timing_info_present_flag; + if (data.vui_poc_proportional_to_timing_flag !== undefined) this.vui_poc_proportional_to_timing_flag = data.vui_poc_proportional_to_timing_flag; + if (data.vui_hrd_parameters_present_flag !== undefined) this.vui_hrd_parameters_present_flag = data.vui_hrd_parameters_present_flag; + if (data.bitstream_restriction_flag !== undefined) this.bitstream_restriction_flag = data.bitstream_restriction_flag; + if (data.tiles_fixed_structure_flag !== undefined) this.tiles_fixed_structure_flag = data.tiles_fixed_structure_flag; + if (data.motion_vectors_over_pic_boundaries_flag !== undefined) this.motion_vectors_over_pic_boundaries_flag = data.motion_vectors_over_pic_boundaries_flag; + if (data.restricted_ref_pic_lists_flag !== undefined) this.restricted_ref_pic_lists_flag = data.restricted_ref_pic_lists_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SpsVuiFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get aspect_ratio_info_present_flag(): number { + return this.#view.getUint32(0, LE); + } + + set aspect_ratio_info_present_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get overscan_info_present_flag(): number { + return this.#view.getUint32(4, LE); + } + + set overscan_info_present_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get overscan_appropriate_flag(): number { + return this.#view.getUint32(8, LE); + } + + set overscan_appropriate_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get video_signal_type_present_flag(): number { + return this.#view.getUint32(12, LE); + } + + set video_signal_type_present_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } + + get video_full_range_flag(): number { + return this.#view.getUint32(16, LE); + } + + set video_full_range_flag(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get colour_description_present_flag(): number { + return this.#view.getUint32(20, LE); + } + + set colour_description_present_flag(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get chroma_loc_info_present_flag(): number { + return this.#view.getUint32(24, LE); + } + + set chroma_loc_info_present_flag(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get neutral_chroma_indication_flag(): number { + return this.#view.getUint32(28, LE); + } + + set neutral_chroma_indication_flag(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get field_seq_flag(): number { + return this.#view.getUint32(32, LE); + } + + set field_seq_flag(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get frame_field_info_present_flag(): number { + return this.#view.getUint32(36, LE); + } + + set frame_field_info_present_flag(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get default_display_window_flag(): number { + return this.#view.getUint32(40, LE); + } + + set default_display_window_flag(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get vui_timing_info_present_flag(): number { + return this.#view.getUint32(44, LE); + } + + set vui_timing_info_present_flag(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get vui_poc_proportional_to_timing_flag(): number { + return this.#view.getUint32(48, LE); + } + + set vui_poc_proportional_to_timing_flag(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get vui_hrd_parameters_present_flag(): number { + return this.#view.getUint32(52, LE); + } + + set vui_hrd_parameters_present_flag(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get bitstream_restriction_flag(): number { + return this.#view.getUint32(56, LE); + } + + set bitstream_restriction_flag(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get tiles_fixed_structure_flag(): number { + return this.#view.getUint32(60, LE); + } + + set tiles_fixed_structure_flag(value: number) { + this.#view.setUint32(60, Number(value), LE); + } + + get motion_vectors_over_pic_boundaries_flag(): number { + return this.#view.getUint32(64, LE); + } + + set motion_vectors_over_pic_boundaries_flag(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get restricted_ref_pic_lists_flag(): number { + return this.#view.getUint32(68, LE); + } + + set restricted_ref_pic_lists_flag(value: number) { + this.#view.setUint32(68, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265SubLayerHrdParameters.ts b/api/struct/StdVideoH265SubLayerHrdParameters.ts new file mode 100644 index 0000000..96377c0 --- /dev/null +++ b/api/struct/StdVideoH265SubLayerHrdParameters.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265SubLayerHrdParameters { + bit_rate_value_minus1?: Uint32Array; + cpb_size_value_minus1?: Uint32Array; + cpb_size_du_value_minus1?: Uint32Array; + bit_rate_du_value_minus1?: Uint32Array; + cbr_flag?: number; +} + +/** sub_layer_hrd_parameters */ +export class StdVideoH265SubLayerHrdParameters implements BaseStruct { + static size = 516; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265SubLayerHrdParameters); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SubLayerHrdParameters) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265SubLayerHrdParameters.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265SubLayerHrdParameters.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265SubLayerHrdParameters.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.bit_rate_value_minus1 !== undefined) this.bit_rate_value_minus1 = data.bit_rate_value_minus1; + if (data.cpb_size_value_minus1 !== undefined) this.cpb_size_value_minus1 = data.cpb_size_value_minus1; + if (data.cpb_size_du_value_minus1 !== undefined) this.cpb_size_du_value_minus1 = data.cpb_size_du_value_minus1; + if (data.bit_rate_du_value_minus1 !== undefined) this.bit_rate_du_value_minus1 = data.bit_rate_du_value_minus1; + if (data.cbr_flag !== undefined) this.cbr_flag = data.cbr_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SubLayerHrdParameters.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get bit_rate_value_minus1(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 0, 32); + } + + set bit_rate_value_minus1(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 0); + } + + get cpb_size_value_minus1(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 128, 32); + } + + set cpb_size_value_minus1(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 128); + } + + get cpb_size_du_value_minus1(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 256, 32); + } + + set cpb_size_du_value_minus1(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 256); + } + + get bit_rate_du_value_minus1(): Uint32Array { + return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 384, 32); + } + + set bit_rate_du_value_minus1(value: Uint32Array) { + this.#data.set(new Uint8Array(value.buffer), 384); + } + + get cbr_flag(): number { + return this.#view.getUint32(512, LE); + } + + set cbr_flag(value: number) { + this.#view.setUint32(512, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265VideoParameterSet.ts b/api/struct/StdVideoH265VideoParameterSet.ts new file mode 100644 index 0000000..965c0ee --- /dev/null +++ b/api/struct/StdVideoH265VideoParameterSet.ts @@ -0,0 +1,176 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH265VpsFlags} from "./StdVideoH265VpsFlags.ts"; +import {StdVideoH265DecPicBufMgr} from "./StdVideoH265DecPicBufMgr.ts"; +import {StdVideoH265HrdParameters} from "./StdVideoH265HrdParameters.ts"; +import {StdVideoH265ProfileTierLevel} from "./StdVideoH265ProfileTierLevel.ts"; + +export interface InitStdVideoH265VideoParameterSet { + flags?: StdVideoH265VpsFlags; + vps_video_parameter_set_id?: number; + vps_max_sub_layers_minus1?: number; + reserved1?: number; + reserved2?: number; + vps_num_units_in_tick?: number; + vps_time_scale?: number; + vps_num_ticks_poc_diff_one_minus1?: number; + reserved3?: number; + pDecPicBufMgr?: AnyPointer; + pHrdParameters?: AnyPointer; + pProfileTierLevel?: AnyPointer; +} + +export class StdVideoH265VideoParameterSet implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265VideoParameterSet); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265VideoParameterSet) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265VideoParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265VideoParameterSet.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265VideoParameterSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.vps_video_parameter_set_id !== undefined) this.vps_video_parameter_set_id = data.vps_video_parameter_set_id; + if (data.vps_max_sub_layers_minus1 !== undefined) this.vps_max_sub_layers_minus1 = data.vps_max_sub_layers_minus1; + if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; + if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; + if (data.vps_num_units_in_tick !== undefined) this.vps_num_units_in_tick = data.vps_num_units_in_tick; + if (data.vps_time_scale !== undefined) this.vps_time_scale = data.vps_time_scale; + if (data.vps_num_ticks_poc_diff_one_minus1 !== undefined) this.vps_num_ticks_poc_diff_one_minus1 = data.vps_num_ticks_poc_diff_one_minus1; + if (data.reserved3 !== undefined) this.reserved3 = data.reserved3; + if (data.pDecPicBufMgr !== undefined) this.pDecPicBufMgr = data.pDecPicBufMgr; + if (data.pHrdParameters !== undefined) this.pHrdParameters = data.pHrdParameters; + if (data.pProfileTierLevel !== undefined) this.pProfileTierLevel = data.pProfileTierLevel; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265VideoParameterSet.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): StdVideoH265VpsFlags { + return new StdVideoH265VpsFlags(this.#data.subarray(0, 0 + StdVideoH265VpsFlags.size)); + } + + set flags(value: StdVideoH265VpsFlags) { + if (value[BUFFER].byteLength < StdVideoH265VpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 0); + } + + get vps_video_parameter_set_id(): number { + return this.#view.getUint8(16); + } + + set vps_video_parameter_set_id(value: number) { + this.#view.setUint8(16, Number(value)); + } + + get vps_max_sub_layers_minus1(): number { + return this.#view.getUint8(17); + } + + set vps_max_sub_layers_minus1(value: number) { + this.#view.setUint8(17, Number(value)); + } + + get reserved1(): number { + return this.#view.getUint8(18); + } + + set reserved1(value: number) { + this.#view.setUint8(18, Number(value)); + } + + get reserved2(): number { + return this.#view.getUint8(19); + } + + set reserved2(value: number) { + this.#view.setUint8(19, Number(value)); + } + + get vps_num_units_in_tick(): number { + return this.#view.getUint32(20, LE); + } + + set vps_num_units_in_tick(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get vps_time_scale(): number { + return this.#view.getUint32(24, LE); + } + + set vps_time_scale(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get vps_num_ticks_poc_diff_one_minus1(): number { + return this.#view.getUint32(28, LE); + } + + set vps_num_ticks_poc_diff_one_minus1(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get reserved3(): number { + return this.#view.getUint32(32, LE); + } + + set reserved3(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pDecPicBufMgr(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pDecPicBufMgr(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get pHrdParameters(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pHrdParameters(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get pProfileTierLevel(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pProfileTierLevel(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StdVideoH265VpsFlags.ts b/api/struct/StdVideoH265VpsFlags.ts new file mode 100644 index 0000000..5a3cd81 --- /dev/null +++ b/api/struct/StdVideoH265VpsFlags.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitStdVideoH265VpsFlags { + vps_temporal_id_nesting_flag?: number; + vps_sub_layer_ordering_info_present_flag?: number; + vps_timing_info_present_flag?: number; + vps_poc_proportional_to_timing_flag?: number; +} + +export class StdVideoH265VpsFlags implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStdVideoH265VpsFlags); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265VpsFlags) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StdVideoH265VpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StdVideoH265VpsFlags.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StdVideoH265VpsFlags.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.vps_temporal_id_nesting_flag !== undefined) this.vps_temporal_id_nesting_flag = data.vps_temporal_id_nesting_flag; + if (data.vps_sub_layer_ordering_info_present_flag !== undefined) this.vps_sub_layer_ordering_info_present_flag = data.vps_sub_layer_ordering_info_present_flag; + if (data.vps_timing_info_present_flag !== undefined) this.vps_timing_info_present_flag = data.vps_timing_info_present_flag; + if (data.vps_poc_proportional_to_timing_flag !== undefined) this.vps_poc_proportional_to_timing_flag = data.vps_poc_proportional_to_timing_flag; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265VpsFlags.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get vps_temporal_id_nesting_flag(): number { + return this.#view.getUint32(0, LE); + } + + set vps_temporal_id_nesting_flag(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get vps_sub_layer_ordering_info_present_flag(): number { + return this.#view.getUint32(4, LE); + } + + set vps_sub_layer_ordering_info_present_flag(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get vps_timing_info_present_flag(): number { + return this.#view.getUint32(8, LE); + } + + set vps_timing_info_present_flag(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get vps_poc_proportional_to_timing_flag(): number { + return this.#view.getUint32(12, LE); + } + + set vps_poc_proportional_to_timing_flag(value: number) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StencilOpState.ts b/api/struct/StencilOpState.ts new file mode 100644 index 0000000..6607e0d --- /dev/null +++ b/api/struct/StencilOpState.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StencilOp, CompareOp } from "../enum.ts"; + +export interface InitStencilOpState { + failOp?: StencilOp; + passOp?: StencilOp; + depthFailOp?: StencilOp; + compareOp?: CompareOp; + compareMask?: number; + writeMask?: number; + reference?: number; +} + +export class StencilOpState implements BaseStruct { + static size = 28; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStencilOpState); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStencilOpState) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StencilOpState.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StencilOpState.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StencilOpState.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.failOp !== undefined) this.failOp = data.failOp; + if (data.passOp !== undefined) this.passOp = data.passOp; + if (data.depthFailOp !== undefined) this.depthFailOp = data.depthFailOp; + if (data.compareOp !== undefined) this.compareOp = data.compareOp; + if (data.compareMask !== undefined) this.compareMask = data.compareMask; + if (data.writeMask !== undefined) this.writeMask = data.writeMask; + if (data.reference !== undefined) this.reference = data.reference; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StencilOpState.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get failOp(): number { + return this.#view.getUint32(0, LE); + } + + set failOp(value: StencilOp) { + this.#view.setUint32(0, Number(value), LE); + } + + get passOp(): number { + return this.#view.getUint32(4, LE); + } + + set passOp(value: StencilOp) { + this.#view.setUint32(4, Number(value), LE); + } + + get depthFailOp(): number { + return this.#view.getUint32(8, LE); + } + + set depthFailOp(value: StencilOp) { + this.#view.setUint32(8, Number(value), LE); + } + + get compareOp(): number { + return this.#view.getUint32(12, LE); + } + + set compareOp(value: CompareOp) { + this.#view.setUint32(12, Number(value), LE); + } + + get compareMask(): number { + return this.#view.getUint32(16, LE); + } + + set compareMask(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get writeMask(): number { + return this.#view.getUint32(20, LE); + } + + set writeMask(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get reference(): number { + return this.#view.getUint32(24, LE); + } + + set reference(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/StreamDescriptorSurfaceCreateInfoGGP.ts b/api/struct/StreamDescriptorSurfaceCreateInfoGGP.ts new file mode 100644 index 0000000..c83469d --- /dev/null +++ b/api/struct/StreamDescriptorSurfaceCreateInfoGGP.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { StreamDescriptorSurfaceCreateFlagsGGP } from "../def.ts"; + +export interface InitStreamDescriptorSurfaceCreateInfoGGP { + pNext?: AnyPointer; + flags?: StreamDescriptorSurfaceCreateFlagsGGP; + streamDescriptor?: Deno.PointerValue; +} + +export class StreamDescriptorSurfaceCreateInfoGGP implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStreamDescriptorSurfaceCreateInfoGGP); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStreamDescriptorSurfaceCreateInfoGGP) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StreamDescriptorSurfaceCreateInfoGGP.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StreamDescriptorSurfaceCreateInfoGGP.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StreamDescriptorSurfaceCreateInfoGGP.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.streamDescriptor !== undefined) this.streamDescriptor = data.streamDescriptor; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StreamDescriptorSurfaceCreateInfoGGP.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: StreamDescriptorSurfaceCreateFlagsGGP) { + this.#view.setUint32(16, Number(value), LE); + } + + get streamDescriptor(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set streamDescriptor(value: Deno.PointerValue) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/StridedDeviceAddressRegionKHR.ts b/api/struct/StridedDeviceAddressRegionKHR.ts new file mode 100644 index 0000000..1e4774b --- /dev/null +++ b/api/struct/StridedDeviceAddressRegionKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceAddress, DeviceSize } from "../def.ts"; + +export interface InitStridedDeviceAddressRegionKHR { + deviceAddress?: DeviceAddress; + stride?: DeviceSize; + size?: DeviceSize; +} + +export class StridedDeviceAddressRegionKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitStridedDeviceAddressRegionKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitStridedDeviceAddressRegionKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(StridedDeviceAddressRegionKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < StridedDeviceAddressRegionKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(StridedDeviceAddressRegionKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; + if (data.stride !== undefined) this.stride = data.stride; + if (data.size !== undefined) this.size = data.size; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StridedDeviceAddressRegionKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get deviceAddress(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set deviceAddress(value: DeviceAddress) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get stride(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set stride(value: DeviceSize) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubmitInfo.ts b/api/struct/SubmitInfo.ts new file mode 100644 index 0000000..09daf0c --- /dev/null +++ b/api/struct/SubmitInfo.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Semaphore, PipelineStageFlags, CommandBuffer } from "../def.ts"; + +export interface InitSubmitInfo { + pNext?: AnyPointer; + waitSemaphoreCount?: number; + pWaitSemaphores?: AnyPointer; + pWaitDstStageMask?: AnyPointer; + commandBufferCount?: number; + pCommandBuffers?: AnyPointer; + signalSemaphoreCount?: number; + pSignalSemaphores?: AnyPointer; +} + +export class SubmitInfo implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubmitInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubmitInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubmitInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.waitSemaphoreCount !== undefined) this.waitSemaphoreCount = data.waitSemaphoreCount; + if (data.pWaitSemaphores !== undefined) this.pWaitSemaphores = data.pWaitSemaphores; + if (data.pWaitDstStageMask !== undefined) this.pWaitDstStageMask = data.pWaitDstStageMask; + if (data.commandBufferCount !== undefined) this.commandBufferCount = data.commandBufferCount; + if (data.pCommandBuffers !== undefined) this.pCommandBuffers = data.pCommandBuffers; + if (data.signalSemaphoreCount !== undefined) this.signalSemaphoreCount = data.signalSemaphoreCount; + if (data.pSignalSemaphores !== undefined) this.pSignalSemaphores = data.pSignalSemaphores; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubmitInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBMIT_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get waitSemaphoreCount(): number { + return this.#view.getUint32(16, LE); + } + + set waitSemaphoreCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pWaitSemaphores(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pWaitSemaphores(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pWaitDstStageMask(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pWaitDstStageMask(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get commandBufferCount(): number { + return this.#view.getUint32(40, LE); + } + + set commandBufferCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get pCommandBuffers(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pCommandBuffers(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get signalSemaphoreCount(): number { + return this.#view.getUint32(56, LE); + } + + set signalSemaphoreCount(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get pSignalSemaphores(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pSignalSemaphores(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubmitInfo2.ts b/api/struct/SubmitInfo2.ts new file mode 100644 index 0000000..cffeebd --- /dev/null +++ b/api/struct/SubmitInfo2.ts @@ -0,0 +1,142 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SemaphoreSubmitInfo} from "./SemaphoreSubmitInfo.ts"; +import {CommandBufferSubmitInfo} from "./CommandBufferSubmitInfo.ts"; +import { StructureType } from "../enum.ts"; +import { SubmitFlags } from "../def.ts"; + +export interface InitSubmitInfo2 { + pNext?: AnyPointer; + flags?: SubmitFlags; + waitSemaphoreInfoCount?: number; + pWaitSemaphoreInfos?: AnyPointer; + commandBufferInfoCount?: number; + pCommandBufferInfos?: AnyPointer; + signalSemaphoreInfoCount?: number; + pSignalSemaphoreInfos?: AnyPointer; +} + +export class SubmitInfo2 implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubmitInfo2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubmitInfo2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubmitInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubmitInfo2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubmitInfo2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.waitSemaphoreInfoCount !== undefined) this.waitSemaphoreInfoCount = data.waitSemaphoreInfoCount; + if (data.pWaitSemaphoreInfos !== undefined) this.pWaitSemaphoreInfos = data.pWaitSemaphoreInfos; + if (data.commandBufferInfoCount !== undefined) this.commandBufferInfoCount = data.commandBufferInfoCount; + if (data.pCommandBufferInfos !== undefined) this.pCommandBufferInfos = data.pCommandBufferInfos; + if (data.signalSemaphoreInfoCount !== undefined) this.signalSemaphoreInfoCount = data.signalSemaphoreInfoCount; + if (data.pSignalSemaphoreInfos !== undefined) this.pSignalSemaphoreInfos = data.pSignalSemaphoreInfos; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubmitInfo2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBMIT_INFO_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: SubmitFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get waitSemaphoreInfoCount(): number { + return this.#view.getUint32(20, LE); + } + + set waitSemaphoreInfoCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pWaitSemaphoreInfos(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pWaitSemaphoreInfos(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get commandBufferInfoCount(): number { + return this.#view.getUint32(32, LE); + } + + set commandBufferInfoCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pCommandBufferInfos(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pCommandBufferInfos(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get signalSemaphoreInfoCount(): number { + return this.#view.getUint32(48, LE); + } + + set signalSemaphoreInfoCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pSignalSemaphoreInfos(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pSignalSemaphoreInfos(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubmitInfo2KHR.ts b/api/struct/SubmitInfo2KHR.ts new file mode 100644 index 0000000..e9ec6b4 --- /dev/null +++ b/api/struct/SubmitInfo2KHR.ts @@ -0,0 +1,2 @@ + import { SubmitInfo2 } from "./SubmitInfo2.ts"; + export type SubmitInfo2KHR = SubmitInfo2; \ No newline at end of file diff --git a/api/struct/SubpassBeginInfo.ts b/api/struct/SubpassBeginInfo.ts new file mode 100644 index 0000000..9c2be04 --- /dev/null +++ b/api/struct/SubpassBeginInfo.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, SubpassContents } from "../enum.ts"; + +export interface InitSubpassBeginInfo { + pNext?: AnyPointer; + contents?: SubpassContents; +} + +export class SubpassBeginInfo implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassBeginInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassBeginInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassBeginInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassBeginInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.contents !== undefined) this.contents = data.contents; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassBeginInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBPASS_BEGIN_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get contents(): number { + return this.#view.getUint32(16, LE); + } + + set contents(value: SubpassContents) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubpassBeginInfoKHR.ts b/api/struct/SubpassBeginInfoKHR.ts new file mode 100644 index 0000000..8d20ba5 --- /dev/null +++ b/api/struct/SubpassBeginInfoKHR.ts @@ -0,0 +1,2 @@ + import { SubpassBeginInfo } from "./SubpassBeginInfo.ts"; + export type SubpassBeginInfoKHR = SubpassBeginInfo; \ No newline at end of file diff --git a/api/struct/SubpassDependency.ts b/api/struct/SubpassDependency.ts new file mode 100644 index 0000000..3636e76 --- /dev/null +++ b/api/struct/SubpassDependency.ts @@ -0,0 +1,120 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { PipelineStageFlags, AccessFlags, DependencyFlags } from "../def.ts"; + +export interface InitSubpassDependency { + srcSubpass?: number; + dstSubpass?: number; + srcStageMask?: PipelineStageFlags; + dstStageMask?: PipelineStageFlags; + srcAccessMask?: AccessFlags; + dstAccessMask?: AccessFlags; + dependencyFlags?: DependencyFlags; +} + +export class SubpassDependency implements BaseStruct { + static size = 28; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassDependency); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDependency) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassDependency.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassDependency.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassDependency.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.srcSubpass !== undefined) this.srcSubpass = data.srcSubpass; + if (data.dstSubpass !== undefined) this.dstSubpass = data.dstSubpass; + if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; + if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; + if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; + if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; + if (data.dependencyFlags !== undefined) this.dependencyFlags = data.dependencyFlags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDependency.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get srcSubpass(): number { + return this.#view.getUint32(0, LE); + } + + set srcSubpass(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get dstSubpass(): number { + return this.#view.getUint32(4, LE); + } + + set dstSubpass(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get srcStageMask(): number { + return this.#view.getUint32(8, LE); + } + + set srcStageMask(value: PipelineStageFlags) { + this.#view.setUint32(8, Number(value), LE); + } + + get dstStageMask(): number { + return this.#view.getUint32(12, LE); + } + + set dstStageMask(value: PipelineStageFlags) { + this.#view.setUint32(12, Number(value), LE); + } + + get srcAccessMask(): number { + return this.#view.getUint32(16, LE); + } + + set srcAccessMask(value: AccessFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get dstAccessMask(): number { + return this.#view.getUint32(20, LE); + } + + set dstAccessMask(value: AccessFlags) { + this.#view.setUint32(20, Number(value), LE); + } + + get dependencyFlags(): number { + return this.#view.getUint32(24, LE); + } + + set dependencyFlags(value: DependencyFlags) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubpassDependency2.ts b/api/struct/SubpassDependency2.ts new file mode 100644 index 0000000..307412e --- /dev/null +++ b/api/struct/SubpassDependency2.ts @@ -0,0 +1,150 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { PipelineStageFlags, AccessFlags, DependencyFlags } from "../def.ts"; + +export interface InitSubpassDependency2 { + pNext?: AnyPointer; + srcSubpass?: number; + dstSubpass?: number; + srcStageMask?: PipelineStageFlags; + dstStageMask?: PipelineStageFlags; + srcAccessMask?: AccessFlags; + dstAccessMask?: AccessFlags; + dependencyFlags?: DependencyFlags; + viewOffset?: number; +} + +export class SubpassDependency2 implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassDependency2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDependency2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassDependency2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassDependency2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassDependency2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.srcSubpass !== undefined) this.srcSubpass = data.srcSubpass; + if (data.dstSubpass !== undefined) this.dstSubpass = data.dstSubpass; + if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; + if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; + if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; + if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; + if (data.dependencyFlags !== undefined) this.dependencyFlags = data.dependencyFlags; + if (data.viewOffset !== undefined) this.viewOffset = data.viewOffset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDependency2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBPASS_DEPENDENCY_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get srcSubpass(): number { + return this.#view.getUint32(16, LE); + } + + set srcSubpass(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get dstSubpass(): number { + return this.#view.getUint32(20, LE); + } + + set dstSubpass(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get srcStageMask(): number { + return this.#view.getUint32(24, LE); + } + + set srcStageMask(value: PipelineStageFlags) { + this.#view.setUint32(24, Number(value), LE); + } + + get dstStageMask(): number { + return this.#view.getUint32(28, LE); + } + + set dstStageMask(value: PipelineStageFlags) { + this.#view.setUint32(28, Number(value), LE); + } + + get srcAccessMask(): number { + return this.#view.getUint32(32, LE); + } + + set srcAccessMask(value: AccessFlags) { + this.#view.setUint32(32, Number(value), LE); + } + + get dstAccessMask(): number { + return this.#view.getUint32(36, LE); + } + + set dstAccessMask(value: AccessFlags) { + this.#view.setUint32(36, Number(value), LE); + } + + get dependencyFlags(): number { + return this.#view.getUint32(40, LE); + } + + set dependencyFlags(value: DependencyFlags) { + this.#view.setUint32(40, Number(value), LE); + } + + get viewOffset(): number { + return this.#view.getInt32(44, LE); + } + + set viewOffset(value: number) { + this.#view.setInt32(44, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubpassDependency2KHR.ts b/api/struct/SubpassDependency2KHR.ts new file mode 100644 index 0000000..adcf30d --- /dev/null +++ b/api/struct/SubpassDependency2KHR.ts @@ -0,0 +1,2 @@ + import { SubpassDependency2 } from "./SubpassDependency2.ts"; + export type SubpassDependency2KHR = SubpassDependency2; \ No newline at end of file diff --git a/api/struct/SubpassDescription.ts b/api/struct/SubpassDescription.ts new file mode 100644 index 0000000..0c87c26 --- /dev/null +++ b/api/struct/SubpassDescription.ts @@ -0,0 +1,152 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AttachmentReference} from "./AttachmentReference.ts"; +import { PipelineBindPoint } from "../enum.ts"; +import { SubpassDescriptionFlags } from "../def.ts"; + +export interface InitSubpassDescription { + flags?: SubpassDescriptionFlags; + pipelineBindPoint?: PipelineBindPoint; + inputAttachmentCount?: number; + pInputAttachments?: AnyPointer; + colorAttachmentCount?: number; + pColorAttachments?: AnyPointer; + pResolveAttachments?: AnyPointer; + pDepthStencilAttachment?: AnyPointer; + preserveAttachmentCount?: number; + pPreserveAttachments?: AnyPointer; +} + +export class SubpassDescription implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassDescription); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDescription) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassDescription.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassDescription.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassDescription.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.flags !== undefined) this.flags = data.flags; + if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; + if (data.inputAttachmentCount !== undefined) this.inputAttachmentCount = data.inputAttachmentCount; + if (data.pInputAttachments !== undefined) this.pInputAttachments = data.pInputAttachments; + if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; + if (data.pColorAttachments !== undefined) this.pColorAttachments = data.pColorAttachments; + if (data.pResolveAttachments !== undefined) this.pResolveAttachments = data.pResolveAttachments; + if (data.pDepthStencilAttachment !== undefined) this.pDepthStencilAttachment = data.pDepthStencilAttachment; + if (data.preserveAttachmentCount !== undefined) this.preserveAttachmentCount = data.preserveAttachmentCount; + if (data.pPreserveAttachments !== undefined) this.pPreserveAttachments = data.pPreserveAttachments; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDescription.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get flags(): number { + return this.#view.getUint32(0, LE); + } + + set flags(value: SubpassDescriptionFlags) { + this.#view.setUint32(0, Number(value), LE); + } + + get pipelineBindPoint(): number { + return this.#view.getUint32(4, LE); + } + + set pipelineBindPoint(value: PipelineBindPoint) { + this.#view.setUint32(4, Number(value), LE); + } + + get inputAttachmentCount(): number { + return this.#view.getUint32(8, LE); + } + + set inputAttachmentCount(value: number) { + this.#view.setUint32(8, Number(value), LE); + } + + get pInputAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pInputAttachments(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get colorAttachmentCount(): number { + return this.#view.getUint32(24, LE); + } + + set colorAttachmentCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pColorAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pColorAttachments(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pResolveAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pResolveAttachments(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get pDepthStencilAttachment(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pDepthStencilAttachment(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get preserveAttachmentCount(): number { + return this.#view.getUint32(56, LE); + } + + set preserveAttachmentCount(value: number) { + this.#view.setUint32(56, Number(value), LE); + } + + get pPreserveAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pPreserveAttachments(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubpassDescription2.ts b/api/struct/SubpassDescription2.ts new file mode 100644 index 0000000..89b0fa5 --- /dev/null +++ b/api/struct/SubpassDescription2.ts @@ -0,0 +1,181 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AttachmentReference2} from "./AttachmentReference2.ts"; +import { StructureType, PipelineBindPoint } from "../enum.ts"; +import { SubpassDescriptionFlags } from "../def.ts"; + +export interface InitSubpassDescription2 { + pNext?: AnyPointer; + flags?: SubpassDescriptionFlags; + pipelineBindPoint?: PipelineBindPoint; + viewMask?: number; + inputAttachmentCount?: number; + pInputAttachments?: AnyPointer; + colorAttachmentCount?: number; + pColorAttachments?: AnyPointer; + pResolveAttachments?: AnyPointer; + pDepthStencilAttachment?: AnyPointer; + preserveAttachmentCount?: number; + pPreserveAttachments?: AnyPointer; +} + +export class SubpassDescription2 implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassDescription2); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDescription2) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassDescription2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassDescription2.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassDescription2.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; + if (data.viewMask !== undefined) this.viewMask = data.viewMask; + if (data.inputAttachmentCount !== undefined) this.inputAttachmentCount = data.inputAttachmentCount; + if (data.pInputAttachments !== undefined) this.pInputAttachments = data.pInputAttachments; + if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; + if (data.pColorAttachments !== undefined) this.pColorAttachments = data.pColorAttachments; + if (data.pResolveAttachments !== undefined) this.pResolveAttachments = data.pResolveAttachments; + if (data.pDepthStencilAttachment !== undefined) this.pDepthStencilAttachment = data.pDepthStencilAttachment; + if (data.preserveAttachmentCount !== undefined) this.preserveAttachmentCount = data.preserveAttachmentCount; + if (data.pPreserveAttachments !== undefined) this.pPreserveAttachments = data.pPreserveAttachments; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDescription2.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBPASS_DESCRIPTION_2; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: SubpassDescriptionFlags) { + this.#view.setUint32(16, Number(value), LE); + } + + get pipelineBindPoint(): number { + return this.#view.getUint32(20, LE); + } + + set pipelineBindPoint(value: PipelineBindPoint) { + this.#view.setUint32(20, Number(value), LE); + } + + get viewMask(): number { + return this.#view.getUint32(24, LE); + } + + set viewMask(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get inputAttachmentCount(): number { + return this.#view.getUint32(28, LE); + } + + set inputAttachmentCount(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get pInputAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pInputAttachments(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get colorAttachmentCount(): number { + return this.#view.getUint32(40, LE); + } + + set colorAttachmentCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get pColorAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pColorAttachments(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get pResolveAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pResolveAttachments(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get pDepthStencilAttachment(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pDepthStencilAttachment(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } + + get preserveAttachmentCount(): number { + return this.#view.getUint32(72, LE); + } + + set preserveAttachmentCount(value: number) { + this.#view.setUint32(72, Number(value), LE); + } + + get pPreserveAttachments(): Deno.PointerValue { + return pointerFromView(this.#view, 80, LE); + } + + set pPreserveAttachments(value: AnyPointer) { + this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubpassDescription2KHR.ts b/api/struct/SubpassDescription2KHR.ts new file mode 100644 index 0000000..5f6ec6c --- /dev/null +++ b/api/struct/SubpassDescription2KHR.ts @@ -0,0 +1,2 @@ + import { SubpassDescription2 } from "./SubpassDescription2.ts"; + export type SubpassDescription2KHR = SubpassDescription2; \ No newline at end of file diff --git a/api/struct/SubpassDescriptionDepthStencilResolve.ts b/api/struct/SubpassDescriptionDepthStencilResolve.ts new file mode 100644 index 0000000..90be6c4 --- /dev/null +++ b/api/struct/SubpassDescriptionDepthStencilResolve.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {AttachmentReference2} from "./AttachmentReference2.ts"; +import { StructureType, ResolveModeFlagBits } from "../enum.ts"; + +export interface InitSubpassDescriptionDepthStencilResolve { + pNext?: AnyPointer; + depthResolveMode?: ResolveModeFlagBits; + stencilResolveMode?: ResolveModeFlagBits; + pDepthStencilResolveAttachment?: AnyPointer; +} + +export class SubpassDescriptionDepthStencilResolve implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassDescriptionDepthStencilResolve); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDescriptionDepthStencilResolve) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassDescriptionDepthStencilResolve.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassDescriptionDepthStencilResolve.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassDescriptionDepthStencilResolve.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.depthResolveMode !== undefined) this.depthResolveMode = data.depthResolveMode; + if (data.stencilResolveMode !== undefined) this.stencilResolveMode = data.stencilResolveMode; + if (data.pDepthStencilResolveAttachment !== undefined) this.pDepthStencilResolveAttachment = data.pDepthStencilResolveAttachment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDescriptionDepthStencilResolve.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get depthResolveMode(): number { + return this.#view.getUint32(16, LE); + } + + set depthResolveMode(value: ResolveModeFlagBits) { + this.#view.setUint32(16, Number(value), LE); + } + + get stencilResolveMode(): number { + return this.#view.getUint32(20, LE); + } + + set stencilResolveMode(value: ResolveModeFlagBits) { + this.#view.setUint32(20, Number(value), LE); + } + + get pDepthStencilResolveAttachment(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDepthStencilResolveAttachment(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubpassDescriptionDepthStencilResolveKHR.ts b/api/struct/SubpassDescriptionDepthStencilResolveKHR.ts new file mode 100644 index 0000000..c552e38 --- /dev/null +++ b/api/struct/SubpassDescriptionDepthStencilResolveKHR.ts @@ -0,0 +1,2 @@ + import { SubpassDescriptionDepthStencilResolve } from "./SubpassDescriptionDepthStencilResolve.ts"; + export type SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve; \ No newline at end of file diff --git a/api/struct/SubpassEndInfo.ts b/api/struct/SubpassEndInfo.ts new file mode 100644 index 0000000..ea2e684 --- /dev/null +++ b/api/struct/SubpassEndInfo.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSubpassEndInfo { + pNext?: AnyPointer; +} + +export class SubpassEndInfo implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassEndInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassEndInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassEndInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassEndInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassEndInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassEndInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBPASS_END_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubpassEndInfoKHR.ts b/api/struct/SubpassEndInfoKHR.ts new file mode 100644 index 0000000..4e7d0be --- /dev/null +++ b/api/struct/SubpassEndInfoKHR.ts @@ -0,0 +1,2 @@ + import { SubpassEndInfo } from "./SubpassEndInfo.ts"; + export type SubpassEndInfoKHR = SubpassEndInfo; \ No newline at end of file diff --git a/api/struct/SubpassFragmentDensityMapOffsetEndInfoQCOM.ts b/api/struct/SubpassFragmentDensityMapOffsetEndInfoQCOM.ts new file mode 100644 index 0000000..dab8471 --- /dev/null +++ b/api/struct/SubpassFragmentDensityMapOffsetEndInfoQCOM.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Offset2D} from "./Offset2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSubpassFragmentDensityMapOffsetEndInfoQCOM { + pNext?: AnyPointer; + fragmentDensityOffsetCount?: number; + pFragmentDensityOffsets?: AnyPointer; +} + +export class SubpassFragmentDensityMapOffsetEndInfoQCOM implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassFragmentDensityMapOffsetEndInfoQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassFragmentDensityMapOffsetEndInfoQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassFragmentDensityMapOffsetEndInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassFragmentDensityMapOffsetEndInfoQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassFragmentDensityMapOffsetEndInfoQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fragmentDensityOffsetCount !== undefined) this.fragmentDensityOffsetCount = data.fragmentDensityOffsetCount; + if (data.pFragmentDensityOffsets !== undefined) this.pFragmentDensityOffsets = data.pFragmentDensityOffsets; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassFragmentDensityMapOffsetEndInfoQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fragmentDensityOffsetCount(): number { + return this.#view.getUint32(16, LE); + } + + set fragmentDensityOffsetCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pFragmentDensityOffsets(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pFragmentDensityOffsets(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubpassResolvePerformanceQueryEXT.ts b/api/struct/SubpassResolvePerformanceQueryEXT.ts new file mode 100644 index 0000000..31f3413 --- /dev/null +++ b/api/struct/SubpassResolvePerformanceQueryEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitSubpassResolvePerformanceQueryEXT { + pNext?: AnyPointer; + optimal?: Bool32; +} + +export class SubpassResolvePerformanceQueryEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassResolvePerformanceQueryEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassResolvePerformanceQueryEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassResolvePerformanceQueryEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassResolvePerformanceQueryEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassResolvePerformanceQueryEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.optimal !== undefined) this.optimal = data.optimal; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassResolvePerformanceQueryEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get optimal(): number { + return this.#view.getUint32(16, LE); + } + + set optimal(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubpassSampleLocationsEXT.ts b/api/struct/SubpassSampleLocationsEXT.ts new file mode 100644 index 0000000..d0944ba --- /dev/null +++ b/api/struct/SubpassSampleLocationsEXT.ts @@ -0,0 +1,73 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SampleLocationsInfoEXT} from "./SampleLocationsInfoEXT.ts"; + +export interface InitSubpassSampleLocationsEXT { + subpassIndex?: number; + sampleLocationsInfo?: SampleLocationsInfoEXT; +} + +export class SubpassSampleLocationsEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassSampleLocationsEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassSampleLocationsEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassSampleLocationsEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassSampleLocationsEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassSampleLocationsEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.subpassIndex !== undefined) this.subpassIndex = data.subpassIndex; + if (data.sampleLocationsInfo !== undefined) this.sampleLocationsInfo = data.sampleLocationsInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassSampleLocationsEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get subpassIndex(): number { + return this.#view.getUint32(0, LE); + } + + set subpassIndex(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get sampleLocationsInfo(): SampleLocationsInfoEXT { + return new SampleLocationsInfoEXT(this.#data.subarray(8, 8 + SampleLocationsInfoEXT.size)); + } + + set sampleLocationsInfo(value: SampleLocationsInfoEXT) { + if (value[BUFFER].byteLength < SampleLocationsInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 8); + } +} \ No newline at end of file diff --git a/api/struct/SubpassShadingPipelineCreateInfoHUAWEI.ts b/api/struct/SubpassShadingPipelineCreateInfoHUAWEI.ts new file mode 100644 index 0000000..4f879ab --- /dev/null +++ b/api/struct/SubpassShadingPipelineCreateInfoHUAWEI.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { RenderPass } from "../def.ts"; + +export interface InitSubpassShadingPipelineCreateInfoHUAWEI { + pNext?: AnyPointer; + renderPass?: RenderPass; + subpass?: number; +} + +export class SubpassShadingPipelineCreateInfoHUAWEI implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubpassShadingPipelineCreateInfoHUAWEI); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassShadingPipelineCreateInfoHUAWEI) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubpassShadingPipelineCreateInfoHUAWEI.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubpassShadingPipelineCreateInfoHUAWEI.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubpassShadingPipelineCreateInfoHUAWEI.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.renderPass !== undefined) this.renderPass = data.renderPass; + if (data.subpass !== undefined) this.subpass = data.subpass; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassShadingPipelineCreateInfoHUAWEI.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get renderPass(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set renderPass(value: RenderPass) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get subpass(): number { + return this.#view.getUint32(24, LE); + } + + set subpass(value: number) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubresourceLayout.ts b/api/struct/SubresourceLayout.ts new file mode 100644 index 0000000..38b002a --- /dev/null +++ b/api/struct/SubresourceLayout.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceSize } from "../def.ts"; + +export interface InitSubresourceLayout { + offset?: DeviceSize; + size?: DeviceSize; + rowPitch?: DeviceSize; + arrayPitch?: DeviceSize; + depthPitch?: DeviceSize; +} + +export class SubresourceLayout implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubresourceLayout); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubresourceLayout) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubresourceLayout.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubresourceLayout.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubresourceLayout.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.offset !== undefined) this.offset = data.offset; + if (data.size !== undefined) this.size = data.size; + if (data.rowPitch !== undefined) this.rowPitch = data.rowPitch; + if (data.arrayPitch !== undefined) this.arrayPitch = data.arrayPitch; + if (data.depthPitch !== undefined) this.depthPitch = data.depthPitch; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubresourceLayout.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get offset(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set offset(value: DeviceSize) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get size(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set size(value: DeviceSize) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get rowPitch(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set rowPitch(value: DeviceSize) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get arrayPitch(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set arrayPitch(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get depthPitch(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set depthPitch(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SubresourceLayout2EXT.ts b/api/struct/SubresourceLayout2EXT.ts new file mode 100644 index 0000000..8b89ab4 --- /dev/null +++ b/api/struct/SubresourceLayout2EXT.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SubresourceLayout} from "./SubresourceLayout.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSubresourceLayout2EXT { + pNext?: AnyPointer; + subresourceLayout?: SubresourceLayout; +} + +export class SubresourceLayout2EXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSubresourceLayout2EXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSubresourceLayout2EXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SubresourceLayout2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SubresourceLayout2EXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SubresourceLayout2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.subresourceLayout !== undefined) this.subresourceLayout = data.subresourceLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubresourceLayout2EXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SUBRESOURCE_LAYOUT_2_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get subresourceLayout(): SubresourceLayout { + return new SubresourceLayout(this.#data.subarray(16, 16 + SubresourceLayout.size)); + } + + set subresourceLayout(value: SubresourceLayout) { + if (value[BUFFER].byteLength < SubresourceLayout.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceCapabilities2EXT.ts b/api/struct/SurfaceCapabilities2EXT.ts new file mode 100644 index 0000000..82d3d29 --- /dev/null +++ b/api/struct/SurfaceCapabilities2EXT.ts @@ -0,0 +1,190 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType, SurfaceTransformFlagBitsKHR } from "../enum.ts"; +import { SurfaceTransformFlagsKHR, CompositeAlphaFlagsKHR, ImageUsageFlags, SurfaceCounterFlagsEXT } from "../def.ts"; + +export interface InitSurfaceCapabilities2EXT { + pNext?: AnyPointer; + minImageCount?: number; + maxImageCount?: number; + currentExtent?: Extent2D; + minImageExtent?: Extent2D; + maxImageExtent?: Extent2D; + maxImageArrayLayers?: number; + supportedTransforms?: SurfaceTransformFlagsKHR; + currentTransform?: SurfaceTransformFlagBitsKHR; + supportedCompositeAlpha?: CompositeAlphaFlagsKHR; + supportedUsageFlags?: ImageUsageFlags; + supportedSurfaceCounters?: SurfaceCounterFlagsEXT; +} + +export class SurfaceCapabilities2EXT implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceCapabilities2EXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilities2EXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceCapabilities2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceCapabilities2EXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceCapabilities2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.minImageCount !== undefined) this.minImageCount = data.minImageCount; + if (data.maxImageCount !== undefined) this.maxImageCount = data.maxImageCount; + if (data.currentExtent !== undefined) this.currentExtent = data.currentExtent; + if (data.minImageExtent !== undefined) this.minImageExtent = data.minImageExtent; + if (data.maxImageExtent !== undefined) this.maxImageExtent = data.maxImageExtent; + if (data.maxImageArrayLayers !== undefined) this.maxImageArrayLayers = data.maxImageArrayLayers; + if (data.supportedTransforms !== undefined) this.supportedTransforms = data.supportedTransforms; + if (data.currentTransform !== undefined) this.currentTransform = data.currentTransform; + if (data.supportedCompositeAlpha !== undefined) this.supportedCompositeAlpha = data.supportedCompositeAlpha; + if (data.supportedUsageFlags !== undefined) this.supportedUsageFlags = data.supportedUsageFlags; + if (data.supportedSurfaceCounters !== undefined) this.supportedSurfaceCounters = data.supportedSurfaceCounters; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilities2EXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SURFACE_CAPABILITIES_2_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get minImageCount(): number { + return this.#view.getUint32(16, LE); + } + + set minImageCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxImageCount(): number { + return this.#view.getUint32(20, LE); + } + + set maxImageCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get currentExtent(): Extent2D { + return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); + } + + set currentExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get minImageExtent(): Extent2D { + return new Extent2D(this.#data.subarray(32, 32 + Extent2D.size)); + } + + set minImageExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 32); + } + + get maxImageExtent(): Extent2D { + return new Extent2D(this.#data.subarray(40, 40 + Extent2D.size)); + } + + set maxImageExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } + + get maxImageArrayLayers(): number { + return this.#view.getUint32(48, LE); + } + + set maxImageArrayLayers(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get supportedTransforms(): number { + return this.#view.getUint32(52, LE); + } + + set supportedTransforms(value: SurfaceTransformFlagsKHR) { + this.#view.setUint32(52, Number(value), LE); + } + + get currentTransform(): number { + return this.#view.getUint32(56, LE); + } + + set currentTransform(value: SurfaceTransformFlagBitsKHR) { + this.#view.setUint32(56, Number(value), LE); + } + + get supportedCompositeAlpha(): number { + return this.#view.getUint32(60, LE); + } + + set supportedCompositeAlpha(value: CompositeAlphaFlagsKHR) { + this.#view.setUint32(60, Number(value), LE); + } + + get supportedUsageFlags(): number { + return this.#view.getUint32(64, LE); + } + + set supportedUsageFlags(value: ImageUsageFlags) { + this.#view.setUint32(64, Number(value), LE); + } + + get supportedSurfaceCounters(): number { + return this.#view.getUint32(68, LE); + } + + set supportedSurfaceCounters(value: SurfaceCounterFlagsEXT) { + this.#view.setUint32(68, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceCapabilities2KHR.ts b/api/struct/SurfaceCapabilities2KHR.ts new file mode 100644 index 0000000..6bb1910 --- /dev/null +++ b/api/struct/SurfaceCapabilities2KHR.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SurfaceCapabilitiesKHR} from "./SurfaceCapabilitiesKHR.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSurfaceCapabilities2KHR { + pNext?: AnyPointer; + surfaceCapabilities?: SurfaceCapabilitiesKHR; +} + +export class SurfaceCapabilities2KHR implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceCapabilities2KHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilities2KHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceCapabilities2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceCapabilities2KHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceCapabilities2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.surfaceCapabilities !== undefined) this.surfaceCapabilities = data.surfaceCapabilities; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilities2KHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SURFACE_CAPABILITIES_2_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get surfaceCapabilities(): SurfaceCapabilitiesKHR { + return new SurfaceCapabilitiesKHR(this.#data.subarray(16, 16 + SurfaceCapabilitiesKHR.size)); + } + + set surfaceCapabilities(value: SurfaceCapabilitiesKHR) { + if (value[BUFFER].byteLength < SurfaceCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceCapabilitiesFullScreenExclusiveEXT.ts b/api/struct/SurfaceCapabilitiesFullScreenExclusiveEXT.ts new file mode 100644 index 0000000..3144168 --- /dev/null +++ b/api/struct/SurfaceCapabilitiesFullScreenExclusiveEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitSurfaceCapabilitiesFullScreenExclusiveEXT { + pNext?: AnyPointer; + fullScreenExclusiveSupported?: Bool32; +} + +export class SurfaceCapabilitiesFullScreenExclusiveEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceCapabilitiesFullScreenExclusiveEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilitiesFullScreenExclusiveEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceCapabilitiesFullScreenExclusiveEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceCapabilitiesFullScreenExclusiveEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceCapabilitiesFullScreenExclusiveEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fullScreenExclusiveSupported !== undefined) this.fullScreenExclusiveSupported = data.fullScreenExclusiveSupported; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilitiesFullScreenExclusiveEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fullScreenExclusiveSupported(): number { + return this.#view.getUint32(16, LE); + } + + set fullScreenExclusiveSupported(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceCapabilitiesKHR.ts b/api/struct/SurfaceCapabilitiesKHR.ts new file mode 100644 index 0000000..193a00e --- /dev/null +++ b/api/struct/SurfaceCapabilitiesKHR.ts @@ -0,0 +1,161 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { SurfaceTransformFlagBitsKHR } from "../enum.ts"; +import { SurfaceTransformFlagsKHR, CompositeAlphaFlagsKHR, ImageUsageFlags } from "../def.ts"; + +export interface InitSurfaceCapabilitiesKHR { + minImageCount?: number; + maxImageCount?: number; + currentExtent?: Extent2D; + minImageExtent?: Extent2D; + maxImageExtent?: Extent2D; + maxImageArrayLayers?: number; + supportedTransforms?: SurfaceTransformFlagsKHR; + currentTransform?: SurfaceTransformFlagBitsKHR; + supportedCompositeAlpha?: CompositeAlphaFlagsKHR; + supportedUsageFlags?: ImageUsageFlags; +} + +export class SurfaceCapabilitiesKHR implements BaseStruct { + static size = 52; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceCapabilitiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilitiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.minImageCount !== undefined) this.minImageCount = data.minImageCount; + if (data.maxImageCount !== undefined) this.maxImageCount = data.maxImageCount; + if (data.currentExtent !== undefined) this.currentExtent = data.currentExtent; + if (data.minImageExtent !== undefined) this.minImageExtent = data.minImageExtent; + if (data.maxImageExtent !== undefined) this.maxImageExtent = data.maxImageExtent; + if (data.maxImageArrayLayers !== undefined) this.maxImageArrayLayers = data.maxImageArrayLayers; + if (data.supportedTransforms !== undefined) this.supportedTransforms = data.supportedTransforms; + if (data.currentTransform !== undefined) this.currentTransform = data.currentTransform; + if (data.supportedCompositeAlpha !== undefined) this.supportedCompositeAlpha = data.supportedCompositeAlpha; + if (data.supportedUsageFlags !== undefined) this.supportedUsageFlags = data.supportedUsageFlags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilitiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get minImageCount(): number { + return this.#view.getUint32(0, LE); + } + + set minImageCount(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get maxImageCount(): number { + return this.#view.getUint32(4, LE); + } + + set maxImageCount(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get currentExtent(): Extent2D { + return new Extent2D(this.#data.subarray(8, 8 + Extent2D.size)); + } + + set currentExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 8); + } + + get minImageExtent(): Extent2D { + return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); + } + + set minImageExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get maxImageExtent(): Extent2D { + return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); + } + + set maxImageExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get maxImageArrayLayers(): number { + return this.#view.getUint32(32, LE); + } + + set maxImageArrayLayers(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get supportedTransforms(): number { + return this.#view.getUint32(36, LE); + } + + set supportedTransforms(value: SurfaceTransformFlagsKHR) { + this.#view.setUint32(36, Number(value), LE); + } + + get currentTransform(): number { + return this.#view.getUint32(40, LE); + } + + set currentTransform(value: SurfaceTransformFlagBitsKHR) { + this.#view.setUint32(40, Number(value), LE); + } + + get supportedCompositeAlpha(): number { + return this.#view.getUint32(44, LE); + } + + set supportedCompositeAlpha(value: CompositeAlphaFlagsKHR) { + this.#view.setUint32(44, Number(value), LE); + } + + get supportedUsageFlags(): number { + return this.#view.getUint32(48, LE); + } + + set supportedUsageFlags(value: ImageUsageFlags) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceCapabilitiesPresentBarrierNV.ts b/api/struct/SurfaceCapabilitiesPresentBarrierNV.ts new file mode 100644 index 0000000..77d942a --- /dev/null +++ b/api/struct/SurfaceCapabilitiesPresentBarrierNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitSurfaceCapabilitiesPresentBarrierNV { + pNext?: AnyPointer; + presentBarrierSupported?: Bool32; +} + +export class SurfaceCapabilitiesPresentBarrierNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceCapabilitiesPresentBarrierNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilitiesPresentBarrierNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceCapabilitiesPresentBarrierNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceCapabilitiesPresentBarrierNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceCapabilitiesPresentBarrierNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.presentBarrierSupported !== undefined) this.presentBarrierSupported = data.presentBarrierSupported; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilitiesPresentBarrierNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SURFACE_CAPABILITIES_PRESENT_BARRIER_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get presentBarrierSupported(): number { + return this.#view.getUint32(16, LE); + } + + set presentBarrierSupported(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceFormat2KHR.ts b/api/struct/SurfaceFormat2KHR.ts new file mode 100644 index 0000000..5da0c6f --- /dev/null +++ b/api/struct/SurfaceFormat2KHR.ts @@ -0,0 +1,83 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {SurfaceFormatKHR} from "./SurfaceFormatKHR.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSurfaceFormat2KHR { + pNext?: AnyPointer; + surfaceFormat?: SurfaceFormatKHR; +} + +export class SurfaceFormat2KHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceFormat2KHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceFormat2KHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceFormat2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceFormat2KHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceFormat2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.surfaceFormat !== undefined) this.surfaceFormat = data.surfaceFormat; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFormat2KHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SURFACE_FORMAT_2_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get surfaceFormat(): SurfaceFormatKHR { + return new SurfaceFormatKHR(this.#data.subarray(16, 16 + SurfaceFormatKHR.size)); + } + + set surfaceFormat(value: SurfaceFormatKHR) { + if (value[BUFFER].byteLength < SurfaceFormatKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceFormatKHR.ts b/api/struct/SurfaceFormatKHR.ts new file mode 100644 index 0000000..0af065f --- /dev/null +++ b/api/struct/SurfaceFormatKHR.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { Format, ColorSpaceKHR } from "../enum.ts"; + +export interface InitSurfaceFormatKHR { + format?: Format; + colorSpace?: ColorSpaceKHR; +} + +export class SurfaceFormatKHR implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceFormatKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceFormatKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceFormatKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceFormatKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceFormatKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.format !== undefined) this.format = data.format; + if (data.colorSpace !== undefined) this.colorSpace = data.colorSpace; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFormatKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get format(): number { + return this.#view.getUint32(0, LE); + } + + set format(value: Format) { + this.#view.setUint32(0, Number(value), LE); + } + + get colorSpace(): number { + return this.#view.getUint32(4, LE); + } + + set colorSpace(value: ColorSpaceKHR) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceFullScreenExclusiveInfoEXT.ts b/api/struct/SurfaceFullScreenExclusiveInfoEXT.ts new file mode 100644 index 0000000..868336d --- /dev/null +++ b/api/struct/SurfaceFullScreenExclusiveInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, FullScreenExclusiveEXT } from "../enum.ts"; + +export interface InitSurfaceFullScreenExclusiveInfoEXT { + pNext?: AnyPointer; + fullScreenExclusive?: FullScreenExclusiveEXT; +} + +export class SurfaceFullScreenExclusiveInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceFullScreenExclusiveInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceFullScreenExclusiveInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceFullScreenExclusiveInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceFullScreenExclusiveInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceFullScreenExclusiveInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.fullScreenExclusive !== undefined) this.fullScreenExclusive = data.fullScreenExclusive; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFullScreenExclusiveInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get fullScreenExclusive(): number { + return this.#view.getUint32(16, LE); + } + + set fullScreenExclusive(value: FullScreenExclusiveEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceFullScreenExclusiveWin32InfoEXT.ts b/api/struct/SurfaceFullScreenExclusiveWin32InfoEXT.ts new file mode 100644 index 0000000..84773ef --- /dev/null +++ b/api/struct/SurfaceFullScreenExclusiveWin32InfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSurfaceFullScreenExclusiveWin32InfoEXT { + pNext?: AnyPointer; + hmonitor?: Deno.PointerValue; +} + +export class SurfaceFullScreenExclusiveWin32InfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceFullScreenExclusiveWin32InfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceFullScreenExclusiveWin32InfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceFullScreenExclusiveWin32InfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceFullScreenExclusiveWin32InfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceFullScreenExclusiveWin32InfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.hmonitor !== undefined) this.hmonitor = data.hmonitor; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFullScreenExclusiveWin32InfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get hmonitor(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set hmonitor(value: Deno.PointerValue) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SurfaceProtectedCapabilitiesKHR.ts b/api/struct/SurfaceProtectedCapabilitiesKHR.ts new file mode 100644 index 0000000..b9f56a7 --- /dev/null +++ b/api/struct/SurfaceProtectedCapabilitiesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitSurfaceProtectedCapabilitiesKHR { + pNext?: AnyPointer; + supportsProtected?: Bool32; +} + +export class SurfaceProtectedCapabilitiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSurfaceProtectedCapabilitiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceProtectedCapabilitiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SurfaceProtectedCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SurfaceProtectedCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SurfaceProtectedCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.supportsProtected !== undefined) this.supportsProtected = data.supportsProtected; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceProtectedCapabilitiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SURFACE_PROTECTED_CAPABILITIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get supportsProtected(): number { + return this.#view.getUint32(16, LE); + } + + set supportsProtected(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SwapchainCounterCreateInfoEXT.ts b/api/struct/SwapchainCounterCreateInfoEXT.ts new file mode 100644 index 0000000..5fd77e9 --- /dev/null +++ b/api/struct/SwapchainCounterCreateInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { SurfaceCounterFlagsEXT } from "../def.ts"; + +export interface InitSwapchainCounterCreateInfoEXT { + pNext?: AnyPointer; + surfaceCounters?: SurfaceCounterFlagsEXT; +} + +export class SwapchainCounterCreateInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSwapchainCounterCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainCounterCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SwapchainCounterCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SwapchainCounterCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SwapchainCounterCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.surfaceCounters !== undefined) this.surfaceCounters = data.surfaceCounters; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainCounterCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SWAPCHAIN_COUNTER_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get surfaceCounters(): number { + return this.#view.getUint32(16, LE); + } + + set surfaceCounters(value: SurfaceCounterFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SwapchainCreateInfoKHR.ts b/api/struct/SwapchainCreateInfoKHR.ts new file mode 100644 index 0000000..5386c25 --- /dev/null +++ b/api/struct/SwapchainCreateInfoKHR.ts @@ -0,0 +1,234 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType, Format, ColorSpaceKHR, SharingMode, SurfaceTransformFlagBitsKHR, CompositeAlphaFlagBitsKHR, PresentModeKHR } from "../enum.ts"; +import { SwapchainCreateFlagsKHR, SurfaceKHR, ImageUsageFlags, Bool32, SwapchainKHR } from "../def.ts"; + +export interface InitSwapchainCreateInfoKHR { + pNext?: AnyPointer; + flags?: SwapchainCreateFlagsKHR; + surface?: SurfaceKHR; + minImageCount?: number; + imageFormat?: Format; + imageColorSpace?: ColorSpaceKHR; + imageExtent?: Extent2D; + imageArrayLayers?: number; + imageUsage?: ImageUsageFlags; + imageSharingMode?: SharingMode; + queueFamilyIndexCount?: number; + pQueueFamilyIndices?: AnyPointer; + preTransform?: SurfaceTransformFlagBitsKHR; + compositeAlpha?: CompositeAlphaFlagBitsKHR; + presentMode?: PresentModeKHR; + clipped?: Bool32; + oldSwapchain?: SwapchainKHR; +} + +export class SwapchainCreateInfoKHR implements BaseStruct { + static size = 104; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSwapchainCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SwapchainCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SwapchainCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SwapchainCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.surface !== undefined) this.surface = data.surface; + if (data.minImageCount !== undefined) this.minImageCount = data.minImageCount; + if (data.imageFormat !== undefined) this.imageFormat = data.imageFormat; + if (data.imageColorSpace !== undefined) this.imageColorSpace = data.imageColorSpace; + if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; + if (data.imageArrayLayers !== undefined) this.imageArrayLayers = data.imageArrayLayers; + if (data.imageUsage !== undefined) this.imageUsage = data.imageUsage; + if (data.imageSharingMode !== undefined) this.imageSharingMode = data.imageSharingMode; + if (data.queueFamilyIndexCount !== undefined) this.queueFamilyIndexCount = data.queueFamilyIndexCount; + if (data.pQueueFamilyIndices !== undefined) this.pQueueFamilyIndices = data.pQueueFamilyIndices; + if (data.preTransform !== undefined) this.preTransform = data.preTransform; + if (data.compositeAlpha !== undefined) this.compositeAlpha = data.compositeAlpha; + if (data.presentMode !== undefined) this.presentMode = data.presentMode; + if (data.clipped !== undefined) this.clipped = data.clipped; + if (data.oldSwapchain !== undefined) this.oldSwapchain = data.oldSwapchain; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SWAPCHAIN_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: SwapchainCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get surface(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set surface(value: SurfaceKHR) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get minImageCount(): number { + return this.#view.getUint32(32, LE); + } + + set minImageCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get imageFormat(): number { + return this.#view.getUint32(36, LE); + } + + set imageFormat(value: Format) { + this.#view.setUint32(36, Number(value), LE); + } + + get imageColorSpace(): number { + return this.#view.getUint32(40, LE); + } + + set imageColorSpace(value: ColorSpaceKHR) { + this.#view.setUint32(40, Number(value), LE); + } + + get imageExtent(): Extent2D { + return new Extent2D(this.#data.subarray(44, 44 + Extent2D.size)); + } + + set imageExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 44); + } + + get imageArrayLayers(): number { + return this.#view.getUint32(52, LE); + } + + set imageArrayLayers(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get imageUsage(): number { + return this.#view.getUint32(56, LE); + } + + set imageUsage(value: ImageUsageFlags) { + this.#view.setUint32(56, Number(value), LE); + } + + get imageSharingMode(): number { + return this.#view.getUint32(60, LE); + } + + set imageSharingMode(value: SharingMode) { + this.#view.setUint32(60, Number(value), LE); + } + + get queueFamilyIndexCount(): number { + return this.#view.getUint32(64, LE); + } + + set queueFamilyIndexCount(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get pQueueFamilyIndices(): Deno.PointerValue { + return pointerFromView(this.#view, 72, LE); + } + + set pQueueFamilyIndices(value: AnyPointer) { + this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); + } + + get preTransform(): number { + return this.#view.getUint32(80, LE); + } + + set preTransform(value: SurfaceTransformFlagBitsKHR) { + this.#view.setUint32(80, Number(value), LE); + } + + get compositeAlpha(): number { + return this.#view.getUint32(84, LE); + } + + set compositeAlpha(value: CompositeAlphaFlagBitsKHR) { + this.#view.setUint32(84, Number(value), LE); + } + + get presentMode(): number { + return this.#view.getUint32(88, LE); + } + + set presentMode(value: PresentModeKHR) { + this.#view.setUint32(88, Number(value), LE); + } + + get clipped(): number { + return this.#view.getUint32(92, LE); + } + + set clipped(value: Bool32) { + this.#view.setUint32(92, Number(value), LE); + } + + get oldSwapchain(): Deno.PointerValue { + return pointerFromView(this.#view, 96, LE); + } + + set oldSwapchain(value: SwapchainKHR) { + this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/SwapchainDisplayNativeHdrCreateInfoAMD.ts b/api/struct/SwapchainDisplayNativeHdrCreateInfoAMD.ts new file mode 100644 index 0000000..345ed42 --- /dev/null +++ b/api/struct/SwapchainDisplayNativeHdrCreateInfoAMD.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitSwapchainDisplayNativeHdrCreateInfoAMD { + pNext?: AnyPointer; + localDimmingEnable?: Bool32; +} + +export class SwapchainDisplayNativeHdrCreateInfoAMD implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSwapchainDisplayNativeHdrCreateInfoAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainDisplayNativeHdrCreateInfoAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SwapchainDisplayNativeHdrCreateInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SwapchainDisplayNativeHdrCreateInfoAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SwapchainDisplayNativeHdrCreateInfoAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.localDimmingEnable !== undefined) this.localDimmingEnable = data.localDimmingEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainDisplayNativeHdrCreateInfoAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get localDimmingEnable(): number { + return this.#view.getUint32(16, LE); + } + + set localDimmingEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SwapchainImageCreateInfoANDROID.ts b/api/struct/SwapchainImageCreateInfoANDROID.ts new file mode 100644 index 0000000..a097b89 --- /dev/null +++ b/api/struct/SwapchainImageCreateInfoANDROID.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { SwapchainImageUsageFlagsANDROID } from "../def.ts"; + +export interface InitSwapchainImageCreateInfoANDROID { + pNext?: AnyPointer; + usage?: SwapchainImageUsageFlagsANDROID; +} + +export class SwapchainImageCreateInfoANDROID implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSwapchainImageCreateInfoANDROID); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainImageCreateInfoANDROID) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SwapchainImageCreateInfoANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SwapchainImageCreateInfoANDROID.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SwapchainImageCreateInfoANDROID.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.usage !== undefined) this.usage = data.usage; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainImageCreateInfoANDROID.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get usage(): number { + return this.#view.getUint32(16, LE); + } + + set usage(value: SwapchainImageUsageFlagsANDROID) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SwapchainPresentBarrierCreateInfoNV.ts b/api/struct/SwapchainPresentBarrierCreateInfoNV.ts new file mode 100644 index 0000000..e021158 --- /dev/null +++ b/api/struct/SwapchainPresentBarrierCreateInfoNV.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitSwapchainPresentBarrierCreateInfoNV { + pNext?: AnyPointer; + presentBarrierEnable?: Bool32; +} + +export class SwapchainPresentBarrierCreateInfoNV implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSwapchainPresentBarrierCreateInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainPresentBarrierCreateInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SwapchainPresentBarrierCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SwapchainPresentBarrierCreateInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SwapchainPresentBarrierCreateInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.presentBarrierEnable !== undefined) this.presentBarrierEnable = data.presentBarrierEnable; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainPresentBarrierCreateInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get presentBarrierEnable(): number { + return this.#view.getUint32(16, LE); + } + + set presentBarrierEnable(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/SysmemColorSpaceFUCHSIA.ts b/api/struct/SysmemColorSpaceFUCHSIA.ts new file mode 100644 index 0000000..352d42b --- /dev/null +++ b/api/struct/SysmemColorSpaceFUCHSIA.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitSysmemColorSpaceFUCHSIA { + pNext?: AnyPointer; + colorSpace?: number; +} + +export class SysmemColorSpaceFUCHSIA implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitSysmemColorSpaceFUCHSIA); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitSysmemColorSpaceFUCHSIA) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(SysmemColorSpaceFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < SysmemColorSpaceFUCHSIA.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(SysmemColorSpaceFUCHSIA.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.colorSpace !== undefined) this.colorSpace = data.colorSpace; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SysmemColorSpaceFUCHSIA.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.SYSMEM_COLOR_SPACE_FUCHSIA; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get colorSpace(): number { + return this.#view.getUint32(16, LE); + } + + set colorSpace(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/TextureLODGatherFormatPropertiesAMD.ts b/api/struct/TextureLODGatherFormatPropertiesAMD.ts new file mode 100644 index 0000000..2b2c317 --- /dev/null +++ b/api/struct/TextureLODGatherFormatPropertiesAMD.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitTextureLODGatherFormatPropertiesAMD { + pNext?: AnyPointer; + supportsTextureGatherLODBiasAMD?: Bool32; +} + +export class TextureLODGatherFormatPropertiesAMD implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitTextureLODGatherFormatPropertiesAMD); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitTextureLODGatherFormatPropertiesAMD) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(TextureLODGatherFormatPropertiesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < TextureLODGatherFormatPropertiesAMD.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(TextureLODGatherFormatPropertiesAMD.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.supportsTextureGatherLODBiasAMD !== undefined) this.supportsTextureGatherLODBiasAMD = data.supportsTextureGatherLODBiasAMD; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TextureLODGatherFormatPropertiesAMD.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get supportsTextureGatherLODBiasAMD(): number { + return this.#view.getUint32(16, LE); + } + + set supportsTextureGatherLODBiasAMD(value: Bool32) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/TilePropertiesQCOM.ts b/api/struct/TilePropertiesQCOM.ts new file mode 100644 index 0000000..f7510c0 --- /dev/null +++ b/api/struct/TilePropertiesQCOM.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent3D} from "./Extent3D.ts"; +import {Extent2D} from "./Extent2D.ts"; +import {Offset2D} from "./Offset2D.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitTilePropertiesQCOM { + pNext?: AnyPointer; + tileSize?: Extent3D; + apronSize?: Extent2D; + origin?: Offset2D; +} + +export class TilePropertiesQCOM implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitTilePropertiesQCOM); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitTilePropertiesQCOM) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(TilePropertiesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < TilePropertiesQCOM.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(TilePropertiesQCOM.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.tileSize !== undefined) this.tileSize = data.tileSize; + if (data.apronSize !== undefined) this.apronSize = data.apronSize; + if (data.origin !== undefined) this.origin = data.origin; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TilePropertiesQCOM.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.TILE_PROPERTIES_QCOM; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get tileSize(): Extent3D { + return new Extent3D(this.#data.subarray(16, 16 + Extent3D.size)); + } + + set tileSize(value: Extent3D) { + if (value[BUFFER].byteLength < Extent3D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get apronSize(): Extent2D { + return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); + } + + set apronSize(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 28); + } + + get origin(): Offset2D { + return new Offset2D(this.#data.subarray(36, 36 + Offset2D.size)); + } + + set origin(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 36); + } +} \ No newline at end of file diff --git a/api/struct/TimelineSemaphoreSubmitInfo.ts b/api/struct/TimelineSemaphoreSubmitInfo.ts new file mode 100644 index 0000000..711b352 --- /dev/null +++ b/api/struct/TimelineSemaphoreSubmitInfo.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitTimelineSemaphoreSubmitInfo { + pNext?: AnyPointer; + waitSemaphoreValueCount?: number; + pWaitSemaphoreValues?: AnyPointer; + signalSemaphoreValueCount?: number; + pSignalSemaphoreValues?: AnyPointer; +} + +export class TimelineSemaphoreSubmitInfo implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitTimelineSemaphoreSubmitInfo); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitTimelineSemaphoreSubmitInfo) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(TimelineSemaphoreSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < TimelineSemaphoreSubmitInfo.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(TimelineSemaphoreSubmitInfo.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.waitSemaphoreValueCount !== undefined) this.waitSemaphoreValueCount = data.waitSemaphoreValueCount; + if (data.pWaitSemaphoreValues !== undefined) this.pWaitSemaphoreValues = data.pWaitSemaphoreValues; + if (data.signalSemaphoreValueCount !== undefined) this.signalSemaphoreValueCount = data.signalSemaphoreValueCount; + if (data.pSignalSemaphoreValues !== undefined) this.pSignalSemaphoreValues = data.pSignalSemaphoreValues; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TimelineSemaphoreSubmitInfo.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.TIMELINE_SEMAPHORE_SUBMIT_INFO; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get waitSemaphoreValueCount(): number { + return this.#view.getUint32(16, LE); + } + + set waitSemaphoreValueCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pWaitSemaphoreValues(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pWaitSemaphoreValues(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get signalSemaphoreValueCount(): number { + return this.#view.getUint32(32, LE); + } + + set signalSemaphoreValueCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pSignalSemaphoreValues(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pSignalSemaphoreValues(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/TimelineSemaphoreSubmitInfoKHR.ts b/api/struct/TimelineSemaphoreSubmitInfoKHR.ts new file mode 100644 index 0000000..21e3db8 --- /dev/null +++ b/api/struct/TimelineSemaphoreSubmitInfoKHR.ts @@ -0,0 +1,2 @@ + import { TimelineSemaphoreSubmitInfo } from "./TimelineSemaphoreSubmitInfo.ts"; + export type TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo; \ No newline at end of file diff --git a/api/struct/TraceRaysIndirectCommand2KHR.ts b/api/struct/TraceRaysIndirectCommand2KHR.ts new file mode 100644 index 0000000..1f87010 --- /dev/null +++ b/api/struct/TraceRaysIndirectCommand2KHR.ts @@ -0,0 +1,190 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { DeviceAddress, DeviceSize } from "../def.ts"; + +export interface InitTraceRaysIndirectCommand2KHR { + raygenShaderRecordAddress?: DeviceAddress; + raygenShaderRecordSize?: DeviceSize; + missShaderBindingTableAddress?: DeviceAddress; + missShaderBindingTableSize?: DeviceSize; + missShaderBindingTableStride?: DeviceSize; + hitShaderBindingTableAddress?: DeviceAddress; + hitShaderBindingTableSize?: DeviceSize; + hitShaderBindingTableStride?: DeviceSize; + callableShaderBindingTableAddress?: DeviceAddress; + callableShaderBindingTableSize?: DeviceSize; + callableShaderBindingTableStride?: DeviceSize; + width?: number; + height?: number; + depth?: number; +} + +export class TraceRaysIndirectCommand2KHR implements BaseStruct { + static size = 104; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitTraceRaysIndirectCommand2KHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitTraceRaysIndirectCommand2KHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(TraceRaysIndirectCommand2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < TraceRaysIndirectCommand2KHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(TraceRaysIndirectCommand2KHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.raygenShaderRecordAddress !== undefined) this.raygenShaderRecordAddress = data.raygenShaderRecordAddress; + if (data.raygenShaderRecordSize !== undefined) this.raygenShaderRecordSize = data.raygenShaderRecordSize; + if (data.missShaderBindingTableAddress !== undefined) this.missShaderBindingTableAddress = data.missShaderBindingTableAddress; + if (data.missShaderBindingTableSize !== undefined) this.missShaderBindingTableSize = data.missShaderBindingTableSize; + if (data.missShaderBindingTableStride !== undefined) this.missShaderBindingTableStride = data.missShaderBindingTableStride; + if (data.hitShaderBindingTableAddress !== undefined) this.hitShaderBindingTableAddress = data.hitShaderBindingTableAddress; + if (data.hitShaderBindingTableSize !== undefined) this.hitShaderBindingTableSize = data.hitShaderBindingTableSize; + if (data.hitShaderBindingTableStride !== undefined) this.hitShaderBindingTableStride = data.hitShaderBindingTableStride; + if (data.callableShaderBindingTableAddress !== undefined) this.callableShaderBindingTableAddress = data.callableShaderBindingTableAddress; + if (data.callableShaderBindingTableSize !== undefined) this.callableShaderBindingTableSize = data.callableShaderBindingTableSize; + if (data.callableShaderBindingTableStride !== undefined) this.callableShaderBindingTableStride = data.callableShaderBindingTableStride; + if (data.width !== undefined) this.width = data.width; + if (data.height !== undefined) this.height = data.height; + if (data.depth !== undefined) this.depth = data.depth; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TraceRaysIndirectCommand2KHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get raygenShaderRecordAddress(): bigint { + return this.#view.getBigUint64(0, LE); + } + + set raygenShaderRecordAddress(value: DeviceAddress) { + this.#view.setBigUint64(0, BigInt(value), LE); + } + + get raygenShaderRecordSize(): bigint { + return this.#view.getBigUint64(8, LE); + } + + set raygenShaderRecordSize(value: DeviceSize) { + this.#view.setBigUint64(8, BigInt(value), LE); + } + + get missShaderBindingTableAddress(): bigint { + return this.#view.getBigUint64(16, LE); + } + + set missShaderBindingTableAddress(value: DeviceAddress) { + this.#view.setBigUint64(16, BigInt(value), LE); + } + + get missShaderBindingTableSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set missShaderBindingTableSize(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get missShaderBindingTableStride(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set missShaderBindingTableStride(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get hitShaderBindingTableAddress(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set hitShaderBindingTableAddress(value: DeviceAddress) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get hitShaderBindingTableSize(): bigint { + return this.#view.getBigUint64(48, LE); + } + + set hitShaderBindingTableSize(value: DeviceSize) { + this.#view.setBigUint64(48, BigInt(value), LE); + } + + get hitShaderBindingTableStride(): bigint { + return this.#view.getBigUint64(56, LE); + } + + set hitShaderBindingTableStride(value: DeviceSize) { + this.#view.setBigUint64(56, BigInt(value), LE); + } + + get callableShaderBindingTableAddress(): bigint { + return this.#view.getBigUint64(64, LE); + } + + set callableShaderBindingTableAddress(value: DeviceAddress) { + this.#view.setBigUint64(64, BigInt(value), LE); + } + + get callableShaderBindingTableSize(): bigint { + return this.#view.getBigUint64(72, LE); + } + + set callableShaderBindingTableSize(value: DeviceSize) { + this.#view.setBigUint64(72, BigInt(value), LE); + } + + get callableShaderBindingTableStride(): bigint { + return this.#view.getBigUint64(80, LE); + } + + set callableShaderBindingTableStride(value: DeviceSize) { + this.#view.setBigUint64(80, BigInt(value), LE); + } + + get width(): number { + return this.#view.getUint32(88, LE); + } + + set width(value: number) { + this.#view.setUint32(88, Number(value), LE); + } + + get height(): number { + return this.#view.getUint32(92, LE); + } + + set height(value: number) { + this.#view.setUint32(92, Number(value), LE); + } + + get depth(): number { + return this.#view.getUint32(96, LE); + } + + set depth(value: number) { + this.#view.setUint32(96, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/TraceRaysIndirectCommandKHR.ts b/api/struct/TraceRaysIndirectCommandKHR.ts new file mode 100644 index 0000000..af67231 --- /dev/null +++ b/api/struct/TraceRaysIndirectCommandKHR.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitTraceRaysIndirectCommandKHR { + width?: number; + height?: number; + depth?: number; +} + +export class TraceRaysIndirectCommandKHR implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitTraceRaysIndirectCommandKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitTraceRaysIndirectCommandKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(TraceRaysIndirectCommandKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < TraceRaysIndirectCommandKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(TraceRaysIndirectCommandKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.width !== undefined) this.width = data.width; + if (data.height !== undefined) this.height = data.height; + if (data.depth !== undefined) this.depth = data.depth; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TraceRaysIndirectCommandKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get width(): number { + return this.#view.getUint32(0, LE); + } + + set width(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get height(): number { + return this.#view.getUint32(4, LE); + } + + set height(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get depth(): number { + return this.#view.getUint32(8, LE); + } + + set depth(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/TransformMatrixKHR.ts b/api/struct/TransformMatrixKHR.ts new file mode 100644 index 0000000..baa9a56 --- /dev/null +++ b/api/struct/TransformMatrixKHR.ts @@ -0,0 +1,59 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitTransformMatrixKHR { + matrix?: Float32Array; +} + +export class TransformMatrixKHR implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitTransformMatrixKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitTransformMatrixKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(TransformMatrixKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < TransformMatrixKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(TransformMatrixKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.matrix !== undefined) this.matrix = data.matrix; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TransformMatrixKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get matrix(): Float32Array { + return new Float32Array(this.#data.buffer, this.#data.byteOffset + 0, 3); + } + + set matrix(value: Float32Array) { + this.#data.set(new Uint8Array(value.buffer), 0); + } +} \ No newline at end of file diff --git a/api/struct/TransformMatrixNV.ts b/api/struct/TransformMatrixNV.ts new file mode 100644 index 0000000..8ac4ce5 --- /dev/null +++ b/api/struct/TransformMatrixNV.ts @@ -0,0 +1,2 @@ + import { TransformMatrixKHR } from "./TransformMatrixKHR.ts"; + export type TransformMatrixNV = TransformMatrixKHR; \ No newline at end of file diff --git a/api/struct/ValidationCacheCreateInfoEXT.ts b/api/struct/ValidationCacheCreateInfoEXT.ts new file mode 100644 index 0000000..a4da85f --- /dev/null +++ b/api/struct/ValidationCacheCreateInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ValidationCacheCreateFlagsEXT } from "../def.ts"; + +export interface InitValidationCacheCreateInfoEXT { + pNext?: AnyPointer; + flags?: ValidationCacheCreateFlagsEXT; + initialDataSize?: number | bigint; + pInitialData?: AnyPointer; +} + +export class ValidationCacheCreateInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitValidationCacheCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitValidationCacheCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ValidationCacheCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ValidationCacheCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ValidationCacheCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.initialDataSize !== undefined) this.initialDataSize = data.initialDataSize; + if (data.pInitialData !== undefined) this.pInitialData = data.pInitialData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ValidationCacheCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VALIDATION_CACHE_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: ValidationCacheCreateFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get initialDataSize(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set initialDataSize(value: number | bigint) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get pInitialData(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pInitialData(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ValidationFeaturesEXT.ts b/api/struct/ValidationFeaturesEXT.ts new file mode 100644 index 0000000..5fc96fc --- /dev/null +++ b/api/struct/ValidationFeaturesEXT.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ValidationFeatureEnableEXT, ValidationFeatureDisableEXT } from "../enum.ts"; + +export interface InitValidationFeaturesEXT { + pNext?: AnyPointer; + enabledValidationFeatureCount?: number; + pEnabledValidationFeatures?: AnyPointer; + disabledValidationFeatureCount?: number; + pDisabledValidationFeatures?: AnyPointer; +} + +export class ValidationFeaturesEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitValidationFeaturesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitValidationFeaturesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ValidationFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ValidationFeaturesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ValidationFeaturesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.enabledValidationFeatureCount !== undefined) this.enabledValidationFeatureCount = data.enabledValidationFeatureCount; + if (data.pEnabledValidationFeatures !== undefined) this.pEnabledValidationFeatures = data.pEnabledValidationFeatures; + if (data.disabledValidationFeatureCount !== undefined) this.disabledValidationFeatureCount = data.disabledValidationFeatureCount; + if (data.pDisabledValidationFeatures !== undefined) this.pDisabledValidationFeatures = data.pDisabledValidationFeatures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ValidationFeaturesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VALIDATION_FEATURES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get enabledValidationFeatureCount(): number { + return this.#view.getUint32(16, LE); + } + + set enabledValidationFeatureCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pEnabledValidationFeatures(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pEnabledValidationFeatures(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get disabledValidationFeatureCount(): number { + return this.#view.getUint32(32, LE); + } + + set disabledValidationFeatureCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pDisabledValidationFeatures(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pDisabledValidationFeatures(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/ValidationFlagsEXT.ts b/api/struct/ValidationFlagsEXT.ts new file mode 100644 index 0000000..0562afa --- /dev/null +++ b/api/struct/ValidationFlagsEXT.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, ValidationCheckEXT } from "../enum.ts"; + +export interface InitValidationFlagsEXT { + pNext?: AnyPointer; + disabledValidationCheckCount?: number; + pDisabledValidationChecks?: AnyPointer; +} + +export class ValidationFlagsEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitValidationFlagsEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitValidationFlagsEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ValidationFlagsEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ValidationFlagsEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ValidationFlagsEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.disabledValidationCheckCount !== undefined) this.disabledValidationCheckCount = data.disabledValidationCheckCount; + if (data.pDisabledValidationChecks !== undefined) this.pDisabledValidationChecks = data.pDisabledValidationChecks; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ValidationFlagsEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VALIDATION_FLAGS_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get disabledValidationCheckCount(): number { + return this.#view.getUint32(16, LE); + } + + set disabledValidationCheckCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pDisabledValidationChecks(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pDisabledValidationChecks(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VertexInputAttributeDescription.ts b/api/struct/VertexInputAttributeDescription.ts new file mode 100644 index 0000000..9eef487 --- /dev/null +++ b/api/struct/VertexInputAttributeDescription.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { Format } from "../enum.ts"; + +export interface InitVertexInputAttributeDescription { + location?: number; + binding?: number; + format?: Format; + offset?: number; +} + +export class VertexInputAttributeDescription implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVertexInputAttributeDescription); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputAttributeDescription) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VertexInputAttributeDescription.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VertexInputAttributeDescription.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VertexInputAttributeDescription.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.location !== undefined) this.location = data.location; + if (data.binding !== undefined) this.binding = data.binding; + if (data.format !== undefined) this.format = data.format; + if (data.offset !== undefined) this.offset = data.offset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputAttributeDescription.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get location(): number { + return this.#view.getUint32(0, LE); + } + + set location(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get binding(): number { + return this.#view.getUint32(4, LE); + } + + set binding(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get format(): number { + return this.#view.getUint32(8, LE); + } + + set format(value: Format) { + this.#view.setUint32(8, Number(value), LE); + } + + get offset(): number { + return this.#view.getUint32(12, LE); + } + + set offset(value: number) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VertexInputAttributeDescription2EXT.ts b/api/struct/VertexInputAttributeDescription2EXT.ts new file mode 100644 index 0000000..1f62d9e --- /dev/null +++ b/api/struct/VertexInputAttributeDescription2EXT.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, Format } from "../enum.ts"; + +export interface InitVertexInputAttributeDescription2EXT { + pNext?: AnyPointer; + location?: number; + binding?: number; + format?: Format; + offset?: number; +} + +export class VertexInputAttributeDescription2EXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVertexInputAttributeDescription2EXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputAttributeDescription2EXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VertexInputAttributeDescription2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VertexInputAttributeDescription2EXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VertexInputAttributeDescription2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.location !== undefined) this.location = data.location; + if (data.binding !== undefined) this.binding = data.binding; + if (data.format !== undefined) this.format = data.format; + if (data.offset !== undefined) this.offset = data.offset; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputAttributeDescription2EXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get location(): number { + return this.#view.getUint32(16, LE); + } + + set location(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get binding(): number { + return this.#view.getUint32(20, LE); + } + + set binding(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get format(): number { + return this.#view.getUint32(24, LE); + } + + set format(value: Format) { + this.#view.setUint32(24, Number(value), LE); + } + + get offset(): number { + return this.#view.getUint32(28, LE); + } + + set offset(value: number) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VertexInputBindingDescription.ts b/api/struct/VertexInputBindingDescription.ts new file mode 100644 index 0000000..1a324e9 --- /dev/null +++ b/api/struct/VertexInputBindingDescription.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { VertexInputRate } from "../enum.ts"; + +export interface InitVertexInputBindingDescription { + binding?: number; + stride?: number; + inputRate?: VertexInputRate; +} + +export class VertexInputBindingDescription implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVertexInputBindingDescription); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputBindingDescription) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VertexInputBindingDescription.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VertexInputBindingDescription.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VertexInputBindingDescription.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.binding !== undefined) this.binding = data.binding; + if (data.stride !== undefined) this.stride = data.stride; + if (data.inputRate !== undefined) this.inputRate = data.inputRate; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputBindingDescription.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get binding(): number { + return this.#view.getUint32(0, LE); + } + + set binding(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get stride(): number { + return this.#view.getUint32(4, LE); + } + + set stride(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get inputRate(): number { + return this.#view.getUint32(8, LE); + } + + set inputRate(value: VertexInputRate) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VertexInputBindingDescription2EXT.ts b/api/struct/VertexInputBindingDescription2EXT.ts new file mode 100644 index 0000000..5068dde --- /dev/null +++ b/api/struct/VertexInputBindingDescription2EXT.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, VertexInputRate } from "../enum.ts"; + +export interface InitVertexInputBindingDescription2EXT { + pNext?: AnyPointer; + binding?: number; + stride?: number; + inputRate?: VertexInputRate; + divisor?: number; +} + +export class VertexInputBindingDescription2EXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVertexInputBindingDescription2EXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputBindingDescription2EXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VertexInputBindingDescription2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VertexInputBindingDescription2EXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VertexInputBindingDescription2EXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.binding !== undefined) this.binding = data.binding; + if (data.stride !== undefined) this.stride = data.stride; + if (data.inputRate !== undefined) this.inputRate = data.inputRate; + if (data.divisor !== undefined) this.divisor = data.divisor; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputBindingDescription2EXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get binding(): number { + return this.#view.getUint32(16, LE); + } + + set binding(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get stride(): number { + return this.#view.getUint32(20, LE); + } + + set stride(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get inputRate(): number { + return this.#view.getUint32(24, LE); + } + + set inputRate(value: VertexInputRate) { + this.#view.setUint32(24, Number(value), LE); + } + + get divisor(): number { + return this.#view.getUint32(28, LE); + } + + set divisor(value: number) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VertexInputBindingDivisorDescriptionEXT.ts b/api/struct/VertexInputBindingDivisorDescriptionEXT.ts new file mode 100644 index 0000000..6dc566e --- /dev/null +++ b/api/struct/VertexInputBindingDivisorDescriptionEXT.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitVertexInputBindingDivisorDescriptionEXT { + binding?: number; + divisor?: number; +} + +export class VertexInputBindingDivisorDescriptionEXT implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVertexInputBindingDivisorDescriptionEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputBindingDivisorDescriptionEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VertexInputBindingDivisorDescriptionEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VertexInputBindingDivisorDescriptionEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VertexInputBindingDivisorDescriptionEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.binding !== undefined) this.binding = data.binding; + if (data.divisor !== undefined) this.divisor = data.divisor; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputBindingDivisorDescriptionEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get binding(): number { + return this.#view.getUint32(0, LE); + } + + set binding(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get divisor(): number { + return this.#view.getUint32(4, LE); + } + + set divisor(value: number) { + this.#view.setUint32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ViSurfaceCreateInfoNN.ts b/api/struct/ViSurfaceCreateInfoNN.ts new file mode 100644 index 0000000..d98594c --- /dev/null +++ b/api/struct/ViSurfaceCreateInfoNN.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { ViSurfaceCreateFlagsNN } from "../def.ts"; + +export interface InitViSurfaceCreateInfoNN { + pNext?: AnyPointer; + flags?: ViSurfaceCreateFlagsNN; + window?: AnyPointer; +} + +export class ViSurfaceCreateInfoNN implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitViSurfaceCreateInfoNN); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitViSurfaceCreateInfoNN) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ViSurfaceCreateInfoNN.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ViSurfaceCreateInfoNN.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ViSurfaceCreateInfoNN.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.window !== undefined) this.window = data.window; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ViSurfaceCreateInfoNN.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VI_SURFACE_CREATE_INFO_NN; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: ViSurfaceCreateFlagsNN) { + this.#view.setUint32(16, Number(value), LE); + } + + get window(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set window(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoBeginCodingInfoKHR.ts b/api/struct/VideoBeginCodingInfoKHR.ts new file mode 100644 index 0000000..65d8117 --- /dev/null +++ b/api/struct/VideoBeginCodingInfoKHR.ts @@ -0,0 +1,121 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoReferenceSlotInfoKHR} from "./VideoReferenceSlotInfoKHR.ts"; +import { StructureType } from "../enum.ts"; +import { VideoBeginCodingFlagsKHR, VideoSessionKHR, VideoSessionParametersKHR } from "../def.ts"; + +export interface InitVideoBeginCodingInfoKHR { + pNext?: AnyPointer; + flags?: VideoBeginCodingFlagsKHR; + videoSession?: VideoSessionKHR; + videoSessionParameters?: VideoSessionParametersKHR; + referenceSlotCount?: number; + pReferenceSlots?: AnyPointer; +} + +export class VideoBeginCodingInfoKHR implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoBeginCodingInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoBeginCodingInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoBeginCodingInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoBeginCodingInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoBeginCodingInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.videoSession !== undefined) this.videoSession = data.videoSession; + if (data.videoSessionParameters !== undefined) this.videoSessionParameters = data.videoSessionParameters; + if (data.referenceSlotCount !== undefined) this.referenceSlotCount = data.referenceSlotCount; + if (data.pReferenceSlots !== undefined) this.pReferenceSlots = data.pReferenceSlots; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoBeginCodingInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_BEGIN_CODING_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoBeginCodingFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get videoSession(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set videoSession(value: VideoSessionKHR) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get videoSessionParameters(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set videoSessionParameters(value: VideoSessionParametersKHR) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get referenceSlotCount(): number { + return this.#view.getUint32(40, LE); + } + + set referenceSlotCount(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get pReferenceSlots(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pReferenceSlots(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoCapabilitiesKHR.ts b/api/struct/VideoCapabilitiesKHR.ts new file mode 100644 index 0000000..92a412e --- /dev/null +++ b/api/struct/VideoCapabilitiesKHR.ts @@ -0,0 +1,174 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import {ExtensionProperties} from "./ExtensionProperties.ts"; +import { StructureType } from "../enum.ts"; +import { VideoCapabilityFlagsKHR, DeviceSize } from "../def.ts"; + +export interface InitVideoCapabilitiesKHR { + pNext?: AnyPointer; + flags?: VideoCapabilityFlagsKHR; + minBitstreamBufferOffsetAlignment?: DeviceSize; + minBitstreamBufferSizeAlignment?: DeviceSize; + pictureAccessGranularity?: Extent2D; + minCodedExtent?: Extent2D; + maxCodedExtent?: Extent2D; + maxDpbSlots?: number; + maxActiveReferencePictures?: number; + stdHeaderVersion?: ExtensionProperties; +} + +export class VideoCapabilitiesKHR implements BaseStruct { + static size = 80; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoCapabilitiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoCapabilitiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.minBitstreamBufferOffsetAlignment !== undefined) this.minBitstreamBufferOffsetAlignment = data.minBitstreamBufferOffsetAlignment; + if (data.minBitstreamBufferSizeAlignment !== undefined) this.minBitstreamBufferSizeAlignment = data.minBitstreamBufferSizeAlignment; + if (data.pictureAccessGranularity !== undefined) this.pictureAccessGranularity = data.pictureAccessGranularity; + if (data.minCodedExtent !== undefined) this.minCodedExtent = data.minCodedExtent; + if (data.maxCodedExtent !== undefined) this.maxCodedExtent = data.maxCodedExtent; + if (data.maxDpbSlots !== undefined) this.maxDpbSlots = data.maxDpbSlots; + if (data.maxActiveReferencePictures !== undefined) this.maxActiveReferencePictures = data.maxActiveReferencePictures; + if (data.stdHeaderVersion !== undefined) this.stdHeaderVersion = data.stdHeaderVersion; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoCapabilitiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_CAPABILITIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoCapabilityFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get minBitstreamBufferOffsetAlignment(): bigint { + return this.#view.getBigUint64(24, LE); + } + + set minBitstreamBufferOffsetAlignment(value: DeviceSize) { + this.#view.setBigUint64(24, BigInt(value), LE); + } + + get minBitstreamBufferSizeAlignment(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set minBitstreamBufferSizeAlignment(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get pictureAccessGranularity(): Extent2D { + return new Extent2D(this.#data.subarray(40, 40 + Extent2D.size)); + } + + set pictureAccessGranularity(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } + + get minCodedExtent(): Extent2D { + return new Extent2D(this.#data.subarray(48, 48 + Extent2D.size)); + } + + set minCodedExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 48); + } + + get maxCodedExtent(): Extent2D { + return new Extent2D(this.#data.subarray(56, 56 + Extent2D.size)); + } + + set maxCodedExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 56); + } + + get maxDpbSlots(): number { + return this.#view.getUint32(64, LE); + } + + set maxDpbSlots(value: number) { + this.#view.setUint32(64, Number(value), LE); + } + + get maxActiveReferencePictures(): number { + return this.#view.getUint32(68, LE); + } + + set maxActiveReferencePictures(value: number) { + this.#view.setUint32(68, Number(value), LE); + } + + get stdHeaderVersion(): ExtensionProperties { + return new ExtensionProperties(this.#data.subarray(72, 72 + ExtensionProperties.size)); + } + + set stdHeaderVersion(value: ExtensionProperties) { + if (value[BUFFER].byteLength < ExtensionProperties.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 72); + } +} \ No newline at end of file diff --git a/api/struct/VideoCodingControlInfoKHR.ts b/api/struct/VideoCodingControlInfoKHR.ts new file mode 100644 index 0000000..f401c8b --- /dev/null +++ b/api/struct/VideoCodingControlInfoKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { VideoCodingControlFlagsKHR } from "../def.ts"; + +export interface InitVideoCodingControlInfoKHR { + pNext?: AnyPointer; + flags?: VideoCodingControlFlagsKHR; +} + +export class VideoCodingControlInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoCodingControlInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoCodingControlInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoCodingControlInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoCodingControlInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoCodingControlInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoCodingControlInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_CODING_CONTROL_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoCodingControlFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeCapabilitiesKHR.ts b/api/struct/VideoDecodeCapabilitiesKHR.ts new file mode 100644 index 0000000..d99e995 --- /dev/null +++ b/api/struct/VideoDecodeCapabilitiesKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { VideoDecodeCapabilityFlagsKHR } from "../def.ts"; + +export interface InitVideoDecodeCapabilitiesKHR { + pNext?: AnyPointer; + flags?: VideoDecodeCapabilityFlagsKHR; +} + +export class VideoDecodeCapabilitiesKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeCapabilitiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeCapabilitiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeCapabilitiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_CAPABILITIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoDecodeCapabilityFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH264CapabilitiesEXT.ts b/api/struct/VideoDecodeH264CapabilitiesEXT.ts new file mode 100644 index 0000000..fbfc990 --- /dev/null +++ b/api/struct/VideoDecodeH264CapabilitiesEXT.ts @@ -0,0 +1,93 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Offset2D} from "./Offset2D.ts"; +import { StructureType, StdVideoH264LevelIdc } from "../enum.ts"; + +export interface InitVideoDecodeH264CapabilitiesEXT { + pNext?: AnyPointer; + maxLevelIdc?: StdVideoH264LevelIdc; + fieldOffsetGranularity?: Offset2D; +} + +export class VideoDecodeH264CapabilitiesEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH264CapabilitiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264CapabilitiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH264CapabilitiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH264CapabilitiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH264CapabilitiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxLevelIdc !== undefined) this.maxLevelIdc = data.maxLevelIdc; + if (data.fieldOffsetGranularity !== undefined) this.fieldOffsetGranularity = data.fieldOffsetGranularity; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264CapabilitiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H264_CAPABILITIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxLevelIdc(): number { + return this.#view.getUint32(16, LE); + } + + set maxLevelIdc(value: StdVideoH264LevelIdc) { + this.#view.setUint32(16, Number(value), LE); + } + + get fieldOffsetGranularity(): Offset2D { + return new Offset2D(this.#data.subarray(20, 20 + Offset2D.size)); + } + + set fieldOffsetGranularity(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH264DpbSlotInfoEXT.ts b/api/struct/VideoDecodeH264DpbSlotInfoEXT.ts new file mode 100644 index 0000000..f7ee8cd --- /dev/null +++ b/api/struct/VideoDecodeH264DpbSlotInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoDecodeH264ReferenceInfo} from "./StdVideoDecodeH264ReferenceInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoDecodeH264DpbSlotInfoEXT { + pNext?: AnyPointer; + pStdReferenceInfo?: AnyPointer; +} + +export class VideoDecodeH264DpbSlotInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH264DpbSlotInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264DpbSlotInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH264DpbSlotInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH264DpbSlotInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH264DpbSlotInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pStdReferenceInfo !== undefined) this.pStdReferenceInfo = data.pStdReferenceInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264DpbSlotInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pStdReferenceInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pStdReferenceInfo(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH264PictureInfoEXT.ts b/api/struct/VideoDecodeH264PictureInfoEXT.ts new file mode 100644 index 0000000..ed9eaa0 --- /dev/null +++ b/api/struct/VideoDecodeH264PictureInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoDecodeH264PictureInfo} from "./StdVideoDecodeH264PictureInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoDecodeH264PictureInfoEXT { + pNext?: AnyPointer; + pStdPictureInfo?: AnyPointer; + sliceCount?: number; + pSliceOffsets?: AnyPointer; +} + +export class VideoDecodeH264PictureInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH264PictureInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264PictureInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH264PictureInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH264PictureInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH264PictureInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pStdPictureInfo !== undefined) this.pStdPictureInfo = data.pStdPictureInfo; + if (data.sliceCount !== undefined) this.sliceCount = data.sliceCount; + if (data.pSliceOffsets !== undefined) this.pSliceOffsets = data.pSliceOffsets; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264PictureInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H264_PICTURE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pStdPictureInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pStdPictureInfo(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get sliceCount(): number { + return this.#view.getUint32(24, LE); + } + + set sliceCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pSliceOffsets(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pSliceOffsets(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH264ProfileInfoEXT.ts b/api/struct/VideoDecodeH264ProfileInfoEXT.ts new file mode 100644 index 0000000..96a56bc --- /dev/null +++ b/api/struct/VideoDecodeH264ProfileInfoEXT.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, StdVideoH264ProfileIdc, VideoDecodeH264PictureLayoutFlagBitsEXT } from "../enum.ts"; + +export interface InitVideoDecodeH264ProfileInfoEXT { + pNext?: AnyPointer; + stdProfileIdc?: StdVideoH264ProfileIdc; + pictureLayout?: VideoDecodeH264PictureLayoutFlagBitsEXT; +} + +export class VideoDecodeH264ProfileInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH264ProfileInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264ProfileInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH264ProfileInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH264ProfileInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH264ProfileInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stdProfileIdc !== undefined) this.stdProfileIdc = data.stdProfileIdc; + if (data.pictureLayout !== undefined) this.pictureLayout = data.pictureLayout; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264ProfileInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H264_PROFILE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stdProfileIdc(): number { + return this.#view.getUint32(16, LE); + } + + set stdProfileIdc(value: StdVideoH264ProfileIdc) { + this.#view.setUint32(16, Number(value), LE); + } + + get pictureLayout(): number { + return this.#view.getUint32(20, LE); + } + + set pictureLayout(value: VideoDecodeH264PictureLayoutFlagBitsEXT) { + this.#view.setUint32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH264SessionParametersAddInfoEXT.ts b/api/struct/VideoDecodeH264SessionParametersAddInfoEXT.ts new file mode 100644 index 0000000..55193c3 --- /dev/null +++ b/api/struct/VideoDecodeH264SessionParametersAddInfoEXT.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH264SequenceParameterSet} from "./StdVideoH264SequenceParameterSet.ts"; +import {StdVideoH264PictureParameterSet} from "./StdVideoH264PictureParameterSet.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoDecodeH264SessionParametersAddInfoEXT { + pNext?: AnyPointer; + stdSPSCount?: number; + pStdSPSs?: AnyPointer; + stdPPSCount?: number; + pStdPPSs?: AnyPointer; +} + +export class VideoDecodeH264SessionParametersAddInfoEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH264SessionParametersAddInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264SessionParametersAddInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH264SessionParametersAddInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH264SessionParametersAddInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH264SessionParametersAddInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stdSPSCount !== undefined) this.stdSPSCount = data.stdSPSCount; + if (data.pStdSPSs !== undefined) this.pStdSPSs = data.pStdSPSs; + if (data.stdPPSCount !== undefined) this.stdPPSCount = data.stdPPSCount; + if (data.pStdPPSs !== undefined) this.pStdPPSs = data.pStdPPSs; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264SessionParametersAddInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stdSPSCount(): number { + return this.#view.getUint32(16, LE); + } + + set stdSPSCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pStdSPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStdSPSs(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get stdPPSCount(): number { + return this.#view.getUint32(32, LE); + } + + set stdPPSCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pStdPPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pStdPPSs(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH264SessionParametersCreateInfoEXT.ts b/api/struct/VideoDecodeH264SessionParametersCreateInfoEXT.ts new file mode 100644 index 0000000..6a1de4b --- /dev/null +++ b/api/struct/VideoDecodeH264SessionParametersCreateInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoDecodeH264SessionParametersAddInfoEXT} from "./VideoDecodeH264SessionParametersAddInfoEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoDecodeH264SessionParametersCreateInfoEXT { + pNext?: AnyPointer; + maxStdSPSCount?: number; + maxStdPPSCount?: number; + pParametersAddInfo?: AnyPointer; +} + +export class VideoDecodeH264SessionParametersCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH264SessionParametersCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264SessionParametersCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH264SessionParametersCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH264SessionParametersCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH264SessionParametersCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxStdSPSCount !== undefined) this.maxStdSPSCount = data.maxStdSPSCount; + if (data.maxStdPPSCount !== undefined) this.maxStdPPSCount = data.maxStdPPSCount; + if (data.pParametersAddInfo !== undefined) this.pParametersAddInfo = data.pParametersAddInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264SessionParametersCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxStdSPSCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxStdSPSCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxStdPPSCount(): number { + return this.#view.getUint32(20, LE); + } + + set maxStdPPSCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pParametersAddInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pParametersAddInfo(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH265CapabilitiesEXT.ts b/api/struct/VideoDecodeH265CapabilitiesEXT.ts new file mode 100644 index 0000000..e8c5f69 --- /dev/null +++ b/api/struct/VideoDecodeH265CapabilitiesEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, StdVideoH265LevelIdc } from "../enum.ts"; + +export interface InitVideoDecodeH265CapabilitiesEXT { + pNext?: AnyPointer; + maxLevelIdc?: StdVideoH265LevelIdc; +} + +export class VideoDecodeH265CapabilitiesEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH265CapabilitiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265CapabilitiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH265CapabilitiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH265CapabilitiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH265CapabilitiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxLevelIdc !== undefined) this.maxLevelIdc = data.maxLevelIdc; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265CapabilitiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H265_CAPABILITIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxLevelIdc(): number { + return this.#view.getUint32(16, LE); + } + + set maxLevelIdc(value: StdVideoH265LevelIdc) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH265DpbSlotInfoEXT.ts b/api/struct/VideoDecodeH265DpbSlotInfoEXT.ts new file mode 100644 index 0000000..d22141c --- /dev/null +++ b/api/struct/VideoDecodeH265DpbSlotInfoEXT.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoDecodeH265ReferenceInfo} from "./StdVideoDecodeH265ReferenceInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoDecodeH265DpbSlotInfoEXT { + pNext?: AnyPointer; + pStdReferenceInfo?: AnyPointer; +} + +export class VideoDecodeH265DpbSlotInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH265DpbSlotInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265DpbSlotInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH265DpbSlotInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH265DpbSlotInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH265DpbSlotInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pStdReferenceInfo !== undefined) this.pStdReferenceInfo = data.pStdReferenceInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265DpbSlotInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pStdReferenceInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pStdReferenceInfo(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH265PictureInfoEXT.ts b/api/struct/VideoDecodeH265PictureInfoEXT.ts new file mode 100644 index 0000000..591e1fa --- /dev/null +++ b/api/struct/VideoDecodeH265PictureInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoDecodeH265PictureInfo} from "./StdVideoDecodeH265PictureInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoDecodeH265PictureInfoEXT { + pNext?: AnyPointer; + pStdPictureInfo?: AnyPointer; + sliceCount?: number; + pSliceOffsets?: AnyPointer; +} + +export class VideoDecodeH265PictureInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH265PictureInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265PictureInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH265PictureInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH265PictureInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH265PictureInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pStdPictureInfo !== undefined) this.pStdPictureInfo = data.pStdPictureInfo; + if (data.sliceCount !== undefined) this.sliceCount = data.sliceCount; + if (data.pSliceOffsets !== undefined) this.pSliceOffsets = data.pSliceOffsets; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265PictureInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H265_PICTURE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pStdPictureInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pStdPictureInfo(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get sliceCount(): number { + return this.#view.getUint32(24, LE); + } + + set sliceCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pSliceOffsets(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pSliceOffsets(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH265ProfileInfoEXT.ts b/api/struct/VideoDecodeH265ProfileInfoEXT.ts new file mode 100644 index 0000000..1cc32fa --- /dev/null +++ b/api/struct/VideoDecodeH265ProfileInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, StdVideoH265ProfileIdc } from "../enum.ts"; + +export interface InitVideoDecodeH265ProfileInfoEXT { + pNext?: AnyPointer; + stdProfileIdc?: StdVideoH265ProfileIdc; +} + +export class VideoDecodeH265ProfileInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH265ProfileInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265ProfileInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH265ProfileInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH265ProfileInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH265ProfileInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stdProfileIdc !== undefined) this.stdProfileIdc = data.stdProfileIdc; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265ProfileInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H265_PROFILE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stdProfileIdc(): number { + return this.#view.getUint32(16, LE); + } + + set stdProfileIdc(value: StdVideoH265ProfileIdc) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH265SessionParametersAddInfoEXT.ts b/api/struct/VideoDecodeH265SessionParametersAddInfoEXT.ts new file mode 100644 index 0000000..4277502 --- /dev/null +++ b/api/struct/VideoDecodeH265SessionParametersAddInfoEXT.ts @@ -0,0 +1,132 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH265VideoParameterSet} from "./StdVideoH265VideoParameterSet.ts"; +import {StdVideoH265SequenceParameterSet} from "./StdVideoH265SequenceParameterSet.ts"; +import {StdVideoH265PictureParameterSet} from "./StdVideoH265PictureParameterSet.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoDecodeH265SessionParametersAddInfoEXT { + pNext?: AnyPointer; + stdVPSCount?: number; + pStdVPSs?: AnyPointer; + stdSPSCount?: number; + pStdSPSs?: AnyPointer; + stdPPSCount?: number; + pStdPPSs?: AnyPointer; +} + +export class VideoDecodeH265SessionParametersAddInfoEXT implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH265SessionParametersAddInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265SessionParametersAddInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH265SessionParametersAddInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH265SessionParametersAddInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH265SessionParametersAddInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stdVPSCount !== undefined) this.stdVPSCount = data.stdVPSCount; + if (data.pStdVPSs !== undefined) this.pStdVPSs = data.pStdVPSs; + if (data.stdSPSCount !== undefined) this.stdSPSCount = data.stdSPSCount; + if (data.pStdSPSs !== undefined) this.pStdSPSs = data.pStdSPSs; + if (data.stdPPSCount !== undefined) this.stdPPSCount = data.stdPPSCount; + if (data.pStdPPSs !== undefined) this.pStdPPSs = data.pStdPPSs; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265SessionParametersAddInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stdVPSCount(): number { + return this.#view.getUint32(16, LE); + } + + set stdVPSCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pStdVPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStdVPSs(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get stdSPSCount(): number { + return this.#view.getUint32(32, LE); + } + + set stdSPSCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pStdSPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pStdSPSs(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get stdPPSCount(): number { + return this.#view.getUint32(48, LE); + } + + set stdPPSCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pStdPPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pStdPPSs(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeH265SessionParametersCreateInfoEXT.ts b/api/struct/VideoDecodeH265SessionParametersCreateInfoEXT.ts new file mode 100644 index 0000000..3f87b0d --- /dev/null +++ b/api/struct/VideoDecodeH265SessionParametersCreateInfoEXT.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoDecodeH265SessionParametersAddInfoEXT} from "./VideoDecodeH265SessionParametersAddInfoEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoDecodeH265SessionParametersCreateInfoEXT { + pNext?: AnyPointer; + maxStdVPSCount?: number; + maxStdSPSCount?: number; + maxStdPPSCount?: number; + pParametersAddInfo?: AnyPointer; +} + +export class VideoDecodeH265SessionParametersCreateInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeH265SessionParametersCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265SessionParametersCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeH265SessionParametersCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeH265SessionParametersCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeH265SessionParametersCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxStdVPSCount !== undefined) this.maxStdVPSCount = data.maxStdVPSCount; + if (data.maxStdSPSCount !== undefined) this.maxStdSPSCount = data.maxStdSPSCount; + if (data.maxStdPPSCount !== undefined) this.maxStdPPSCount = data.maxStdPPSCount; + if (data.pParametersAddInfo !== undefined) this.pParametersAddInfo = data.pParametersAddInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265SessionParametersCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxStdVPSCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxStdVPSCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxStdSPSCount(): number { + return this.#view.getUint32(20, LE); + } + + set maxStdSPSCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxStdPPSCount(): number { + return this.#view.getUint32(24, LE); + } + + set maxStdPPSCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pParametersAddInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pParametersAddInfo(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeInfoKHR.ts b/api/struct/VideoDecodeInfoKHR.ts new file mode 100644 index 0000000..4d24c03 --- /dev/null +++ b/api/struct/VideoDecodeInfoKHR.ts @@ -0,0 +1,155 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoPictureResourceInfoKHR} from "./VideoPictureResourceInfoKHR.ts"; +import {VideoReferenceSlotInfoKHR} from "./VideoReferenceSlotInfoKHR.ts"; +import { StructureType } from "../enum.ts"; +import { VideoDecodeFlagsKHR, Buffer, DeviceSize } from "../def.ts"; + +export interface InitVideoDecodeInfoKHR { + pNext?: AnyPointer; + flags?: VideoDecodeFlagsKHR; + srcBuffer?: Buffer; + srcBufferOffset?: DeviceSize; + srcBufferRange?: DeviceSize; + dstPictureResource?: VideoPictureResourceInfoKHR; + pSetupReferenceSlot?: AnyPointer; + referenceSlotCount?: number; + pReferenceSlots?: AnyPointer; +} + +export class VideoDecodeInfoKHR implements BaseStruct { + static size = 120; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.srcBuffer !== undefined) this.srcBuffer = data.srcBuffer; + if (data.srcBufferOffset !== undefined) this.srcBufferOffset = data.srcBufferOffset; + if (data.srcBufferRange !== undefined) this.srcBufferRange = data.srcBufferRange; + if (data.dstPictureResource !== undefined) this.dstPictureResource = data.dstPictureResource; + if (data.pSetupReferenceSlot !== undefined) this.pSetupReferenceSlot = data.pSetupReferenceSlot; + if (data.referenceSlotCount !== undefined) this.referenceSlotCount = data.referenceSlotCount; + if (data.pReferenceSlots !== undefined) this.pReferenceSlots = data.pReferenceSlots; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoDecodeFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get srcBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set srcBuffer(value: Buffer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get srcBufferOffset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set srcBufferOffset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get srcBufferRange(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set srcBufferRange(value: DeviceSize) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get dstPictureResource(): VideoPictureResourceInfoKHR { + return new VideoPictureResourceInfoKHR(this.#data.subarray(48, 48 + VideoPictureResourceInfoKHR.size)); + } + + set dstPictureResource(value: VideoPictureResourceInfoKHR) { + if (value[BUFFER].byteLength < VideoPictureResourceInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 48); + } + + get pSetupReferenceSlot(): Deno.PointerValue { + return pointerFromView(this.#view, 96, LE); + } + + set pSetupReferenceSlot(value: AnyPointer) { + this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); + } + + get referenceSlotCount(): number { + return this.#view.getUint32(104, LE); + } + + set referenceSlotCount(value: number) { + this.#view.setUint32(104, Number(value), LE); + } + + get pReferenceSlots(): Deno.PointerValue { + return pointerFromView(this.#view, 112, LE); + } + + set pReferenceSlots(value: AnyPointer) { + this.#view.setBigUint64(112, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoDecodeUsageInfoKHR.ts b/api/struct/VideoDecodeUsageInfoKHR.ts new file mode 100644 index 0000000..f7f82d5 --- /dev/null +++ b/api/struct/VideoDecodeUsageInfoKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { VideoDecodeUsageFlagsKHR } from "../def.ts"; + +export interface InitVideoDecodeUsageInfoKHR { + pNext?: AnyPointer; + videoUsageHints?: VideoDecodeUsageFlagsKHR; +} + +export class VideoDecodeUsageInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoDecodeUsageInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeUsageInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoDecodeUsageInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoDecodeUsageInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoDecodeUsageInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.videoUsageHints !== undefined) this.videoUsageHints = data.videoUsageHints; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeUsageInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_DECODE_USAGE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get videoUsageHints(): number { + return this.#view.getUint32(16, LE); + } + + set videoUsageHints(value: VideoDecodeUsageFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeCapabilitiesKHR.ts b/api/struct/VideoEncodeCapabilitiesKHR.ts new file mode 100644 index 0000000..305a23d --- /dev/null +++ b/api/struct/VideoEncodeCapabilitiesKHR.ts @@ -0,0 +1,124 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; +import { VideoEncodeCapabilityFlagsKHR, VideoEncodeRateControlModeFlagsKHR } from "../def.ts"; + +export interface InitVideoEncodeCapabilitiesKHR { + pNext?: AnyPointer; + flags?: VideoEncodeCapabilityFlagsKHR; + rateControlModes?: VideoEncodeRateControlModeFlagsKHR; + rateControlLayerCount?: number; + qualityLevelCount?: number; + inputImageDataFillAlignment?: Extent2D; +} + +export class VideoEncodeCapabilitiesKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeCapabilitiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeCapabilitiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeCapabilitiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeCapabilitiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.rateControlModes !== undefined) this.rateControlModes = data.rateControlModes; + if (data.rateControlLayerCount !== undefined) this.rateControlLayerCount = data.rateControlLayerCount; + if (data.qualityLevelCount !== undefined) this.qualityLevelCount = data.qualityLevelCount; + if (data.inputImageDataFillAlignment !== undefined) this.inputImageDataFillAlignment = data.inputImageDataFillAlignment; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeCapabilitiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_CAPABILITIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoEncodeCapabilityFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get rateControlModes(): number { + return this.#view.getUint32(20, LE); + } + + set rateControlModes(value: VideoEncodeRateControlModeFlagsKHR) { + this.#view.setUint32(20, Number(value), LE); + } + + get rateControlLayerCount(): number { + return this.#view.getUint8(24); + } + + set rateControlLayerCount(value: number) { + this.#view.setUint8(24, Number(value)); + } + + get qualityLevelCount(): number { + return this.#view.getUint8(25); + } + + set qualityLevelCount(value: number) { + this.#view.setUint8(25, Number(value)); + } + + get inputImageDataFillAlignment(): Extent2D { + return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); + } + + set inputImageDataFillAlignment(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 28); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264CapabilitiesEXT.ts b/api/struct/VideoEncodeH264CapabilitiesEXT.ts new file mode 100644 index 0000000..a65cb74 --- /dev/null +++ b/api/struct/VideoEncodeH264CapabilitiesEXT.ts @@ -0,0 +1,180 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { VideoEncodeH264CapabilityFlagsEXT, VideoEncodeH264InputModeFlagsEXT, VideoEncodeH264OutputModeFlagsEXT, Bool32 } from "../def.ts"; + +export interface InitVideoEncodeH264CapabilitiesEXT { + pNext?: AnyPointer; + flags?: VideoEncodeH264CapabilityFlagsEXT; + inputModeFlags?: VideoEncodeH264InputModeFlagsEXT; + outputModeFlags?: VideoEncodeH264OutputModeFlagsEXT; + maxPPictureL0ReferenceCount?: number; + maxBPictureL0ReferenceCount?: number; + maxL1ReferenceCount?: number; + motionVectorsOverPicBoundariesFlag?: Bool32; + maxBytesPerPicDenom?: number; + maxBitsPerMbDenom?: number; + log2MaxMvLengthHorizontal?: number; + log2MaxMvLengthVertical?: number; +} + +export class VideoEncodeH264CapabilitiesEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264CapabilitiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264CapabilitiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264CapabilitiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264CapabilitiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264CapabilitiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.inputModeFlags !== undefined) this.inputModeFlags = data.inputModeFlags; + if (data.outputModeFlags !== undefined) this.outputModeFlags = data.outputModeFlags; + if (data.maxPPictureL0ReferenceCount !== undefined) this.maxPPictureL0ReferenceCount = data.maxPPictureL0ReferenceCount; + if (data.maxBPictureL0ReferenceCount !== undefined) this.maxBPictureL0ReferenceCount = data.maxBPictureL0ReferenceCount; + if (data.maxL1ReferenceCount !== undefined) this.maxL1ReferenceCount = data.maxL1ReferenceCount; + if (data.motionVectorsOverPicBoundariesFlag !== undefined) this.motionVectorsOverPicBoundariesFlag = data.motionVectorsOverPicBoundariesFlag; + if (data.maxBytesPerPicDenom !== undefined) this.maxBytesPerPicDenom = data.maxBytesPerPicDenom; + if (data.maxBitsPerMbDenom !== undefined) this.maxBitsPerMbDenom = data.maxBitsPerMbDenom; + if (data.log2MaxMvLengthHorizontal !== undefined) this.log2MaxMvLengthHorizontal = data.log2MaxMvLengthHorizontal; + if (data.log2MaxMvLengthVertical !== undefined) this.log2MaxMvLengthVertical = data.log2MaxMvLengthVertical; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264CapabilitiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_CAPABILITIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoEncodeH264CapabilityFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get inputModeFlags(): number { + return this.#view.getUint32(20, LE); + } + + set inputModeFlags(value: VideoEncodeH264InputModeFlagsEXT) { + this.#view.setUint32(20, Number(value), LE); + } + + get outputModeFlags(): number { + return this.#view.getUint32(24, LE); + } + + set outputModeFlags(value: VideoEncodeH264OutputModeFlagsEXT) { + this.#view.setUint32(24, Number(value), LE); + } + + get maxPPictureL0ReferenceCount(): number { + return this.#view.getUint8(28); + } + + set maxPPictureL0ReferenceCount(value: number) { + this.#view.setUint8(28, Number(value)); + } + + get maxBPictureL0ReferenceCount(): number { + return this.#view.getUint8(29); + } + + set maxBPictureL0ReferenceCount(value: number) { + this.#view.setUint8(29, Number(value)); + } + + get maxL1ReferenceCount(): number { + return this.#view.getUint8(30); + } + + set maxL1ReferenceCount(value: number) { + this.#view.setUint8(30, Number(value)); + } + + get motionVectorsOverPicBoundariesFlag(): number { + return this.#view.getUint32(32, LE); + } + + set motionVectorsOverPicBoundariesFlag(value: Bool32) { + this.#view.setUint32(32, Number(value), LE); + } + + get maxBytesPerPicDenom(): number { + return this.#view.getUint32(36, LE); + } + + set maxBytesPerPicDenom(value: number) { + this.#view.setUint32(36, Number(value), LE); + } + + get maxBitsPerMbDenom(): number { + return this.#view.getUint32(40, LE); + } + + set maxBitsPerMbDenom(value: number) { + this.#view.setUint32(40, Number(value), LE); + } + + get log2MaxMvLengthHorizontal(): number { + return this.#view.getUint32(44, LE); + } + + set log2MaxMvLengthHorizontal(value: number) { + this.#view.setUint32(44, Number(value), LE); + } + + get log2MaxMvLengthVertical(): number { + return this.#view.getUint32(48, LE); + } + + set log2MaxMvLengthVertical(value: number) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264DpbSlotInfoEXT.ts b/api/struct/VideoEncodeH264DpbSlotInfoEXT.ts new file mode 100644 index 0000000..cacf255 --- /dev/null +++ b/api/struct/VideoEncodeH264DpbSlotInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH264ReferenceInfo} from "./StdVideoEncodeH264ReferenceInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH264DpbSlotInfoEXT { + pNext?: AnyPointer; + slotIndex?: number; + pStdReferenceInfo?: AnyPointer; +} + +export class VideoEncodeH264DpbSlotInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264DpbSlotInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264DpbSlotInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264DpbSlotInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264DpbSlotInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264DpbSlotInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.slotIndex !== undefined) this.slotIndex = data.slotIndex; + if (data.pStdReferenceInfo !== undefined) this.pStdReferenceInfo = data.pStdReferenceInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264DpbSlotInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get slotIndex(): number { + return this.#view.getInt8(16); + } + + set slotIndex(value: number) { + this.#view.setInt8(16, Number(value)); + } + + get pStdReferenceInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStdReferenceInfo(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264EmitPictureParametersInfoEXT.ts b/api/struct/VideoEncodeH264EmitPictureParametersInfoEXT.ts new file mode 100644 index 0000000..bb1191b --- /dev/null +++ b/api/struct/VideoEncodeH264EmitPictureParametersInfoEXT.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitVideoEncodeH264EmitPictureParametersInfoEXT { + pNext?: AnyPointer; + spsId?: number; + emitSpsEnable?: Bool32; + ppsIdEntryCount?: number; + ppsIdEntries?: AnyPointer; +} + +export class VideoEncodeH264EmitPictureParametersInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264EmitPictureParametersInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264EmitPictureParametersInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264EmitPictureParametersInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264EmitPictureParametersInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264EmitPictureParametersInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.spsId !== undefined) this.spsId = data.spsId; + if (data.emitSpsEnable !== undefined) this.emitSpsEnable = data.emitSpsEnable; + if (data.ppsIdEntryCount !== undefined) this.ppsIdEntryCount = data.ppsIdEntryCount; + if (data.ppsIdEntries !== undefined) this.ppsIdEntries = data.ppsIdEntries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264EmitPictureParametersInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get spsId(): number { + return this.#view.getUint8(16); + } + + set spsId(value: number) { + this.#view.setUint8(16, Number(value)); + } + + get emitSpsEnable(): number { + return this.#view.getUint32(20, LE); + } + + set emitSpsEnable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get ppsIdEntryCount(): number { + return this.#view.getUint32(24, LE); + } + + set ppsIdEntryCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get ppsIdEntries(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set ppsIdEntries(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264FrameSizeEXT.ts b/api/struct/VideoEncodeH264FrameSizeEXT.ts new file mode 100644 index 0000000..aab5a5d --- /dev/null +++ b/api/struct/VideoEncodeH264FrameSizeEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitVideoEncodeH264FrameSizeEXT { + frameISize?: number; + framePSize?: number; + frameBSize?: number; +} + +export class VideoEncodeH264FrameSizeEXT implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264FrameSizeEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264FrameSizeEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264FrameSizeEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264FrameSizeEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264FrameSizeEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.frameISize !== undefined) this.frameISize = data.frameISize; + if (data.framePSize !== undefined) this.framePSize = data.framePSize; + if (data.frameBSize !== undefined) this.frameBSize = data.frameBSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264FrameSizeEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get frameISize(): number { + return this.#view.getUint32(0, LE); + } + + set frameISize(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get framePSize(): number { + return this.#view.getUint32(4, LE); + } + + set framePSize(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get frameBSize(): number { + return this.#view.getUint32(8, LE); + } + + set frameBSize(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264NaluSliceInfoEXT.ts b/api/struct/VideoEncodeH264NaluSliceInfoEXT.ts new file mode 100644 index 0000000..d002d65 --- /dev/null +++ b/api/struct/VideoEncodeH264NaluSliceInfoEXT.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH264ReferenceListsInfoEXT} from "./VideoEncodeH264ReferenceListsInfoEXT.ts"; +import {StdVideoEncodeH264SliceHeader} from "./StdVideoEncodeH264SliceHeader.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH264NaluSliceInfoEXT { + pNext?: AnyPointer; + mbCount?: number; + pReferenceFinalLists?: AnyPointer; + pSliceHeaderStd?: AnyPointer; +} + +export class VideoEncodeH264NaluSliceInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264NaluSliceInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264NaluSliceInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264NaluSliceInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264NaluSliceInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264NaluSliceInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.mbCount !== undefined) this.mbCount = data.mbCount; + if (data.pReferenceFinalLists !== undefined) this.pReferenceFinalLists = data.pReferenceFinalLists; + if (data.pSliceHeaderStd !== undefined) this.pSliceHeaderStd = data.pSliceHeaderStd; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264NaluSliceInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get mbCount(): number { + return this.#view.getUint32(16, LE); + } + + set mbCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pReferenceFinalLists(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pReferenceFinalLists(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pSliceHeaderStd(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pSliceHeaderStd(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264ProfileInfoEXT.ts b/api/struct/VideoEncodeH264ProfileInfoEXT.ts new file mode 100644 index 0000000..644459d --- /dev/null +++ b/api/struct/VideoEncodeH264ProfileInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, StdVideoH264ProfileIdc } from "../enum.ts"; + +export interface InitVideoEncodeH264ProfileInfoEXT { + pNext?: AnyPointer; + stdProfileIdc?: StdVideoH264ProfileIdc; +} + +export class VideoEncodeH264ProfileInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264ProfileInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264ProfileInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264ProfileInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264ProfileInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264ProfileInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stdProfileIdc !== undefined) this.stdProfileIdc = data.stdProfileIdc; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264ProfileInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_PROFILE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stdProfileIdc(): number { + return this.#view.getUint32(16, LE); + } + + set stdProfileIdc(value: StdVideoH264ProfileIdc) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264QpEXT.ts b/api/struct/VideoEncodeH264QpEXT.ts new file mode 100644 index 0000000..7ddf480 --- /dev/null +++ b/api/struct/VideoEncodeH264QpEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitVideoEncodeH264QpEXT { + qpI?: number; + qpP?: number; + qpB?: number; +} + +export class VideoEncodeH264QpEXT implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264QpEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264QpEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264QpEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264QpEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264QpEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.qpI !== undefined) this.qpI = data.qpI; + if (data.qpP !== undefined) this.qpP = data.qpP; + if (data.qpB !== undefined) this.qpB = data.qpB; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264QpEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get qpI(): number { + return this.#view.getInt32(0, LE); + } + + set qpI(value: number) { + this.#view.setInt32(0, Number(value), LE); + } + + get qpP(): number { + return this.#view.getInt32(4, LE); + } + + set qpP(value: number) { + this.#view.setInt32(4, Number(value), LE); + } + + get qpB(): number { + return this.#view.getInt32(8, LE); + } + + set qpB(value: number) { + this.#view.setInt32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264RateControlInfoEXT.ts b/api/struct/VideoEncodeH264RateControlInfoEXT.ts new file mode 100644 index 0000000..425b61e --- /dev/null +++ b/api/struct/VideoEncodeH264RateControlInfoEXT.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, VideoEncodeH264RateControlStructureEXT } from "../enum.ts"; + +export interface InitVideoEncodeH264RateControlInfoEXT { + pNext?: AnyPointer; + gopFrameCount?: number; + idrPeriod?: number; + consecutiveBFrameCount?: number; + rateControlStructure?: VideoEncodeH264RateControlStructureEXT; + temporalLayerCount?: number; +} + +export class VideoEncodeH264RateControlInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264RateControlInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264RateControlInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264RateControlInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264RateControlInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264RateControlInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.gopFrameCount !== undefined) this.gopFrameCount = data.gopFrameCount; + if (data.idrPeriod !== undefined) this.idrPeriod = data.idrPeriod; + if (data.consecutiveBFrameCount !== undefined) this.consecutiveBFrameCount = data.consecutiveBFrameCount; + if (data.rateControlStructure !== undefined) this.rateControlStructure = data.rateControlStructure; + if (data.temporalLayerCount !== undefined) this.temporalLayerCount = data.temporalLayerCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264RateControlInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get gopFrameCount(): number { + return this.#view.getUint32(16, LE); + } + + set gopFrameCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get idrPeriod(): number { + return this.#view.getUint32(20, LE); + } + + set idrPeriod(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get consecutiveBFrameCount(): number { + return this.#view.getUint32(24, LE); + } + + set consecutiveBFrameCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get rateControlStructure(): number { + return this.#view.getUint32(28, LE); + } + + set rateControlStructure(value: VideoEncodeH264RateControlStructureEXT) { + this.#view.setUint32(28, Number(value), LE); + } + + get temporalLayerCount(): number { + return this.#view.getUint8(32); + } + + set temporalLayerCount(value: number) { + this.#view.setUint8(32, Number(value)); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264RateControlLayerInfoEXT.ts b/api/struct/VideoEncodeH264RateControlLayerInfoEXT.ts new file mode 100644 index 0000000..3ce0e28 --- /dev/null +++ b/api/struct/VideoEncodeH264RateControlLayerInfoEXT.ts @@ -0,0 +1,174 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH264QpEXT} from "./VideoEncodeH264QpEXT.ts"; +import {VideoEncodeH264FrameSizeEXT} from "./VideoEncodeH264FrameSizeEXT.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitVideoEncodeH264RateControlLayerInfoEXT { + pNext?: AnyPointer; + temporalLayerId?: number; + useInitialRcQp?: Bool32; + initialRcQp?: VideoEncodeH264QpEXT; + useMinQp?: Bool32; + minQp?: VideoEncodeH264QpEXT; + useMaxQp?: Bool32; + maxQp?: VideoEncodeH264QpEXT; + useMaxFrameSize?: Bool32; + maxFrameSize?: VideoEncodeH264FrameSizeEXT; +} + +export class VideoEncodeH264RateControlLayerInfoEXT implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264RateControlLayerInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264RateControlLayerInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264RateControlLayerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264RateControlLayerInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264RateControlLayerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.temporalLayerId !== undefined) this.temporalLayerId = data.temporalLayerId; + if (data.useInitialRcQp !== undefined) this.useInitialRcQp = data.useInitialRcQp; + if (data.initialRcQp !== undefined) this.initialRcQp = data.initialRcQp; + if (data.useMinQp !== undefined) this.useMinQp = data.useMinQp; + if (data.minQp !== undefined) this.minQp = data.minQp; + if (data.useMaxQp !== undefined) this.useMaxQp = data.useMaxQp; + if (data.maxQp !== undefined) this.maxQp = data.maxQp; + if (data.useMaxFrameSize !== undefined) this.useMaxFrameSize = data.useMaxFrameSize; + if (data.maxFrameSize !== undefined) this.maxFrameSize = data.maxFrameSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264RateControlLayerInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get temporalLayerId(): number { + return this.#view.getUint8(16); + } + + set temporalLayerId(value: number) { + this.#view.setUint8(16, Number(value)); + } + + get useInitialRcQp(): number { + return this.#view.getUint32(20, LE); + } + + set useInitialRcQp(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get initialRcQp(): VideoEncodeH264QpEXT { + return new VideoEncodeH264QpEXT(this.#data.subarray(24, 24 + VideoEncodeH264QpEXT.size)); + } + + set initialRcQp(value: VideoEncodeH264QpEXT) { + if (value[BUFFER].byteLength < VideoEncodeH264QpEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get useMinQp(): number { + return this.#view.getUint32(36, LE); + } + + set useMinQp(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get minQp(): VideoEncodeH264QpEXT { + return new VideoEncodeH264QpEXT(this.#data.subarray(40, 40 + VideoEncodeH264QpEXT.size)); + } + + set minQp(value: VideoEncodeH264QpEXT) { + if (value[BUFFER].byteLength < VideoEncodeH264QpEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } + + get useMaxQp(): number { + return this.#view.getUint32(52, LE); + } + + set useMaxQp(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get maxQp(): VideoEncodeH264QpEXT { + return new VideoEncodeH264QpEXT(this.#data.subarray(56, 56 + VideoEncodeH264QpEXT.size)); + } + + set maxQp(value: VideoEncodeH264QpEXT) { + if (value[BUFFER].byteLength < VideoEncodeH264QpEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 56); + } + + get useMaxFrameSize(): number { + return this.#view.getUint32(68, LE); + } + + set useMaxFrameSize(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get maxFrameSize(): VideoEncodeH264FrameSizeEXT { + return new VideoEncodeH264FrameSizeEXT(this.#data.subarray(72, 72 + VideoEncodeH264FrameSizeEXT.size)); + } + + set maxFrameSize(value: VideoEncodeH264FrameSizeEXT) { + if (value[BUFFER].byteLength < VideoEncodeH264FrameSizeEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 72); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264ReferenceListsInfoEXT.ts b/api/struct/VideoEncodeH264ReferenceListsInfoEXT.ts new file mode 100644 index 0000000..fa9337e --- /dev/null +++ b/api/struct/VideoEncodeH264ReferenceListsInfoEXT.ts @@ -0,0 +1,121 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH264DpbSlotInfoEXT} from "./VideoEncodeH264DpbSlotInfoEXT.ts"; +import {StdVideoEncodeH264RefMemMgmtCtrlOperations} from "./StdVideoEncodeH264RefMemMgmtCtrlOperations.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH264ReferenceListsInfoEXT { + pNext?: AnyPointer; + referenceList0EntryCount?: number; + pReferenceList0Entries?: AnyPointer; + referenceList1EntryCount?: number; + pReferenceList1Entries?: AnyPointer; + pMemMgmtCtrlOperations?: AnyPointer; +} + +export class VideoEncodeH264ReferenceListsInfoEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264ReferenceListsInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264ReferenceListsInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264ReferenceListsInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264ReferenceListsInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264ReferenceListsInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.referenceList0EntryCount !== undefined) this.referenceList0EntryCount = data.referenceList0EntryCount; + if (data.pReferenceList0Entries !== undefined) this.pReferenceList0Entries = data.pReferenceList0Entries; + if (data.referenceList1EntryCount !== undefined) this.referenceList1EntryCount = data.referenceList1EntryCount; + if (data.pReferenceList1Entries !== undefined) this.pReferenceList1Entries = data.pReferenceList1Entries; + if (data.pMemMgmtCtrlOperations !== undefined) this.pMemMgmtCtrlOperations = data.pMemMgmtCtrlOperations; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264ReferenceListsInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get referenceList0EntryCount(): number { + return this.#view.getUint8(16); + } + + set referenceList0EntryCount(value: number) { + this.#view.setUint8(16, Number(value)); + } + + get pReferenceList0Entries(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pReferenceList0Entries(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get referenceList1EntryCount(): number { + return this.#view.getUint8(32); + } + + set referenceList1EntryCount(value: number) { + this.#view.setUint8(32, Number(value)); + } + + get pReferenceList1Entries(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pReferenceList1Entries(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get pMemMgmtCtrlOperations(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pMemMgmtCtrlOperations(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264SessionParametersAddInfoEXT.ts b/api/struct/VideoEncodeH264SessionParametersAddInfoEXT.ts new file mode 100644 index 0000000..8626aa3 --- /dev/null +++ b/api/struct/VideoEncodeH264SessionParametersAddInfoEXT.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH264SequenceParameterSet} from "./StdVideoH264SequenceParameterSet.ts"; +import {StdVideoH264PictureParameterSet} from "./StdVideoH264PictureParameterSet.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH264SessionParametersAddInfoEXT { + pNext?: AnyPointer; + stdSPSCount?: number; + pStdSPSs?: AnyPointer; + stdPPSCount?: number; + pStdPPSs?: AnyPointer; +} + +export class VideoEncodeH264SessionParametersAddInfoEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264SessionParametersAddInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264SessionParametersAddInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264SessionParametersAddInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264SessionParametersAddInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264SessionParametersAddInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stdSPSCount !== undefined) this.stdSPSCount = data.stdSPSCount; + if (data.pStdSPSs !== undefined) this.pStdSPSs = data.pStdSPSs; + if (data.stdPPSCount !== undefined) this.stdPPSCount = data.stdPPSCount; + if (data.pStdPPSs !== undefined) this.pStdPPSs = data.pStdPPSs; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264SessionParametersAddInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stdSPSCount(): number { + return this.#view.getUint32(16, LE); + } + + set stdSPSCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pStdSPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStdSPSs(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get stdPPSCount(): number { + return this.#view.getUint32(32, LE); + } + + set stdPPSCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pStdPPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pStdPPSs(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264SessionParametersCreateInfoEXT.ts b/api/struct/VideoEncodeH264SessionParametersCreateInfoEXT.ts new file mode 100644 index 0000000..a2bc943 --- /dev/null +++ b/api/struct/VideoEncodeH264SessionParametersCreateInfoEXT.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH264SessionParametersAddInfoEXT} from "./VideoEncodeH264SessionParametersAddInfoEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH264SessionParametersCreateInfoEXT { + pNext?: AnyPointer; + maxStdSPSCount?: number; + maxStdPPSCount?: number; + pParametersAddInfo?: AnyPointer; +} + +export class VideoEncodeH264SessionParametersCreateInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264SessionParametersCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264SessionParametersCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264SessionParametersCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264SessionParametersCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264SessionParametersCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxStdSPSCount !== undefined) this.maxStdSPSCount = data.maxStdSPSCount; + if (data.maxStdPPSCount !== undefined) this.maxStdPPSCount = data.maxStdPPSCount; + if (data.pParametersAddInfo !== undefined) this.pParametersAddInfo = data.pParametersAddInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264SessionParametersCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxStdSPSCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxStdSPSCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxStdPPSCount(): number { + return this.#view.getUint32(20, LE); + } + + set maxStdPPSCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get pParametersAddInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pParametersAddInfo(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH264VclFrameInfoEXT.ts b/api/struct/VideoEncodeH264VclFrameInfoEXT.ts new file mode 100644 index 0000000..d0e2458 --- /dev/null +++ b/api/struct/VideoEncodeH264VclFrameInfoEXT.ts @@ -0,0 +1,112 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH264ReferenceListsInfoEXT} from "./VideoEncodeH264ReferenceListsInfoEXT.ts"; +import {VideoEncodeH264NaluSliceInfoEXT} from "./VideoEncodeH264NaluSliceInfoEXT.ts"; +import {StdVideoEncodeH264PictureInfo} from "./StdVideoEncodeH264PictureInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH264VclFrameInfoEXT { + pNext?: AnyPointer; + pReferenceFinalLists?: AnyPointer; + naluSliceEntryCount?: number; + pNaluSliceEntries?: AnyPointer; + pCurrentPictureInfo?: AnyPointer; +} + +export class VideoEncodeH264VclFrameInfoEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH264VclFrameInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264VclFrameInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH264VclFrameInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH264VclFrameInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH264VclFrameInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pReferenceFinalLists !== undefined) this.pReferenceFinalLists = data.pReferenceFinalLists; + if (data.naluSliceEntryCount !== undefined) this.naluSliceEntryCount = data.naluSliceEntryCount; + if (data.pNaluSliceEntries !== undefined) this.pNaluSliceEntries = data.pNaluSliceEntries; + if (data.pCurrentPictureInfo !== undefined) this.pCurrentPictureInfo = data.pCurrentPictureInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264VclFrameInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pReferenceFinalLists(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pReferenceFinalLists(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get naluSliceEntryCount(): number { + return this.#view.getUint32(24, LE); + } + + set naluSliceEntryCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pNaluSliceEntries(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pNaluSliceEntries(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pCurrentPictureInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pCurrentPictureInfo(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265CapabilitiesEXT.ts b/api/struct/VideoEncodeH265CapabilitiesEXT.ts new file mode 100644 index 0000000..b3f577c --- /dev/null +++ b/api/struct/VideoEncodeH265CapabilitiesEXT.ts @@ -0,0 +1,270 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { VideoEncodeH265CapabilityFlagsEXT, VideoEncodeH265InputModeFlagsEXT, VideoEncodeH265OutputModeFlagsEXT, VideoEncodeH265CtbSizeFlagsEXT, VideoEncodeH265TransformBlockSizeFlagsEXT } from "../def.ts"; + +export interface InitVideoEncodeH265CapabilitiesEXT { + pNext?: AnyPointer; + flags?: VideoEncodeH265CapabilityFlagsEXT; + inputModeFlags?: VideoEncodeH265InputModeFlagsEXT; + outputModeFlags?: VideoEncodeH265OutputModeFlagsEXT; + ctbSizes?: VideoEncodeH265CtbSizeFlagsEXT; + transformBlockSizes?: VideoEncodeH265TransformBlockSizeFlagsEXT; + maxPPictureL0ReferenceCount?: number; + maxBPictureL0ReferenceCount?: number; + maxL1ReferenceCount?: number; + maxSubLayersCount?: number; + minLog2MinLumaCodingBlockSizeMinus3?: number; + maxLog2MinLumaCodingBlockSizeMinus3?: number; + minLog2MinLumaTransformBlockSizeMinus2?: number; + maxLog2MinLumaTransformBlockSizeMinus2?: number; + minMaxTransformHierarchyDepthInter?: number; + maxMaxTransformHierarchyDepthInter?: number; + minMaxTransformHierarchyDepthIntra?: number; + maxMaxTransformHierarchyDepthIntra?: number; + maxDiffCuQpDeltaDepth?: number; + minMaxNumMergeCand?: number; + maxMaxNumMergeCand?: number; +} + +export class VideoEncodeH265CapabilitiesEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265CapabilitiesEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265CapabilitiesEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265CapabilitiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265CapabilitiesEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265CapabilitiesEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.inputModeFlags !== undefined) this.inputModeFlags = data.inputModeFlags; + if (data.outputModeFlags !== undefined) this.outputModeFlags = data.outputModeFlags; + if (data.ctbSizes !== undefined) this.ctbSizes = data.ctbSizes; + if (data.transformBlockSizes !== undefined) this.transformBlockSizes = data.transformBlockSizes; + if (data.maxPPictureL0ReferenceCount !== undefined) this.maxPPictureL0ReferenceCount = data.maxPPictureL0ReferenceCount; + if (data.maxBPictureL0ReferenceCount !== undefined) this.maxBPictureL0ReferenceCount = data.maxBPictureL0ReferenceCount; + if (data.maxL1ReferenceCount !== undefined) this.maxL1ReferenceCount = data.maxL1ReferenceCount; + if (data.maxSubLayersCount !== undefined) this.maxSubLayersCount = data.maxSubLayersCount; + if (data.minLog2MinLumaCodingBlockSizeMinus3 !== undefined) this.minLog2MinLumaCodingBlockSizeMinus3 = data.minLog2MinLumaCodingBlockSizeMinus3; + if (data.maxLog2MinLumaCodingBlockSizeMinus3 !== undefined) this.maxLog2MinLumaCodingBlockSizeMinus3 = data.maxLog2MinLumaCodingBlockSizeMinus3; + if (data.minLog2MinLumaTransformBlockSizeMinus2 !== undefined) this.minLog2MinLumaTransformBlockSizeMinus2 = data.minLog2MinLumaTransformBlockSizeMinus2; + if (data.maxLog2MinLumaTransformBlockSizeMinus2 !== undefined) this.maxLog2MinLumaTransformBlockSizeMinus2 = data.maxLog2MinLumaTransformBlockSizeMinus2; + if (data.minMaxTransformHierarchyDepthInter !== undefined) this.minMaxTransformHierarchyDepthInter = data.minMaxTransformHierarchyDepthInter; + if (data.maxMaxTransformHierarchyDepthInter !== undefined) this.maxMaxTransformHierarchyDepthInter = data.maxMaxTransformHierarchyDepthInter; + if (data.minMaxTransformHierarchyDepthIntra !== undefined) this.minMaxTransformHierarchyDepthIntra = data.minMaxTransformHierarchyDepthIntra; + if (data.maxMaxTransformHierarchyDepthIntra !== undefined) this.maxMaxTransformHierarchyDepthIntra = data.maxMaxTransformHierarchyDepthIntra; + if (data.maxDiffCuQpDeltaDepth !== undefined) this.maxDiffCuQpDeltaDepth = data.maxDiffCuQpDeltaDepth; + if (data.minMaxNumMergeCand !== undefined) this.minMaxNumMergeCand = data.minMaxNumMergeCand; + if (data.maxMaxNumMergeCand !== undefined) this.maxMaxNumMergeCand = data.maxMaxNumMergeCand; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265CapabilitiesEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_CAPABILITIES_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoEncodeH265CapabilityFlagsEXT) { + this.#view.setUint32(16, Number(value), LE); + } + + get inputModeFlags(): number { + return this.#view.getUint32(20, LE); + } + + set inputModeFlags(value: VideoEncodeH265InputModeFlagsEXT) { + this.#view.setUint32(20, Number(value), LE); + } + + get outputModeFlags(): number { + return this.#view.getUint32(24, LE); + } + + set outputModeFlags(value: VideoEncodeH265OutputModeFlagsEXT) { + this.#view.setUint32(24, Number(value), LE); + } + + get ctbSizes(): number { + return this.#view.getUint32(28, LE); + } + + set ctbSizes(value: VideoEncodeH265CtbSizeFlagsEXT) { + this.#view.setUint32(28, Number(value), LE); + } + + get transformBlockSizes(): number { + return this.#view.getUint32(32, LE); + } + + set transformBlockSizes(value: VideoEncodeH265TransformBlockSizeFlagsEXT) { + this.#view.setUint32(32, Number(value), LE); + } + + get maxPPictureL0ReferenceCount(): number { + return this.#view.getUint8(36); + } + + set maxPPictureL0ReferenceCount(value: number) { + this.#view.setUint8(36, Number(value)); + } + + get maxBPictureL0ReferenceCount(): number { + return this.#view.getUint8(37); + } + + set maxBPictureL0ReferenceCount(value: number) { + this.#view.setUint8(37, Number(value)); + } + + get maxL1ReferenceCount(): number { + return this.#view.getUint8(38); + } + + set maxL1ReferenceCount(value: number) { + this.#view.setUint8(38, Number(value)); + } + + get maxSubLayersCount(): number { + return this.#view.getUint8(39); + } + + set maxSubLayersCount(value: number) { + this.#view.setUint8(39, Number(value)); + } + + get minLog2MinLumaCodingBlockSizeMinus3(): number { + return this.#view.getUint8(40); + } + + set minLog2MinLumaCodingBlockSizeMinus3(value: number) { + this.#view.setUint8(40, Number(value)); + } + + get maxLog2MinLumaCodingBlockSizeMinus3(): number { + return this.#view.getUint8(41); + } + + set maxLog2MinLumaCodingBlockSizeMinus3(value: number) { + this.#view.setUint8(41, Number(value)); + } + + get minLog2MinLumaTransformBlockSizeMinus2(): number { + return this.#view.getUint8(42); + } + + set minLog2MinLumaTransformBlockSizeMinus2(value: number) { + this.#view.setUint8(42, Number(value)); + } + + get maxLog2MinLumaTransformBlockSizeMinus2(): number { + return this.#view.getUint8(43); + } + + set maxLog2MinLumaTransformBlockSizeMinus2(value: number) { + this.#view.setUint8(43, Number(value)); + } + + get minMaxTransformHierarchyDepthInter(): number { + return this.#view.getUint8(44); + } + + set minMaxTransformHierarchyDepthInter(value: number) { + this.#view.setUint8(44, Number(value)); + } + + get maxMaxTransformHierarchyDepthInter(): number { + return this.#view.getUint8(45); + } + + set maxMaxTransformHierarchyDepthInter(value: number) { + this.#view.setUint8(45, Number(value)); + } + + get minMaxTransformHierarchyDepthIntra(): number { + return this.#view.getUint8(46); + } + + set minMaxTransformHierarchyDepthIntra(value: number) { + this.#view.setUint8(46, Number(value)); + } + + get maxMaxTransformHierarchyDepthIntra(): number { + return this.#view.getUint8(47); + } + + set maxMaxTransformHierarchyDepthIntra(value: number) { + this.#view.setUint8(47, Number(value)); + } + + get maxDiffCuQpDeltaDepth(): number { + return this.#view.getUint8(48); + } + + set maxDiffCuQpDeltaDepth(value: number) { + this.#view.setUint8(48, Number(value)); + } + + get minMaxNumMergeCand(): number { + return this.#view.getUint8(49); + } + + set minMaxNumMergeCand(value: number) { + this.#view.setUint8(49, Number(value)); + } + + get maxMaxNumMergeCand(): number { + return this.#view.getUint8(50); + } + + set maxMaxNumMergeCand(value: number) { + this.#view.setUint8(50, Number(value)); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265DpbSlotInfoEXT.ts b/api/struct/VideoEncodeH265DpbSlotInfoEXT.ts new file mode 100644 index 0000000..6e73e6d --- /dev/null +++ b/api/struct/VideoEncodeH265DpbSlotInfoEXT.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoEncodeH265ReferenceInfo} from "./StdVideoEncodeH265ReferenceInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH265DpbSlotInfoEXT { + pNext?: AnyPointer; + slotIndex?: number; + pStdReferenceInfo?: AnyPointer; +} + +export class VideoEncodeH265DpbSlotInfoEXT implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265DpbSlotInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265DpbSlotInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265DpbSlotInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265DpbSlotInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265DpbSlotInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.slotIndex !== undefined) this.slotIndex = data.slotIndex; + if (data.pStdReferenceInfo !== undefined) this.pStdReferenceInfo = data.pStdReferenceInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265DpbSlotInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get slotIndex(): number { + return this.#view.getInt8(16); + } + + set slotIndex(value: number) { + this.#view.setInt8(16, Number(value)); + } + + get pStdReferenceInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStdReferenceInfo(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265EmitPictureParametersInfoEXT.ts b/api/struct/VideoEncodeH265EmitPictureParametersInfoEXT.ts new file mode 100644 index 0000000..915053c --- /dev/null +++ b/api/struct/VideoEncodeH265EmitPictureParametersInfoEXT.ts @@ -0,0 +1,130 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitVideoEncodeH265EmitPictureParametersInfoEXT { + pNext?: AnyPointer; + vpsId?: number; + spsId?: number; + emitVpsEnable?: Bool32; + emitSpsEnable?: Bool32; + ppsIdEntryCount?: number; + ppsIdEntries?: AnyPointer; +} + +export class VideoEncodeH265EmitPictureParametersInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265EmitPictureParametersInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265EmitPictureParametersInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265EmitPictureParametersInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265EmitPictureParametersInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265EmitPictureParametersInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.vpsId !== undefined) this.vpsId = data.vpsId; + if (data.spsId !== undefined) this.spsId = data.spsId; + if (data.emitVpsEnable !== undefined) this.emitVpsEnable = data.emitVpsEnable; + if (data.emitSpsEnable !== undefined) this.emitSpsEnable = data.emitSpsEnable; + if (data.ppsIdEntryCount !== undefined) this.ppsIdEntryCount = data.ppsIdEntryCount; + if (data.ppsIdEntries !== undefined) this.ppsIdEntries = data.ppsIdEntries; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265EmitPictureParametersInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get vpsId(): number { + return this.#view.getUint8(16); + } + + set vpsId(value: number) { + this.#view.setUint8(16, Number(value)); + } + + get spsId(): number { + return this.#view.getUint8(17); + } + + set spsId(value: number) { + this.#view.setUint8(17, Number(value)); + } + + get emitVpsEnable(): number { + return this.#view.getUint32(20, LE); + } + + set emitVpsEnable(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get emitSpsEnable(): number { + return this.#view.getUint32(24, LE); + } + + set emitSpsEnable(value: Bool32) { + this.#view.setUint32(24, Number(value), LE); + } + + get ppsIdEntryCount(): number { + return this.#view.getUint32(28, LE); + } + + set ppsIdEntryCount(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get ppsIdEntries(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set ppsIdEntries(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265FrameSizeEXT.ts b/api/struct/VideoEncodeH265FrameSizeEXT.ts new file mode 100644 index 0000000..ef01b10 --- /dev/null +++ b/api/struct/VideoEncodeH265FrameSizeEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitVideoEncodeH265FrameSizeEXT { + frameISize?: number; + framePSize?: number; + frameBSize?: number; +} + +export class VideoEncodeH265FrameSizeEXT implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265FrameSizeEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265FrameSizeEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265FrameSizeEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265FrameSizeEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265FrameSizeEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.frameISize !== undefined) this.frameISize = data.frameISize; + if (data.framePSize !== undefined) this.framePSize = data.framePSize; + if (data.frameBSize !== undefined) this.frameBSize = data.frameBSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265FrameSizeEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get frameISize(): number { + return this.#view.getUint32(0, LE); + } + + set frameISize(value: number) { + this.#view.setUint32(0, Number(value), LE); + } + + get framePSize(): number { + return this.#view.getUint32(4, LE); + } + + set framePSize(value: number) { + this.#view.setUint32(4, Number(value), LE); + } + + get frameBSize(): number { + return this.#view.getUint32(8, LE); + } + + set frameBSize(value: number) { + this.#view.setUint32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265NaluSliceSegmentInfoEXT.ts b/api/struct/VideoEncodeH265NaluSliceSegmentInfoEXT.ts new file mode 100644 index 0000000..afd9f9a --- /dev/null +++ b/api/struct/VideoEncodeH265NaluSliceSegmentInfoEXT.ts @@ -0,0 +1,101 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH265ReferenceListsInfoEXT} from "./VideoEncodeH265ReferenceListsInfoEXT.ts"; +import {StdVideoEncodeH265SliceSegmentHeader} from "./StdVideoEncodeH265SliceSegmentHeader.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH265NaluSliceSegmentInfoEXT { + pNext?: AnyPointer; + ctbCount?: number; + pReferenceFinalLists?: AnyPointer; + pSliceSegmentHeaderStd?: AnyPointer; +} + +export class VideoEncodeH265NaluSliceSegmentInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265NaluSliceSegmentInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265NaluSliceSegmentInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265NaluSliceSegmentInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265NaluSliceSegmentInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265NaluSliceSegmentInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.ctbCount !== undefined) this.ctbCount = data.ctbCount; + if (data.pReferenceFinalLists !== undefined) this.pReferenceFinalLists = data.pReferenceFinalLists; + if (data.pSliceSegmentHeaderStd !== undefined) this.pSliceSegmentHeaderStd = data.pSliceSegmentHeaderStd; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265NaluSliceSegmentInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get ctbCount(): number { + return this.#view.getUint32(16, LE); + } + + set ctbCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pReferenceFinalLists(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pReferenceFinalLists(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pSliceSegmentHeaderStd(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pSliceSegmentHeaderStd(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265ProfileInfoEXT.ts b/api/struct/VideoEncodeH265ProfileInfoEXT.ts new file mode 100644 index 0000000..0ada511 --- /dev/null +++ b/api/struct/VideoEncodeH265ProfileInfoEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, StdVideoH265ProfileIdc } from "../enum.ts"; + +export interface InitVideoEncodeH265ProfileInfoEXT { + pNext?: AnyPointer; + stdProfileIdc?: StdVideoH265ProfileIdc; +} + +export class VideoEncodeH265ProfileInfoEXT implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265ProfileInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265ProfileInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265ProfileInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265ProfileInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265ProfileInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stdProfileIdc !== undefined) this.stdProfileIdc = data.stdProfileIdc; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265ProfileInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_PROFILE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stdProfileIdc(): number { + return this.#view.getUint32(16, LE); + } + + set stdProfileIdc(value: StdVideoH265ProfileIdc) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265QpEXT.ts b/api/struct/VideoEncodeH265QpEXT.ts new file mode 100644 index 0000000..4f2f82d --- /dev/null +++ b/api/struct/VideoEncodeH265QpEXT.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitVideoEncodeH265QpEXT { + qpI?: number; + qpP?: number; + qpB?: number; +} + +export class VideoEncodeH265QpEXT implements BaseStruct { + static size = 12; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265QpEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265QpEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265QpEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265QpEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265QpEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.qpI !== undefined) this.qpI = data.qpI; + if (data.qpP !== undefined) this.qpP = data.qpP; + if (data.qpB !== undefined) this.qpB = data.qpB; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265QpEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get qpI(): number { + return this.#view.getInt32(0, LE); + } + + set qpI(value: number) { + this.#view.setInt32(0, Number(value), LE); + } + + get qpP(): number { + return this.#view.getInt32(4, LE); + } + + set qpP(value: number) { + this.#view.setInt32(4, Number(value), LE); + } + + get qpB(): number { + return this.#view.getInt32(8, LE); + } + + set qpB(value: number) { + this.#view.setInt32(8, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265RateControlInfoEXT.ts b/api/struct/VideoEncodeH265RateControlInfoEXT.ts new file mode 100644 index 0000000..60b9c71 --- /dev/null +++ b/api/struct/VideoEncodeH265RateControlInfoEXT.ts @@ -0,0 +1,119 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, VideoEncodeH265RateControlStructureEXT } from "../enum.ts"; + +export interface InitVideoEncodeH265RateControlInfoEXT { + pNext?: AnyPointer; + gopFrameCount?: number; + idrPeriod?: number; + consecutiveBFrameCount?: number; + rateControlStructure?: VideoEncodeH265RateControlStructureEXT; + subLayerCount?: number; +} + +export class VideoEncodeH265RateControlInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265RateControlInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265RateControlInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265RateControlInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265RateControlInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265RateControlInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.gopFrameCount !== undefined) this.gopFrameCount = data.gopFrameCount; + if (data.idrPeriod !== undefined) this.idrPeriod = data.idrPeriod; + if (data.consecutiveBFrameCount !== undefined) this.consecutiveBFrameCount = data.consecutiveBFrameCount; + if (data.rateControlStructure !== undefined) this.rateControlStructure = data.rateControlStructure; + if (data.subLayerCount !== undefined) this.subLayerCount = data.subLayerCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265RateControlInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get gopFrameCount(): number { + return this.#view.getUint32(16, LE); + } + + set gopFrameCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get idrPeriod(): number { + return this.#view.getUint32(20, LE); + } + + set idrPeriod(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get consecutiveBFrameCount(): number { + return this.#view.getUint32(24, LE); + } + + set consecutiveBFrameCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get rateControlStructure(): number { + return this.#view.getUint32(28, LE); + } + + set rateControlStructure(value: VideoEncodeH265RateControlStructureEXT) { + this.#view.setUint32(28, Number(value), LE); + } + + get subLayerCount(): number { + return this.#view.getUint8(32); + } + + set subLayerCount(value: number) { + this.#view.setUint8(32, Number(value)); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265RateControlLayerInfoEXT.ts b/api/struct/VideoEncodeH265RateControlLayerInfoEXT.ts new file mode 100644 index 0000000..ef86408 --- /dev/null +++ b/api/struct/VideoEncodeH265RateControlLayerInfoEXT.ts @@ -0,0 +1,174 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH265QpEXT} from "./VideoEncodeH265QpEXT.ts"; +import {VideoEncodeH265FrameSizeEXT} from "./VideoEncodeH265FrameSizeEXT.ts"; +import { StructureType } from "../enum.ts"; +import { Bool32 } from "../def.ts"; + +export interface InitVideoEncodeH265RateControlLayerInfoEXT { + pNext?: AnyPointer; + temporalId?: number; + useInitialRcQp?: Bool32; + initialRcQp?: VideoEncodeH265QpEXT; + useMinQp?: Bool32; + minQp?: VideoEncodeH265QpEXT; + useMaxQp?: Bool32; + maxQp?: VideoEncodeH265QpEXT; + useMaxFrameSize?: Bool32; + maxFrameSize?: VideoEncodeH265FrameSizeEXT; +} + +export class VideoEncodeH265RateControlLayerInfoEXT implements BaseStruct { + static size = 88; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265RateControlLayerInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265RateControlLayerInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265RateControlLayerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265RateControlLayerInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265RateControlLayerInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.temporalId !== undefined) this.temporalId = data.temporalId; + if (data.useInitialRcQp !== undefined) this.useInitialRcQp = data.useInitialRcQp; + if (data.initialRcQp !== undefined) this.initialRcQp = data.initialRcQp; + if (data.useMinQp !== undefined) this.useMinQp = data.useMinQp; + if (data.minQp !== undefined) this.minQp = data.minQp; + if (data.useMaxQp !== undefined) this.useMaxQp = data.useMaxQp; + if (data.maxQp !== undefined) this.maxQp = data.maxQp; + if (data.useMaxFrameSize !== undefined) this.useMaxFrameSize = data.useMaxFrameSize; + if (data.maxFrameSize !== undefined) this.maxFrameSize = data.maxFrameSize; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265RateControlLayerInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get temporalId(): number { + return this.#view.getUint8(16); + } + + set temporalId(value: number) { + this.#view.setUint8(16, Number(value)); + } + + get useInitialRcQp(): number { + return this.#view.getUint32(20, LE); + } + + set useInitialRcQp(value: Bool32) { + this.#view.setUint32(20, Number(value), LE); + } + + get initialRcQp(): VideoEncodeH265QpEXT { + return new VideoEncodeH265QpEXT(this.#data.subarray(24, 24 + VideoEncodeH265QpEXT.size)); + } + + set initialRcQp(value: VideoEncodeH265QpEXT) { + if (value[BUFFER].byteLength < VideoEncodeH265QpEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get useMinQp(): number { + return this.#view.getUint32(36, LE); + } + + set useMinQp(value: Bool32) { + this.#view.setUint32(36, Number(value), LE); + } + + get minQp(): VideoEncodeH265QpEXT { + return new VideoEncodeH265QpEXT(this.#data.subarray(40, 40 + VideoEncodeH265QpEXT.size)); + } + + set minQp(value: VideoEncodeH265QpEXT) { + if (value[BUFFER].byteLength < VideoEncodeH265QpEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 40); + } + + get useMaxQp(): number { + return this.#view.getUint32(52, LE); + } + + set useMaxQp(value: Bool32) { + this.#view.setUint32(52, Number(value), LE); + } + + get maxQp(): VideoEncodeH265QpEXT { + return new VideoEncodeH265QpEXT(this.#data.subarray(56, 56 + VideoEncodeH265QpEXT.size)); + } + + set maxQp(value: VideoEncodeH265QpEXT) { + if (value[BUFFER].byteLength < VideoEncodeH265QpEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 56); + } + + get useMaxFrameSize(): number { + return this.#view.getUint32(68, LE); + } + + set useMaxFrameSize(value: Bool32) { + this.#view.setUint32(68, Number(value), LE); + } + + get maxFrameSize(): VideoEncodeH265FrameSizeEXT { + return new VideoEncodeH265FrameSizeEXT(this.#data.subarray(72, 72 + VideoEncodeH265FrameSizeEXT.size)); + } + + set maxFrameSize(value: VideoEncodeH265FrameSizeEXT) { + if (value[BUFFER].byteLength < VideoEncodeH265FrameSizeEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 72); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265ReferenceListsInfoEXT.ts b/api/struct/VideoEncodeH265ReferenceListsInfoEXT.ts new file mode 100644 index 0000000..893943a --- /dev/null +++ b/api/struct/VideoEncodeH265ReferenceListsInfoEXT.ts @@ -0,0 +1,121 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH265DpbSlotInfoEXT} from "./VideoEncodeH265DpbSlotInfoEXT.ts"; +import {StdVideoEncodeH265ReferenceModifications} from "./StdVideoEncodeH265ReferenceModifications.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH265ReferenceListsInfoEXT { + pNext?: AnyPointer; + referenceList0EntryCount?: number; + pReferenceList0Entries?: AnyPointer; + referenceList1EntryCount?: number; + pReferenceList1Entries?: AnyPointer; + pReferenceModifications?: AnyPointer; +} + +export class VideoEncodeH265ReferenceListsInfoEXT implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265ReferenceListsInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265ReferenceListsInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265ReferenceListsInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265ReferenceListsInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265ReferenceListsInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.referenceList0EntryCount !== undefined) this.referenceList0EntryCount = data.referenceList0EntryCount; + if (data.pReferenceList0Entries !== undefined) this.pReferenceList0Entries = data.pReferenceList0Entries; + if (data.referenceList1EntryCount !== undefined) this.referenceList1EntryCount = data.referenceList1EntryCount; + if (data.pReferenceList1Entries !== undefined) this.pReferenceList1Entries = data.pReferenceList1Entries; + if (data.pReferenceModifications !== undefined) this.pReferenceModifications = data.pReferenceModifications; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265ReferenceListsInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get referenceList0EntryCount(): number { + return this.#view.getUint8(16); + } + + set referenceList0EntryCount(value: number) { + this.#view.setUint8(16, Number(value)); + } + + get pReferenceList0Entries(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pReferenceList0Entries(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get referenceList1EntryCount(): number { + return this.#view.getUint8(32); + } + + set referenceList1EntryCount(value: number) { + this.#view.setUint8(32, Number(value)); + } + + get pReferenceList1Entries(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pReferenceList1Entries(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get pReferenceModifications(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pReferenceModifications(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265SessionParametersAddInfoEXT.ts b/api/struct/VideoEncodeH265SessionParametersAddInfoEXT.ts new file mode 100644 index 0000000..ed9c0c8 --- /dev/null +++ b/api/struct/VideoEncodeH265SessionParametersAddInfoEXT.ts @@ -0,0 +1,132 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {StdVideoH265VideoParameterSet} from "./StdVideoH265VideoParameterSet.ts"; +import {StdVideoH265SequenceParameterSet} from "./StdVideoH265SequenceParameterSet.ts"; +import {StdVideoH265PictureParameterSet} from "./StdVideoH265PictureParameterSet.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH265SessionParametersAddInfoEXT { + pNext?: AnyPointer; + stdVPSCount?: number; + pStdVPSs?: AnyPointer; + stdSPSCount?: number; + pStdSPSs?: AnyPointer; + stdPPSCount?: number; + pStdPPSs?: AnyPointer; +} + +export class VideoEncodeH265SessionParametersAddInfoEXT implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265SessionParametersAddInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265SessionParametersAddInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265SessionParametersAddInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265SessionParametersAddInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265SessionParametersAddInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.stdVPSCount !== undefined) this.stdVPSCount = data.stdVPSCount; + if (data.pStdVPSs !== undefined) this.pStdVPSs = data.pStdVPSs; + if (data.stdSPSCount !== undefined) this.stdSPSCount = data.stdSPSCount; + if (data.pStdSPSs !== undefined) this.pStdSPSs = data.pStdSPSs; + if (data.stdPPSCount !== undefined) this.stdPPSCount = data.stdPPSCount; + if (data.pStdPPSs !== undefined) this.pStdPPSs = data.pStdPPSs; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265SessionParametersAddInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get stdVPSCount(): number { + return this.#view.getUint32(16, LE); + } + + set stdVPSCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pStdVPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pStdVPSs(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get stdSPSCount(): number { + return this.#view.getUint32(32, LE); + } + + set stdSPSCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get pStdSPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pStdSPSs(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get stdPPSCount(): number { + return this.#view.getUint32(48, LE); + } + + set stdPPSCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pStdPPSs(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pStdPPSs(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265SessionParametersCreateInfoEXT.ts b/api/struct/VideoEncodeH265SessionParametersCreateInfoEXT.ts new file mode 100644 index 0000000..0aedf4e --- /dev/null +++ b/api/struct/VideoEncodeH265SessionParametersCreateInfoEXT.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH265SessionParametersAddInfoEXT} from "./VideoEncodeH265SessionParametersAddInfoEXT.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH265SessionParametersCreateInfoEXT { + pNext?: AnyPointer; + maxStdVPSCount?: number; + maxStdSPSCount?: number; + maxStdPPSCount?: number; + pParametersAddInfo?: AnyPointer; +} + +export class VideoEncodeH265SessionParametersCreateInfoEXT implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265SessionParametersCreateInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265SessionParametersCreateInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265SessionParametersCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265SessionParametersCreateInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265SessionParametersCreateInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.maxStdVPSCount !== undefined) this.maxStdVPSCount = data.maxStdVPSCount; + if (data.maxStdSPSCount !== undefined) this.maxStdSPSCount = data.maxStdSPSCount; + if (data.maxStdPPSCount !== undefined) this.maxStdPPSCount = data.maxStdPPSCount; + if (data.pParametersAddInfo !== undefined) this.pParametersAddInfo = data.pParametersAddInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265SessionParametersCreateInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get maxStdVPSCount(): number { + return this.#view.getUint32(16, LE); + } + + set maxStdVPSCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxStdSPSCount(): number { + return this.#view.getUint32(20, LE); + } + + set maxStdSPSCount(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get maxStdPPSCount(): number { + return this.#view.getUint32(24, LE); + } + + set maxStdPPSCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pParametersAddInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pParametersAddInfo(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeH265VclFrameInfoEXT.ts b/api/struct/VideoEncodeH265VclFrameInfoEXT.ts new file mode 100644 index 0000000..62d544d --- /dev/null +++ b/api/struct/VideoEncodeH265VclFrameInfoEXT.ts @@ -0,0 +1,112 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeH265ReferenceListsInfoEXT} from "./VideoEncodeH265ReferenceListsInfoEXT.ts"; +import {VideoEncodeH265NaluSliceSegmentInfoEXT} from "./VideoEncodeH265NaluSliceSegmentInfoEXT.ts"; +import {StdVideoEncodeH265PictureInfo} from "./StdVideoEncodeH265PictureInfo.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeH265VclFrameInfoEXT { + pNext?: AnyPointer; + pReferenceFinalLists?: AnyPointer; + naluSliceSegmentEntryCount?: number; + pNaluSliceSegmentEntries?: AnyPointer; + pCurrentPictureInfo?: AnyPointer; +} + +export class VideoEncodeH265VclFrameInfoEXT implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeH265VclFrameInfoEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265VclFrameInfoEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeH265VclFrameInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeH265VclFrameInfoEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeH265VclFrameInfoEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.pReferenceFinalLists !== undefined) this.pReferenceFinalLists = data.pReferenceFinalLists; + if (data.naluSliceSegmentEntryCount !== undefined) this.naluSliceSegmentEntryCount = data.naluSliceSegmentEntryCount; + if (data.pNaluSliceSegmentEntries !== undefined) this.pNaluSliceSegmentEntries = data.pNaluSliceSegmentEntries; + if (data.pCurrentPictureInfo !== undefined) this.pCurrentPictureInfo = data.pCurrentPictureInfo; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265VclFrameInfoEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get pReferenceFinalLists(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set pReferenceFinalLists(value: AnyPointer) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get naluSliceSegmentEntryCount(): number { + return this.#view.getUint32(24, LE); + } + + set naluSliceSegmentEntryCount(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get pNaluSliceSegmentEntries(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pNaluSliceSegmentEntries(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pCurrentPictureInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pCurrentPictureInfo(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeInfoKHR.ts b/api/struct/VideoEncodeInfoKHR.ts new file mode 100644 index 0000000..53f6e2d --- /dev/null +++ b/api/struct/VideoEncodeInfoKHR.ts @@ -0,0 +1,175 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoPictureResourceInfoKHR} from "./VideoPictureResourceInfoKHR.ts"; +import {VideoReferenceSlotInfoKHR} from "./VideoReferenceSlotInfoKHR.ts"; +import { StructureType } from "../enum.ts"; +import { VideoEncodeFlagsKHR, Buffer, DeviceSize } from "../def.ts"; + +export interface InitVideoEncodeInfoKHR { + pNext?: AnyPointer; + flags?: VideoEncodeFlagsKHR; + qualityLevel?: number; + dstBitstreamBuffer?: Buffer; + dstBitstreamBufferOffset?: DeviceSize; + dstBitstreamBufferMaxRange?: DeviceSize; + srcPictureResource?: VideoPictureResourceInfoKHR; + pSetupReferenceSlot?: AnyPointer; + referenceSlotCount?: number; + pReferenceSlots?: AnyPointer; + precedingExternallyEncodedBytes?: number; +} + +export class VideoEncodeInfoKHR implements BaseStruct { + static size = 128; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.qualityLevel !== undefined) this.qualityLevel = data.qualityLevel; + if (data.dstBitstreamBuffer !== undefined) this.dstBitstreamBuffer = data.dstBitstreamBuffer; + if (data.dstBitstreamBufferOffset !== undefined) this.dstBitstreamBufferOffset = data.dstBitstreamBufferOffset; + if (data.dstBitstreamBufferMaxRange !== undefined) this.dstBitstreamBufferMaxRange = data.dstBitstreamBufferMaxRange; + if (data.srcPictureResource !== undefined) this.srcPictureResource = data.srcPictureResource; + if (data.pSetupReferenceSlot !== undefined) this.pSetupReferenceSlot = data.pSetupReferenceSlot; + if (data.referenceSlotCount !== undefined) this.referenceSlotCount = data.referenceSlotCount; + if (data.pReferenceSlots !== undefined) this.pReferenceSlots = data.pReferenceSlots; + if (data.precedingExternallyEncodedBytes !== undefined) this.precedingExternallyEncodedBytes = data.precedingExternallyEncodedBytes; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoEncodeFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get qualityLevel(): number { + return this.#view.getUint32(20, LE); + } + + set qualityLevel(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get dstBitstreamBuffer(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set dstBitstreamBuffer(value: Buffer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get dstBitstreamBufferOffset(): bigint { + return this.#view.getBigUint64(32, LE); + } + + set dstBitstreamBufferOffset(value: DeviceSize) { + this.#view.setBigUint64(32, BigInt(value), LE); + } + + get dstBitstreamBufferMaxRange(): bigint { + return this.#view.getBigUint64(40, LE); + } + + set dstBitstreamBufferMaxRange(value: DeviceSize) { + this.#view.setBigUint64(40, BigInt(value), LE); + } + + get srcPictureResource(): VideoPictureResourceInfoKHR { + return new VideoPictureResourceInfoKHR(this.#data.subarray(48, 48 + VideoPictureResourceInfoKHR.size)); + } + + set srcPictureResource(value: VideoPictureResourceInfoKHR) { + if (value[BUFFER].byteLength < VideoPictureResourceInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 48); + } + + get pSetupReferenceSlot(): Deno.PointerValue { + return pointerFromView(this.#view, 96, LE); + } + + set pSetupReferenceSlot(value: AnyPointer) { + this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); + } + + get referenceSlotCount(): number { + return this.#view.getUint32(104, LE); + } + + set referenceSlotCount(value: number) { + this.#view.setUint32(104, Number(value), LE); + } + + get pReferenceSlots(): Deno.PointerValue { + return pointerFromView(this.#view, 112, LE); + } + + set pReferenceSlots(value: AnyPointer) { + this.#view.setBigUint64(112, BigInt(anyPointer(value)), LE); + } + + get precedingExternallyEncodedBytes(): number { + return this.#view.getUint32(120, LE); + } + + set precedingExternallyEncodedBytes(value: number) { + this.#view.setUint32(120, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeRateControlInfoKHR.ts b/api/struct/VideoEncodeRateControlInfoKHR.ts new file mode 100644 index 0000000..fb1632d --- /dev/null +++ b/api/struct/VideoEncodeRateControlInfoKHR.ts @@ -0,0 +1,111 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoEncodeRateControlLayerInfoKHR} from "./VideoEncodeRateControlLayerInfoKHR.ts"; +import { StructureType, VideoEncodeRateControlModeFlagBitsKHR } from "../enum.ts"; +import { VideoEncodeRateControlFlagsKHR } from "../def.ts"; + +export interface InitVideoEncodeRateControlInfoKHR { + pNext?: AnyPointer; + flags?: VideoEncodeRateControlFlagsKHR; + rateControlMode?: VideoEncodeRateControlModeFlagBitsKHR; + layerCount?: number; + pLayerConfigs?: AnyPointer; +} + +export class VideoEncodeRateControlInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeRateControlInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeRateControlInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeRateControlInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeRateControlInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeRateControlInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.rateControlMode !== undefined) this.rateControlMode = data.rateControlMode; + if (data.layerCount !== undefined) this.layerCount = data.layerCount; + if (data.pLayerConfigs !== undefined) this.pLayerConfigs = data.pLayerConfigs; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeRateControlInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_RATE_CONTROL_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoEncodeRateControlFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get rateControlMode(): number { + return this.#view.getUint32(20, LE); + } + + set rateControlMode(value: VideoEncodeRateControlModeFlagBitsKHR) { + this.#view.setUint32(20, Number(value), LE); + } + + get layerCount(): number { + return this.#view.getUint8(24); + } + + set layerCount(value: number) { + this.#view.setUint8(24, Number(value)); + } + + get pLayerConfigs(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pLayerConfigs(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeRateControlLayerInfoKHR.ts b/api/struct/VideoEncodeRateControlLayerInfoKHR.ts new file mode 100644 index 0000000..ec2108f --- /dev/null +++ b/api/struct/VideoEncodeRateControlLayerInfoKHR.ts @@ -0,0 +1,129 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoEncodeRateControlLayerInfoKHR { + pNext?: AnyPointer; + averageBitrate?: number; + maxBitrate?: number; + frameRateNumerator?: number; + frameRateDenominator?: number; + virtualBufferSizeInMs?: number; + initialVirtualBufferSizeInMs?: number; +} + +export class VideoEncodeRateControlLayerInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeRateControlLayerInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeRateControlLayerInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeRateControlLayerInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeRateControlLayerInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeRateControlLayerInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.averageBitrate !== undefined) this.averageBitrate = data.averageBitrate; + if (data.maxBitrate !== undefined) this.maxBitrate = data.maxBitrate; + if (data.frameRateNumerator !== undefined) this.frameRateNumerator = data.frameRateNumerator; + if (data.frameRateDenominator !== undefined) this.frameRateDenominator = data.frameRateDenominator; + if (data.virtualBufferSizeInMs !== undefined) this.virtualBufferSizeInMs = data.virtualBufferSizeInMs; + if (data.initialVirtualBufferSizeInMs !== undefined) this.initialVirtualBufferSizeInMs = data.initialVirtualBufferSizeInMs; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeRateControlLayerInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get averageBitrate(): number { + return this.#view.getUint32(16, LE); + } + + set averageBitrate(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get maxBitrate(): number { + return this.#view.getUint32(20, LE); + } + + set maxBitrate(value: number) { + this.#view.setUint32(20, Number(value), LE); + } + + get frameRateNumerator(): number { + return this.#view.getUint32(24, LE); + } + + set frameRateNumerator(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get frameRateDenominator(): number { + return this.#view.getUint32(28, LE); + } + + set frameRateDenominator(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get virtualBufferSizeInMs(): number { + return this.#view.getUint32(32, LE); + } + + set virtualBufferSizeInMs(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get initialVirtualBufferSizeInMs(): number { + return this.#view.getUint32(36, LE); + } + + set initialVirtualBufferSizeInMs(value: number) { + this.#view.setUint32(36, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEncodeUsageInfoKHR.ts b/api/struct/VideoEncodeUsageInfoKHR.ts new file mode 100644 index 0000000..692741d --- /dev/null +++ b/api/struct/VideoEncodeUsageInfoKHR.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, VideoEncodeTuningModeKHR } from "../enum.ts"; +import { VideoEncodeUsageFlagsKHR, VideoEncodeContentFlagsKHR } from "../def.ts"; + +export interface InitVideoEncodeUsageInfoKHR { + pNext?: AnyPointer; + videoUsageHints?: VideoEncodeUsageFlagsKHR; + videoContentHints?: VideoEncodeContentFlagsKHR; + tuningMode?: VideoEncodeTuningModeKHR; +} + +export class VideoEncodeUsageInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEncodeUsageInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeUsageInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEncodeUsageInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEncodeUsageInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEncodeUsageInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.videoUsageHints !== undefined) this.videoUsageHints = data.videoUsageHints; + if (data.videoContentHints !== undefined) this.videoContentHints = data.videoContentHints; + if (data.tuningMode !== undefined) this.tuningMode = data.tuningMode; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeUsageInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_ENCODE_USAGE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get videoUsageHints(): number { + return this.#view.getUint32(16, LE); + } + + set videoUsageHints(value: VideoEncodeUsageFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get videoContentHints(): number { + return this.#view.getUint32(20, LE); + } + + set videoContentHints(value: VideoEncodeContentFlagsKHR) { + this.#view.setUint32(20, Number(value), LE); + } + + get tuningMode(): number { + return this.#view.getUint32(24, LE); + } + + set tuningMode(value: VideoEncodeTuningModeKHR) { + this.#view.setUint32(24, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoEndCodingInfoKHR.ts b/api/struct/VideoEndCodingInfoKHR.ts new file mode 100644 index 0000000..2f5f912 --- /dev/null +++ b/api/struct/VideoEndCodingInfoKHR.ts @@ -0,0 +1,80 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { VideoEndCodingFlagsKHR } from "../def.ts"; + +export interface InitVideoEndCodingInfoKHR { + pNext?: AnyPointer; + flags?: VideoEndCodingFlagsKHR; +} + +export class VideoEndCodingInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoEndCodingInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEndCodingInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoEndCodingInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoEndCodingInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoEndCodingInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEndCodingInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_END_CODING_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoEndCodingFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoFormatPropertiesKHR.ts b/api/struct/VideoFormatPropertiesKHR.ts new file mode 100644 index 0000000..858a73f --- /dev/null +++ b/api/struct/VideoFormatPropertiesKHR.ts @@ -0,0 +1,134 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {ComponentMapping} from "./ComponentMapping.ts"; +import { StructureType, Format, ImageType, ImageTiling } from "../enum.ts"; +import { ImageCreateFlags, ImageUsageFlags } from "../def.ts"; + +export interface InitVideoFormatPropertiesKHR { + pNext?: AnyPointer; + format?: Format; + componentMapping?: ComponentMapping; + imageCreateFlags?: ImageCreateFlags; + imageType?: ImageType; + imageTiling?: ImageTiling; + imageUsageFlags?: ImageUsageFlags; +} + +export class VideoFormatPropertiesKHR implements BaseStruct { + static size = 56; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoFormatPropertiesKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoFormatPropertiesKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoFormatPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoFormatPropertiesKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoFormatPropertiesKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.format !== undefined) this.format = data.format; + if (data.componentMapping !== undefined) this.componentMapping = data.componentMapping; + if (data.imageCreateFlags !== undefined) this.imageCreateFlags = data.imageCreateFlags; + if (data.imageType !== undefined) this.imageType = data.imageType; + if (data.imageTiling !== undefined) this.imageTiling = data.imageTiling; + if (data.imageUsageFlags !== undefined) this.imageUsageFlags = data.imageUsageFlags; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoFormatPropertiesKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_FORMAT_PROPERTIES_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get format(): number { + return this.#view.getUint32(16, LE); + } + + set format(value: Format) { + this.#view.setUint32(16, Number(value), LE); + } + + get componentMapping(): ComponentMapping { + return new ComponentMapping(this.#data.subarray(20, 20 + ComponentMapping.size)); + } + + set componentMapping(value: ComponentMapping) { + if (value[BUFFER].byteLength < ComponentMapping.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 20); + } + + get imageCreateFlags(): number { + return this.#view.getUint32(36, LE); + } + + set imageCreateFlags(value: ImageCreateFlags) { + this.#view.setUint32(36, Number(value), LE); + } + + get imageType(): number { + return this.#view.getUint32(40, LE); + } + + set imageType(value: ImageType) { + this.#view.setUint32(40, Number(value), LE); + } + + get imageTiling(): number { + return this.#view.getUint32(44, LE); + } + + set imageTiling(value: ImageTiling) { + this.#view.setUint32(44, Number(value), LE); + } + + get imageUsageFlags(): number { + return this.#view.getUint32(48, LE); + } + + set imageUsageFlags(value: ImageUsageFlags) { + this.#view.setUint32(48, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoPictureResourceInfoKHR.ts b/api/struct/VideoPictureResourceInfoKHR.ts new file mode 100644 index 0000000..f371f9b --- /dev/null +++ b/api/struct/VideoPictureResourceInfoKHR.ts @@ -0,0 +1,118 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {Offset2D} from "./Offset2D.ts"; +import {Extent2D} from "./Extent2D.ts"; +import { StructureType } from "../enum.ts"; +import { ImageView } from "../def.ts"; + +export interface InitVideoPictureResourceInfoKHR { + pNext?: AnyPointer; + codedOffset?: Offset2D; + codedExtent?: Extent2D; + baseArrayLayer?: number; + imageViewBinding?: ImageView; +} + +export class VideoPictureResourceInfoKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoPictureResourceInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoPictureResourceInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoPictureResourceInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoPictureResourceInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoPictureResourceInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.codedOffset !== undefined) this.codedOffset = data.codedOffset; + if (data.codedExtent !== undefined) this.codedExtent = data.codedExtent; + if (data.baseArrayLayer !== undefined) this.baseArrayLayer = data.baseArrayLayer; + if (data.imageViewBinding !== undefined) this.imageViewBinding = data.imageViewBinding; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoPictureResourceInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_PICTURE_RESOURCE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get codedOffset(): Offset2D { + return new Offset2D(this.#data.subarray(16, 16 + Offset2D.size)); + } + + set codedOffset(value: Offset2D) { + if (value[BUFFER].byteLength < Offset2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 16); + } + + get codedExtent(): Extent2D { + return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); + } + + set codedExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } + + get baseArrayLayer(): number { + return this.#view.getUint32(32, LE); + } + + set baseArrayLayer(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get imageViewBinding(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set imageViewBinding(value: ImageView) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoProfileInfoKHR.ts b/api/struct/VideoProfileInfoKHR.ts new file mode 100644 index 0000000..6919419 --- /dev/null +++ b/api/struct/VideoProfileInfoKHR.ts @@ -0,0 +1,110 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType, VideoCodecOperationFlagBitsKHR } from "../enum.ts"; +import { VideoChromaSubsamplingFlagsKHR, VideoComponentBitDepthFlagsKHR } from "../def.ts"; + +export interface InitVideoProfileInfoKHR { + pNext?: AnyPointer; + videoCodecOperation?: VideoCodecOperationFlagBitsKHR; + chromaSubsampling?: VideoChromaSubsamplingFlagsKHR; + lumaBitDepth?: VideoComponentBitDepthFlagsKHR; + chromaBitDepth?: VideoComponentBitDepthFlagsKHR; +} + +export class VideoProfileInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoProfileInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoProfileInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoProfileInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoProfileInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoProfileInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.videoCodecOperation !== undefined) this.videoCodecOperation = data.videoCodecOperation; + if (data.chromaSubsampling !== undefined) this.chromaSubsampling = data.chromaSubsampling; + if (data.lumaBitDepth !== undefined) this.lumaBitDepth = data.lumaBitDepth; + if (data.chromaBitDepth !== undefined) this.chromaBitDepth = data.chromaBitDepth; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoProfileInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_PROFILE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get videoCodecOperation(): number { + return this.#view.getUint32(16, LE); + } + + set videoCodecOperation(value: VideoCodecOperationFlagBitsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get chromaSubsampling(): number { + return this.#view.getUint32(20, LE); + } + + set chromaSubsampling(value: VideoChromaSubsamplingFlagsKHR) { + this.#view.setUint32(20, Number(value), LE); + } + + get lumaBitDepth(): number { + return this.#view.getUint32(24, LE); + } + + set lumaBitDepth(value: VideoComponentBitDepthFlagsKHR) { + this.#view.setUint32(24, Number(value), LE); + } + + get chromaBitDepth(): number { + return this.#view.getUint32(28, LE); + } + + set chromaBitDepth(value: VideoComponentBitDepthFlagsKHR) { + this.#view.setUint32(28, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoProfileListInfoKHR.ts b/api/struct/VideoProfileListInfoKHR.ts new file mode 100644 index 0000000..0e65476 --- /dev/null +++ b/api/struct/VideoProfileListInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoProfileInfoKHR} from "./VideoProfileInfoKHR.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoProfileListInfoKHR { + pNext?: AnyPointer; + profileCount?: number; + pProfiles?: AnyPointer; +} + +export class VideoProfileListInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoProfileListInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoProfileListInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoProfileListInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoProfileListInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoProfileListInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.profileCount !== undefined) this.profileCount = data.profileCount; + if (data.pProfiles !== undefined) this.pProfiles = data.pProfiles; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoProfileListInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_PROFILE_LIST_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get profileCount(): number { + return this.#view.getUint32(16, LE); + } + + set profileCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pProfiles(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pProfiles(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoReferenceSlotInfoKHR.ts b/api/struct/VideoReferenceSlotInfoKHR.ts new file mode 100644 index 0000000..c3635ff --- /dev/null +++ b/api/struct/VideoReferenceSlotInfoKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoPictureResourceInfoKHR} from "./VideoPictureResourceInfoKHR.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoReferenceSlotInfoKHR { + pNext?: AnyPointer; + slotIndex?: number; + pPictureResource?: AnyPointer; +} + +export class VideoReferenceSlotInfoKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoReferenceSlotInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoReferenceSlotInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoReferenceSlotInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoReferenceSlotInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoReferenceSlotInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.slotIndex !== undefined) this.slotIndex = data.slotIndex; + if (data.pPictureResource !== undefined) this.pPictureResource = data.pPictureResource; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoReferenceSlotInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_REFERENCE_SLOT_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get slotIndex(): number { + return this.#view.getInt32(16, LE); + } + + set slotIndex(value: number) { + this.#view.setInt32(16, Number(value), LE); + } + + get pPictureResource(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pPictureResource(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoSessionCreateInfoKHR.ts b/api/struct/VideoSessionCreateInfoKHR.ts new file mode 100644 index 0000000..f0e58d9 --- /dev/null +++ b/api/struct/VideoSessionCreateInfoKHR.ts @@ -0,0 +1,166 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {VideoProfileInfoKHR} from "./VideoProfileInfoKHR.ts"; +import {Extent2D} from "./Extent2D.ts"; +import {ExtensionProperties} from "./ExtensionProperties.ts"; +import { StructureType, Format } from "../enum.ts"; +import { VideoSessionCreateFlagsKHR } from "../def.ts"; + +export interface InitVideoSessionCreateInfoKHR { + pNext?: AnyPointer; + queueFamilyIndex?: number; + flags?: VideoSessionCreateFlagsKHR; + pVideoProfile?: AnyPointer; + pictureFormat?: Format; + maxCodedExtent?: Extent2D; + referencePictureFormat?: Format; + maxDpbSlots?: number; + maxActiveReferencePictures?: number; + pStdHeaderVersion?: AnyPointer; +} + +export class VideoSessionCreateInfoKHR implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoSessionCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoSessionCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoSessionCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoSessionCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoSessionCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; + if (data.flags !== undefined) this.flags = data.flags; + if (data.pVideoProfile !== undefined) this.pVideoProfile = data.pVideoProfile; + if (data.pictureFormat !== undefined) this.pictureFormat = data.pictureFormat; + if (data.maxCodedExtent !== undefined) this.maxCodedExtent = data.maxCodedExtent; + if (data.referencePictureFormat !== undefined) this.referencePictureFormat = data.referencePictureFormat; + if (data.maxDpbSlots !== undefined) this.maxDpbSlots = data.maxDpbSlots; + if (data.maxActiveReferencePictures !== undefined) this.maxActiveReferencePictures = data.maxActiveReferencePictures; + if (data.pStdHeaderVersion !== undefined) this.pStdHeaderVersion = data.pStdHeaderVersion; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_SESSION_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get queueFamilyIndex(): number { + return this.#view.getUint32(16, LE); + } + + set queueFamilyIndex(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get flags(): number { + return this.#view.getUint32(20, LE); + } + + set flags(value: VideoSessionCreateFlagsKHR) { + this.#view.setUint32(20, Number(value), LE); + } + + get pVideoProfile(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pVideoProfile(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pictureFormat(): number { + return this.#view.getUint32(32, LE); + } + + set pictureFormat(value: Format) { + this.#view.setUint32(32, Number(value), LE); + } + + get maxCodedExtent(): Extent2D { + return new Extent2D(this.#data.subarray(36, 36 + Extent2D.size)); + } + + set maxCodedExtent(value: Extent2D) { + if (value[BUFFER].byteLength < Extent2D.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 36); + } + + get referencePictureFormat(): number { + return this.#view.getUint32(44, LE); + } + + set referencePictureFormat(value: Format) { + this.#view.setUint32(44, Number(value), LE); + } + + get maxDpbSlots(): number { + return this.#view.getUint32(48, LE); + } + + set maxDpbSlots(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get maxActiveReferencePictures(): number { + return this.#view.getUint32(52, LE); + } + + set maxActiveReferencePictures(value: number) { + this.#view.setUint32(52, Number(value), LE); + } + + get pStdHeaderVersion(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pStdHeaderVersion(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoSessionMemoryRequirementsKHR.ts b/api/struct/VideoSessionMemoryRequirementsKHR.ts new file mode 100644 index 0000000..4b3cb64 --- /dev/null +++ b/api/struct/VideoSessionMemoryRequirementsKHR.ts @@ -0,0 +1,93 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {MemoryRequirements} from "./MemoryRequirements.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoSessionMemoryRequirementsKHR { + pNext?: AnyPointer; + memoryBindIndex?: number; + memoryRequirements?: MemoryRequirements; +} + +export class VideoSessionMemoryRequirementsKHR implements BaseStruct { + static size = 48; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoSessionMemoryRequirementsKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoSessionMemoryRequirementsKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoSessionMemoryRequirementsKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoSessionMemoryRequirementsKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoSessionMemoryRequirementsKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.memoryBindIndex !== undefined) this.memoryBindIndex = data.memoryBindIndex; + if (data.memoryRequirements !== undefined) this.memoryRequirements = data.memoryRequirements; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionMemoryRequirementsKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get memoryBindIndex(): number { + return this.#view.getUint32(16, LE); + } + + set memoryBindIndex(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get memoryRequirements(): MemoryRequirements { + return new MemoryRequirements(this.#data.subarray(24, 24 + MemoryRequirements.size)); + } + + set memoryRequirements(value: MemoryRequirements) { + if (value[BUFFER].byteLength < MemoryRequirements.size) { + throw new Error("Data buffer too small"); + } + this.#data.set(value[BUFFER], 24); + } +} \ No newline at end of file diff --git a/api/struct/VideoSessionParametersCreateInfoKHR.ts b/api/struct/VideoSessionParametersCreateInfoKHR.ts new file mode 100644 index 0000000..0d88ac6 --- /dev/null +++ b/api/struct/VideoSessionParametersCreateInfoKHR.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { VideoSessionParametersCreateFlagsKHR, VideoSessionParametersKHR, VideoSessionKHR } from "../def.ts"; + +export interface InitVideoSessionParametersCreateInfoKHR { + pNext?: AnyPointer; + flags?: VideoSessionParametersCreateFlagsKHR; + videoSessionParametersTemplate?: VideoSessionParametersKHR; + videoSession?: VideoSessionKHR; +} + +export class VideoSessionParametersCreateInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoSessionParametersCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoSessionParametersCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoSessionParametersCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoSessionParametersCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoSessionParametersCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.videoSessionParametersTemplate !== undefined) this.videoSessionParametersTemplate = data.videoSessionParametersTemplate; + if (data.videoSession !== undefined) this.videoSession = data.videoSession; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionParametersCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: VideoSessionParametersCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get videoSessionParametersTemplate(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set videoSessionParametersTemplate(value: VideoSessionParametersKHR) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get videoSession(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set videoSession(value: VideoSessionKHR) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/VideoSessionParametersUpdateInfoKHR.ts b/api/struct/VideoSessionParametersUpdateInfoKHR.ts new file mode 100644 index 0000000..041d234 --- /dev/null +++ b/api/struct/VideoSessionParametersUpdateInfoKHR.ts @@ -0,0 +1,79 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitVideoSessionParametersUpdateInfoKHR { + pNext?: AnyPointer; + updateSequenceCount?: number; +} + +export class VideoSessionParametersUpdateInfoKHR implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitVideoSessionParametersUpdateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitVideoSessionParametersUpdateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(VideoSessionParametersUpdateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < VideoSessionParametersUpdateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(VideoSessionParametersUpdateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.updateSequenceCount !== undefined) this.updateSequenceCount = data.updateSequenceCount; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionParametersUpdateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get updateSequenceCount(): number { + return this.#view.getUint32(16, LE); + } + + set updateSequenceCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/Viewport.ts b/api/struct/Viewport.ts new file mode 100644 index 0000000..d9f1749 --- /dev/null +++ b/api/struct/Viewport.ts @@ -0,0 +1,109 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitViewport { + x?: number; + y?: number; + width?: number; + height?: number; + minDepth?: number; + maxDepth?: number; +} + +export class Viewport implements BaseStruct { + static size = 24; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitViewport); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitViewport) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(Viewport.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < Viewport.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(Viewport.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.x !== undefined) this.x = data.x; + if (data.y !== undefined) this.y = data.y; + if (data.width !== undefined) this.width = data.width; + if (data.height !== undefined) this.height = data.height; + if (data.minDepth !== undefined) this.minDepth = data.minDepth; + if (data.maxDepth !== undefined) this.maxDepth = data.maxDepth; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Viewport.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get x(): number { + return this.#view.getFloat32(0, LE); + } + + set x(value: number) { + this.#view.setFloat32(0, Number(value), LE); + } + + get y(): number { + return this.#view.getFloat32(4, LE); + } + + set y(value: number) { + this.#view.setFloat32(4, Number(value), LE); + } + + get width(): number { + return this.#view.getFloat32(8, LE); + } + + set width(value: number) { + this.#view.setFloat32(8, Number(value), LE); + } + + get height(): number { + return this.#view.getFloat32(12, LE); + } + + set height(value: number) { + this.#view.setFloat32(12, Number(value), LE); + } + + get minDepth(): number { + return this.#view.getFloat32(16, LE); + } + + set minDepth(value: number) { + this.#view.setFloat32(16, Number(value), LE); + } + + get maxDepth(): number { + return this.#view.getFloat32(20, LE); + } + + set maxDepth(value: number) { + this.#view.setFloat32(20, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ViewportSwizzleNV.ts b/api/struct/ViewportSwizzleNV.ts new file mode 100644 index 0000000..f0aca5d --- /dev/null +++ b/api/struct/ViewportSwizzleNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { ViewportCoordinateSwizzleNV } from "../enum.ts"; + +export interface InitViewportSwizzleNV { + x?: ViewportCoordinateSwizzleNV; + y?: ViewportCoordinateSwizzleNV; + z?: ViewportCoordinateSwizzleNV; + w?: ViewportCoordinateSwizzleNV; +} + +export class ViewportSwizzleNV implements BaseStruct { + static size = 16; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitViewportSwizzleNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitViewportSwizzleNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ViewportSwizzleNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ViewportSwizzleNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ViewportSwizzleNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.x !== undefined) this.x = data.x; + if (data.y !== undefined) this.y = data.y; + if (data.z !== undefined) this.z = data.z; + if (data.w !== undefined) this.w = data.w; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ViewportSwizzleNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get x(): number { + return this.#view.getUint32(0, LE); + } + + set x(value: ViewportCoordinateSwizzleNV) { + this.#view.setUint32(0, Number(value), LE); + } + + get y(): number { + return this.#view.getUint32(4, LE); + } + + set y(value: ViewportCoordinateSwizzleNV) { + this.#view.setUint32(4, Number(value), LE); + } + + get z(): number { + return this.#view.getUint32(8, LE); + } + + set z(value: ViewportCoordinateSwizzleNV) { + this.#view.setUint32(8, Number(value), LE); + } + + get w(): number { + return this.#view.getUint32(12, LE); + } + + set w(value: ViewportCoordinateSwizzleNV) { + this.#view.setUint32(12, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/ViewportWScalingNV.ts b/api/struct/ViewportWScalingNV.ts new file mode 100644 index 0000000..150c76f --- /dev/null +++ b/api/struct/ViewportWScalingNV.ts @@ -0,0 +1,69 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitViewportWScalingNV { + xcoeff?: number; + ycoeff?: number; +} + +export class ViewportWScalingNV implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitViewportWScalingNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitViewportWScalingNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(ViewportWScalingNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < ViewportWScalingNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(ViewportWScalingNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.xcoeff !== undefined) this.xcoeff = data.xcoeff; + if (data.ycoeff !== undefined) this.ycoeff = data.ycoeff; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ViewportWScalingNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get xcoeff(): number { + return this.#view.getFloat32(0, LE); + } + + set xcoeff(value: number) { + this.#view.setFloat32(0, Number(value), LE); + } + + get ycoeff(): number { + return this.#view.getFloat32(4, LE); + } + + set ycoeff(value: number) { + this.#view.setFloat32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/WaylandSurfaceCreateInfoKHR.ts b/api/struct/WaylandSurfaceCreateInfoKHR.ts new file mode 100644 index 0000000..b88cf63 --- /dev/null +++ b/api/struct/WaylandSurfaceCreateInfoKHR.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { WaylandSurfaceCreateFlagsKHR } from "../def.ts"; + +export interface InitWaylandSurfaceCreateInfoKHR { + pNext?: AnyPointer; + flags?: WaylandSurfaceCreateFlagsKHR; + display?: AnyPointer; + surface?: AnyPointer; +} + +export class WaylandSurfaceCreateInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitWaylandSurfaceCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitWaylandSurfaceCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(WaylandSurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < WaylandSurfaceCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(WaylandSurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.display !== undefined) this.display = data.display; + if (data.surface !== undefined) this.surface = data.surface; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WaylandSurfaceCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.WAYLAND_SURFACE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: WaylandSurfaceCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get display(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set display(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get surface(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set surface(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/Win32KeyedMutexAcquireReleaseInfoKHR.ts b/api/struct/Win32KeyedMutexAcquireReleaseInfoKHR.ts new file mode 100644 index 0000000..58c1341 --- /dev/null +++ b/api/struct/Win32KeyedMutexAcquireReleaseInfoKHR.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceMemory } from "../def.ts"; + +export interface InitWin32KeyedMutexAcquireReleaseInfoKHR { + pNext?: AnyPointer; + acquireCount?: number; + pAcquireSyncs?: AnyPointer; + pAcquireKeys?: AnyPointer; + pAcquireTimeouts?: AnyPointer; + releaseCount?: number; + pReleaseSyncs?: AnyPointer; + pReleaseKeys?: AnyPointer; +} + +export class Win32KeyedMutexAcquireReleaseInfoKHR implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitWin32KeyedMutexAcquireReleaseInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitWin32KeyedMutexAcquireReleaseInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < Win32KeyedMutexAcquireReleaseInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.acquireCount !== undefined) this.acquireCount = data.acquireCount; + if (data.pAcquireSyncs !== undefined) this.pAcquireSyncs = data.pAcquireSyncs; + if (data.pAcquireKeys !== undefined) this.pAcquireKeys = data.pAcquireKeys; + if (data.pAcquireTimeouts !== undefined) this.pAcquireTimeouts = data.pAcquireTimeouts; + if (data.releaseCount !== undefined) this.releaseCount = data.releaseCount; + if (data.pReleaseSyncs !== undefined) this.pReleaseSyncs = data.pReleaseSyncs; + if (data.pReleaseKeys !== undefined) this.pReleaseKeys = data.pReleaseKeys; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Win32KeyedMutexAcquireReleaseInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get acquireCount(): number { + return this.#view.getUint32(16, LE); + } + + set acquireCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pAcquireSyncs(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAcquireSyncs(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pAcquireKeys(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pAcquireKeys(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pAcquireTimeouts(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pAcquireTimeouts(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get releaseCount(): number { + return this.#view.getUint32(48, LE); + } + + set releaseCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pReleaseSyncs(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pReleaseSyncs(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get pReleaseKeys(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pReleaseKeys(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/Win32KeyedMutexAcquireReleaseInfoNV.ts b/api/struct/Win32KeyedMutexAcquireReleaseInfoNV.ts new file mode 100644 index 0000000..3ad0c60 --- /dev/null +++ b/api/struct/Win32KeyedMutexAcquireReleaseInfoNV.ts @@ -0,0 +1,140 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { DeviceMemory } from "../def.ts"; + +export interface InitWin32KeyedMutexAcquireReleaseInfoNV { + pNext?: AnyPointer; + acquireCount?: number; + pAcquireSyncs?: AnyPointer; + pAcquireKeys?: AnyPointer; + pAcquireTimeoutMilliseconds?: AnyPointer; + releaseCount?: number; + pReleaseSyncs?: AnyPointer; + pReleaseKeys?: AnyPointer; +} + +export class Win32KeyedMutexAcquireReleaseInfoNV implements BaseStruct { + static size = 72; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitWin32KeyedMutexAcquireReleaseInfoNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitWin32KeyedMutexAcquireReleaseInfoNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < Win32KeyedMutexAcquireReleaseInfoNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.acquireCount !== undefined) this.acquireCount = data.acquireCount; + if (data.pAcquireSyncs !== undefined) this.pAcquireSyncs = data.pAcquireSyncs; + if (data.pAcquireKeys !== undefined) this.pAcquireKeys = data.pAcquireKeys; + if (data.pAcquireTimeoutMilliseconds !== undefined) this.pAcquireTimeoutMilliseconds = data.pAcquireTimeoutMilliseconds; + if (data.releaseCount !== undefined) this.releaseCount = data.releaseCount; + if (data.pReleaseSyncs !== undefined) this.pReleaseSyncs = data.pReleaseSyncs; + if (data.pReleaseKeys !== undefined) this.pReleaseKeys = data.pReleaseKeys; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Win32KeyedMutexAcquireReleaseInfoNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get acquireCount(): number { + return this.#view.getUint32(16, LE); + } + + set acquireCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pAcquireSyncs(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAcquireSyncs(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get pAcquireKeys(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set pAcquireKeys(value: AnyPointer) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } + + get pAcquireTimeoutMilliseconds(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pAcquireTimeoutMilliseconds(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get releaseCount(): number { + return this.#view.getUint32(48, LE); + } + + set releaseCount(value: number) { + this.#view.setUint32(48, Number(value), LE); + } + + get pReleaseSyncs(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pReleaseSyncs(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } + + get pReleaseKeys(): Deno.PointerValue { + return pointerFromView(this.#view, 64, LE); + } + + set pReleaseKeys(value: AnyPointer) { + this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/Win32SurfaceCreateInfoKHR.ts b/api/struct/Win32SurfaceCreateInfoKHR.ts new file mode 100644 index 0000000..480f540 --- /dev/null +++ b/api/struct/Win32SurfaceCreateInfoKHR.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { Win32SurfaceCreateFlagsKHR } from "../def.ts"; + +export interface InitWin32SurfaceCreateInfoKHR { + pNext?: AnyPointer; + flags?: Win32SurfaceCreateFlagsKHR; + hinstance?: Deno.PointerValue; + hwnd?: Deno.PointerValue; +} + +export class Win32SurfaceCreateInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitWin32SurfaceCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitWin32SurfaceCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(Win32SurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < Win32SurfaceCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(Win32SurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.hinstance !== undefined) this.hinstance = data.hinstance; + if (data.hwnd !== undefined) this.hwnd = data.hwnd; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Win32SurfaceCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.WIN32_SURFACE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: Win32SurfaceCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get hinstance(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set hinstance(value: Deno.PointerValue) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get hwnd(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set hwnd(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/WriteDescriptorSet.ts b/api/struct/WriteDescriptorSet.ts new file mode 100644 index 0000000..8127f75 --- /dev/null +++ b/api/struct/WriteDescriptorSet.ts @@ -0,0 +1,152 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import {DescriptorImageInfo} from "./DescriptorImageInfo.ts"; +import {DescriptorBufferInfo} from "./DescriptorBufferInfo.ts"; +import { StructureType, DescriptorType } from "../enum.ts"; +import { DescriptorSet, BufferView } from "../def.ts"; + +export interface InitWriteDescriptorSet { + pNext?: AnyPointer; + dstSet?: DescriptorSet; + dstBinding?: number; + dstArrayElement?: number; + descriptorCount?: number; + descriptorType?: DescriptorType; + pImageInfo?: AnyPointer; + pBufferInfo?: AnyPointer; + pTexelBufferView?: AnyPointer; +} + +export class WriteDescriptorSet implements BaseStruct { + static size = 64; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitWriteDescriptorSet); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitWriteDescriptorSet) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(WriteDescriptorSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < WriteDescriptorSet.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(WriteDescriptorSet.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.dstSet !== undefined) this.dstSet = data.dstSet; + if (data.dstBinding !== undefined) this.dstBinding = data.dstBinding; + if (data.dstArrayElement !== undefined) this.dstArrayElement = data.dstArrayElement; + if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; + if (data.descriptorType !== undefined) this.descriptorType = data.descriptorType; + if (data.pImageInfo !== undefined) this.pImageInfo = data.pImageInfo; + if (data.pBufferInfo !== undefined) this.pBufferInfo = data.pBufferInfo; + if (data.pTexelBufferView !== undefined) this.pTexelBufferView = data.pTexelBufferView; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSet.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.WRITE_DESCRIPTOR_SET; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dstSet(): Deno.PointerValue { + return pointerFromView(this.#view, 16, LE); + } + + set dstSet(value: DescriptorSet) { + this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); + } + + get dstBinding(): number { + return this.#view.getUint32(24, LE); + } + + set dstBinding(value: number) { + this.#view.setUint32(24, Number(value), LE); + } + + get dstArrayElement(): number { + return this.#view.getUint32(28, LE); + } + + set dstArrayElement(value: number) { + this.#view.setUint32(28, Number(value), LE); + } + + get descriptorCount(): number { + return this.#view.getUint32(32, LE); + } + + set descriptorCount(value: number) { + this.#view.setUint32(32, Number(value), LE); + } + + get descriptorType(): number { + return this.#view.getUint32(36, LE); + } + + set descriptorType(value: DescriptorType) { + this.#view.setUint32(36, Number(value), LE); + } + + get pImageInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 40, LE); + } + + set pImageInfo(value: AnyPointer) { + this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); + } + + get pBufferInfo(): Deno.PointerValue { + return pointerFromView(this.#view, 48, LE); + } + + set pBufferInfo(value: AnyPointer) { + this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); + } + + get pTexelBufferView(): Deno.PointerValue { + return pointerFromView(this.#view, 56, LE); + } + + set pTexelBufferView(value: AnyPointer) { + this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/WriteDescriptorSetAccelerationStructureKHR.ts b/api/struct/WriteDescriptorSetAccelerationStructureKHR.ts new file mode 100644 index 0000000..915f8d0 --- /dev/null +++ b/api/struct/WriteDescriptorSetAccelerationStructureKHR.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AccelerationStructureKHR } from "../def.ts"; + +export interface InitWriteDescriptorSetAccelerationStructureKHR { + pNext?: AnyPointer; + accelerationStructureCount?: number; + pAccelerationStructures?: AnyPointer; +} + +export class WriteDescriptorSetAccelerationStructureKHR implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitWriteDescriptorSetAccelerationStructureKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitWriteDescriptorSetAccelerationStructureKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < WriteDescriptorSetAccelerationStructureKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.accelerationStructureCount !== undefined) this.accelerationStructureCount = data.accelerationStructureCount; + if (data.pAccelerationStructures !== undefined) this.pAccelerationStructures = data.pAccelerationStructures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSetAccelerationStructureKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get accelerationStructureCount(): number { + return this.#view.getUint32(16, LE); + } + + set accelerationStructureCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pAccelerationStructures(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAccelerationStructures(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/WriteDescriptorSetAccelerationStructureNV.ts b/api/struct/WriteDescriptorSetAccelerationStructureNV.ts new file mode 100644 index 0000000..9961907 --- /dev/null +++ b/api/struct/WriteDescriptorSetAccelerationStructureNV.ts @@ -0,0 +1,90 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { AccelerationStructureNV } from "../def.ts"; + +export interface InitWriteDescriptorSetAccelerationStructureNV { + pNext?: AnyPointer; + accelerationStructureCount?: number; + pAccelerationStructures?: AnyPointer; +} + +export class WriteDescriptorSetAccelerationStructureNV implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitWriteDescriptorSetAccelerationStructureNV); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitWriteDescriptorSetAccelerationStructureNV) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < WriteDescriptorSetAccelerationStructureNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureNV.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.accelerationStructureCount !== undefined) this.accelerationStructureCount = data.accelerationStructureCount; + if (data.pAccelerationStructures !== undefined) this.pAccelerationStructures = data.pAccelerationStructures; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSetAccelerationStructureNV.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get accelerationStructureCount(): number { + return this.#view.getUint32(16, LE); + } + + set accelerationStructureCount(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pAccelerationStructures(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pAccelerationStructures(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/WriteDescriptorSetInlineUniformBlock.ts b/api/struct/WriteDescriptorSetInlineUniformBlock.ts new file mode 100644 index 0000000..c266011 --- /dev/null +++ b/api/struct/WriteDescriptorSetInlineUniformBlock.ts @@ -0,0 +1,89 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; + +export interface InitWriteDescriptorSetInlineUniformBlock { + pNext?: AnyPointer; + dataSize?: number; + pData?: AnyPointer; +} + +export class WriteDescriptorSetInlineUniformBlock implements BaseStruct { + static size = 32; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitWriteDescriptorSetInlineUniformBlock); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitWriteDescriptorSetInlineUniformBlock) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(WriteDescriptorSetInlineUniformBlock.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < WriteDescriptorSetInlineUniformBlock.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(WriteDescriptorSetInlineUniformBlock.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.dataSize !== undefined) this.dataSize = data.dataSize; + if (data.pData !== undefined) this.pData = data.pData; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSetInlineUniformBlock.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get dataSize(): number { + return this.#view.getUint32(16, LE); + } + + set dataSize(value: number) { + this.#view.setUint32(16, Number(value), LE); + } + + get pData(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set pData(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/WriteDescriptorSetInlineUniformBlockEXT.ts b/api/struct/WriteDescriptorSetInlineUniformBlockEXT.ts new file mode 100644 index 0000000..bd18564 --- /dev/null +++ b/api/struct/WriteDescriptorSetInlineUniformBlockEXT.ts @@ -0,0 +1,2 @@ + import { WriteDescriptorSetInlineUniformBlock } from "./WriteDescriptorSetInlineUniformBlock.ts"; + export type WriteDescriptorSetInlineUniformBlockEXT = WriteDescriptorSetInlineUniformBlock; \ No newline at end of file diff --git a/api/struct/XYColorEXT.ts b/api/struct/XYColorEXT.ts new file mode 100644 index 0000000..15032ba --- /dev/null +++ b/api/struct/XYColorEXT.ts @@ -0,0 +1,70 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; + +export interface InitXYColorEXT { + x?: number; + y?: number; +} + +/** Chromaticity coordinate */ +export class XYColorEXT implements BaseStruct { + static size = 8; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitXYColorEXT); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitXYColorEXT) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(XYColorEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < XYColorEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(XYColorEXT.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.x !== undefined) this.x = data.x; + if (data.y !== undefined) this.y = data.y; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, XYColorEXT.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + } + + get x(): number { + return this.#view.getFloat32(0, LE); + } + + set x(value: number) { + this.#view.setFloat32(0, Number(value), LE); + } + + get y(): number { + return this.#view.getFloat32(4, LE); + } + + set y(value: number) { + this.#view.setFloat32(4, Number(value), LE); + } +} \ No newline at end of file diff --git a/api/struct/XcbSurfaceCreateInfoKHR.ts b/api/struct/XcbSurfaceCreateInfoKHR.ts new file mode 100644 index 0000000..a38a0a6 --- /dev/null +++ b/api/struct/XcbSurfaceCreateInfoKHR.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { XcbSurfaceCreateFlagsKHR } from "../def.ts"; + +export interface InitXcbSurfaceCreateInfoKHR { + pNext?: AnyPointer; + flags?: XcbSurfaceCreateFlagsKHR; + connection?: AnyPointer; + window?: Deno.PointerValue; +} + +export class XcbSurfaceCreateInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitXcbSurfaceCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitXcbSurfaceCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(XcbSurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < XcbSurfaceCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(XcbSurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.connection !== undefined) this.connection = data.connection; + if (data.window !== undefined) this.window = data.window; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, XcbSurfaceCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.XCB_SURFACE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: XcbSurfaceCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get connection(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set connection(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get window(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set window(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/XlibSurfaceCreateInfoKHR.ts b/api/struct/XlibSurfaceCreateInfoKHR.ts new file mode 100644 index 0000000..58b72ab --- /dev/null +++ b/api/struct/XlibSurfaceCreateInfoKHR.ts @@ -0,0 +1,100 @@ +// deno-lint-ignore-file no-unused-vars +import { + AnyBuffer, + AnyPointer, + anyBuffer, + anyPointer, + BUFFER, + DATAVIEW, + LE, + BaseStruct, + pointerFromView, + notPointerObject, +} from "../util.ts"; +import { StructureType } from "../enum.ts"; +import { XlibSurfaceCreateFlagsKHR } from "../def.ts"; + +export interface InitXlibSurfaceCreateInfoKHR { + pNext?: AnyPointer; + flags?: XlibSurfaceCreateFlagsKHR; + dpy?: AnyPointer; + window?: Deno.PointerValue; +} + +export class XlibSurfaceCreateInfoKHR implements BaseStruct { + static size = 40; + + #data!: Uint8Array; + #view!: DataView; + + get [BUFFER]() { return this.#data; } + get [DATAVIEW]() { return this.#view; } + + constructor(); + constructor(ptr: Deno.PointerValue); + constructor(init: InitXlibSurfaceCreateInfoKHR); + constructor(data: Uint8Array); + constructor(data?: Deno.PointerValue | Uint8Array | InitXlibSurfaceCreateInfoKHR) { + if (data === undefined || data === null) { + this.#data = new Uint8Array(XlibSurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } else if (data instanceof Uint8Array) { + if (data.byteLength < XlibSurfaceCreateInfoKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer, data.byteOffset); + } else if(notPointerObject(data)) { + this.#data = new Uint8Array(XlibSurfaceCreateInfoKHR.size); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + if (data.pNext !== undefined) this.pNext = data.pNext; + if (data.flags !== undefined) this.flags = data.flags; + if (data.dpy !== undefined) this.dpy = data.dpy; + if (data.window !== undefined) this.window = data.window; + } else { + this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, XlibSurfaceCreateInfoKHR.size)); + this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); + } + this.sType = StructureType.XLIB_SURFACE_CREATE_INFO_KHR; + } + + get sType(): number { + return this.#view.getUint32(0, LE); + } + + set sType(value: StructureType) { + this.#view.setUint32(0, Number(value), LE); + } + + get pNext(): Deno.PointerValue { + return pointerFromView(this.#view, 8, LE); + } + + set pNext(value: AnyPointer) { + this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); + } + + get flags(): number { + return this.#view.getUint32(16, LE); + } + + set flags(value: XlibSurfaceCreateFlagsKHR) { + this.#view.setUint32(16, Number(value), LE); + } + + get dpy(): Deno.PointerValue { + return pointerFromView(this.#view, 24, LE); + } + + set dpy(value: AnyPointer) { + this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); + } + + get window(): Deno.PointerValue { + return pointerFromView(this.#view, 32, LE); + } + + set window(value: Deno.PointerValue) { + this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); + } +} \ No newline at end of file diff --git a/api/struct/common.ts b/api/struct/common.ts new file mode 100644 index 0000000..91eaf42 --- /dev/null +++ b/api/struct/common.ts @@ -0,0 +1,288 @@ +export * from "./BaseOutStructure.ts"; +export * from "./BaseInStructure.ts"; +export * from "./Offset2D.ts"; +export * from "./Offset3D.ts"; +export * from "./Extent2D.ts"; +export * from "./Extent3D.ts"; +export * from "./Viewport.ts"; +export * from "./Rect2D.ts"; +export * from "./ClearRect.ts"; +export * from "./ComponentMapping.ts"; +export * from "./PhysicalDeviceProperties.ts"; +export * from "./ExtensionProperties.ts"; +export * from "./LayerProperties.ts"; +export * from "./ApplicationInfo.ts"; +export * from "./AllocationCallbacks.ts"; +export * from "./DeviceQueueCreateInfo.ts"; +export * from "./DeviceCreateInfo.ts"; +export * from "./InstanceCreateInfo.ts"; +export * from "./QueueFamilyProperties.ts"; +export * from "./PhysicalDeviceMemoryProperties.ts"; +export * from "./MemoryAllocateInfo.ts"; +export * from "./MemoryRequirements.ts"; +export * from "./SparseImageFormatProperties.ts"; +export * from "./SparseImageMemoryRequirements.ts"; +export * from "./MemoryType.ts"; +export * from "./MemoryHeap.ts"; +export * from "./MappedMemoryRange.ts"; +export * from "./FormatProperties.ts"; +export * from "./ImageFormatProperties.ts"; +export * from "./DescriptorBufferInfo.ts"; +export * from "./DescriptorImageInfo.ts"; +export * from "./WriteDescriptorSet.ts"; +export * from "./CopyDescriptorSet.ts"; +export * from "./BufferCreateInfo.ts"; +export * from "./BufferViewCreateInfo.ts"; +export * from "./ImageSubresource.ts"; +export * from "./ImageSubresourceLayers.ts"; +export * from "./ImageSubresourceRange.ts"; +export * from "./MemoryBarrier.ts"; +export * from "./BufferMemoryBarrier.ts"; +export * from "./ImageMemoryBarrier.ts"; +export * from "./ImageCreateInfo.ts"; +export * from "./SubresourceLayout.ts"; +export * from "./ImageViewCreateInfo.ts"; +export * from "./BufferCopy.ts"; +export * from "./SparseMemoryBind.ts"; +export * from "./SparseImageMemoryBind.ts"; +export * from "./SparseBufferMemoryBindInfo.ts"; +export * from "./SparseImageOpaqueMemoryBindInfo.ts"; +export * from "./SparseImageMemoryBindInfo.ts"; +export * from "./BindSparseInfo.ts"; +export * from "./ImageCopy.ts"; +export * from "./ImageBlit.ts"; +export * from "./BufferImageCopy.ts"; +export * from "./ImageResolve.ts"; +export * from "./ShaderModuleCreateInfo.ts"; +export * from "./DescriptorSetLayoutBinding.ts"; +export * from "./DescriptorSetLayoutCreateInfo.ts"; +export * from "./DescriptorPoolSize.ts"; +export * from "./DescriptorPoolCreateInfo.ts"; +export * from "./DescriptorSetAllocateInfo.ts"; +export * from "./SpecializationMapEntry.ts"; +export * from "./SpecializationInfo.ts"; +export * from "./PipelineShaderStageCreateInfo.ts"; +export * from "./ComputePipelineCreateInfo.ts"; +export * from "./VertexInputBindingDescription.ts"; +export * from "./VertexInputAttributeDescription.ts"; +export * from "./PipelineVertexInputStateCreateInfo.ts"; +export * from "./PipelineInputAssemblyStateCreateInfo.ts"; +export * from "./PipelineTessellationStateCreateInfo.ts"; +export * from "./PipelineViewportStateCreateInfo.ts"; +export * from "./PipelineRasterizationStateCreateInfo.ts"; +export * from "./PipelineMultisampleStateCreateInfo.ts"; +export * from "./PipelineColorBlendAttachmentState.ts"; +export * from "./PipelineColorBlendStateCreateInfo.ts"; +export * from "./PipelineDynamicStateCreateInfo.ts"; +export * from "./StencilOpState.ts"; +export * from "./PipelineDepthStencilStateCreateInfo.ts"; +export * from "./GraphicsPipelineCreateInfo.ts"; +export * from "./PipelineCacheCreateInfo.ts"; +export * from "./PipelineCacheHeaderVersionOne.ts"; +export * from "./PushConstantRange.ts"; +export * from "./PipelineLayoutCreateInfo.ts"; +export * from "./SamplerCreateInfo.ts"; +export * from "./CommandPoolCreateInfo.ts"; +export * from "./CommandBufferAllocateInfo.ts"; +export * from "./CommandBufferInheritanceInfo.ts"; +export * from "./CommandBufferBeginInfo.ts"; +export * from "./RenderPassBeginInfo.ts"; +export * from "./ClearDepthStencilValue.ts"; +export * from "./ClearAttachment.ts"; +export * from "./AttachmentDescription.ts"; +export * from "./AttachmentReference.ts"; +export * from "./SubpassDescription.ts"; +export * from "./SubpassDependency.ts"; +export * from "./RenderPassCreateInfo.ts"; +export * from "./EventCreateInfo.ts"; +export * from "./FenceCreateInfo.ts"; +export * from "./PhysicalDeviceFeatures.ts"; +export * from "./PhysicalDeviceSparseProperties.ts"; +export * from "./PhysicalDeviceLimits.ts"; +export * from "./SemaphoreCreateInfo.ts"; +export * from "./QueryPoolCreateInfo.ts"; +export * from "./FramebufferCreateInfo.ts"; +export * from "./DrawIndirectCommand.ts"; +export * from "./DrawIndexedIndirectCommand.ts"; +export * from "./DispatchIndirectCommand.ts"; +export * from "./SubmitInfo.ts"; +export * from "./DevicePrivateDataCreateInfo.ts"; +export * from "./PrivateDataSlotCreateInfo.ts"; +export * from "./PhysicalDevicePrivateDataFeatures.ts"; +export * from "./PhysicalDeviceFeatures2.ts"; +export * from "./PhysicalDeviceProperties2.ts"; +export * from "./FormatProperties2.ts"; +export * from "./ImageFormatProperties2.ts"; +export * from "./PhysicalDeviceImageFormatInfo2.ts"; +export * from "./QueueFamilyProperties2.ts"; +export * from "./PhysicalDeviceMemoryProperties2.ts"; +export * from "./SparseImageFormatProperties2.ts"; +export * from "./PhysicalDeviceSparseImageFormatInfo2.ts"; +export * from "./ConformanceVersion.ts"; +export * from "./PhysicalDeviceDriverProperties.ts"; +export * from "./PhysicalDeviceVariablePointersFeatures.ts"; +export * from "./ExternalMemoryProperties.ts"; +export * from "./PhysicalDeviceExternalImageFormatInfo.ts"; +export * from "./ExternalImageFormatProperties.ts"; +export * from "./PhysicalDeviceExternalBufferInfo.ts"; +export * from "./ExternalBufferProperties.ts"; +export * from "./PhysicalDeviceIDProperties.ts"; +export * from "./ExternalMemoryImageCreateInfo.ts"; +export * from "./ExternalMemoryBufferCreateInfo.ts"; +export * from "./ExportMemoryAllocateInfo.ts"; +export * from "./PhysicalDeviceExternalSemaphoreInfo.ts"; +export * from "./ExternalSemaphoreProperties.ts"; +export * from "./ExportSemaphoreCreateInfo.ts"; +export * from "./PhysicalDeviceExternalFenceInfo.ts"; +export * from "./ExternalFenceProperties.ts"; +export * from "./ExportFenceCreateInfo.ts"; +export * from "./PhysicalDeviceMultiviewFeatures.ts"; +export * from "./PhysicalDeviceMultiviewProperties.ts"; +export * from "./RenderPassMultiviewCreateInfo.ts"; +export * from "./PhysicalDeviceGroupProperties.ts"; +export * from "./MemoryAllocateFlagsInfo.ts"; +export * from "./BindBufferMemoryInfo.ts"; +export * from "./BindBufferMemoryDeviceGroupInfo.ts"; +export * from "./BindImageMemoryInfo.ts"; +export * from "./BindImageMemoryDeviceGroupInfo.ts"; +export * from "./DeviceGroupRenderPassBeginInfo.ts"; +export * from "./DeviceGroupCommandBufferBeginInfo.ts"; +export * from "./DeviceGroupSubmitInfo.ts"; +export * from "./DeviceGroupBindSparseInfo.ts"; +export * from "./DeviceGroupDeviceCreateInfo.ts"; +export * from "./DescriptorUpdateTemplateEntry.ts"; +export * from "./DescriptorUpdateTemplateCreateInfo.ts"; +export * from "./InputAttachmentAspectReference.ts"; +export * from "./RenderPassInputAttachmentAspectCreateInfo.ts"; +export * from "./PhysicalDevice16BitStorageFeatures.ts"; +export * from "./PhysicalDeviceSubgroupProperties.ts"; +export * from "./PhysicalDeviceShaderSubgroupExtendedTypesFeatures.ts"; +export * from "./BufferMemoryRequirementsInfo2.ts"; +export * from "./DeviceBufferMemoryRequirements.ts"; +export * from "./ImageMemoryRequirementsInfo2.ts"; +export * from "./ImageSparseMemoryRequirementsInfo2.ts"; +export * from "./DeviceImageMemoryRequirements.ts"; +export * from "./MemoryRequirements2.ts"; +export * from "./SparseImageMemoryRequirements2.ts"; +export * from "./PhysicalDevicePointClippingProperties.ts"; +export * from "./MemoryDedicatedRequirements.ts"; +export * from "./MemoryDedicatedAllocateInfo.ts"; +export * from "./ImageViewUsageCreateInfo.ts"; +export * from "./PipelineTessellationDomainOriginStateCreateInfo.ts"; +export * from "./SamplerYcbcrConversionInfo.ts"; +export * from "./SamplerYcbcrConversionCreateInfo.ts"; +export * from "./BindImagePlaneMemoryInfo.ts"; +export * from "./ImagePlaneMemoryRequirementsInfo.ts"; +export * from "./PhysicalDeviceSamplerYcbcrConversionFeatures.ts"; +export * from "./SamplerYcbcrConversionImageFormatProperties.ts"; +export * from "./ProtectedSubmitInfo.ts"; +export * from "./PhysicalDeviceProtectedMemoryFeatures.ts"; +export * from "./PhysicalDeviceProtectedMemoryProperties.ts"; +export * from "./DeviceQueueInfo2.ts"; +export * from "./PhysicalDeviceSamplerFilterMinmaxProperties.ts"; +export * from "./SamplerReductionModeCreateInfo.ts"; +export * from "./PhysicalDeviceInlineUniformBlockFeatures.ts"; +export * from "./PhysicalDeviceInlineUniformBlockProperties.ts"; +export * from "./WriteDescriptorSetInlineUniformBlock.ts"; +export * from "./DescriptorPoolInlineUniformBlockCreateInfo.ts"; +export * from "./ImageFormatListCreateInfo.ts"; +export * from "./PhysicalDeviceMaintenance3Properties.ts"; +export * from "./PhysicalDeviceMaintenance4Features.ts"; +export * from "./PhysicalDeviceMaintenance4Properties.ts"; +export * from "./DescriptorSetLayoutSupport.ts"; +export * from "./PhysicalDeviceShaderDrawParametersFeatures.ts"; +export * from "./PhysicalDeviceShaderFloat16Int8Features.ts"; +export * from "./PhysicalDeviceFloatControlsProperties.ts"; +export * from "./PhysicalDeviceHostQueryResetFeatures.ts"; +export * from "./PhysicalDeviceDescriptorIndexingFeatures.ts"; +export * from "./PhysicalDeviceDescriptorIndexingProperties.ts"; +export * from "./DescriptorSetLayoutBindingFlagsCreateInfo.ts"; +export * from "./DescriptorSetVariableDescriptorCountAllocateInfo.ts"; +export * from "./DescriptorSetVariableDescriptorCountLayoutSupport.ts"; +export * from "./AttachmentDescription2.ts"; +export * from "./AttachmentReference2.ts"; +export * from "./SubpassDescription2.ts"; +export * from "./SubpassDependency2.ts"; +export * from "./RenderPassCreateInfo2.ts"; +export * from "./SubpassBeginInfo.ts"; +export * from "./SubpassEndInfo.ts"; +export * from "./PhysicalDeviceTimelineSemaphoreFeatures.ts"; +export * from "./PhysicalDeviceTimelineSemaphoreProperties.ts"; +export * from "./SemaphoreTypeCreateInfo.ts"; +export * from "./TimelineSemaphoreSubmitInfo.ts"; +export * from "./SemaphoreWaitInfo.ts"; +export * from "./SemaphoreSignalInfo.ts"; +export * from "./PhysicalDevice8BitStorageFeatures.ts"; +export * from "./PhysicalDeviceVulkanMemoryModelFeatures.ts"; +export * from "./PhysicalDeviceShaderAtomicInt64Features.ts"; +export * from "./PhysicalDeviceDepthStencilResolveProperties.ts"; +export * from "./SubpassDescriptionDepthStencilResolve.ts"; +export * from "./ImageStencilUsageCreateInfo.ts"; +export * from "./PhysicalDeviceScalarBlockLayoutFeatures.ts"; +export * from "./PhysicalDeviceUniformBufferStandardLayoutFeatures.ts"; +export * from "./PhysicalDeviceBufferDeviceAddressFeatures.ts"; +export * from "./BufferDeviceAddressInfo.ts"; +export * from "./BufferOpaqueCaptureAddressCreateInfo.ts"; +export * from "./PhysicalDeviceImagelessFramebufferFeatures.ts"; +export * from "./FramebufferAttachmentsCreateInfo.ts"; +export * from "./FramebufferAttachmentImageInfo.ts"; +export * from "./RenderPassAttachmentBeginInfo.ts"; +export * from "./PhysicalDeviceTextureCompressionASTCHDRFeatures.ts"; +export * from "./PipelineCreationFeedback.ts"; +export * from "./PipelineCreationFeedbackCreateInfo.ts"; +export * from "./PhysicalDeviceSeparateDepthStencilLayoutsFeatures.ts"; +export * from "./AttachmentReferenceStencilLayout.ts"; +export * from "./AttachmentDescriptionStencilLayout.ts"; +export * from "./PhysicalDeviceShaderDemoteToHelperInvocationFeatures.ts"; +export * from "./PhysicalDeviceTexelBufferAlignmentProperties.ts"; +export * from "./PhysicalDeviceSubgroupSizeControlFeatures.ts"; +export * from "./PhysicalDeviceSubgroupSizeControlProperties.ts"; +export * from "./PipelineShaderStageRequiredSubgroupSizeCreateInfo.ts"; +export * from "./MemoryOpaqueCaptureAddressAllocateInfo.ts"; +export * from "./DeviceMemoryOpaqueCaptureAddressInfo.ts"; +export * from "./PhysicalDevicePipelineCreationCacheControlFeatures.ts"; +export * from "./PhysicalDeviceVulkan11Features.ts"; +export * from "./PhysicalDeviceVulkan11Properties.ts"; +export * from "./PhysicalDeviceVulkan12Features.ts"; +export * from "./PhysicalDeviceVulkan12Properties.ts"; +export * from "./PhysicalDeviceVulkan13Features.ts"; +export * from "./PhysicalDeviceVulkan13Properties.ts"; +export * from "./PhysicalDeviceToolProperties.ts"; +export * from "./PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.ts"; +export * from "./PhysicalDeviceImageRobustnessFeatures.ts"; +export * from "./BufferCopy2.ts"; +export * from "./ImageCopy2.ts"; +export * from "./ImageBlit2.ts"; +export * from "./BufferImageCopy2.ts"; +export * from "./ImageResolve2.ts"; +export * from "./CopyBufferInfo2.ts"; +export * from "./CopyImageInfo2.ts"; +export * from "./BlitImageInfo2.ts"; +export * from "./CopyBufferToImageInfo2.ts"; +export * from "./CopyImageToBufferInfo2.ts"; +export * from "./ResolveImageInfo2.ts"; +export * from "./PhysicalDeviceShaderTerminateInvocationFeatures.ts"; +export * from "./MemoryBarrier2.ts"; +export * from "./ImageMemoryBarrier2.ts"; +export * from "./BufferMemoryBarrier2.ts"; +export * from "./DependencyInfo.ts"; +export * from "./SemaphoreSubmitInfo.ts"; +export * from "./CommandBufferSubmitInfo.ts"; +export * from "./SubmitInfo2.ts"; +export * from "./PhysicalDeviceSynchronization2Features.ts"; +export * from "./PhysicalDeviceShaderIntegerDotProductFeatures.ts"; +export * from "./PhysicalDeviceShaderIntegerDotProductProperties.ts"; +export * from "./FormatProperties3.ts"; +export * from "./PipelineRenderingCreateInfo.ts"; +export * from "./RenderingInfo.ts"; +export * from "./RenderingAttachmentInfo.ts"; +export * from "./PhysicalDeviceDynamicRenderingFeatures.ts"; +export * from "./CommandBufferInheritanceRenderingInfo.ts"; +export * from "./PhysicalDeviceVariablePointerFeatures.ts"; +export * from "./PhysicalDeviceShaderDrawParameterFeatures.ts"; +export * from "./DebugUtilsMessengerCallbackDataEXT.ts"; +export * from "./DebugUtilsMessengerCreateInfoEXT.ts"; +export * from "./SurfaceFormatKHR.ts"; +export * from "./SurfaceCapabilitiesKHR.ts"; +export * from "./SwapchainCreateInfoKHR.ts"; +export * from "./PresentInfoKHR.ts"; \ No newline at end of file diff --git a/api/struct/mod.ts b/api/struct/mod.ts new file mode 100644 index 0000000..b7a91a9 --- /dev/null +++ b/api/struct/mod.ts @@ -0,0 +1,1107 @@ +export * from "./StdVideoH264SpsVuiFlags.ts"; +export * from "./StdVideoH264HrdParameters.ts"; +export * from "./StdVideoH264SequenceParameterSetVui.ts"; +export * from "./StdVideoH264SpsFlags.ts"; +export * from "./StdVideoH264ScalingLists.ts"; +export * from "./StdVideoH264SequenceParameterSet.ts"; +export * from "./StdVideoH264PpsFlags.ts"; +export * from "./StdVideoH264PictureParameterSet.ts"; +export * from "./StdVideoDecodeH264PictureInfoFlags.ts"; +export * from "./StdVideoDecodeH264PictureInfo.ts"; +export * from "./StdVideoDecodeH264ReferenceInfoFlags.ts"; +export * from "./StdVideoDecodeH264ReferenceInfo.ts"; +export * from "./StdVideoEncodeH264WeightTableFlags.ts"; +export * from "./StdVideoEncodeH264WeightTable.ts"; +export * from "./StdVideoEncodeH264SliceHeaderFlags.ts"; +export * from "./StdVideoEncodeH264PictureInfoFlags.ts"; +export * from "./StdVideoEncodeH264ReferenceInfoFlags.ts"; +export * from "./StdVideoEncodeH264RefMgmtFlags.ts"; +export * from "./StdVideoEncodeH264RefListModEntry.ts"; +export * from "./StdVideoEncodeH264RefPicMarkingEntry.ts"; +export * from "./StdVideoEncodeH264RefMemMgmtCtrlOperations.ts"; +export * from "./StdVideoEncodeH264PictureInfo.ts"; +export * from "./StdVideoEncodeH264ReferenceInfo.ts"; +export * from "./StdVideoEncodeH264SliceHeader.ts"; +export * from "./StdVideoH265ProfileTierLevelFlags.ts"; +export * from "./StdVideoH265ProfileTierLevel.ts"; +export * from "./StdVideoH265DecPicBufMgr.ts"; +export * from "./StdVideoH265SubLayerHrdParameters.ts"; +export * from "./StdVideoH265HrdFlags.ts"; +export * from "./StdVideoH265HrdParameters.ts"; +export * from "./StdVideoH265VpsFlags.ts"; +export * from "./StdVideoH265VideoParameterSet.ts"; +export * from "./StdVideoH265ScalingLists.ts"; +export * from "./StdVideoH265ShortTermRefPicSetFlags.ts"; +export * from "./StdVideoH265ShortTermRefPicSet.ts"; +export * from "./StdVideoH265LongTermRefPicsSps.ts"; +export * from "./StdVideoH265SpsVuiFlags.ts"; +export * from "./StdVideoH265SequenceParameterSetVui.ts"; +export * from "./StdVideoH265PredictorPaletteEntries.ts"; +export * from "./StdVideoH265SpsFlags.ts"; +export * from "./StdVideoH265SequenceParameterSet.ts"; +export * from "./StdVideoH265PpsFlags.ts"; +export * from "./StdVideoH265PictureParameterSet.ts"; +export * from "./StdVideoDecodeH265PictureInfoFlags.ts"; +export * from "./StdVideoDecodeH265PictureInfo.ts"; +export * from "./StdVideoDecodeH265ReferenceInfoFlags.ts"; +export * from "./StdVideoDecodeH265ReferenceInfo.ts"; +export * from "./StdVideoEncodeH265WeightTableFlags.ts"; +export * from "./StdVideoEncodeH265WeightTable.ts"; +export * from "./StdVideoEncodeH265SliceSegmentLongTermRefPics.ts"; +export * from "./StdVideoEncodeH265SliceSegmentHeaderFlags.ts"; +export * from "./StdVideoEncodeH265SliceSegmentHeader.ts"; +export * from "./StdVideoEncodeH265ReferenceModificationFlags.ts"; +export * from "./StdVideoEncodeH265ReferenceModifications.ts"; +export * from "./StdVideoEncodeH265PictureInfoFlags.ts"; +export * from "./StdVideoEncodeH265PictureInfo.ts"; +export * from "./StdVideoEncodeH265ReferenceInfoFlags.ts"; +export * from "./StdVideoEncodeH265ReferenceInfo.ts"; +export * from "./BaseOutStructure.ts"; +export * from "./BaseInStructure.ts"; +export * from "./Offset2D.ts"; +export * from "./Offset3D.ts"; +export * from "./Extent2D.ts"; +export * from "./Extent3D.ts"; +export * from "./Viewport.ts"; +export * from "./Rect2D.ts"; +export * from "./ClearRect.ts"; +export * from "./ComponentMapping.ts"; +export * from "./PhysicalDeviceProperties.ts"; +export * from "./ExtensionProperties.ts"; +export * from "./LayerProperties.ts"; +export * from "./ApplicationInfo.ts"; +export * from "./AllocationCallbacks.ts"; +export * from "./DeviceQueueCreateInfo.ts"; +export * from "./DeviceCreateInfo.ts"; +export * from "./InstanceCreateInfo.ts"; +export * from "./QueueFamilyProperties.ts"; +export * from "./PhysicalDeviceMemoryProperties.ts"; +export * from "./MemoryAllocateInfo.ts"; +export * from "./MemoryRequirements.ts"; +export * from "./SparseImageFormatProperties.ts"; +export * from "./SparseImageMemoryRequirements.ts"; +export * from "./MemoryType.ts"; +export * from "./MemoryHeap.ts"; +export * from "./MappedMemoryRange.ts"; +export * from "./FormatProperties.ts"; +export * from "./ImageFormatProperties.ts"; +export * from "./DescriptorBufferInfo.ts"; +export * from "./DescriptorImageInfo.ts"; +export * from "./WriteDescriptorSet.ts"; +export * from "./CopyDescriptorSet.ts"; +export * from "./BufferCreateInfo.ts"; +export * from "./BufferViewCreateInfo.ts"; +export * from "./ImageSubresource.ts"; +export * from "./ImageSubresourceLayers.ts"; +export * from "./ImageSubresourceRange.ts"; +export * from "./MemoryBarrier.ts"; +export * from "./BufferMemoryBarrier.ts"; +export * from "./ImageMemoryBarrier.ts"; +export * from "./ImageCreateInfo.ts"; +export * from "./SubresourceLayout.ts"; +export * from "./ImageViewCreateInfo.ts"; +export * from "./BufferCopy.ts"; +export * from "./SparseMemoryBind.ts"; +export * from "./SparseImageMemoryBind.ts"; +export * from "./SparseBufferMemoryBindInfo.ts"; +export * from "./SparseImageOpaqueMemoryBindInfo.ts"; +export * from "./SparseImageMemoryBindInfo.ts"; +export * from "./BindSparseInfo.ts"; +export * from "./ImageCopy.ts"; +export * from "./ImageBlit.ts"; +export * from "./BufferImageCopy.ts"; +export * from "./CopyMemoryIndirectCommandNV.ts"; +export * from "./CopyMemoryToImageIndirectCommandNV.ts"; +export * from "./ImageResolve.ts"; +export * from "./ShaderModuleCreateInfo.ts"; +export * from "./DescriptorSetLayoutBinding.ts"; +export * from "./DescriptorSetLayoutCreateInfo.ts"; +export * from "./DescriptorPoolSize.ts"; +export * from "./DescriptorPoolCreateInfo.ts"; +export * from "./DescriptorSetAllocateInfo.ts"; +export * from "./SpecializationMapEntry.ts"; +export * from "./SpecializationInfo.ts"; +export * from "./PipelineShaderStageCreateInfo.ts"; +export * from "./ComputePipelineCreateInfo.ts"; +export * from "./VertexInputBindingDescription.ts"; +export * from "./VertexInputAttributeDescription.ts"; +export * from "./PipelineVertexInputStateCreateInfo.ts"; +export * from "./PipelineInputAssemblyStateCreateInfo.ts"; +export * from "./PipelineTessellationStateCreateInfo.ts"; +export * from "./PipelineViewportStateCreateInfo.ts"; +export * from "./PipelineRasterizationStateCreateInfo.ts"; +export * from "./PipelineMultisampleStateCreateInfo.ts"; +export * from "./PipelineColorBlendAttachmentState.ts"; +export * from "./PipelineColorBlendStateCreateInfo.ts"; +export * from "./PipelineDynamicStateCreateInfo.ts"; +export * from "./StencilOpState.ts"; +export * from "./PipelineDepthStencilStateCreateInfo.ts"; +export * from "./GraphicsPipelineCreateInfo.ts"; +export * from "./PipelineCacheCreateInfo.ts"; +export * from "./PipelineCacheHeaderVersionOne.ts"; +export * from "./PushConstantRange.ts"; +export * from "./PipelineLayoutCreateInfo.ts"; +export * from "./SamplerCreateInfo.ts"; +export * from "./CommandPoolCreateInfo.ts"; +export * from "./CommandBufferAllocateInfo.ts"; +export * from "./CommandBufferInheritanceInfo.ts"; +export * from "./CommandBufferBeginInfo.ts"; +export * from "./RenderPassBeginInfo.ts"; +export * from "./ClearDepthStencilValue.ts"; +export * from "./ClearAttachment.ts"; +export * from "./AttachmentDescription.ts"; +export * from "./AttachmentReference.ts"; +export * from "./SubpassDescription.ts"; +export * from "./SubpassDependency.ts"; +export * from "./RenderPassCreateInfo.ts"; +export * from "./EventCreateInfo.ts"; +export * from "./FenceCreateInfo.ts"; +export * from "./PhysicalDeviceFeatures.ts"; +export * from "./PhysicalDeviceSparseProperties.ts"; +export * from "./PhysicalDeviceLimits.ts"; +export * from "./SemaphoreCreateInfo.ts"; +export * from "./QueryPoolCreateInfo.ts"; +export * from "./FramebufferCreateInfo.ts"; +export * from "./DrawIndirectCommand.ts"; +export * from "./DrawIndexedIndirectCommand.ts"; +export * from "./DispatchIndirectCommand.ts"; +export * from "./MultiDrawInfoEXT.ts"; +export * from "./MultiDrawIndexedInfoEXT.ts"; +export * from "./SubmitInfo.ts"; +export * from "./DisplayPropertiesKHR.ts"; +export * from "./DisplayPlanePropertiesKHR.ts"; +export * from "./DisplayModeParametersKHR.ts"; +export * from "./DisplayModePropertiesKHR.ts"; +export * from "./DisplayModeCreateInfoKHR.ts"; +export * from "./DisplayPlaneCapabilitiesKHR.ts"; +export * from "./DisplaySurfaceCreateInfoKHR.ts"; +export * from "./DisplayPresentInfoKHR.ts"; +export * from "./SurfaceCapabilitiesKHR.ts"; +export * from "./AndroidSurfaceCreateInfoKHR.ts"; +export * from "./ViSurfaceCreateInfoNN.ts"; +export * from "./WaylandSurfaceCreateInfoKHR.ts"; +export * from "./Win32SurfaceCreateInfoKHR.ts"; +export * from "./XlibSurfaceCreateInfoKHR.ts"; +export * from "./XcbSurfaceCreateInfoKHR.ts"; +export * from "./DirectFBSurfaceCreateInfoEXT.ts"; +export * from "./ImagePipeSurfaceCreateInfoFUCHSIA.ts"; +export * from "./StreamDescriptorSurfaceCreateInfoGGP.ts"; +export * from "./ScreenSurfaceCreateInfoQNX.ts"; +export * from "./SurfaceFormatKHR.ts"; +export * from "./SwapchainCreateInfoKHR.ts"; +export * from "./PresentInfoKHR.ts"; +export * from "./DebugReportCallbackCreateInfoEXT.ts"; +export * from "./ValidationFlagsEXT.ts"; +export * from "./ValidationFeaturesEXT.ts"; +export * from "./PipelineRasterizationStateRasterizationOrderAMD.ts"; +export * from "./DebugMarkerObjectNameInfoEXT.ts"; +export * from "./DebugMarkerObjectTagInfoEXT.ts"; +export * from "./DebugMarkerMarkerInfoEXT.ts"; +export * from "./DedicatedAllocationImageCreateInfoNV.ts"; +export * from "./DedicatedAllocationBufferCreateInfoNV.ts"; +export * from "./DedicatedAllocationMemoryAllocateInfoNV.ts"; +export * from "./ExternalImageFormatPropertiesNV.ts"; +export * from "./ExternalMemoryImageCreateInfoNV.ts"; +export * from "./ExportMemoryAllocateInfoNV.ts"; +export * from "./ImportMemoryWin32HandleInfoNV.ts"; +export * from "./ExportMemoryWin32HandleInfoNV.ts"; +export * from "./Win32KeyedMutexAcquireReleaseInfoNV.ts"; +export * from "./PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.ts"; +export * from "./DevicePrivateDataCreateInfo.ts"; +export * from "./PrivateDataSlotCreateInfo.ts"; +export * from "./PhysicalDevicePrivateDataFeatures.ts"; +export * from "./PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.ts"; +export * from "./PhysicalDeviceMultiDrawPropertiesEXT.ts"; +export * from "./GraphicsShaderGroupCreateInfoNV.ts"; +export * from "./GraphicsPipelineShaderGroupsCreateInfoNV.ts"; +export * from "./BindShaderGroupIndirectCommandNV.ts"; +export * from "./BindIndexBufferIndirectCommandNV.ts"; +export * from "./BindVertexBufferIndirectCommandNV.ts"; +export * from "./SetStateFlagsIndirectCommandNV.ts"; +export * from "./IndirectCommandsStreamNV.ts"; +export * from "./IndirectCommandsLayoutTokenNV.ts"; +export * from "./IndirectCommandsLayoutCreateInfoNV.ts"; +export * from "./GeneratedCommandsInfoNV.ts"; +export * from "./GeneratedCommandsMemoryRequirementsInfoNV.ts"; +export * from "./PhysicalDeviceFeatures2.ts"; +export * from "./PhysicalDeviceProperties2.ts"; +export * from "./FormatProperties2.ts"; +export * from "./ImageFormatProperties2.ts"; +export * from "./PhysicalDeviceImageFormatInfo2.ts"; +export * from "./QueueFamilyProperties2.ts"; +export * from "./PhysicalDeviceMemoryProperties2.ts"; +export * from "./SparseImageFormatProperties2.ts"; +export * from "./PhysicalDeviceSparseImageFormatInfo2.ts"; +export * from "./PhysicalDevicePushDescriptorPropertiesKHR.ts"; +export * from "./ConformanceVersion.ts"; +export * from "./PhysicalDeviceDriverProperties.ts"; +export * from "./PresentRegionsKHR.ts"; +export * from "./PresentRegionKHR.ts"; +export * from "./RectLayerKHR.ts"; +export * from "./PhysicalDeviceVariablePointersFeatures.ts"; +export * from "./ExternalMemoryProperties.ts"; +export * from "./PhysicalDeviceExternalImageFormatInfo.ts"; +export * from "./ExternalImageFormatProperties.ts"; +export * from "./PhysicalDeviceExternalBufferInfo.ts"; +export * from "./ExternalBufferProperties.ts"; +export * from "./PhysicalDeviceIDProperties.ts"; +export * from "./ExternalMemoryImageCreateInfo.ts"; +export * from "./ExternalMemoryBufferCreateInfo.ts"; +export * from "./ExportMemoryAllocateInfo.ts"; +export * from "./ImportMemoryWin32HandleInfoKHR.ts"; +export * from "./ExportMemoryWin32HandleInfoKHR.ts"; +export * from "./ImportMemoryZirconHandleInfoFUCHSIA.ts"; +export * from "./MemoryZirconHandlePropertiesFUCHSIA.ts"; +export * from "./MemoryGetZirconHandleInfoFUCHSIA.ts"; +export * from "./MemoryWin32HandlePropertiesKHR.ts"; +export * from "./MemoryGetWin32HandleInfoKHR.ts"; +export * from "./ImportMemoryFdInfoKHR.ts"; +export * from "./MemoryFdPropertiesKHR.ts"; +export * from "./MemoryGetFdInfoKHR.ts"; +export * from "./Win32KeyedMutexAcquireReleaseInfoKHR.ts"; +export * from "./PhysicalDeviceExternalSemaphoreInfo.ts"; +export * from "./ExternalSemaphoreProperties.ts"; +export * from "./ExportSemaphoreCreateInfo.ts"; +export * from "./ImportSemaphoreWin32HandleInfoKHR.ts"; +export * from "./ExportSemaphoreWin32HandleInfoKHR.ts"; +export * from "./D3D12FenceSubmitInfoKHR.ts"; +export * from "./SemaphoreGetWin32HandleInfoKHR.ts"; +export * from "./ImportSemaphoreFdInfoKHR.ts"; +export * from "./SemaphoreGetFdInfoKHR.ts"; +export * from "./ImportSemaphoreZirconHandleInfoFUCHSIA.ts"; +export * from "./SemaphoreGetZirconHandleInfoFUCHSIA.ts"; +export * from "./PhysicalDeviceExternalFenceInfo.ts"; +export * from "./ExternalFenceProperties.ts"; +export * from "./ExportFenceCreateInfo.ts"; +export * from "./ImportFenceWin32HandleInfoKHR.ts"; +export * from "./ExportFenceWin32HandleInfoKHR.ts"; +export * from "./FenceGetWin32HandleInfoKHR.ts"; +export * from "./ImportFenceFdInfoKHR.ts"; +export * from "./FenceGetFdInfoKHR.ts"; +export * from "./PhysicalDeviceMultiviewFeatures.ts"; +export * from "./PhysicalDeviceMultiviewProperties.ts"; +export * from "./RenderPassMultiviewCreateInfo.ts"; +export * from "./SurfaceCapabilities2EXT.ts"; +export * from "./DisplayPowerInfoEXT.ts"; +export * from "./DeviceEventInfoEXT.ts"; +export * from "./DisplayEventInfoEXT.ts"; +export * from "./SwapchainCounterCreateInfoEXT.ts"; +export * from "./PhysicalDeviceGroupProperties.ts"; +export * from "./MemoryAllocateFlagsInfo.ts"; +export * from "./BindBufferMemoryInfo.ts"; +export * from "./BindBufferMemoryDeviceGroupInfo.ts"; +export * from "./BindImageMemoryInfo.ts"; +export * from "./BindImageMemoryDeviceGroupInfo.ts"; +export * from "./DeviceGroupRenderPassBeginInfo.ts"; +export * from "./DeviceGroupCommandBufferBeginInfo.ts"; +export * from "./DeviceGroupSubmitInfo.ts"; +export * from "./DeviceGroupBindSparseInfo.ts"; +export * from "./DeviceGroupPresentCapabilitiesKHR.ts"; +export * from "./ImageSwapchainCreateInfoKHR.ts"; +export * from "./BindImageMemorySwapchainInfoKHR.ts"; +export * from "./AcquireNextImageInfoKHR.ts"; +export * from "./DeviceGroupPresentInfoKHR.ts"; +export * from "./DeviceGroupDeviceCreateInfo.ts"; +export * from "./DeviceGroupSwapchainCreateInfoKHR.ts"; +export * from "./DescriptorUpdateTemplateEntry.ts"; +export * from "./DescriptorUpdateTemplateCreateInfo.ts"; +export * from "./XYColorEXT.ts"; +export * from "./PhysicalDevicePresentIdFeaturesKHR.ts"; +export * from "./PresentIdKHR.ts"; +export * from "./PhysicalDevicePresentWaitFeaturesKHR.ts"; +export * from "./HdrMetadataEXT.ts"; +export * from "./DisplayNativeHdrSurfaceCapabilitiesAMD.ts"; +export * from "./SwapchainDisplayNativeHdrCreateInfoAMD.ts"; +export * from "./RefreshCycleDurationGOOGLE.ts"; +export * from "./PastPresentationTimingGOOGLE.ts"; +export * from "./PresentTimesInfoGOOGLE.ts"; +export * from "./PresentTimeGOOGLE.ts"; +export * from "./IOSSurfaceCreateInfoMVK.ts"; +export * from "./MacOSSurfaceCreateInfoMVK.ts"; +export * from "./MetalSurfaceCreateInfoEXT.ts"; +export * from "./ViewportWScalingNV.ts"; +export * from "./PipelineViewportWScalingStateCreateInfoNV.ts"; +export * from "./ViewportSwizzleNV.ts"; +export * from "./PipelineViewportSwizzleStateCreateInfoNV.ts"; +export * from "./PhysicalDeviceDiscardRectanglePropertiesEXT.ts"; +export * from "./PipelineDiscardRectangleStateCreateInfoEXT.ts"; +export * from "./PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.ts"; +export * from "./InputAttachmentAspectReference.ts"; +export * from "./RenderPassInputAttachmentAspectCreateInfo.ts"; +export * from "./PhysicalDeviceSurfaceInfo2KHR.ts"; +export * from "./SurfaceCapabilities2KHR.ts"; +export * from "./SurfaceFormat2KHR.ts"; +export * from "./DisplayProperties2KHR.ts"; +export * from "./DisplayPlaneProperties2KHR.ts"; +export * from "./DisplayModeProperties2KHR.ts"; +export * from "./DisplayPlaneInfo2KHR.ts"; +export * from "./DisplayPlaneCapabilities2KHR.ts"; +export * from "./SharedPresentSurfaceCapabilitiesKHR.ts"; +export * from "./PhysicalDevice16BitStorageFeatures.ts"; +export * from "./PhysicalDeviceSubgroupProperties.ts"; +export * from "./PhysicalDeviceShaderSubgroupExtendedTypesFeatures.ts"; +export * from "./BufferMemoryRequirementsInfo2.ts"; +export * from "./DeviceBufferMemoryRequirements.ts"; +export * from "./ImageMemoryRequirementsInfo2.ts"; +export * from "./ImageSparseMemoryRequirementsInfo2.ts"; +export * from "./DeviceImageMemoryRequirements.ts"; +export * from "./MemoryRequirements2.ts"; +export * from "./SparseImageMemoryRequirements2.ts"; +export * from "./PhysicalDevicePointClippingProperties.ts"; +export * from "./MemoryDedicatedRequirements.ts"; +export * from "./MemoryDedicatedAllocateInfo.ts"; +export * from "./ImageViewUsageCreateInfo.ts"; +export * from "./PipelineTessellationDomainOriginStateCreateInfo.ts"; +export * from "./SamplerYcbcrConversionInfo.ts"; +export * from "./SamplerYcbcrConversionCreateInfo.ts"; +export * from "./BindImagePlaneMemoryInfo.ts"; +export * from "./ImagePlaneMemoryRequirementsInfo.ts"; +export * from "./PhysicalDeviceSamplerYcbcrConversionFeatures.ts"; +export * from "./SamplerYcbcrConversionImageFormatProperties.ts"; +export * from "./TextureLODGatherFormatPropertiesAMD.ts"; +export * from "./ConditionalRenderingBeginInfoEXT.ts"; +export * from "./ProtectedSubmitInfo.ts"; +export * from "./PhysicalDeviceProtectedMemoryFeatures.ts"; +export * from "./PhysicalDeviceProtectedMemoryProperties.ts"; +export * from "./DeviceQueueInfo2.ts"; +export * from "./PipelineCoverageToColorStateCreateInfoNV.ts"; +export * from "./PhysicalDeviceSamplerFilterMinmaxProperties.ts"; +export * from "./SampleLocationEXT.ts"; +export * from "./SampleLocationsInfoEXT.ts"; +export * from "./AttachmentSampleLocationsEXT.ts"; +export * from "./SubpassSampleLocationsEXT.ts"; +export * from "./RenderPassSampleLocationsBeginInfoEXT.ts"; +export * from "./PipelineSampleLocationsStateCreateInfoEXT.ts"; +export * from "./PhysicalDeviceSampleLocationsPropertiesEXT.ts"; +export * from "./MultisamplePropertiesEXT.ts"; +export * from "./SamplerReductionModeCreateInfo.ts"; +export * from "./PhysicalDeviceBlendOperationAdvancedFeaturesEXT.ts"; +export * from "./PhysicalDeviceMultiDrawFeaturesEXT.ts"; +export * from "./PhysicalDeviceBlendOperationAdvancedPropertiesEXT.ts"; +export * from "./PipelineColorBlendAdvancedStateCreateInfoEXT.ts"; +export * from "./PhysicalDeviceInlineUniformBlockFeatures.ts"; +export * from "./PhysicalDeviceInlineUniformBlockProperties.ts"; +export * from "./WriteDescriptorSetInlineUniformBlock.ts"; +export * from "./DescriptorPoolInlineUniformBlockCreateInfo.ts"; +export * from "./PipelineCoverageModulationStateCreateInfoNV.ts"; +export * from "./ImageFormatListCreateInfo.ts"; +export * from "./ValidationCacheCreateInfoEXT.ts"; +export * from "./ShaderModuleValidationCacheCreateInfoEXT.ts"; +export * from "./PhysicalDeviceMaintenance3Properties.ts"; +export * from "./PhysicalDeviceMaintenance4Features.ts"; +export * from "./PhysicalDeviceMaintenance4Properties.ts"; +export * from "./DescriptorSetLayoutSupport.ts"; +export * from "./PhysicalDeviceShaderDrawParametersFeatures.ts"; +export * from "./PhysicalDeviceShaderFloat16Int8Features.ts"; +export * from "./PhysicalDeviceFloatControlsProperties.ts"; +export * from "./PhysicalDeviceHostQueryResetFeatures.ts"; +export * from "./NativeBufferUsage2ANDROID.ts"; +export * from "./NativeBufferANDROID.ts"; +export * from "./SwapchainImageCreateInfoANDROID.ts"; +export * from "./PhysicalDevicePresentationPropertiesANDROID.ts"; +export * from "./ShaderResourceUsageAMD.ts"; +export * from "./ShaderStatisticsInfoAMD.ts"; +export * from "./DeviceQueueGlobalPriorityCreateInfoKHR.ts"; +export * from "./PhysicalDeviceGlobalPriorityQueryFeaturesKHR.ts"; +export * from "./QueueFamilyGlobalPriorityPropertiesKHR.ts"; +export * from "./DebugUtilsObjectNameInfoEXT.ts"; +export * from "./DebugUtilsObjectTagInfoEXT.ts"; +export * from "./DebugUtilsLabelEXT.ts"; +export * from "./DebugUtilsMessengerCreateInfoEXT.ts"; +export * from "./DebugUtilsMessengerCallbackDataEXT.ts"; +export * from "./PhysicalDeviceDeviceMemoryReportFeaturesEXT.ts"; +export * from "./DeviceDeviceMemoryReportCreateInfoEXT.ts"; +export * from "./DeviceMemoryReportCallbackDataEXT.ts"; +export * from "./ImportMemoryHostPointerInfoEXT.ts"; +export * from "./MemoryHostPointerPropertiesEXT.ts"; +export * from "./PhysicalDeviceExternalMemoryHostPropertiesEXT.ts"; +export * from "./PhysicalDeviceConservativeRasterizationPropertiesEXT.ts"; +export * from "./CalibratedTimestampInfoEXT.ts"; +export * from "./PhysicalDeviceShaderCorePropertiesAMD.ts"; +export * from "./PhysicalDeviceShaderCoreProperties2AMD.ts"; +export * from "./PipelineRasterizationConservativeStateCreateInfoEXT.ts"; +export * from "./PhysicalDeviceDescriptorIndexingFeatures.ts"; +export * from "./PhysicalDeviceDescriptorIndexingProperties.ts"; +export * from "./DescriptorSetLayoutBindingFlagsCreateInfo.ts"; +export * from "./DescriptorSetVariableDescriptorCountAllocateInfo.ts"; +export * from "./DescriptorSetVariableDescriptorCountLayoutSupport.ts"; +export * from "./AttachmentDescription2.ts"; +export * from "./AttachmentReference2.ts"; +export * from "./SubpassDescription2.ts"; +export * from "./SubpassDependency2.ts"; +export * from "./RenderPassCreateInfo2.ts"; +export * from "./SubpassBeginInfo.ts"; +export * from "./SubpassEndInfo.ts"; +export * from "./PhysicalDeviceTimelineSemaphoreFeatures.ts"; +export * from "./PhysicalDeviceTimelineSemaphoreProperties.ts"; +export * from "./SemaphoreTypeCreateInfo.ts"; +export * from "./TimelineSemaphoreSubmitInfo.ts"; +export * from "./SemaphoreWaitInfo.ts"; +export * from "./SemaphoreSignalInfo.ts"; +export * from "./VertexInputBindingDivisorDescriptionEXT.ts"; +export * from "./PipelineVertexInputDivisorStateCreateInfoEXT.ts"; +export * from "./PhysicalDeviceVertexAttributeDivisorPropertiesEXT.ts"; +export * from "./PhysicalDevicePCIBusInfoPropertiesEXT.ts"; +export * from "./ImportAndroidHardwareBufferInfoANDROID.ts"; +export * from "./AndroidHardwareBufferUsageANDROID.ts"; +export * from "./AndroidHardwareBufferPropertiesANDROID.ts"; +export * from "./MemoryGetAndroidHardwareBufferInfoANDROID.ts"; +export * from "./AndroidHardwareBufferFormatPropertiesANDROID.ts"; +export * from "./CommandBufferInheritanceConditionalRenderingInfoEXT.ts"; +export * from "./ExternalFormatANDROID.ts"; +export * from "./PhysicalDevice8BitStorageFeatures.ts"; +export * from "./PhysicalDeviceConditionalRenderingFeaturesEXT.ts"; +export * from "./PhysicalDeviceVulkanMemoryModelFeatures.ts"; +export * from "./PhysicalDeviceShaderAtomicInt64Features.ts"; +export * from "./PhysicalDeviceShaderAtomicFloatFeaturesEXT.ts"; +export * from "./PhysicalDeviceShaderAtomicFloat2FeaturesEXT.ts"; +export * from "./PhysicalDeviceVertexAttributeDivisorFeaturesEXT.ts"; +export * from "./QueueFamilyCheckpointPropertiesNV.ts"; +export * from "./CheckpointDataNV.ts"; +export * from "./PhysicalDeviceDepthStencilResolveProperties.ts"; +export * from "./SubpassDescriptionDepthStencilResolve.ts"; +export * from "./ImageViewASTCDecodeModeEXT.ts"; +export * from "./PhysicalDeviceASTCDecodeFeaturesEXT.ts"; +export * from "./PhysicalDeviceTransformFeedbackFeaturesEXT.ts"; +export * from "./PhysicalDeviceTransformFeedbackPropertiesEXT.ts"; +export * from "./PipelineRasterizationStateStreamCreateInfoEXT.ts"; +export * from "./PhysicalDeviceRepresentativeFragmentTestFeaturesNV.ts"; +export * from "./PipelineRepresentativeFragmentTestStateCreateInfoNV.ts"; +export * from "./PhysicalDeviceExclusiveScissorFeaturesNV.ts"; +export * from "./PipelineViewportExclusiveScissorStateCreateInfoNV.ts"; +export * from "./PhysicalDeviceCornerSampledImageFeaturesNV.ts"; +export * from "./PhysicalDeviceComputeShaderDerivativesFeaturesNV.ts"; +export * from "./PhysicalDeviceShaderImageFootprintFeaturesNV.ts"; +export * from "./PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.ts"; +export * from "./PhysicalDeviceCopyMemoryIndirectFeaturesNV.ts"; +export * from "./PhysicalDeviceCopyMemoryIndirectPropertiesNV.ts"; +export * from "./PhysicalDeviceMemoryDecompressionFeaturesNV.ts"; +export * from "./PhysicalDeviceMemoryDecompressionPropertiesNV.ts"; +export * from "./ShadingRatePaletteNV.ts"; +export * from "./PipelineViewportShadingRateImageStateCreateInfoNV.ts"; +export * from "./PhysicalDeviceShadingRateImageFeaturesNV.ts"; +export * from "./PhysicalDeviceShadingRateImagePropertiesNV.ts"; +export * from "./PhysicalDeviceInvocationMaskFeaturesHUAWEI.ts"; +export * from "./CoarseSampleLocationNV.ts"; +export * from "./CoarseSampleOrderCustomNV.ts"; +export * from "./PipelineViewportCoarseSampleOrderStateCreateInfoNV.ts"; +export * from "./PhysicalDeviceMeshShaderFeaturesNV.ts"; +export * from "./PhysicalDeviceMeshShaderPropertiesNV.ts"; +export * from "./DrawMeshTasksIndirectCommandNV.ts"; +export * from "./PhysicalDeviceMeshShaderFeaturesEXT.ts"; +export * from "./PhysicalDeviceMeshShaderPropertiesEXT.ts"; +export * from "./DrawMeshTasksIndirectCommandEXT.ts"; +export * from "./RayTracingShaderGroupCreateInfoNV.ts"; +export * from "./RayTracingShaderGroupCreateInfoKHR.ts"; +export * from "./RayTracingPipelineCreateInfoNV.ts"; +export * from "./RayTracingPipelineCreateInfoKHR.ts"; +export * from "./GeometryTrianglesNV.ts"; +export * from "./GeometryAABBNV.ts"; +export * from "./GeometryDataNV.ts"; +export * from "./GeometryNV.ts"; +export * from "./AccelerationStructureInfoNV.ts"; +export * from "./AccelerationStructureCreateInfoNV.ts"; +export * from "./BindAccelerationStructureMemoryInfoNV.ts"; +export * from "./WriteDescriptorSetAccelerationStructureKHR.ts"; +export * from "./WriteDescriptorSetAccelerationStructureNV.ts"; +export * from "./AccelerationStructureMemoryRequirementsInfoNV.ts"; +export * from "./PhysicalDeviceAccelerationStructureFeaturesKHR.ts"; +export * from "./PhysicalDeviceRayTracingPipelineFeaturesKHR.ts"; +export * from "./PhysicalDeviceRayQueryFeaturesKHR.ts"; +export * from "./PhysicalDeviceAccelerationStructurePropertiesKHR.ts"; +export * from "./PhysicalDeviceRayTracingPipelinePropertiesKHR.ts"; +export * from "./PhysicalDeviceRayTracingPropertiesNV.ts"; +export * from "./StridedDeviceAddressRegionKHR.ts"; +export * from "./TraceRaysIndirectCommandKHR.ts"; +export * from "./TraceRaysIndirectCommand2KHR.ts"; +export * from "./PhysicalDeviceRayTracingMaintenance1FeaturesKHR.ts"; +export * from "./DrmFormatModifierPropertiesListEXT.ts"; +export * from "./DrmFormatModifierPropertiesEXT.ts"; +export * from "./PhysicalDeviceImageDrmFormatModifierInfoEXT.ts"; +export * from "./ImageDrmFormatModifierListCreateInfoEXT.ts"; +export * from "./ImageDrmFormatModifierExplicitCreateInfoEXT.ts"; +export * from "./ImageDrmFormatModifierPropertiesEXT.ts"; +export * from "./ImageStencilUsageCreateInfo.ts"; +export * from "./DeviceMemoryOverallocationCreateInfoAMD.ts"; +export * from "./PhysicalDeviceFragmentDensityMapFeaturesEXT.ts"; +export * from "./PhysicalDeviceFragmentDensityMap2FeaturesEXT.ts"; +export * from "./PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.ts"; +export * from "./PhysicalDeviceFragmentDensityMapPropertiesEXT.ts"; +export * from "./PhysicalDeviceFragmentDensityMap2PropertiesEXT.ts"; +export * from "./PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.ts"; +export * from "./RenderPassFragmentDensityMapCreateInfoEXT.ts"; +export * from "./SubpassFragmentDensityMapOffsetEndInfoQCOM.ts"; +export * from "./PhysicalDeviceScalarBlockLayoutFeatures.ts"; +export * from "./SurfaceProtectedCapabilitiesKHR.ts"; +export * from "./PhysicalDeviceUniformBufferStandardLayoutFeatures.ts"; +export * from "./PhysicalDeviceDepthClipEnableFeaturesEXT.ts"; +export * from "./PipelineRasterizationDepthClipStateCreateInfoEXT.ts"; +export * from "./PhysicalDeviceMemoryBudgetPropertiesEXT.ts"; +export * from "./PhysicalDeviceMemoryPriorityFeaturesEXT.ts"; +export * from "./MemoryPriorityAllocateInfoEXT.ts"; +export * from "./PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.ts"; +export * from "./PhysicalDeviceBufferDeviceAddressFeatures.ts"; +export * from "./PhysicalDeviceBufferDeviceAddressFeaturesEXT.ts"; +export * from "./BufferDeviceAddressInfo.ts"; +export * from "./BufferOpaqueCaptureAddressCreateInfo.ts"; +export * from "./BufferDeviceAddressCreateInfoEXT.ts"; +export * from "./PhysicalDeviceImageViewImageFormatInfoEXT.ts"; +export * from "./FilterCubicImageViewImageFormatPropertiesEXT.ts"; +export * from "./PhysicalDeviceImagelessFramebufferFeatures.ts"; +export * from "./FramebufferAttachmentsCreateInfo.ts"; +export * from "./FramebufferAttachmentImageInfo.ts"; +export * from "./RenderPassAttachmentBeginInfo.ts"; +export * from "./PhysicalDeviceTextureCompressionASTCHDRFeatures.ts"; +export * from "./PhysicalDeviceCooperativeMatrixFeaturesNV.ts"; +export * from "./PhysicalDeviceCooperativeMatrixPropertiesNV.ts"; +export * from "./CooperativeMatrixPropertiesNV.ts"; +export * from "./PhysicalDeviceYcbcrImageArraysFeaturesEXT.ts"; +export * from "./ImageViewHandleInfoNVX.ts"; +export * from "./ImageViewAddressPropertiesNVX.ts"; +export * from "./PresentFrameTokenGGP.ts"; +export * from "./PipelineCreationFeedback.ts"; +export * from "./PipelineCreationFeedbackCreateInfo.ts"; +export * from "./SurfaceFullScreenExclusiveInfoEXT.ts"; +export * from "./SurfaceFullScreenExclusiveWin32InfoEXT.ts"; +export * from "./SurfaceCapabilitiesFullScreenExclusiveEXT.ts"; +export * from "./PhysicalDevicePresentBarrierFeaturesNV.ts"; +export * from "./SurfaceCapabilitiesPresentBarrierNV.ts"; +export * from "./SwapchainPresentBarrierCreateInfoNV.ts"; +export * from "./PhysicalDevicePerformanceQueryFeaturesKHR.ts"; +export * from "./PhysicalDevicePerformanceQueryPropertiesKHR.ts"; +export * from "./PerformanceCounterKHR.ts"; +export * from "./PerformanceCounterDescriptionKHR.ts"; +export * from "./QueryPoolPerformanceCreateInfoKHR.ts"; +export * from "./AcquireProfilingLockInfoKHR.ts"; +export * from "./PerformanceQuerySubmitInfoKHR.ts"; +export * from "./HeadlessSurfaceCreateInfoEXT.ts"; +export * from "./PhysicalDeviceCoverageReductionModeFeaturesNV.ts"; +export * from "./PipelineCoverageReductionStateCreateInfoNV.ts"; +export * from "./FramebufferMixedSamplesCombinationNV.ts"; +export * from "./PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.ts"; +export * from "./PerformanceValueINTEL.ts"; +export * from "./InitializePerformanceApiInfoINTEL.ts"; +export * from "./QueryPoolPerformanceQueryCreateInfoINTEL.ts"; +export * from "./PerformanceMarkerInfoINTEL.ts"; +export * from "./PerformanceStreamMarkerInfoINTEL.ts"; +export * from "./PerformanceOverrideInfoINTEL.ts"; +export * from "./PerformanceConfigurationAcquireInfoINTEL.ts"; +export * from "./PhysicalDeviceShaderClockFeaturesKHR.ts"; +export * from "./PhysicalDeviceIndexTypeUint8FeaturesEXT.ts"; +export * from "./PhysicalDeviceShaderSMBuiltinsPropertiesNV.ts"; +export * from "./PhysicalDeviceShaderSMBuiltinsFeaturesNV.ts"; +export * from "./PhysicalDeviceFragmentShaderInterlockFeaturesEXT.ts"; +export * from "./PhysicalDeviceSeparateDepthStencilLayoutsFeatures.ts"; +export * from "./AttachmentReferenceStencilLayout.ts"; +export * from "./PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.ts"; +export * from "./AttachmentDescriptionStencilLayout.ts"; +export * from "./PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.ts"; +export * from "./PipelineInfoKHR.ts"; +export * from "./PipelineExecutablePropertiesKHR.ts"; +export * from "./PipelineExecutableInfoKHR.ts"; +export * from "./PipelineExecutableStatisticKHR.ts"; +export * from "./PipelineExecutableInternalRepresentationKHR.ts"; +export * from "./PhysicalDeviceShaderDemoteToHelperInvocationFeatures.ts"; +export * from "./PhysicalDeviceTexelBufferAlignmentFeaturesEXT.ts"; +export * from "./PhysicalDeviceTexelBufferAlignmentProperties.ts"; +export * from "./PhysicalDeviceSubgroupSizeControlFeatures.ts"; +export * from "./PhysicalDeviceSubgroupSizeControlProperties.ts"; +export * from "./PipelineShaderStageRequiredSubgroupSizeCreateInfo.ts"; +export * from "./SubpassShadingPipelineCreateInfoHUAWEI.ts"; +export * from "./PhysicalDeviceSubpassShadingPropertiesHUAWEI.ts"; +export * from "./MemoryOpaqueCaptureAddressAllocateInfo.ts"; +export * from "./DeviceMemoryOpaqueCaptureAddressInfo.ts"; +export * from "./PhysicalDeviceLineRasterizationFeaturesEXT.ts"; +export * from "./PhysicalDeviceLineRasterizationPropertiesEXT.ts"; +export * from "./PipelineRasterizationLineStateCreateInfoEXT.ts"; +export * from "./PhysicalDevicePipelineCreationCacheControlFeatures.ts"; +export * from "./PhysicalDeviceVulkan11Features.ts"; +export * from "./PhysicalDeviceVulkan11Properties.ts"; +export * from "./PhysicalDeviceVulkan12Features.ts"; +export * from "./PhysicalDeviceVulkan12Properties.ts"; +export * from "./PhysicalDeviceVulkan13Features.ts"; +export * from "./PhysicalDeviceVulkan13Properties.ts"; +export * from "./PipelineCompilerControlCreateInfoAMD.ts"; +export * from "./PhysicalDeviceCoherentMemoryFeaturesAMD.ts"; +export * from "./PhysicalDeviceToolProperties.ts"; +export * from "./SamplerCustomBorderColorCreateInfoEXT.ts"; +export * from "./PhysicalDeviceCustomBorderColorPropertiesEXT.ts"; +export * from "./PhysicalDeviceCustomBorderColorFeaturesEXT.ts"; +export * from "./SamplerBorderColorComponentMappingCreateInfoEXT.ts"; +export * from "./PhysicalDeviceBorderColorSwizzleFeaturesEXT.ts"; +export * from "./AccelerationStructureGeometryTrianglesDataKHR.ts"; +export * from "./AccelerationStructureGeometryAabbsDataKHR.ts"; +export * from "./AccelerationStructureGeometryInstancesDataKHR.ts"; +export * from "./AccelerationStructureGeometryKHR.ts"; +export * from "./AccelerationStructureBuildGeometryInfoKHR.ts"; +export * from "./AccelerationStructureBuildRangeInfoKHR.ts"; +export * from "./AccelerationStructureCreateInfoKHR.ts"; +export * from "./AabbPositionsKHR.ts"; +export * from "./TransformMatrixKHR.ts"; +export * from "./AccelerationStructureInstanceKHR.ts"; +export * from "./AccelerationStructureDeviceAddressInfoKHR.ts"; +export * from "./AccelerationStructureVersionInfoKHR.ts"; +export * from "./CopyAccelerationStructureInfoKHR.ts"; +export * from "./CopyAccelerationStructureToMemoryInfoKHR.ts"; +export * from "./CopyMemoryToAccelerationStructureInfoKHR.ts"; +export * from "./RayTracingPipelineInterfaceCreateInfoKHR.ts"; +export * from "./PipelineLibraryCreateInfoKHR.ts"; +export * from "./PhysicalDeviceExtendedDynamicStateFeaturesEXT.ts"; +export * from "./PhysicalDeviceExtendedDynamicState2FeaturesEXT.ts"; +export * from "./PhysicalDeviceExtendedDynamicState3FeaturesEXT.ts"; +export * from "./PhysicalDeviceExtendedDynamicState3PropertiesEXT.ts"; +export * from "./ColorBlendEquationEXT.ts"; +export * from "./ColorBlendAdvancedEXT.ts"; +export * from "./RenderPassTransformBeginInfoQCOM.ts"; +export * from "./CopyCommandTransformInfoQCOM.ts"; +export * from "./CommandBufferInheritanceRenderPassTransformInfoQCOM.ts"; +export * from "./PhysicalDeviceDiagnosticsConfigFeaturesNV.ts"; +export * from "./DeviceDiagnosticsConfigCreateInfoNV.ts"; +export * from "./PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.ts"; +export * from "./PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.ts"; +export * from "./PhysicalDeviceRobustness2FeaturesEXT.ts"; +export * from "./PhysicalDeviceRobustness2PropertiesEXT.ts"; +export * from "./PhysicalDeviceImageRobustnessFeatures.ts"; +export * from "./PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.ts"; +export * from "./PhysicalDevicePortabilitySubsetFeaturesKHR.ts"; +export * from "./PhysicalDevicePortabilitySubsetPropertiesKHR.ts"; +export * from "./PhysicalDevice4444FormatsFeaturesEXT.ts"; +export * from "./PhysicalDeviceSubpassShadingFeaturesHUAWEI.ts"; +export * from "./BufferCopy2.ts"; +export * from "./ImageCopy2.ts"; +export * from "./ImageBlit2.ts"; +export * from "./BufferImageCopy2.ts"; +export * from "./ImageResolve2.ts"; +export * from "./CopyBufferInfo2.ts"; +export * from "./CopyImageInfo2.ts"; +export * from "./BlitImageInfo2.ts"; +export * from "./CopyBufferToImageInfo2.ts"; +export * from "./CopyImageToBufferInfo2.ts"; +export * from "./ResolveImageInfo2.ts"; +export * from "./PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.ts"; +export * from "./FragmentShadingRateAttachmentInfoKHR.ts"; +export * from "./PipelineFragmentShadingRateStateCreateInfoKHR.ts"; +export * from "./PhysicalDeviceFragmentShadingRateFeaturesKHR.ts"; +export * from "./PhysicalDeviceFragmentShadingRatePropertiesKHR.ts"; +export * from "./PhysicalDeviceFragmentShadingRateKHR.ts"; +export * from "./PhysicalDeviceShaderTerminateInvocationFeatures.ts"; +export * from "./PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.ts"; +export * from "./PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.ts"; +export * from "./PipelineFragmentShadingRateEnumStateCreateInfoNV.ts"; +export * from "./AccelerationStructureBuildSizesInfoKHR.ts"; +export * from "./PhysicalDeviceImage2DViewOf3DFeaturesEXT.ts"; +export * from "./PhysicalDeviceMutableDescriptorTypeFeaturesEXT.ts"; +export * from "./MutableDescriptorTypeListEXT.ts"; +export * from "./MutableDescriptorTypeCreateInfoEXT.ts"; +export * from "./PhysicalDeviceDepthClipControlFeaturesEXT.ts"; +export * from "./PipelineViewportDepthClipControlCreateInfoEXT.ts"; +export * from "./PhysicalDeviceVertexInputDynamicStateFeaturesEXT.ts"; +export * from "./PhysicalDeviceExternalMemoryRDMAFeaturesNV.ts"; +export * from "./VertexInputBindingDescription2EXT.ts"; +export * from "./VertexInputAttributeDescription2EXT.ts"; +export * from "./PhysicalDeviceColorWriteEnableFeaturesEXT.ts"; +export * from "./PipelineColorWriteCreateInfoEXT.ts"; +export * from "./MemoryBarrier2.ts"; +export * from "./ImageMemoryBarrier2.ts"; +export * from "./BufferMemoryBarrier2.ts"; +export * from "./DependencyInfo.ts"; +export * from "./SemaphoreSubmitInfo.ts"; +export * from "./CommandBufferSubmitInfo.ts"; +export * from "./SubmitInfo2.ts"; +export * from "./QueueFamilyCheckpointProperties2NV.ts"; +export * from "./CheckpointData2NV.ts"; +export * from "./PhysicalDeviceSynchronization2Features.ts"; +export * from "./PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.ts"; +export * from "./PhysicalDeviceLegacyDitheringFeaturesEXT.ts"; +export * from "./PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.ts"; +export * from "./SubpassResolvePerformanceQueryEXT.ts"; +export * from "./MultisampledRenderToSingleSampledInfoEXT.ts"; +export * from "./PhysicalDevicePipelineProtectedAccessFeaturesEXT.ts"; +export * from "./QueueFamilyVideoPropertiesKHR.ts"; +export * from "./QueueFamilyQueryResultStatusPropertiesKHR.ts"; +export * from "./VideoProfileListInfoKHR.ts"; +export * from "./PhysicalDeviceVideoFormatInfoKHR.ts"; +export * from "./VideoFormatPropertiesKHR.ts"; +export * from "./VideoProfileInfoKHR.ts"; +export * from "./VideoCapabilitiesKHR.ts"; +export * from "./VideoSessionMemoryRequirementsKHR.ts"; +export * from "./BindVideoSessionMemoryInfoKHR.ts"; +export * from "./VideoPictureResourceInfoKHR.ts"; +export * from "./VideoReferenceSlotInfoKHR.ts"; +export * from "./VideoDecodeCapabilitiesKHR.ts"; +export * from "./VideoDecodeUsageInfoKHR.ts"; +export * from "./VideoDecodeInfoKHR.ts"; +export * from "./VideoDecodeH264ProfileInfoEXT.ts"; +export * from "./VideoDecodeH264CapabilitiesEXT.ts"; +export * from "./VideoDecodeH264SessionParametersAddInfoEXT.ts"; +export * from "./VideoDecodeH264SessionParametersCreateInfoEXT.ts"; +export * from "./VideoDecodeH264PictureInfoEXT.ts"; +export * from "./VideoDecodeH264DpbSlotInfoEXT.ts"; +export * from "./VideoDecodeH265ProfileInfoEXT.ts"; +export * from "./VideoDecodeH265CapabilitiesEXT.ts"; +export * from "./VideoDecodeH265SessionParametersAddInfoEXT.ts"; +export * from "./VideoDecodeH265SessionParametersCreateInfoEXT.ts"; +export * from "./VideoDecodeH265PictureInfoEXT.ts"; +export * from "./VideoDecodeH265DpbSlotInfoEXT.ts"; +export * from "./VideoSessionCreateInfoKHR.ts"; +export * from "./VideoSessionParametersCreateInfoKHR.ts"; +export * from "./VideoSessionParametersUpdateInfoKHR.ts"; +export * from "./VideoBeginCodingInfoKHR.ts"; +export * from "./VideoEndCodingInfoKHR.ts"; +export * from "./VideoCodingControlInfoKHR.ts"; +export * from "./VideoEncodeUsageInfoKHR.ts"; +export * from "./VideoEncodeInfoKHR.ts"; +export * from "./VideoEncodeRateControlInfoKHR.ts"; +export * from "./VideoEncodeRateControlLayerInfoKHR.ts"; +export * from "./VideoEncodeCapabilitiesKHR.ts"; +export * from "./VideoEncodeH264CapabilitiesEXT.ts"; +export * from "./VideoEncodeH264SessionParametersAddInfoEXT.ts"; +export * from "./VideoEncodeH264SessionParametersCreateInfoEXT.ts"; +export * from "./VideoEncodeH264DpbSlotInfoEXT.ts"; +export * from "./VideoEncodeH264VclFrameInfoEXT.ts"; +export * from "./VideoEncodeH264ReferenceListsInfoEXT.ts"; +export * from "./VideoEncodeH264EmitPictureParametersInfoEXT.ts"; +export * from "./VideoEncodeH264ProfileInfoEXT.ts"; +export * from "./VideoEncodeH264NaluSliceInfoEXT.ts"; +export * from "./VideoEncodeH264RateControlInfoEXT.ts"; +export * from "./VideoEncodeH264QpEXT.ts"; +export * from "./VideoEncodeH264FrameSizeEXT.ts"; +export * from "./VideoEncodeH264RateControlLayerInfoEXT.ts"; +export * from "./VideoEncodeH265CapabilitiesEXT.ts"; +export * from "./VideoEncodeH265SessionParametersAddInfoEXT.ts"; +export * from "./VideoEncodeH265SessionParametersCreateInfoEXT.ts"; +export * from "./VideoEncodeH265VclFrameInfoEXT.ts"; +export * from "./VideoEncodeH265EmitPictureParametersInfoEXT.ts"; +export * from "./VideoEncodeH265NaluSliceSegmentInfoEXT.ts"; +export * from "./VideoEncodeH265RateControlInfoEXT.ts"; +export * from "./VideoEncodeH265QpEXT.ts"; +export * from "./VideoEncodeH265FrameSizeEXT.ts"; +export * from "./VideoEncodeH265RateControlLayerInfoEXT.ts"; +export * from "./VideoEncodeH265ProfileInfoEXT.ts"; +export * from "./VideoEncodeH265DpbSlotInfoEXT.ts"; +export * from "./VideoEncodeH265ReferenceListsInfoEXT.ts"; +export * from "./PhysicalDeviceInheritedViewportScissorFeaturesNV.ts"; +export * from "./CommandBufferInheritanceViewportScissorInfoNV.ts"; +export * from "./PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.ts"; +export * from "./PhysicalDeviceProvokingVertexFeaturesEXT.ts"; +export * from "./PhysicalDeviceProvokingVertexPropertiesEXT.ts"; +export * from "./PipelineRasterizationProvokingVertexStateCreateInfoEXT.ts"; +export * from "./CuModuleCreateInfoNVX.ts"; +export * from "./CuFunctionCreateInfoNVX.ts"; +export * from "./CuLaunchInfoNVX.ts"; +export * from "./PhysicalDeviceDescriptorBufferFeaturesEXT.ts"; +export * from "./PhysicalDeviceDescriptorBufferPropertiesEXT.ts"; +export * from "./PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.ts"; +export * from "./DescriptorAddressInfoEXT.ts"; +export * from "./DescriptorBufferBindingInfoEXT.ts"; +export * from "./DescriptorBufferBindingPushDescriptorBufferHandleEXT.ts"; +export * from "./DescriptorGetInfoEXT.ts"; +export * from "./BufferCaptureDescriptorDataInfoEXT.ts"; +export * from "./ImageCaptureDescriptorDataInfoEXT.ts"; +export * from "./ImageViewCaptureDescriptorDataInfoEXT.ts"; +export * from "./SamplerCaptureDescriptorDataInfoEXT.ts"; +export * from "./AccelerationStructureCaptureDescriptorDataInfoEXT.ts"; +export * from "./OpaqueCaptureDescriptorDataCreateInfoEXT.ts"; +export * from "./PhysicalDeviceShaderIntegerDotProductFeatures.ts"; +export * from "./PhysicalDeviceShaderIntegerDotProductProperties.ts"; +export * from "./PhysicalDeviceDrmPropertiesEXT.ts"; +export * from "./PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.ts"; +export * from "./PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.ts"; +export * from "./PhysicalDeviceRayTracingMotionBlurFeaturesNV.ts"; +export * from "./AccelerationStructureGeometryMotionTrianglesDataNV.ts"; +export * from "./AccelerationStructureMotionInfoNV.ts"; +export * from "./SRTDataNV.ts"; +export * from "./AccelerationStructureSRTMotionInstanceNV.ts"; +export * from "./AccelerationStructureMatrixMotionInstanceNV.ts"; +export * from "./AccelerationStructureMotionInstanceNV.ts"; +export * from "./MemoryGetRemoteAddressInfoNV.ts"; +export * from "./ImportMemoryBufferCollectionFUCHSIA.ts"; +export * from "./BufferCollectionImageCreateInfoFUCHSIA.ts"; +export * from "./BufferCollectionBufferCreateInfoFUCHSIA.ts"; +export * from "./BufferCollectionCreateInfoFUCHSIA.ts"; +export * from "./BufferCollectionPropertiesFUCHSIA.ts"; +export * from "./BufferConstraintsInfoFUCHSIA.ts"; +export * from "./SysmemColorSpaceFUCHSIA.ts"; +export * from "./ImageFormatConstraintsInfoFUCHSIA.ts"; +export * from "./ImageConstraintsInfoFUCHSIA.ts"; +export * from "./BufferCollectionConstraintsInfoFUCHSIA.ts"; +export * from "./PhysicalDeviceRGBA10X6FormatsFeaturesEXT.ts"; +export * from "./FormatProperties3.ts"; +export * from "./DrmFormatModifierPropertiesList2EXT.ts"; +export * from "./DrmFormatModifierProperties2EXT.ts"; +export * from "./AndroidHardwareBufferFormatProperties2ANDROID.ts"; +export * from "./PipelineRenderingCreateInfo.ts"; +export * from "./RenderingInfo.ts"; +export * from "./RenderingAttachmentInfo.ts"; +export * from "./RenderingFragmentShadingRateAttachmentInfoKHR.ts"; +export * from "./RenderingFragmentDensityMapAttachmentInfoEXT.ts"; +export * from "./PhysicalDeviceDynamicRenderingFeatures.ts"; +export * from "./CommandBufferInheritanceRenderingInfo.ts"; +export * from "./AttachmentSampleCountInfoAMD.ts"; +export * from "./MultiviewPerViewAttributesInfoNVX.ts"; +export * from "./PhysicalDeviceImageViewMinLodFeaturesEXT.ts"; +export * from "./ImageViewMinLodCreateInfoEXT.ts"; +export * from "./PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.ts"; +export * from "./PhysicalDeviceLinearColorAttachmentFeaturesNV.ts"; +export * from "./PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.ts"; +export * from "./PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.ts"; +export * from "./GraphicsPipelineLibraryCreateInfoEXT.ts"; +export * from "./PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.ts"; +export * from "./DescriptorSetBindingReferenceVALVE.ts"; +export * from "./DescriptorSetLayoutHostMappingInfoVALVE.ts"; +export * from "./PhysicalDeviceShaderModuleIdentifierFeaturesEXT.ts"; +export * from "./PhysicalDeviceShaderModuleIdentifierPropertiesEXT.ts"; +export * from "./PipelineShaderStageModuleIdentifierCreateInfoEXT.ts"; +export * from "./ShaderModuleIdentifierEXT.ts"; +export * from "./ImageCompressionControlEXT.ts"; +export * from "./PhysicalDeviceImageCompressionControlFeaturesEXT.ts"; +export * from "./ImageCompressionPropertiesEXT.ts"; +export * from "./PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.ts"; +export * from "./ImageSubresource2EXT.ts"; +export * from "./SubresourceLayout2EXT.ts"; +export * from "./RenderPassCreationControlEXT.ts"; +export * from "./RenderPassCreationFeedbackInfoEXT.ts"; +export * from "./RenderPassCreationFeedbackCreateInfoEXT.ts"; +export * from "./RenderPassSubpassFeedbackInfoEXT.ts"; +export * from "./RenderPassSubpassFeedbackCreateInfoEXT.ts"; +export * from "./PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.ts"; +export * from "./MicromapBuildInfoEXT.ts"; +export * from "./MicromapCreateInfoEXT.ts"; +export * from "./MicromapVersionInfoEXT.ts"; +export * from "./CopyMicromapInfoEXT.ts"; +export * from "./CopyMicromapToMemoryInfoEXT.ts"; +export * from "./CopyMemoryToMicromapInfoEXT.ts"; +export * from "./MicromapBuildSizesInfoEXT.ts"; +export * from "./MicromapUsageEXT.ts"; +export * from "./MicromapTriangleEXT.ts"; +export * from "./PhysicalDeviceOpacityMicromapFeaturesEXT.ts"; +export * from "./PhysicalDeviceOpacityMicromapPropertiesEXT.ts"; +export * from "./AccelerationStructureTrianglesOpacityMicromapEXT.ts"; +export * from "./PipelinePropertiesIdentifierEXT.ts"; +export * from "./PhysicalDevicePipelinePropertiesFeaturesEXT.ts"; +export * from "./PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.ts"; +export * from "./ExportMetalObjectCreateInfoEXT.ts"; +export * from "./ExportMetalObjectsInfoEXT.ts"; +export * from "./ExportMetalDeviceInfoEXT.ts"; +export * from "./ExportMetalCommandQueueInfoEXT.ts"; +export * from "./ExportMetalBufferInfoEXT.ts"; +export * from "./ImportMetalBufferInfoEXT.ts"; +export * from "./ExportMetalTextureInfoEXT.ts"; +export * from "./ImportMetalTextureInfoEXT.ts"; +export * from "./ExportMetalIOSurfaceInfoEXT.ts"; +export * from "./ImportMetalIOSurfaceInfoEXT.ts"; +export * from "./ExportMetalSharedEventInfoEXT.ts"; +export * from "./ImportMetalSharedEventInfoEXT.ts"; +export * from "./PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.ts"; +export * from "./PhysicalDevicePipelineRobustnessFeaturesEXT.ts"; +export * from "./PipelineRobustnessCreateInfoEXT.ts"; +export * from "./PhysicalDevicePipelineRobustnessPropertiesEXT.ts"; +export * from "./ImageViewSampleWeightCreateInfoQCOM.ts"; +export * from "./PhysicalDeviceImageProcessingFeaturesQCOM.ts"; +export * from "./PhysicalDeviceImageProcessingPropertiesQCOM.ts"; +export * from "./PhysicalDeviceTilePropertiesFeaturesQCOM.ts"; +export * from "./TilePropertiesQCOM.ts"; +export * from "./PhysicalDeviceAmigoProfilingFeaturesSEC.ts"; +export * from "./AmigoProfilingSubmitInfoSEC.ts"; +export * from "./PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.ts"; +export * from "./PhysicalDeviceDepthClampZeroOneFeaturesEXT.ts"; +export * from "./PhysicalDeviceAddressBindingReportFeaturesEXT.ts"; +export * from "./DeviceAddressBindingCallbackDataEXT.ts"; +export * from "./PhysicalDeviceOpticalFlowFeaturesNV.ts"; +export * from "./PhysicalDeviceOpticalFlowPropertiesNV.ts"; +export * from "./OpticalFlowImageFormatInfoNV.ts"; +export * from "./OpticalFlowImageFormatPropertiesNV.ts"; +export * from "./OpticalFlowSessionCreateInfoNV.ts"; +export * from "./OpticalFlowSessionCreatePrivateDataInfoNV.ts"; +export * from "./OpticalFlowExecuteInfoNV.ts"; +export * from "./PhysicalDeviceFaultFeaturesEXT.ts"; +export * from "./DeviceFaultAddressInfoEXT.ts"; +export * from "./DeviceFaultVendorInfoEXT.ts"; +export * from "./DeviceFaultCountsEXT.ts"; +export * from "./DeviceFaultInfoEXT.ts"; +export * from "./DeviceFaultVendorBinaryHeaderVersionOneEXT.ts"; +export * from "./DecompressMemoryRegionNV.ts"; +export * from "./PhysicalDeviceShaderCoreBuiltinsPropertiesARM.ts"; +export * from "./PhysicalDeviceShaderCoreBuiltinsFeaturesARM.ts"; +export * from "./PhysicalDeviceRayTracingInvocationReorderFeaturesNV.ts"; +export * from "./PhysicalDeviceRayTracingInvocationReorderPropertiesNV.ts"; +export * from "./DevicePrivateDataCreateInfoEXT.ts"; +export * from "./PrivateDataSlotCreateInfoEXT.ts"; +export * from "./PhysicalDevicePrivateDataFeaturesEXT.ts"; +export * from "./PhysicalDeviceFeatures2KHR.ts"; +export * from "./PhysicalDeviceProperties2KHR.ts"; +export * from "./FormatProperties2KHR.ts"; +export * from "./ImageFormatProperties2KHR.ts"; +export * from "./PhysicalDeviceImageFormatInfo2KHR.ts"; +export * from "./QueueFamilyProperties2KHR.ts"; +export * from "./PhysicalDeviceMemoryProperties2KHR.ts"; +export * from "./SparseImageFormatProperties2KHR.ts"; +export * from "./PhysicalDeviceSparseImageFormatInfo2KHR.ts"; +export * from "./ConformanceVersionKHR.ts"; +export * from "./PhysicalDeviceDriverPropertiesKHR.ts"; +export * from "./PhysicalDeviceVariablePointersFeaturesKHR.ts"; +export * from "./PhysicalDeviceVariablePointerFeaturesKHR.ts"; +export * from "./PhysicalDeviceVariablePointerFeatures.ts"; +export * from "./ExternalMemoryPropertiesKHR.ts"; +export * from "./PhysicalDeviceExternalImageFormatInfoKHR.ts"; +export * from "./ExternalImageFormatPropertiesKHR.ts"; +export * from "./PhysicalDeviceExternalBufferInfoKHR.ts"; +export * from "./ExternalBufferPropertiesKHR.ts"; +export * from "./PhysicalDeviceIDPropertiesKHR.ts"; +export * from "./ExternalMemoryImageCreateInfoKHR.ts"; +export * from "./ExternalMemoryBufferCreateInfoKHR.ts"; +export * from "./ExportMemoryAllocateInfoKHR.ts"; +export * from "./PhysicalDeviceExternalSemaphoreInfoKHR.ts"; +export * from "./ExternalSemaphorePropertiesKHR.ts"; +export * from "./ExportSemaphoreCreateInfoKHR.ts"; +export * from "./PhysicalDeviceExternalFenceInfoKHR.ts"; +export * from "./ExternalFencePropertiesKHR.ts"; +export * from "./ExportFenceCreateInfoKHR.ts"; +export * from "./PhysicalDeviceMultiviewFeaturesKHR.ts"; +export * from "./PhysicalDeviceMultiviewPropertiesKHR.ts"; +export * from "./RenderPassMultiviewCreateInfoKHR.ts"; +export * from "./PhysicalDeviceGroupPropertiesKHR.ts"; +export * from "./MemoryAllocateFlagsInfoKHR.ts"; +export * from "./BindBufferMemoryInfoKHR.ts"; +export * from "./BindBufferMemoryDeviceGroupInfoKHR.ts"; +export * from "./BindImageMemoryInfoKHR.ts"; +export * from "./BindImageMemoryDeviceGroupInfoKHR.ts"; +export * from "./DeviceGroupRenderPassBeginInfoKHR.ts"; +export * from "./DeviceGroupCommandBufferBeginInfoKHR.ts"; +export * from "./DeviceGroupSubmitInfoKHR.ts"; +export * from "./DeviceGroupBindSparseInfoKHR.ts"; +export * from "./DeviceGroupDeviceCreateInfoKHR.ts"; +export * from "./DescriptorUpdateTemplateEntryKHR.ts"; +export * from "./DescriptorUpdateTemplateCreateInfoKHR.ts"; +export * from "./InputAttachmentAspectReferenceKHR.ts"; +export * from "./RenderPassInputAttachmentAspectCreateInfoKHR.ts"; +export * from "./PhysicalDevice16BitStorageFeaturesKHR.ts"; +export * from "./PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR.ts"; +export * from "./BufferMemoryRequirementsInfo2KHR.ts"; +export * from "./DeviceBufferMemoryRequirementsKHR.ts"; +export * from "./ImageMemoryRequirementsInfo2KHR.ts"; +export * from "./ImageSparseMemoryRequirementsInfo2KHR.ts"; +export * from "./DeviceImageMemoryRequirementsKHR.ts"; +export * from "./MemoryRequirements2KHR.ts"; +export * from "./SparseImageMemoryRequirements2KHR.ts"; +export * from "./PhysicalDevicePointClippingPropertiesKHR.ts"; +export * from "./MemoryDedicatedRequirementsKHR.ts"; +export * from "./MemoryDedicatedAllocateInfoKHR.ts"; +export * from "./ImageViewUsageCreateInfoKHR.ts"; +export * from "./PipelineTessellationDomainOriginStateCreateInfoKHR.ts"; +export * from "./SamplerYcbcrConversionInfoKHR.ts"; +export * from "./SamplerYcbcrConversionCreateInfoKHR.ts"; +export * from "./BindImagePlaneMemoryInfoKHR.ts"; +export * from "./ImagePlaneMemoryRequirementsInfoKHR.ts"; +export * from "./PhysicalDeviceSamplerYcbcrConversionFeaturesKHR.ts"; +export * from "./SamplerYcbcrConversionImageFormatPropertiesKHR.ts"; +export * from "./PhysicalDeviceSamplerFilterMinmaxPropertiesEXT.ts"; +export * from "./SamplerReductionModeCreateInfoEXT.ts"; +export * from "./PhysicalDeviceInlineUniformBlockFeaturesEXT.ts"; +export * from "./PhysicalDeviceInlineUniformBlockPropertiesEXT.ts"; +export * from "./WriteDescriptorSetInlineUniformBlockEXT.ts"; +export * from "./DescriptorPoolInlineUniformBlockCreateInfoEXT.ts"; +export * from "./ImageFormatListCreateInfoKHR.ts"; +export * from "./PhysicalDeviceMaintenance3PropertiesKHR.ts"; +export * from "./PhysicalDeviceMaintenance4FeaturesKHR.ts"; +export * from "./PhysicalDeviceMaintenance4PropertiesKHR.ts"; +export * from "./DescriptorSetLayoutSupportKHR.ts"; +export * from "./PhysicalDeviceShaderDrawParameterFeatures.ts"; +export * from "./PhysicalDeviceShaderFloat16Int8FeaturesKHR.ts"; +export * from "./PhysicalDeviceFloat16Int8FeaturesKHR.ts"; +export * from "./PhysicalDeviceFloatControlsPropertiesKHR.ts"; +export * from "./PhysicalDeviceHostQueryResetFeaturesEXT.ts"; +export * from "./DeviceQueueGlobalPriorityCreateInfoEXT.ts"; +export * from "./PhysicalDeviceGlobalPriorityQueryFeaturesEXT.ts"; +export * from "./QueueFamilyGlobalPriorityPropertiesEXT.ts"; +export * from "./PhysicalDeviceDescriptorIndexingFeaturesEXT.ts"; +export * from "./PhysicalDeviceDescriptorIndexingPropertiesEXT.ts"; +export * from "./DescriptorSetLayoutBindingFlagsCreateInfoEXT.ts"; +export * from "./DescriptorSetVariableDescriptorCountAllocateInfoEXT.ts"; +export * from "./DescriptorSetVariableDescriptorCountLayoutSupportEXT.ts"; +export * from "./AttachmentDescription2KHR.ts"; +export * from "./AttachmentReference2KHR.ts"; +export * from "./SubpassDescription2KHR.ts"; +export * from "./SubpassDependency2KHR.ts"; +export * from "./RenderPassCreateInfo2KHR.ts"; +export * from "./SubpassBeginInfoKHR.ts"; +export * from "./SubpassEndInfoKHR.ts"; +export * from "./PhysicalDeviceTimelineSemaphoreFeaturesKHR.ts"; +export * from "./PhysicalDeviceTimelineSemaphorePropertiesKHR.ts"; +export * from "./SemaphoreTypeCreateInfoKHR.ts"; +export * from "./TimelineSemaphoreSubmitInfoKHR.ts"; +export * from "./SemaphoreWaitInfoKHR.ts"; +export * from "./SemaphoreSignalInfoKHR.ts"; +export * from "./PhysicalDevice8BitStorageFeaturesKHR.ts"; +export * from "./PhysicalDeviceVulkanMemoryModelFeaturesKHR.ts"; +export * from "./PhysicalDeviceShaderAtomicInt64FeaturesKHR.ts"; +export * from "./PhysicalDeviceDepthStencilResolvePropertiesKHR.ts"; +export * from "./SubpassDescriptionDepthStencilResolveKHR.ts"; +export * from "./PhysicalDeviceFragmentShaderBarycentricFeaturesNV.ts"; +export * from "./ImageStencilUsageCreateInfoEXT.ts"; +export * from "./PhysicalDeviceScalarBlockLayoutFeaturesEXT.ts"; +export * from "./PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR.ts"; +export * from "./PhysicalDeviceBufferDeviceAddressFeaturesKHR.ts"; +export * from "./PhysicalDeviceBufferAddressFeaturesEXT.ts"; +export * from "./BufferDeviceAddressInfoKHR.ts"; +export * from "./BufferDeviceAddressInfoEXT.ts"; +export * from "./BufferOpaqueCaptureAddressCreateInfoKHR.ts"; +export * from "./PhysicalDeviceImagelessFramebufferFeaturesKHR.ts"; +export * from "./FramebufferAttachmentsCreateInfoKHR.ts"; +export * from "./FramebufferAttachmentImageInfoKHR.ts"; +export * from "./RenderPassAttachmentBeginInfoKHR.ts"; +export * from "./PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT.ts"; +export * from "./PipelineCreationFeedbackEXT.ts"; +export * from "./PipelineCreationFeedbackCreateInfoEXT.ts"; +export * from "./QueryPoolCreateInfoINTEL.ts"; +export * from "./PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR.ts"; +export * from "./AttachmentReferenceStencilLayoutKHR.ts"; +export * from "./AttachmentDescriptionStencilLayoutKHR.ts"; +export * from "./PipelineInfoEXT.ts"; +export * from "./PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT.ts"; +export * from "./PhysicalDeviceTexelBufferAlignmentPropertiesEXT.ts"; +export * from "./PhysicalDeviceSubgroupSizeControlFeaturesEXT.ts"; +export * from "./PhysicalDeviceSubgroupSizeControlPropertiesEXT.ts"; +export * from "./PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT.ts"; +export * from "./MemoryOpaqueCaptureAddressAllocateInfoKHR.ts"; +export * from "./DeviceMemoryOpaqueCaptureAddressInfoKHR.ts"; +export * from "./PhysicalDevicePipelineCreationCacheControlFeaturesEXT.ts"; +export * from "./PhysicalDeviceToolPropertiesEXT.ts"; +export * from "./AabbPositionsNV.ts"; +export * from "./TransformMatrixNV.ts"; +export * from "./AccelerationStructureInstanceNV.ts"; +export * from "./PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR.ts"; +export * from "./PhysicalDeviceImageRobustnessFeaturesEXT.ts"; +export * from "./BufferCopy2KHR.ts"; +export * from "./ImageCopy2KHR.ts"; +export * from "./ImageBlit2KHR.ts"; +export * from "./BufferImageCopy2KHR.ts"; +export * from "./ImageResolve2KHR.ts"; +export * from "./CopyBufferInfo2KHR.ts"; +export * from "./CopyImageInfo2KHR.ts"; +export * from "./BlitImageInfo2KHR.ts"; +export * from "./CopyBufferToImageInfo2KHR.ts"; +export * from "./CopyImageToBufferInfo2KHR.ts"; +export * from "./ResolveImageInfo2KHR.ts"; +export * from "./PhysicalDeviceShaderTerminateInvocationFeaturesKHR.ts"; +export * from "./PhysicalDeviceMutableDescriptorTypeFeaturesVALVE.ts"; +export * from "./MutableDescriptorTypeListVALVE.ts"; +export * from "./MutableDescriptorTypeCreateInfoVALVE.ts"; +export * from "./MemoryBarrier2KHR.ts"; +export * from "./ImageMemoryBarrier2KHR.ts"; +export * from "./BufferMemoryBarrier2KHR.ts"; +export * from "./DependencyInfoKHR.ts"; +export * from "./SemaphoreSubmitInfoKHR.ts"; +export * from "./CommandBufferSubmitInfoKHR.ts"; +export * from "./SubmitInfo2KHR.ts"; +export * from "./PhysicalDeviceSynchronization2FeaturesKHR.ts"; +export * from "./PhysicalDeviceShaderIntegerDotProductFeaturesKHR.ts"; +export * from "./PhysicalDeviceShaderIntegerDotProductPropertiesKHR.ts"; +export * from "./FormatProperties3KHR.ts"; +export * from "./PipelineRenderingCreateInfoKHR.ts"; +export * from "./RenderingInfoKHR.ts"; +export * from "./RenderingAttachmentInfoKHR.ts"; +export * from "./PhysicalDeviceDynamicRenderingFeaturesKHR.ts"; +export * from "./CommandBufferInheritanceRenderingInfoKHR.ts"; +export * from "./AttachmentSampleCountInfoNV.ts"; +export * from "./PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM.ts"; \ No newline at end of file diff --git a/api/union.ts b/api/union.ts new file mode 100644 index 0000000..79b7f54 --- /dev/null +++ b/api/union.ts @@ -0,0 +1,155 @@ + +/// Unions + +/** // Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. */ +export class ClearColorValue { + static size = 4; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < ClearColorValue.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} + +/** // Union allowing specification of color or depth and stencil values. Actual value selected is based on attachment being cleared. */ +export class ClearValue { + static size = 8; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < ClearValue.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} + +/** // Union of all the possible return types a counter result could return */ +export class PerformanceCounterResultKHR { + static size = 8; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < PerformanceCounterResultKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} + +export class PerformanceValueDataINTEL { + static size = 8; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < PerformanceValueDataINTEL.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} + +export class PipelineExecutableStatisticValueKHR { + static size = 8; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < PipelineExecutableStatisticValueKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} + +export class DeviceOrHostAddressKHR { + static size = 8; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < DeviceOrHostAddressKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} + +export class DeviceOrHostAddressConstKHR { + static size = 8; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < DeviceOrHostAddressConstKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} + +export class AccelerationStructureGeometryDataKHR { + static size = 64; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < AccelerationStructureGeometryDataKHR.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} + +export class DescriptorDataEXT { + static size = 8; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < DescriptorDataEXT.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} + +export class AccelerationStructureMotionInstanceDataNV { + static size = 152; + + #data: Uint8Array; + #view: DataView; + + constructor(data: Uint8Array) { + if (data.byteLength < AccelerationStructureMotionInstanceDataNV.size) { + throw new Error("Data buffer too small"); + } + this.#data = data; + this.#view = new DataView(data.buffer); + } +} \ No newline at end of file diff --git a/api/util.ts b/api/util.ts index 0ee4f74..a9786b8 100644 --- a/api/util.ts +++ b/api/util.ts @@ -1,3 +1,5 @@ +import { assert } from "https://deno.land/std@0.179.0/_util/asserts.ts"; + export const BUFFER = Symbol("vkStructBuffer"); export const DATAVIEW = Symbol("vkStructDataView"); export const LE = @@ -25,6 +27,19 @@ export type AnyBuffer = | null | BaseStruct; +export function isTypedArray(x: unknown): x is TypedArray { + return x instanceof Uint8Array || + x instanceof Uint16Array || + x instanceof Uint32Array || + x instanceof Int8Array || + x instanceof Int16Array || + x instanceof Int32Array || + x instanceof Float32Array || + x instanceof Float64Array || + x instanceof BigUint64Array || + x instanceof BigInt64Array; +} + export function anyBuffer(buffer: AnyBuffer) { if (!buffer) return null; else if (typeof buffer === "object" && BUFFER in buffer) { @@ -37,15 +52,48 @@ export function anyBuffer(buffer: AnyBuffer) { ); } +export function isBaseStruct(value: unknown): value is BaseStruct { + return typeof value === "object" && value !== null && BUFFER in value; +} + +export function addressOf(buffer: BufferSource): number | bigint { + return Deno.UnsafePointer.value(Deno.UnsafePointer.of(buffer)); +} + +export function pointerFromView( + view: DataView, + offset: number, + le: boolean, +): Deno.PointerValue { + return Deno.UnsafePointer.create(view.getBigUint64(offset, le)); +} +export function maybePointerObject(x: unknown): boolean { + if (x === null) return false; + if (typeof x != "object") return false; + return Object.keys(x).length == 0 && Object.getPrototypeOf(x) === null && + Object.isExtensible(x) == false; +} + +export function notPointerObject( + x: T, +): x is Exclude> { + return !maybePointerObject(x); +} + export type AnyPointer = Deno.PointerValue | null | AnyBuffer; -export function anyPointer(buffer: AnyPointer): Deno.PointerValue { - if (!buffer) return 0; - else if (typeof buffer === "number" || typeof buffer === "bigint") { - return buffer; +export function anyPointer(value: AnyPointer): number | bigint { + if (value === null) { + return 0; + } else if (isTypedArray(value) || value instanceof ArrayBuffer) { + return value.byteLength == 0 ? 0 : addressOf(value); + } else if (isBaseStruct(value)) { + return addressOf(value[BUFFER]); + } else if (typeof value == "number" || typeof value == "bigint") { + return value; + } else { + return Deno.UnsafePointer.value(value); } - const u8 = anyBuffer(buffer); - return u8!.length === 0 ? 0 : Deno.UnsafePointer.of(u8 ?? new Uint8Array()); } export class CString extends Uint8Array { @@ -55,6 +103,20 @@ export class CString extends Uint8Array { } } +export function jsString(source: BufferSource | Deno.PointerValue): string { + if (source === null) { + return ""; + } else if (notPointerObject(source)) { + const pointer = Deno.UnsafePointer.of(source); + if (pointer === null) return ""; + const view = new Deno.UnsafePointerView(pointer); + return view.getCString(); + } else { + const view = new Deno.UnsafePointerView(source); + return view.getCString(); + } +} + export class CStringArray extends Uint8Array { #view: DataView; #datas: CString[] = []; @@ -66,12 +128,12 @@ export class CStringArray extends Uint8Array { const str = strs[i]; const data = new CString(str); this.#datas.push(data); - this.#view.setBigUint64(i * 8, BigInt(Deno.UnsafePointer.of(data)), LE); + this.#view.setBigUint64(i * 8, BigInt(addressOf(data)), LE); } } } -const MAX_SAFE_INTEGER = BigInt(Number.MAX_SAFE_INTEGER); +// const MAX_SAFE_INTEGER = BigInt(Number.MAX_SAFE_INTEGER); export class PointerRef extends Uint8Array { #view: DataView; @@ -83,13 +145,24 @@ export class PointerRef extends Uint8Array { get value(): Deno.PointerValue { const ptr = this.#view.getBigUint64(0, LE); - if (ptr < MAX_SAFE_INTEGER) return Number(ptr); - return ptr; + return Deno.UnsafePointer.create(ptr); } set value(value: Deno.PointerValue) { this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); } + + get checkedValue(): NonNullable { + const pointer = this.value; + assert(pointer !== null); + return pointer; + } + + static ofPointer(pointer: Deno.PointerValue) { + const ref = new PointerRef(); + ref.value = pointer; + return ref; + } } export class PointerArray extends BigUint64Array { @@ -104,6 +177,19 @@ export class PointerArray extends BigUint64Array { } } } + + pointer(index: number): Deno.PointerValue { + if (index < 0 || index > this.length) return null; + return Deno.UnsafePointer.create(this[index]); + } + + toList() { + const ret = [] as Deno.PointerValue[]; + for (let i = 0; i < this.length; i++) { + ret.push(this.pointer(i)); + } + return ret; + } } export class StructArray implements BaseStruct { @@ -157,7 +243,7 @@ export class StructArray implements BaseStruct { } export function getBuffer( - ptr: Deno.PointerValue, + ptr: NonNullable, size: number, arr: new (buf: ArrayBuffer) => T, ): T { diff --git a/api/vk.min.js b/api/vk.min.js deleted file mode 100644 index 0a0b472..0000000 --- a/api/vk.min.js +++ /dev/null @@ -1,54496 +0,0 @@ -import { anyBuffer, anyPointer, BUFFER, DATAVIEW, LE } from "./util.ts"; -export const MAX_PHYSICAL_DEVICE_NAME_SIZE = 256; -export const UUID_SIZE = 16; -export const LUID_SIZE = 8; -export const LUID_SIZE_KHR = void 0; -export const MAX_EXTENSION_NAME_SIZE = 256; -export const MAX_DESCRIPTION_SIZE = 256; -export const MAX_MEMORY_TYPES = 32; -export const MAX_MEMORY_HEAPS = 16; -export const LOD_CLAMP_NONE = 1000.0; -export const REMAINING_MIP_LEVELS = -1; -export const REMAINING_ARRAY_LAYERS = -1; -export const WHOLE_SIZE = ~0n; -export const ATTACHMENT_UNUSED = -1; -export const TRUE = 1; -export const FALSE = 0; -export const QUEUE_FAMILY_IGNORED = -1; -export const QUEUE_FAMILY_EXTERNAL = -2; -export const QUEUE_FAMILY_EXTERNAL_KHR = void 0; -export const QUEUE_FAMILY_FOREIGN_EXT = -3; -export const SUBPASS_EXTERNAL = -1; -export const MAX_DEVICE_GROUP_SIZE = 32; -export const MAX_DEVICE_GROUP_SIZE_KHR = void 0; -export const MAX_DRIVER_NAME_SIZE = 256; -export const MAX_DRIVER_NAME_SIZE_KHR = void 0; -export const MAX_DRIVER_INFO_SIZE = 256; -export const MAX_DRIVER_INFO_SIZE_KHR = void 0; -export const SHADER_UNUSED_KHR = -1; -export const SHADER_UNUSED_NV = void 0; -export const MAX_GLOBAL_PRIORITY_SIZE_KHR = 16; -export const MAX_GLOBAL_PRIORITY_SIZE_EXT = void 0; -export const MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT = 32; -export const STD_VIDEO_H264_CPB_CNT_LIST_SIZE = 32; -export const STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS = 6; -export const STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS = 16; -export const STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS = 6; -export const STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS = 64; -export const STD_VIDEO_H264_MAX_NUM_LIST_REF = 32; -export const STD_VIDEO_H264_MAX_CHROMA_PLANES = 2; -export const STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_decode"; -export const STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE = 2; -export const STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_encode"; -export const STD_VIDEO_H265_CPB_CNT_LIST_SIZE = 32; -export const STD_VIDEO_H265_SUBLAYERS_LIST_SIZE = 7; -export const STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS = 6; -export const STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS = 16; -export const STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS = 6; -export const STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS = 64; -export const STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS = 6; -export const STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS = 64; -export const STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS = 2; -export const STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS = 64; -export const STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE = 6; -export const STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE = 19; -export const STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE = 21; -export const STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE = 3; -export const STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE = 128; -export const STD_VIDEO_H265_MAX_NUM_LIST_REF = 15; -export const STD_VIDEO_H265_MAX_CHROMA_PLANES = 2; -export const STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS = 64; -export const STD_VIDEO_H265_MAX_DPB_SIZE = 16; -export const STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS = 32; -export const STD_VIDEO_H265_MAX_LONG_TERM_PICS = 16; -export const STD_VIDEO_H265_MAX_DELTA_POC = 48; -export const STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_decode"; -export const STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE = 8; -export const STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_encode"; -export const KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"; -export const KHR_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_swapchain"; -export const KHR_DISPLAY_EXTENSION_NAME = "VK_KHR_display"; -export const KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_display_swapchain"; -export const KHR_XLIB_SURFACE_EXTENSION_NAME = "VK_KHR_xlib_surface"; -export const KHR_XCB_SURFACE_EXTENSION_NAME = "VK_KHR_xcb_surface"; -export const KHR_WAYLAND_SURFACE_EXTENSION_NAME = "VK_KHR_wayland_surface"; -export const KHR_MIR_SURFACE_EXTENSION_NAME = "VK_KHR_mir_surface"; -export const KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"; -export const KHR_WIN32_SURFACE_EXTENSION_NAME = "VK_KHR_win32_surface"; -export const ANDROID_NATIVE_BUFFER_NUMBER = 11; -export const ANDROID_NATIVE_BUFFER_EXTENSION_NAME = "VK_ANDROID_native_buffer"; -export const EXT_DEBUG_REPORT_EXTENSION_NAME = "VK_EXT_debug_report"; -export const NV_GLSL_SHADER_EXTENSION_NAME = "VK_NV_glsl_shader"; -export const EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME = "VK_EXT_depth_range_unrestricted"; -export const KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME = "VK_KHR_sampler_mirror_clamp_to_edge"; -export const IMG_FILTER_CUBIC_EXTENSION_NAME = "VK_IMG_filter_cubic"; -export const AMD_EXTENSION_17_EXTENSION_NAME = "VK_AMD_extension_17"; -export const AMD_EXTENSION_18_EXTENSION_NAME = "VK_AMD_extension_18"; -export const AMD_RASTERIZATION_ORDER_EXTENSION_NAME = "VK_AMD_rasterization_order"; -export const AMD_EXTENSION_20_EXTENSION_NAME = "VK_AMD_extension_20"; -export const AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME = "VK_AMD_shader_trinary_minmax"; -export const AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME = "VK_AMD_shader_explicit_vertex_parameter"; -export const EXT_DEBUG_MARKER_EXTENSION_NAME = "VK_EXT_debug_marker"; -export const KHR_VIDEO_QUEUE_EXTENSION_NAME = "VK_KHR_video_queue"; -export const KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_decode_queue"; -export const AMD_GCN_SHADER_EXTENSION_NAME = "VK_AMD_gcn_shader"; -export const NV_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_NV_dedicated_allocation"; -export const EXT_EXTENSION_28_EXTENSION_NAME = "VK_EXT_extension_28"; -export const EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME = "VK_EXT_transform_feedback"; -export const NVX_BINARY_IMPORT_EXTENSION_NAME = "VK_NVX_binary_import"; -export const NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME = "VK_NVX_image_view_handle"; -export const AMD_EXTENSION_32_EXTENSION_NAME = "VK_AMD_extension_32"; -export const AMD_EXTENSION_33_EXTENSION_NAME = "VK_AMD_extension_33"; -export const AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_AMD_draw_indirect_count"; -export const AMD_EXTENSION_35_EXTENSION_NAME = "VK_AMD_extension_35"; -export const AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME = "VK_AMD_negative_viewport_height"; -export const AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME = "VK_AMD_gpu_shader_half_float"; -export const AMD_SHADER_BALLOT_EXTENSION_NAME = "VK_AMD_shader_ballot"; -export const EXT_VIDEO_ENCODE_H264_EXTENSION_NAME = "VK_EXT_video_encode_h264"; -export const EXT_VIDEO_ENCODE_H265_EXTENSION_NAME = "VK_EXT_video_encode_h265"; -export const EXT_VIDEO_DECODE_H264_EXTENSION_NAME = "VK_EXT_video_decode_h264"; -export const AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME = "VK_AMD_texture_gather_bias_lod"; -export const AMD_SHADER_INFO_EXTENSION_NAME = "VK_AMD_shader_info"; -export const AMD_EXTENSION_44_EXTENSION_NAME = "VK_AMD_extension_44"; -export const KHR_DYNAMIC_RENDERING_EXTENSION_NAME = "VK_KHR_dynamic_rendering"; -export const AMD_EXTENSION_46_EXTENSION_NAME = "VK_AMD_extension_46"; -export const AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME = "VK_AMD_shader_image_load_store_lod"; -export const NVX_EXTENSION_48_EXTENSION_NAME = "VK_NVX_extension_48"; -export const GOOGLE_EXTENSION_49_EXTENSION_NAME = "VK_GOOGLE_extension_49"; -export const GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME = "VK_GGP_stream_descriptor_surface"; -export const NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME = "VK_NV_corner_sampled_image"; -export const NV_EXTENSION_52_EXTENSION_NAME = "VK_NV_extension_52"; -export const NV_EXTENSION_53_EXTENSION_NAME = "VK_NV_extension_53"; -export const KHR_MULTIVIEW_EXTENSION_NAME = "VK_KHR_multiview"; -export const IMG_FORMAT_PVRTC_EXTENSION_NAME = "VK_IMG_format_pvrtc"; -export const NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_NV_external_memory_capabilities"; -export const NV_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_NV_external_memory"; -export const NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_NV_external_memory_win32"; -export const NV_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_NV_win32_keyed_mutex"; -export const KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_physical_device_properties2"; -export const KHR_DEVICE_GROUP_EXTENSION_NAME = "VK_KHR_device_group"; -export const EXT_VALIDATION_FLAGS_EXTENSION_NAME = "VK_EXT_validation_flags"; -export const NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"; -export const KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME = "VK_KHR_shader_draw_parameters"; -export const EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME = "VK_EXT_shader_subgroup_ballot"; -export const EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME = "VK_EXT_shader_subgroup_vote"; -export const EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME = "VK_EXT_texture_compression_astc_hdr"; -export const EXT_ASTC_DECODE_MODE_EXTENSION_NAME = "VK_EXT_astc_decode_mode"; -export const EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_pipeline_robustness"; -export const KHR_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_maintenance1"; -export const KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME = "VK_KHR_device_group_creation"; -export const KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_memory_capabilities"; -export const KHR_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_KHR_external_memory"; -export const KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32"; -export const KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME = "VK_KHR_external_memory_fd"; -export const KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_KHR_win32_keyed_mutex"; -export const KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_semaphore_capabilities"; -export const KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_KHR_external_semaphore"; -export const KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME = "VK_KHR_external_semaphore_win32"; -export const KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME = "VK_KHR_external_semaphore_fd"; -export const KHR_PUSH_DESCRIPTOR_EXTENSION_NAME = "VK_KHR_push_descriptor"; -export const EXT_CONDITIONAL_RENDERING_EXTENSION_NAME = "VK_EXT_conditional_rendering"; -export const KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME = "VK_KHR_shader_float16_int8"; -export const KHR_16BIT_STORAGE_EXTENSION_NAME = "VK_KHR_16bit_storage"; -export const KHR_INCREMENTAL_PRESENT_EXTENSION_NAME = "VK_KHR_incremental_present"; -export const KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME = "VK_KHR_descriptor_update_template"; -export const NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NVX_device_generated_commands"; -export const NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME = "VK_NV_clip_space_w_scaling"; -export const EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME = "VK_EXT_direct_mode_display"; -export const EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_xlib_display"; -export const EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME = "VK_EXT_display_surface_counter"; -export const EXT_DISPLAY_CONTROL_EXTENSION_NAME = "VK_EXT_display_control"; -export const GOOGLE_DISPLAY_TIMING_EXTENSION_NAME = "VK_GOOGLE_display_timing"; -export const RESERVED_DO_NOT_USE_94_EXTENSION_NAME = "VK_RESERVED_do_not_use_94"; -export const NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME = "VK_NV_sample_mask_override_coverage"; -export const NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME = "VK_NV_geometry_shader_passthrough"; -export const NV_VIEWPORT_ARRAY_2_EXTENSION_NAME = "VK_NV_viewport_array2"; -export const NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME = "VK_NVX_multiview_per_view_attributes"; -export const NV_VIEWPORT_SWIZZLE_EXTENSION_NAME = "VK_NV_viewport_swizzle"; -export const EXT_DISCARD_RECTANGLES_EXTENSION_NAME = "VK_EXT_discard_rectangles"; -export const NV_EXTENSION_101_EXTENSION_NAME = "VK_NV_extension_101"; -export const EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_conservative_rasterization"; -export const EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME = "VK_EXT_depth_clip_enable"; -export const NV_EXTENSION_104_EXTENSION_NAME = "VK_NV_extension_104"; -export const EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME = "VK_EXT_swapchain_colorspace"; -export const EXT_HDR_METADATA_EXTENSION_NAME = "VK_EXT_hdr_metadata"; -export const IMG_EXTENSION_107_EXTENSION_NAME = "VK_IMG_extension_107"; -export const IMG_EXTENSION_108_EXTENSION_NAME = "VK_IMG_extension_108"; -export const KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME = "VK_KHR_imageless_framebuffer"; -export const KHR_CREATE_RENDERPASS_2_EXTENSION_NAME = "VK_KHR_create_renderpass2"; -export const IMG_EXTENSION_111_EXTENSION_NAME = "VK_IMG_extension_111"; -export const KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME = "VK_KHR_shared_presentable_image"; -export const KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_fence_capabilities"; -export const KHR_EXTERNAL_FENCE_EXTENSION_NAME = "VK_KHR_external_fence"; -export const KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32"; -export const KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME = "VK_KHR_external_fence_fd"; -export const KHR_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_KHR_performance_query"; -export const KHR_MAINTENANCE_2_EXTENSION_NAME = "VK_KHR_maintenance2"; -export const KHR_EXTENSION_119_EXTENSION_NAME = "VK_KHR_extension_119"; -export const KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME = "VK_KHR_get_surface_capabilities2"; -export const KHR_VARIABLE_POINTERS_EXTENSION_NAME = "VK_KHR_variable_pointers"; -export const KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_display_properties2"; -export const MVK_IOS_SURFACE_EXTENSION_NAME = "VK_MVK_ios_surface"; -export const MVK_MACOS_SURFACE_EXTENSION_NAME = "VK_MVK_macos_surface"; -export const MVK_MOLTENVK_EXTENSION_NAME = "VK_MVK_moltenvk"; -export const EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME = "VK_EXT_external_memory_dma_buf"; -export const EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME = "VK_EXT_queue_family_foreign"; -export const KHR_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_KHR_dedicated_allocation"; -export const EXT_DEBUG_UTILS_EXTENSION_NAME = "VK_EXT_debug_utils"; -export const ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = "VK_ANDROID_external_memory_android_hardware_buffer"; -export const EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME = "VK_EXT_sampler_filter_minmax"; -export const KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME = "VK_KHR_storage_buffer_storage_class"; -export const AMD_GPU_SHADER_INT16_EXTENSION_NAME = "VK_AMD_gpu_shader_int16"; -export const AMD_EXTENSION_134_EXTENSION_NAME = "VK_AMD_extension_134"; -export const AMD_EXTENSION_135_EXTENSION_NAME = "VK_AMD_extension_135"; -export const AMD_EXTENSION_136_EXTENSION_NAME = "VK_AMD_extension_136"; -export const AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME = "VK_AMD_mixed_attachment_samples"; -export const AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME = "VK_AMD_shader_fragment_mask"; -export const EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME = "VK_EXT_inline_uniform_block"; -export const AMD_EXTENSION_140_EXTENSION_NAME = "VK_AMD_extension_140"; -export const EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME = "VK_EXT_shader_stencil_export"; -export const AMD_EXTENSION_142_EXTENSION_NAME = "VK_AMD_extension_142"; -export const AMD_EXTENSION_143_EXTENSION_NAME = "VK_AMD_extension_143"; -export const EXT_SAMPLE_LOCATIONS_EXTENSION_NAME = "VK_EXT_sample_locations"; -export const KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME = "VK_KHR_relaxed_block_layout"; -export const RESERVED_DO_NOT_USE_146_EXTENSION_NAME = "VK_RESERVED_do_not_use_146"; -export const KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME = "VK_KHR_get_memory_requirements2"; -export const KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME = "VK_KHR_image_format_list"; -export const EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME = "VK_EXT_blend_operation_advanced"; -export const NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME = "VK_NV_fragment_coverage_to_color"; -export const KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_KHR_acceleration_structure"; -export const KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline"; -export const KHR_RAY_QUERY_EXTENSION_NAME = "VK_KHR_ray_query"; -export const NV_EXTENSION_152_EXTENSION_NAME = "VK_NV_extension_152"; -export const NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples"; -export const NV_FILL_RECTANGLE_EXTENSION_NAME = "VK_NV_fill_rectangle"; -export const NV_SHADER_SM_BUILTINS_EXTENSION_NAME = "VK_NV_shader_sm_builtins"; -export const EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME = "VK_EXT_post_depth_coverage"; -export const KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME = "VK_KHR_sampler_ycbcr_conversion"; -export const KHR_BIND_MEMORY_2_EXTENSION_NAME = "VK_KHR_bind_memory2"; -export const EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME = "VK_EXT_image_drm_format_modifier"; -export const EXT_EXTENSION_160_EXTENSION_NAME = "VK_EXT_extension_160"; -export const EXT_VALIDATION_CACHE_EXTENSION_NAME = "VK_EXT_validation_cache"; -export const EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME = "VK_EXT_descriptor_indexing"; -export const EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME = "VK_EXT_shader_viewport_index_layer"; -export const KHR_PORTABILITY_SUBSET_EXTENSION_NAME = "VK_KHR_portability_subset"; -export const NV_SHADING_RATE_IMAGE_EXTENSION_NAME = "VK_NV_shading_rate_image"; -export const NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"; -export const NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME = "VK_NV_representative_fragment_test"; -export const NV_EXTENSION_168_EXTENSION_NAME = "VK_NV_extension_168"; -export const KHR_MAINTENANCE_3_EXTENSION_NAME = "VK_KHR_maintenance3"; -export const KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_KHR_draw_indirect_count"; -export const EXT_FILTER_CUBIC_EXTENSION_NAME = "VK_EXT_filter_cubic"; -export const QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION_NAME = "VK_QCOM_render_pass_shader_resolve"; -export const QCOM_EXTENSION_173_EXTENSION_NAME = "VK_QCOM_extension_173"; -export const QCOM_EXTENSION_174_EXTENSION_NAME = "VK_QCOM_extension_174"; -export const EXT_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_EXT_global_priority"; -export const KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME = "VK_KHR_shader_subgroup_extended_types"; -export const EXT_EXTENSION_177_EXTENSION_NAME = "VK_EXT_extension_177"; -export const KHR_8BIT_STORAGE_EXTENSION_NAME = "VK_KHR_8bit_storage"; -export const EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME = "VK_EXT_external_memory_host"; -export const AMD_BUFFER_MARKER_EXTENSION_NAME = "VK_AMD_buffer_marker"; -export const KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME = "VK_KHR_shader_atomic_int64"; -export const KHR_SHADER_CLOCK_EXTENSION_NAME = "VK_KHR_shader_clock"; -export const AMD_EXTENSION_183_EXTENSION_NAME = "VK_AMD_extension_183"; -export const AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME = "VK_AMD_pipeline_compiler_control"; -export const EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME = "VK_EXT_calibrated_timestamps"; -export const AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_AMD_shader_core_properties"; -export const AMD_EXTENSION_187_EXTENSION_NAME = "VK_AMD_extension_187"; -export const EXT_VIDEO_DECODE_H265_EXTENSION_NAME = "VK_EXT_video_decode_h265"; -export const KHR_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_KHR_global_priority"; -export const AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME = "VK_AMD_memory_overallocation_behavior"; -export const EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME = "VK_EXT_vertex_attribute_divisor"; -export const GGP_FRAME_TOKEN_EXTENSION_NAME = "VK_GGP_frame_token"; -export const EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME = "VK_EXT_pipeline_creation_feedback"; -export const GOOGLE_EXTENSION_194_EXTENSION_NAME = "VK_GOOGLE_extension_194"; -export const GOOGLE_EXTENSION_195_EXTENSION_NAME = "VK_GOOGLE_extension_195"; -export const GOOGLE_EXTENSION_196_EXTENSION_NAME = "VK_GOOGLE_extension_196"; -export const KHR_DRIVER_PROPERTIES_EXTENSION_NAME = "VK_KHR_driver_properties"; -export const KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME = "VK_KHR_shader_float_controls"; -export const NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME = "VK_NV_shader_subgroup_partitioned"; -export const KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME = "VK_KHR_depth_stencil_resolve"; -export const KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME = "VK_KHR_swapchain_mutable_format"; -export const NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME = "VK_NV_compute_shader_derivatives"; -export const NV_MESH_SHADER_EXTENSION_NAME = "VK_NV_mesh_shader"; -export const NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_NV_fragment_shader_barycentric"; -export const NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME = "VK_NV_shader_image_footprint"; -export const NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME = "VK_NV_scissor_exclusive"; -export const NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME = "VK_NV_device_diagnostic_checkpoints"; -export const KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME = "VK_KHR_timeline_semaphore"; -export const KHR_EXTENSION_209_EXTENSION_NAME = "VK_KHR_extension_209"; -export const INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME = "VK_INTEL_shader_integer_functions2"; -export const INTEL_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_INTEL_performance_query"; -export const KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME = "VK_KHR_vulkan_memory_model"; -export const EXT_PCI_BUS_INFO_EXTENSION_NAME = "VK_EXT_pci_bus_info"; -export const AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME = "VK_AMD_display_native_hdr"; -export const FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME = "VK_FUCHSIA_imagepipe_surface"; -export const KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME = "VK_KHR_shader_terminate_invocation"; -export const GOOGLE_EXTENSION_217_EXTENSION_NAME = "VK_GOOGLE_extension_217"; -export const EXT_METAL_SURFACE_EXTENSION_NAME = "VK_EXT_metal_surface"; -export const EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME = "VK_EXT_fragment_density_map"; -export const EXT_EXTENSION_220_EXTENSION_NAME = "VK_EXT_extension_220"; -export const KHR_EXTENSION_221_EXTENSION_NAME = "VK_KHR_extension_221"; -export const EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME = "VK_EXT_scalar_block_layout"; -export const EXT_EXTENSION_223_EXTENSION_NAME = "VK_EXT_extension_223"; -export const GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME = "VK_GOOGLE_hlsl_functionality1"; -export const GOOGLE_DECORATE_STRING_EXTENSION_NAME = "VK_GOOGLE_decorate_string"; -export const EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME = "VK_EXT_subgroup_size_control"; -export const KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"; -export const AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME = "VK_AMD_shader_core_properties2"; -export const AMD_EXTENSION_229_EXTENSION_NAME = "VK_AMD_extension_229"; -export const AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME = "VK_AMD_device_coherent_memory"; -export const AMD_EXTENSION_231_EXTENSION_NAME = "VK_AMD_extension_231"; -export const AMD_EXTENSION_232_EXTENSION_NAME = "VK_AMD_extension_232"; -export const AMD_EXTENSION_233_EXTENSION_NAME = "VK_AMD_extension_233"; -export const AMD_EXTENSION_234_EXTENSION_NAME = "VK_AMD_extension_234"; -export const EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME = "VK_EXT_shader_image_atomic_int64"; -export const AMD_EXTENSION_236_EXTENSION_NAME = "VK_AMD_extension_236"; -export const KHR_SPIRV_1_4_EXTENSION_NAME = "VK_KHR_spirv_1_4"; -export const EXT_MEMORY_BUDGET_EXTENSION_NAME = "VK_EXT_memory_budget"; -export const EXT_MEMORY_PRIORITY_EXTENSION_NAME = "VK_EXT_memory_priority"; -export const KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME = "VK_KHR_surface_protected_capabilities"; -export const NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME = "VK_NV_dedicated_allocation_image_aliasing"; -export const KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME = "VK_KHR_separate_depth_stencil_layouts"; -export const INTEL_EXTENSION_243_EXTENSION_NAME = "VK_INTEL_extension_243"; -export const MESA_EXTENSION_244_EXTENSION_NAME = "VK_MESA_extension_244"; -export const EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_EXT_buffer_device_address"; -export const EXT_TOOLING_INFO_EXTENSION_NAME = "VK_EXT_tooling_info"; -export const EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME = "VK_EXT_separate_stencil_usage"; -export const EXT_VALIDATION_FEATURES_EXTENSION_NAME = "VK_EXT_validation_features"; -export const KHR_PRESENT_WAIT_EXTENSION_NAME = "VK_KHR_present_wait"; -export const NV_COOPERATIVE_MATRIX_EXTENSION_NAME = "VK_NV_cooperative_matrix"; -export const NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME = "VK_NV_coverage_reduction_mode"; -export const EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME = "VK_EXT_fragment_shader_interlock"; -export const EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME = "VK_EXT_ycbcr_image_arrays"; -export const KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME = "VK_KHR_uniform_buffer_standard_layout"; -export const EXT_PROVOKING_VERTEX_EXTENSION_NAME = "VK_EXT_provoking_vertex"; -export const EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME = "VK_EXT_full_screen_exclusive"; -export const EXT_HEADLESS_SURFACE_EXTENSION_NAME = "VK_EXT_headless_surface"; -export const KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_KHR_buffer_device_address"; -export const EXT_EXTENSION_259_EXTENSION_NAME = "VK_EXT_extension_259"; -export const EXT_LINE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_line_rasterization"; -export const EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME = "VK_EXT_shader_atomic_float"; -export const EXT_HOST_QUERY_RESET_EXTENSION_NAME = "VK_EXT_host_query_reset"; -export const GGP_EXTENSION_263_EXTENSION_NAME = "VK_GGP_extension_263"; -export const BRCM_EXTENSION_264_EXTENSION_NAME = "VK_BRCM_extension_264"; -export const BRCM_EXTENSION_265_EXTENSION_NAME = "VK_BRCM_extension_265"; -export const EXT_INDEX_TYPE_UINT8_EXTENSION_NAME = "VK_EXT_index_type_uint8"; -export const EXT_EXTENSION_267_EXTENSION_NAME = "VK_EXT_extension_267"; -export const EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_extended_dynamic_state"; -export const KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME = "VK_KHR_deferred_host_operations"; -export const KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME = "VK_KHR_pipeline_executable_properties"; -export const INTEL_EXTENSION_271_EXTENSION_NAME = "VK_INTEL_extension_271"; -export const INTEL_EXTENSION_272_EXTENSION_NAME = "VK_INTEL_extension_272"; -export const INTEL_EXTENSION_273_EXTENSION_NAME = "VK_INTEL_extension_273"; -export const EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME = "VK_EXT_shader_atomic_float2"; -export const KHR_EXTENSION_275_EXTENSION_NAME = "VK_KHR_extension_275"; -export const KHR_EXTENSION_276_EXTENSION_NAME = "VK_KHR_extension_276"; -export const EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME = "VK_EXT_shader_demote_to_helper_invocation"; -export const NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands"; -export const NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME = "VK_NV_inherited_viewport_scissor"; -export const KHR_EXTENSION_280_EXTENSION_NAME = "VK_KHR_extension_280"; -export const KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME = "VK_KHR_shader_integer_dot_product"; -export const EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME = "VK_EXT_texel_buffer_alignment"; -export const QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME = "VK_QCOM_render_pass_transform"; -export const EXT_EXTENSION_284_EXTENSION_NAME = "VK_EXT_extension_284"; -export const EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME = "VK_EXT_device_memory_report"; -export const EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_drm_display"; -export const EXT_ROBUSTNESS_2_EXTENSION_NAME = "VK_EXT_robustness2"; -export const EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME = "VK_EXT_custom_border_color"; -export const EXT_EXTENSION_289_EXTENSION_NAME = "VK_EXT_extension_289"; -export const GOOGLE_USER_TYPE_EXTENSION_NAME = "VK_GOOGLE_user_type"; -export const KHR_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_KHR_pipeline_library"; -export const NV_EXTENSION_292_EXTENSION_NAME = "VK_NV_extension_292"; -export const NV_PRESENT_BARRIER_EXTENSION_NAME = "VK_NV_present_barrier"; -export const KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME = "VK_KHR_shader_non_semantic_info"; -export const KHR_PRESENT_ID_EXTENSION_NAME = "VK_KHR_present_id"; -export const EXT_PRIVATE_DATA_EXTENSION_NAME = "VK_EXT_private_data"; -export const KHR_EXTENSION_297_EXTENSION_NAME = "VK_KHR_extension_297"; -export const EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME = "VK_EXT_pipeline_creation_cache_control"; -export const KHR_EXTENSION_299_EXTENSION_NAME = "VK_KHR_extension_299"; -export const KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_encode_queue"; -export const NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME = "VK_NV_device_diagnostics_config"; -export const QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME = "VK_QCOM_render_pass_store_ops"; -export const QCOM_EXTENSION_303_EXTENSION_NAME = "VK_QCOM_extension_303"; -export const QCOM_EXTENSION_304_EXTENSION_NAME = "VK_QCOM_extension_304"; -export const QCOM_EXTENSION_305_EXTENSION_NAME = "VK_QCOM_extension_305"; -export const QCOM_EXTENSION_306_EXTENSION_NAME = "VK_QCOM_extension_306"; -export const QCOM_EXTENSION_307_EXTENSION_NAME = "VK_QCOM_extension_307"; -export const NV_EXTENSION_308_EXTENSION_NAME = "VK_NV_extension_308"; -export const KHR_EXTENSION_309_EXTENSION_NAME = "VK_KHR_extension_309"; -export const QCOM_EXTENSION_310_EXTENSION_NAME = "VK_QCOM_extension_310"; -export const NV_EXTENSION_311_EXTENSION_NAME = "VK_NV_extension_311"; -export const EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects"; -export const EXT_EXTENSION_313_EXTENSION_NAME = "VK_EXT_extension_313"; -export const AMD_EXTENSION_314_EXTENSION_NAME = "VK_AMD_extension_314"; -export const KHR_SYNCHRONIZATION_2_EXTENSION_NAME = "VK_KHR_synchronization2"; -export const AMD_EXTENSION_316_EXTENSION_NAME = "VK_AMD_extension_316"; -export const EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME = "VK_EXT_descriptor_buffer"; -export const AMD_EXTENSION_318_EXTENSION_NAME = "VK_AMD_extension_318"; -export const AMD_EXTENSION_319_EXTENSION_NAME = "VK_AMD_extension_319"; -export const AMD_EXTENSION_320_EXTENSION_NAME = "VK_AMD_extension_320"; -export const EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_EXT_graphics_pipeline_library"; -export const AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_EXTENSION_NAME = "VK_AMD_shader_early_and_late_fragment_tests"; -export const KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_KHR_fragment_shader_barycentric"; -export const KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME = "VK_KHR_shader_subgroup_uniform_control_flow"; -export const KHR_EXTENSION_325_EXTENSION_NAME = "VK_KHR_extension_325"; -export const KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME = "VK_KHR_zero_initialize_workgroup_memory"; -export const NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME = "VK_NV_fragment_shading_rate_enums"; -export const NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME = "VK_NV_ray_tracing_motion_blur"; -export const EXT_MESH_SHADER_EXTENSION_NAME = "VK_EXT_mesh_shader"; -export const NV_EXTENSION_330_EXTENSION_NAME = "VK_NV_extension_330"; -export const EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME = "VK_EXT_ycbcr_2plane_444_formats"; -export const NV_EXTENSION_332_EXTENSION_NAME = "VK_NV_extension_332"; -export const EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME = "VK_EXT_fragment_density_map2"; -export const QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME = "VK_QCOM_rotated_copy_commands"; -export const KHR_EXTENSION_335_EXTENSION_NAME = "VK_KHR_extension_335"; -export const EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_image_robustness"; -export const KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME = "VK_KHR_workgroup_memory_explicit_layout"; -export const KHR_COPY_COMMANDS_2_EXTENSION_NAME = "VK_KHR_copy_commands2"; -export const EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME = "VK_EXT_image_compression_control"; -export const EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME = "VK_EXT_attachment_feedback_loop_layout"; -export const EXT_4444_FORMATS_EXTENSION_NAME = "VK_EXT_4444_formats"; -export const EXT_DEVICE_FAULT_EXTENSION_NAME = "VK_EXT_device_fault"; -export const ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_ARM_rasterization_order_attachment_access"; -export const ARM_EXTENSION_344_EXTENSION_NAME = "VK_ARM_extension_344"; -export const EXT_RGBA10X6_FORMATS_EXTENSION_NAME = "VK_EXT_rgba10x6_formats"; -export const NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME = "VK_NV_acquire_winrt_display"; -export const EXT_DIRECTFB_SURFACE_EXTENSION_NAME = "VK_EXT_directfb_surface"; -export const KHR_EXTENSION_350_EXTENSION_NAME = "VK_KHR_extension_350"; -export const NV_EXTENSION_351_EXTENSION_NAME = "VK_NV_extension_351"; -export const VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_VALVE_mutable_descriptor_type"; -export const EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_vertex_input_dynamic_state"; -export const EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME = "VK_EXT_physical_device_drm"; -export const EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME = "VK_EXT_device_address_binding_report"; -export const EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clip_control"; -export const EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME = "VK_EXT_primitive_topology_list_restart"; -export const KHR_EXTENSION_358_EXTENSION_NAME = "VK_KHR_extension_358"; -export const EXT_EXTENSION_359_EXTENSION_NAME = "VK_EXT_extension_359"; -export const EXT_EXTENSION_360_EXTENSION_NAME = "VK_EXT_extension_360"; -export const KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME = "VK_KHR_format_feature_flags2"; -export const EXT_EXTENSION_362_EXTENSION_NAME = "VK_EXT_extension_362"; -export const EXT_EXTENSION_363_EXTENSION_NAME = "VK_EXT_extension_363"; -export const FUCHSIA_EXTENSION_364_EXTENSION_NAME = "VK_FUCHSIA_extension_364"; -export const FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_FUCHSIA_external_memory"; -export const FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore"; -export const FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME = "VK_FUCHSIA_buffer_collection"; -export const FUCHSIA_EXTENSION_368_EXTENSION_NAME = "VK_FUCHSIA_extension_368"; -export const QCOM_EXTENSION_369_EXTENSION_NAME = "VK_QCOM_extension_369"; -export const HUAWEI_SUBPASS_SHADING_EXTENSION_NAME = "VK_HUAWEI_subpass_shading"; -export const HUAWEI_INVOCATION_MASK_EXTENSION_NAME = "VK_HUAWEI_invocation_mask"; -export const NV_EXTERNAL_MEMORY_RDMA_EXTENSION_NAME = "VK_NV_external_memory_rdma"; -export const EXT_PIPELINE_PROPERTIES_EXTENSION_NAME = "VK_EXT_pipeline_properties"; -export const NV_EXTENSION_374_EXTENSION_NAME = "VK_NV_extension_374"; -export const NV_EXTENSION_375_EXTENSION_NAME = "VK_NV_extension_375"; -export const EXT_EXTENSION_376_EXTENSION_NAME = "VK_EXT_extension_376"; -export const EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME = "VK_EXT_multisampled_render_to_single_sampled"; -export const EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME = "VK_EXT_extended_dynamic_state2"; -export const QNX_SCREEN_SURFACE_EXTENSION_NAME = "VK_QNX_screen_surface"; -export const KHR_EXTENSION_380_EXTENSION_NAME = "VK_KHR_extension_380"; -export const KHR_EXTENSION_381_EXTENSION_NAME = "VK_KHR_extension_381"; -export const EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME = "VK_EXT_color_write_enable"; -export const EXT_PRIMITIVES_GENERATED_QUERY_EXTENSION_NAME = "VK_EXT_primitives_generated_query"; -export const EXT_EXTENSION_384_EXTENSION_NAME = "VK_EXT_extension_384"; -export const MESA_EXTENSION_385_EXTENSION_NAME = "VK_MESA_extension_385"; -export const GOOGLE_EXTENSION_386_EXTENSION_NAME = "VK_GOOGLE_extension_386"; -export const KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_ray_tracing_maintenance1"; -export const EXT_EXTENSION_388_EXTENSION_NAME = "VK_EXT_extension_388"; -export const EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME = "VK_EXT_global_priority_query"; -export const EXT_EXTENSION_390_EXTENSION_NAME = "VK_EXT_extension_390"; -export const EXT_EXTENSION_391_EXTENSION_NAME = "VK_EXT_extension_391"; -export const EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME = "VK_EXT_image_view_min_lod"; -export const EXT_MULTI_DRAW_EXTENSION_NAME = "VK_EXT_multi_draw"; -export const EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME = "VK_EXT_image_2d_view_of_3d"; -export const KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME = "VK_KHR_portability_enumeration"; -export const KHR_EXTENSION_396_EXTENSION_NAME = "VK_KHR_extension_396"; -export const EXT_OPACITY_MICROMAP_EXTENSION_NAME = "VK_EXT_opacity_micromap"; -export const NV_EXTENSION_398_EXTENSION_NAME = "VK_NV_extension_398"; -export const JUICE_EXTENSION_399_EXTENSION_NAME = "VK_JUICE_extension_399"; -export const JUICE_EXTENSION_400_EXTENSION_NAME = "VK_JUICE_extension_400"; -export const EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME = "VK_EXT_load_store_op_none"; -export const FB_EXTENSION_402_EXTENSION_NAME = "VK_FB_extension_402"; -export const FB_EXTENSION_403_EXTENSION_NAME = "VK_FB_extension_403"; -export const FB_EXTENSION_404_EXTENSION_NAME = "VK_FB_extension_404"; -export const HUAWEI_EXTENSION_405_EXTENSION_NAME = "VK_HUAWEI_extension_405"; -export const HUAWEI_EXTENSION_406_EXTENSION_NAME = "VK_HUAWEI_extension_406"; -export const GGP_EXTENSION_407_EXTENSION_NAME = "VK_GGP_extension_407"; -export const GGP_EXTENSION_408_EXTENSION_NAME = "VK_GGP_extension_408"; -export const GGP_EXTENSION_409_EXTENSION_NAME = "VK_GGP_extension_409"; -export const GGP_EXTENSION_410_EXTENSION_NAME = "VK_GGP_extension_410"; -export const GGP_EXTENSION_411_EXTENSION_NAME = "VK_GGP_extension_411"; -export const EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME = "VK_EXT_border_color_swizzle"; -export const EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME = "VK_EXT_pageable_device_local_memory"; -export const KHR_MAINTENANCE_4_EXTENSION_NAME = "VK_KHR_maintenance4"; -export const HUAWEI_EXTENSION_415_EXTENSION_NAME = "VK_HUAWEI_extension_415"; -export const ARM_EXTENSION_416_EXTENSION_NAME = "VK_ARM_extension_416"; -export const KHR_EXTENSION_417_EXTENSION_NAME = "VK_KHR_extension_417"; -export const ARM_EXTENSION_418_EXTENSION_NAME = "VK_ARM_extension_418"; -export const EXT_EXTENSION_419_EXTENSION_NAME = "VK_EXT_extension_419"; -export const EXT_EXTENSION_420_EXTENSION_NAME = "VK_EXT_extension_420"; -export const VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME = "VK_VALVE_descriptor_set_host_mapping"; -export const EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME = "VK_EXT_depth_clamp_zero_one"; -export const EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME = "VK_EXT_non_seamless_cube_map"; -export const ARM_EXTENSION_424_EXTENSION_NAME = "VK_ARM_extension_424"; -export const ARM_EXTENSION_425_EXTENSION_NAME = "VK_ARM_extension_425"; -export const QCOM_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME = "VK_QCOM_fragment_density_map_offset"; -export const NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_NV_copy_memory_indirect"; -export const NV_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_NV_memory_decompression"; -export const NV_EXTENSION_429_EXTENSION_NAME = "VK_NV_extension_429"; -export const NV_EXTENSION_430_EXTENSION_NAME = "VK_NV_extension_430"; -export const NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME = "VK_NV_linear_color_attachment"; -export const NV_EXTENSION_432_EXTENSION_NAME = "VK_NV_extension_432"; -export const NV_EXTENSION_433_EXTENSION_NAME = "VK_NV_extension_433"; -export const GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME = "VK_GOOGLE_surfaceless_query"; -export const KHR_EXTENSION_435_EXTENSION_NAME = "VK_KHR_extension_435"; -export const NV_EXTENSION_436_EXTENSION_NAME = "VK_NV_extension_436"; -export const EXT_EXTENSION_437_EXTENSION_NAME = "VK_EXT_extension_437"; -export const EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME = "VK_EXT_image_compression_control_swapchain"; -export const SEC_EXTENSION_439_EXTENSION_NAME = "VK_SEC_extension_439"; -export const QCOM_EXTENSION_440_EXTENSION_NAME = "VK_QCOM_extension_440"; -export const QCOM_IMAGE_PROCESSING_EXTENSION_NAME = "VK_QCOM_image_processing"; -export const COREAVI_EXTENSION_442_EXTENSION_NAME = "VK_COREAVI_extension_442"; -export const COREAVI_EXTENSION_443_EXTENSION_NAME = "VK_COREAVI_extension_443"; -export const COREAVI_EXTENSION_444_EXTENSION_NAME = "VK_COREAVI_extension_444"; -export const COREAVI_EXTENSION_445_EXTENSION_NAME = "VK_COREAVI_extension_445"; -export const COREAVI_EXTENSION_446_EXTENSION_NAME = "VK_COREAVI_extension_446"; -export const COREAVI_EXTENSION_447_EXTENSION_NAME = "VK_COREAVI_extension_447"; -export const SEC_EXTENSION_448_EXTENSION_NAME = "VK_SEC_extension_448"; -export const SEC_EXTENSION_449_EXTENSION_NAME = "VK_SEC_extension_449"; -export const SEC_EXTENSION_450_EXTENSION_NAME = "VK_SEC_extension_450"; -export const SEC_EXTENSION_451_EXTENSION_NAME = "VK_SEC_extension_451"; -export const NV_EXTENSION_452_EXTENSION_NAME = "VK_NV_extension_452"; -export const ARM_EXTENSION_453_EXTENSION_NAME = "VK_ARM_extension_453"; -export const GOOGLE_EXTENSION_454_EXTENSION_NAME = "VK_GOOGLE_extension_454"; -export const GOOGLE_EXTENSION_455_EXTENSION_NAME = "VK_GOOGLE_extension_455"; -export const EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME = "VK_EXT_extended_dynamic_state3"; -export const EXT_EXTENSION_457_EXTENSION_NAME = "VK_EXT_extension_457"; -export const EXT_EXTENSION_458_EXTENSION_NAME = "VK_EXT_extension_458"; -export const EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME = "VK_EXT_subpass_merge_feedback"; -export const EXT_EXTENSION_460_EXTENSION_NAME = "VK_EXT_extension_460"; -export const EXT_EXTENSION_461_EXTENSION_NAME = "VK_EXT_extension_461"; -export const EXT_EXTENSION_462_EXTENSION_NAME = "VK_EXT_extension_462"; -export const EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME = "VK_EXT_shader_module_identifier"; -export const EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_EXT_rasterization_order_attachment_access"; -export const NV_OPTICAL_FLOW_EXTENSION_NAME = "VK_NV_optical_flow"; -export const EXT_LEGACY_DITHERING_EXTENSION_NAME = "VK_EXT_legacy_dithering"; -export const EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME = "VK_EXT_pipeline_protected_access"; -export const EXT_EXTENSION_468_EXTENSION_NAME = "VK_EXT_extension_468"; -export const ANDROID_EXTENSION_469_EXTENSION_NAME = "VK_ANDROID_extension_469"; -export const AMD_EXTENSION_470_EXTENSION_NAME = "VK_AMD_extension_470"; -export const AMD_EXTENSION_471_EXTENSION_NAME = "VK_AMD_extension_471"; -export const AMD_EXTENSION_472_EXTENSION_NAME = "VK_AMD_extension_472"; -export const AMD_EXTENSION_473_EXTENSION_NAME = "VK_AMD_extension_473"; -export const AMD_EXTENSION_474_EXTENSION_NAME = "VK_AMD_extension_474"; -export const AMD_EXTENSION_475_EXTENSION_NAME = "VK_AMD_extension_475"; -export const AMD_EXTENSION_476_EXTENSION_NAME = "VK_AMD_extension_476"; -export const AMD_EXTENSION_477_EXTENSION_NAME = "VK_AMD_extension_477"; -export const AMD_EXTENSION_478_EXTENSION_NAME = "VK_AMD_extension_478"; -export const AMD_EXTENSION_479_EXTENSION_NAME = "VK_AMD_extension_479"; -export const EXT_EXTENSION_480_EXTENSION_NAME = "VK_EXT_extension_480"; -export const EXT_EXTENSION_481_EXTENSION_NAME = "VK_EXT_extension_481"; -export const EXT_EXTENSION_482_EXTENSION_NAME = "VK_EXT_extension_482"; -export const EXT_EXTENSION_483_EXTENSION_NAME = "VK_EXT_extension_483"; -export const EXT_EXTENSION_484_EXTENSION_NAME = "VK_EXT_extension_484"; -export const QCOM_TILE_PROPERTIES_EXTENSION_NAME = "VK_QCOM_tile_properties"; -export const SEC_AMIGO_PROFILING_EXTENSION_NAME = "VK_SEC_amigo_profiling"; -export const EXT_EXTENSION_487_EXTENSION_NAME = "VK_EXT_extension_487"; -export const EXT_EXTENSION_488_EXTENSION_NAME = "VK_EXT_extension_488"; -export const QCOM_EXTENSION_489_EXTENSION_NAME = "VK_QCOM_extension_489"; -export const NV_EXTENSION_490_EXTENSION_NAME = "VK_NV_extension_490"; -export const NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME = "VK_NV_ray_tracing_invocation_reorder"; -export const NV_EXTENSION_492_EXTENSION_NAME = "VK_NV_extension_492"; -export const NV_EXTENSION_493_EXTENSION_NAME = "VK_NV_extension_493"; -export const NV_EXTENSION_494_EXTENSION_NAME = "VK_NV_extension_494"; -export const EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_EXT_mutable_descriptor_type"; -export const EXT_EXTENSION_496_EXTENSION_NAME = "VK_EXT_extension_496"; -export const EXT_EXTENSION_497_EXTENSION_NAME = "VK_EXT_extension_497"; -export const ARM_SHADER_CORE_BUILTINS_EXTENSION_NAME = "VK_ARM_shader_core_builtins"; -export const EXT_EXTENSION_499_EXTENSION_NAME = "VK_EXT_extension_499"; -export const EXT_EXTENSION_500_EXTENSION_NAME = "VK_EXT_extension_500"; -export const EXT_EXTENSION_501_EXTENSION_NAME = "VK_EXT_extension_501"; -export const EXT_EXTENSION_502_EXTENSION_NAME = "VK_EXT_extension_502"; -export const EXT_EXTENSION_503_EXTENSION_NAME = "VK_EXT_extension_503"; -export const NV_EXTENSION_504_EXTENSION_NAME = "VK_NV_extension_504"; -export var StdVideoH264ChromaFormatIdc; -!function(StdVideoH264ChromaFormatIdc) { - StdVideoH264ChromaFormatIdc[StdVideoH264ChromaFormatIdc.MONOCHROME = 0] = "MONOCHROME", StdVideoH264ChromaFormatIdc[StdVideoH264ChromaFormatIdc.VK_420 = 1] = "VK_420", StdVideoH264ChromaFormatIdc[StdVideoH264ChromaFormatIdc.VK_422 = 2] = "VK_422", StdVideoH264ChromaFormatIdc[StdVideoH264ChromaFormatIdc.VK_444 = 3] = "VK_444", StdVideoH264ChromaFormatIdc[StdVideoH264ChromaFormatIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264ChromaFormatIdc || (StdVideoH264ChromaFormatIdc = {})); -export var StdVideoH264ProfileIdc; -!function(StdVideoH264ProfileIdc) { - StdVideoH264ProfileIdc[StdVideoH264ProfileIdc.BASELINE = 66] = "BASELINE", StdVideoH264ProfileIdc[StdVideoH264ProfileIdc.MAIN = 77] = "MAIN", StdVideoH264ProfileIdc[StdVideoH264ProfileIdc.HIGH = 100] = "HIGH", StdVideoH264ProfileIdc[StdVideoH264ProfileIdc.HIGH_444_PREDICTIVE = 244] = "HIGH_444_PREDICTIVE", StdVideoH264ProfileIdc[StdVideoH264ProfileIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264ProfileIdc || (StdVideoH264ProfileIdc = {})); -export var StdVideoH264LevelIdc; -!function(StdVideoH264LevelIdc) { - StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_1_0 = 0] = "VK_1_0", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_1_1 = 1] = "VK_1_1", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_1_2 = 2] = "VK_1_2", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_1_3 = 3] = "VK_1_3", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_2_0 = 4] = "VK_2_0", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_2_1 = 5] = "VK_2_1", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_2_2 = 6] = "VK_2_2", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_3_0 = 7] = "VK_3_0", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_3_1 = 8] = "VK_3_1", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_3_2 = 9] = "VK_3_2", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_4_0 = 10] = "VK_4_0", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_4_1 = 11] = "VK_4_1", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_4_2 = 12] = "VK_4_2", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_5_0 = 13] = "VK_5_0", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_5_1 = 14] = "VK_5_1", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_5_2 = 15] = "VK_5_2", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_6_0 = 16] = "VK_6_0", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_6_1 = 17] = "VK_6_1", StdVideoH264LevelIdc[StdVideoH264LevelIdc.VK_6_2 = 18] = "VK_6_2", StdVideoH264LevelIdc[StdVideoH264LevelIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264LevelIdc || (StdVideoH264LevelIdc = {})); -export var StdVideoH264PocType; -!function(StdVideoH264PocType) { - StdVideoH264PocType[StdVideoH264PocType.VK_0 = 0] = "VK_0", StdVideoH264PocType[StdVideoH264PocType.VK_1 = 1] = "VK_1", StdVideoH264PocType[StdVideoH264PocType.VK_2 = 2] = "VK_2", StdVideoH264PocType[StdVideoH264PocType.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264PocType || (StdVideoH264PocType = {})); -export var StdVideoH264AspectRatioIdc; -!function(StdVideoH264AspectRatioIdc) { - StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.UNSPECIFIED = 0] = "UNSPECIFIED", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.SQUARE = 1] = "SQUARE", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_12_11 = 2] = "VK_12_11", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_10_11 = 3] = "VK_10_11", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_16_11 = 4] = "VK_16_11", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_40_33 = 5] = "VK_40_33", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_24_11 = 6] = "VK_24_11", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_20_11 = 7] = "VK_20_11", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_32_11 = 8] = "VK_32_11", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_80_33 = 9] = "VK_80_33", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_18_11 = 10] = "VK_18_11", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_15_11 = 11] = "VK_15_11", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_64_33 = 12] = "VK_64_33", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_160_99 = 13] = "VK_160_99", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_4_3 = 14] = "VK_4_3", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_3_2 = 15] = "VK_3_2", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.VK_2_1 = 16] = "VK_2_1", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.EXTENDED_SAR = 255] = "EXTENDED_SAR", StdVideoH264AspectRatioIdc[StdVideoH264AspectRatioIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264AspectRatioIdc || (StdVideoH264AspectRatioIdc = {})); -export var StdVideoH264WeightedBipredIdc; -!function(StdVideoH264WeightedBipredIdc) { - StdVideoH264WeightedBipredIdc[StdVideoH264WeightedBipredIdc.DEFAULT = 0] = "DEFAULT", StdVideoH264WeightedBipredIdc[StdVideoH264WeightedBipredIdc.EXPLICIT = 1] = "EXPLICIT", StdVideoH264WeightedBipredIdc[StdVideoH264WeightedBipredIdc.IMPLICIT = 2] = "IMPLICIT", StdVideoH264WeightedBipredIdc[StdVideoH264WeightedBipredIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264WeightedBipredIdc || (StdVideoH264WeightedBipredIdc = {})); -export var StdVideoH264ModificationOfPicNumsIdc; -!function(StdVideoH264ModificationOfPicNumsIdc) { - StdVideoH264ModificationOfPicNumsIdc[StdVideoH264ModificationOfPicNumsIdc.SHORT_TERM_SUBTRACT = 0] = "SHORT_TERM_SUBTRACT", StdVideoH264ModificationOfPicNumsIdc[StdVideoH264ModificationOfPicNumsIdc.SHORT_TERM_ADD = 1] = "SHORT_TERM_ADD", StdVideoH264ModificationOfPicNumsIdc[StdVideoH264ModificationOfPicNumsIdc.LONG_TERM = 2] = "LONG_TERM", StdVideoH264ModificationOfPicNumsIdc[StdVideoH264ModificationOfPicNumsIdc.END = 3] = "END", StdVideoH264ModificationOfPicNumsIdc[StdVideoH264ModificationOfPicNumsIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264ModificationOfPicNumsIdc || (StdVideoH264ModificationOfPicNumsIdc = {})); -export var StdVideoH264MemMgmtControlOp; -!function(StdVideoH264MemMgmtControlOp) { - StdVideoH264MemMgmtControlOp[StdVideoH264MemMgmtControlOp.END = 0] = "END", StdVideoH264MemMgmtControlOp[StdVideoH264MemMgmtControlOp.UNMARK_SHORT_TERM = 1] = "UNMARK_SHORT_TERM", StdVideoH264MemMgmtControlOp[StdVideoH264MemMgmtControlOp.UNMARK_LONG_TERM = 2] = "UNMARK_LONG_TERM", StdVideoH264MemMgmtControlOp[StdVideoH264MemMgmtControlOp.MARK_LONG_TERM = 3] = "MARK_LONG_TERM", StdVideoH264MemMgmtControlOp[StdVideoH264MemMgmtControlOp.SET_MAX_LONG_TERM_INDEX = 4] = "SET_MAX_LONG_TERM_INDEX", StdVideoH264MemMgmtControlOp[StdVideoH264MemMgmtControlOp.UNMARK_ALL = 5] = "UNMARK_ALL", StdVideoH264MemMgmtControlOp[StdVideoH264MemMgmtControlOp.MARK_CURRENT_AS_LONG_TERM = 6] = "MARK_CURRENT_AS_LONG_TERM", StdVideoH264MemMgmtControlOp[StdVideoH264MemMgmtControlOp.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264MemMgmtControlOp || (StdVideoH264MemMgmtControlOp = {})); -export var StdVideoH264CabacInitIdc; -!function(StdVideoH264CabacInitIdc) { - StdVideoH264CabacInitIdc[StdVideoH264CabacInitIdc.VK_0 = 0] = "VK_0", StdVideoH264CabacInitIdc[StdVideoH264CabacInitIdc.VK_1 = 1] = "VK_1", StdVideoH264CabacInitIdc[StdVideoH264CabacInitIdc.VK_2 = 2] = "VK_2", StdVideoH264CabacInitIdc[StdVideoH264CabacInitIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264CabacInitIdc || (StdVideoH264CabacInitIdc = {})); -export var StdVideoH264DisableDeblockingFilterIdc; -!function(StdVideoH264DisableDeblockingFilterIdc) { - StdVideoH264DisableDeblockingFilterIdc[StdVideoH264DisableDeblockingFilterIdc.DISABLED = 0] = "DISABLED", StdVideoH264DisableDeblockingFilterIdc[StdVideoH264DisableDeblockingFilterIdc.ENABLED = 1] = "ENABLED", StdVideoH264DisableDeblockingFilterIdc[StdVideoH264DisableDeblockingFilterIdc.PARTIAL = 2] = "PARTIAL", StdVideoH264DisableDeblockingFilterIdc[StdVideoH264DisableDeblockingFilterIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264DisableDeblockingFilterIdc || (StdVideoH264DisableDeblockingFilterIdc = {})); -export var StdVideoH264SliceType; -!function(StdVideoH264SliceType) { - StdVideoH264SliceType[StdVideoH264SliceType.P = 0] = "P", StdVideoH264SliceType[StdVideoH264SliceType.B = 1] = "B", StdVideoH264SliceType[StdVideoH264SliceType.I = 2] = "I", StdVideoH264SliceType[StdVideoH264SliceType.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264SliceType || (StdVideoH264SliceType = {})); -export var StdVideoH264PictureType; -!function(StdVideoH264PictureType) { - StdVideoH264PictureType[StdVideoH264PictureType.P = 0] = "P", StdVideoH264PictureType[StdVideoH264PictureType.B = 1] = "B", StdVideoH264PictureType[StdVideoH264PictureType.I = 2] = "I", StdVideoH264PictureType[StdVideoH264PictureType.IDR = 5] = "IDR", StdVideoH264PictureType[StdVideoH264PictureType.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264PictureType || (StdVideoH264PictureType = {})); -export var StdVideoH264NonVclNaluType; -!function(StdVideoH264NonVclNaluType) { - StdVideoH264NonVclNaluType[StdVideoH264NonVclNaluType.SPS = 0] = "SPS", StdVideoH264NonVclNaluType[StdVideoH264NonVclNaluType.PPS = 1] = "PPS", StdVideoH264NonVclNaluType[StdVideoH264NonVclNaluType.AUD = 2] = "AUD", StdVideoH264NonVclNaluType[StdVideoH264NonVclNaluType.PREFIX = 3] = "PREFIX", StdVideoH264NonVclNaluType[StdVideoH264NonVclNaluType.END_OF_SEQUENCE = 4] = "END_OF_SEQUENCE", StdVideoH264NonVclNaluType[StdVideoH264NonVclNaluType.END_OF_STREAM = 5] = "END_OF_STREAM", StdVideoH264NonVclNaluType[StdVideoH264NonVclNaluType.PRECODED = 6] = "PRECODED", StdVideoH264NonVclNaluType[StdVideoH264NonVclNaluType.INVALID = 2147483647] = "INVALID"; -}(StdVideoH264NonVclNaluType || (StdVideoH264NonVclNaluType = {})); -export var StdVideoDecodeH264FieldOrderCount; -!function(StdVideoDecodeH264FieldOrderCount) { - StdVideoDecodeH264FieldOrderCount[StdVideoDecodeH264FieldOrderCount.TOP = 0] = "TOP", StdVideoDecodeH264FieldOrderCount[StdVideoDecodeH264FieldOrderCount.BOTTOM = 1] = "BOTTOM", StdVideoDecodeH264FieldOrderCount[StdVideoDecodeH264FieldOrderCount.INVALID = 2147483647] = "INVALID"; -}(StdVideoDecodeH264FieldOrderCount || (StdVideoDecodeH264FieldOrderCount = {})); -export var StdVideoH265ChromaFormatIdc; -!function(StdVideoH265ChromaFormatIdc) { - StdVideoH265ChromaFormatIdc[StdVideoH265ChromaFormatIdc.MONOCHROME = 0] = "MONOCHROME", StdVideoH265ChromaFormatIdc[StdVideoH265ChromaFormatIdc.VK_420 = 1] = "VK_420", StdVideoH265ChromaFormatIdc[StdVideoH265ChromaFormatIdc.VK_422 = 2] = "VK_422", StdVideoH265ChromaFormatIdc[StdVideoH265ChromaFormatIdc.VK_444 = 3] = "VK_444", StdVideoH265ChromaFormatIdc[StdVideoH265ChromaFormatIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH265ChromaFormatIdc || (StdVideoH265ChromaFormatIdc = {})); -export var StdVideoH265ProfileIdc; -!function(StdVideoH265ProfileIdc) { - StdVideoH265ProfileIdc[StdVideoH265ProfileIdc.MAIN = 1] = "MAIN", StdVideoH265ProfileIdc[StdVideoH265ProfileIdc.MAIN_10 = 2] = "MAIN_10", StdVideoH265ProfileIdc[StdVideoH265ProfileIdc.MAIN_STILL_PICTURE = 3] = "MAIN_STILL_PICTURE", StdVideoH265ProfileIdc[StdVideoH265ProfileIdc.FORMAT_RANGE_EXTENSIONS = 4] = "FORMAT_RANGE_EXTENSIONS", StdVideoH265ProfileIdc[StdVideoH265ProfileIdc.SCC_EXTENSIONS = 9] = "SCC_EXTENSIONS", StdVideoH265ProfileIdc[StdVideoH265ProfileIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH265ProfileIdc || (StdVideoH265ProfileIdc = {})); -export var StdVideoH265LevelIdc; -!function(StdVideoH265LevelIdc) { - StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_1_0 = 0] = "VK_1_0", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_2_0 = 1] = "VK_2_0", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_2_1 = 2] = "VK_2_1", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_3_0 = 3] = "VK_3_0", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_3_1 = 4] = "VK_3_1", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_4_0 = 5] = "VK_4_0", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_4_1 = 6] = "VK_4_1", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_5_0 = 7] = "VK_5_0", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_5_1 = 8] = "VK_5_1", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_5_2 = 9] = "VK_5_2", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_6_0 = 10] = "VK_6_0", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_6_1 = 11] = "VK_6_1", StdVideoH265LevelIdc[StdVideoH265LevelIdc.VK_6_2 = 12] = "VK_6_2", StdVideoH265LevelIdc[StdVideoH265LevelIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH265LevelIdc || (StdVideoH265LevelIdc = {})); -export var StdVideoH265SliceType; -!function(StdVideoH265SliceType) { - StdVideoH265SliceType[StdVideoH265SliceType.B = 0] = "B", StdVideoH265SliceType[StdVideoH265SliceType.P = 1] = "P", StdVideoH265SliceType[StdVideoH265SliceType.I = 2] = "I", StdVideoH265SliceType[StdVideoH265SliceType.INVALID = 2147483647] = "INVALID"; -}(StdVideoH265SliceType || (StdVideoH265SliceType = {})); -export var StdVideoH265PictureType; -!function(StdVideoH265PictureType) { - StdVideoH265PictureType[StdVideoH265PictureType.P = 0] = "P", StdVideoH265PictureType[StdVideoH265PictureType.B = 1] = "B", StdVideoH265PictureType[StdVideoH265PictureType.I = 2] = "I", StdVideoH265PictureType[StdVideoH265PictureType.IDR = 3] = "IDR", StdVideoH265PictureType[StdVideoH265PictureType.INVALID = 2147483647] = "INVALID"; -}(StdVideoH265PictureType || (StdVideoH265PictureType = {})); -export var StdVideoH265AspectRatioIdc; -!function(StdVideoH265AspectRatioIdc) { - StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.UNSPECIFIED = 0] = "UNSPECIFIED", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.SQUARE = 1] = "SQUARE", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_12_11 = 2] = "VK_12_11", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_10_11 = 3] = "VK_10_11", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_16_11 = 4] = "VK_16_11", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_40_33 = 5] = "VK_40_33", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_24_11 = 6] = "VK_24_11", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_20_11 = 7] = "VK_20_11", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_32_11 = 8] = "VK_32_11", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_80_33 = 9] = "VK_80_33", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_18_11 = 10] = "VK_18_11", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_15_11 = 11] = "VK_15_11", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_64_33 = 12] = "VK_64_33", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_160_99 = 13] = "VK_160_99", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_4_3 = 14] = "VK_4_3", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_3_2 = 15] = "VK_3_2", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.VK_2_1 = 16] = "VK_2_1", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.EXTENDED_SAR = 255] = "EXTENDED_SAR", StdVideoH265AspectRatioIdc[StdVideoH265AspectRatioIdc.INVALID = 2147483647] = "INVALID"; -}(StdVideoH265AspectRatioIdc || (StdVideoH265AspectRatioIdc = {})); -export var ImageLayout; -!function(ImageLayout) { - ImageLayout[ImageLayout.UNDEFINED = 0] = "UNDEFINED", ImageLayout[ImageLayout.GENERAL = 1] = "GENERAL", ImageLayout[ImageLayout.COLOR_ATTACHMENT_OPTIMAL = 2] = "COLOR_ATTACHMENT_OPTIMAL", ImageLayout[ImageLayout.DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3] = "DEPTH_STENCIL_ATTACHMENT_OPTIMAL", ImageLayout[ImageLayout.DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4] = "DEPTH_STENCIL_READ_ONLY_OPTIMAL", ImageLayout[ImageLayout.SHADER_READ_ONLY_OPTIMAL = 5] = "SHADER_READ_ONLY_OPTIMAL", ImageLayout[ImageLayout.TRANSFER_SRC_OPTIMAL = 6] = "TRANSFER_SRC_OPTIMAL", ImageLayout[ImageLayout.TRANSFER_DST_OPTIMAL = 7] = "TRANSFER_DST_OPTIMAL", ImageLayout[ImageLayout.PREINITIALIZED = 8] = "PREINITIALIZED", ImageLayout[ImageLayout.DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000] = "DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL", ImageLayout[ImageLayout.DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001] = "DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL", ImageLayout[ImageLayout.DEPTH_ATTACHMENT_OPTIMAL = 1000241000] = "DEPTH_ATTACHMENT_OPTIMAL", ImageLayout[ImageLayout.DEPTH_READ_ONLY_OPTIMAL = 1000241001] = "DEPTH_READ_ONLY_OPTIMAL", ImageLayout[ImageLayout.STENCIL_ATTACHMENT_OPTIMAL = 1000241002] = "STENCIL_ATTACHMENT_OPTIMAL", ImageLayout[ImageLayout.STENCIL_READ_ONLY_OPTIMAL = 1000241003] = "STENCIL_READ_ONLY_OPTIMAL", ImageLayout[ImageLayout.READ_ONLY_OPTIMAL = 1000314000] = "READ_ONLY_OPTIMAL", ImageLayout[ImageLayout.ATTACHMENT_OPTIMAL = 1000314001] = "ATTACHMENT_OPTIMAL", ImageLayout[ImageLayout.PRESENT_SRC_KHR = 1000001002] = "PRESENT_SRC_KHR", ImageLayout[ImageLayout.VIDEO_DECODE_DST_KHR = 1000024000] = "VIDEO_DECODE_DST_KHR", ImageLayout[ImageLayout.VIDEO_DECODE_SRC_KHR = 1000024001] = "VIDEO_DECODE_SRC_KHR", ImageLayout[ImageLayout.VIDEO_DECODE_DPB_KHR = 1000024002] = "VIDEO_DECODE_DPB_KHR", ImageLayout[ImageLayout.SHARED_PRESENT_KHR = 1000111000] = "SHARED_PRESENT_KHR", ImageLayout[ImageLayout.DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000117000] = "DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR", ImageLayout[ImageLayout.DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = 1000117001] = "DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR", ImageLayout[ImageLayout.SHADING_RATE_OPTIMAL_NV = 1000164003] = "SHADING_RATE_OPTIMAL_NV", ImageLayout[ImageLayout.FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000] = "FRAGMENT_DENSITY_MAP_OPTIMAL_EXT", ImageLayout[ImageLayout.FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003] = "FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR", ImageLayout[ImageLayout.DEPTH_ATTACHMENT_OPTIMAL_KHR = 1000241000] = "DEPTH_ATTACHMENT_OPTIMAL_KHR", ImageLayout[ImageLayout.DEPTH_READ_ONLY_OPTIMAL_KHR = 1000241001] = "DEPTH_READ_ONLY_OPTIMAL_KHR", ImageLayout[ImageLayout.STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000241002] = "STENCIL_ATTACHMENT_OPTIMAL_KHR", ImageLayout[ImageLayout.STENCIL_READ_ONLY_OPTIMAL_KHR = 1000241003] = "STENCIL_READ_ONLY_OPTIMAL_KHR", ImageLayout[ImageLayout.VIDEO_ENCODE_DST_KHR = 1000299000] = "VIDEO_ENCODE_DST_KHR", ImageLayout[ImageLayout.VIDEO_ENCODE_SRC_KHR = 1000299001] = "VIDEO_ENCODE_SRC_KHR", ImageLayout[ImageLayout.VIDEO_ENCODE_DPB_KHR = 1000299002] = "VIDEO_ENCODE_DPB_KHR", ImageLayout[ImageLayout.READ_ONLY_OPTIMAL_KHR = 1000314000] = "READ_ONLY_OPTIMAL_KHR", ImageLayout[ImageLayout.ATTACHMENT_OPTIMAL_KHR = 1000314001] = "ATTACHMENT_OPTIMAL_KHR", ImageLayout[ImageLayout.ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000] = "ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT"; -}(ImageLayout || (ImageLayout = {})); -export var AttachmentLoadOp; -!function(AttachmentLoadOp) { - AttachmentLoadOp[AttachmentLoadOp.LOAD = 0] = "LOAD", AttachmentLoadOp[AttachmentLoadOp.CLEAR = 1] = "CLEAR", AttachmentLoadOp[AttachmentLoadOp.DONT_CARE = 2] = "DONT_CARE", AttachmentLoadOp[AttachmentLoadOp.NONE_EXT = 1000400000] = "NONE_EXT"; -}(AttachmentLoadOp || (AttachmentLoadOp = {})); -export var AttachmentStoreOp; -!function(AttachmentStoreOp) { - AttachmentStoreOp[AttachmentStoreOp.STORE = 0] = "STORE", AttachmentStoreOp[AttachmentStoreOp.DONT_CARE = 1] = "DONT_CARE", AttachmentStoreOp[AttachmentStoreOp.NONE = 1000301000] = "NONE", AttachmentStoreOp[AttachmentStoreOp.NONE_KHR = 1000301000] = "NONE_KHR", AttachmentStoreOp[AttachmentStoreOp.NONE_QCOM = 1000301000] = "NONE_QCOM", AttachmentStoreOp[AttachmentStoreOp.NONE_EXT = 1000301000] = "NONE_EXT"; -}(AttachmentStoreOp || (AttachmentStoreOp = {})); -export var ImageType; -!function(ImageType) { - ImageType[ImageType.VK_1D = 0] = "VK_1D", ImageType[ImageType.VK_2D = 1] = "VK_2D", ImageType[ImageType.VK_3D = 2] = "VK_3D"; -}(ImageType || (ImageType = {})); -export var ImageTiling; -!function(ImageTiling) { - ImageTiling[ImageTiling.OPTIMAL = 0] = "OPTIMAL", ImageTiling[ImageTiling.LINEAR = 1] = "LINEAR", ImageTiling[ImageTiling.DRM_FORMAT_MODIFIER_EXT = 1000158000] = "DRM_FORMAT_MODIFIER_EXT"; -}(ImageTiling || (ImageTiling = {})); -export var ImageViewType; -!function(ImageViewType) { - ImageViewType[ImageViewType.VK_1D = 0] = "VK_1D", ImageViewType[ImageViewType.VK_2D = 1] = "VK_2D", ImageViewType[ImageViewType.VK_3D = 2] = "VK_3D", ImageViewType[ImageViewType.CUBE = 3] = "CUBE", ImageViewType[ImageViewType.VK_1D_ARRAY = 4] = "VK_1D_ARRAY", ImageViewType[ImageViewType.VK_2D_ARRAY = 5] = "VK_2D_ARRAY", ImageViewType[ImageViewType.CUBE_ARRAY = 6] = "CUBE_ARRAY"; -}(ImageViewType || (ImageViewType = {})); -export var CommandBufferLevel; -!function(CommandBufferLevel) { - CommandBufferLevel[CommandBufferLevel.PRIMARY = 0] = "PRIMARY", CommandBufferLevel[CommandBufferLevel.SECONDARY = 1] = "SECONDARY"; -}(CommandBufferLevel || (CommandBufferLevel = {})); -export var ComponentSwizzle; -!function(ComponentSwizzle) { - ComponentSwizzle[ComponentSwizzle.IDENTITY = 0] = "IDENTITY", ComponentSwizzle[ComponentSwizzle.ZERO = 1] = "ZERO", ComponentSwizzle[ComponentSwizzle.ONE = 2] = "ONE", ComponentSwizzle[ComponentSwizzle.R = 3] = "R", ComponentSwizzle[ComponentSwizzle.G = 4] = "G", ComponentSwizzle[ComponentSwizzle.B = 5] = "B", ComponentSwizzle[ComponentSwizzle.A = 6] = "A"; -}(ComponentSwizzle || (ComponentSwizzle = {})); -export var DescriptorType; -!function(DescriptorType) { - DescriptorType[DescriptorType.SAMPLER = 0] = "SAMPLER", DescriptorType[DescriptorType.COMBINED_IMAGE_SAMPLER = 1] = "COMBINED_IMAGE_SAMPLER", DescriptorType[DescriptorType.SAMPLED_IMAGE = 2] = "SAMPLED_IMAGE", DescriptorType[DescriptorType.STORAGE_IMAGE = 3] = "STORAGE_IMAGE", DescriptorType[DescriptorType.UNIFORM_TEXEL_BUFFER = 4] = "UNIFORM_TEXEL_BUFFER", DescriptorType[DescriptorType.STORAGE_TEXEL_BUFFER = 5] = "STORAGE_TEXEL_BUFFER", DescriptorType[DescriptorType.UNIFORM_BUFFER = 6] = "UNIFORM_BUFFER", DescriptorType[DescriptorType.STORAGE_BUFFER = 7] = "STORAGE_BUFFER", DescriptorType[DescriptorType.UNIFORM_BUFFER_DYNAMIC = 8] = "UNIFORM_BUFFER_DYNAMIC", DescriptorType[DescriptorType.STORAGE_BUFFER_DYNAMIC = 9] = "STORAGE_BUFFER_DYNAMIC", DescriptorType[DescriptorType.INPUT_ATTACHMENT = 10] = "INPUT_ATTACHMENT", DescriptorType[DescriptorType.INLINE_UNIFORM_BLOCK = 1000138000] = "INLINE_UNIFORM_BLOCK", DescriptorType[DescriptorType.INLINE_UNIFORM_BLOCK_EXT = 1000138000] = "INLINE_UNIFORM_BLOCK_EXT", DescriptorType[DescriptorType.ACCELERATION_STRUCTURE_KHR = 1000150000] = "ACCELERATION_STRUCTURE_KHR", DescriptorType[DescriptorType.ACCELERATION_STRUCTURE_NV = 1000165000] = "ACCELERATION_STRUCTURE_NV", DescriptorType[DescriptorType.MUTABLE_VALVE = 1000351000] = "MUTABLE_VALVE", DescriptorType[DescriptorType.SAMPLE_WEIGHT_IMAGE_QCOM = 1000440000] = "SAMPLE_WEIGHT_IMAGE_QCOM", DescriptorType[DescriptorType.BLOCK_MATCH_IMAGE_QCOM = 1000440001] = "BLOCK_MATCH_IMAGE_QCOM", DescriptorType[DescriptorType.MUTABLE_EXT = 1000351000] = "MUTABLE_EXT"; -}(DescriptorType || (DescriptorType = {})); -export var QueryType; -!function(QueryType) { - QueryType[QueryType.OCCLUSION = 0] = "OCCLUSION", QueryType[QueryType.PIPELINE_STATISTICS = 1] = "PIPELINE_STATISTICS", QueryType[QueryType.TIMESTAMP = 2] = "TIMESTAMP", QueryType[QueryType.RESULT_STATUS_ONLY_KHR = 1000023000] = "RESULT_STATUS_ONLY_KHR", QueryType[QueryType.TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004] = "TRANSFORM_FEEDBACK_STREAM_EXT", QueryType[QueryType.PERFORMANCE_QUERY_KHR = 1000116000] = "PERFORMANCE_QUERY_KHR", QueryType[QueryType.ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR = 1000150000] = "ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR", QueryType[QueryType.ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001] = "ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR", QueryType[QueryType.ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000] = "ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV", QueryType[QueryType.PERFORMANCE_QUERY_INTEL = 1000210000] = "PERFORMANCE_QUERY_INTEL", QueryType[QueryType.VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR = 1000299000] = "VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR", QueryType[QueryType.MESH_PRIMITIVES_GENERATED_EXT = 1000328000] = "MESH_PRIMITIVES_GENERATED_EXT", QueryType[QueryType.PRIMITIVES_GENERATED_EXT = 1000382000] = "PRIMITIVES_GENERATED_EXT", QueryType[QueryType.ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR = 1000386000] = "ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR", QueryType[QueryType.ACCELERATION_STRUCTURE_SIZE_KHR = 1000386001] = "ACCELERATION_STRUCTURE_SIZE_KHR", QueryType[QueryType.MICROMAP_SERIALIZATION_SIZE_EXT = 1000396000] = "MICROMAP_SERIALIZATION_SIZE_EXT", QueryType[QueryType.MICROMAP_COMPACTED_SIZE_EXT = 1000396001] = "MICROMAP_COMPACTED_SIZE_EXT"; -}(QueryType || (QueryType = {})); -export var BorderColor; -!function(BorderColor) { - BorderColor[BorderColor.FLOAT_TRANSPARENT_BLACK = 0] = "FLOAT_TRANSPARENT_BLACK", BorderColor[BorderColor.INT_TRANSPARENT_BLACK = 1] = "INT_TRANSPARENT_BLACK", BorderColor[BorderColor.FLOAT_OPAQUE_BLACK = 2] = "FLOAT_OPAQUE_BLACK", BorderColor[BorderColor.INT_OPAQUE_BLACK = 3] = "INT_OPAQUE_BLACK", BorderColor[BorderColor.FLOAT_OPAQUE_WHITE = 4] = "FLOAT_OPAQUE_WHITE", BorderColor[BorderColor.INT_OPAQUE_WHITE = 5] = "INT_OPAQUE_WHITE", BorderColor[BorderColor.FLOAT_CUSTOM_EXT = 1000287003] = "FLOAT_CUSTOM_EXT", BorderColor[BorderColor.INT_CUSTOM_EXT = 1000287004] = "INT_CUSTOM_EXT"; -}(BorderColor || (BorderColor = {})); -export var PipelineBindPoint; -!function(PipelineBindPoint) { - PipelineBindPoint[PipelineBindPoint.GRAPHICS = 0] = "GRAPHICS", PipelineBindPoint[PipelineBindPoint.COMPUTE = 1] = "COMPUTE", PipelineBindPoint[PipelineBindPoint.RAY_TRACING_KHR = 1000165000] = "RAY_TRACING_KHR", PipelineBindPoint[PipelineBindPoint.RAY_TRACING_NV = 1000165000] = "RAY_TRACING_NV", PipelineBindPoint[PipelineBindPoint.SUBPASS_SHADING_HUAWEI = 1000369003] = "SUBPASS_SHADING_HUAWEI"; -}(PipelineBindPoint || (PipelineBindPoint = {})); -export var PipelineCacheHeaderVersion; -!function(PipelineCacheHeaderVersion) { - PipelineCacheHeaderVersion[PipelineCacheHeaderVersion.ONE = 1] = "ONE"; -}(PipelineCacheHeaderVersion || (PipelineCacheHeaderVersion = {})); -export var PipelineCacheCreateFlagBits; -!function(PipelineCacheCreateFlagBits) { - PipelineCacheCreateFlagBits[PipelineCacheCreateFlagBits.EXTERNALLY_SYNCHRONIZED = 1] = "EXTERNALLY_SYNCHRONIZED", PipelineCacheCreateFlagBits[PipelineCacheCreateFlagBits.RESERVED_1_BIT_EXT = 2] = "RESERVED_1_BIT_EXT", PipelineCacheCreateFlagBits[PipelineCacheCreateFlagBits.EXTERNALLY_SYNCHRONIZED_BIT_EXT = 1] = "EXTERNALLY_SYNCHRONIZED_BIT_EXT", PipelineCacheCreateFlagBits[PipelineCacheCreateFlagBits.RESERVED_1_BIT_KHR = 2] = "RESERVED_1_BIT_KHR", PipelineCacheCreateFlagBits[PipelineCacheCreateFlagBits.RESERVED_2_BIT_KHR = 4] = "RESERVED_2_BIT_KHR"; -}(PipelineCacheCreateFlagBits || (PipelineCacheCreateFlagBits = {})); -export var PrimitiveTopology; -!function(PrimitiveTopology) { - PrimitiveTopology[PrimitiveTopology.POINT_LIST = 0] = "POINT_LIST", PrimitiveTopology[PrimitiveTopology.LINE_LIST = 1] = "LINE_LIST", PrimitiveTopology[PrimitiveTopology.LINE_STRIP = 2] = "LINE_STRIP", PrimitiveTopology[PrimitiveTopology.TRIANGLE_LIST = 3] = "TRIANGLE_LIST", PrimitiveTopology[PrimitiveTopology.TRIANGLE_STRIP = 4] = "TRIANGLE_STRIP", PrimitiveTopology[PrimitiveTopology.TRIANGLE_FAN = 5] = "TRIANGLE_FAN", PrimitiveTopology[PrimitiveTopology.LINE_LIST_WITH_ADJACENCY = 6] = "LINE_LIST_WITH_ADJACENCY", PrimitiveTopology[PrimitiveTopology.LINE_STRIP_WITH_ADJACENCY = 7] = "LINE_STRIP_WITH_ADJACENCY", PrimitiveTopology[PrimitiveTopology.TRIANGLE_LIST_WITH_ADJACENCY = 8] = "TRIANGLE_LIST_WITH_ADJACENCY", PrimitiveTopology[PrimitiveTopology.TRIANGLE_STRIP_WITH_ADJACENCY = 9] = "TRIANGLE_STRIP_WITH_ADJACENCY", PrimitiveTopology[PrimitiveTopology.PATCH_LIST = 10] = "PATCH_LIST"; -}(PrimitiveTopology || (PrimitiveTopology = {})); -export var SharingMode; -!function(SharingMode) { - SharingMode[SharingMode.EXCLUSIVE = 0] = "EXCLUSIVE", SharingMode[SharingMode.CONCURRENT = 1] = "CONCURRENT"; -}(SharingMode || (SharingMode = {})); -export var IndexType; -!function(IndexType) { - IndexType[IndexType.UINT16 = 0] = "UINT16", IndexType[IndexType.UINT32 = 1] = "UINT32", IndexType[IndexType.NONE_KHR = 1000165000] = "NONE_KHR", IndexType[IndexType.NONE_NV = 1000165000] = "NONE_NV", IndexType[IndexType.UINT8_EXT = 1000265000] = "UINT8_EXT"; -}(IndexType || (IndexType = {})); -export var Filter; -!function(Filter) { - Filter[Filter.NEAREST = 0] = "NEAREST", Filter[Filter.LINEAR = 1] = "LINEAR", Filter[Filter.CUBIC_IMG = 1000015000] = "CUBIC_IMG", Filter[Filter.CUBIC_EXT = 1000015000] = "CUBIC_EXT"; -}(Filter || (Filter = {})); -export var SamplerMipmapMode; -!function(SamplerMipmapMode) { - SamplerMipmapMode[SamplerMipmapMode.NEAREST = 0] = "NEAREST", SamplerMipmapMode[SamplerMipmapMode.LINEAR = 1] = "LINEAR"; -}(SamplerMipmapMode || (SamplerMipmapMode = {})); -export var SamplerAddressMode; -!function(SamplerAddressMode) { - SamplerAddressMode[SamplerAddressMode.REPEAT = 0] = "REPEAT", SamplerAddressMode[SamplerAddressMode.MIRRORED_REPEAT = 1] = "MIRRORED_REPEAT", SamplerAddressMode[SamplerAddressMode.CLAMP_TO_EDGE = 2] = "CLAMP_TO_EDGE", SamplerAddressMode[SamplerAddressMode.CLAMP_TO_BORDER = 3] = "CLAMP_TO_BORDER", SamplerAddressMode[SamplerAddressMode.MIRROR_CLAMP_TO_EDGE = 4] = "MIRROR_CLAMP_TO_EDGE", SamplerAddressMode[SamplerAddressMode.MIRROR_CLAMP_TO_EDGE_KHR = 4] = "MIRROR_CLAMP_TO_EDGE_KHR"; -}(SamplerAddressMode || (SamplerAddressMode = {})); -export var CompareOp; -!function(CompareOp) { - CompareOp[CompareOp.NEVER = 0] = "NEVER", CompareOp[CompareOp.LESS = 1] = "LESS", CompareOp[CompareOp.EQUAL = 2] = "EQUAL", CompareOp[CompareOp.LESS_OR_EQUAL = 3] = "LESS_OR_EQUAL", CompareOp[CompareOp.GREATER = 4] = "GREATER", CompareOp[CompareOp.NOT_EQUAL = 5] = "NOT_EQUAL", CompareOp[CompareOp.GREATER_OR_EQUAL = 6] = "GREATER_OR_EQUAL", CompareOp[CompareOp.ALWAYS = 7] = "ALWAYS"; -}(CompareOp || (CompareOp = {})); -export var PolygonMode; -!function(PolygonMode) { - PolygonMode[PolygonMode.FILL = 0] = "FILL", PolygonMode[PolygonMode.LINE = 1] = "LINE", PolygonMode[PolygonMode.POINT = 2] = "POINT", PolygonMode[PolygonMode.FILL_RECTANGLE_NV = 1000153000] = "FILL_RECTANGLE_NV"; -}(PolygonMode || (PolygonMode = {})); -export var FrontFace; -!function(FrontFace) { - FrontFace[FrontFace.COUNTER_CLOCKWISE = 0] = "COUNTER_CLOCKWISE", FrontFace[FrontFace.CLOCKWISE = 1] = "CLOCKWISE"; -}(FrontFace || (FrontFace = {})); -export var BlendFactor; -!function(BlendFactor) { - BlendFactor[BlendFactor.ZERO = 0] = "ZERO", BlendFactor[BlendFactor.ONE = 1] = "ONE", BlendFactor[BlendFactor.SRC_COLOR = 2] = "SRC_COLOR", BlendFactor[BlendFactor.ONE_MINUS_SRC_COLOR = 3] = "ONE_MINUS_SRC_COLOR", BlendFactor[BlendFactor.DST_COLOR = 4] = "DST_COLOR", BlendFactor[BlendFactor.ONE_MINUS_DST_COLOR = 5] = "ONE_MINUS_DST_COLOR", BlendFactor[BlendFactor.SRC_ALPHA = 6] = "SRC_ALPHA", BlendFactor[BlendFactor.ONE_MINUS_SRC_ALPHA = 7] = "ONE_MINUS_SRC_ALPHA", BlendFactor[BlendFactor.DST_ALPHA = 8] = "DST_ALPHA", BlendFactor[BlendFactor.ONE_MINUS_DST_ALPHA = 9] = "ONE_MINUS_DST_ALPHA", BlendFactor[BlendFactor.CONSTANT_COLOR = 10] = "CONSTANT_COLOR", BlendFactor[BlendFactor.ONE_MINUS_CONSTANT_COLOR = 11] = "ONE_MINUS_CONSTANT_COLOR", BlendFactor[BlendFactor.CONSTANT_ALPHA = 12] = "CONSTANT_ALPHA", BlendFactor[BlendFactor.ONE_MINUS_CONSTANT_ALPHA = 13] = "ONE_MINUS_CONSTANT_ALPHA", BlendFactor[BlendFactor.SRC_ALPHA_SATURATE = 14] = "SRC_ALPHA_SATURATE", BlendFactor[BlendFactor.SRC1_COLOR = 15] = "SRC1_COLOR", BlendFactor[BlendFactor.ONE_MINUS_SRC1_COLOR = 16] = "ONE_MINUS_SRC1_COLOR", BlendFactor[BlendFactor.SRC1_ALPHA = 17] = "SRC1_ALPHA", BlendFactor[BlendFactor.ONE_MINUS_SRC1_ALPHA = 18] = "ONE_MINUS_SRC1_ALPHA"; -}(BlendFactor || (BlendFactor = {})); -export var BlendOp; -!function(BlendOp) { - BlendOp[BlendOp.ADD = 0] = "ADD", BlendOp[BlendOp.SUBTRACT = 1] = "SUBTRACT", BlendOp[BlendOp.REVERSE_SUBTRACT = 2] = "REVERSE_SUBTRACT", BlendOp[BlendOp.MIN = 3] = "MIN", BlendOp[BlendOp.MAX = 4] = "MAX", BlendOp[BlendOp.ZERO_EXT = 1000148000] = "ZERO_EXT", BlendOp[BlendOp.SRC_EXT = 1000148001] = "SRC_EXT", BlendOp[BlendOp.DST_EXT = 1000148002] = "DST_EXT", BlendOp[BlendOp.SRC_OVER_EXT = 1000148003] = "SRC_OVER_EXT", BlendOp[BlendOp.DST_OVER_EXT = 1000148004] = "DST_OVER_EXT", BlendOp[BlendOp.SRC_IN_EXT = 1000148005] = "SRC_IN_EXT", BlendOp[BlendOp.DST_IN_EXT = 1000148006] = "DST_IN_EXT", BlendOp[BlendOp.SRC_OUT_EXT = 1000148007] = "SRC_OUT_EXT", BlendOp[BlendOp.DST_OUT_EXT = 1000148008] = "DST_OUT_EXT", BlendOp[BlendOp.SRC_ATOP_EXT = 1000148009] = "SRC_ATOP_EXT", BlendOp[BlendOp.DST_ATOP_EXT = 1000148010] = "DST_ATOP_EXT", BlendOp[BlendOp.XOR_EXT = 1000148011] = "XOR_EXT", BlendOp[BlendOp.MULTIPLY_EXT = 1000148012] = "MULTIPLY_EXT", BlendOp[BlendOp.SCREEN_EXT = 1000148013] = "SCREEN_EXT", BlendOp[BlendOp.OVERLAY_EXT = 1000148014] = "OVERLAY_EXT", BlendOp[BlendOp.DARKEN_EXT = 1000148015] = "DARKEN_EXT", BlendOp[BlendOp.LIGHTEN_EXT = 1000148016] = "LIGHTEN_EXT", BlendOp[BlendOp.COLORDODGE_EXT = 1000148017] = "COLORDODGE_EXT", BlendOp[BlendOp.COLORBURN_EXT = 1000148018] = "COLORBURN_EXT", BlendOp[BlendOp.HARDLIGHT_EXT = 1000148019] = "HARDLIGHT_EXT", BlendOp[BlendOp.SOFTLIGHT_EXT = 1000148020] = "SOFTLIGHT_EXT", BlendOp[BlendOp.DIFFERENCE_EXT = 1000148021] = "DIFFERENCE_EXT", BlendOp[BlendOp.EXCLUSION_EXT = 1000148022] = "EXCLUSION_EXT", BlendOp[BlendOp.INVERT_EXT = 1000148023] = "INVERT_EXT", BlendOp[BlendOp.INVERT_RGB_EXT = 1000148024] = "INVERT_RGB_EXT", BlendOp[BlendOp.LINEARDODGE_EXT = 1000148025] = "LINEARDODGE_EXT", BlendOp[BlendOp.LINEARBURN_EXT = 1000148026] = "LINEARBURN_EXT", BlendOp[BlendOp.VIVIDLIGHT_EXT = 1000148027] = "VIVIDLIGHT_EXT", BlendOp[BlendOp.LINEARLIGHT_EXT = 1000148028] = "LINEARLIGHT_EXT", BlendOp[BlendOp.PINLIGHT_EXT = 1000148029] = "PINLIGHT_EXT", BlendOp[BlendOp.HARDMIX_EXT = 1000148030] = "HARDMIX_EXT", BlendOp[BlendOp.HSL_HUE_EXT = 1000148031] = "HSL_HUE_EXT", BlendOp[BlendOp.HSL_SATURATION_EXT = 1000148032] = "HSL_SATURATION_EXT", BlendOp[BlendOp.HSL_COLOR_EXT = 1000148033] = "HSL_COLOR_EXT", BlendOp[BlendOp.HSL_LUMINOSITY_EXT = 1000148034] = "HSL_LUMINOSITY_EXT", BlendOp[BlendOp.PLUS_EXT = 1000148035] = "PLUS_EXT", BlendOp[BlendOp.PLUS_CLAMPED_EXT = 1000148036] = "PLUS_CLAMPED_EXT", BlendOp[BlendOp.PLUS_CLAMPED_ALPHA_EXT = 1000148037] = "PLUS_CLAMPED_ALPHA_EXT", BlendOp[BlendOp.PLUS_DARKER_EXT = 1000148038] = "PLUS_DARKER_EXT", BlendOp[BlendOp.MINUS_EXT = 1000148039] = "MINUS_EXT", BlendOp[BlendOp.MINUS_CLAMPED_EXT = 1000148040] = "MINUS_CLAMPED_EXT", BlendOp[BlendOp.CONTRAST_EXT = 1000148041] = "CONTRAST_EXT", BlendOp[BlendOp.INVERT_OVG_EXT = 1000148042] = "INVERT_OVG_EXT", BlendOp[BlendOp.RED_EXT = 1000148043] = "RED_EXT", BlendOp[BlendOp.GREEN_EXT = 1000148044] = "GREEN_EXT", BlendOp[BlendOp.BLUE_EXT = 1000148045] = "BLUE_EXT"; -}(BlendOp || (BlendOp = {})); -export var StencilOp; -!function(StencilOp) { - StencilOp[StencilOp.KEEP = 0] = "KEEP", StencilOp[StencilOp.ZERO = 1] = "ZERO", StencilOp[StencilOp.REPLACE = 2] = "REPLACE", StencilOp[StencilOp.INCREMENT_AND_CLAMP = 3] = "INCREMENT_AND_CLAMP", StencilOp[StencilOp.DECREMENT_AND_CLAMP = 4] = "DECREMENT_AND_CLAMP", StencilOp[StencilOp.INVERT = 5] = "INVERT", StencilOp[StencilOp.INCREMENT_AND_WRAP = 6] = "INCREMENT_AND_WRAP", StencilOp[StencilOp.DECREMENT_AND_WRAP = 7] = "DECREMENT_AND_WRAP"; -}(StencilOp || (StencilOp = {})); -export var LogicOp; -!function(LogicOp) { - LogicOp[LogicOp.CLEAR = 0] = "CLEAR", LogicOp[LogicOp.AND = 1] = "AND", LogicOp[LogicOp.AND_REVERSE = 2] = "AND_REVERSE", LogicOp[LogicOp.COPY = 3] = "COPY", LogicOp[LogicOp.AND_INVERTED = 4] = "AND_INVERTED", LogicOp[LogicOp.NO_OP = 5] = "NO_OP", LogicOp[LogicOp.XOR = 6] = "XOR", LogicOp[LogicOp.OR = 7] = "OR", LogicOp[LogicOp.NOR = 8] = "NOR", LogicOp[LogicOp.EQUIVALENT = 9] = "EQUIVALENT", LogicOp[LogicOp.INVERT = 10] = "INVERT", LogicOp[LogicOp.OR_REVERSE = 11] = "OR_REVERSE", LogicOp[LogicOp.COPY_INVERTED = 12] = "COPY_INVERTED", LogicOp[LogicOp.OR_INVERTED = 13] = "OR_INVERTED", LogicOp[LogicOp.NAND = 14] = "NAND", LogicOp[LogicOp.SET = 15] = "SET"; -}(LogicOp || (LogicOp = {})); -export var InternalAllocationType; -!function(InternalAllocationType) { - InternalAllocationType[InternalAllocationType.EXECUTABLE = 0] = "EXECUTABLE"; -}(InternalAllocationType || (InternalAllocationType = {})); -export var SystemAllocationScope; -!function(SystemAllocationScope) { - SystemAllocationScope[SystemAllocationScope.COMMAND = 0] = "COMMAND", SystemAllocationScope[SystemAllocationScope.OBJECT = 1] = "OBJECT", SystemAllocationScope[SystemAllocationScope.CACHE = 2] = "CACHE", SystemAllocationScope[SystemAllocationScope.DEVICE = 3] = "DEVICE", SystemAllocationScope[SystemAllocationScope.INSTANCE = 4] = "INSTANCE"; -}(SystemAllocationScope || (SystemAllocationScope = {})); -export var PhysicalDeviceType; -!function(PhysicalDeviceType) { - PhysicalDeviceType[PhysicalDeviceType.OTHER = 0] = "OTHER", PhysicalDeviceType[PhysicalDeviceType.INTEGRATED_GPU = 1] = "INTEGRATED_GPU", PhysicalDeviceType[PhysicalDeviceType.DISCRETE_GPU = 2] = "DISCRETE_GPU", PhysicalDeviceType[PhysicalDeviceType.VIRTUAL_GPU = 3] = "VIRTUAL_GPU", PhysicalDeviceType[PhysicalDeviceType.CPU = 4] = "CPU"; -}(PhysicalDeviceType || (PhysicalDeviceType = {})); -export var VertexInputRate; -!function(VertexInputRate) { - VertexInputRate[VertexInputRate.VERTEX = 0] = "VERTEX", VertexInputRate[VertexInputRate.INSTANCE = 1] = "INSTANCE"; -}(VertexInputRate || (VertexInputRate = {})); -export var Format; -!function(Format) { - Format[Format.UNDEFINED = 0] = "UNDEFINED", Format[Format.R4G4_UNORM_PACK8 = 1] = "R4G4_UNORM_PACK8", Format[Format.R4G4B4A4_UNORM_PACK16 = 2] = "R4G4B4A4_UNORM_PACK16", Format[Format.B4G4R4A4_UNORM_PACK16 = 3] = "B4G4R4A4_UNORM_PACK16", Format[Format.R5G6B5_UNORM_PACK16 = 4] = "R5G6B5_UNORM_PACK16", Format[Format.B5G6R5_UNORM_PACK16 = 5] = "B5G6R5_UNORM_PACK16", Format[Format.R5G5B5A1_UNORM_PACK16 = 6] = "R5G5B5A1_UNORM_PACK16", Format[Format.B5G5R5A1_UNORM_PACK16 = 7] = "B5G5R5A1_UNORM_PACK16", Format[Format.A1R5G5B5_UNORM_PACK16 = 8] = "A1R5G5B5_UNORM_PACK16", Format[Format.R8_UNORM = 9] = "R8_UNORM", Format[Format.R8_SNORM = 10] = "R8_SNORM", Format[Format.R8_USCALED = 11] = "R8_USCALED", Format[Format.R8_SSCALED = 12] = "R8_SSCALED", Format[Format.R8_UINT = 13] = "R8_UINT", Format[Format.R8_SINT = 14] = "R8_SINT", Format[Format.R8_SRGB = 15] = "R8_SRGB", Format[Format.R8G8_UNORM = 16] = "R8G8_UNORM", Format[Format.R8G8_SNORM = 17] = "R8G8_SNORM", Format[Format.R8G8_USCALED = 18] = "R8G8_USCALED", Format[Format.R8G8_SSCALED = 19] = "R8G8_SSCALED", Format[Format.R8G8_UINT = 20] = "R8G8_UINT", Format[Format.R8G8_SINT = 21] = "R8G8_SINT", Format[Format.R8G8_SRGB = 22] = "R8G8_SRGB", Format[Format.R8G8B8_UNORM = 23] = "R8G8B8_UNORM", Format[Format.R8G8B8_SNORM = 24] = "R8G8B8_SNORM", Format[Format.R8G8B8_USCALED = 25] = "R8G8B8_USCALED", Format[Format.R8G8B8_SSCALED = 26] = "R8G8B8_SSCALED", Format[Format.R8G8B8_UINT = 27] = "R8G8B8_UINT", Format[Format.R8G8B8_SINT = 28] = "R8G8B8_SINT", Format[Format.R8G8B8_SRGB = 29] = "R8G8B8_SRGB", Format[Format.B8G8R8_UNORM = 30] = "B8G8R8_UNORM", Format[Format.B8G8R8_SNORM = 31] = "B8G8R8_SNORM", Format[Format.B8G8R8_USCALED = 32] = "B8G8R8_USCALED", Format[Format.B8G8R8_SSCALED = 33] = "B8G8R8_SSCALED", Format[Format.B8G8R8_UINT = 34] = "B8G8R8_UINT", Format[Format.B8G8R8_SINT = 35] = "B8G8R8_SINT", Format[Format.B8G8R8_SRGB = 36] = "B8G8R8_SRGB", Format[Format.R8G8B8A8_UNORM = 37] = "R8G8B8A8_UNORM", Format[Format.R8G8B8A8_SNORM = 38] = "R8G8B8A8_SNORM", Format[Format.R8G8B8A8_USCALED = 39] = "R8G8B8A8_USCALED", Format[Format.R8G8B8A8_SSCALED = 40] = "R8G8B8A8_SSCALED", Format[Format.R8G8B8A8_UINT = 41] = "R8G8B8A8_UINT", Format[Format.R8G8B8A8_SINT = 42] = "R8G8B8A8_SINT", Format[Format.R8G8B8A8_SRGB = 43] = "R8G8B8A8_SRGB", Format[Format.B8G8R8A8_UNORM = 44] = "B8G8R8A8_UNORM", Format[Format.B8G8R8A8_SNORM = 45] = "B8G8R8A8_SNORM", Format[Format.B8G8R8A8_USCALED = 46] = "B8G8R8A8_USCALED", Format[Format.B8G8R8A8_SSCALED = 47] = "B8G8R8A8_SSCALED", Format[Format.B8G8R8A8_UINT = 48] = "B8G8R8A8_UINT", Format[Format.B8G8R8A8_SINT = 49] = "B8G8R8A8_SINT", Format[Format.B8G8R8A8_SRGB = 50] = "B8G8R8A8_SRGB", Format[Format.A8B8G8R8_UNORM_PACK32 = 51] = "A8B8G8R8_UNORM_PACK32", Format[Format.A8B8G8R8_SNORM_PACK32 = 52] = "A8B8G8R8_SNORM_PACK32", Format[Format.A8B8G8R8_USCALED_PACK32 = 53] = "A8B8G8R8_USCALED_PACK32", Format[Format.A8B8G8R8_SSCALED_PACK32 = 54] = "A8B8G8R8_SSCALED_PACK32", Format[Format.A8B8G8R8_UINT_PACK32 = 55] = "A8B8G8R8_UINT_PACK32", Format[Format.A8B8G8R8_SINT_PACK32 = 56] = "A8B8G8R8_SINT_PACK32", Format[Format.A8B8G8R8_SRGB_PACK32 = 57] = "A8B8G8R8_SRGB_PACK32", Format[Format.A2R10G10B10_UNORM_PACK32 = 58] = "A2R10G10B10_UNORM_PACK32", Format[Format.A2R10G10B10_SNORM_PACK32 = 59] = "A2R10G10B10_SNORM_PACK32", Format[Format.A2R10G10B10_USCALED_PACK32 = 60] = "A2R10G10B10_USCALED_PACK32", Format[Format.A2R10G10B10_SSCALED_PACK32 = 61] = "A2R10G10B10_SSCALED_PACK32", Format[Format.A2R10G10B10_UINT_PACK32 = 62] = "A2R10G10B10_UINT_PACK32", Format[Format.A2R10G10B10_SINT_PACK32 = 63] = "A2R10G10B10_SINT_PACK32", Format[Format.A2B10G10R10_UNORM_PACK32 = 64] = "A2B10G10R10_UNORM_PACK32", Format[Format.A2B10G10R10_SNORM_PACK32 = 65] = "A2B10G10R10_SNORM_PACK32", Format[Format.A2B10G10R10_USCALED_PACK32 = 66] = "A2B10G10R10_USCALED_PACK32", Format[Format.A2B10G10R10_SSCALED_PACK32 = 67] = "A2B10G10R10_SSCALED_PACK32", Format[Format.A2B10G10R10_UINT_PACK32 = 68] = "A2B10G10R10_UINT_PACK32", Format[Format.A2B10G10R10_SINT_PACK32 = 69] = "A2B10G10R10_SINT_PACK32", Format[Format.R16_UNORM = 70] = "R16_UNORM", Format[Format.R16_SNORM = 71] = "R16_SNORM", Format[Format.R16_USCALED = 72] = "R16_USCALED", Format[Format.R16_SSCALED = 73] = "R16_SSCALED", Format[Format.R16_UINT = 74] = "R16_UINT", Format[Format.R16_SINT = 75] = "R16_SINT", Format[Format.R16_SFLOAT = 76] = "R16_SFLOAT", Format[Format.R16G16_UNORM = 77] = "R16G16_UNORM", Format[Format.R16G16_SNORM = 78] = "R16G16_SNORM", Format[Format.R16G16_USCALED = 79] = "R16G16_USCALED", Format[Format.R16G16_SSCALED = 80] = "R16G16_SSCALED", Format[Format.R16G16_UINT = 81] = "R16G16_UINT", Format[Format.R16G16_SINT = 82] = "R16G16_SINT", Format[Format.R16G16_SFLOAT = 83] = "R16G16_SFLOAT", Format[Format.R16G16B16_UNORM = 84] = "R16G16B16_UNORM", Format[Format.R16G16B16_SNORM = 85] = "R16G16B16_SNORM", Format[Format.R16G16B16_USCALED = 86] = "R16G16B16_USCALED", Format[Format.R16G16B16_SSCALED = 87] = "R16G16B16_SSCALED", Format[Format.R16G16B16_UINT = 88] = "R16G16B16_UINT", Format[Format.R16G16B16_SINT = 89] = "R16G16B16_SINT", Format[Format.R16G16B16_SFLOAT = 90] = "R16G16B16_SFLOAT", Format[Format.R16G16B16A16_UNORM = 91] = "R16G16B16A16_UNORM", Format[Format.R16G16B16A16_SNORM = 92] = "R16G16B16A16_SNORM", Format[Format.R16G16B16A16_USCALED = 93] = "R16G16B16A16_USCALED", Format[Format.R16G16B16A16_SSCALED = 94] = "R16G16B16A16_SSCALED", Format[Format.R16G16B16A16_UINT = 95] = "R16G16B16A16_UINT", Format[Format.R16G16B16A16_SINT = 96] = "R16G16B16A16_SINT", Format[Format.R16G16B16A16_SFLOAT = 97] = "R16G16B16A16_SFLOAT", Format[Format.R32_UINT = 98] = "R32_UINT", Format[Format.R32_SINT = 99] = "R32_SINT", Format[Format.R32_SFLOAT = 100] = "R32_SFLOAT", Format[Format.R32G32_UINT = 101] = "R32G32_UINT", Format[Format.R32G32_SINT = 102] = "R32G32_SINT", Format[Format.R32G32_SFLOAT = 103] = "R32G32_SFLOAT", Format[Format.R32G32B32_UINT = 104] = "R32G32B32_UINT", Format[Format.R32G32B32_SINT = 105] = "R32G32B32_SINT", Format[Format.R32G32B32_SFLOAT = 106] = "R32G32B32_SFLOAT", Format[Format.R32G32B32A32_UINT = 107] = "R32G32B32A32_UINT", Format[Format.R32G32B32A32_SINT = 108] = "R32G32B32A32_SINT", Format[Format.R32G32B32A32_SFLOAT = 109] = "R32G32B32A32_SFLOAT", Format[Format.R64_UINT = 110] = "R64_UINT", Format[Format.R64_SINT = 111] = "R64_SINT", Format[Format.R64_SFLOAT = 112] = "R64_SFLOAT", Format[Format.R64G64_UINT = 113] = "R64G64_UINT", Format[Format.R64G64_SINT = 114] = "R64G64_SINT", Format[Format.R64G64_SFLOAT = 115] = "R64G64_SFLOAT", Format[Format.R64G64B64_UINT = 116] = "R64G64B64_UINT", Format[Format.R64G64B64_SINT = 117] = "R64G64B64_SINT", Format[Format.R64G64B64_SFLOAT = 118] = "R64G64B64_SFLOAT", Format[Format.R64G64B64A64_UINT = 119] = "R64G64B64A64_UINT", Format[Format.R64G64B64A64_SINT = 120] = "R64G64B64A64_SINT", Format[Format.R64G64B64A64_SFLOAT = 121] = "R64G64B64A64_SFLOAT", Format[Format.B10G11R11_UFLOAT_PACK32 = 122] = "B10G11R11_UFLOAT_PACK32", Format[Format.E5B9G9R9_UFLOAT_PACK32 = 123] = "E5B9G9R9_UFLOAT_PACK32", Format[Format.D16_UNORM = 124] = "D16_UNORM", Format[Format.X8_D24_UNORM_PACK32 = 125] = "X8_D24_UNORM_PACK32", Format[Format.D32_SFLOAT = 126] = "D32_SFLOAT", Format[Format.S8_UINT = 127] = "S8_UINT", Format[Format.D16_UNORM_S8_UINT = 128] = "D16_UNORM_S8_UINT", Format[Format.D24_UNORM_S8_UINT = 129] = "D24_UNORM_S8_UINT", Format[Format.D32_SFLOAT_S8_UINT = 130] = "D32_SFLOAT_S8_UINT", Format[Format.BC1_RGB_UNORM_BLOCK = 131] = "BC1_RGB_UNORM_BLOCK", Format[Format.BC1_RGB_SRGB_BLOCK = 132] = "BC1_RGB_SRGB_BLOCK", Format[Format.BC1_RGBA_UNORM_BLOCK = 133] = "BC1_RGBA_UNORM_BLOCK", Format[Format.BC1_RGBA_SRGB_BLOCK = 134] = "BC1_RGBA_SRGB_BLOCK", Format[Format.BC2_UNORM_BLOCK = 135] = "BC2_UNORM_BLOCK", Format[Format.BC2_SRGB_BLOCK = 136] = "BC2_SRGB_BLOCK", Format[Format.BC3_UNORM_BLOCK = 137] = "BC3_UNORM_BLOCK", Format[Format.BC3_SRGB_BLOCK = 138] = "BC3_SRGB_BLOCK", Format[Format.BC4_UNORM_BLOCK = 139] = "BC4_UNORM_BLOCK", Format[Format.BC4_SNORM_BLOCK = 140] = "BC4_SNORM_BLOCK", Format[Format.BC5_UNORM_BLOCK = 141] = "BC5_UNORM_BLOCK", Format[Format.BC5_SNORM_BLOCK = 142] = "BC5_SNORM_BLOCK", Format[Format.BC6H_UFLOAT_BLOCK = 143] = "BC6H_UFLOAT_BLOCK", Format[Format.BC6H_SFLOAT_BLOCK = 144] = "BC6H_SFLOAT_BLOCK", Format[Format.BC7_UNORM_BLOCK = 145] = "BC7_UNORM_BLOCK", Format[Format.BC7_SRGB_BLOCK = 146] = "BC7_SRGB_BLOCK", Format[Format.ETC2_R8G8B8_UNORM_BLOCK = 147] = "ETC2_R8G8B8_UNORM_BLOCK", Format[Format.ETC2_R8G8B8_SRGB_BLOCK = 148] = "ETC2_R8G8B8_SRGB_BLOCK", Format[Format.ETC2_R8G8B8A1_UNORM_BLOCK = 149] = "ETC2_R8G8B8A1_UNORM_BLOCK", Format[Format.ETC2_R8G8B8A1_SRGB_BLOCK = 150] = "ETC2_R8G8B8A1_SRGB_BLOCK", Format[Format.ETC2_R8G8B8A8_UNORM_BLOCK = 151] = "ETC2_R8G8B8A8_UNORM_BLOCK", Format[Format.ETC2_R8G8B8A8_SRGB_BLOCK = 152] = "ETC2_R8G8B8A8_SRGB_BLOCK", Format[Format.EAC_R11_UNORM_BLOCK = 153] = "EAC_R11_UNORM_BLOCK", Format[Format.EAC_R11_SNORM_BLOCK = 154] = "EAC_R11_SNORM_BLOCK", Format[Format.EAC_R11G11_UNORM_BLOCK = 155] = "EAC_R11G11_UNORM_BLOCK", Format[Format.EAC_R11G11_SNORM_BLOCK = 156] = "EAC_R11G11_SNORM_BLOCK", Format[Format.ASTC_4x4_UNORM_BLOCK = 157] = "ASTC_4x4_UNORM_BLOCK", Format[Format.ASTC_4x4_SRGB_BLOCK = 158] = "ASTC_4x4_SRGB_BLOCK", Format[Format.ASTC_5x4_UNORM_BLOCK = 159] = "ASTC_5x4_UNORM_BLOCK", Format[Format.ASTC_5x4_SRGB_BLOCK = 160] = "ASTC_5x4_SRGB_BLOCK", Format[Format.ASTC_5x5_UNORM_BLOCK = 161] = "ASTC_5x5_UNORM_BLOCK", Format[Format.ASTC_5x5_SRGB_BLOCK = 162] = "ASTC_5x5_SRGB_BLOCK", Format[Format.ASTC_6x5_UNORM_BLOCK = 163] = "ASTC_6x5_UNORM_BLOCK", Format[Format.ASTC_6x5_SRGB_BLOCK = 164] = "ASTC_6x5_SRGB_BLOCK", Format[Format.ASTC_6x6_UNORM_BLOCK = 165] = "ASTC_6x6_UNORM_BLOCK", Format[Format.ASTC_6x6_SRGB_BLOCK = 166] = "ASTC_6x6_SRGB_BLOCK", Format[Format.ASTC_8x5_UNORM_BLOCK = 167] = "ASTC_8x5_UNORM_BLOCK", Format[Format.ASTC_8x5_SRGB_BLOCK = 168] = "ASTC_8x5_SRGB_BLOCK", Format[Format.ASTC_8x6_UNORM_BLOCK = 169] = "ASTC_8x6_UNORM_BLOCK", Format[Format.ASTC_8x6_SRGB_BLOCK = 170] = "ASTC_8x6_SRGB_BLOCK", Format[Format.ASTC_8x8_UNORM_BLOCK = 171] = "ASTC_8x8_UNORM_BLOCK", Format[Format.ASTC_8x8_SRGB_BLOCK = 172] = "ASTC_8x8_SRGB_BLOCK", Format[Format.ASTC_10x5_UNORM_BLOCK = 173] = "ASTC_10x5_UNORM_BLOCK", Format[Format.ASTC_10x5_SRGB_BLOCK = 174] = "ASTC_10x5_SRGB_BLOCK", Format[Format.ASTC_10x6_UNORM_BLOCK = 175] = "ASTC_10x6_UNORM_BLOCK", Format[Format.ASTC_10x6_SRGB_BLOCK = 176] = "ASTC_10x6_SRGB_BLOCK", Format[Format.ASTC_10x8_UNORM_BLOCK = 177] = "ASTC_10x8_UNORM_BLOCK", Format[Format.ASTC_10x8_SRGB_BLOCK = 178] = "ASTC_10x8_SRGB_BLOCK", Format[Format.ASTC_10x10_UNORM_BLOCK = 179] = "ASTC_10x10_UNORM_BLOCK", Format[Format.ASTC_10x10_SRGB_BLOCK = 180] = "ASTC_10x10_SRGB_BLOCK", Format[Format.ASTC_12x10_UNORM_BLOCK = 181] = "ASTC_12x10_UNORM_BLOCK", Format[Format.ASTC_12x10_SRGB_BLOCK = 182] = "ASTC_12x10_SRGB_BLOCK", Format[Format.ASTC_12x12_UNORM_BLOCK = 183] = "ASTC_12x12_UNORM_BLOCK", Format[Format.ASTC_12x12_SRGB_BLOCK = 184] = "ASTC_12x12_SRGB_BLOCK", Format[Format.G8B8G8R8_422_UNORM = 1000156000] = "G8B8G8R8_422_UNORM", Format[Format.B8G8R8G8_422_UNORM = 1000156001] = "B8G8R8G8_422_UNORM", Format[Format.G8_B8_R8_3PLANE_420_UNORM = 1000156002] = "G8_B8_R8_3PLANE_420_UNORM", Format[Format.G8_B8R8_2PLANE_420_UNORM = 1000156003] = "G8_B8R8_2PLANE_420_UNORM", Format[Format.G8_B8_R8_3PLANE_422_UNORM = 1000156004] = "G8_B8_R8_3PLANE_422_UNORM", Format[Format.G8_B8R8_2PLANE_422_UNORM = 1000156005] = "G8_B8R8_2PLANE_422_UNORM", Format[Format.G8_B8_R8_3PLANE_444_UNORM = 1000156006] = "G8_B8_R8_3PLANE_444_UNORM", Format[Format.R10X6_UNORM_PACK16 = 1000156007] = "R10X6_UNORM_PACK16", Format[Format.R10X6G10X6_UNORM_2PACK16 = 1000156008] = "R10X6G10X6_UNORM_2PACK16", Format[Format.R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009] = "R10X6G10X6B10X6A10X6_UNORM_4PACK16", Format[Format.G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010] = "G10X6B10X6G10X6R10X6_422_UNORM_4PACK16", Format[Format.B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011] = "B10X6G10X6R10X6G10X6_422_UNORM_4PACK16", Format[Format.G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012] = "G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16", Format[Format.G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013] = "G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16", Format[Format.G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014] = "G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16", Format[Format.G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015] = "G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16", Format[Format.G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016] = "G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16", Format[Format.R12X4_UNORM_PACK16 = 1000156017] = "R12X4_UNORM_PACK16", Format[Format.R12X4G12X4_UNORM_2PACK16 = 1000156018] = "R12X4G12X4_UNORM_2PACK16", Format[Format.R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019] = "R12X4G12X4B12X4A12X4_UNORM_4PACK16", Format[Format.G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020] = "G12X4B12X4G12X4R12X4_422_UNORM_4PACK16", Format[Format.B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021] = "B12X4G12X4R12X4G12X4_422_UNORM_4PACK16", Format[Format.G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022] = "G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16", Format[Format.G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023] = "G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16", Format[Format.G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024] = "G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16", Format[Format.G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025] = "G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16", Format[Format.G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026] = "G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16", Format[Format.G16B16G16R16_422_UNORM = 1000156027] = "G16B16G16R16_422_UNORM", Format[Format.B16G16R16G16_422_UNORM = 1000156028] = "B16G16R16G16_422_UNORM", Format[Format.G16_B16_R16_3PLANE_420_UNORM = 1000156029] = "G16_B16_R16_3PLANE_420_UNORM", Format[Format.G16_B16R16_2PLANE_420_UNORM = 1000156030] = "G16_B16R16_2PLANE_420_UNORM", Format[Format.G16_B16_R16_3PLANE_422_UNORM = 1000156031] = "G16_B16_R16_3PLANE_422_UNORM", Format[Format.G16_B16R16_2PLANE_422_UNORM = 1000156032] = "G16_B16R16_2PLANE_422_UNORM", Format[Format.G16_B16_R16_3PLANE_444_UNORM = 1000156033] = "G16_B16_R16_3PLANE_444_UNORM", Format[Format.G8_B8R8_2PLANE_444_UNORM = 1000330000] = "G8_B8R8_2PLANE_444_UNORM", Format[Format.G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 = 1000330001] = "G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16", Format[Format.G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 = 1000330002] = "G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16", Format[Format.G16_B16R16_2PLANE_444_UNORM = 1000330003] = "G16_B16R16_2PLANE_444_UNORM", Format[Format.A4R4G4B4_UNORM_PACK16 = 1000340000] = "A4R4G4B4_UNORM_PACK16", Format[Format.A4B4G4R4_UNORM_PACK16 = 1000340001] = "A4B4G4R4_UNORM_PACK16", Format[Format.ASTC_4x4_SFLOAT_BLOCK = 1000066000] = "ASTC_4x4_SFLOAT_BLOCK", Format[Format.ASTC_5x4_SFLOAT_BLOCK = 1000066001] = "ASTC_5x4_SFLOAT_BLOCK", Format[Format.ASTC_5x5_SFLOAT_BLOCK = 1000066002] = "ASTC_5x5_SFLOAT_BLOCK", Format[Format.ASTC_6x5_SFLOAT_BLOCK = 1000066003] = "ASTC_6x5_SFLOAT_BLOCK", Format[Format.ASTC_6x6_SFLOAT_BLOCK = 1000066004] = "ASTC_6x6_SFLOAT_BLOCK", Format[Format.ASTC_8x5_SFLOAT_BLOCK = 1000066005] = "ASTC_8x5_SFLOAT_BLOCK", Format[Format.ASTC_8x6_SFLOAT_BLOCK = 1000066006] = "ASTC_8x6_SFLOAT_BLOCK", Format[Format.ASTC_8x8_SFLOAT_BLOCK = 1000066007] = "ASTC_8x8_SFLOAT_BLOCK", Format[Format.ASTC_10x5_SFLOAT_BLOCK = 1000066008] = "ASTC_10x5_SFLOAT_BLOCK", Format[Format.ASTC_10x6_SFLOAT_BLOCK = 1000066009] = "ASTC_10x6_SFLOAT_BLOCK", Format[Format.ASTC_10x8_SFLOAT_BLOCK = 1000066010] = "ASTC_10x8_SFLOAT_BLOCK", Format[Format.ASTC_10x10_SFLOAT_BLOCK = 1000066011] = "ASTC_10x10_SFLOAT_BLOCK", Format[Format.ASTC_12x10_SFLOAT_BLOCK = 1000066012] = "ASTC_12x10_SFLOAT_BLOCK", Format[Format.ASTC_12x12_SFLOAT_BLOCK = 1000066013] = "ASTC_12x12_SFLOAT_BLOCK", Format[Format.PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000] = "PVRTC1_2BPP_UNORM_BLOCK_IMG", Format[Format.PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001] = "PVRTC1_4BPP_UNORM_BLOCK_IMG", Format[Format.PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002] = "PVRTC2_2BPP_UNORM_BLOCK_IMG", Format[Format.PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003] = "PVRTC2_4BPP_UNORM_BLOCK_IMG", Format[Format.PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004] = "PVRTC1_2BPP_SRGB_BLOCK_IMG", Format[Format.PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005] = "PVRTC1_4BPP_SRGB_BLOCK_IMG", Format[Format.PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006] = "PVRTC2_2BPP_SRGB_BLOCK_IMG", Format[Format.PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007] = "PVRTC2_4BPP_SRGB_BLOCK_IMG", Format[Format.ASTC_4x4_SFLOAT_BLOCK_EXT = 1000066000] = "ASTC_4x4_SFLOAT_BLOCK_EXT", Format[Format.ASTC_5x4_SFLOAT_BLOCK_EXT = 1000066001] = "ASTC_5x4_SFLOAT_BLOCK_EXT", Format[Format.ASTC_5x5_SFLOAT_BLOCK_EXT = 1000066002] = "ASTC_5x5_SFLOAT_BLOCK_EXT", Format[Format.ASTC_6x5_SFLOAT_BLOCK_EXT = 1000066003] = "ASTC_6x5_SFLOAT_BLOCK_EXT", Format[Format.ASTC_6x6_SFLOAT_BLOCK_EXT = 1000066004] = "ASTC_6x6_SFLOAT_BLOCK_EXT", Format[Format.ASTC_8x5_SFLOAT_BLOCK_EXT = 1000066005] = "ASTC_8x5_SFLOAT_BLOCK_EXT", Format[Format.ASTC_8x6_SFLOAT_BLOCK_EXT = 1000066006] = "ASTC_8x6_SFLOAT_BLOCK_EXT", Format[Format.ASTC_8x8_SFLOAT_BLOCK_EXT = 1000066007] = "ASTC_8x8_SFLOAT_BLOCK_EXT", Format[Format.ASTC_10x5_SFLOAT_BLOCK_EXT = 1000066008] = "ASTC_10x5_SFLOAT_BLOCK_EXT", Format[Format.ASTC_10x6_SFLOAT_BLOCK_EXT = 1000066009] = "ASTC_10x6_SFLOAT_BLOCK_EXT", Format[Format.ASTC_10x8_SFLOAT_BLOCK_EXT = 1000066010] = "ASTC_10x8_SFLOAT_BLOCK_EXT", Format[Format.ASTC_10x10_SFLOAT_BLOCK_EXT = 1000066011] = "ASTC_10x10_SFLOAT_BLOCK_EXT", Format[Format.ASTC_12x10_SFLOAT_BLOCK_EXT = 1000066012] = "ASTC_12x10_SFLOAT_BLOCK_EXT", Format[Format.ASTC_12x12_SFLOAT_BLOCK_EXT = 1000066013] = "ASTC_12x12_SFLOAT_BLOCK_EXT", Format[Format.G8B8G8R8_422_UNORM_KHR = 1000156000] = "G8B8G8R8_422_UNORM_KHR", Format[Format.B8G8R8G8_422_UNORM_KHR = 1000156001] = "B8G8R8G8_422_UNORM_KHR", Format[Format.G8_B8_R8_3PLANE_420_UNORM_KHR = 1000156002] = "G8_B8_R8_3PLANE_420_UNORM_KHR", Format[Format.G8_B8R8_2PLANE_420_UNORM_KHR = 1000156003] = "G8_B8R8_2PLANE_420_UNORM_KHR", Format[Format.G8_B8_R8_3PLANE_422_UNORM_KHR = 1000156004] = "G8_B8_R8_3PLANE_422_UNORM_KHR", Format[Format.G8_B8R8_2PLANE_422_UNORM_KHR = 1000156005] = "G8_B8R8_2PLANE_422_UNORM_KHR", Format[Format.G8_B8_R8_3PLANE_444_UNORM_KHR = 1000156006] = "G8_B8_R8_3PLANE_444_UNORM_KHR", Format[Format.R10X6_UNORM_PACK16_KHR = 1000156007] = "R10X6_UNORM_PACK16_KHR", Format[Format.R10X6G10X6_UNORM_2PACK16_KHR = 1000156008] = "R10X6G10X6_UNORM_2PACK16_KHR", Format[Format.R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = 1000156009] = "R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR", Format[Format.G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = 1000156010] = "G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR", Format[Format.B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = 1000156011] = "B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR", Format[Format.G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = 1000156012] = "G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR", Format[Format.G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = 1000156013] = "G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR", Format[Format.G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = 1000156014] = "G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR", Format[Format.G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = 1000156015] = "G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR", Format[Format.G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = 1000156016] = "G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR", Format[Format.R12X4_UNORM_PACK16_KHR = 1000156017] = "R12X4_UNORM_PACK16_KHR", Format[Format.R12X4G12X4_UNORM_2PACK16_KHR = 1000156018] = "R12X4G12X4_UNORM_2PACK16_KHR", Format[Format.R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = 1000156019] = "R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR", Format[Format.G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = 1000156020] = "G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR", Format[Format.B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = 1000156021] = "B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR", Format[Format.G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = 1000156022] = "G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR", Format[Format.G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = 1000156023] = "G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR", Format[Format.G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = 1000156024] = "G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR", Format[Format.G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = 1000156025] = "G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR", Format[Format.G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = 1000156026] = "G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR", Format[Format.G16B16G16R16_422_UNORM_KHR = 1000156027] = "G16B16G16R16_422_UNORM_KHR", Format[Format.B16G16R16G16_422_UNORM_KHR = 1000156028] = "B16G16R16G16_422_UNORM_KHR", Format[Format.G16_B16_R16_3PLANE_420_UNORM_KHR = 1000156029] = "G16_B16_R16_3PLANE_420_UNORM_KHR", Format[Format.G16_B16R16_2PLANE_420_UNORM_KHR = 1000156030] = "G16_B16R16_2PLANE_420_UNORM_KHR", Format[Format.G16_B16_R16_3PLANE_422_UNORM_KHR = 1000156031] = "G16_B16_R16_3PLANE_422_UNORM_KHR", Format[Format.G16_B16R16_2PLANE_422_UNORM_KHR = 1000156032] = "G16_B16R16_2PLANE_422_UNORM_KHR", Format[Format.G16_B16_R16_3PLANE_444_UNORM_KHR = 1000156033] = "G16_B16_R16_3PLANE_444_UNORM_KHR", Format[Format.ASTC_3x3x3_UNORM_BLOCK_EXT = 1000288000] = "ASTC_3x3x3_UNORM_BLOCK_EXT", Format[Format.ASTC_3x3x3_SRGB_BLOCK_EXT = 1000288001] = "ASTC_3x3x3_SRGB_BLOCK_EXT", Format[Format.ASTC_3x3x3_SFLOAT_BLOCK_EXT = 1000288002] = "ASTC_3x3x3_SFLOAT_BLOCK_EXT", Format[Format.ASTC_4x3x3_UNORM_BLOCK_EXT = 1000288003] = "ASTC_4x3x3_UNORM_BLOCK_EXT", Format[Format.ASTC_4x3x3_SRGB_BLOCK_EXT = 1000288004] = "ASTC_4x3x3_SRGB_BLOCK_EXT", Format[Format.ASTC_4x3x3_SFLOAT_BLOCK_EXT = 1000288005] = "ASTC_4x3x3_SFLOAT_BLOCK_EXT", Format[Format.ASTC_4x4x3_UNORM_BLOCK_EXT = 1000288006] = "ASTC_4x4x3_UNORM_BLOCK_EXT", Format[Format.ASTC_4x4x3_SRGB_BLOCK_EXT = 1000288007] = "ASTC_4x4x3_SRGB_BLOCK_EXT", Format[Format.ASTC_4x4x3_SFLOAT_BLOCK_EXT = 1000288008] = "ASTC_4x4x3_SFLOAT_BLOCK_EXT", Format[Format.ASTC_4x4x4_UNORM_BLOCK_EXT = 1000288009] = "ASTC_4x4x4_UNORM_BLOCK_EXT", Format[Format.ASTC_4x4x4_SRGB_BLOCK_EXT = 1000288010] = "ASTC_4x4x4_SRGB_BLOCK_EXT", Format[Format.ASTC_4x4x4_SFLOAT_BLOCK_EXT = 1000288011] = "ASTC_4x4x4_SFLOAT_BLOCK_EXT", Format[Format.ASTC_5x4x4_UNORM_BLOCK_EXT = 1000288012] = "ASTC_5x4x4_UNORM_BLOCK_EXT", Format[Format.ASTC_5x4x4_SRGB_BLOCK_EXT = 1000288013] = "ASTC_5x4x4_SRGB_BLOCK_EXT", Format[Format.ASTC_5x4x4_SFLOAT_BLOCK_EXT = 1000288014] = "ASTC_5x4x4_SFLOAT_BLOCK_EXT", Format[Format.ASTC_5x5x4_UNORM_BLOCK_EXT = 1000288015] = "ASTC_5x5x4_UNORM_BLOCK_EXT", Format[Format.ASTC_5x5x4_SRGB_BLOCK_EXT = 1000288016] = "ASTC_5x5x4_SRGB_BLOCK_EXT", Format[Format.ASTC_5x5x4_SFLOAT_BLOCK_EXT = 1000288017] = "ASTC_5x5x4_SFLOAT_BLOCK_EXT", Format[Format.ASTC_5x5x5_UNORM_BLOCK_EXT = 1000288018] = "ASTC_5x5x5_UNORM_BLOCK_EXT", Format[Format.ASTC_5x5x5_SRGB_BLOCK_EXT = 1000288019] = "ASTC_5x5x5_SRGB_BLOCK_EXT", Format[Format.ASTC_5x5x5_SFLOAT_BLOCK_EXT = 1000288020] = "ASTC_5x5x5_SFLOAT_BLOCK_EXT", Format[Format.ASTC_6x5x5_UNORM_BLOCK_EXT = 1000288021] = "ASTC_6x5x5_UNORM_BLOCK_EXT", Format[Format.ASTC_6x5x5_SRGB_BLOCK_EXT = 1000288022] = "ASTC_6x5x5_SRGB_BLOCK_EXT", Format[Format.ASTC_6x5x5_SFLOAT_BLOCK_EXT = 1000288023] = "ASTC_6x5x5_SFLOAT_BLOCK_EXT", Format[Format.ASTC_6x6x5_UNORM_BLOCK_EXT = 1000288024] = "ASTC_6x6x5_UNORM_BLOCK_EXT", Format[Format.ASTC_6x6x5_SRGB_BLOCK_EXT = 1000288025] = "ASTC_6x6x5_SRGB_BLOCK_EXT", Format[Format.ASTC_6x6x5_SFLOAT_BLOCK_EXT = 1000288026] = "ASTC_6x6x5_SFLOAT_BLOCK_EXT", Format[Format.ASTC_6x6x6_UNORM_BLOCK_EXT = 1000288027] = "ASTC_6x6x6_UNORM_BLOCK_EXT", Format[Format.ASTC_6x6x6_SRGB_BLOCK_EXT = 1000288028] = "ASTC_6x6x6_SRGB_BLOCK_EXT", Format[Format.ASTC_6x6x6_SFLOAT_BLOCK_EXT = 1000288029] = "ASTC_6x6x6_SFLOAT_BLOCK_EXT", Format[Format.G8_B8R8_2PLANE_444_UNORM_EXT = 1000330000] = "G8_B8R8_2PLANE_444_UNORM_EXT", Format[Format.G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT = 1000330001] = "G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT", Format[Format.G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT = 1000330002] = "G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT", Format[Format.G16_B16R16_2PLANE_444_UNORM_EXT = 1000330003] = "G16_B16R16_2PLANE_444_UNORM_EXT", Format[Format.A4R4G4B4_UNORM_PACK16_EXT = 1000340000] = "A4R4G4B4_UNORM_PACK16_EXT", Format[Format.A4B4G4R4_UNORM_PACK16_EXT = 1000340001] = "A4B4G4R4_UNORM_PACK16_EXT", Format[Format.R16G16_S10_5_NV = 1000464000] = "R16G16_S10_5_NV"; -}(Format || (Format = {})); -export var StructureType; -!function(StructureType) { - StructureType[StructureType.APPLICATION_INFO = 0] = "APPLICATION_INFO", StructureType[StructureType.INSTANCE_CREATE_INFO = 1] = "INSTANCE_CREATE_INFO", StructureType[StructureType.DEVICE_QUEUE_CREATE_INFO = 2] = "DEVICE_QUEUE_CREATE_INFO", StructureType[StructureType.DEVICE_CREATE_INFO = 3] = "DEVICE_CREATE_INFO", StructureType[StructureType.SUBMIT_INFO = 4] = "SUBMIT_INFO", StructureType[StructureType.MEMORY_ALLOCATE_INFO = 5] = "MEMORY_ALLOCATE_INFO", StructureType[StructureType.MAPPED_MEMORY_RANGE = 6] = "MAPPED_MEMORY_RANGE", StructureType[StructureType.BIND_SPARSE_INFO = 7] = "BIND_SPARSE_INFO", StructureType[StructureType.FENCE_CREATE_INFO = 8] = "FENCE_CREATE_INFO", StructureType[StructureType.SEMAPHORE_CREATE_INFO = 9] = "SEMAPHORE_CREATE_INFO", StructureType[StructureType.EVENT_CREATE_INFO = 10] = "EVENT_CREATE_INFO", StructureType[StructureType.QUERY_POOL_CREATE_INFO = 11] = "QUERY_POOL_CREATE_INFO", StructureType[StructureType.BUFFER_CREATE_INFO = 12] = "BUFFER_CREATE_INFO", StructureType[StructureType.BUFFER_VIEW_CREATE_INFO = 13] = "BUFFER_VIEW_CREATE_INFO", StructureType[StructureType.IMAGE_CREATE_INFO = 14] = "IMAGE_CREATE_INFO", StructureType[StructureType.IMAGE_VIEW_CREATE_INFO = 15] = "IMAGE_VIEW_CREATE_INFO", StructureType[StructureType.SHADER_MODULE_CREATE_INFO = 16] = "SHADER_MODULE_CREATE_INFO", StructureType[StructureType.PIPELINE_CACHE_CREATE_INFO = 17] = "PIPELINE_CACHE_CREATE_INFO", StructureType[StructureType.PIPELINE_SHADER_STAGE_CREATE_INFO = 18] = "PIPELINE_SHADER_STAGE_CREATE_INFO", StructureType[StructureType.PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19] = "PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO", StructureType[StructureType.PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20] = "PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO", StructureType[StructureType.PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21] = "PIPELINE_TESSELLATION_STATE_CREATE_INFO", StructureType[StructureType.PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22] = "PIPELINE_VIEWPORT_STATE_CREATE_INFO", StructureType[StructureType.PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23] = "PIPELINE_RASTERIZATION_STATE_CREATE_INFO", StructureType[StructureType.PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24] = "PIPELINE_MULTISAMPLE_STATE_CREATE_INFO", StructureType[StructureType.PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25] = "PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO", StructureType[StructureType.PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26] = "PIPELINE_COLOR_BLEND_STATE_CREATE_INFO", StructureType[StructureType.PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27] = "PIPELINE_DYNAMIC_STATE_CREATE_INFO", StructureType[StructureType.GRAPHICS_PIPELINE_CREATE_INFO = 28] = "GRAPHICS_PIPELINE_CREATE_INFO", StructureType[StructureType.COMPUTE_PIPELINE_CREATE_INFO = 29] = "COMPUTE_PIPELINE_CREATE_INFO", StructureType[StructureType.PIPELINE_LAYOUT_CREATE_INFO = 30] = "PIPELINE_LAYOUT_CREATE_INFO", StructureType[StructureType.SAMPLER_CREATE_INFO = 31] = "SAMPLER_CREATE_INFO", StructureType[StructureType.DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32] = "DESCRIPTOR_SET_LAYOUT_CREATE_INFO", StructureType[StructureType.DESCRIPTOR_POOL_CREATE_INFO = 33] = "DESCRIPTOR_POOL_CREATE_INFO", StructureType[StructureType.DESCRIPTOR_SET_ALLOCATE_INFO = 34] = "DESCRIPTOR_SET_ALLOCATE_INFO", StructureType[StructureType.WRITE_DESCRIPTOR_SET = 35] = "WRITE_DESCRIPTOR_SET", StructureType[StructureType.COPY_DESCRIPTOR_SET = 36] = "COPY_DESCRIPTOR_SET", StructureType[StructureType.FRAMEBUFFER_CREATE_INFO = 37] = "FRAMEBUFFER_CREATE_INFO", StructureType[StructureType.RENDER_PASS_CREATE_INFO = 38] = "RENDER_PASS_CREATE_INFO", StructureType[StructureType.COMMAND_POOL_CREATE_INFO = 39] = "COMMAND_POOL_CREATE_INFO", StructureType[StructureType.COMMAND_BUFFER_ALLOCATE_INFO = 40] = "COMMAND_BUFFER_ALLOCATE_INFO", StructureType[StructureType.COMMAND_BUFFER_INHERITANCE_INFO = 41] = "COMMAND_BUFFER_INHERITANCE_INFO", StructureType[StructureType.COMMAND_BUFFER_BEGIN_INFO = 42] = "COMMAND_BUFFER_BEGIN_INFO", StructureType[StructureType.RENDER_PASS_BEGIN_INFO = 43] = "RENDER_PASS_BEGIN_INFO", StructureType[StructureType.BUFFER_MEMORY_BARRIER = 44] = "BUFFER_MEMORY_BARRIER", StructureType[StructureType.IMAGE_MEMORY_BARRIER = 45] = "IMAGE_MEMORY_BARRIER", StructureType[StructureType.MEMORY_BARRIER = 46] = "MEMORY_BARRIER", StructureType[StructureType.LOADER_INSTANCE_CREATE_INFO = 47] = "LOADER_INSTANCE_CREATE_INFO", StructureType[StructureType.LOADER_DEVICE_CREATE_INFO = 48] = "LOADER_DEVICE_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000] = "PHYSICAL_DEVICE_SUBGROUP_PROPERTIES", StructureType[StructureType.BIND_BUFFER_MEMORY_INFO = 1000157000] = "BIND_BUFFER_MEMORY_INFO", StructureType[StructureType.BIND_IMAGE_MEMORY_INFO = 1000157001] = "BIND_IMAGE_MEMORY_INFO", StructureType[StructureType.PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000] = "PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES", StructureType[StructureType.MEMORY_DEDICATED_REQUIREMENTS = 1000127000] = "MEMORY_DEDICATED_REQUIREMENTS", StructureType[StructureType.MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001] = "MEMORY_DEDICATED_ALLOCATE_INFO", StructureType[StructureType.MEMORY_ALLOCATE_FLAGS_INFO = 1000060000] = "MEMORY_ALLOCATE_FLAGS_INFO", StructureType[StructureType.DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003] = "DEVICE_GROUP_RENDER_PASS_BEGIN_INFO", StructureType[StructureType.DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004] = "DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO", StructureType[StructureType.DEVICE_GROUP_SUBMIT_INFO = 1000060005] = "DEVICE_GROUP_SUBMIT_INFO", StructureType[StructureType.DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006] = "DEVICE_GROUP_BIND_SPARSE_INFO", StructureType[StructureType.BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013] = "BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO", StructureType[StructureType.BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014] = "BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO", StructureType[StructureType.PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000] = "PHYSICAL_DEVICE_GROUP_PROPERTIES", StructureType[StructureType.DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001] = "DEVICE_GROUP_DEVICE_CREATE_INFO", StructureType[StructureType.BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000] = "BUFFER_MEMORY_REQUIREMENTS_INFO_2", StructureType[StructureType.IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001] = "IMAGE_MEMORY_REQUIREMENTS_INFO_2", StructureType[StructureType.IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002] = "IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2", StructureType[StructureType.MEMORY_REQUIREMENTS_2 = 1000146003] = "MEMORY_REQUIREMENTS_2", StructureType[StructureType.SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004] = "SPARSE_IMAGE_MEMORY_REQUIREMENTS_2", StructureType[StructureType.PHYSICAL_DEVICE_FEATURES_2 = 1000059000] = "PHYSICAL_DEVICE_FEATURES_2", StructureType[StructureType.PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001] = "PHYSICAL_DEVICE_PROPERTIES_2", StructureType[StructureType.FORMAT_PROPERTIES_2 = 1000059002] = "FORMAT_PROPERTIES_2", StructureType[StructureType.IMAGE_FORMAT_PROPERTIES_2 = 1000059003] = "IMAGE_FORMAT_PROPERTIES_2", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004] = "PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2", StructureType[StructureType.QUEUE_FAMILY_PROPERTIES_2 = 1000059005] = "QUEUE_FAMILY_PROPERTIES_2", StructureType[StructureType.PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006] = "PHYSICAL_DEVICE_MEMORY_PROPERTIES_2", StructureType[StructureType.SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007] = "SPARSE_IMAGE_FORMAT_PROPERTIES_2", StructureType[StructureType.PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008] = "PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2", StructureType[StructureType.PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000] = "PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES", StructureType[StructureType.RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001] = "RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO", StructureType[StructureType.IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002] = "IMAGE_VIEW_USAGE_CREATE_INFO", StructureType[StructureType.PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003] = "PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO", StructureType[StructureType.RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000] = "RENDER_PASS_MULTIVIEW_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001] = "PHYSICAL_DEVICE_MULTIVIEW_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002] = "PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES", StructureType[StructureType.PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000] = "PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = 1000120000] = "PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES", StructureType[StructureType.PROTECTED_SUBMIT_INFO = 1000145000] = "PROTECTED_SUBMIT_INFO", StructureType[StructureType.PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001] = "PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002] = "PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES", StructureType[StructureType.DEVICE_QUEUE_INFO_2 = 1000145003] = "DEVICE_QUEUE_INFO_2", StructureType[StructureType.SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000] = "SAMPLER_YCBCR_CONVERSION_CREATE_INFO", StructureType[StructureType.SAMPLER_YCBCR_CONVERSION_INFO = 1000156001] = "SAMPLER_YCBCR_CONVERSION_INFO", StructureType[StructureType.BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002] = "BIND_IMAGE_PLANE_MEMORY_INFO", StructureType[StructureType.IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003] = "IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO", StructureType[StructureType.PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004] = "PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES", StructureType[StructureType.SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005] = "SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES", StructureType[StructureType.DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000] = "DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000] = "PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO", StructureType[StructureType.EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001] = "EXTERNAL_IMAGE_FORMAT_PROPERTIES", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002] = "PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO", StructureType[StructureType.EXTERNAL_BUFFER_PROPERTIES = 1000071003] = "EXTERNAL_BUFFER_PROPERTIES", StructureType[StructureType.PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004] = "PHYSICAL_DEVICE_ID_PROPERTIES", StructureType[StructureType.EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000] = "EXTERNAL_MEMORY_BUFFER_CREATE_INFO", StructureType[StructureType.EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001] = "EXTERNAL_MEMORY_IMAGE_CREATE_INFO", StructureType[StructureType.EXPORT_MEMORY_ALLOCATE_INFO = 1000072002] = "EXPORT_MEMORY_ALLOCATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000] = "PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO", StructureType[StructureType.EXTERNAL_FENCE_PROPERTIES = 1000112001] = "EXTERNAL_FENCE_PROPERTIES", StructureType[StructureType.EXPORT_FENCE_CREATE_INFO = 1000113000] = "EXPORT_FENCE_CREATE_INFO", StructureType[StructureType.EXPORT_SEMAPHORE_CREATE_INFO = 1000077000] = "EXPORT_SEMAPHORE_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000] = "PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO", StructureType[StructureType.EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001] = "EXTERNAL_SEMAPHORE_PROPERTIES", StructureType[StructureType.PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000] = "PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES", StructureType[StructureType.DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001] = "DESCRIPTOR_SET_LAYOUT_SUPPORT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000] = "PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = 1000063000] = "PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_VULKAN_1_1_FEATURES = 49] = "PHYSICAL_DEVICE_VULKAN_1_1_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES = 50] = "PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES", StructureType[StructureType.PHYSICAL_DEVICE_VULKAN_1_2_FEATURES = 51] = "PHYSICAL_DEVICE_VULKAN_1_2_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES = 52] = "PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES", StructureType[StructureType.IMAGE_FORMAT_LIST_CREATE_INFO = 1000147000] = "IMAGE_FORMAT_LIST_CREATE_INFO", StructureType[StructureType.ATTACHMENT_DESCRIPTION_2 = 1000109000] = "ATTACHMENT_DESCRIPTION_2", StructureType[StructureType.ATTACHMENT_REFERENCE_2 = 1000109001] = "ATTACHMENT_REFERENCE_2", StructureType[StructureType.SUBPASS_DESCRIPTION_2 = 1000109002] = "SUBPASS_DESCRIPTION_2", StructureType[StructureType.SUBPASS_DEPENDENCY_2 = 1000109003] = "SUBPASS_DEPENDENCY_2", StructureType[StructureType.RENDER_PASS_CREATE_INFO_2 = 1000109004] = "RENDER_PASS_CREATE_INFO_2", StructureType[StructureType.SUBPASS_BEGIN_INFO = 1000109005] = "SUBPASS_BEGIN_INFO", StructureType[StructureType.SUBPASS_END_INFO = 1000109006] = "SUBPASS_END_INFO", StructureType[StructureType.PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES = 1000177000] = "PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_DRIVER_PROPERTIES = 1000196000] = "PHYSICAL_DEVICE_DRIVER_PROPERTIES", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES = 1000180000] = "PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES = 1000082000] = "PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES = 1000197000] = "PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES", StructureType[StructureType.DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO = 1000161000] = "DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES = 1000161001] = "PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES = 1000161002] = "PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES", StructureType[StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO = 1000161003] = "DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO", StructureType[StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT = 1000161004] = "DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT", StructureType[StructureType.PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES = 1000199000] = "PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES", StructureType[StructureType.SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE = 1000199001] = "SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE", StructureType[StructureType.PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES = 1000221000] = "PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES", StructureType[StructureType.IMAGE_STENCIL_USAGE_CREATE_INFO = 1000246000] = "IMAGE_STENCIL_USAGE_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES = 1000130000] = "PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES", StructureType[StructureType.SAMPLER_REDUCTION_MODE_CREATE_INFO = 1000130001] = "SAMPLER_REDUCTION_MODE_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES = 1000211000] = "PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES = 1000108000] = "PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES", StructureType[StructureType.FRAMEBUFFER_ATTACHMENTS_CREATE_INFO = 1000108001] = "FRAMEBUFFER_ATTACHMENTS_CREATE_INFO", StructureType[StructureType.FRAMEBUFFER_ATTACHMENT_IMAGE_INFO = 1000108002] = "FRAMEBUFFER_ATTACHMENT_IMAGE_INFO", StructureType[StructureType.RENDER_PASS_ATTACHMENT_BEGIN_INFO = 1000108003] = "RENDER_PASS_ATTACHMENT_BEGIN_INFO", StructureType[StructureType.PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES = 1000253000] = "PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES = 1000175000] = "PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES = 1000241000] = "PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES", StructureType[StructureType.ATTACHMENT_REFERENCE_STENCIL_LAYOUT = 1000241001] = "ATTACHMENT_REFERENCE_STENCIL_LAYOUT", StructureType[StructureType.ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT = 1000241002] = "ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT", StructureType[StructureType.PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES = 1000261000] = "PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES = 1000207000] = "PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES = 1000207001] = "PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES", StructureType[StructureType.SEMAPHORE_TYPE_CREATE_INFO = 1000207002] = "SEMAPHORE_TYPE_CREATE_INFO", StructureType[StructureType.TIMELINE_SEMAPHORE_SUBMIT_INFO = 1000207003] = "TIMELINE_SEMAPHORE_SUBMIT_INFO", StructureType[StructureType.SEMAPHORE_WAIT_INFO = 1000207004] = "SEMAPHORE_WAIT_INFO", StructureType[StructureType.SEMAPHORE_SIGNAL_INFO = 1000207005] = "SEMAPHORE_SIGNAL_INFO", StructureType[StructureType.PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES = 1000257000] = "PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES", StructureType[StructureType.BUFFER_DEVICE_ADDRESS_INFO = 1000244001] = "BUFFER_DEVICE_ADDRESS_INFO", StructureType[StructureType.BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO = 1000257002] = "BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO", StructureType[StructureType.MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO = 1000257003] = "MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO", StructureType[StructureType.DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO = 1000257004] = "DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO", StructureType[StructureType.PHYSICAL_DEVICE_VULKAN_1_3_FEATURES = 53] = "PHYSICAL_DEVICE_VULKAN_1_3_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES = 54] = "PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES", StructureType[StructureType.PIPELINE_CREATION_FEEDBACK_CREATE_INFO = 1000192000] = "PIPELINE_CREATION_FEEDBACK_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES = 1000215000] = "PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_TOOL_PROPERTIES = 1000245000] = "PHYSICAL_DEVICE_TOOL_PROPERTIES", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES = 1000276000] = "PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES = 1000295000] = "PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES", StructureType[StructureType.DEVICE_PRIVATE_DATA_CREATE_INFO = 1000295001] = "DEVICE_PRIVATE_DATA_CREATE_INFO", StructureType[StructureType.PRIVATE_DATA_SLOT_CREATE_INFO = 1000295002] = "PRIVATE_DATA_SLOT_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES = 1000297000] = "PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES", StructureType[StructureType.MEMORY_BARRIER_2 = 1000314000] = "MEMORY_BARRIER_2", StructureType[StructureType.BUFFER_MEMORY_BARRIER_2 = 1000314001] = "BUFFER_MEMORY_BARRIER_2", StructureType[StructureType.IMAGE_MEMORY_BARRIER_2 = 1000314002] = "IMAGE_MEMORY_BARRIER_2", StructureType[StructureType.DEPENDENCY_INFO = 1000314003] = "DEPENDENCY_INFO", StructureType[StructureType.SUBMIT_INFO_2 = 1000314004] = "SUBMIT_INFO_2", StructureType[StructureType.SEMAPHORE_SUBMIT_INFO = 1000314005] = "SEMAPHORE_SUBMIT_INFO", StructureType[StructureType.COMMAND_BUFFER_SUBMIT_INFO = 1000314006] = "COMMAND_BUFFER_SUBMIT_INFO", StructureType[StructureType.PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES = 1000314007] = "PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES = 1000325000] = "PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES = 1000335000] = "PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES", StructureType[StructureType.COPY_BUFFER_INFO_2 = 1000337000] = "COPY_BUFFER_INFO_2", StructureType[StructureType.COPY_IMAGE_INFO_2 = 1000337001] = "COPY_IMAGE_INFO_2", StructureType[StructureType.COPY_BUFFER_TO_IMAGE_INFO_2 = 1000337002] = "COPY_BUFFER_TO_IMAGE_INFO_2", StructureType[StructureType.COPY_IMAGE_TO_BUFFER_INFO_2 = 1000337003] = "COPY_IMAGE_TO_BUFFER_INFO_2", StructureType[StructureType.BLIT_IMAGE_INFO_2 = 1000337004] = "BLIT_IMAGE_INFO_2", StructureType[StructureType.RESOLVE_IMAGE_INFO_2 = 1000337005] = "RESOLVE_IMAGE_INFO_2", StructureType[StructureType.BUFFER_COPY_2 = 1000337006] = "BUFFER_COPY_2", StructureType[StructureType.IMAGE_COPY_2 = 1000337007] = "IMAGE_COPY_2", StructureType[StructureType.IMAGE_BLIT_2 = 1000337008] = "IMAGE_BLIT_2", StructureType[StructureType.BUFFER_IMAGE_COPY_2 = 1000337009] = "BUFFER_IMAGE_COPY_2", StructureType[StructureType.IMAGE_RESOLVE_2 = 1000337010] = "IMAGE_RESOLVE_2", StructureType[StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES = 1000225000] = "PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES", StructureType[StructureType.PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO = 1000225001] = "PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES = 1000225002] = "PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES = 1000138000] = "PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES = 1000138001] = "PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES", StructureType[StructureType.WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK = 1000138002] = "WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK", StructureType[StructureType.DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO = 1000138003] = "DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES = 1000066000] = "PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES", StructureType[StructureType.RENDERING_INFO = 1000044000] = "RENDERING_INFO", StructureType[StructureType.RENDERING_ATTACHMENT_INFO = 1000044001] = "RENDERING_ATTACHMENT_INFO", StructureType[StructureType.PIPELINE_RENDERING_CREATE_INFO = 1000044002] = "PIPELINE_RENDERING_CREATE_INFO", StructureType[StructureType.PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES = 1000044003] = "PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES", StructureType[StructureType.COMMAND_BUFFER_INHERITANCE_RENDERING_INFO = 1000044004] = "COMMAND_BUFFER_INHERITANCE_RENDERING_INFO", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES = 1000280000] = "PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES = 1000280001] = "PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES", StructureType[StructureType.PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES = 1000281001] = "PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES", StructureType[StructureType.FORMAT_PROPERTIES_3 = 1000360000] = "FORMAT_PROPERTIES_3", StructureType[StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES = 1000413000] = "PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES", StructureType[StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES = 1000413001] = "PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES", StructureType[StructureType.DEVICE_BUFFER_MEMORY_REQUIREMENTS = 1000413002] = "DEVICE_BUFFER_MEMORY_REQUIREMENTS", StructureType[StructureType.DEVICE_IMAGE_MEMORY_REQUIREMENTS = 1000413003] = "DEVICE_IMAGE_MEMORY_REQUIREMENTS", StructureType[StructureType.SWAPCHAIN_CREATE_INFO_KHR = 1000001000] = "SWAPCHAIN_CREATE_INFO_KHR", StructureType[StructureType.PRESENT_INFO_KHR = 1000001001] = "PRESENT_INFO_KHR", StructureType[StructureType.DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007] = "DEVICE_GROUP_PRESENT_CAPABILITIES_KHR", StructureType[StructureType.IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008] = "IMAGE_SWAPCHAIN_CREATE_INFO_KHR", StructureType[StructureType.BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009] = "BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR", StructureType[StructureType.ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010] = "ACQUIRE_NEXT_IMAGE_INFO_KHR", StructureType[StructureType.DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011] = "DEVICE_GROUP_PRESENT_INFO_KHR", StructureType[StructureType.DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012] = "DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR", StructureType[StructureType.DISPLAY_MODE_CREATE_INFO_KHR = 1000002000] = "DISPLAY_MODE_CREATE_INFO_KHR", StructureType[StructureType.DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001] = "DISPLAY_SURFACE_CREATE_INFO_KHR", StructureType[StructureType.DISPLAY_PRESENT_INFO_KHR = 1000003000] = "DISPLAY_PRESENT_INFO_KHR", StructureType[StructureType.XLIB_SURFACE_CREATE_INFO_KHR = 1000004000] = "XLIB_SURFACE_CREATE_INFO_KHR", StructureType[StructureType.XCB_SURFACE_CREATE_INFO_KHR = 1000005000] = "XCB_SURFACE_CREATE_INFO_KHR", StructureType[StructureType.WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000] = "WAYLAND_SURFACE_CREATE_INFO_KHR", StructureType[StructureType.ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000] = "ANDROID_SURFACE_CREATE_INFO_KHR", StructureType[StructureType.WIN32_SURFACE_CREATE_INFO_KHR = 1000009000] = "WIN32_SURFACE_CREATE_INFO_KHR", StructureType[StructureType.NATIVE_BUFFER_ANDROID = 1000010000] = "NATIVE_BUFFER_ANDROID", StructureType[StructureType.SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001] = "SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID", StructureType[StructureType.PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002] = "PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID", StructureType[StructureType.DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000] = "DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT", StructureType[StructureType.DEBUG_REPORT_CREATE_INFO_EXT = 1000011000] = "DEBUG_REPORT_CREATE_INFO_EXT", StructureType[StructureType.PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000] = "PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD", StructureType[StructureType.DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000] = "DEBUG_MARKER_OBJECT_NAME_INFO_EXT", StructureType[StructureType.DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001] = "DEBUG_MARKER_OBJECT_TAG_INFO_EXT", StructureType[StructureType.DEBUG_MARKER_MARKER_INFO_EXT = 1000022002] = "DEBUG_MARKER_MARKER_INFO_EXT", StructureType[StructureType.VIDEO_PROFILE_INFO_KHR = 1000023000] = "VIDEO_PROFILE_INFO_KHR", StructureType[StructureType.VIDEO_CAPABILITIES_KHR = 1000023001] = "VIDEO_CAPABILITIES_KHR", StructureType[StructureType.VIDEO_PICTURE_RESOURCE_INFO_KHR = 1000023002] = "VIDEO_PICTURE_RESOURCE_INFO_KHR", StructureType[StructureType.VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR = 1000023003] = "VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR", StructureType[StructureType.BIND_VIDEO_SESSION_MEMORY_INFO_KHR = 1000023004] = "BIND_VIDEO_SESSION_MEMORY_INFO_KHR", StructureType[StructureType.VIDEO_SESSION_CREATE_INFO_KHR = 1000023005] = "VIDEO_SESSION_CREATE_INFO_KHR", StructureType[StructureType.VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000023006] = "VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR", StructureType[StructureType.VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR = 1000023007] = "VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR", StructureType[StructureType.VIDEO_BEGIN_CODING_INFO_KHR = 1000023008] = "VIDEO_BEGIN_CODING_INFO_KHR", StructureType[StructureType.VIDEO_END_CODING_INFO_KHR = 1000023009] = "VIDEO_END_CODING_INFO_KHR", StructureType[StructureType.VIDEO_CODING_CONTROL_INFO_KHR = 1000023010] = "VIDEO_CODING_CONTROL_INFO_KHR", StructureType[StructureType.VIDEO_REFERENCE_SLOT_INFO_KHR = 1000023011] = "VIDEO_REFERENCE_SLOT_INFO_KHR", StructureType[StructureType.QUEUE_FAMILY_VIDEO_PROPERTIES_KHR = 1000023012] = "QUEUE_FAMILY_VIDEO_PROPERTIES_KHR", StructureType[StructureType.VIDEO_PROFILE_LIST_INFO_KHR = 1000023013] = "VIDEO_PROFILE_LIST_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR = 1000023014] = "PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR", StructureType[StructureType.VIDEO_FORMAT_PROPERTIES_KHR = 1000023015] = "VIDEO_FORMAT_PROPERTIES_KHR", StructureType[StructureType.QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR = 1000023016] = "QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR", StructureType[StructureType.VIDEO_DECODE_INFO_KHR = 1000024000] = "VIDEO_DECODE_INFO_KHR", StructureType[StructureType.VIDEO_DECODE_CAPABILITIES_KHR = 1000024001] = "VIDEO_DECODE_CAPABILITIES_KHR", StructureType[StructureType.VIDEO_DECODE_USAGE_INFO_KHR = 1000024002] = "VIDEO_DECODE_USAGE_INFO_KHR", StructureType[StructureType.DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000] = "DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV", StructureType[StructureType.DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001] = "DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV", StructureType[StructureType.DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002] = "DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000] = "PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001] = "PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT", StructureType[StructureType.PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002] = "PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT", StructureType[StructureType.CU_MODULE_CREATE_INFO_NVX = 1000029000] = "CU_MODULE_CREATE_INFO_NVX", StructureType[StructureType.CU_FUNCTION_CREATE_INFO_NVX = 1000029001] = "CU_FUNCTION_CREATE_INFO_NVX", StructureType[StructureType.CU_LAUNCH_INFO_NVX = 1000029002] = "CU_LAUNCH_INFO_NVX", StructureType[StructureType.IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000] = "IMAGE_VIEW_HANDLE_INFO_NVX", StructureType[StructureType.IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001] = "IMAGE_VIEW_ADDRESS_PROPERTIES_NVX", StructureType[StructureType.VIDEO_ENCODE_H264_CAPABILITIES_EXT = 1000038000] = "VIDEO_ENCODE_H264_CAPABILITIES_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000038001] = "VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT = 1000038002] = "VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT = 1000038003] = "VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT = 1000038004] = "VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT = 1000038005] = "VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT = 1000038006] = "VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_PROFILE_INFO_EXT = 1000038007] = "VIDEO_ENCODE_H264_PROFILE_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT = 1000038008] = "VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT = 1000038009] = "VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT = 1000038010] = "VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_CAPABILITIES_EXT = 1000039000] = "VIDEO_ENCODE_H265_CAPABILITIES_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000039001] = "VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT = 1000039002] = "VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT = 1000039003] = "VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT = 1000039004] = "VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT = 1000039005] = "VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT = 1000039006] = "VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_PROFILE_INFO_EXT = 1000039007] = "VIDEO_ENCODE_H265_PROFILE_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT = 1000039008] = "VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT = 1000039009] = "VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT", StructureType[StructureType.VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT = 1000039010] = "VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT", StructureType[StructureType.VIDEO_DECODE_H264_CAPABILITIES_EXT = 1000040000] = "VIDEO_DECODE_H264_CAPABILITIES_EXT", StructureType[StructureType.VIDEO_DECODE_H264_PICTURE_INFO_EXT = 1000040001] = "VIDEO_DECODE_H264_PICTURE_INFO_EXT", StructureType[StructureType.VIDEO_DECODE_H264_PROFILE_INFO_EXT = 1000040003] = "VIDEO_DECODE_H264_PROFILE_INFO_EXT", StructureType[StructureType.VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000040004] = "VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT", StructureType[StructureType.VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT = 1000040005] = "VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT", StructureType[StructureType.VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT = 1000040006] = "VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT", StructureType[StructureType.TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000] = "TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD", StructureType[StructureType.RENDERING_INFO_KHR = 1000044000] = "RENDERING_INFO_KHR", StructureType[StructureType.RENDERING_ATTACHMENT_INFO_KHR = 1000044001] = "RENDERING_ATTACHMENT_INFO_KHR", StructureType[StructureType.PIPELINE_RENDERING_CREATE_INFO_KHR = 1000044002] = "PIPELINE_RENDERING_CREATE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR = 1000044003] = "PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR", StructureType[StructureType.COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR = 1000044004] = "COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR", StructureType[StructureType.RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000044006] = "RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR", StructureType[StructureType.RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT = 1000044007] = "RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT", StructureType[StructureType.ATTACHMENT_SAMPLE_COUNT_INFO_AMD = 1000044008] = "ATTACHMENT_SAMPLE_COUNT_INFO_AMD", StructureType[StructureType.ATTACHMENT_SAMPLE_COUNT_INFO_NV = 1000044008] = "ATTACHMENT_SAMPLE_COUNT_INFO_NV", StructureType[StructureType.MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX = 1000044009] = "MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX", StructureType[StructureType.STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP = 1000049000] = "STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP", StructureType[StructureType.PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000] = "PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV", StructureType[StructureType.RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = 1000053000] = "RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = 1000053001] = "PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = 1000053002] = "PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR", StructureType[StructureType.EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000] = "EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV", StructureType[StructureType.EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001] = "EXPORT_MEMORY_ALLOCATE_INFO_NV", StructureType[StructureType.IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000] = "IMPORT_MEMORY_WIN32_HANDLE_INFO_NV", StructureType[StructureType.EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001] = "EXPORT_MEMORY_WIN32_HANDLE_INFO_NV", StructureType[StructureType.WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000] = "WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000] = "PHYSICAL_DEVICE_FEATURES_2_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001] = "PHYSICAL_DEVICE_PROPERTIES_2_KHR", StructureType[StructureType.FORMAT_PROPERTIES_2_KHR = 1000059002] = "FORMAT_PROPERTIES_2_KHR", StructureType[StructureType.IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003] = "IMAGE_FORMAT_PROPERTIES_2_KHR", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004] = "PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR", StructureType[StructureType.QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005] = "QUEUE_FAMILY_PROPERTIES_2_KHR", StructureType[StructureType.PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006] = "PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR", StructureType[StructureType.SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007] = "SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008] = "PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR", StructureType[StructureType.MEMORY_ALLOCATE_FLAGS_INFO_KHR = 1000060000] = "MEMORY_ALLOCATE_FLAGS_INFO_KHR", StructureType[StructureType.DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = 1000060003] = "DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR", StructureType[StructureType.DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = 1000060004] = "DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR", StructureType[StructureType.DEVICE_GROUP_SUBMIT_INFO_KHR = 1000060005] = "DEVICE_GROUP_SUBMIT_INFO_KHR", StructureType[StructureType.DEVICE_GROUP_BIND_SPARSE_INFO_KHR = 1000060006] = "DEVICE_GROUP_BIND_SPARSE_INFO_KHR", StructureType[StructureType.BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060013] = "BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR", StructureType[StructureType.BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060014] = "BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR", StructureType[StructureType.VALIDATION_FLAGS_EXT = 1000061000] = "VALIDATION_FLAGS_EXT", StructureType[StructureType.VI_SURFACE_CREATE_INFO_NN = 1000062000] = "VI_SURFACE_CREATE_INFO_NN", StructureType[StructureType.PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT = 1000066000] = "PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT", StructureType[StructureType.IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000] = "IMAGE_VIEW_ASTC_DECODE_MODE_EXT", StructureType[StructureType.PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001] = "PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT", StructureType[StructureType.PIPELINE_ROBUSTNESS_CREATE_INFO_EXT = 1000068000] = "PIPELINE_ROBUSTNESS_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT = 1000068001] = "PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT = 1000068002] = "PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = 1000070000] = "PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR", StructureType[StructureType.DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = 1000070001] = "DEVICE_GROUP_DEVICE_CREATE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = 1000071000] = "PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR", StructureType[StructureType.EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = 1000071001] = "EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = 1000071002] = "PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR", StructureType[StructureType.EXTERNAL_BUFFER_PROPERTIES_KHR = 1000071003] = "EXTERNAL_BUFFER_PROPERTIES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_ID_PROPERTIES_KHR = 1000071004] = "PHYSICAL_DEVICE_ID_PROPERTIES_KHR", StructureType[StructureType.EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = 1000072000] = "EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR", StructureType[StructureType.EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = 1000072001] = "EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR", StructureType[StructureType.EXPORT_MEMORY_ALLOCATE_INFO_KHR = 1000072002] = "EXPORT_MEMORY_ALLOCATE_INFO_KHR", StructureType[StructureType.IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000] = "IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR", StructureType[StructureType.EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001] = "EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR", StructureType[StructureType.MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002] = "MEMORY_WIN32_HANDLE_PROPERTIES_KHR", StructureType[StructureType.MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003] = "MEMORY_GET_WIN32_HANDLE_INFO_KHR", StructureType[StructureType.IMPORT_MEMORY_FD_INFO_KHR = 1000074000] = "IMPORT_MEMORY_FD_INFO_KHR", StructureType[StructureType.MEMORY_FD_PROPERTIES_KHR = 1000074001] = "MEMORY_FD_PROPERTIES_KHR", StructureType[StructureType.MEMORY_GET_FD_INFO_KHR = 1000074002] = "MEMORY_GET_FD_INFO_KHR", StructureType[StructureType.WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000] = "WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = 1000076000] = "PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR", StructureType[StructureType.EXTERNAL_SEMAPHORE_PROPERTIES_KHR = 1000076001] = "EXTERNAL_SEMAPHORE_PROPERTIES_KHR", StructureType[StructureType.EXPORT_SEMAPHORE_CREATE_INFO_KHR = 1000077000] = "EXPORT_SEMAPHORE_CREATE_INFO_KHR", StructureType[StructureType.IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000] = "IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR", StructureType[StructureType.EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001] = "EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR", StructureType[StructureType.D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002] = "D3D12_FENCE_SUBMIT_INFO_KHR", StructureType[StructureType.SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003] = "SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR", StructureType[StructureType.IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000] = "IMPORT_SEMAPHORE_FD_INFO_KHR", StructureType[StructureType.SEMAPHORE_GET_FD_INFO_KHR = 1000079001] = "SEMAPHORE_GET_FD_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000] = "PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR", StructureType[StructureType.COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000] = "COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001] = "PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT", StructureType[StructureType.CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002] = "CONDITIONAL_RENDERING_BEGIN_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR = 1000082000] = "PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = 1000082000] = "PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = 1000083000] = "PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR", StructureType[StructureType.PRESENT_REGIONS_KHR = 1000084000] = "PRESENT_REGIONS_KHR", StructureType[StructureType.DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000] = "DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR", StructureType[StructureType.PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000] = "PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV", StructureType[StructureType.SURFACE_CAPABILITIES_2_EXT = 1000090000] = "SURFACE_CAPABILITIES_2_EXT", StructureType[StructureType.SURFACE_CAPABILITIES2_EXT = 1000090000] = "SURFACE_CAPABILITIES2_EXT", StructureType[StructureType.DISPLAY_POWER_INFO_EXT = 1000091000] = "DISPLAY_POWER_INFO_EXT", StructureType[StructureType.DEVICE_EVENT_INFO_EXT = 1000091001] = "DEVICE_EVENT_INFO_EXT", StructureType[StructureType.DISPLAY_EVENT_INFO_EXT = 1000091002] = "DISPLAY_EVENT_INFO_EXT", StructureType[StructureType.SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003] = "SWAPCHAIN_COUNTER_CREATE_INFO_EXT", StructureType[StructureType.PRESENT_TIMES_INFO_GOOGLE = 1000092000] = "PRESENT_TIMES_INFO_GOOGLE", StructureType[StructureType.PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000] = "PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX", StructureType[StructureType.PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000] = "PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000] = "PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT", StructureType[StructureType.PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001] = "PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000] = "PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT", StructureType[StructureType.PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001] = "PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT = 1000102000] = "PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT", StructureType[StructureType.PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT = 1000102001] = "PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT", StructureType[StructureType.HDR_METADATA_EXT = 1000105000] = "HDR_METADATA_EXT", StructureType[StructureType.PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR = 1000108000] = "PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR", StructureType[StructureType.FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR = 1000108001] = "FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR", StructureType[StructureType.FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR = 1000108002] = "FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR", StructureType[StructureType.RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR = 1000108003] = "RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR", StructureType[StructureType.ATTACHMENT_DESCRIPTION_2_KHR = 1000109000] = "ATTACHMENT_DESCRIPTION_2_KHR", StructureType[StructureType.ATTACHMENT_REFERENCE_2_KHR = 1000109001] = "ATTACHMENT_REFERENCE_2_KHR", StructureType[StructureType.SUBPASS_DESCRIPTION_2_KHR = 1000109002] = "SUBPASS_DESCRIPTION_2_KHR", StructureType[StructureType.SUBPASS_DEPENDENCY_2_KHR = 1000109003] = "SUBPASS_DEPENDENCY_2_KHR", StructureType[StructureType.RENDER_PASS_CREATE_INFO_2_KHR = 1000109004] = "RENDER_PASS_CREATE_INFO_2_KHR", StructureType[StructureType.SUBPASS_BEGIN_INFO_KHR = 1000109005] = "SUBPASS_BEGIN_INFO_KHR", StructureType[StructureType.SUBPASS_END_INFO_KHR = 1000109006] = "SUBPASS_END_INFO_KHR", StructureType[StructureType.SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000] = "SHARED_PRESENT_SURFACE_CAPABILITIES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000] = "PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR", StructureType[StructureType.EXTERNAL_FENCE_PROPERTIES_KHR = 1000112001] = "EXTERNAL_FENCE_PROPERTIES_KHR", StructureType[StructureType.EXPORT_FENCE_CREATE_INFO_KHR = 1000113000] = "EXPORT_FENCE_CREATE_INFO_KHR", StructureType[StructureType.IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000] = "IMPORT_FENCE_WIN32_HANDLE_INFO_KHR", StructureType[StructureType.EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001] = "EXPORT_FENCE_WIN32_HANDLE_INFO_KHR", StructureType[StructureType.FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002] = "FENCE_GET_WIN32_HANDLE_INFO_KHR", StructureType[StructureType.IMPORT_FENCE_FD_INFO_KHR = 1000115000] = "IMPORT_FENCE_FD_INFO_KHR", StructureType[StructureType.FENCE_GET_FD_INFO_KHR = 1000115001] = "FENCE_GET_FD_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR = 1000116000] = "PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR = 1000116001] = "PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR", StructureType[StructureType.QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR = 1000116002] = "QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR", StructureType[StructureType.PERFORMANCE_QUERY_SUBMIT_INFO_KHR = 1000116003] = "PERFORMANCE_QUERY_SUBMIT_INFO_KHR", StructureType[StructureType.ACQUIRE_PROFILING_LOCK_INFO_KHR = 1000116004] = "ACQUIRE_PROFILING_LOCK_INFO_KHR", StructureType[StructureType.PERFORMANCE_COUNTER_KHR = 1000116005] = "PERFORMANCE_COUNTER_KHR", StructureType[StructureType.PERFORMANCE_COUNTER_DESCRIPTION_KHR = 1000116006] = "PERFORMANCE_COUNTER_DESCRIPTION_KHR", StructureType[StructureType.PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = 1000117000] = "PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR", StructureType[StructureType.RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = 1000117001] = "RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR", StructureType[StructureType.IMAGE_VIEW_USAGE_CREATE_INFO_KHR = 1000117002] = "IMAGE_VIEW_USAGE_CREATE_INFO_KHR", StructureType[StructureType.PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = 1000117003] = "PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000] = "PHYSICAL_DEVICE_SURFACE_INFO_2_KHR", StructureType[StructureType.SURFACE_CAPABILITIES_2_KHR = 1000119001] = "SURFACE_CAPABILITIES_2_KHR", StructureType[StructureType.SURFACE_FORMAT_2_KHR = 1000119002] = "SURFACE_FORMAT_2_KHR", StructureType[StructureType.PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR = 1000120000] = "PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = 1000120000] = "PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR", StructureType[StructureType.DISPLAY_PROPERTIES_2_KHR = 1000121000] = "DISPLAY_PROPERTIES_2_KHR", StructureType[StructureType.DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001] = "DISPLAY_PLANE_PROPERTIES_2_KHR", StructureType[StructureType.DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002] = "DISPLAY_MODE_PROPERTIES_2_KHR", StructureType[StructureType.DISPLAY_PLANE_INFO_2_KHR = 1000121003] = "DISPLAY_PLANE_INFO_2_KHR", StructureType[StructureType.DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004] = "DISPLAY_PLANE_CAPABILITIES_2_KHR", StructureType[StructureType.IOS_SURFACE_CREATE_INFO_MVK = 1000122000] = "IOS_SURFACE_CREATE_INFO_MVK", StructureType[StructureType.MACOS_SURFACE_CREATE_INFO_MVK = 1000123000] = "MACOS_SURFACE_CREATE_INFO_MVK", StructureType[StructureType.MEMORY_DEDICATED_REQUIREMENTS_KHR = 1000127000] = "MEMORY_DEDICATED_REQUIREMENTS_KHR", StructureType[StructureType.MEMORY_DEDICATED_ALLOCATE_INFO_KHR = 1000127001] = "MEMORY_DEDICATED_ALLOCATE_INFO_KHR", StructureType[StructureType.DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000] = "DEBUG_UTILS_OBJECT_NAME_INFO_EXT", StructureType[StructureType.DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001] = "DEBUG_UTILS_OBJECT_TAG_INFO_EXT", StructureType[StructureType.DEBUG_UTILS_LABEL_EXT = 1000128002] = "DEBUG_UTILS_LABEL_EXT", StructureType[StructureType.DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003] = "DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT", StructureType[StructureType.DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004] = "DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT", StructureType[StructureType.ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000] = "ANDROID_HARDWARE_BUFFER_USAGE_ANDROID", StructureType[StructureType.ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001] = "ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID", StructureType[StructureType.ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002] = "ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID", StructureType[StructureType.IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003] = "IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID", StructureType[StructureType.MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004] = "MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID", StructureType[StructureType.EXTERNAL_FORMAT_ANDROID = 1000129005] = "EXTERNAL_FORMAT_ANDROID", StructureType[StructureType.ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006] = "ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID", StructureType[StructureType.PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000] = "PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT", StructureType[StructureType.SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001] = "SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = 1000138000] = "PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = 1000138001] = "PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT", StructureType[StructureType.WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = 1000138002] = "WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT", StructureType[StructureType.DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT = 1000138003] = "DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT", StructureType[StructureType.SAMPLE_LOCATIONS_INFO_EXT = 1000143000] = "SAMPLE_LOCATIONS_INFO_EXT", StructureType[StructureType.RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001] = "RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT", StructureType[StructureType.PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002] = "PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003] = "PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT", StructureType[StructureType.MULTISAMPLE_PROPERTIES_EXT = 1000143004] = "MULTISAMPLE_PROPERTIES_EXT", StructureType[StructureType.BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000] = "BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR", StructureType[StructureType.IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001] = "IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR", StructureType[StructureType.IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002] = "IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR", StructureType[StructureType.MEMORY_REQUIREMENTS_2_KHR = 1000146003] = "MEMORY_REQUIREMENTS_2_KHR", StructureType[StructureType.SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = 1000146004] = "SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR", StructureType[StructureType.IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000] = "IMAGE_FORMAT_LIST_CREATE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000] = "PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001] = "PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT", StructureType[StructureType.PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002] = "PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT", StructureType[StructureType.PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000] = "PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV", StructureType[StructureType.WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR = 1000150007] = "WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR", StructureType[StructureType.ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR = 1000150000] = "ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR", StructureType[StructureType.ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR = 1000150002] = "ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR", StructureType[StructureType.ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR = 1000150003] = "ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR", StructureType[StructureType.ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR = 1000150004] = "ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR", StructureType[StructureType.ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR = 1000150005] = "ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR", StructureType[StructureType.ACCELERATION_STRUCTURE_GEOMETRY_KHR = 1000150006] = "ACCELERATION_STRUCTURE_GEOMETRY_KHR", StructureType[StructureType.ACCELERATION_STRUCTURE_VERSION_INFO_KHR = 1000150009] = "ACCELERATION_STRUCTURE_VERSION_INFO_KHR", StructureType[StructureType.COPY_ACCELERATION_STRUCTURE_INFO_KHR = 1000150010] = "COPY_ACCELERATION_STRUCTURE_INFO_KHR", StructureType[StructureType.COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR = 1000150011] = "COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR", StructureType[StructureType.COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR = 1000150012] = "COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR = 1000150013] = "PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR = 1000150014] = "PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR", StructureType[StructureType.ACCELERATION_STRUCTURE_CREATE_INFO_KHR = 1000150017] = "ACCELERATION_STRUCTURE_CREATE_INFO_KHR", StructureType[StructureType.ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR = 1000150020] = "ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR = 1000347000] = "PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR = 1000347001] = "PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR", StructureType[StructureType.RAY_TRACING_PIPELINE_CREATE_INFO_KHR = 1000150015] = "RAY_TRACING_PIPELINE_CREATE_INFO_KHR", StructureType[StructureType.RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR = 1000150016] = "RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR", StructureType[StructureType.RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR = 1000150018] = "RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR = 1000348013] = "PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR", StructureType[StructureType.PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000] = "PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV = 1000154000] = "PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV = 1000154001] = "PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV", StructureType[StructureType.SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = 1000156000] = "SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR", StructureType[StructureType.SAMPLER_YCBCR_CONVERSION_INFO_KHR = 1000156001] = "SAMPLER_YCBCR_CONVERSION_INFO_KHR", StructureType[StructureType.BIND_IMAGE_PLANE_MEMORY_INFO_KHR = 1000156002] = "BIND_IMAGE_PLANE_MEMORY_INFO_KHR", StructureType[StructureType.IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = 1000156003] = "IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = 1000156004] = "PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR", StructureType[StructureType.SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = 1000156005] = "SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR", StructureType[StructureType.BIND_BUFFER_MEMORY_INFO_KHR = 1000157000] = "BIND_BUFFER_MEMORY_INFO_KHR", StructureType[StructureType.BIND_IMAGE_MEMORY_INFO_KHR = 1000157001] = "BIND_IMAGE_MEMORY_INFO_KHR", StructureType[StructureType.DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000] = "DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002] = "PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT", StructureType[StructureType.IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003] = "IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT", StructureType[StructureType.IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004] = "IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT", StructureType[StructureType.IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005] = "IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT", StructureType[StructureType.DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT = 1000158006] = "DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT", StructureType[StructureType.VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000] = "VALIDATION_CACHE_CREATE_INFO_EXT", StructureType[StructureType.SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001] = "SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT", StructureType[StructureType.DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = 1000161000] = "DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = 1000161001] = "PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = 1000161002] = "PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT", StructureType[StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = 1000161003] = "DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT", StructureType[StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = 1000161004] = "DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR = 1000163000] = "PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR = 1000163001] = "PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR", StructureType[StructureType.PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV = 1000164000] = "PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV = 1000164001] = "PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV = 1000164002] = "PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV", StructureType[StructureType.PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV = 1000164005] = "PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV", StructureType[StructureType.RAY_TRACING_PIPELINE_CREATE_INFO_NV = 1000165000] = "RAY_TRACING_PIPELINE_CREATE_INFO_NV", StructureType[StructureType.ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000165001] = "ACCELERATION_STRUCTURE_CREATE_INFO_NV", StructureType[StructureType.GEOMETRY_NV = 1000165003] = "GEOMETRY_NV", StructureType[StructureType.GEOMETRY_TRIANGLES_NV = 1000165004] = "GEOMETRY_TRIANGLES_NV", StructureType[StructureType.GEOMETRY_AABB_NV = 1000165005] = "GEOMETRY_AABB_NV", StructureType[StructureType.BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = 1000165006] = "BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV", StructureType[StructureType.WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = 1000165007] = "WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV", StructureType[StructureType.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV = 1000165008] = "ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV = 1000165009] = "PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV", StructureType[StructureType.RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV = 1000165011] = "RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV", StructureType[StructureType.ACCELERATION_STRUCTURE_INFO_NV = 1000165012] = "ACCELERATION_STRUCTURE_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV = 1000166000] = "PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV", StructureType[StructureType.PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV = 1000166001] = "PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = 1000168000] = "PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR", StructureType[StructureType.DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = 1000168001] = "DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT = 1000170000] = "PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT", StructureType[StructureType.FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001] = "FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT", StructureType[StructureType.DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000] = "DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = 1000175000] = "PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000] = "PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR", StructureType[StructureType.IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000] = "IMPORT_MEMORY_HOST_POINTER_INFO_EXT", StructureType[StructureType.MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001] = "MEMORY_HOST_POINTER_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002] = "PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000] = "PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000] = "PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR", StructureType[StructureType.PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000] = "PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD", StructureType[StructureType.CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000] = "CALIBRATED_TIMESTAMP_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000] = "PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD", StructureType[StructureType.VIDEO_DECODE_H265_CAPABILITIES_EXT = 1000187000] = "VIDEO_DECODE_H265_CAPABILITIES_EXT", StructureType[StructureType.VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000187001] = "VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT", StructureType[StructureType.VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT = 1000187002] = "VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT", StructureType[StructureType.VIDEO_DECODE_H265_PROFILE_INFO_EXT = 1000187003] = "VIDEO_DECODE_H265_PROFILE_INFO_EXT", StructureType[StructureType.VIDEO_DECODE_H265_PICTURE_INFO_EXT = 1000187004] = "VIDEO_DECODE_H265_PICTURE_INFO_EXT", StructureType[StructureType.VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT = 1000187005] = "VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT", StructureType[StructureType.DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR = 1000174000] = "DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR = 1000388000] = "PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR", StructureType[StructureType.QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = 1000388001] = "QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR", StructureType[StructureType.DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000] = "DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD", StructureType[StructureType.PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000] = "PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT", StructureType[StructureType.PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001] = "PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002] = "PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT", StructureType[StructureType.PRESENT_FRAME_TOKEN_GGP = 1000191000] = "PRESENT_FRAME_TOKEN_GGP", StructureType[StructureType.PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000192000] = "PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = 1000196000] = "PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = 1000197000] = "PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000] = "PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR", StructureType[StructureType.SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = 1000199001] = "SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR", StructureType[StructureType.PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = 1000201000] = "PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000] = "PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001] = "PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = 1000203000] = "PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000] = "PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV", StructureType[StructureType.PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV = 1000205000] = "PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002] = "PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV", StructureType[StructureType.CHECKPOINT_DATA_NV = 1000206000] = "CHECKPOINT_DATA_NV", StructureType[StructureType.QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001] = "QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV", StructureType[StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = 1000207000] = "PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = 1000207001] = "PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR", StructureType[StructureType.SEMAPHORE_TYPE_CREATE_INFO_KHR = 1000207002] = "SEMAPHORE_TYPE_CREATE_INFO_KHR", StructureType[StructureType.TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = 1000207003] = "TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR", StructureType[StructureType.SEMAPHORE_WAIT_INFO_KHR = 1000207004] = "SEMAPHORE_WAIT_INFO_KHR", StructureType[StructureType.SEMAPHORE_SIGNAL_INFO_KHR = 1000207005] = "SEMAPHORE_SIGNAL_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL = 1000209000] = "PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL", StructureType[StructureType.QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL = 1000210000] = "QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL", StructureType[StructureType.QUERY_POOL_CREATE_INFO_INTEL = 1000210000] = "QUERY_POOL_CREATE_INFO_INTEL", StructureType[StructureType.INITIALIZE_PERFORMANCE_API_INFO_INTEL = 1000210001] = "INITIALIZE_PERFORMANCE_API_INFO_INTEL", StructureType[StructureType.PERFORMANCE_MARKER_INFO_INTEL = 1000210002] = "PERFORMANCE_MARKER_INFO_INTEL", StructureType[StructureType.PERFORMANCE_STREAM_MARKER_INFO_INTEL = 1000210003] = "PERFORMANCE_STREAM_MARKER_INFO_INTEL", StructureType[StructureType.PERFORMANCE_OVERRIDE_INFO_INTEL = 1000210004] = "PERFORMANCE_OVERRIDE_INFO_INTEL", StructureType[StructureType.PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL = 1000210005] = "PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL", StructureType[StructureType.PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000] = "PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000] = "PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT", StructureType[StructureType.DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD = 1000213000] = "DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD", StructureType[StructureType.SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD = 1000213001] = "SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD", StructureType[StructureType.IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000] = "IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR = 1000215000] = "PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR", StructureType[StructureType.METAL_SURFACE_CREATE_INFO_EXT = 1000217000] = "METAL_SURFACE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT = 1000218000] = "PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT = 1000218001] = "PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT", StructureType[StructureType.RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT = 1000218002] = "RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = 1000221000] = "PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT = 1000225000] = "PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT", StructureType[StructureType.PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = 1000225001] = "PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT = 1000225002] = "PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT", StructureType[StructureType.FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000226000] = "FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR", StructureType[StructureType.PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR = 1000226001] = "PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR = 1000226002] = "PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR = 1000226003] = "PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004] = "PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000] = "PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD", StructureType[StructureType.PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000] = "PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000] = "PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000] = "PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000] = "PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT", StructureType[StructureType.MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001] = "MEMORY_PRIORITY_ALLOCATE_INFO_EXT", StructureType[StructureType.SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000] = "SURFACE_PROTECTED_CAPABILITIES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV = 1000240000] = "PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR = 1000241000] = "PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR", StructureType[StructureType.ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = 1000241001] = "ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR", StructureType[StructureType.ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = 1000241002] = "ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR", StructureType[StructureType.PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000] = "PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = 1000244000] = "PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT", StructureType[StructureType.BUFFER_DEVICE_ADDRESS_INFO_EXT = 1000244001] = "BUFFER_DEVICE_ADDRESS_INFO_EXT", StructureType[StructureType.BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002] = "BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = 1000245000] = "PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT", StructureType[StructureType.IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = 1000246000] = "IMAGE_STENCIL_USAGE_CREATE_INFO_EXT", StructureType[StructureType.VALIDATION_FEATURES_EXT = 1000247000] = "VALIDATION_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR = 1000248000] = "PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000] = "PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV", StructureType[StructureType.COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001] = "COOPERATIVE_MATRIX_PROPERTIES_NV", StructureType[StructureType.PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002] = "PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV", StructureType[StructureType.PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV = 1000250000] = "PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV", StructureType[StructureType.PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV = 1000250001] = "PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV", StructureType[StructureType.FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV = 1000250002] = "FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT = 1000251000] = "PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT = 1000252000] = "PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR = 1000253000] = "PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT = 1000254000] = "PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT", StructureType[StructureType.PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT = 1000254001] = "PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT = 1000254002] = "PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT", StructureType[StructureType.SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT = 1000255000] = "SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT", StructureType[StructureType.SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002] = "SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT", StructureType[StructureType.SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001] = "SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT", StructureType[StructureType.HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000] = "HEADLESS_SURFACE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR = 1000257000] = "PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR", StructureType[StructureType.BUFFER_DEVICE_ADDRESS_INFO_KHR = 1000244001] = "BUFFER_DEVICE_ADDRESS_INFO_KHR", StructureType[StructureType.BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = 1000257002] = "BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR", StructureType[StructureType.MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = 1000257003] = "MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR", StructureType[StructureType.DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = 1000257004] = "DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = 1000259000] = "PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT", StructureType[StructureType.PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = 1000259001] = "PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002] = "PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000] = "PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = 1000261000] = "PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = 1000265000] = "PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000] = "PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000] = "PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR", StructureType[StructureType.PIPELINE_INFO_KHR = 1000269001] = "PIPELINE_INFO_KHR", StructureType[StructureType.PIPELINE_EXECUTABLE_PROPERTIES_KHR = 1000269002] = "PIPELINE_EXECUTABLE_PROPERTIES_KHR", StructureType[StructureType.PIPELINE_EXECUTABLE_INFO_KHR = 1000269003] = "PIPELINE_EXECUTABLE_INFO_KHR", StructureType[StructureType.PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004] = "PIPELINE_EXECUTABLE_STATISTIC_KHR", StructureType[StructureType.PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005] = "PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000] = "PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = 1000276000] = "PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV = 1000277000] = "PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV", StructureType[StructureType.GRAPHICS_SHADER_GROUP_CREATE_INFO_NV = 1000277001] = "GRAPHICS_SHADER_GROUP_CREATE_INFO_NV", StructureType[StructureType.GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV = 1000277002] = "GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV", StructureType[StructureType.INDIRECT_COMMANDS_LAYOUT_TOKEN_NV = 1000277003] = "INDIRECT_COMMANDS_LAYOUT_TOKEN_NV", StructureType[StructureType.INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV = 1000277004] = "INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV", StructureType[StructureType.GENERATED_COMMANDS_INFO_NV = 1000277005] = "GENERATED_COMMANDS_INFO_NV", StructureType[StructureType.GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV = 1000277006] = "GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV = 1000277007] = "PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV = 1000278000] = "PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV", StructureType[StructureType.COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV = 1000278001] = "COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = 1000280000] = "PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = 1000280001] = "PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000] = "PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT = 1000281001] = "PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT", StructureType[StructureType.COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000] = "COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM", StructureType[StructureType.RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001] = "RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM", StructureType[StructureType.PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT = 1000284000] = "PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT", StructureType[StructureType.DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT = 1000284001] = "DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT", StructureType[StructureType.DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT = 1000284002] = "DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT", StructureType[StructureType.PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT = 1000286000] = "PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT = 1000286001] = "PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT", StructureType[StructureType.SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT = 1000287000] = "SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT = 1000287001] = "PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT = 1000287002] = "PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT", StructureType[StructureType.PIPELINE_LIBRARY_CREATE_INFO_KHR = 1000290000] = "PIPELINE_LIBRARY_CREATE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV = 1000292000] = "PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV", StructureType[StructureType.SURFACE_CAPABILITIES_PRESENT_BARRIER_NV = 1000292001] = "SURFACE_CAPABILITIES_PRESENT_BARRIER_NV", StructureType[StructureType.SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV = 1000292002] = "SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV", StructureType[StructureType.PRESENT_ID_KHR = 1000294000] = "PRESENT_ID_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001] = "PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT = 1000295000] = "PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT", StructureType[StructureType.DEVICE_PRIVATE_DATA_CREATE_INFO_EXT = 1000295001] = "DEVICE_PRIVATE_DATA_CREATE_INFO_EXT", StructureType[StructureType.PRIVATE_DATA_SLOT_CREATE_INFO_EXT = 1000295002] = "PRIVATE_DATA_SLOT_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT = 1000297000] = "PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT", StructureType[StructureType.VIDEO_ENCODE_INFO_KHR = 1000299000] = "VIDEO_ENCODE_INFO_KHR", StructureType[StructureType.VIDEO_ENCODE_RATE_CONTROL_INFO_KHR = 1000299001] = "VIDEO_ENCODE_RATE_CONTROL_INFO_KHR", StructureType[StructureType.VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR = 1000299002] = "VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR", StructureType[StructureType.VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003] = "VIDEO_ENCODE_CAPABILITIES_KHR", StructureType[StructureType.VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004] = "VIDEO_ENCODE_USAGE_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000] = "PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV", StructureType[StructureType.DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001] = "DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV", StructureType[StructureType.RESERVED_QCOM = 1000309000] = "RESERVED_QCOM", StructureType[StructureType.EXPORT_METAL_OBJECT_CREATE_INFO_EXT = 1000311000] = "EXPORT_METAL_OBJECT_CREATE_INFO_EXT", StructureType[StructureType.EXPORT_METAL_OBJECTS_INFO_EXT = 1000311001] = "EXPORT_METAL_OBJECTS_INFO_EXT", StructureType[StructureType.EXPORT_METAL_DEVICE_INFO_EXT = 1000311002] = "EXPORT_METAL_DEVICE_INFO_EXT", StructureType[StructureType.EXPORT_METAL_COMMAND_QUEUE_INFO_EXT = 1000311003] = "EXPORT_METAL_COMMAND_QUEUE_INFO_EXT", StructureType[StructureType.EXPORT_METAL_BUFFER_INFO_EXT = 1000311004] = "EXPORT_METAL_BUFFER_INFO_EXT", StructureType[StructureType.IMPORT_METAL_BUFFER_INFO_EXT = 1000311005] = "IMPORT_METAL_BUFFER_INFO_EXT", StructureType[StructureType.EXPORT_METAL_TEXTURE_INFO_EXT = 1000311006] = "EXPORT_METAL_TEXTURE_INFO_EXT", StructureType[StructureType.IMPORT_METAL_TEXTURE_INFO_EXT = 1000311007] = "IMPORT_METAL_TEXTURE_INFO_EXT", StructureType[StructureType.EXPORT_METAL_IO_SURFACE_INFO_EXT = 1000311008] = "EXPORT_METAL_IO_SURFACE_INFO_EXT", StructureType[StructureType.IMPORT_METAL_IO_SURFACE_INFO_EXT = 1000311009] = "IMPORT_METAL_IO_SURFACE_INFO_EXT", StructureType[StructureType.EXPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311010] = "EXPORT_METAL_SHARED_EVENT_INFO_EXT", StructureType[StructureType.IMPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311011] = "IMPORT_METAL_SHARED_EVENT_INFO_EXT", StructureType[StructureType.MEMORY_BARRIER_2_KHR = 1000314000] = "MEMORY_BARRIER_2_KHR", StructureType[StructureType.BUFFER_MEMORY_BARRIER_2_KHR = 1000314001] = "BUFFER_MEMORY_BARRIER_2_KHR", StructureType[StructureType.IMAGE_MEMORY_BARRIER_2_KHR = 1000314002] = "IMAGE_MEMORY_BARRIER_2_KHR", StructureType[StructureType.DEPENDENCY_INFO_KHR = 1000314003] = "DEPENDENCY_INFO_KHR", StructureType[StructureType.SUBMIT_INFO_2_KHR = 1000314004] = "SUBMIT_INFO_2_KHR", StructureType[StructureType.SEMAPHORE_SUBMIT_INFO_KHR = 1000314005] = "SEMAPHORE_SUBMIT_INFO_KHR", StructureType[StructureType.COMMAND_BUFFER_SUBMIT_INFO_KHR = 1000314006] = "COMMAND_BUFFER_SUBMIT_INFO_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR = 1000314007] = "PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR", StructureType[StructureType.QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV = 1000314008] = "QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV", StructureType[StructureType.CHECKPOINT_DATA_2_NV = 1000314009] = "CHECKPOINT_DATA_2_NV", StructureType[StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT = 1000316000] = "PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT = 1000316001] = "PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT = 1000316002] = "PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT", StructureType[StructureType.DESCRIPTOR_ADDRESS_INFO_EXT = 1000316003] = "DESCRIPTOR_ADDRESS_INFO_EXT", StructureType[StructureType.DESCRIPTOR_GET_INFO_EXT = 1000316004] = "DESCRIPTOR_GET_INFO_EXT", StructureType[StructureType.BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316005] = "BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT", StructureType[StructureType.IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316006] = "IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT", StructureType[StructureType.IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316007] = "IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT", StructureType[StructureType.SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316008] = "SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT", StructureType[StructureType.OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT = 1000316010] = "OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT", StructureType[StructureType.DESCRIPTOR_BUFFER_BINDING_INFO_EXT = 1000316011] = "DESCRIPTOR_BUFFER_BINDING_INFO_EXT", StructureType[StructureType.DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT = 1000316012] = "DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT", StructureType[StructureType.ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316009] = "ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT = 1000320000] = "PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT = 1000320001] = "PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT", StructureType[StructureType.GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT = 1000320002] = "GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD = 1000321000] = "PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR = 1000203000] = "PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR = 1000322000] = "PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR = 1000323000] = "PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR = 1000325000] = "PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV = 1000326000] = "PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV = 1000326001] = "PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV", StructureType[StructureType.PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV = 1000326002] = "PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV", StructureType[StructureType.ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV = 1000327000] = "ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV", StructureType[StructureType.PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV = 1000327001] = "PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV", StructureType[StructureType.ACCELERATION_STRUCTURE_MOTION_INFO_NV = 1000327002] = "ACCELERATION_STRUCTURE_MOTION_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT = 1000328000] = "PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT = 1000328001] = "PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT = 1000330000] = "PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT = 1000332000] = "PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT = 1000332001] = "PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT", StructureType[StructureType.COPY_COMMAND_TRANSFORM_INFO_QCOM = 1000333000] = "COPY_COMMAND_TRANSFORM_INFO_QCOM", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT = 1000335000] = "PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR = 1000336000] = "PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR", StructureType[StructureType.COPY_BUFFER_INFO_2_KHR = 1000337000] = "COPY_BUFFER_INFO_2_KHR", StructureType[StructureType.COPY_IMAGE_INFO_2_KHR = 1000337001] = "COPY_IMAGE_INFO_2_KHR", StructureType[StructureType.COPY_BUFFER_TO_IMAGE_INFO_2_KHR = 1000337002] = "COPY_BUFFER_TO_IMAGE_INFO_2_KHR", StructureType[StructureType.COPY_IMAGE_TO_BUFFER_INFO_2_KHR = 1000337003] = "COPY_IMAGE_TO_BUFFER_INFO_2_KHR", StructureType[StructureType.BLIT_IMAGE_INFO_2_KHR = 1000337004] = "BLIT_IMAGE_INFO_2_KHR", StructureType[StructureType.RESOLVE_IMAGE_INFO_2_KHR = 1000337005] = "RESOLVE_IMAGE_INFO_2_KHR", StructureType[StructureType.BUFFER_COPY_2_KHR = 1000337006] = "BUFFER_COPY_2_KHR", StructureType[StructureType.IMAGE_COPY_2_KHR = 1000337007] = "IMAGE_COPY_2_KHR", StructureType[StructureType.IMAGE_BLIT_2_KHR = 1000337008] = "IMAGE_BLIT_2_KHR", StructureType[StructureType.BUFFER_IMAGE_COPY_2_KHR = 1000337009] = "BUFFER_IMAGE_COPY_2_KHR", StructureType[StructureType.IMAGE_RESOLVE_2_KHR = 1000337010] = "IMAGE_RESOLVE_2_KHR", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT = 1000338000] = "PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT", StructureType[StructureType.IMAGE_COMPRESSION_CONTROL_EXT = 1000338001] = "IMAGE_COMPRESSION_CONTROL_EXT", StructureType[StructureType.SUBRESOURCE_LAYOUT_2_EXT = 1000338002] = "SUBRESOURCE_LAYOUT_2_EXT", StructureType[StructureType.IMAGE_SUBRESOURCE_2_EXT = 1000338003] = "IMAGE_SUBRESOURCE_2_EXT", StructureType[StructureType.IMAGE_COMPRESSION_PROPERTIES_EXT = 1000338004] = "IMAGE_COMPRESSION_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT = 1000339000] = "PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000] = "PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_FAULT_FEATURES_EXT = 1000341000] = "PHYSICAL_DEVICE_FAULT_FEATURES_EXT", StructureType[StructureType.DEVICE_FAULT_COUNTS_EXT = 1000341001] = "DEVICE_FAULT_COUNTS_EXT", StructureType[StructureType.DEVICE_FAULT_INFO_EXT = 1000341002] = "DEVICE_FAULT_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = 1000342000] = "PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM", StructureType[StructureType.PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT = 1000344000] = "PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT", StructureType[StructureType.DIRECTFB_SURFACE_CREATE_INFO_EXT = 1000346000] = "DIRECTFB_SURFACE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = 1000351000] = "PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE", StructureType[StructureType.MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = 1000351002] = "MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE", StructureType[StructureType.PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT = 1000352000] = "PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT", StructureType[StructureType.VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000352001] = "VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT", StructureType[StructureType.VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002] = "VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT", StructureType[StructureType.PHYSICAL_DEVICE_DRM_PROPERTIES_EXT = 1000353000] = "PHYSICAL_DEVICE_DRM_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT = 1000354000] = "PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT", StructureType[StructureType.DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT = 1000354001] = "DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT", StructureType[StructureType.PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT = 1000355000] = "PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT", StructureType[StructureType.PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT = 1000355001] = "PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT = 1000356000] = "PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT", StructureType[StructureType.FORMAT_PROPERTIES_3_KHR = 1000360000] = "FORMAT_PROPERTIES_3_KHR", StructureType[StructureType.IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364000] = "IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA", StructureType[StructureType.MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = 1000364001] = "MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA", StructureType[StructureType.MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364002] = "MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA", StructureType[StructureType.IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365000] = "IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA", StructureType[StructureType.SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365001] = "SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA", StructureType[StructureType.BUFFER_COLLECTION_CREATE_INFO_FUCHSIA = 1000366000] = "BUFFER_COLLECTION_CREATE_INFO_FUCHSIA", StructureType[StructureType.IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA = 1000366001] = "IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA", StructureType[StructureType.BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA = 1000366002] = "BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA", StructureType[StructureType.BUFFER_COLLECTION_PROPERTIES_FUCHSIA = 1000366003] = "BUFFER_COLLECTION_PROPERTIES_FUCHSIA", StructureType[StructureType.BUFFER_CONSTRAINTS_INFO_FUCHSIA = 1000366004] = "BUFFER_CONSTRAINTS_INFO_FUCHSIA", StructureType[StructureType.BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA = 1000366005] = "BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA", StructureType[StructureType.IMAGE_CONSTRAINTS_INFO_FUCHSIA = 1000366006] = "IMAGE_CONSTRAINTS_INFO_FUCHSIA", StructureType[StructureType.IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA = 1000366007] = "IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA", StructureType[StructureType.SYSMEM_COLOR_SPACE_FUCHSIA = 1000366008] = "SYSMEM_COLOR_SPACE_FUCHSIA", StructureType[StructureType.BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA = 1000366009] = "BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA", StructureType[StructureType.SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000] = "SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI", StructureType[StructureType.PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI = 1000369001] = "PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI", StructureType[StructureType.PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI = 1000369002] = "PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI", StructureType[StructureType.PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI = 1000370000] = "PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI", StructureType[StructureType.MEMORY_GET_REMOTE_ADDRESS_INFO_NV = 1000371000] = "MEMORY_GET_REMOTE_ADDRESS_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001] = "PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV", StructureType[StructureType.PIPELINE_PROPERTIES_IDENTIFIER_EXT = 1000372000] = "PIPELINE_PROPERTIES_IDENTIFIER_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT = 1000372001] = "PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT", StructureType[StructureType.PIPELINE_INFO_EXT = 1000269001] = "PIPELINE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT = 1000376000] = "PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT", StructureType[StructureType.SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT = 1000376001] = "SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT", StructureType[StructureType.MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT = 1000376002] = "MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT = 1000377000] = "PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT", StructureType[StructureType.SCREEN_SURFACE_CREATE_INFO_QNX = 1000378000] = "SCREEN_SURFACE_CREATE_INFO_QNX", StructureType[StructureType.PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT = 1000381000] = "PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT", StructureType[StructureType.PIPELINE_COLOR_WRITE_CREATE_INFO_EXT = 1000381001] = "PIPELINE_COLOR_WRITE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT = 1000382000] = "PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR = 1000386000] = "PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT = 1000388000] = "PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT", StructureType[StructureType.QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT = 1000388001] = "QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT = 1000391000] = "PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT", StructureType[StructureType.IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT = 1000391001] = "IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT = 1000392000] = "PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT = 1000392001] = "PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT = 1000393000] = "PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT", StructureType[StructureType.MICROMAP_BUILD_INFO_EXT = 1000396000] = "MICROMAP_BUILD_INFO_EXT", StructureType[StructureType.MICROMAP_VERSION_INFO_EXT = 1000396001] = "MICROMAP_VERSION_INFO_EXT", StructureType[StructureType.COPY_MICROMAP_INFO_EXT = 1000396002] = "COPY_MICROMAP_INFO_EXT", StructureType[StructureType.COPY_MICROMAP_TO_MEMORY_INFO_EXT = 1000396003] = "COPY_MICROMAP_TO_MEMORY_INFO_EXT", StructureType[StructureType.COPY_MEMORY_TO_MICROMAP_INFO_EXT = 1000396004] = "COPY_MEMORY_TO_MICROMAP_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT = 1000396005] = "PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT = 1000396006] = "PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT", StructureType[StructureType.MICROMAP_CREATE_INFO_EXT = 1000396007] = "MICROMAP_CREATE_INFO_EXT", StructureType[StructureType.MICROMAP_BUILD_SIZES_INFO_EXT = 1000396008] = "MICROMAP_BUILD_SIZES_INFO_EXT", StructureType[StructureType.ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT = 1000396009] = "ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT", StructureType[StructureType.PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000] = "PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT", StructureType[StructureType.SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001] = "SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000] = "PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR = 1000413000] = "PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR", StructureType[StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = 1000413001] = "PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR", StructureType[StructureType.DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = 1000413002] = "DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR", StructureType[StructureType.DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = 1000413003] = "DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR", StructureType[StructureType.PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000] = "PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE", StructureType[StructureType.DESCRIPTOR_SET_BINDING_REFERENCE_VALVE = 1000420001] = "DESCRIPTOR_SET_BINDING_REFERENCE_VALVE", StructureType[StructureType.DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE = 1000420002] = "DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE", StructureType[StructureType.PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT = 1000421000] = "PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT = 1000422000] = "PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = 1000425000] = "PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM", StructureType[StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = 1000425001] = "PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM", StructureType[StructureType.SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = 1000425002] = "SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM", StructureType[StructureType.PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV = 1000426000] = "PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV = 1000426001] = "PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV", StructureType[StructureType.PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV = 1000427000] = "PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV = 1000427001] = "PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV", StructureType[StructureType.PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000] = "PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000] = "PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000] = "PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM", StructureType[StructureType.PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001] = "PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM", StructureType[StructureType.IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM = 1000440002] = "IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM", StructureType[StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT = 1000455000] = "PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT = 1000455001] = "PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT = 1000458000] = "PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT", StructureType[StructureType.RENDER_PASS_CREATION_CONTROL_EXT = 1000458001] = "RENDER_PASS_CREATION_CONTROL_EXT", StructureType[StructureType.RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000458002] = "RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT", StructureType[StructureType.RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT = 1000458003] = "RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT = 1000462000] = "PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT = 1000462001] = "PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT", StructureType[StructureType.PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT = 1000462002] = "PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT", StructureType[StructureType.SHADER_MODULE_IDENTIFIER_EXT = 1000462003] = "SHADER_MODULE_IDENTIFIER_EXT", StructureType[StructureType.PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT = 1000342000] = "PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV = 1000464000] = "PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV = 1000464001] = "PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV", StructureType[StructureType.OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV = 1000464002] = "OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV", StructureType[StructureType.OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV = 1000464003] = "OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV", StructureType[StructureType.OPTICAL_FLOW_SESSION_CREATE_INFO_NV = 1000464004] = "OPTICAL_FLOW_SESSION_CREATE_INFO_NV", StructureType[StructureType.OPTICAL_FLOW_EXECUTE_INFO_NV = 1000464005] = "OPTICAL_FLOW_EXECUTE_INFO_NV", StructureType[StructureType.OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010] = "OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV", StructureType[StructureType.PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000] = "PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = 1000466000] = "PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT", StructureType[StructureType.PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM = 1000484000] = "PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM", StructureType[StructureType.TILE_PROPERTIES_QCOM = 1000484001] = "TILE_PROPERTIES_QCOM", StructureType[StructureType.PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC = 1000485000] = "PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC", StructureType[StructureType.AMIGO_PROFILING_SUBMIT_INFO_SEC = 1000485001] = "AMIGO_PROFILING_SUBMIT_INFO_SEC", StructureType[StructureType.PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV = 1000490000] = "PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV", StructureType[StructureType.PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV = 1000490001] = "PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV", StructureType[StructureType.PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT = 1000351000] = "PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT", StructureType[StructureType.MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000351002] = "MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000] = "PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM", StructureType[StructureType.PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001] = "PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM"; -}(StructureType || (StructureType = {})); -export var SubpassContents; -!function(SubpassContents) { - SubpassContents[SubpassContents.INLINE = 0] = "INLINE", SubpassContents[SubpassContents.SECONDARY_COMMAND_BUFFERS = 1] = "SECONDARY_COMMAND_BUFFERS"; -}(SubpassContents || (SubpassContents = {})); -export var Result; -!function(Result) { - Result[Result.SUCCESS = 0] = "SUCCESS", Result[Result.NOT_READY = 1] = "NOT_READY", Result[Result.TIMEOUT = 2] = "TIMEOUT", Result[Result.EVENT_SET = 3] = "EVENT_SET", Result[Result.EVENT_RESET = 4] = "EVENT_RESET", Result[Result.INCOMPLETE = 5] = "INCOMPLETE", Result[Result.ERROR_OUT_OF_HOST_MEMORY = -1] = "ERROR_OUT_OF_HOST_MEMORY", Result[Result.ERROR_OUT_OF_DEVICE_MEMORY = -2] = "ERROR_OUT_OF_DEVICE_MEMORY", Result[Result.ERROR_INITIALIZATION_FAILED = -3] = "ERROR_INITIALIZATION_FAILED", Result[Result.ERROR_DEVICE_LOST = -4] = "ERROR_DEVICE_LOST", Result[Result.ERROR_MEMORY_MAP_FAILED = -5] = "ERROR_MEMORY_MAP_FAILED", Result[Result.ERROR_LAYER_NOT_PRESENT = -6] = "ERROR_LAYER_NOT_PRESENT", Result[Result.ERROR_EXTENSION_NOT_PRESENT = -7] = "ERROR_EXTENSION_NOT_PRESENT", Result[Result.ERROR_FEATURE_NOT_PRESENT = -8] = "ERROR_FEATURE_NOT_PRESENT", Result[Result.ERROR_INCOMPATIBLE_DRIVER = -9] = "ERROR_INCOMPATIBLE_DRIVER", Result[Result.ERROR_TOO_MANY_OBJECTS = -10] = "ERROR_TOO_MANY_OBJECTS", Result[Result.ERROR_FORMAT_NOT_SUPPORTED = -11] = "ERROR_FORMAT_NOT_SUPPORTED", Result[Result.ERROR_FRAGMENTED_POOL = -12] = "ERROR_FRAGMENTED_POOL", Result[Result.ERROR_UNKNOWN = -13] = "ERROR_UNKNOWN", Result[Result.ERROR_OUT_OF_POOL_MEMORY = 1000069000] = "ERROR_OUT_OF_POOL_MEMORY", Result[Result.ERROR_INVALID_EXTERNAL_HANDLE = 1000072003] = "ERROR_INVALID_EXTERNAL_HANDLE", Result[Result.ERROR_FRAGMENTATION = 1000161000] = "ERROR_FRAGMENTATION", Result[Result.ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS = 1000257000] = "ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS", Result[Result.PIPELINE_COMPILE_REQUIRED = 1000297000] = "PIPELINE_COMPILE_REQUIRED", Result[Result.ERROR_SURFACE_LOST_KHR = 1000000000] = "ERROR_SURFACE_LOST_KHR", Result[Result.ERROR_NATIVE_WINDOW_IN_USE_KHR = 1000000001] = "ERROR_NATIVE_WINDOW_IN_USE_KHR", Result[Result.SUBOPTIMAL_KHR = 1000001003] = "SUBOPTIMAL_KHR", Result[Result.ERROR_OUT_OF_DATE_KHR = 1000001004] = "ERROR_OUT_OF_DATE_KHR", Result[Result.ERROR_INCOMPATIBLE_DISPLAY_KHR = 1000003001] = "ERROR_INCOMPATIBLE_DISPLAY_KHR", Result[Result.ERROR_VALIDATION_FAILED_EXT = 1000011001] = "ERROR_VALIDATION_FAILED_EXT", Result[Result.ERROR_INVALID_SHADER_NV = 1000012000] = "ERROR_INVALID_SHADER_NV", Result[Result.ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR = 1000023000] = "ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR", Result[Result.ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR = 1000023001] = "ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR", Result[Result.ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR = 1000023002] = "ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR", Result[Result.ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR = 1000023003] = "ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR", Result[Result.ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR = 1000023004] = "ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR", Result[Result.ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR = 1000023005] = "ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR", Result[Result.ERROR_OUT_OF_POOL_MEMORY_KHR = 1000069000] = "ERROR_OUT_OF_POOL_MEMORY_KHR", Result[Result.ERROR_INVALID_EXTERNAL_HANDLE_KHR = 1000072003] = "ERROR_INVALID_EXTERNAL_HANDLE_KHR", Result[Result.ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = 1000158000] = "ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT", Result[Result.ERROR_FRAGMENTATION_EXT = 1000161000] = "ERROR_FRAGMENTATION_EXT", Result[Result.ERROR_NOT_PERMITTED_EXT = 1000174001] = "ERROR_NOT_PERMITTED_EXT", Result[Result.ERROR_NOT_PERMITTED_KHR = 1000174001] = "ERROR_NOT_PERMITTED_KHR", Result[Result.ERROR_INVALID_DEVICE_ADDRESS_EXT = 1000257000] = "ERROR_INVALID_DEVICE_ADDRESS_EXT", Result[Result.ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = 1000255000] = "ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT", Result[Result.ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = 1000257000] = "ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR", Result[Result.THREAD_IDLE_KHR = 1000268000] = "THREAD_IDLE_KHR", Result[Result.THREAD_DONE_KHR = 1000268001] = "THREAD_DONE_KHR", Result[Result.OPERATION_DEFERRED_KHR = 1000268002] = "OPERATION_DEFERRED_KHR", Result[Result.OPERATION_NOT_DEFERRED_KHR = 1000268003] = "OPERATION_NOT_DEFERRED_KHR", Result[Result.PIPELINE_COMPILE_REQUIRED_EXT = 1000297000] = "PIPELINE_COMPILE_REQUIRED_EXT", Result[Result.ERROR_PIPELINE_COMPILE_REQUIRED_EXT = 1000297000] = "ERROR_PIPELINE_COMPILE_REQUIRED_EXT", Result[Result.ERROR_COMPRESSION_EXHAUSTED_EXT = 1000338000] = "ERROR_COMPRESSION_EXHAUSTED_EXT"; -}(Result || (Result = {})); -export var DynamicState; -!function(DynamicState) { - DynamicState[DynamicState.VIEWPORT = 0] = "VIEWPORT", DynamicState[DynamicState.SCISSOR = 1] = "SCISSOR", DynamicState[DynamicState.LINE_WIDTH = 2] = "LINE_WIDTH", DynamicState[DynamicState.DEPTH_BIAS = 3] = "DEPTH_BIAS", DynamicState[DynamicState.BLEND_CONSTANTS = 4] = "BLEND_CONSTANTS", DynamicState[DynamicState.DEPTH_BOUNDS = 5] = "DEPTH_BOUNDS", DynamicState[DynamicState.STENCIL_COMPARE_MASK = 6] = "STENCIL_COMPARE_MASK", DynamicState[DynamicState.STENCIL_WRITE_MASK = 7] = "STENCIL_WRITE_MASK", DynamicState[DynamicState.STENCIL_REFERENCE = 8] = "STENCIL_REFERENCE", DynamicState[DynamicState.CULL_MODE = 1000267000] = "CULL_MODE", DynamicState[DynamicState.FRONT_FACE = 1000267001] = "FRONT_FACE", DynamicState[DynamicState.PRIMITIVE_TOPOLOGY = 1000267002] = "PRIMITIVE_TOPOLOGY", DynamicState[DynamicState.VIEWPORT_WITH_COUNT = 1000267003] = "VIEWPORT_WITH_COUNT", DynamicState[DynamicState.SCISSOR_WITH_COUNT = 1000267004] = "SCISSOR_WITH_COUNT", DynamicState[DynamicState.VERTEX_INPUT_BINDING_STRIDE = 1000267005] = "VERTEX_INPUT_BINDING_STRIDE", DynamicState[DynamicState.DEPTH_TEST_ENABLE = 1000267006] = "DEPTH_TEST_ENABLE", DynamicState[DynamicState.DEPTH_WRITE_ENABLE = 1000267007] = "DEPTH_WRITE_ENABLE", DynamicState[DynamicState.DEPTH_COMPARE_OP = 1000267008] = "DEPTH_COMPARE_OP", DynamicState[DynamicState.DEPTH_BOUNDS_TEST_ENABLE = 1000267009] = "DEPTH_BOUNDS_TEST_ENABLE", DynamicState[DynamicState.STENCIL_TEST_ENABLE = 1000267010] = "STENCIL_TEST_ENABLE", DynamicState[DynamicState.STENCIL_OP = 1000267011] = "STENCIL_OP", DynamicState[DynamicState.RASTERIZER_DISCARD_ENABLE = 1000377001] = "RASTERIZER_DISCARD_ENABLE", DynamicState[DynamicState.DEPTH_BIAS_ENABLE = 1000377002] = "DEPTH_BIAS_ENABLE", DynamicState[DynamicState.PRIMITIVE_RESTART_ENABLE = 1000377004] = "PRIMITIVE_RESTART_ENABLE", DynamicState[DynamicState.VIEWPORT_W_SCALING_NV = 1000087000] = "VIEWPORT_W_SCALING_NV", DynamicState[DynamicState.DISCARD_RECTANGLE_EXT = 1000099000] = "DISCARD_RECTANGLE_EXT", DynamicState[DynamicState.SAMPLE_LOCATIONS_EXT = 1000143000] = "SAMPLE_LOCATIONS_EXT", DynamicState[DynamicState.RAY_TRACING_PIPELINE_STACK_SIZE_KHR = 1000347000] = "RAY_TRACING_PIPELINE_STACK_SIZE_KHR", DynamicState[DynamicState.VIEWPORT_SHADING_RATE_PALETTE_NV = 1000164004] = "VIEWPORT_SHADING_RATE_PALETTE_NV", DynamicState[DynamicState.VIEWPORT_COARSE_SAMPLE_ORDER_NV = 1000164006] = "VIEWPORT_COARSE_SAMPLE_ORDER_NV", DynamicState[DynamicState.EXCLUSIVE_SCISSOR_NV = 1000205001] = "EXCLUSIVE_SCISSOR_NV", DynamicState[DynamicState.FRAGMENT_SHADING_RATE_KHR = 1000226000] = "FRAGMENT_SHADING_RATE_KHR", DynamicState[DynamicState.LINE_STIPPLE_EXT = 1000259000] = "LINE_STIPPLE_EXT", DynamicState[DynamicState.CULL_MODE_EXT = 1000267000] = "CULL_MODE_EXT", DynamicState[DynamicState.FRONT_FACE_EXT = 1000267001] = "FRONT_FACE_EXT", DynamicState[DynamicState.PRIMITIVE_TOPOLOGY_EXT = 1000267002] = "PRIMITIVE_TOPOLOGY_EXT", DynamicState[DynamicState.VIEWPORT_WITH_COUNT_EXT = 1000267003] = "VIEWPORT_WITH_COUNT_EXT", DynamicState[DynamicState.SCISSOR_WITH_COUNT_EXT = 1000267004] = "SCISSOR_WITH_COUNT_EXT", DynamicState[DynamicState.VERTEX_INPUT_BINDING_STRIDE_EXT = 1000267005] = "VERTEX_INPUT_BINDING_STRIDE_EXT", DynamicState[DynamicState.DEPTH_TEST_ENABLE_EXT = 1000267006] = "DEPTH_TEST_ENABLE_EXT", DynamicState[DynamicState.DEPTH_WRITE_ENABLE_EXT = 1000267007] = "DEPTH_WRITE_ENABLE_EXT", DynamicState[DynamicState.DEPTH_COMPARE_OP_EXT = 1000267008] = "DEPTH_COMPARE_OP_EXT", DynamicState[DynamicState.DEPTH_BOUNDS_TEST_ENABLE_EXT = 1000267009] = "DEPTH_BOUNDS_TEST_ENABLE_EXT", DynamicState[DynamicState.STENCIL_TEST_ENABLE_EXT = 1000267010] = "STENCIL_TEST_ENABLE_EXT", DynamicState[DynamicState.STENCIL_OP_EXT = 1000267011] = "STENCIL_OP_EXT", DynamicState[DynamicState.VERTEX_INPUT_EXT = 1000352000] = "VERTEX_INPUT_EXT", DynamicState[DynamicState.PATCH_CONTROL_POINTS_EXT = 1000377000] = "PATCH_CONTROL_POINTS_EXT", DynamicState[DynamicState.RASTERIZER_DISCARD_ENABLE_EXT = 1000377001] = "RASTERIZER_DISCARD_ENABLE_EXT", DynamicState[DynamicState.DEPTH_BIAS_ENABLE_EXT = 1000377002] = "DEPTH_BIAS_ENABLE_EXT", DynamicState[DynamicState.LOGIC_OP_EXT = 1000377003] = "LOGIC_OP_EXT", DynamicState[DynamicState.PRIMITIVE_RESTART_ENABLE_EXT = 1000377004] = "PRIMITIVE_RESTART_ENABLE_EXT", DynamicState[DynamicState.COLOR_WRITE_ENABLE_EXT = 1000381000] = "COLOR_WRITE_ENABLE_EXT", DynamicState[DynamicState.TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002] = "TESSELLATION_DOMAIN_ORIGIN_EXT", DynamicState[DynamicState.DEPTH_CLAMP_ENABLE_EXT = 1000455003] = "DEPTH_CLAMP_ENABLE_EXT", DynamicState[DynamicState.POLYGON_MODE_EXT = 1000455004] = "POLYGON_MODE_EXT", DynamicState[DynamicState.RASTERIZATION_SAMPLES_EXT = 1000455005] = "RASTERIZATION_SAMPLES_EXT", DynamicState[DynamicState.SAMPLE_MASK_EXT = 1000455006] = "SAMPLE_MASK_EXT", DynamicState[DynamicState.ALPHA_TO_COVERAGE_ENABLE_EXT = 1000455007] = "ALPHA_TO_COVERAGE_ENABLE_EXT", DynamicState[DynamicState.ALPHA_TO_ONE_ENABLE_EXT = 1000455008] = "ALPHA_TO_ONE_ENABLE_EXT", DynamicState[DynamicState.LOGIC_OP_ENABLE_EXT = 1000455009] = "LOGIC_OP_ENABLE_EXT", DynamicState[DynamicState.COLOR_BLEND_ENABLE_EXT = 1000455010] = "COLOR_BLEND_ENABLE_EXT", DynamicState[DynamicState.COLOR_BLEND_EQUATION_EXT = 1000455011] = "COLOR_BLEND_EQUATION_EXT", DynamicState[DynamicState.COLOR_WRITE_MASK_EXT = 1000455012] = "COLOR_WRITE_MASK_EXT", DynamicState[DynamicState.RASTERIZATION_STREAM_EXT = 1000455013] = "RASTERIZATION_STREAM_EXT", DynamicState[DynamicState.CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014] = "CONSERVATIVE_RASTERIZATION_MODE_EXT", DynamicState[DynamicState.EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015] = "EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT", DynamicState[DynamicState.DEPTH_CLIP_ENABLE_EXT = 1000455016] = "DEPTH_CLIP_ENABLE_EXT", DynamicState[DynamicState.SAMPLE_LOCATIONS_ENABLE_EXT = 1000455017] = "SAMPLE_LOCATIONS_ENABLE_EXT", DynamicState[DynamicState.COLOR_BLEND_ADVANCED_EXT = 1000455018] = "COLOR_BLEND_ADVANCED_EXT", DynamicState[DynamicState.PROVOKING_VERTEX_MODE_EXT = 1000455019] = "PROVOKING_VERTEX_MODE_EXT", DynamicState[DynamicState.LINE_RASTERIZATION_MODE_EXT = 1000455020] = "LINE_RASTERIZATION_MODE_EXT", DynamicState[DynamicState.LINE_STIPPLE_ENABLE_EXT = 1000455021] = "LINE_STIPPLE_ENABLE_EXT", DynamicState[DynamicState.DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT = 1000455022] = "DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT", DynamicState[DynamicState.VIEWPORT_W_SCALING_ENABLE_NV = 1000455023] = "VIEWPORT_W_SCALING_ENABLE_NV", DynamicState[DynamicState.VIEWPORT_SWIZZLE_NV = 1000455024] = "VIEWPORT_SWIZZLE_NV", DynamicState[DynamicState.COVERAGE_TO_COLOR_ENABLE_NV = 1000455025] = "COVERAGE_TO_COLOR_ENABLE_NV", DynamicState[DynamicState.COVERAGE_TO_COLOR_LOCATION_NV = 1000455026] = "COVERAGE_TO_COLOR_LOCATION_NV", DynamicState[DynamicState.COVERAGE_MODULATION_MODE_NV = 1000455027] = "COVERAGE_MODULATION_MODE_NV", DynamicState[DynamicState.COVERAGE_MODULATION_TABLE_ENABLE_NV = 1000455028] = "COVERAGE_MODULATION_TABLE_ENABLE_NV", DynamicState[DynamicState.COVERAGE_MODULATION_TABLE_NV = 1000455029] = "COVERAGE_MODULATION_TABLE_NV", DynamicState[DynamicState.SHADING_RATE_IMAGE_ENABLE_NV = 1000455030] = "SHADING_RATE_IMAGE_ENABLE_NV", DynamicState[DynamicState.REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031] = "REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV", DynamicState[DynamicState.COVERAGE_REDUCTION_MODE_NV = 1000455032] = "COVERAGE_REDUCTION_MODE_NV"; -}(DynamicState || (DynamicState = {})); -export var DescriptorUpdateTemplateType; -!function(DescriptorUpdateTemplateType) { - DescriptorUpdateTemplateType[DescriptorUpdateTemplateType.DESCRIPTOR_SET = 0] = "DESCRIPTOR_SET", DescriptorUpdateTemplateType[DescriptorUpdateTemplateType.PUSH_DESCRIPTORS_KHR = 1] = "PUSH_DESCRIPTORS_KHR", DescriptorUpdateTemplateType[DescriptorUpdateTemplateType.DESCRIPTOR_SET_KHR = 0] = "DESCRIPTOR_SET_KHR"; -}(DescriptorUpdateTemplateType || (DescriptorUpdateTemplateType = {})); -export var ObjectType; -!function(ObjectType) { - ObjectType[ObjectType.UNKNOWN = 0] = "UNKNOWN", ObjectType[ObjectType.INSTANCE = 1] = "INSTANCE", ObjectType[ObjectType.PHYSICAL_DEVICE = 2] = "PHYSICAL_DEVICE", ObjectType[ObjectType.DEVICE = 3] = "DEVICE", ObjectType[ObjectType.QUEUE = 4] = "QUEUE", ObjectType[ObjectType.SEMAPHORE = 5] = "SEMAPHORE", ObjectType[ObjectType.COMMAND_BUFFER = 6] = "COMMAND_BUFFER", ObjectType[ObjectType.FENCE = 7] = "FENCE", ObjectType[ObjectType.DEVICE_MEMORY = 8] = "DEVICE_MEMORY", ObjectType[ObjectType.BUFFER = 9] = "BUFFER", ObjectType[ObjectType.IMAGE = 10] = "IMAGE", ObjectType[ObjectType.EVENT = 11] = "EVENT", ObjectType[ObjectType.QUERY_POOL = 12] = "QUERY_POOL", ObjectType[ObjectType.BUFFER_VIEW = 13] = "BUFFER_VIEW", ObjectType[ObjectType.IMAGE_VIEW = 14] = "IMAGE_VIEW", ObjectType[ObjectType.SHADER_MODULE = 15] = "SHADER_MODULE", ObjectType[ObjectType.PIPELINE_CACHE = 16] = "PIPELINE_CACHE", ObjectType[ObjectType.PIPELINE_LAYOUT = 17] = "PIPELINE_LAYOUT", ObjectType[ObjectType.RENDER_PASS = 18] = "RENDER_PASS", ObjectType[ObjectType.PIPELINE = 19] = "PIPELINE", ObjectType[ObjectType.DESCRIPTOR_SET_LAYOUT = 20] = "DESCRIPTOR_SET_LAYOUT", ObjectType[ObjectType.SAMPLER = 21] = "SAMPLER", ObjectType[ObjectType.DESCRIPTOR_POOL = 22] = "DESCRIPTOR_POOL", ObjectType[ObjectType.DESCRIPTOR_SET = 23] = "DESCRIPTOR_SET", ObjectType[ObjectType.FRAMEBUFFER = 24] = "FRAMEBUFFER", ObjectType[ObjectType.COMMAND_POOL = 25] = "COMMAND_POOL", ObjectType[ObjectType.SAMPLER_YCBCR_CONVERSION = 1000156000] = "SAMPLER_YCBCR_CONVERSION", ObjectType[ObjectType.DESCRIPTOR_UPDATE_TEMPLATE = 1000085000] = "DESCRIPTOR_UPDATE_TEMPLATE", ObjectType[ObjectType.PRIVATE_DATA_SLOT = 1000295000] = "PRIVATE_DATA_SLOT", ObjectType[ObjectType.SURFACE_KHR = 1000000000] = "SURFACE_KHR", ObjectType[ObjectType.SWAPCHAIN_KHR = 1000001000] = "SWAPCHAIN_KHR", ObjectType[ObjectType.DISPLAY_KHR = 1000002000] = "DISPLAY_KHR", ObjectType[ObjectType.DISPLAY_MODE_KHR = 1000002001] = "DISPLAY_MODE_KHR", ObjectType[ObjectType.DEBUG_REPORT_CALLBACK_EXT = 1000011000] = "DEBUG_REPORT_CALLBACK_EXT", ObjectType[ObjectType.VIDEO_SESSION_KHR = 1000023000] = "VIDEO_SESSION_KHR", ObjectType[ObjectType.VIDEO_SESSION_PARAMETERS_KHR = 1000023001] = "VIDEO_SESSION_PARAMETERS_KHR", ObjectType[ObjectType.CU_MODULE_NVX = 1000029000] = "CU_MODULE_NVX", ObjectType[ObjectType.CU_FUNCTION_NVX = 1000029001] = "CU_FUNCTION_NVX", ObjectType[ObjectType.DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000] = "DESCRIPTOR_UPDATE_TEMPLATE_KHR", ObjectType[ObjectType.DEBUG_UTILS_MESSENGER_EXT = 1000128000] = "DEBUG_UTILS_MESSENGER_EXT", ObjectType[ObjectType.ACCELERATION_STRUCTURE_KHR = 1000150000] = "ACCELERATION_STRUCTURE_KHR", ObjectType[ObjectType.SAMPLER_YCBCR_CONVERSION_KHR = 1000156000] = "SAMPLER_YCBCR_CONVERSION_KHR", ObjectType[ObjectType.VALIDATION_CACHE_EXT = 1000160000] = "VALIDATION_CACHE_EXT", ObjectType[ObjectType.ACCELERATION_STRUCTURE_NV = 1000165000] = "ACCELERATION_STRUCTURE_NV", ObjectType[ObjectType.PERFORMANCE_CONFIGURATION_INTEL = 1000210000] = "PERFORMANCE_CONFIGURATION_INTEL", ObjectType[ObjectType.DEFERRED_OPERATION_KHR = 1000268000] = "DEFERRED_OPERATION_KHR", ObjectType[ObjectType.INDIRECT_COMMANDS_LAYOUT_NV = 1000277000] = "INDIRECT_COMMANDS_LAYOUT_NV", ObjectType[ObjectType.PRIVATE_DATA_SLOT_EXT = 1000295000] = "PRIVATE_DATA_SLOT_EXT", ObjectType[ObjectType.BUFFER_COLLECTION_FUCHSIA = 1000366000] = "BUFFER_COLLECTION_FUCHSIA", ObjectType[ObjectType.MICROMAP_EXT = 1000396000] = "MICROMAP_EXT", ObjectType[ObjectType.OPTICAL_FLOW_SESSION_NV = 1000464000] = "OPTICAL_FLOW_SESSION_NV"; -}(ObjectType || (ObjectType = {})); -export var RayTracingInvocationReorderModeNV; -!function(RayTracingInvocationReorderModeNV) { - RayTracingInvocationReorderModeNV[RayTracingInvocationReorderModeNV.RAY_TRACING_INVOCATION_REORDER_MODE_NONE_NV = 0] = "RAY_TRACING_INVOCATION_REORDER_MODE_NONE_NV", RayTracingInvocationReorderModeNV[RayTracingInvocationReorderModeNV.RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_NV = 1] = "RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_NV"; -}(RayTracingInvocationReorderModeNV || (RayTracingInvocationReorderModeNV = {})); -export var QueueFlagBits; -!function(QueueFlagBits) { - QueueFlagBits[QueueFlagBits.GRAPHICS = 1] = "GRAPHICS", QueueFlagBits[QueueFlagBits.COMPUTE = 2] = "COMPUTE", QueueFlagBits[QueueFlagBits.TRANSFER = 4] = "TRANSFER", QueueFlagBits[QueueFlagBits.SPARSE_BINDING = 8] = "SPARSE_BINDING", QueueFlagBits[QueueFlagBits.PROTECTED = 16] = "PROTECTED", QueueFlagBits[QueueFlagBits.VIDEO_DECODE_BIT_KHR = 32] = "VIDEO_DECODE_BIT_KHR", QueueFlagBits[QueueFlagBits.RESERVED_9_BIT_EXT = 512] = "RESERVED_9_BIT_EXT", QueueFlagBits[QueueFlagBits.VIDEO_ENCODE_BIT_KHR = 64] = "VIDEO_ENCODE_BIT_KHR", QueueFlagBits[QueueFlagBits.RESERVED_7_BIT_QCOM = 128] = "RESERVED_7_BIT_QCOM", QueueFlagBits[QueueFlagBits.OPTICAL_FLOW_BIT_NV = 256] = "OPTICAL_FLOW_BIT_NV"; -}(QueueFlagBits || (QueueFlagBits = {})); -export var CullModeFlagBits; -!function(CullModeFlagBits) { - CullModeFlagBits[CullModeFlagBits.NONE = 0] = "NONE", CullModeFlagBits[CullModeFlagBits.FRONT = 1] = "FRONT", CullModeFlagBits[CullModeFlagBits.BACK = 2] = "BACK", CullModeFlagBits[CullModeFlagBits.FRONT_AND_BACK = 3] = "FRONT_AND_BACK"; -}(CullModeFlagBits || (CullModeFlagBits = {})); -export var RenderPassCreateFlagBits; -!function(RenderPassCreateFlagBits) { - RenderPassCreateFlagBits[RenderPassCreateFlagBits.RESERVED_0_BIT_KHR = 1] = "RESERVED_0_BIT_KHR", RenderPassCreateFlagBits[RenderPassCreateFlagBits.TRANSFORM_BIT_QCOM = 2] = "TRANSFORM_BIT_QCOM"; -}(RenderPassCreateFlagBits || (RenderPassCreateFlagBits = {})); -export var DeviceQueueCreateFlagBits; -!function(DeviceQueueCreateFlagBits) { - DeviceQueueCreateFlagBits[DeviceQueueCreateFlagBits.PROTECTED = 1] = "PROTECTED", DeviceQueueCreateFlagBits[DeviceQueueCreateFlagBits.RESERVED_1_BIT_QCOM = 2] = "RESERVED_1_BIT_QCOM"; -}(DeviceQueueCreateFlagBits || (DeviceQueueCreateFlagBits = {})); -export var MemoryPropertyFlagBits; -!function(MemoryPropertyFlagBits) { - MemoryPropertyFlagBits[MemoryPropertyFlagBits.DEVICE_LOCAL = 1] = "DEVICE_LOCAL", MemoryPropertyFlagBits[MemoryPropertyFlagBits.HOST_VISIBLE = 2] = "HOST_VISIBLE", MemoryPropertyFlagBits[MemoryPropertyFlagBits.HOST_COHERENT = 4] = "HOST_COHERENT", MemoryPropertyFlagBits[MemoryPropertyFlagBits.HOST_CACHED = 8] = "HOST_CACHED", MemoryPropertyFlagBits[MemoryPropertyFlagBits.LAZILY_ALLOCATED = 16] = "LAZILY_ALLOCATED", MemoryPropertyFlagBits[MemoryPropertyFlagBits.PROTECTED = 32] = "PROTECTED", MemoryPropertyFlagBits[MemoryPropertyFlagBits.DEVICE_COHERENT_BIT_AMD = 64] = "DEVICE_COHERENT_BIT_AMD", MemoryPropertyFlagBits[MemoryPropertyFlagBits.DEVICE_UNCACHED_BIT_AMD = 128] = "DEVICE_UNCACHED_BIT_AMD", MemoryPropertyFlagBits[MemoryPropertyFlagBits.RDMA_CAPABLE_BIT_NV = 256] = "RDMA_CAPABLE_BIT_NV"; -}(MemoryPropertyFlagBits || (MemoryPropertyFlagBits = {})); -export var MemoryHeapFlagBits; -!function(MemoryHeapFlagBits) { - MemoryHeapFlagBits[MemoryHeapFlagBits.DEVICE_LOCAL = 1] = "DEVICE_LOCAL", MemoryHeapFlagBits[MemoryHeapFlagBits.MULTI_INSTANCE = 2] = "MULTI_INSTANCE", MemoryHeapFlagBits[MemoryHeapFlagBits.MULTI_INSTANCE_BIT_KHR = 2] = "MULTI_INSTANCE_BIT_KHR", MemoryHeapFlagBits[MemoryHeapFlagBits.RESERVED_2_BIT_KHR = 4] = "RESERVED_2_BIT_KHR"; -}(MemoryHeapFlagBits || (MemoryHeapFlagBits = {})); -export var AccessFlagBits; -!function(AccessFlagBits) { - AccessFlagBits[AccessFlagBits.INDIRECT_COMMAND_READ = 1] = "INDIRECT_COMMAND_READ", AccessFlagBits[AccessFlagBits.INDEX_READ = 2] = "INDEX_READ", AccessFlagBits[AccessFlagBits.VERTEX_ATTRIBUTE_READ = 4] = "VERTEX_ATTRIBUTE_READ", AccessFlagBits[AccessFlagBits.UNIFORM_READ = 8] = "UNIFORM_READ", AccessFlagBits[AccessFlagBits.INPUT_ATTACHMENT_READ = 16] = "INPUT_ATTACHMENT_READ", AccessFlagBits[AccessFlagBits.SHADER_READ = 32] = "SHADER_READ", AccessFlagBits[AccessFlagBits.SHADER_WRITE = 64] = "SHADER_WRITE", AccessFlagBits[AccessFlagBits.COLOR_ATTACHMENT_READ = 128] = "COLOR_ATTACHMENT_READ", AccessFlagBits[AccessFlagBits.COLOR_ATTACHMENT_WRITE = 256] = "COLOR_ATTACHMENT_WRITE", AccessFlagBits[AccessFlagBits.DEPTH_STENCIL_ATTACHMENT_READ = 512] = "DEPTH_STENCIL_ATTACHMENT_READ", AccessFlagBits[AccessFlagBits.DEPTH_STENCIL_ATTACHMENT_WRITE = 1024] = "DEPTH_STENCIL_ATTACHMENT_WRITE", AccessFlagBits[AccessFlagBits.TRANSFER_READ = 2048] = "TRANSFER_READ", AccessFlagBits[AccessFlagBits.TRANSFER_WRITE = 4096] = "TRANSFER_WRITE", AccessFlagBits[AccessFlagBits.HOST_READ = 8192] = "HOST_READ", AccessFlagBits[AccessFlagBits.HOST_WRITE = 16384] = "HOST_WRITE", AccessFlagBits[AccessFlagBits.MEMORY_READ = 32768] = "MEMORY_READ", AccessFlagBits[AccessFlagBits.MEMORY_WRITE = 65536] = "MEMORY_WRITE", AccessFlagBits[AccessFlagBits.NONE = 0] = "NONE", AccessFlagBits[AccessFlagBits.TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 33554432] = "TRANSFORM_FEEDBACK_WRITE_BIT_EXT", AccessFlagBits[AccessFlagBits.TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 67108864] = "TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT", AccessFlagBits[AccessFlagBits.TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 134217728] = "TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT", AccessFlagBits[AccessFlagBits.CONDITIONAL_RENDERING_READ_BIT_EXT = 1048576] = "CONDITIONAL_RENDERING_READ_BIT_EXT", AccessFlagBits[AccessFlagBits.COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 524288] = "COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT", AccessFlagBits[AccessFlagBits.ACCELERATION_STRUCTURE_READ_BIT_KHR = 2097152] = "ACCELERATION_STRUCTURE_READ_BIT_KHR", AccessFlagBits[AccessFlagBits.ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 4194304] = "ACCELERATION_STRUCTURE_WRITE_BIT_KHR", AccessFlagBits[AccessFlagBits.SHADING_RATE_IMAGE_READ_BIT_NV = 8388608] = "SHADING_RATE_IMAGE_READ_BIT_NV", AccessFlagBits[AccessFlagBits.ACCELERATION_STRUCTURE_READ_BIT_NV = 2097152] = "ACCELERATION_STRUCTURE_READ_BIT_NV", AccessFlagBits[AccessFlagBits.ACCELERATION_STRUCTURE_WRITE_BIT_NV = 4194304] = "ACCELERATION_STRUCTURE_WRITE_BIT_NV", AccessFlagBits[AccessFlagBits.FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 16777216] = "FRAGMENT_DENSITY_MAP_READ_BIT_EXT", AccessFlagBits[AccessFlagBits.FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 8388608] = "FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR", AccessFlagBits[AccessFlagBits.COMMAND_PREPROCESS_READ_BIT_NV = 131072] = "COMMAND_PREPROCESS_READ_BIT_NV", AccessFlagBits[AccessFlagBits.COMMAND_PREPROCESS_WRITE_BIT_NV = 262144] = "COMMAND_PREPROCESS_WRITE_BIT_NV", AccessFlagBits[AccessFlagBits.NONE_KHR = 0] = "NONE_KHR"; -}(AccessFlagBits || (AccessFlagBits = {})); -export var BufferUsageFlagBits; -!function(BufferUsageFlagBits) { - BufferUsageFlagBits[BufferUsageFlagBits.TRANSFER_SRC = 1] = "TRANSFER_SRC", BufferUsageFlagBits[BufferUsageFlagBits.TRANSFER_DST = 2] = "TRANSFER_DST", BufferUsageFlagBits[BufferUsageFlagBits.UNIFORM_TEXEL_BUFFER = 4] = "UNIFORM_TEXEL_BUFFER", BufferUsageFlagBits[BufferUsageFlagBits.STORAGE_TEXEL_BUFFER = 8] = "STORAGE_TEXEL_BUFFER", BufferUsageFlagBits[BufferUsageFlagBits.UNIFORM_BUFFER = 16] = "UNIFORM_BUFFER", BufferUsageFlagBits[BufferUsageFlagBits.STORAGE_BUFFER = 32] = "STORAGE_BUFFER", BufferUsageFlagBits[BufferUsageFlagBits.INDEX_BUFFER = 64] = "INDEX_BUFFER", BufferUsageFlagBits[BufferUsageFlagBits.VERTEX_BUFFER = 128] = "VERTEX_BUFFER", BufferUsageFlagBits[BufferUsageFlagBits.INDIRECT_BUFFER = 256] = "INDIRECT_BUFFER", BufferUsageFlagBits[BufferUsageFlagBits.SHADER_DEVICE_ADDRESS = 131072] = "SHADER_DEVICE_ADDRESS", BufferUsageFlagBits[BufferUsageFlagBits.VIDEO_DECODE_SRC_BIT_KHR = 8192] = "VIDEO_DECODE_SRC_BIT_KHR", BufferUsageFlagBits[BufferUsageFlagBits.VIDEO_DECODE_DST_BIT_KHR = 16384] = "VIDEO_DECODE_DST_BIT_KHR", BufferUsageFlagBits[BufferUsageFlagBits.TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 2048] = "TRANSFORM_FEEDBACK_BUFFER_BIT_EXT", BufferUsageFlagBits[BufferUsageFlagBits.TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 4096] = "TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT", BufferUsageFlagBits[BufferUsageFlagBits.CONDITIONAL_RENDERING_BIT_EXT = 512] = "CONDITIONAL_RENDERING_BIT_EXT", BufferUsageFlagBits[BufferUsageFlagBits.RESERVED_25_BIT_AMD = 33554432] = "RESERVED_25_BIT_AMD", BufferUsageFlagBits[BufferUsageFlagBits.ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 524288] = "ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR", BufferUsageFlagBits[BufferUsageFlagBits.ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 1048576] = "ACCELERATION_STRUCTURE_STORAGE_BIT_KHR", BufferUsageFlagBits[BufferUsageFlagBits.SHADER_BINDING_TABLE_BIT_KHR = 1024] = "SHADER_BINDING_TABLE_BIT_KHR", BufferUsageFlagBits[BufferUsageFlagBits.RAY_TRACING_BIT_NV = 1024] = "RAY_TRACING_BIT_NV", BufferUsageFlagBits[BufferUsageFlagBits.RESERVED_18_BIT_QCOM = 262144] = "RESERVED_18_BIT_QCOM", BufferUsageFlagBits[BufferUsageFlagBits.SHADER_DEVICE_ADDRESS_BIT_EXT = 131072] = "SHADER_DEVICE_ADDRESS_BIT_EXT", BufferUsageFlagBits[BufferUsageFlagBits.SHADER_DEVICE_ADDRESS_BIT_KHR = 131072] = "SHADER_DEVICE_ADDRESS_BIT_KHR", BufferUsageFlagBits[BufferUsageFlagBits.VIDEO_ENCODE_DST_BIT_KHR = 32768] = "VIDEO_ENCODE_DST_BIT_KHR", BufferUsageFlagBits[BufferUsageFlagBits.VIDEO_ENCODE_SRC_BIT_KHR = 65536] = "VIDEO_ENCODE_SRC_BIT_KHR", BufferUsageFlagBits[BufferUsageFlagBits.SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 2097152] = "SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT", BufferUsageFlagBits[BufferUsageFlagBits.RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 4194304] = "RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT", BufferUsageFlagBits[BufferUsageFlagBits.PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 67108864] = "PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT", BufferUsageFlagBits[BufferUsageFlagBits.MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 8388608] = "MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT", BufferUsageFlagBits[BufferUsageFlagBits.MICROMAP_STORAGE_BIT_EXT = 16777216] = "MICROMAP_STORAGE_BIT_EXT"; -}(BufferUsageFlagBits || (BufferUsageFlagBits = {})); -export var BufferCreateFlagBits; -!function(BufferCreateFlagBits) { - BufferCreateFlagBits[BufferCreateFlagBits.SPARSE_BINDING = 1] = "SPARSE_BINDING", BufferCreateFlagBits[BufferCreateFlagBits.SPARSE_RESIDENCY = 2] = "SPARSE_RESIDENCY", BufferCreateFlagBits[BufferCreateFlagBits.SPARSE_ALIASED = 4] = "SPARSE_ALIASED", BufferCreateFlagBits[BufferCreateFlagBits.PROTECTED = 8] = "PROTECTED", BufferCreateFlagBits[BufferCreateFlagBits.DEVICE_ADDRESS_CAPTURE_REPLAY = 16] = "DEVICE_ADDRESS_CAPTURE_REPLAY", BufferCreateFlagBits[BufferCreateFlagBits.DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 16] = "DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT", BufferCreateFlagBits[BufferCreateFlagBits.DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 16] = "DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR", BufferCreateFlagBits[BufferCreateFlagBits.DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 32] = "DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT"; -}(BufferCreateFlagBits || (BufferCreateFlagBits = {})); -export var ShaderStageFlagBits; -!function(ShaderStageFlagBits) { - ShaderStageFlagBits[ShaderStageFlagBits.VERTEX = 1] = "VERTEX", ShaderStageFlagBits[ShaderStageFlagBits.TESSELLATION_CONTROL = 2] = "TESSELLATION_CONTROL", ShaderStageFlagBits[ShaderStageFlagBits.TESSELLATION_EVALUATION = 4] = "TESSELLATION_EVALUATION", ShaderStageFlagBits[ShaderStageFlagBits.GEOMETRY = 8] = "GEOMETRY", ShaderStageFlagBits[ShaderStageFlagBits.FRAGMENT = 16] = "FRAGMENT", ShaderStageFlagBits[ShaderStageFlagBits.COMPUTE = 32] = "COMPUTE", ShaderStageFlagBits[ShaderStageFlagBits.ALL_GRAPHICS = 31] = "ALL_GRAPHICS", ShaderStageFlagBits[ShaderStageFlagBits.ALL = 2147483647] = "ALL", ShaderStageFlagBits[ShaderStageFlagBits.RAYGEN_BIT_KHR = 256] = "RAYGEN_BIT_KHR", ShaderStageFlagBits[ShaderStageFlagBits.ANY_HIT_BIT_KHR = 512] = "ANY_HIT_BIT_KHR", ShaderStageFlagBits[ShaderStageFlagBits.CLOSEST_HIT_BIT_KHR = 1024] = "CLOSEST_HIT_BIT_KHR", ShaderStageFlagBits[ShaderStageFlagBits.MISS_BIT_KHR = 2048] = "MISS_BIT_KHR", ShaderStageFlagBits[ShaderStageFlagBits.INTERSECTION_BIT_KHR = 4096] = "INTERSECTION_BIT_KHR", ShaderStageFlagBits[ShaderStageFlagBits.CALLABLE_BIT_KHR = 8192] = "CALLABLE_BIT_KHR", ShaderStageFlagBits[ShaderStageFlagBits.RAYGEN_BIT_NV = 256] = "RAYGEN_BIT_NV", ShaderStageFlagBits[ShaderStageFlagBits.ANY_HIT_BIT_NV = 512] = "ANY_HIT_BIT_NV", ShaderStageFlagBits[ShaderStageFlagBits.CLOSEST_HIT_BIT_NV = 1024] = "CLOSEST_HIT_BIT_NV", ShaderStageFlagBits[ShaderStageFlagBits.MISS_BIT_NV = 2048] = "MISS_BIT_NV", ShaderStageFlagBits[ShaderStageFlagBits.INTERSECTION_BIT_NV = 4096] = "INTERSECTION_BIT_NV", ShaderStageFlagBits[ShaderStageFlagBits.CALLABLE_BIT_NV = 8192] = "CALLABLE_BIT_NV", ShaderStageFlagBits[ShaderStageFlagBits.TASK_BIT_NV = 64] = "TASK_BIT_NV", ShaderStageFlagBits[ShaderStageFlagBits.MESH_BIT_NV = 128] = "MESH_BIT_NV", ShaderStageFlagBits[ShaderStageFlagBits.TASK_BIT_EXT = 64] = "TASK_BIT_EXT", ShaderStageFlagBits[ShaderStageFlagBits.MESH_BIT_EXT = 128] = "MESH_BIT_EXT", ShaderStageFlagBits[ShaderStageFlagBits.SUBPASS_SHADING_BIT_HUAWEI = 16384] = "SUBPASS_SHADING_BIT_HUAWEI", ShaderStageFlagBits[ShaderStageFlagBits.RESERVED_19_BIT_HUAWEI = 524288] = "RESERVED_19_BIT_HUAWEI", ShaderStageFlagBits[ShaderStageFlagBits.EXT_483_RESERVE_15 = 32768] = "EXT_483_RESERVE_15", ShaderStageFlagBits[ShaderStageFlagBits.EXT_483_RESERVE_16 = 65536] = "EXT_483_RESERVE_16", ShaderStageFlagBits[ShaderStageFlagBits.EXT_483_RESERVE_17 = 131072] = "EXT_483_RESERVE_17"; -}(ShaderStageFlagBits || (ShaderStageFlagBits = {})); -export var ImageUsageFlagBits; -!function(ImageUsageFlagBits) { - ImageUsageFlagBits[ImageUsageFlagBits.TRANSFER_SRC = 1] = "TRANSFER_SRC", ImageUsageFlagBits[ImageUsageFlagBits.TRANSFER_DST = 2] = "TRANSFER_DST", ImageUsageFlagBits[ImageUsageFlagBits.SAMPLED = 4] = "SAMPLED", ImageUsageFlagBits[ImageUsageFlagBits.STORAGE = 8] = "STORAGE", ImageUsageFlagBits[ImageUsageFlagBits.COLOR_ATTACHMENT = 16] = "COLOR_ATTACHMENT", ImageUsageFlagBits[ImageUsageFlagBits.DEPTH_STENCIL_ATTACHMENT = 32] = "DEPTH_STENCIL_ATTACHMENT", ImageUsageFlagBits[ImageUsageFlagBits.TRANSIENT_ATTACHMENT = 64] = "TRANSIENT_ATTACHMENT", ImageUsageFlagBits[ImageUsageFlagBits.INPUT_ATTACHMENT = 128] = "INPUT_ATTACHMENT", ImageUsageFlagBits[ImageUsageFlagBits.VIDEO_DECODE_DST_BIT_KHR = 1024] = "VIDEO_DECODE_DST_BIT_KHR", ImageUsageFlagBits[ImageUsageFlagBits.VIDEO_DECODE_SRC_BIT_KHR = 2048] = "VIDEO_DECODE_SRC_BIT_KHR", ImageUsageFlagBits[ImageUsageFlagBits.VIDEO_DECODE_DPB_BIT_KHR = 4096] = "VIDEO_DECODE_DPB_BIT_KHR", ImageUsageFlagBits[ImageUsageFlagBits.SHADING_RATE_IMAGE_BIT_NV = 256] = "SHADING_RATE_IMAGE_BIT_NV", ImageUsageFlagBits[ImageUsageFlagBits.RESERVED_16_BIT_QCOM = 65536] = "RESERVED_16_BIT_QCOM", ImageUsageFlagBits[ImageUsageFlagBits.RESERVED_17_BIT_QCOM = 131072] = "RESERVED_17_BIT_QCOM", ImageUsageFlagBits[ImageUsageFlagBits.FRAGMENT_DENSITY_MAP_BIT_EXT = 512] = "FRAGMENT_DENSITY_MAP_BIT_EXT", ImageUsageFlagBits[ImageUsageFlagBits.FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 256] = "FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR", ImageUsageFlagBits[ImageUsageFlagBits.RESERVED_22_BIT_EXT = 4194304] = "RESERVED_22_BIT_EXT", ImageUsageFlagBits[ImageUsageFlagBits.VIDEO_ENCODE_DST_BIT_KHR = 8192] = "VIDEO_ENCODE_DST_BIT_KHR", ImageUsageFlagBits[ImageUsageFlagBits.VIDEO_ENCODE_SRC_BIT_KHR = 16384] = "VIDEO_ENCODE_SRC_BIT_KHR", ImageUsageFlagBits[ImageUsageFlagBits.VIDEO_ENCODE_DPB_BIT_KHR = 32768] = "VIDEO_ENCODE_DPB_BIT_KHR", ImageUsageFlagBits[ImageUsageFlagBits.ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 524288] = "ATTACHMENT_FEEDBACK_LOOP_BIT_EXT", ImageUsageFlagBits[ImageUsageFlagBits.INVOCATION_MASK_BIT_HUAWEI = 262144] = "INVOCATION_MASK_BIT_HUAWEI", ImageUsageFlagBits[ImageUsageFlagBits.SAMPLE_WEIGHT_BIT_QCOM = 1048576] = "SAMPLE_WEIGHT_BIT_QCOM", ImageUsageFlagBits[ImageUsageFlagBits.SAMPLE_BLOCK_MATCH_BIT_QCOM = 2097152] = "SAMPLE_BLOCK_MATCH_BIT_QCOM"; -}(ImageUsageFlagBits || (ImageUsageFlagBits = {})); -export var ImageCreateFlagBits; -!function(ImageCreateFlagBits) { - ImageCreateFlagBits[ImageCreateFlagBits.SPARSE_BINDING = 1] = "SPARSE_BINDING", ImageCreateFlagBits[ImageCreateFlagBits.SPARSE_RESIDENCY = 2] = "SPARSE_RESIDENCY", ImageCreateFlagBits[ImageCreateFlagBits.SPARSE_ALIASED = 4] = "SPARSE_ALIASED", ImageCreateFlagBits[ImageCreateFlagBits.MUTABLE_FORMAT = 8] = "MUTABLE_FORMAT", ImageCreateFlagBits[ImageCreateFlagBits.CUBE_COMPATIBLE = 16] = "CUBE_COMPATIBLE", ImageCreateFlagBits[ImageCreateFlagBits.ALIAS = 1024] = "ALIAS", ImageCreateFlagBits[ImageCreateFlagBits.SPLIT_INSTANCE_BIND_REGIONS = 64] = "SPLIT_INSTANCE_BIND_REGIONS", ImageCreateFlagBits[ImageCreateFlagBits.VK_2D_ARRAY_COMPATIBLE = 32] = "VK_2D_ARRAY_COMPATIBLE", ImageCreateFlagBits[ImageCreateFlagBits.BLOCK_TEXEL_VIEW_COMPATIBLE = 128] = "BLOCK_TEXEL_VIEW_COMPATIBLE", ImageCreateFlagBits[ImageCreateFlagBits.EXTENDED_USAGE = 256] = "EXTENDED_USAGE", ImageCreateFlagBits[ImageCreateFlagBits.PROTECTED = 2048] = "PROTECTED", ImageCreateFlagBits[ImageCreateFlagBits.DISJOINT = 512] = "DISJOINT", ImageCreateFlagBits[ImageCreateFlagBits.CORNER_SAMPLED_BIT_NV = 8192] = "CORNER_SAMPLED_BIT_NV", ImageCreateFlagBits[ImageCreateFlagBits.SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 64] = "SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR", ImageCreateFlagBits[ImageCreateFlagBits.VK_2D_ARRAY_COMPATIBLE_BIT_KHR = 32] = "VK_2D_ARRAY_COMPATIBLE_BIT_KHR", ImageCreateFlagBits[ImageCreateFlagBits.BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = 128] = "BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR", ImageCreateFlagBits[ImageCreateFlagBits.EXTENDED_USAGE_BIT_KHR = 256] = "EXTENDED_USAGE_BIT_KHR", ImageCreateFlagBits[ImageCreateFlagBits.SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 4096] = "SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT", ImageCreateFlagBits[ImageCreateFlagBits.DISJOINT_BIT_KHR = 512] = "DISJOINT_BIT_KHR", ImageCreateFlagBits[ImageCreateFlagBits.ALIAS_BIT_KHR = 1024] = "ALIAS_BIT_KHR", ImageCreateFlagBits[ImageCreateFlagBits.SUBSAMPLED_BIT_EXT = 16384] = "SUBSAMPLED_BIT_EXT", ImageCreateFlagBits[ImageCreateFlagBits.RESERVED_19_BIT_EXT = 524288] = "RESERVED_19_BIT_EXT", ImageCreateFlagBits[ImageCreateFlagBits.DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 65536] = "DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT", ImageCreateFlagBits[ImageCreateFlagBits.MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 262144] = "MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT", ImageCreateFlagBits[ImageCreateFlagBits.VK_2D_VIEW_COMPATIBLE_BIT_EXT = 131072] = "VK_2D_VIEW_COMPATIBLE_BIT_EXT", ImageCreateFlagBits[ImageCreateFlagBits.FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = 32768] = "FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM"; -}(ImageCreateFlagBits || (ImageCreateFlagBits = {})); -export var ImageViewCreateFlagBits; -!function(ImageViewCreateFlagBits) { - ImageViewCreateFlagBits[ImageViewCreateFlagBits.FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT = 1] = "FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT", ImageViewCreateFlagBits[ImageViewCreateFlagBits.DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 4] = "DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT", ImageViewCreateFlagBits[ImageViewCreateFlagBits.FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT = 2] = "FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT", ImageViewCreateFlagBits[ImageViewCreateFlagBits.RESERVED_3_BIT_EXT = 8] = "RESERVED_3_BIT_EXT"; -}(ImageViewCreateFlagBits || (ImageViewCreateFlagBits = {})); -export var SamplerCreateFlagBits; -!function(SamplerCreateFlagBits) { - SamplerCreateFlagBits[SamplerCreateFlagBits.SUBSAMPLED_BIT_EXT = 1] = "SUBSAMPLED_BIT_EXT", SamplerCreateFlagBits[SamplerCreateFlagBits.SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = 2] = "SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT", SamplerCreateFlagBits[SamplerCreateFlagBits.DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 8] = "DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT", SamplerCreateFlagBits[SamplerCreateFlagBits.NON_SEAMLESS_CUBE_MAP_BIT_EXT = 4] = "NON_SEAMLESS_CUBE_MAP_BIT_EXT", SamplerCreateFlagBits[SamplerCreateFlagBits.IMAGE_PROCESSING_BIT_QCOM = 16] = "IMAGE_PROCESSING_BIT_QCOM"; -}(SamplerCreateFlagBits || (SamplerCreateFlagBits = {})); -export var PipelineCreateFlagBits; -!function(PipelineCreateFlagBits) { - PipelineCreateFlagBits[PipelineCreateFlagBits.DISABLE_OPTIMIZATION = 1] = "DISABLE_OPTIMIZATION", PipelineCreateFlagBits[PipelineCreateFlagBits.ALLOW_DERIVATIVES = 2] = "ALLOW_DERIVATIVES", PipelineCreateFlagBits[PipelineCreateFlagBits.DERIVATIVE = 4] = "DERIVATIVE", PipelineCreateFlagBits[PipelineCreateFlagBits.VIEW_INDEX_FROM_DEVICE_INDEX = 8] = "VIEW_INDEX_FROM_DEVICE_INDEX", PipelineCreateFlagBits[PipelineCreateFlagBits.DISPATCH_BASE = 16] = "DISPATCH_BASE", PipelineCreateFlagBits[PipelineCreateFlagBits.FAIL_ON_PIPELINE_COMPILE_REQUIRED = 256] = "FAIL_ON_PIPELINE_COMPILE_REQUIRED", PipelineCreateFlagBits[PipelineCreateFlagBits.EARLY_RETURN_ON_FAILURE = 512] = "EARLY_RETURN_ON_FAILURE", PipelineCreateFlagBits[PipelineCreateFlagBits.RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 2097152] = "RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 2097152] = "PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 4194304] = "RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 4194304] = "PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 8] = "VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.DISPATCH_BASE_KHR = 16] = "DISPATCH_BASE_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 16384] = "RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 32768] = "RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 65536] = "RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 131072] = "RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 4096] = "RAY_TRACING_SKIP_TRIANGLES_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.RAY_TRACING_SKIP_AABBS_BIT_KHR = 8192] = "RAY_TRACING_SKIP_AABBS_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 524288] = "RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.DEFER_COMPILE_BIT_NV = 32] = "DEFER_COMPILE_BIT_NV", PipelineCreateFlagBits[PipelineCreateFlagBits.CAPTURE_STATISTICS_BIT_KHR = 64] = "CAPTURE_STATISTICS_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 128] = "CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.INDIRECT_BINDABLE_BIT_NV = 262144] = "INDIRECT_BINDABLE_BIT_NV", PipelineCreateFlagBits[PipelineCreateFlagBits.LIBRARY_BIT_KHR = 2048] = "LIBRARY_BIT_KHR", PipelineCreateFlagBits[PipelineCreateFlagBits.FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT = 256] = "FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.EARLY_RETURN_ON_FAILURE_BIT_EXT = 512] = "EARLY_RETURN_ON_FAILURE_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.DESCRIPTOR_BUFFER_BIT_EXT = 536870912] = "DESCRIPTOR_BUFFER_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 8388608] = "RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.LINK_TIME_OPTIMIZATION_BIT_EXT = 1024] = "LINK_TIME_OPTIMIZATION_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.RAY_TRACING_ALLOW_MOTION_BIT_NV = 1048576] = "RAY_TRACING_ALLOW_MOTION_BIT_NV", PipelineCreateFlagBits[PipelineCreateFlagBits.COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 33554432] = "COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 67108864] = "DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 16777216] = "RAY_TRACING_OPACITY_MICROMAP_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.RESERVED_BIT_28_NV = 268435456] = "RESERVED_BIT_28_NV", PipelineCreateFlagBits[PipelineCreateFlagBits.NO_PROTECTED_ACCESS_BIT_EXT = 134217728] = "NO_PROTECTED_ACCESS_BIT_EXT", PipelineCreateFlagBits[PipelineCreateFlagBits.PROTECTED_ACCESS_ONLY_BIT_EXT = 1073741824] = "PROTECTED_ACCESS_ONLY_BIT_EXT"; -}(PipelineCreateFlagBits || (PipelineCreateFlagBits = {})); -export var PipelineShaderStageCreateFlagBits; -!function(PipelineShaderStageCreateFlagBits) { - PipelineShaderStageCreateFlagBits[PipelineShaderStageCreateFlagBits.ALLOW_VARYING_SUBGROUP_SIZE = 1] = "ALLOW_VARYING_SUBGROUP_SIZE", PipelineShaderStageCreateFlagBits[PipelineShaderStageCreateFlagBits.REQUIRE_FULL_SUBGROUPS = 2] = "REQUIRE_FULL_SUBGROUPS", PipelineShaderStageCreateFlagBits[PipelineShaderStageCreateFlagBits.ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = 1] = "ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT", PipelineShaderStageCreateFlagBits[PipelineShaderStageCreateFlagBits.REQUIRE_FULL_SUBGROUPS_BIT_EXT = 2] = "REQUIRE_FULL_SUBGROUPS_BIT_EXT", PipelineShaderStageCreateFlagBits[PipelineShaderStageCreateFlagBits.RESERVED_3_BIT_KHR = 8] = "RESERVED_3_BIT_KHR"; -}(PipelineShaderStageCreateFlagBits || (PipelineShaderStageCreateFlagBits = {})); -export var ColorComponentFlagBits; -!function(ColorComponentFlagBits) { - ColorComponentFlagBits[ColorComponentFlagBits.R = 1] = "R", ColorComponentFlagBits[ColorComponentFlagBits.G = 2] = "G", ColorComponentFlagBits[ColorComponentFlagBits.B = 4] = "B", ColorComponentFlagBits[ColorComponentFlagBits.A = 8] = "A"; -}(ColorComponentFlagBits || (ColorComponentFlagBits = {})); -export var FenceCreateFlagBits; -!function(FenceCreateFlagBits) { - FenceCreateFlagBits[FenceCreateFlagBits.SIGNALED = 1] = "SIGNALED"; -}(FenceCreateFlagBits || (FenceCreateFlagBits = {})); -export var SemaphoreCreateFlagBits; -SemaphoreCreateFlagBits || (SemaphoreCreateFlagBits = {}); -export var FormatFeatureFlagBits; -!function(FormatFeatureFlagBits) { - FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE = 1] = "SAMPLED_IMAGE", FormatFeatureFlagBits[FormatFeatureFlagBits.STORAGE_IMAGE = 2] = "STORAGE_IMAGE", FormatFeatureFlagBits[FormatFeatureFlagBits.STORAGE_IMAGE_ATOMIC = 4] = "STORAGE_IMAGE_ATOMIC", FormatFeatureFlagBits[FormatFeatureFlagBits.UNIFORM_TEXEL_BUFFER = 8] = "UNIFORM_TEXEL_BUFFER", FormatFeatureFlagBits[FormatFeatureFlagBits.STORAGE_TEXEL_BUFFER = 16] = "STORAGE_TEXEL_BUFFER", FormatFeatureFlagBits[FormatFeatureFlagBits.STORAGE_TEXEL_BUFFER_ATOMIC = 32] = "STORAGE_TEXEL_BUFFER_ATOMIC", FormatFeatureFlagBits[FormatFeatureFlagBits.VERTEX_BUFFER = 64] = "VERTEX_BUFFER", FormatFeatureFlagBits[FormatFeatureFlagBits.COLOR_ATTACHMENT = 128] = "COLOR_ATTACHMENT", FormatFeatureFlagBits[FormatFeatureFlagBits.COLOR_ATTACHMENT_BLEND = 256] = "COLOR_ATTACHMENT_BLEND", FormatFeatureFlagBits[FormatFeatureFlagBits.DEPTH_STENCIL_ATTACHMENT = 512] = "DEPTH_STENCIL_ATTACHMENT", FormatFeatureFlagBits[FormatFeatureFlagBits.BLIT_SRC = 1024] = "BLIT_SRC", FormatFeatureFlagBits[FormatFeatureFlagBits.BLIT_DST = 2048] = "BLIT_DST", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_FILTER_LINEAR = 4096] = "SAMPLED_IMAGE_FILTER_LINEAR", FormatFeatureFlagBits[FormatFeatureFlagBits.TRANSFER_SRC = 16384] = "TRANSFER_SRC", FormatFeatureFlagBits[FormatFeatureFlagBits.TRANSFER_DST = 32768] = "TRANSFER_DST", FormatFeatureFlagBits[FormatFeatureFlagBits.MIDPOINT_CHROMA_SAMPLES = 131072] = "MIDPOINT_CHROMA_SAMPLES", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER = 262144] = "SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER = 524288] = "SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT = 1048576] = "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE = 2097152] = "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE", FormatFeatureFlagBits[FormatFeatureFlagBits.DISJOINT = 4194304] = "DISJOINT", FormatFeatureFlagBits[FormatFeatureFlagBits.COSITED_CHROMA_SAMPLES = 8388608] = "COSITED_CHROMA_SAMPLES", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_FILTER_MINMAX = 65536] = "SAMPLED_IMAGE_FILTER_MINMAX", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 8192] = "SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG", FormatFeatureFlagBits[FormatFeatureFlagBits.VIDEO_DECODE_OUTPUT_BIT_KHR = 33554432] = "VIDEO_DECODE_OUTPUT_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.VIDEO_DECODE_DPB_BIT_KHR = 67108864] = "VIDEO_DECODE_DPB_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.TRANSFER_SRC_BIT_KHR = 16384] = "TRANSFER_SRC_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.TRANSFER_DST_BIT_KHR = 32768] = "TRANSFER_DST_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 65536] = "SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT", FormatFeatureFlagBits[FormatFeatureFlagBits.ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 536870912] = "ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 131072] = "MIDPOINT_CHROMA_SAMPLES_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 262144] = "SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 524288] = "SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 1048576] = "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 2097152] = "SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.DISJOINT_BIT_KHR = 4194304] = "DISJOINT_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.COSITED_CHROMA_SAMPLES_BIT_KHR = 8388608] = "COSITED_CHROMA_SAMPLES_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 8192] = "SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT", FormatFeatureFlagBits[FormatFeatureFlagBits.FRAGMENT_DENSITY_MAP_BIT_EXT = 16777216] = "FRAGMENT_DENSITY_MAP_BIT_EXT", FormatFeatureFlagBits[FormatFeatureFlagBits.FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1073741824] = "FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.VIDEO_ENCODE_INPUT_BIT_KHR = 134217728] = "VIDEO_ENCODE_INPUT_BIT_KHR", FormatFeatureFlagBits[FormatFeatureFlagBits.VIDEO_ENCODE_DPB_BIT_KHR = 268435456] = "VIDEO_ENCODE_DPB_BIT_KHR"; -}(FormatFeatureFlagBits || (FormatFeatureFlagBits = {})); -export var QueryControlFlagBits; -!function(QueryControlFlagBits) { - QueryControlFlagBits[QueryControlFlagBits.PRECISE = 1] = "PRECISE"; -}(QueryControlFlagBits || (QueryControlFlagBits = {})); -export var QueryResultFlagBits; -!function(QueryResultFlagBits) { - QueryResultFlagBits[QueryResultFlagBits.VK_64 = 1] = "VK_64", QueryResultFlagBits[QueryResultFlagBits.WAIT = 2] = "WAIT", QueryResultFlagBits[QueryResultFlagBits.WITH_AVAILABILITY = 4] = "WITH_AVAILABILITY", QueryResultFlagBits[QueryResultFlagBits.PARTIAL = 8] = "PARTIAL", QueryResultFlagBits[QueryResultFlagBits.WITH_STATUS_BIT_KHR = 16] = "WITH_STATUS_BIT_KHR"; -}(QueryResultFlagBits || (QueryResultFlagBits = {})); -export var CommandBufferUsageFlagBits; -!function(CommandBufferUsageFlagBits) { - CommandBufferUsageFlagBits[CommandBufferUsageFlagBits.ONE_TIME_SUBMIT = 1] = "ONE_TIME_SUBMIT", CommandBufferUsageFlagBits[CommandBufferUsageFlagBits.RENDER_PASS_CONTINUE = 2] = "RENDER_PASS_CONTINUE", CommandBufferUsageFlagBits[CommandBufferUsageFlagBits.SIMULTANEOUS_USE = 4] = "SIMULTANEOUS_USE"; -}(CommandBufferUsageFlagBits || (CommandBufferUsageFlagBits = {})); -export var QueryPipelineStatisticFlagBits; -!function(QueryPipelineStatisticFlagBits) { - QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.INPUT_ASSEMBLY_VERTICES = 1] = "INPUT_ASSEMBLY_VERTICES", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.INPUT_ASSEMBLY_PRIMITIVES = 2] = "INPUT_ASSEMBLY_PRIMITIVES", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.VERTEX_SHADER_INVOCATIONS = 4] = "VERTEX_SHADER_INVOCATIONS", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.GEOMETRY_SHADER_INVOCATIONS = 8] = "GEOMETRY_SHADER_INVOCATIONS", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.GEOMETRY_SHADER_PRIMITIVES = 16] = "GEOMETRY_SHADER_PRIMITIVES", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.CLIPPING_INVOCATIONS = 32] = "CLIPPING_INVOCATIONS", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.CLIPPING_PRIMITIVES = 64] = "CLIPPING_PRIMITIVES", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.FRAGMENT_SHADER_INVOCATIONS = 128] = "FRAGMENT_SHADER_INVOCATIONS", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.TESSELLATION_CONTROL_SHADER_PATCHES = 256] = "TESSELLATION_CONTROL_SHADER_PATCHES", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.TESSELLATION_EVALUATION_SHADER_INVOCATIONS = 512] = "TESSELLATION_EVALUATION_SHADER_INVOCATIONS", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.COMPUTE_SHADER_INVOCATIONS = 1024] = "COMPUTE_SHADER_INVOCATIONS", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.TASK_SHADER_INVOCATIONS_BIT_EXT = 2048] = "TASK_SHADER_INVOCATIONS_BIT_EXT", QueryPipelineStatisticFlagBits[QueryPipelineStatisticFlagBits.MESH_SHADER_INVOCATIONS_BIT_EXT = 4096] = "MESH_SHADER_INVOCATIONS_BIT_EXT"; -}(QueryPipelineStatisticFlagBits || (QueryPipelineStatisticFlagBits = {})); -export var ImageAspectFlagBits; -!function(ImageAspectFlagBits) { - ImageAspectFlagBits[ImageAspectFlagBits.COLOR = 1] = "COLOR", ImageAspectFlagBits[ImageAspectFlagBits.DEPTH = 2] = "DEPTH", ImageAspectFlagBits[ImageAspectFlagBits.STENCIL = 4] = "STENCIL", ImageAspectFlagBits[ImageAspectFlagBits.METADATA = 8] = "METADATA", ImageAspectFlagBits[ImageAspectFlagBits.PLANE_0 = 16] = "PLANE_0", ImageAspectFlagBits[ImageAspectFlagBits.PLANE_1 = 32] = "PLANE_1", ImageAspectFlagBits[ImageAspectFlagBits.PLANE_2 = 64] = "PLANE_2", ImageAspectFlagBits[ImageAspectFlagBits.NONE = 0] = "NONE", ImageAspectFlagBits[ImageAspectFlagBits.PLANE_0_BIT_KHR = 16] = "PLANE_0_BIT_KHR", ImageAspectFlagBits[ImageAspectFlagBits.PLANE_1_BIT_KHR = 32] = "PLANE_1_BIT_KHR", ImageAspectFlagBits[ImageAspectFlagBits.PLANE_2_BIT_KHR = 64] = "PLANE_2_BIT_KHR", ImageAspectFlagBits[ImageAspectFlagBits.MEMORY_PLANE_0_BIT_EXT = 128] = "MEMORY_PLANE_0_BIT_EXT", ImageAspectFlagBits[ImageAspectFlagBits.MEMORY_PLANE_1_BIT_EXT = 256] = "MEMORY_PLANE_1_BIT_EXT", ImageAspectFlagBits[ImageAspectFlagBits.MEMORY_PLANE_2_BIT_EXT = 512] = "MEMORY_PLANE_2_BIT_EXT", ImageAspectFlagBits[ImageAspectFlagBits.MEMORY_PLANE_3_BIT_EXT = 1024] = "MEMORY_PLANE_3_BIT_EXT", ImageAspectFlagBits[ImageAspectFlagBits.NONE_KHR = 0] = "NONE_KHR"; -}(ImageAspectFlagBits || (ImageAspectFlagBits = {})); -export var SparseImageFormatFlagBits; -!function(SparseImageFormatFlagBits) { - SparseImageFormatFlagBits[SparseImageFormatFlagBits.SINGLE_MIPTAIL = 1] = "SINGLE_MIPTAIL", SparseImageFormatFlagBits[SparseImageFormatFlagBits.ALIGNED_MIP_SIZE = 2] = "ALIGNED_MIP_SIZE", SparseImageFormatFlagBits[SparseImageFormatFlagBits.NONSTANDARD_BLOCK_SIZE = 4] = "NONSTANDARD_BLOCK_SIZE"; -}(SparseImageFormatFlagBits || (SparseImageFormatFlagBits = {})); -export var SparseMemoryBindFlagBits; -!function(SparseMemoryBindFlagBits) { - SparseMemoryBindFlagBits[SparseMemoryBindFlagBits.METADATA = 1] = "METADATA"; -}(SparseMemoryBindFlagBits || (SparseMemoryBindFlagBits = {})); -export var PipelineStageFlagBits; -!function(PipelineStageFlagBits) { - PipelineStageFlagBits[PipelineStageFlagBits.TOP_OF_PIPE = 1] = "TOP_OF_PIPE", PipelineStageFlagBits[PipelineStageFlagBits.DRAW_INDIRECT = 2] = "DRAW_INDIRECT", PipelineStageFlagBits[PipelineStageFlagBits.VERTEX_INPUT = 4] = "VERTEX_INPUT", PipelineStageFlagBits[PipelineStageFlagBits.VERTEX_SHADER = 8] = "VERTEX_SHADER", PipelineStageFlagBits[PipelineStageFlagBits.TESSELLATION_CONTROL_SHADER = 16] = "TESSELLATION_CONTROL_SHADER", PipelineStageFlagBits[PipelineStageFlagBits.TESSELLATION_EVALUATION_SHADER = 32] = "TESSELLATION_EVALUATION_SHADER", PipelineStageFlagBits[PipelineStageFlagBits.GEOMETRY_SHADER = 64] = "GEOMETRY_SHADER", PipelineStageFlagBits[PipelineStageFlagBits.FRAGMENT_SHADER = 128] = "FRAGMENT_SHADER", PipelineStageFlagBits[PipelineStageFlagBits.EARLY_FRAGMENT_TESTS = 256] = "EARLY_FRAGMENT_TESTS", PipelineStageFlagBits[PipelineStageFlagBits.LATE_FRAGMENT_TESTS = 512] = "LATE_FRAGMENT_TESTS", PipelineStageFlagBits[PipelineStageFlagBits.COLOR_ATTACHMENT_OUTPUT = 1024] = "COLOR_ATTACHMENT_OUTPUT", PipelineStageFlagBits[PipelineStageFlagBits.COMPUTE_SHADER = 2048] = "COMPUTE_SHADER", PipelineStageFlagBits[PipelineStageFlagBits.TRANSFER = 4096] = "TRANSFER", PipelineStageFlagBits[PipelineStageFlagBits.BOTTOM_OF_PIPE = 8192] = "BOTTOM_OF_PIPE", PipelineStageFlagBits[PipelineStageFlagBits.HOST = 16384] = "HOST", PipelineStageFlagBits[PipelineStageFlagBits.ALL_GRAPHICS = 32768] = "ALL_GRAPHICS", PipelineStageFlagBits[PipelineStageFlagBits.ALL_COMMANDS = 65536] = "ALL_COMMANDS", PipelineStageFlagBits[PipelineStageFlagBits.NONE = 0] = "NONE", PipelineStageFlagBits[PipelineStageFlagBits.TRANSFORM_FEEDBACK_BIT_EXT = 16777216] = "TRANSFORM_FEEDBACK_BIT_EXT", PipelineStageFlagBits[PipelineStageFlagBits.CONDITIONAL_RENDERING_BIT_EXT = 262144] = "CONDITIONAL_RENDERING_BIT_EXT", PipelineStageFlagBits[PipelineStageFlagBits.ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 33554432] = "ACCELERATION_STRUCTURE_BUILD_BIT_KHR", PipelineStageFlagBits[PipelineStageFlagBits.RAY_TRACING_SHADER_BIT_KHR = 2097152] = "RAY_TRACING_SHADER_BIT_KHR", PipelineStageFlagBits[PipelineStageFlagBits.SHADING_RATE_IMAGE_BIT_NV = 4194304] = "SHADING_RATE_IMAGE_BIT_NV", PipelineStageFlagBits[PipelineStageFlagBits.RAY_TRACING_SHADER_BIT_NV = 2097152] = "RAY_TRACING_SHADER_BIT_NV", PipelineStageFlagBits[PipelineStageFlagBits.ACCELERATION_STRUCTURE_BUILD_BIT_NV = 33554432] = "ACCELERATION_STRUCTURE_BUILD_BIT_NV", PipelineStageFlagBits[PipelineStageFlagBits.TASK_SHADER_BIT_NV = 524288] = "TASK_SHADER_BIT_NV", PipelineStageFlagBits[PipelineStageFlagBits.MESH_SHADER_BIT_NV = 1048576] = "MESH_SHADER_BIT_NV", PipelineStageFlagBits[PipelineStageFlagBits.FRAGMENT_DENSITY_PROCESS_BIT_EXT = 8388608] = "FRAGMENT_DENSITY_PROCESS_BIT_EXT", PipelineStageFlagBits[PipelineStageFlagBits.FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 4194304] = "FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR", PipelineStageFlagBits[PipelineStageFlagBits.COMMAND_PREPROCESS_BIT_NV = 131072] = "COMMAND_PREPROCESS_BIT_NV", PipelineStageFlagBits[PipelineStageFlagBits.NONE_KHR = 0] = "NONE_KHR", PipelineStageFlagBits[PipelineStageFlagBits.TASK_SHADER_BIT_EXT = 524288] = "TASK_SHADER_BIT_EXT", PipelineStageFlagBits[PipelineStageFlagBits.MESH_SHADER_BIT_EXT = 1048576] = "MESH_SHADER_BIT_EXT"; -}(PipelineStageFlagBits || (PipelineStageFlagBits = {})); -export var CommandPoolCreateFlagBits; -!function(CommandPoolCreateFlagBits) { - CommandPoolCreateFlagBits[CommandPoolCreateFlagBits.TRANSIENT = 1] = "TRANSIENT", CommandPoolCreateFlagBits[CommandPoolCreateFlagBits.RESET_COMMAND_BUFFER = 2] = "RESET_COMMAND_BUFFER", CommandPoolCreateFlagBits[CommandPoolCreateFlagBits.PROTECTED = 4] = "PROTECTED"; -}(CommandPoolCreateFlagBits || (CommandPoolCreateFlagBits = {})); -export var CommandPoolResetFlagBits; -!function(CommandPoolResetFlagBits) { - CommandPoolResetFlagBits[CommandPoolResetFlagBits.RELEASE_RESOURCES = 1] = "RELEASE_RESOURCES", CommandPoolResetFlagBits[CommandPoolResetFlagBits.RESERVED_1_BIT_COREAVI = 2] = "RESERVED_1_BIT_COREAVI"; -}(CommandPoolResetFlagBits || (CommandPoolResetFlagBits = {})); -export var CommandBufferResetFlagBits; -!function(CommandBufferResetFlagBits) { - CommandBufferResetFlagBits[CommandBufferResetFlagBits.RELEASE_RESOURCES = 1] = "RELEASE_RESOURCES"; -}(CommandBufferResetFlagBits || (CommandBufferResetFlagBits = {})); -export var SampleCountFlagBits; -!function(SampleCountFlagBits) { - SampleCountFlagBits[SampleCountFlagBits.VK_1 = 1] = "VK_1", SampleCountFlagBits[SampleCountFlagBits.VK_2 = 2] = "VK_2", SampleCountFlagBits[SampleCountFlagBits.VK_4 = 4] = "VK_4", SampleCountFlagBits[SampleCountFlagBits.VK_8 = 8] = "VK_8", SampleCountFlagBits[SampleCountFlagBits.VK_16 = 16] = "VK_16", SampleCountFlagBits[SampleCountFlagBits.VK_32 = 32] = "VK_32", SampleCountFlagBits[SampleCountFlagBits.VK_64 = 64] = "VK_64"; -}(SampleCountFlagBits || (SampleCountFlagBits = {})); -export var AttachmentDescriptionFlagBits; -!function(AttachmentDescriptionFlagBits) { - AttachmentDescriptionFlagBits[AttachmentDescriptionFlagBits.MAY_ALIAS = 1] = "MAY_ALIAS"; -}(AttachmentDescriptionFlagBits || (AttachmentDescriptionFlagBits = {})); -export var StencilFaceFlagBits; -!function(StencilFaceFlagBits) { - StencilFaceFlagBits[StencilFaceFlagBits.FRONT = 1] = "FRONT", StencilFaceFlagBits[StencilFaceFlagBits.BACK = 2] = "BACK", StencilFaceFlagBits[StencilFaceFlagBits.FRONT_AND_BACK = 3] = "FRONT_AND_BACK", StencilFaceFlagBits[StencilFaceFlagBits.STENCIL_FRONT_AND_BACK = 3] = "STENCIL_FRONT_AND_BACK"; -}(StencilFaceFlagBits || (StencilFaceFlagBits = {})); -export var DescriptorPoolCreateFlagBits; -!function(DescriptorPoolCreateFlagBits) { - DescriptorPoolCreateFlagBits[DescriptorPoolCreateFlagBits.FREE_DESCRIPTOR_SET = 1] = "FREE_DESCRIPTOR_SET", DescriptorPoolCreateFlagBits[DescriptorPoolCreateFlagBits.UPDATE_AFTER_BIND = 2] = "UPDATE_AFTER_BIND", DescriptorPoolCreateFlagBits[DescriptorPoolCreateFlagBits.UPDATE_AFTER_BIND_BIT_EXT = 2] = "UPDATE_AFTER_BIND_BIT_EXT", DescriptorPoolCreateFlagBits[DescriptorPoolCreateFlagBits.HOST_ONLY_BIT_VALVE = 4] = "HOST_ONLY_BIT_VALVE", DescriptorPoolCreateFlagBits[DescriptorPoolCreateFlagBits.HOST_ONLY_BIT_EXT = 4] = "HOST_ONLY_BIT_EXT"; -}(DescriptorPoolCreateFlagBits || (DescriptorPoolCreateFlagBits = {})); -export var DependencyFlagBits; -!function(DependencyFlagBits) { - DependencyFlagBits[DependencyFlagBits.BY_REGION = 1] = "BY_REGION", DependencyFlagBits[DependencyFlagBits.DEVICE_GROUP = 4] = "DEVICE_GROUP", DependencyFlagBits[DependencyFlagBits.VIEW_LOCAL = 2] = "VIEW_LOCAL", DependencyFlagBits[DependencyFlagBits.VIEW_LOCAL_BIT_KHR = 2] = "VIEW_LOCAL_BIT_KHR", DependencyFlagBits[DependencyFlagBits.DEVICE_GROUP_BIT_KHR = 4] = "DEVICE_GROUP_BIT_KHR", DependencyFlagBits[DependencyFlagBits.FEEDBACK_LOOP_BIT_EXT = 8] = "FEEDBACK_LOOP_BIT_EXT"; -}(DependencyFlagBits || (DependencyFlagBits = {})); -export var SemaphoreType; -!function(SemaphoreType) { - SemaphoreType[SemaphoreType.BINARY = 0] = "BINARY", SemaphoreType[SemaphoreType.TIMELINE = 1] = "TIMELINE", SemaphoreType[SemaphoreType.BINARY_KHR = 0] = "BINARY_KHR", SemaphoreType[SemaphoreType.TIMELINE_KHR = 1] = "TIMELINE_KHR"; -}(SemaphoreType || (SemaphoreType = {})); -export var SemaphoreWaitFlagBits; -!function(SemaphoreWaitFlagBits) { - SemaphoreWaitFlagBits[SemaphoreWaitFlagBits.ANY = 1] = "ANY", SemaphoreWaitFlagBits[SemaphoreWaitFlagBits.ANY_BIT_KHR = 1] = "ANY_BIT_KHR"; -}(SemaphoreWaitFlagBits || (SemaphoreWaitFlagBits = {})); -export var PresentModeKHR; -!function(PresentModeKHR) { - PresentModeKHR[PresentModeKHR.PRESENT_MODE_IMMEDIATE_KHR = 0] = "PRESENT_MODE_IMMEDIATE_KHR", PresentModeKHR[PresentModeKHR.PRESENT_MODE_MAILBOX_KHR = 1] = "PRESENT_MODE_MAILBOX_KHR", PresentModeKHR[PresentModeKHR.PRESENT_MODE_FIFO_KHR = 2] = "PRESENT_MODE_FIFO_KHR", PresentModeKHR[PresentModeKHR.PRESENT_MODE_FIFO_RELAXED_KHR = 3] = "PRESENT_MODE_FIFO_RELAXED_KHR", PresentModeKHR[PresentModeKHR.PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000] = "PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR", PresentModeKHR[PresentModeKHR.PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001] = "PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR"; -}(PresentModeKHR || (PresentModeKHR = {})); -export var ColorSpaceKHR; -!function(ColorSpaceKHR) { - ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_SRGB_NONLINEAR_KHR = 0] = "COLOR_SPACE_SRGB_NONLINEAR_KHR", ColorSpaceKHR[ColorSpaceKHR.COLORSPACE_SRGB_NONLINEAR_KHR = 0] = "COLORSPACE_SRGB_NONLINEAR_KHR", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001] = "COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002] = "COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104003] = "COLOR_SPACE_DISPLAY_P3_LINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004] = "COLOR_SPACE_DCI_P3_NONLINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_BT709_LINEAR_EXT = 1000104005] = "COLOR_SPACE_BT709_LINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006] = "COLOR_SPACE_BT709_NONLINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007] = "COLOR_SPACE_BT2020_LINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_HDR10_ST2084_EXT = 1000104008] = "COLOR_SPACE_HDR10_ST2084_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_DOLBYVISION_EXT = 1000104009] = "COLOR_SPACE_DOLBYVISION_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_HDR10_HLG_EXT = 1000104010] = "COLOR_SPACE_HDR10_HLG_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011] = "COLOR_SPACE_ADOBERGB_LINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012] = "COLOR_SPACE_ADOBERGB_NONLINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_PASS_THROUGH_EXT = 1000104013] = "COLOR_SPACE_PASS_THROUGH_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014] = "COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003] = "COLOR_SPACE_DCI_P3_LINEAR_EXT", ColorSpaceKHR[ColorSpaceKHR.COLOR_SPACE_DISPLAY_NATIVE_AMD = 1000213000] = "COLOR_SPACE_DISPLAY_NATIVE_AMD"; -}(ColorSpaceKHR || (ColorSpaceKHR = {})); -export var DisplayPlaneAlphaFlagBitsKHR; -!function(DisplayPlaneAlphaFlagBitsKHR) { - DisplayPlaneAlphaFlagBitsKHR[DisplayPlaneAlphaFlagBitsKHR.DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 1] = "DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR", DisplayPlaneAlphaFlagBitsKHR[DisplayPlaneAlphaFlagBitsKHR.DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 2] = "DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR", DisplayPlaneAlphaFlagBitsKHR[DisplayPlaneAlphaFlagBitsKHR.DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 4] = "DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR", DisplayPlaneAlphaFlagBitsKHR[DisplayPlaneAlphaFlagBitsKHR.DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 8] = "DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR"; -}(DisplayPlaneAlphaFlagBitsKHR || (DisplayPlaneAlphaFlagBitsKHR = {})); -export var CompositeAlphaFlagBitsKHR; -!function(CompositeAlphaFlagBitsKHR) { - CompositeAlphaFlagBitsKHR[CompositeAlphaFlagBitsKHR.COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 1] = "COMPOSITE_ALPHA_OPAQUE_BIT_KHR", CompositeAlphaFlagBitsKHR[CompositeAlphaFlagBitsKHR.COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 2] = "COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR", CompositeAlphaFlagBitsKHR[CompositeAlphaFlagBitsKHR.COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 4] = "COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR", CompositeAlphaFlagBitsKHR[CompositeAlphaFlagBitsKHR.COMPOSITE_ALPHA_INHERIT_BIT_KHR = 8] = "COMPOSITE_ALPHA_INHERIT_BIT_KHR"; -}(CompositeAlphaFlagBitsKHR || (CompositeAlphaFlagBitsKHR = {})); -export var SurfaceTransformFlagBitsKHR; -!function(SurfaceTransformFlagBitsKHR) { - SurfaceTransformFlagBitsKHR[SurfaceTransformFlagBitsKHR.SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 1] = "SURFACE_TRANSFORM_IDENTITY_BIT_KHR", SurfaceTransformFlagBitsKHR[SurfaceTransformFlagBitsKHR.SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 2] = "SURFACE_TRANSFORM_ROTATE_90_BIT_KHR", SurfaceTransformFlagBitsKHR[SurfaceTransformFlagBitsKHR.SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 4] = "SURFACE_TRANSFORM_ROTATE_180_BIT_KHR", SurfaceTransformFlagBitsKHR[SurfaceTransformFlagBitsKHR.SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 8] = "SURFACE_TRANSFORM_ROTATE_270_BIT_KHR", SurfaceTransformFlagBitsKHR[SurfaceTransformFlagBitsKHR.SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 16] = "SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR", SurfaceTransformFlagBitsKHR[SurfaceTransformFlagBitsKHR.SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 32] = "SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR", SurfaceTransformFlagBitsKHR[SurfaceTransformFlagBitsKHR.SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 64] = "SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR", SurfaceTransformFlagBitsKHR[SurfaceTransformFlagBitsKHR.SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 128] = "SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR", SurfaceTransformFlagBitsKHR[SurfaceTransformFlagBitsKHR.SURFACE_TRANSFORM_INHERIT_BIT_KHR = 256] = "SURFACE_TRANSFORM_INHERIT_BIT_KHR"; -}(SurfaceTransformFlagBitsKHR || (SurfaceTransformFlagBitsKHR = {})); -export var SwapchainImageUsageFlagBitsANDROID; -!function(SwapchainImageUsageFlagBitsANDROID) { - SwapchainImageUsageFlagBitsANDROID[SwapchainImageUsageFlagBitsANDROID.SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_ANDROID = 1] = "SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_ANDROID"; -}(SwapchainImageUsageFlagBitsANDROID || (SwapchainImageUsageFlagBitsANDROID = {})); -export var TimeDomainEXT; -!function(TimeDomainEXT) { - TimeDomainEXT[TimeDomainEXT.TIME_DOMAIN_DEVICE_EXT = 0] = "TIME_DOMAIN_DEVICE_EXT", TimeDomainEXT[TimeDomainEXT.TIME_DOMAIN_CLOCK_MONOTONIC_EXT = 1] = "TIME_DOMAIN_CLOCK_MONOTONIC_EXT", TimeDomainEXT[TimeDomainEXT.TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = 2] = "TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT", TimeDomainEXT[TimeDomainEXT.TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = 3] = "TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT"; -}(TimeDomainEXT || (TimeDomainEXT = {})); -export var DebugReportFlagBitsEXT; -!function(DebugReportFlagBitsEXT) { - DebugReportFlagBitsEXT[DebugReportFlagBitsEXT.DEBUG_REPORT_INFORMATION_BIT_EXT = 1] = "DEBUG_REPORT_INFORMATION_BIT_EXT", DebugReportFlagBitsEXT[DebugReportFlagBitsEXT.DEBUG_REPORT_WARNING_BIT_EXT = 2] = "DEBUG_REPORT_WARNING_BIT_EXT", DebugReportFlagBitsEXT[DebugReportFlagBitsEXT.DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 4] = "DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT", DebugReportFlagBitsEXT[DebugReportFlagBitsEXT.DEBUG_REPORT_ERROR_BIT_EXT = 8] = "DEBUG_REPORT_ERROR_BIT_EXT", DebugReportFlagBitsEXT[DebugReportFlagBitsEXT.DEBUG_REPORT_DEBUG_BIT_EXT = 16] = "DEBUG_REPORT_DEBUG_BIT_EXT"; -}(DebugReportFlagBitsEXT || (DebugReportFlagBitsEXT = {})); -export var DebugReportObjectTypeEXT; -!function(DebugReportObjectTypeEXT) { - DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0] = "DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1] = "DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2] = "DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3] = "DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4] = "DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5] = "DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6] = "DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7] = "DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8] = "DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9] = "DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10] = "DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11] = "DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12] = "DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13] = "DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14] = "DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15] = "DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16] = "DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17] = "DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18] = "DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19] = "DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20] = "DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21] = "DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22] = "DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23] = "DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24] = "DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25] = "DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26] = "DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27] = "DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28] = "DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28] = "DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29] = "DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30] = "DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33] = "DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = 33] = "DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000] = "DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000] = "DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT = 1000029000] = "DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT = 1000029001] = "DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000] = "DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT = 1000150000] = "DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = 1000156000] = "DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = 1000165000] = "DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT", DebugReportObjectTypeEXT[DebugReportObjectTypeEXT.DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT = 1000366000] = "DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT"; -}(DebugReportObjectTypeEXT || (DebugReportObjectTypeEXT = {})); -export var DeviceMemoryReportEventTypeEXT; -!function(DeviceMemoryReportEventTypeEXT) { - DeviceMemoryReportEventTypeEXT[DeviceMemoryReportEventTypeEXT.DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT = 0] = "DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT", DeviceMemoryReportEventTypeEXT[DeviceMemoryReportEventTypeEXT.DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT = 1] = "DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT", DeviceMemoryReportEventTypeEXT[DeviceMemoryReportEventTypeEXT.DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT = 2] = "DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT", DeviceMemoryReportEventTypeEXT[DeviceMemoryReportEventTypeEXT.DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT = 3] = "DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT", DeviceMemoryReportEventTypeEXT[DeviceMemoryReportEventTypeEXT.DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT = 4] = "DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT"; -}(DeviceMemoryReportEventTypeEXT || (DeviceMemoryReportEventTypeEXT = {})); -export var RasterizationOrderAMD; -!function(RasterizationOrderAMD) { - RasterizationOrderAMD[RasterizationOrderAMD.RASTERIZATION_ORDER_STRICT_AMD = 0] = "RASTERIZATION_ORDER_STRICT_AMD", RasterizationOrderAMD[RasterizationOrderAMD.RASTERIZATION_ORDER_RELAXED_AMD = 1] = "RASTERIZATION_ORDER_RELAXED_AMD"; -}(RasterizationOrderAMD || (RasterizationOrderAMD = {})); -export var ExternalMemoryHandleTypeFlagBitsNV; -!function(ExternalMemoryHandleTypeFlagBitsNV) { - ExternalMemoryHandleTypeFlagBitsNV[ExternalMemoryHandleTypeFlagBitsNV.EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 1] = "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV", ExternalMemoryHandleTypeFlagBitsNV[ExternalMemoryHandleTypeFlagBitsNV.EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 2] = "EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV", ExternalMemoryHandleTypeFlagBitsNV[ExternalMemoryHandleTypeFlagBitsNV.EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 4] = "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV", ExternalMemoryHandleTypeFlagBitsNV[ExternalMemoryHandleTypeFlagBitsNV.EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 8] = "EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV"; -}(ExternalMemoryHandleTypeFlagBitsNV || (ExternalMemoryHandleTypeFlagBitsNV = {})); -export var ExternalMemoryFeatureFlagBitsNV; -!function(ExternalMemoryFeatureFlagBitsNV) { - ExternalMemoryFeatureFlagBitsNV[ExternalMemoryFeatureFlagBitsNV.EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 1] = "EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV", ExternalMemoryFeatureFlagBitsNV[ExternalMemoryFeatureFlagBitsNV.EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 2] = "EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV", ExternalMemoryFeatureFlagBitsNV[ExternalMemoryFeatureFlagBitsNV.EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 4] = "EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV"; -}(ExternalMemoryFeatureFlagBitsNV || (ExternalMemoryFeatureFlagBitsNV = {})); -export var ValidationCheckEXT; -!function(ValidationCheckEXT) { - ValidationCheckEXT[ValidationCheckEXT.VALIDATION_CHECK_ALL_EXT = 0] = "VALIDATION_CHECK_ALL_EXT", ValidationCheckEXT[ValidationCheckEXT.VALIDATION_CHECK_SHADERS_EXT = 1] = "VALIDATION_CHECK_SHADERS_EXT"; -}(ValidationCheckEXT || (ValidationCheckEXT = {})); -export var ValidationFeatureEnableEXT; -!function(ValidationFeatureEnableEXT) { - ValidationFeatureEnableEXT[ValidationFeatureEnableEXT.VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = 0] = "VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT", ValidationFeatureEnableEXT[ValidationFeatureEnableEXT.VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = 1] = "VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT", ValidationFeatureEnableEXT[ValidationFeatureEnableEXT.VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT = 2] = "VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT", ValidationFeatureEnableEXT[ValidationFeatureEnableEXT.VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT = 3] = "VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT", ValidationFeatureEnableEXT[ValidationFeatureEnableEXT.VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT = 4] = "VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT"; -}(ValidationFeatureEnableEXT || (ValidationFeatureEnableEXT = {})); -export var ValidationFeatureDisableEXT; -!function(ValidationFeatureDisableEXT) { - ValidationFeatureDisableEXT[ValidationFeatureDisableEXT.VALIDATION_FEATURE_DISABLE_ALL_EXT = 0] = "VALIDATION_FEATURE_DISABLE_ALL_EXT", ValidationFeatureDisableEXT[ValidationFeatureDisableEXT.VALIDATION_FEATURE_DISABLE_SHADERS_EXT = 1] = "VALIDATION_FEATURE_DISABLE_SHADERS_EXT", ValidationFeatureDisableEXT[ValidationFeatureDisableEXT.VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT = 2] = "VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT", ValidationFeatureDisableEXT[ValidationFeatureDisableEXT.VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT = 3] = "VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT", ValidationFeatureDisableEXT[ValidationFeatureDisableEXT.VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT = 4] = "VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT", ValidationFeatureDisableEXT[ValidationFeatureDisableEXT.VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT = 5] = "VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT", ValidationFeatureDisableEXT[ValidationFeatureDisableEXT.VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT = 6] = "VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT", ValidationFeatureDisableEXT[ValidationFeatureDisableEXT.VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT = 7] = "VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT"; -}(ValidationFeatureDisableEXT || (ValidationFeatureDisableEXT = {})); -export var SubgroupFeatureFlagBits; -!function(SubgroupFeatureFlagBits) { - SubgroupFeatureFlagBits[SubgroupFeatureFlagBits.BASIC = 1] = "BASIC", SubgroupFeatureFlagBits[SubgroupFeatureFlagBits.VOTE = 2] = "VOTE", SubgroupFeatureFlagBits[SubgroupFeatureFlagBits.ARITHMETIC = 4] = "ARITHMETIC", SubgroupFeatureFlagBits[SubgroupFeatureFlagBits.BALLOT = 8] = "BALLOT", SubgroupFeatureFlagBits[SubgroupFeatureFlagBits.SHUFFLE = 16] = "SHUFFLE", SubgroupFeatureFlagBits[SubgroupFeatureFlagBits.SHUFFLE_RELATIVE = 32] = "SHUFFLE_RELATIVE", SubgroupFeatureFlagBits[SubgroupFeatureFlagBits.CLUSTERED = 64] = "CLUSTERED", SubgroupFeatureFlagBits[SubgroupFeatureFlagBits.QUAD = 128] = "QUAD", SubgroupFeatureFlagBits[SubgroupFeatureFlagBits.PARTITIONED_BIT_NV = 256] = "PARTITIONED_BIT_NV"; -}(SubgroupFeatureFlagBits || (SubgroupFeatureFlagBits = {})); -export var IndirectCommandsLayoutUsageFlagBitsNV; -!function(IndirectCommandsLayoutUsageFlagBitsNV) { - IndirectCommandsLayoutUsageFlagBitsNV[IndirectCommandsLayoutUsageFlagBitsNV.INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV = 1] = "INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV", IndirectCommandsLayoutUsageFlagBitsNV[IndirectCommandsLayoutUsageFlagBitsNV.INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV = 2] = "INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV", IndirectCommandsLayoutUsageFlagBitsNV[IndirectCommandsLayoutUsageFlagBitsNV.INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV = 4] = "INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV"; -}(IndirectCommandsLayoutUsageFlagBitsNV || (IndirectCommandsLayoutUsageFlagBitsNV = {})); -export var IndirectStateFlagBitsNV; -!function(IndirectStateFlagBitsNV) { - IndirectStateFlagBitsNV[IndirectStateFlagBitsNV.INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV = 1] = "INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV"; -}(IndirectStateFlagBitsNV || (IndirectStateFlagBitsNV = {})); -export var IndirectCommandsTokenTypeNV; -!function(IndirectCommandsTokenTypeNV) { - IndirectCommandsTokenTypeNV[IndirectCommandsTokenTypeNV.INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV = 0] = "INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV", IndirectCommandsTokenTypeNV[IndirectCommandsTokenTypeNV.INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV = 1] = "INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV", IndirectCommandsTokenTypeNV[IndirectCommandsTokenTypeNV.INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV = 2] = "INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV", IndirectCommandsTokenTypeNV[IndirectCommandsTokenTypeNV.INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV = 3] = "INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV", IndirectCommandsTokenTypeNV[IndirectCommandsTokenTypeNV.INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV = 4] = "INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV", IndirectCommandsTokenTypeNV[IndirectCommandsTokenTypeNV.INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV = 5] = "INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV", IndirectCommandsTokenTypeNV[IndirectCommandsTokenTypeNV.INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = 6] = "INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV", IndirectCommandsTokenTypeNV[IndirectCommandsTokenTypeNV.INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = 7] = "INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV", IndirectCommandsTokenTypeNV[IndirectCommandsTokenTypeNV.INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV = 1000328000] = "INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV"; -}(IndirectCommandsTokenTypeNV || (IndirectCommandsTokenTypeNV = {})); -export var PrivateDataSlotCreateFlagBits; -PrivateDataSlotCreateFlagBits || (PrivateDataSlotCreateFlagBits = {}); -export var DescriptorSetLayoutCreateFlagBits; -!function(DescriptorSetLayoutCreateFlagBits) { - DescriptorSetLayoutCreateFlagBits[DescriptorSetLayoutCreateFlagBits.UPDATE_AFTER_BIND_POOL = 2] = "UPDATE_AFTER_BIND_POOL", DescriptorSetLayoutCreateFlagBits[DescriptorSetLayoutCreateFlagBits.PUSH_DESCRIPTOR_BIT_KHR = 1] = "PUSH_DESCRIPTOR_BIT_KHR", DescriptorSetLayoutCreateFlagBits[DescriptorSetLayoutCreateFlagBits.UPDATE_AFTER_BIND_POOL_BIT_EXT = 2] = "UPDATE_AFTER_BIND_POOL_BIT_EXT", DescriptorSetLayoutCreateFlagBits[DescriptorSetLayoutCreateFlagBits.DESCRIPTOR_BUFFER_BIT_EXT = 16] = "DESCRIPTOR_BUFFER_BIT_EXT", DescriptorSetLayoutCreateFlagBits[DescriptorSetLayoutCreateFlagBits.EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT = 32] = "EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT", DescriptorSetLayoutCreateFlagBits[DescriptorSetLayoutCreateFlagBits.RESERVED_3_BIT_AMD = 8] = "RESERVED_3_BIT_AMD", DescriptorSetLayoutCreateFlagBits[DescriptorSetLayoutCreateFlagBits.HOST_ONLY_POOL_BIT_VALVE = 4] = "HOST_ONLY_POOL_BIT_VALVE", DescriptorSetLayoutCreateFlagBits[DescriptorSetLayoutCreateFlagBits.HOST_ONLY_POOL_BIT_EXT = 4] = "HOST_ONLY_POOL_BIT_EXT"; -}(DescriptorSetLayoutCreateFlagBits || (DescriptorSetLayoutCreateFlagBits = {})); -export var ExternalMemoryHandleTypeFlagBits; -!function(ExternalMemoryHandleTypeFlagBits) { - ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.OPAQUE_FD = 1] = "OPAQUE_FD", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.OPAQUE_WIN32 = 2] = "OPAQUE_WIN32", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.OPAQUE_WIN32_KMT = 4] = "OPAQUE_WIN32_KMT", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.D3D11_TEXTURE = 8] = "D3D11_TEXTURE", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.D3D11_TEXTURE_KMT = 16] = "D3D11_TEXTURE_KMT", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.D3D12_HEAP = 32] = "D3D12_HEAP", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.D3D12_RESOURCE = 64] = "D3D12_RESOURCE", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.OPAQUE_FD_BIT_KHR = 1] = "OPAQUE_FD_BIT_KHR", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.OPAQUE_WIN32_BIT_KHR = 2] = "OPAQUE_WIN32_BIT_KHR", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.OPAQUE_WIN32_KMT_BIT_KHR = 4] = "OPAQUE_WIN32_KMT_BIT_KHR", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.D3D11_TEXTURE_BIT_KHR = 8] = "D3D11_TEXTURE_BIT_KHR", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.D3D11_TEXTURE_KMT_BIT_KHR = 16] = "D3D11_TEXTURE_KMT_BIT_KHR", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.D3D12_HEAP_BIT_KHR = 32] = "D3D12_HEAP_BIT_KHR", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.D3D12_RESOURCE_BIT_KHR = 64] = "D3D12_RESOURCE_BIT_KHR", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.DMA_BUF_BIT_EXT = 512] = "DMA_BUF_BIT_EXT", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.ANDROID_HARDWARE_BUFFER_BIT_ANDROID = 1024] = "ANDROID_HARDWARE_BUFFER_BIT_ANDROID", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.HOST_ALLOCATION_BIT_EXT = 128] = "HOST_ALLOCATION_BIT_EXT", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 256] = "HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.ZIRCON_VMO_BIT_FUCHSIA = 2048] = "ZIRCON_VMO_BIT_FUCHSIA", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.RDMA_ADDRESS_BIT_NV = 4096] = "RDMA_ADDRESS_BIT_NV", ExternalMemoryHandleTypeFlagBits[ExternalMemoryHandleTypeFlagBits.RESERVED_13_BIT_NV = 8192] = "RESERVED_13_BIT_NV"; -}(ExternalMemoryHandleTypeFlagBits || (ExternalMemoryHandleTypeFlagBits = {})); -export var ExternalMemoryFeatureFlagBits; -!function(ExternalMemoryFeatureFlagBits) { - ExternalMemoryFeatureFlagBits[ExternalMemoryFeatureFlagBits.DEDICATED_ONLY = 1] = "DEDICATED_ONLY", ExternalMemoryFeatureFlagBits[ExternalMemoryFeatureFlagBits.EXPORTABLE = 2] = "EXPORTABLE", ExternalMemoryFeatureFlagBits[ExternalMemoryFeatureFlagBits.IMPORTABLE = 4] = "IMPORTABLE", ExternalMemoryFeatureFlagBits[ExternalMemoryFeatureFlagBits.DEDICATED_ONLY_BIT_KHR = 1] = "DEDICATED_ONLY_BIT_KHR", ExternalMemoryFeatureFlagBits[ExternalMemoryFeatureFlagBits.EXPORTABLE_BIT_KHR = 2] = "EXPORTABLE_BIT_KHR", ExternalMemoryFeatureFlagBits[ExternalMemoryFeatureFlagBits.IMPORTABLE_BIT_KHR = 4] = "IMPORTABLE_BIT_KHR"; -}(ExternalMemoryFeatureFlagBits || (ExternalMemoryFeatureFlagBits = {})); -export var ExternalSemaphoreHandleTypeFlagBits; -!function(ExternalSemaphoreHandleTypeFlagBits) { - ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.OPAQUE_FD = 1] = "OPAQUE_FD", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.OPAQUE_WIN32 = 2] = "OPAQUE_WIN32", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.OPAQUE_WIN32_KMT = 4] = "OPAQUE_WIN32_KMT", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.D3D12_FENCE = 8] = "D3D12_FENCE", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.D3D11_FENCE = 8] = "D3D11_FENCE", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.SYNC_FD = 16] = "SYNC_FD", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.OPAQUE_FD_BIT_KHR = 1] = "OPAQUE_FD_BIT_KHR", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.OPAQUE_WIN32_BIT_KHR = 2] = "OPAQUE_WIN32_BIT_KHR", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.OPAQUE_WIN32_KMT_BIT_KHR = 4] = "OPAQUE_WIN32_KMT_BIT_KHR", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.D3D12_FENCE_BIT_KHR = 8] = "D3D12_FENCE_BIT_KHR", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.SYNC_FD_BIT_KHR = 16] = "SYNC_FD_BIT_KHR", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.ZIRCON_EVENT_BIT_FUCHSIA = 128] = "ZIRCON_EVENT_BIT_FUCHSIA", ExternalSemaphoreHandleTypeFlagBits[ExternalSemaphoreHandleTypeFlagBits.RESERVED_5_BIT_NV = 32] = "RESERVED_5_BIT_NV"; -}(ExternalSemaphoreHandleTypeFlagBits || (ExternalSemaphoreHandleTypeFlagBits = {})); -export var ExternalSemaphoreFeatureFlagBits; -!function(ExternalSemaphoreFeatureFlagBits) { - ExternalSemaphoreFeatureFlagBits[ExternalSemaphoreFeatureFlagBits.EXPORTABLE = 1] = "EXPORTABLE", ExternalSemaphoreFeatureFlagBits[ExternalSemaphoreFeatureFlagBits.IMPORTABLE = 2] = "IMPORTABLE", ExternalSemaphoreFeatureFlagBits[ExternalSemaphoreFeatureFlagBits.EXPORTABLE_BIT_KHR = 1] = "EXPORTABLE_BIT_KHR", ExternalSemaphoreFeatureFlagBits[ExternalSemaphoreFeatureFlagBits.IMPORTABLE_BIT_KHR = 2] = "IMPORTABLE_BIT_KHR"; -}(ExternalSemaphoreFeatureFlagBits || (ExternalSemaphoreFeatureFlagBits = {})); -export var SemaphoreImportFlagBits; -!function(SemaphoreImportFlagBits) { - SemaphoreImportFlagBits[SemaphoreImportFlagBits.TEMPORARY = 1] = "TEMPORARY", SemaphoreImportFlagBits[SemaphoreImportFlagBits.TEMPORARY_BIT_KHR = 1] = "TEMPORARY_BIT_KHR"; -}(SemaphoreImportFlagBits || (SemaphoreImportFlagBits = {})); -export var ExternalFenceHandleTypeFlagBits; -!function(ExternalFenceHandleTypeFlagBits) { - ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.OPAQUE_FD = 1] = "OPAQUE_FD", ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.OPAQUE_WIN32 = 2] = "OPAQUE_WIN32", ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.OPAQUE_WIN32_KMT = 4] = "OPAQUE_WIN32_KMT", ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.SYNC_FD = 8] = "SYNC_FD", ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.OPAQUE_FD_BIT_KHR = 1] = "OPAQUE_FD_BIT_KHR", ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.OPAQUE_WIN32_BIT_KHR = 2] = "OPAQUE_WIN32_BIT_KHR", ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.OPAQUE_WIN32_KMT_BIT_KHR = 4] = "OPAQUE_WIN32_KMT_BIT_KHR", ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.SYNC_FD_BIT_KHR = 8] = "SYNC_FD_BIT_KHR", ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.RESERVED_4_BIT_NV = 16] = "RESERVED_4_BIT_NV", ExternalFenceHandleTypeFlagBits[ExternalFenceHandleTypeFlagBits.RESERVED_5_BIT_NV = 32] = "RESERVED_5_BIT_NV"; -}(ExternalFenceHandleTypeFlagBits || (ExternalFenceHandleTypeFlagBits = {})); -export var ExternalFenceFeatureFlagBits; -!function(ExternalFenceFeatureFlagBits) { - ExternalFenceFeatureFlagBits[ExternalFenceFeatureFlagBits.EXPORTABLE = 1] = "EXPORTABLE", ExternalFenceFeatureFlagBits[ExternalFenceFeatureFlagBits.IMPORTABLE = 2] = "IMPORTABLE", ExternalFenceFeatureFlagBits[ExternalFenceFeatureFlagBits.EXPORTABLE_BIT_KHR = 1] = "EXPORTABLE_BIT_KHR", ExternalFenceFeatureFlagBits[ExternalFenceFeatureFlagBits.IMPORTABLE_BIT_KHR = 2] = "IMPORTABLE_BIT_KHR"; -}(ExternalFenceFeatureFlagBits || (ExternalFenceFeatureFlagBits = {})); -export var FenceImportFlagBits; -!function(FenceImportFlagBits) { - FenceImportFlagBits[FenceImportFlagBits.TEMPORARY = 1] = "TEMPORARY", FenceImportFlagBits[FenceImportFlagBits.TEMPORARY_BIT_KHR = 1] = "TEMPORARY_BIT_KHR"; -}(FenceImportFlagBits || (FenceImportFlagBits = {})); -export var SurfaceCounterFlagBitsEXT; -!function(SurfaceCounterFlagBitsEXT) { - SurfaceCounterFlagBitsEXT[SurfaceCounterFlagBitsEXT.SURFACE_COUNTER_VBLANK_BIT_EXT = 1] = "SURFACE_COUNTER_VBLANK_BIT_EXT", SurfaceCounterFlagBitsEXT[SurfaceCounterFlagBitsEXT.SURFACE_COUNTER_VBLANK_EXT = 1] = "SURFACE_COUNTER_VBLANK_EXT"; -}(SurfaceCounterFlagBitsEXT || (SurfaceCounterFlagBitsEXT = {})); -export var DisplayPowerStateEXT; -!function(DisplayPowerStateEXT) { - DisplayPowerStateEXT[DisplayPowerStateEXT.DISPLAY_POWER_STATE_OFF_EXT = 0] = "DISPLAY_POWER_STATE_OFF_EXT", DisplayPowerStateEXT[DisplayPowerStateEXT.DISPLAY_POWER_STATE_SUSPEND_EXT = 1] = "DISPLAY_POWER_STATE_SUSPEND_EXT", DisplayPowerStateEXT[DisplayPowerStateEXT.DISPLAY_POWER_STATE_ON_EXT = 2] = "DISPLAY_POWER_STATE_ON_EXT"; -}(DisplayPowerStateEXT || (DisplayPowerStateEXT = {})); -export var DeviceEventTypeEXT; -!function(DeviceEventTypeEXT) { - DeviceEventTypeEXT[DeviceEventTypeEXT.DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0] = "DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT"; -}(DeviceEventTypeEXT || (DeviceEventTypeEXT = {})); -export var DisplayEventTypeEXT; -!function(DisplayEventTypeEXT) { - DisplayEventTypeEXT[DisplayEventTypeEXT.DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0] = "DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT"; -}(DisplayEventTypeEXT || (DisplayEventTypeEXT = {})); -export var PeerMemoryFeatureFlagBits; -!function(PeerMemoryFeatureFlagBits) { - PeerMemoryFeatureFlagBits[PeerMemoryFeatureFlagBits.COPY_SRC = 1] = "COPY_SRC", PeerMemoryFeatureFlagBits[PeerMemoryFeatureFlagBits.COPY_DST = 2] = "COPY_DST", PeerMemoryFeatureFlagBits[PeerMemoryFeatureFlagBits.GENERIC_SRC = 4] = "GENERIC_SRC", PeerMemoryFeatureFlagBits[PeerMemoryFeatureFlagBits.GENERIC_DST = 8] = "GENERIC_DST", PeerMemoryFeatureFlagBits[PeerMemoryFeatureFlagBits.COPY_SRC_BIT_KHR = 1] = "COPY_SRC_BIT_KHR", PeerMemoryFeatureFlagBits[PeerMemoryFeatureFlagBits.COPY_DST_BIT_KHR = 2] = "COPY_DST_BIT_KHR", PeerMemoryFeatureFlagBits[PeerMemoryFeatureFlagBits.GENERIC_SRC_BIT_KHR = 4] = "GENERIC_SRC_BIT_KHR", PeerMemoryFeatureFlagBits[PeerMemoryFeatureFlagBits.GENERIC_DST_BIT_KHR = 8] = "GENERIC_DST_BIT_KHR"; -}(PeerMemoryFeatureFlagBits || (PeerMemoryFeatureFlagBits = {})); -export var MemoryAllocateFlagBits; -!function(MemoryAllocateFlagBits) { - MemoryAllocateFlagBits[MemoryAllocateFlagBits.DEVICE_MASK = 1] = "DEVICE_MASK", MemoryAllocateFlagBits[MemoryAllocateFlagBits.DEVICE_ADDRESS = 2] = "DEVICE_ADDRESS", MemoryAllocateFlagBits[MemoryAllocateFlagBits.DEVICE_ADDRESS_CAPTURE_REPLAY = 4] = "DEVICE_ADDRESS_CAPTURE_REPLAY", MemoryAllocateFlagBits[MemoryAllocateFlagBits.DEVICE_MASK_BIT_KHR = 1] = "DEVICE_MASK_BIT_KHR", MemoryAllocateFlagBits[MemoryAllocateFlagBits.DEVICE_ADDRESS_BIT_KHR = 2] = "DEVICE_ADDRESS_BIT_KHR", MemoryAllocateFlagBits[MemoryAllocateFlagBits.DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 4] = "DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR"; -}(MemoryAllocateFlagBits || (MemoryAllocateFlagBits = {})); -export var DeviceGroupPresentModeFlagBitsKHR; -!function(DeviceGroupPresentModeFlagBitsKHR) { - DeviceGroupPresentModeFlagBitsKHR[DeviceGroupPresentModeFlagBitsKHR.DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 1] = "DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR", DeviceGroupPresentModeFlagBitsKHR[DeviceGroupPresentModeFlagBitsKHR.DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 2] = "DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR", DeviceGroupPresentModeFlagBitsKHR[DeviceGroupPresentModeFlagBitsKHR.DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 4] = "DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR", DeviceGroupPresentModeFlagBitsKHR[DeviceGroupPresentModeFlagBitsKHR.DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 8] = "DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR"; -}(DeviceGroupPresentModeFlagBitsKHR || (DeviceGroupPresentModeFlagBitsKHR = {})); -export var SwapchainCreateFlagBitsKHR; -!function(SwapchainCreateFlagBitsKHR) { - SwapchainCreateFlagBitsKHR[SwapchainCreateFlagBitsKHR.SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 1] = "SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR", SwapchainCreateFlagBitsKHR[SwapchainCreateFlagBitsKHR.SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 2] = "SWAPCHAIN_CREATE_PROTECTED_BIT_KHR", SwapchainCreateFlagBitsKHR[SwapchainCreateFlagBitsKHR.SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR = 4] = "SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR", SwapchainCreateFlagBitsKHR[SwapchainCreateFlagBitsKHR.SWAPCHAIN_CREATE_RESERVED_4_BIT_EXT = 16] = "SWAPCHAIN_CREATE_RESERVED_4_BIT_EXT", SwapchainCreateFlagBitsKHR[SwapchainCreateFlagBitsKHR.SWAPCHAIN_CREATE_RESERVED_3_BIT_SEC = 8] = "SWAPCHAIN_CREATE_RESERVED_3_BIT_SEC"; -}(SwapchainCreateFlagBitsKHR || (SwapchainCreateFlagBitsKHR = {})); -export var ViewportCoordinateSwizzleNV; -!function(ViewportCoordinateSwizzleNV) { - ViewportCoordinateSwizzleNV[ViewportCoordinateSwizzleNV.VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0] = "VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV", ViewportCoordinateSwizzleNV[ViewportCoordinateSwizzleNV.VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1] = "VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV", ViewportCoordinateSwizzleNV[ViewportCoordinateSwizzleNV.VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2] = "VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV", ViewportCoordinateSwizzleNV[ViewportCoordinateSwizzleNV.VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3] = "VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV", ViewportCoordinateSwizzleNV[ViewportCoordinateSwizzleNV.VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4] = "VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV", ViewportCoordinateSwizzleNV[ViewportCoordinateSwizzleNV.VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5] = "VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV", ViewportCoordinateSwizzleNV[ViewportCoordinateSwizzleNV.VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6] = "VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV", ViewportCoordinateSwizzleNV[ViewportCoordinateSwizzleNV.VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7] = "VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV"; -}(ViewportCoordinateSwizzleNV || (ViewportCoordinateSwizzleNV = {})); -export var DiscardRectangleModeEXT; -!function(DiscardRectangleModeEXT) { - DiscardRectangleModeEXT[DiscardRectangleModeEXT.DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0] = "DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT", DiscardRectangleModeEXT[DiscardRectangleModeEXT.DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1] = "DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT"; -}(DiscardRectangleModeEXT || (DiscardRectangleModeEXT = {})); -export var SubpassDescriptionFlagBits; -!function(SubpassDescriptionFlagBits) { - SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.PER_VIEW_ATTRIBUTES_BIT_NVX = 1] = "PER_VIEW_ATTRIBUTES_BIT_NVX", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.PER_VIEW_POSITION_X_ONLY_BIT_NVX = 2] = "PER_VIEW_POSITION_X_ONLY_BIT_NVX", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.FRAGMENT_REGION_BIT_QCOM = 4] = "FRAGMENT_REGION_BIT_QCOM", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.SHADER_RESOLVE_BIT_QCOM = 8] = "SHADER_RESOLVE_BIT_QCOM", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM = 16] = "RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = 32] = "RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = 64] = "RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT = 16] = "RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 32] = "RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 64] = "RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT", SubpassDescriptionFlagBits[SubpassDescriptionFlagBits.ENABLE_LEGACY_DITHERING_BIT_EXT = 128] = "ENABLE_LEGACY_DITHERING_BIT_EXT"; -}(SubpassDescriptionFlagBits || (SubpassDescriptionFlagBits = {})); -export var PointClippingBehavior; -!function(PointClippingBehavior) { - PointClippingBehavior[PointClippingBehavior.ALL_CLIP_PLANES = 0] = "ALL_CLIP_PLANES", PointClippingBehavior[PointClippingBehavior.USER_CLIP_PLANES_ONLY = 1] = "USER_CLIP_PLANES_ONLY", PointClippingBehavior[PointClippingBehavior.ALL_CLIP_PLANES_KHR = 0] = "ALL_CLIP_PLANES_KHR", PointClippingBehavior[PointClippingBehavior.USER_CLIP_PLANES_ONLY_KHR = 1] = "USER_CLIP_PLANES_ONLY_KHR"; -}(PointClippingBehavior || (PointClippingBehavior = {})); -export var SamplerReductionMode; -!function(SamplerReductionMode) { - SamplerReductionMode[SamplerReductionMode.WEIGHTED_AVERAGE = 0] = "WEIGHTED_AVERAGE", SamplerReductionMode[SamplerReductionMode.MIN = 1] = "MIN", SamplerReductionMode[SamplerReductionMode.MAX = 2] = "MAX", SamplerReductionMode[SamplerReductionMode.WEIGHTED_AVERAGE_EXT = 0] = "WEIGHTED_AVERAGE_EXT", SamplerReductionMode[SamplerReductionMode.MIN_EXT = 1] = "MIN_EXT", SamplerReductionMode[SamplerReductionMode.MAX_EXT = 2] = "MAX_EXT"; -}(SamplerReductionMode || (SamplerReductionMode = {})); -export var TessellationDomainOrigin; -!function(TessellationDomainOrigin) { - TessellationDomainOrigin[TessellationDomainOrigin.UPPER_LEFT = 0] = "UPPER_LEFT", TessellationDomainOrigin[TessellationDomainOrigin.LOWER_LEFT = 1] = "LOWER_LEFT", TessellationDomainOrigin[TessellationDomainOrigin.UPPER_LEFT_KHR = 0] = "UPPER_LEFT_KHR", TessellationDomainOrigin[TessellationDomainOrigin.LOWER_LEFT_KHR = 1] = "LOWER_LEFT_KHR"; -}(TessellationDomainOrigin || (TessellationDomainOrigin = {})); -export var SamplerYcbcrModelConversion; -!function(SamplerYcbcrModelConversion) { - SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.RGB_IDENTITY = 0] = "RGB_IDENTITY", SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.YCBCR_IDENTITY = 1] = "YCBCR_IDENTITY", SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.YCBCR_709 = 2] = "YCBCR_709", SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.YCBCR_601 = 3] = "YCBCR_601", SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.YCBCR_2020 = 4] = "YCBCR_2020", SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.RGB_IDENTITY_KHR = 0] = "RGB_IDENTITY_KHR", SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.YCBCR_IDENTITY_KHR = 1] = "YCBCR_IDENTITY_KHR", SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.YCBCR_709_KHR = 2] = "YCBCR_709_KHR", SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.YCBCR_601_KHR = 3] = "YCBCR_601_KHR", SamplerYcbcrModelConversion[SamplerYcbcrModelConversion.YCBCR_2020_KHR = 4] = "YCBCR_2020_KHR"; -}(SamplerYcbcrModelConversion || (SamplerYcbcrModelConversion = {})); -export var SamplerYcbcrRange; -!function(SamplerYcbcrRange) { - SamplerYcbcrRange[SamplerYcbcrRange.ITU_FULL = 0] = "ITU_FULL", SamplerYcbcrRange[SamplerYcbcrRange.ITU_NARROW = 1] = "ITU_NARROW", SamplerYcbcrRange[SamplerYcbcrRange.ITU_FULL_KHR = 0] = "ITU_FULL_KHR", SamplerYcbcrRange[SamplerYcbcrRange.ITU_NARROW_KHR = 1] = "ITU_NARROW_KHR"; -}(SamplerYcbcrRange || (SamplerYcbcrRange = {})); -export var ChromaLocation; -!function(ChromaLocation) { - ChromaLocation[ChromaLocation.COSITED_EVEN = 0] = "COSITED_EVEN", ChromaLocation[ChromaLocation.MIDPOINT = 1] = "MIDPOINT", ChromaLocation[ChromaLocation.COSITED_EVEN_KHR = 0] = "COSITED_EVEN_KHR", ChromaLocation[ChromaLocation.MIDPOINT_KHR = 1] = "MIDPOINT_KHR"; -}(ChromaLocation || (ChromaLocation = {})); -export var BlendOverlapEXT; -!function(BlendOverlapEXT) { - BlendOverlapEXT[BlendOverlapEXT.BLEND_OVERLAP_UNCORRELATED_EXT = 0] = "BLEND_OVERLAP_UNCORRELATED_EXT", BlendOverlapEXT[BlendOverlapEXT.BLEND_OVERLAP_DISJOINT_EXT = 1] = "BLEND_OVERLAP_DISJOINT_EXT", BlendOverlapEXT[BlendOverlapEXT.BLEND_OVERLAP_CONJOINT_EXT = 2] = "BLEND_OVERLAP_CONJOINT_EXT"; -}(BlendOverlapEXT || (BlendOverlapEXT = {})); -export var CoverageModulationModeNV; -!function(CoverageModulationModeNV) { - CoverageModulationModeNV[CoverageModulationModeNV.COVERAGE_MODULATION_MODE_NONE_NV = 0] = "COVERAGE_MODULATION_MODE_NONE_NV", CoverageModulationModeNV[CoverageModulationModeNV.COVERAGE_MODULATION_MODE_RGB_NV = 1] = "COVERAGE_MODULATION_MODE_RGB_NV", CoverageModulationModeNV[CoverageModulationModeNV.COVERAGE_MODULATION_MODE_ALPHA_NV = 2] = "COVERAGE_MODULATION_MODE_ALPHA_NV", CoverageModulationModeNV[CoverageModulationModeNV.COVERAGE_MODULATION_MODE_RGBA_NV = 3] = "COVERAGE_MODULATION_MODE_RGBA_NV"; -}(CoverageModulationModeNV || (CoverageModulationModeNV = {})); -export var CoverageReductionModeNV; -!function(CoverageReductionModeNV) { - CoverageReductionModeNV[CoverageReductionModeNV.COVERAGE_REDUCTION_MODE_MERGE_NV = 0] = "COVERAGE_REDUCTION_MODE_MERGE_NV", CoverageReductionModeNV[CoverageReductionModeNV.COVERAGE_REDUCTION_MODE_TRUNCATE_NV = 1] = "COVERAGE_REDUCTION_MODE_TRUNCATE_NV"; -}(CoverageReductionModeNV || (CoverageReductionModeNV = {})); -export var ValidationCacheHeaderVersionEXT; -!function(ValidationCacheHeaderVersionEXT) { - ValidationCacheHeaderVersionEXT[ValidationCacheHeaderVersionEXT.VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1] = "VALIDATION_CACHE_HEADER_VERSION_ONE_EXT"; -}(ValidationCacheHeaderVersionEXT || (ValidationCacheHeaderVersionEXT = {})); -export var ShaderInfoTypeAMD; -!function(ShaderInfoTypeAMD) { - ShaderInfoTypeAMD[ShaderInfoTypeAMD.SHADER_INFO_TYPE_STATISTICS_AMD = 0] = "SHADER_INFO_TYPE_STATISTICS_AMD", ShaderInfoTypeAMD[ShaderInfoTypeAMD.SHADER_INFO_TYPE_BINARY_AMD = 1] = "SHADER_INFO_TYPE_BINARY_AMD", ShaderInfoTypeAMD[ShaderInfoTypeAMD.SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2] = "SHADER_INFO_TYPE_DISASSEMBLY_AMD"; -}(ShaderInfoTypeAMD || (ShaderInfoTypeAMD = {})); -export var QueueGlobalPriorityKHR; -!function(QueueGlobalPriorityKHR) { - QueueGlobalPriorityKHR[QueueGlobalPriorityKHR.QUEUE_GLOBAL_PRIORITY_LOW_KHR = 128] = "QUEUE_GLOBAL_PRIORITY_LOW_KHR", QueueGlobalPriorityKHR[QueueGlobalPriorityKHR.QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = 256] = "QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR", QueueGlobalPriorityKHR[QueueGlobalPriorityKHR.QUEUE_GLOBAL_PRIORITY_HIGH_KHR = 512] = "QUEUE_GLOBAL_PRIORITY_HIGH_KHR", QueueGlobalPriorityKHR[QueueGlobalPriorityKHR.QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = 1024] = "QUEUE_GLOBAL_PRIORITY_REALTIME_KHR", QueueGlobalPriorityKHR[QueueGlobalPriorityKHR.QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128] = "QUEUE_GLOBAL_PRIORITY_LOW_EXT", QueueGlobalPriorityKHR[QueueGlobalPriorityKHR.QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256] = "QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT", QueueGlobalPriorityKHR[QueueGlobalPriorityKHR.QUEUE_GLOBAL_PRIORITY_HIGH_EXT = 512] = "QUEUE_GLOBAL_PRIORITY_HIGH_EXT", QueueGlobalPriorityKHR[QueueGlobalPriorityKHR.QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = 1024] = "QUEUE_GLOBAL_PRIORITY_REALTIME_EXT"; -}(QueueGlobalPriorityKHR || (QueueGlobalPriorityKHR = {})); -export var DebugUtilsMessageSeverityFlagBitsEXT; -!function(DebugUtilsMessageSeverityFlagBitsEXT) { - DebugUtilsMessageSeverityFlagBitsEXT[DebugUtilsMessageSeverityFlagBitsEXT.DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 1] = "DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT", DebugUtilsMessageSeverityFlagBitsEXT[DebugUtilsMessageSeverityFlagBitsEXT.DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 16] = "DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT", DebugUtilsMessageSeverityFlagBitsEXT[DebugUtilsMessageSeverityFlagBitsEXT.DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 256] = "DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT", DebugUtilsMessageSeverityFlagBitsEXT[DebugUtilsMessageSeverityFlagBitsEXT.DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 4096] = "DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT"; -}(DebugUtilsMessageSeverityFlagBitsEXT || (DebugUtilsMessageSeverityFlagBitsEXT = {})); -export var DebugUtilsMessageTypeFlagBitsEXT; -!function(DebugUtilsMessageTypeFlagBitsEXT) { - DebugUtilsMessageTypeFlagBitsEXT[DebugUtilsMessageTypeFlagBitsEXT.DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 1] = "DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT", DebugUtilsMessageTypeFlagBitsEXT[DebugUtilsMessageTypeFlagBitsEXT.DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 2] = "DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT", DebugUtilsMessageTypeFlagBitsEXT[DebugUtilsMessageTypeFlagBitsEXT.DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 4] = "DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT", DebugUtilsMessageTypeFlagBitsEXT[DebugUtilsMessageTypeFlagBitsEXT.DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT = 8] = "DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT"; -}(DebugUtilsMessageTypeFlagBitsEXT || (DebugUtilsMessageTypeFlagBitsEXT = {})); -export var ConservativeRasterizationModeEXT; -!function(ConservativeRasterizationModeEXT) { - ConservativeRasterizationModeEXT[ConservativeRasterizationModeEXT.CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0] = "CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT", ConservativeRasterizationModeEXT[ConservativeRasterizationModeEXT.CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1] = "CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT", ConservativeRasterizationModeEXT[ConservativeRasterizationModeEXT.CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2] = "CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT"; -}(ConservativeRasterizationModeEXT || (ConservativeRasterizationModeEXT = {})); -export var DescriptorBindingFlagBits; -!function(DescriptorBindingFlagBits) { - DescriptorBindingFlagBits[DescriptorBindingFlagBits.UPDATE_AFTER_BIND = 1] = "UPDATE_AFTER_BIND", DescriptorBindingFlagBits[DescriptorBindingFlagBits.UPDATE_UNUSED_WHILE_PENDING = 2] = "UPDATE_UNUSED_WHILE_PENDING", DescriptorBindingFlagBits[DescriptorBindingFlagBits.PARTIALLY_BOUND = 4] = "PARTIALLY_BOUND", DescriptorBindingFlagBits[DescriptorBindingFlagBits.VARIABLE_DESCRIPTOR_COUNT = 8] = "VARIABLE_DESCRIPTOR_COUNT", DescriptorBindingFlagBits[DescriptorBindingFlagBits.UPDATE_AFTER_BIND_BIT_EXT = 1] = "UPDATE_AFTER_BIND_BIT_EXT", DescriptorBindingFlagBits[DescriptorBindingFlagBits.UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = 2] = "UPDATE_UNUSED_WHILE_PENDING_BIT_EXT", DescriptorBindingFlagBits[DescriptorBindingFlagBits.PARTIALLY_BOUND_BIT_EXT = 4] = "PARTIALLY_BOUND_BIT_EXT", DescriptorBindingFlagBits[DescriptorBindingFlagBits.VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = 8] = "VARIABLE_DESCRIPTOR_COUNT_BIT_EXT", DescriptorBindingFlagBits[DescriptorBindingFlagBits.RESERVED_4_BIT_QCOM = 16] = "RESERVED_4_BIT_QCOM"; -}(DescriptorBindingFlagBits || (DescriptorBindingFlagBits = {})); -export var VendorId; -!function(VendorId) { - VendorId[VendorId.VIV = 65537] = "VIV", VendorId[VendorId.VSI = 65538] = "VSI", VendorId[VendorId.KAZAN = 65539] = "KAZAN", VendorId[VendorId.CODEPLAY = 65540] = "CODEPLAY", VendorId[VendorId.MESA = 65541] = "MESA", VendorId[VendorId.POCL = 65542] = "POCL"; -}(VendorId || (VendorId = {})); -export var DriverId; -!function(DriverId) { - DriverId[DriverId.AMD_PROPRIETARY = 1] = "AMD_PROPRIETARY", DriverId[DriverId.AMD_OPEN_SOURCE = 2] = "AMD_OPEN_SOURCE", DriverId[DriverId.MESA_RADV = 3] = "MESA_RADV", DriverId[DriverId.NVIDIA_PROPRIETARY = 4] = "NVIDIA_PROPRIETARY", DriverId[DriverId.INTEL_PROPRIETARY_WINDOWS = 5] = "INTEL_PROPRIETARY_WINDOWS", DriverId[DriverId.INTEL_OPEN_SOURCE_MESA = 6] = "INTEL_OPEN_SOURCE_MESA", DriverId[DriverId.IMAGINATION_PROPRIETARY = 7] = "IMAGINATION_PROPRIETARY", DriverId[DriverId.QUALCOMM_PROPRIETARY = 8] = "QUALCOMM_PROPRIETARY", DriverId[DriverId.ARM_PROPRIETARY = 9] = "ARM_PROPRIETARY", DriverId[DriverId.GOOGLE_SWIFTSHADER = 10] = "GOOGLE_SWIFTSHADER", DriverId[DriverId.GGP_PROPRIETARY = 11] = "GGP_PROPRIETARY", DriverId[DriverId.BROADCOM_PROPRIETARY = 12] = "BROADCOM_PROPRIETARY", DriverId[DriverId.MESA_LLVMPIPE = 13] = "MESA_LLVMPIPE", DriverId[DriverId.MOLTENVK = 14] = "MOLTENVK", DriverId[DriverId.COREAVI_PROPRIETARY = 15] = "COREAVI_PROPRIETARY", DriverId[DriverId.JUICE_PROPRIETARY = 16] = "JUICE_PROPRIETARY", DriverId[DriverId.VERISILICON_PROPRIETARY = 17] = "VERISILICON_PROPRIETARY", DriverId[DriverId.MESA_TURNIP = 18] = "MESA_TURNIP", DriverId[DriverId.MESA_V3DV = 19] = "MESA_V3DV", DriverId[DriverId.MESA_PANVK = 20] = "MESA_PANVK", DriverId[DriverId.SAMSUNG_PROPRIETARY = 21] = "SAMSUNG_PROPRIETARY", DriverId[DriverId.MESA_VENUS = 22] = "MESA_VENUS", DriverId[DriverId.MESA_DOZEN = 23] = "MESA_DOZEN", DriverId[DriverId.MESA_NVK = 24] = "MESA_NVK", DriverId[DriverId.AMD_PROPRIETARY_KHR = 1] = "AMD_PROPRIETARY_KHR", DriverId[DriverId.AMD_OPEN_SOURCE_KHR = 2] = "AMD_OPEN_SOURCE_KHR", DriverId[DriverId.MESA_RADV_KHR = 3] = "MESA_RADV_KHR", DriverId[DriverId.NVIDIA_PROPRIETARY_KHR = 4] = "NVIDIA_PROPRIETARY_KHR", DriverId[DriverId.INTEL_PROPRIETARY_WINDOWS_KHR = 5] = "INTEL_PROPRIETARY_WINDOWS_KHR", DriverId[DriverId.INTEL_OPEN_SOURCE_MESA_KHR = 6] = "INTEL_OPEN_SOURCE_MESA_KHR", DriverId[DriverId.IMAGINATION_PROPRIETARY_KHR = 7] = "IMAGINATION_PROPRIETARY_KHR", DriverId[DriverId.QUALCOMM_PROPRIETARY_KHR = 8] = "QUALCOMM_PROPRIETARY_KHR", DriverId[DriverId.ARM_PROPRIETARY_KHR = 9] = "ARM_PROPRIETARY_KHR", DriverId[DriverId.GOOGLE_SWIFTSHADER_KHR = 10] = "GOOGLE_SWIFTSHADER_KHR", DriverId[DriverId.GGP_PROPRIETARY_KHR = 11] = "GGP_PROPRIETARY_KHR", DriverId[DriverId.BROADCOM_PROPRIETARY_KHR = 12] = "BROADCOM_PROPRIETARY_KHR"; -}(DriverId || (DriverId = {})); -export var ConditionalRenderingFlagBitsEXT; -!function(ConditionalRenderingFlagBitsEXT) { - ConditionalRenderingFlagBitsEXT[ConditionalRenderingFlagBitsEXT.CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 1] = "CONDITIONAL_RENDERING_INVERTED_BIT_EXT"; -}(ConditionalRenderingFlagBitsEXT || (ConditionalRenderingFlagBitsEXT = {})); -export var ResolveModeFlagBits; -!function(ResolveModeFlagBits) { - ResolveModeFlagBits[ResolveModeFlagBits.NONE = 0] = "NONE", ResolveModeFlagBits[ResolveModeFlagBits.SAMPLE_ZERO = 1] = "SAMPLE_ZERO", ResolveModeFlagBits[ResolveModeFlagBits.AVERAGE = 2] = "AVERAGE", ResolveModeFlagBits[ResolveModeFlagBits.MIN = 4] = "MIN", ResolveModeFlagBits[ResolveModeFlagBits.MAX = 8] = "MAX", ResolveModeFlagBits[ResolveModeFlagBits.NONE_KHR = 0] = "NONE_KHR", ResolveModeFlagBits[ResolveModeFlagBits.SAMPLE_ZERO_BIT_KHR = 1] = "SAMPLE_ZERO_BIT_KHR", ResolveModeFlagBits[ResolveModeFlagBits.AVERAGE_BIT_KHR = 2] = "AVERAGE_BIT_KHR", ResolveModeFlagBits[ResolveModeFlagBits.MIN_BIT_KHR = 4] = "MIN_BIT_KHR", ResolveModeFlagBits[ResolveModeFlagBits.MAX_BIT_KHR = 8] = "MAX_BIT_KHR"; -}(ResolveModeFlagBits || (ResolveModeFlagBits = {})); -export var ShadingRatePaletteEntryNV; -!function(ShadingRatePaletteEntryNV) { - ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV = 0] = "SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV = 1] = "SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV = 2] = "SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV = 3] = "SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV = 4] = "SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV = 5] = "SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV = 6] = "SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV = 7] = "SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV = 8] = "SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV = 9] = "SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV = 10] = "SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV", ShadingRatePaletteEntryNV[ShadingRatePaletteEntryNV.SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV = 11] = "SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV"; -}(ShadingRatePaletteEntryNV || (ShadingRatePaletteEntryNV = {})); -export var CoarseSampleOrderTypeNV; -!function(CoarseSampleOrderTypeNV) { - CoarseSampleOrderTypeNV[CoarseSampleOrderTypeNV.COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV = 0] = "COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV", CoarseSampleOrderTypeNV[CoarseSampleOrderTypeNV.COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV = 1] = "COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV", CoarseSampleOrderTypeNV[CoarseSampleOrderTypeNV.COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV = 2] = "COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV", CoarseSampleOrderTypeNV[CoarseSampleOrderTypeNV.COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV = 3] = "COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV"; -}(CoarseSampleOrderTypeNV || (CoarseSampleOrderTypeNV = {})); -export var GeometryInstanceFlagBitsKHR; -!function(GeometryInstanceFlagBitsKHR) { - GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 1] = "GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = 2] = "GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 4] = "GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 8] = "GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = 2] = "GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = 1] = "GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = 2] = "GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = 4] = "GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = 8] = "GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT = 16] = "GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT", GeometryInstanceFlagBitsKHR[GeometryInstanceFlagBitsKHR.GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT = 32] = "GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT"; -}(GeometryInstanceFlagBitsKHR || (GeometryInstanceFlagBitsKHR = {})); -export var GeometryFlagBitsKHR; -!function(GeometryFlagBitsKHR) { - GeometryFlagBitsKHR[GeometryFlagBitsKHR.GEOMETRY_OPAQUE_BIT_KHR = 1] = "GEOMETRY_OPAQUE_BIT_KHR", GeometryFlagBitsKHR[GeometryFlagBitsKHR.GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = 2] = "GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR", GeometryFlagBitsKHR[GeometryFlagBitsKHR.GEOMETRY_OPAQUE_BIT_NV = 1] = "GEOMETRY_OPAQUE_BIT_NV", GeometryFlagBitsKHR[GeometryFlagBitsKHR.GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = 2] = "GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV"; -}(GeometryFlagBitsKHR || (GeometryFlagBitsKHR = {})); -export var BuildAccelerationStructureFlagBitsKHR; -!function(BuildAccelerationStructureFlagBitsKHR) { - BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 1] = "BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 2] = "BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 4] = "BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 8] = "BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 16] = "BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = 1] = "BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = 2] = "BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = 4] = "BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = 8] = "BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = 16] = "BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 32] = "BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = 64] = "BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = 128] = "BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = 256] = "BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_RESERVED_BIT_9_NV = 512] = "BUILD_ACCELERATION_STRUCTURE_RESERVED_BIT_9_NV", BuildAccelerationStructureFlagBitsKHR[BuildAccelerationStructureFlagBitsKHR.BUILD_ACCELERATION_STRUCTURE_RESERVED_BIT_10_NV = 1024] = "BUILD_ACCELERATION_STRUCTURE_RESERVED_BIT_10_NV"; -}(BuildAccelerationStructureFlagBitsKHR || (BuildAccelerationStructureFlagBitsKHR = {})); -export var AccelerationStructureCreateFlagBitsKHR; -!function(AccelerationStructureCreateFlagBitsKHR) { - AccelerationStructureCreateFlagBitsKHR[AccelerationStructureCreateFlagBitsKHR.ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 1] = "ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR", AccelerationStructureCreateFlagBitsKHR[AccelerationStructureCreateFlagBitsKHR.ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 8] = "ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT", AccelerationStructureCreateFlagBitsKHR[AccelerationStructureCreateFlagBitsKHR.ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = 4] = "ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV"; -}(AccelerationStructureCreateFlagBitsKHR || (AccelerationStructureCreateFlagBitsKHR = {})); -export var CopyAccelerationStructureModeKHR; -!function(CopyAccelerationStructureModeKHR) { - CopyAccelerationStructureModeKHR[CopyAccelerationStructureModeKHR.COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR = 0] = "COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR", CopyAccelerationStructureModeKHR[CopyAccelerationStructureModeKHR.COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR = 1] = "COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR", CopyAccelerationStructureModeKHR[CopyAccelerationStructureModeKHR.COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR = 2] = "COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR", CopyAccelerationStructureModeKHR[CopyAccelerationStructureModeKHR.COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR = 3] = "COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR", CopyAccelerationStructureModeKHR[CopyAccelerationStructureModeKHR.COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = 0] = "COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV", CopyAccelerationStructureModeKHR[CopyAccelerationStructureModeKHR.COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = 1] = "COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV"; -}(CopyAccelerationStructureModeKHR || (CopyAccelerationStructureModeKHR = {})); -export var BuildAccelerationStructureModeKHR; -!function(BuildAccelerationStructureModeKHR) { - BuildAccelerationStructureModeKHR[BuildAccelerationStructureModeKHR.BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = 0] = "BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR", BuildAccelerationStructureModeKHR[BuildAccelerationStructureModeKHR.BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1] = "BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR"; -}(BuildAccelerationStructureModeKHR || (BuildAccelerationStructureModeKHR = {})); -export var AccelerationStructureTypeKHR; -!function(AccelerationStructureTypeKHR) { - AccelerationStructureTypeKHR[AccelerationStructureTypeKHR.ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0] = "ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR", AccelerationStructureTypeKHR[AccelerationStructureTypeKHR.ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1] = "ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR", AccelerationStructureTypeKHR[AccelerationStructureTypeKHR.ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2] = "ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR", AccelerationStructureTypeKHR[AccelerationStructureTypeKHR.ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = 0] = "ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV", AccelerationStructureTypeKHR[AccelerationStructureTypeKHR.ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = 1] = "ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV"; -}(AccelerationStructureTypeKHR || (AccelerationStructureTypeKHR = {})); -export var GeometryTypeKHR; -!function(GeometryTypeKHR) { - GeometryTypeKHR[GeometryTypeKHR.GEOMETRY_TYPE_TRIANGLES_KHR = 0] = "GEOMETRY_TYPE_TRIANGLES_KHR", GeometryTypeKHR[GeometryTypeKHR.GEOMETRY_TYPE_AABBS_KHR = 1] = "GEOMETRY_TYPE_AABBS_KHR", GeometryTypeKHR[GeometryTypeKHR.GEOMETRY_TYPE_INSTANCES_KHR = 2] = "GEOMETRY_TYPE_INSTANCES_KHR", GeometryTypeKHR[GeometryTypeKHR.GEOMETRY_TYPE_TRIANGLES_NV = 0] = "GEOMETRY_TYPE_TRIANGLES_NV", GeometryTypeKHR[GeometryTypeKHR.GEOMETRY_TYPE_AABBS_NV = 1] = "GEOMETRY_TYPE_AABBS_NV"; -}(GeometryTypeKHR || (GeometryTypeKHR = {})); -export var AccelerationStructureMemoryRequirementsTypeNV; -!function(AccelerationStructureMemoryRequirementsTypeNV) { - AccelerationStructureMemoryRequirementsTypeNV[AccelerationStructureMemoryRequirementsTypeNV.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = 0] = "ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV", AccelerationStructureMemoryRequirementsTypeNV[AccelerationStructureMemoryRequirementsTypeNV.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = 1] = "ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV", AccelerationStructureMemoryRequirementsTypeNV[AccelerationStructureMemoryRequirementsTypeNV.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = 2] = "ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV"; -}(AccelerationStructureMemoryRequirementsTypeNV || (AccelerationStructureMemoryRequirementsTypeNV = {})); -export var AccelerationStructureBuildTypeKHR; -!function(AccelerationStructureBuildTypeKHR) { - AccelerationStructureBuildTypeKHR[AccelerationStructureBuildTypeKHR.ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0] = "ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR", AccelerationStructureBuildTypeKHR[AccelerationStructureBuildTypeKHR.ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1] = "ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR", AccelerationStructureBuildTypeKHR[AccelerationStructureBuildTypeKHR.ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2] = "ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR"; -}(AccelerationStructureBuildTypeKHR || (AccelerationStructureBuildTypeKHR = {})); -export var RayTracingShaderGroupTypeKHR; -!function(RayTracingShaderGroupTypeKHR) { - RayTracingShaderGroupTypeKHR[RayTracingShaderGroupTypeKHR.RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = 0] = "RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR", RayTracingShaderGroupTypeKHR[RayTracingShaderGroupTypeKHR.RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = 1] = "RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR", RayTracingShaderGroupTypeKHR[RayTracingShaderGroupTypeKHR.RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = 2] = "RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR", RayTracingShaderGroupTypeKHR[RayTracingShaderGroupTypeKHR.RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = 0] = "RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV", RayTracingShaderGroupTypeKHR[RayTracingShaderGroupTypeKHR.RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = 1] = "RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV", RayTracingShaderGroupTypeKHR[RayTracingShaderGroupTypeKHR.RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = 2] = "RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV"; -}(RayTracingShaderGroupTypeKHR || (RayTracingShaderGroupTypeKHR = {})); -export var AccelerationStructureCompatibilityKHR; -!function(AccelerationStructureCompatibilityKHR) { - AccelerationStructureCompatibilityKHR[AccelerationStructureCompatibilityKHR.ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR = 0] = "ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR", AccelerationStructureCompatibilityKHR[AccelerationStructureCompatibilityKHR.ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR = 1] = "ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR"; -}(AccelerationStructureCompatibilityKHR || (AccelerationStructureCompatibilityKHR = {})); -export var ShaderGroupShaderKHR; -!function(ShaderGroupShaderKHR) { - ShaderGroupShaderKHR[ShaderGroupShaderKHR.SHADER_GROUP_SHADER_GENERAL_KHR = 0] = "SHADER_GROUP_SHADER_GENERAL_KHR", ShaderGroupShaderKHR[ShaderGroupShaderKHR.SHADER_GROUP_SHADER_CLOSEST_HIT_KHR = 1] = "SHADER_GROUP_SHADER_CLOSEST_HIT_KHR", ShaderGroupShaderKHR[ShaderGroupShaderKHR.SHADER_GROUP_SHADER_ANY_HIT_KHR = 2] = "SHADER_GROUP_SHADER_ANY_HIT_KHR", ShaderGroupShaderKHR[ShaderGroupShaderKHR.SHADER_GROUP_SHADER_INTERSECTION_KHR = 3] = "SHADER_GROUP_SHADER_INTERSECTION_KHR"; -}(ShaderGroupShaderKHR || (ShaderGroupShaderKHR = {})); -export var MemoryOverallocationBehaviorAMD; -!function(MemoryOverallocationBehaviorAMD) { - MemoryOverallocationBehaviorAMD[MemoryOverallocationBehaviorAMD.MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0] = "MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD", MemoryOverallocationBehaviorAMD[MemoryOverallocationBehaviorAMD.MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1] = "MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD", MemoryOverallocationBehaviorAMD[MemoryOverallocationBehaviorAMD.MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = 2] = "MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD"; -}(MemoryOverallocationBehaviorAMD || (MemoryOverallocationBehaviorAMD = {})); -export var FramebufferCreateFlagBits; -!function(FramebufferCreateFlagBits) { - FramebufferCreateFlagBits[FramebufferCreateFlagBits.IMAGELESS = 1] = "IMAGELESS", FramebufferCreateFlagBits[FramebufferCreateFlagBits.IMAGELESS_BIT_KHR = 1] = "IMAGELESS_BIT_KHR"; -}(FramebufferCreateFlagBits || (FramebufferCreateFlagBits = {})); -export var ScopeNV; -!function(ScopeNV) { - ScopeNV[ScopeNV.SCOPE_DEVICE_NV = 1] = "SCOPE_DEVICE_NV", ScopeNV[ScopeNV.SCOPE_WORKGROUP_NV = 2] = "SCOPE_WORKGROUP_NV", ScopeNV[ScopeNV.SCOPE_SUBGROUP_NV = 3] = "SCOPE_SUBGROUP_NV", ScopeNV[ScopeNV.SCOPE_QUEUE_FAMILY_NV = 5] = "SCOPE_QUEUE_FAMILY_NV"; -}(ScopeNV || (ScopeNV = {})); -export var ComponentTypeNV; -!function(ComponentTypeNV) { - ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_FLOAT16_NV = 0] = "COMPONENT_TYPE_FLOAT16_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_FLOAT32_NV = 1] = "COMPONENT_TYPE_FLOAT32_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_FLOAT64_NV = 2] = "COMPONENT_TYPE_FLOAT64_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_SINT8_NV = 3] = "COMPONENT_TYPE_SINT8_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_SINT16_NV = 4] = "COMPONENT_TYPE_SINT16_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_SINT32_NV = 5] = "COMPONENT_TYPE_SINT32_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_SINT64_NV = 6] = "COMPONENT_TYPE_SINT64_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_UINT8_NV = 7] = "COMPONENT_TYPE_UINT8_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_UINT16_NV = 8] = "COMPONENT_TYPE_UINT16_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_UINT32_NV = 9] = "COMPONENT_TYPE_UINT32_NV", ComponentTypeNV[ComponentTypeNV.COMPONENT_TYPE_UINT64_NV = 10] = "COMPONENT_TYPE_UINT64_NV"; -}(ComponentTypeNV || (ComponentTypeNV = {})); -export var DeviceDiagnosticsConfigFlagBitsNV; -!function(DeviceDiagnosticsConfigFlagBitsNV) { - DeviceDiagnosticsConfigFlagBitsNV[DeviceDiagnosticsConfigFlagBitsNV.DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV = 1] = "DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV", DeviceDiagnosticsConfigFlagBitsNV[DeviceDiagnosticsConfigFlagBitsNV.DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV = 2] = "DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV", DeviceDiagnosticsConfigFlagBitsNV[DeviceDiagnosticsConfigFlagBitsNV.DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV = 4] = "DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV", DeviceDiagnosticsConfigFlagBitsNV[DeviceDiagnosticsConfigFlagBitsNV.DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV = 8] = "DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV"; -}(DeviceDiagnosticsConfigFlagBitsNV || (DeviceDiagnosticsConfigFlagBitsNV = {})); -export var PipelineCreationFeedbackFlagBits; -!function(PipelineCreationFeedbackFlagBits) { - PipelineCreationFeedbackFlagBits[PipelineCreationFeedbackFlagBits.VALID = 1] = "VALID", PipelineCreationFeedbackFlagBits[PipelineCreationFeedbackFlagBits.VALID_BIT_EXT = 1] = "VALID_BIT_EXT", PipelineCreationFeedbackFlagBits[PipelineCreationFeedbackFlagBits.APPLICATION_PIPELINE_CACHE_HIT = 2] = "APPLICATION_PIPELINE_CACHE_HIT", PipelineCreationFeedbackFlagBits[PipelineCreationFeedbackFlagBits.APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT = 2] = "APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT", PipelineCreationFeedbackFlagBits[PipelineCreationFeedbackFlagBits.BASE_PIPELINE_ACCELERATION = 4] = "BASE_PIPELINE_ACCELERATION", PipelineCreationFeedbackFlagBits[PipelineCreationFeedbackFlagBits.BASE_PIPELINE_ACCELERATION_BIT_EXT = 4] = "BASE_PIPELINE_ACCELERATION_BIT_EXT"; -}(PipelineCreationFeedbackFlagBits || (PipelineCreationFeedbackFlagBits = {})); -export var FullScreenExclusiveEXT; -!function(FullScreenExclusiveEXT) { - FullScreenExclusiveEXT[FullScreenExclusiveEXT.FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0] = "FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT", FullScreenExclusiveEXT[FullScreenExclusiveEXT.FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1] = "FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT", FullScreenExclusiveEXT[FullScreenExclusiveEXT.FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2] = "FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT", FullScreenExclusiveEXT[FullScreenExclusiveEXT.FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3] = "FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT"; -}(FullScreenExclusiveEXT || (FullScreenExclusiveEXT = {})); -export var PerformanceCounterScopeKHR; -!function(PerformanceCounterScopeKHR) { - PerformanceCounterScopeKHR[PerformanceCounterScopeKHR.PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0] = "PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR", PerformanceCounterScopeKHR[PerformanceCounterScopeKHR.PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1] = "PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR", PerformanceCounterScopeKHR[PerformanceCounterScopeKHR.PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2] = "PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR", PerformanceCounterScopeKHR[PerformanceCounterScopeKHR.QUERY_SCOPE_COMMAND_BUFFER_KHR = 0] = "QUERY_SCOPE_COMMAND_BUFFER_KHR", PerformanceCounterScopeKHR[PerformanceCounterScopeKHR.QUERY_SCOPE_RENDER_PASS_KHR = 1] = "QUERY_SCOPE_RENDER_PASS_KHR", PerformanceCounterScopeKHR[PerformanceCounterScopeKHR.QUERY_SCOPE_COMMAND_KHR = 2] = "QUERY_SCOPE_COMMAND_KHR"; -}(PerformanceCounterScopeKHR || (PerformanceCounterScopeKHR = {})); -export var MemoryDecompressionMethodFlagBitsNV; -!function(MemoryDecompressionMethodFlagBitsNV) { - MemoryDecompressionMethodFlagBitsNV[MemoryDecompressionMethodFlagBitsNV.MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV = 1] = "MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV"; -}(MemoryDecompressionMethodFlagBitsNV || (MemoryDecompressionMethodFlagBitsNV = {})); -export var PerformanceCounterUnitKHR; -!function(PerformanceCounterUnitKHR) { - PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_GENERIC_KHR = 0] = "PERFORMANCE_COUNTER_UNIT_GENERIC_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR = 1] = "PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR = 2] = "PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_BYTES_KHR = 3] = "PERFORMANCE_COUNTER_UNIT_BYTES_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR = 4] = "PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_KELVIN_KHR = 5] = "PERFORMANCE_COUNTER_UNIT_KELVIN_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_WATTS_KHR = 6] = "PERFORMANCE_COUNTER_UNIT_WATTS_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_VOLTS_KHR = 7] = "PERFORMANCE_COUNTER_UNIT_VOLTS_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_AMPS_KHR = 8] = "PERFORMANCE_COUNTER_UNIT_AMPS_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_HERTZ_KHR = 9] = "PERFORMANCE_COUNTER_UNIT_HERTZ_KHR", PerformanceCounterUnitKHR[PerformanceCounterUnitKHR.PERFORMANCE_COUNTER_UNIT_CYCLES_KHR = 10] = "PERFORMANCE_COUNTER_UNIT_CYCLES_KHR"; -}(PerformanceCounterUnitKHR || (PerformanceCounterUnitKHR = {})); -export var PerformanceCounterStorageKHR; -!function(PerformanceCounterStorageKHR) { - PerformanceCounterStorageKHR[PerformanceCounterStorageKHR.PERFORMANCE_COUNTER_STORAGE_INT32_KHR = 0] = "PERFORMANCE_COUNTER_STORAGE_INT32_KHR", PerformanceCounterStorageKHR[PerformanceCounterStorageKHR.PERFORMANCE_COUNTER_STORAGE_INT64_KHR = 1] = "PERFORMANCE_COUNTER_STORAGE_INT64_KHR", PerformanceCounterStorageKHR[PerformanceCounterStorageKHR.PERFORMANCE_COUNTER_STORAGE_UINT32_KHR = 2] = "PERFORMANCE_COUNTER_STORAGE_UINT32_KHR", PerformanceCounterStorageKHR[PerformanceCounterStorageKHR.PERFORMANCE_COUNTER_STORAGE_UINT64_KHR = 3] = "PERFORMANCE_COUNTER_STORAGE_UINT64_KHR", PerformanceCounterStorageKHR[PerformanceCounterStorageKHR.PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR = 4] = "PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR", PerformanceCounterStorageKHR[PerformanceCounterStorageKHR.PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR = 5] = "PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR"; -}(PerformanceCounterStorageKHR || (PerformanceCounterStorageKHR = {})); -export var PerformanceCounterDescriptionFlagBitsKHR; -!function(PerformanceCounterDescriptionFlagBitsKHR) { - PerformanceCounterDescriptionFlagBitsKHR[PerformanceCounterDescriptionFlagBitsKHR.PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR = 1] = "PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR", PerformanceCounterDescriptionFlagBitsKHR[PerformanceCounterDescriptionFlagBitsKHR.PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = 1] = "PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR", PerformanceCounterDescriptionFlagBitsKHR[PerformanceCounterDescriptionFlagBitsKHR.PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR = 2] = "PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR", PerformanceCounterDescriptionFlagBitsKHR[PerformanceCounterDescriptionFlagBitsKHR.PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = 2] = "PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR"; -}(PerformanceCounterDescriptionFlagBitsKHR || (PerformanceCounterDescriptionFlagBitsKHR = {})); -export var AcquireProfilingLockFlagBitsKHR; -AcquireProfilingLockFlagBitsKHR || (AcquireProfilingLockFlagBitsKHR = {}); -export var ShaderCorePropertiesFlagBitsAMD; -ShaderCorePropertiesFlagBitsAMD || (ShaderCorePropertiesFlagBitsAMD = {}); -export var PerformanceConfigurationTypeINTEL; -!function(PerformanceConfigurationTypeINTEL) { - PerformanceConfigurationTypeINTEL[PerformanceConfigurationTypeINTEL.PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL = 0] = "PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL"; -}(PerformanceConfigurationTypeINTEL || (PerformanceConfigurationTypeINTEL = {})); -export var QueryPoolSamplingModeINTEL; -!function(QueryPoolSamplingModeINTEL) { - QueryPoolSamplingModeINTEL[QueryPoolSamplingModeINTEL.QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL = 0] = "QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL"; -}(QueryPoolSamplingModeINTEL || (QueryPoolSamplingModeINTEL = {})); -export var PerformanceOverrideTypeINTEL; -!function(PerformanceOverrideTypeINTEL) { - PerformanceOverrideTypeINTEL[PerformanceOverrideTypeINTEL.PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL = 0] = "PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL", PerformanceOverrideTypeINTEL[PerformanceOverrideTypeINTEL.PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL = 1] = "PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL"; -}(PerformanceOverrideTypeINTEL || (PerformanceOverrideTypeINTEL = {})); -export var PerformanceParameterTypeINTEL; -!function(PerformanceParameterTypeINTEL) { - PerformanceParameterTypeINTEL[PerformanceParameterTypeINTEL.PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL = 0] = "PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL", PerformanceParameterTypeINTEL[PerformanceParameterTypeINTEL.PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL = 1] = "PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL"; -}(PerformanceParameterTypeINTEL || (PerformanceParameterTypeINTEL = {})); -export var PerformanceValueTypeINTEL; -!function(PerformanceValueTypeINTEL) { - PerformanceValueTypeINTEL[PerformanceValueTypeINTEL.PERFORMANCE_VALUE_TYPE_UINT32_INTEL = 0] = "PERFORMANCE_VALUE_TYPE_UINT32_INTEL", PerformanceValueTypeINTEL[PerformanceValueTypeINTEL.PERFORMANCE_VALUE_TYPE_UINT64_INTEL = 1] = "PERFORMANCE_VALUE_TYPE_UINT64_INTEL", PerformanceValueTypeINTEL[PerformanceValueTypeINTEL.PERFORMANCE_VALUE_TYPE_FLOAT_INTEL = 2] = "PERFORMANCE_VALUE_TYPE_FLOAT_INTEL", PerformanceValueTypeINTEL[PerformanceValueTypeINTEL.PERFORMANCE_VALUE_TYPE_BOOL_INTEL = 3] = "PERFORMANCE_VALUE_TYPE_BOOL_INTEL", PerformanceValueTypeINTEL[PerformanceValueTypeINTEL.PERFORMANCE_VALUE_TYPE_STRING_INTEL = 4] = "PERFORMANCE_VALUE_TYPE_STRING_INTEL"; -}(PerformanceValueTypeINTEL || (PerformanceValueTypeINTEL = {})); -export var ShaderFloatControlsIndependence; -!function(ShaderFloatControlsIndependence) { - ShaderFloatControlsIndependence[ShaderFloatControlsIndependence.VK_32_BIT_ONLY = 0] = "VK_32_BIT_ONLY", ShaderFloatControlsIndependence[ShaderFloatControlsIndependence.ALL = 1] = "ALL", ShaderFloatControlsIndependence[ShaderFloatControlsIndependence.NONE = 2] = "NONE", ShaderFloatControlsIndependence[ShaderFloatControlsIndependence.VK_32_BIT_ONLY_KHR = 0] = "VK_32_BIT_ONLY_KHR", ShaderFloatControlsIndependence[ShaderFloatControlsIndependence.ALL_KHR = 1] = "ALL_KHR", ShaderFloatControlsIndependence[ShaderFloatControlsIndependence.NONE_KHR = 2] = "NONE_KHR"; -}(ShaderFloatControlsIndependence || (ShaderFloatControlsIndependence = {})); -export var PipelineExecutableStatisticFormatKHR; -!function(PipelineExecutableStatisticFormatKHR) { - PipelineExecutableStatisticFormatKHR[PipelineExecutableStatisticFormatKHR.PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR = 0] = "PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR", PipelineExecutableStatisticFormatKHR[PipelineExecutableStatisticFormatKHR.PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR = 1] = "PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR", PipelineExecutableStatisticFormatKHR[PipelineExecutableStatisticFormatKHR.PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR = 2] = "PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR", PipelineExecutableStatisticFormatKHR[PipelineExecutableStatisticFormatKHR.PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR = 3] = "PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR"; -}(PipelineExecutableStatisticFormatKHR || (PipelineExecutableStatisticFormatKHR = {})); -export var LineRasterizationModeEXT; -!function(LineRasterizationModeEXT) { - LineRasterizationModeEXT[LineRasterizationModeEXT.LINE_RASTERIZATION_MODE_DEFAULT_EXT = 0] = "LINE_RASTERIZATION_MODE_DEFAULT_EXT", LineRasterizationModeEXT[LineRasterizationModeEXT.LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = 1] = "LINE_RASTERIZATION_MODE_RECTANGULAR_EXT", LineRasterizationModeEXT[LineRasterizationModeEXT.LINE_RASTERIZATION_MODE_BRESENHAM_EXT = 2] = "LINE_RASTERIZATION_MODE_BRESENHAM_EXT", LineRasterizationModeEXT[LineRasterizationModeEXT.LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = 3] = "LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT"; -}(LineRasterizationModeEXT || (LineRasterizationModeEXT = {})); -export var ShaderModuleCreateFlagBits; -ShaderModuleCreateFlagBits || (ShaderModuleCreateFlagBits = {}); -export var PipelineCompilerControlFlagBitsAMD; -PipelineCompilerControlFlagBitsAMD || (PipelineCompilerControlFlagBitsAMD = {}); -export var ToolPurposeFlagBits; -!function(ToolPurposeFlagBits) { - ToolPurposeFlagBits[ToolPurposeFlagBits.VALIDATION = 1] = "VALIDATION", ToolPurposeFlagBits[ToolPurposeFlagBits.VALIDATION_BIT_EXT = 1] = "VALIDATION_BIT_EXT", ToolPurposeFlagBits[ToolPurposeFlagBits.PROFILING = 2] = "PROFILING", ToolPurposeFlagBits[ToolPurposeFlagBits.PROFILING_BIT_EXT = 2] = "PROFILING_BIT_EXT", ToolPurposeFlagBits[ToolPurposeFlagBits.TRACING = 4] = "TRACING", ToolPurposeFlagBits[ToolPurposeFlagBits.TRACING_BIT_EXT = 4] = "TRACING_BIT_EXT", ToolPurposeFlagBits[ToolPurposeFlagBits.ADDITIONAL_FEATURES = 8] = "ADDITIONAL_FEATURES", ToolPurposeFlagBits[ToolPurposeFlagBits.ADDITIONAL_FEATURES_BIT_EXT = 8] = "ADDITIONAL_FEATURES_BIT_EXT", ToolPurposeFlagBits[ToolPurposeFlagBits.MODIFYING_FEATURES = 16] = "MODIFYING_FEATURES", ToolPurposeFlagBits[ToolPurposeFlagBits.MODIFYING_FEATURES_BIT_EXT = 16] = "MODIFYING_FEATURES_BIT_EXT", ToolPurposeFlagBits[ToolPurposeFlagBits.DEBUG_REPORTING_BIT_EXT = 32] = "DEBUG_REPORTING_BIT_EXT", ToolPurposeFlagBits[ToolPurposeFlagBits.DEBUG_MARKERS_BIT_EXT = 64] = "DEBUG_MARKERS_BIT_EXT"; -}(ToolPurposeFlagBits || (ToolPurposeFlagBits = {})); -export var FragmentShadingRateCombinerOpKHR; -!function(FragmentShadingRateCombinerOpKHR) { - FragmentShadingRateCombinerOpKHR[FragmentShadingRateCombinerOpKHR.FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR = 0] = "FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR", FragmentShadingRateCombinerOpKHR[FragmentShadingRateCombinerOpKHR.FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR = 1] = "FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR", FragmentShadingRateCombinerOpKHR[FragmentShadingRateCombinerOpKHR.FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR = 2] = "FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR", FragmentShadingRateCombinerOpKHR[FragmentShadingRateCombinerOpKHR.FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR = 3] = "FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR", FragmentShadingRateCombinerOpKHR[FragmentShadingRateCombinerOpKHR.FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR = 4] = "FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR"; -}(FragmentShadingRateCombinerOpKHR || (FragmentShadingRateCombinerOpKHR = {})); -export var FragmentShadingRateNV; -!function(FragmentShadingRateNV) { - FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0] = "FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 1] = "FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 4] = "FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 5] = "FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 6] = "FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 9] = "FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 10] = "FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 11] = "FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 12] = "FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 13] = "FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 14] = "FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV", FragmentShadingRateNV[FragmentShadingRateNV.FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV = 15] = "FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV"; -}(FragmentShadingRateNV || (FragmentShadingRateNV = {})); -export var FragmentShadingRateTypeNV; -!function(FragmentShadingRateTypeNV) { - FragmentShadingRateTypeNV[FragmentShadingRateTypeNV.FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV = 0] = "FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV", FragmentShadingRateTypeNV[FragmentShadingRateTypeNV.FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV = 1] = "FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV"; -}(FragmentShadingRateTypeNV || (FragmentShadingRateTypeNV = {})); -export var SubpassMergeStatusEXT; -!function(SubpassMergeStatusEXT) { - SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_MERGED_EXT = 0] = "SUBPASS_MERGE_STATUS_MERGED_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_DISALLOWED_EXT = 1] = "SUBPASS_MERGE_STATUS_DISALLOWED_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT = 2] = "SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT = 3] = "SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT = 4] = "SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT = 5] = "SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT = 6] = "SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT = 7] = "SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT = 8] = "SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT = 9] = "SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT = 10] = "SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT = 11] = "SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT = 12] = "SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT", SubpassMergeStatusEXT[SubpassMergeStatusEXT.SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT = 13] = "SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT"; -}(SubpassMergeStatusEXT || (SubpassMergeStatusEXT = {})); -export var AccessFlagBits2; -!function(AccessFlagBits2) { - AccessFlagBits2[AccessFlagBits2.ACCESS_2_NONE = 0] = "ACCESS_2_NONE", AccessFlagBits2[AccessFlagBits2.ACCESS_2_NONE_KHR = 0] = "ACCESS_2_NONE_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_INDIRECT_COMMAND_READ_BIT = 1] = "ACCESS_2_INDIRECT_COMMAND_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 1] = "ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_INDEX_READ_BIT = 2] = "ACCESS_2_INDEX_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_INDEX_READ_BIT_KHR = 2] = "ACCESS_2_INDEX_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT = 4] = "ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 4] = "ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_UNIFORM_READ_BIT = 8] = "ACCESS_2_UNIFORM_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_UNIFORM_READ_BIT_KHR = 8] = "ACCESS_2_UNIFORM_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_INPUT_ATTACHMENT_READ_BIT = 16] = "ACCESS_2_INPUT_ATTACHMENT_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 16] = "ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_READ_BIT = 32] = "ACCESS_2_SHADER_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_READ_BIT_KHR = 32] = "ACCESS_2_SHADER_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_WRITE_BIT = 64] = "ACCESS_2_SHADER_WRITE_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_WRITE_BIT_KHR = 64] = "ACCESS_2_SHADER_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_COLOR_ATTACHMENT_READ_BIT = 128] = "ACCESS_2_COLOR_ATTACHMENT_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 128] = "ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT = 256] = "ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 256] = "ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 512] = "ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 512] = "ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 1024] = "ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 1024] = "ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_TRANSFER_READ_BIT = 2048] = "ACCESS_2_TRANSFER_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_TRANSFER_READ_BIT_KHR = 2048] = "ACCESS_2_TRANSFER_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_TRANSFER_WRITE_BIT = 4096] = "ACCESS_2_TRANSFER_WRITE_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_TRANSFER_WRITE_BIT_KHR = 4096] = "ACCESS_2_TRANSFER_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_HOST_READ_BIT = 8192] = "ACCESS_2_HOST_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_HOST_READ_BIT_KHR = 8192] = "ACCESS_2_HOST_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_HOST_WRITE_BIT = 16384] = "ACCESS_2_HOST_WRITE_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_HOST_WRITE_BIT_KHR = 16384] = "ACCESS_2_HOST_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_MEMORY_READ_BIT = 32768] = "ACCESS_2_MEMORY_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_MEMORY_READ_BIT_KHR = 32768] = "ACCESS_2_MEMORY_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_MEMORY_WRITE_BIT = 65536] = "ACCESS_2_MEMORY_WRITE_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_MEMORY_WRITE_BIT_KHR = 65536] = "ACCESS_2_MEMORY_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_SAMPLED_READ_BIT = 4294967296] = "ACCESS_2_SHADER_SAMPLED_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 4294967296] = "ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_STORAGE_READ_BIT = 8589934592] = "ACCESS_2_SHADER_STORAGE_READ_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 8589934592] = "ACCESS_2_SHADER_STORAGE_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_STORAGE_WRITE_BIT = 17179869184] = "ACCESS_2_SHADER_STORAGE_WRITE_BIT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 17179869184] = "ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_VIDEO_DECODE_READ_BIT_KHR = 34359738368] = "ACCESS_2_VIDEO_DECODE_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR = 68719476736] = "ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_RESERVED_46_BIT_EXT = 70368744177664] = "ACCESS_2_RESERVED_46_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 137438953472] = "ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 274877906944] = "ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 33554432] = "ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 67108864] = "ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 134217728] = "ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 1048576] = "ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 131072] = "ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV", AccessFlagBits2[AccessFlagBits2.ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 262144] = "ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV", AccessFlagBits2[AccessFlagBits2.ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 8388608] = "ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 8388608] = "ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV", AccessFlagBits2[AccessFlagBits2.ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 2097152] = "ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 4194304] = "ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 2097152] = "ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV", AccessFlagBits2[AccessFlagBits2.ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 4194304] = "ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV", AccessFlagBits2[AccessFlagBits2.ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 16777216] = "ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 524288] = "ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT = 2199023255552] = "ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI = 549755813888] = "ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI", AccessFlagBits2[AccessFlagBits2.ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR = 1099511627776] = "ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR", AccessFlagBits2[AccessFlagBits2.ACCESS_2_MICROMAP_READ_BIT_EXT = 17592186044416] = "ACCESS_2_MICROMAP_READ_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_MICROMAP_WRITE_BIT_EXT = 35184372088832] = "ACCESS_2_MICROMAP_WRITE_BIT_EXT", AccessFlagBits2[AccessFlagBits2.ACCESS_2_OPTICAL_FLOW_READ_BIT_NV = 4398046511104] = "ACCESS_2_OPTICAL_FLOW_READ_BIT_NV", AccessFlagBits2[AccessFlagBits2.ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV = 8796093022208] = "ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV"; -}(AccessFlagBits2 || (AccessFlagBits2 = {})); -export var PipelineStageFlagBits2; -!function(PipelineStageFlagBits2) { - PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_NONE = 0] = "PIPELINE_STAGE_2_NONE", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_NONE_KHR = 0] = "PIPELINE_STAGE_2_NONE_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TOP_OF_PIPE_BIT = 1] = "PIPELINE_STAGE_2_TOP_OF_PIPE_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 1] = "PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_DRAW_INDIRECT_BIT = 2] = "PIPELINE_STAGE_2_DRAW_INDIRECT_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 2] = "PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_VERTEX_INPUT_BIT = 4] = "PIPELINE_STAGE_2_VERTEX_INPUT_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 4] = "PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_VERTEX_SHADER_BIT = 8] = "PIPELINE_STAGE_2_VERTEX_SHADER_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 8] = "PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT = 16] = "PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 16] = "PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT = 32] = "PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 32] = "PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT = 64] = "PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 64] = "PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT = 128] = "PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 128] = "PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT = 256] = "PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 256] = "PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT = 512] = "PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 512] = "PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT = 1024] = "PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 1024] = "PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_COMPUTE_SHADER_BIT = 2048] = "PIPELINE_STAGE_2_COMPUTE_SHADER_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 2048] = "PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_ALL_TRANSFER_BIT = 4096] = "PIPELINE_STAGE_2_ALL_TRANSFER_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 4096] = "PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TRANSFER_BIT = 4096] = "PIPELINE_STAGE_2_TRANSFER_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 4096] = "PIPELINE_STAGE_2_TRANSFER_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT = 8192] = "PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 8192] = "PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_HOST_BIT = 16384] = "PIPELINE_STAGE_2_HOST_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_HOST_BIT_KHR = 16384] = "PIPELINE_STAGE_2_HOST_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_ALL_GRAPHICS_BIT = 32768] = "PIPELINE_STAGE_2_ALL_GRAPHICS_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 32768] = "PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_ALL_COMMANDS_BIT = 65536] = "PIPELINE_STAGE_2_ALL_COMMANDS_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 65536] = "PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_COPY_BIT = 4294967296] = "PIPELINE_STAGE_2_COPY_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_COPY_BIT_KHR = 4294967296] = "PIPELINE_STAGE_2_COPY_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_RESOLVE_BIT = 8589934592] = "PIPELINE_STAGE_2_RESOLVE_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 8589934592] = "PIPELINE_STAGE_2_RESOLVE_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_BLIT_BIT = 17179869184] = "PIPELINE_STAGE_2_BLIT_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_BLIT_BIT_KHR = 17179869184] = "PIPELINE_STAGE_2_BLIT_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_CLEAR_BIT = 34359738368] = "PIPELINE_STAGE_2_CLEAR_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_CLEAR_BIT_KHR = 34359738368] = "PIPELINE_STAGE_2_CLEAR_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_INDEX_INPUT_BIT = 68719476736] = "PIPELINE_STAGE_2_INDEX_INPUT_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 68719476736] = "PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT = 137438953472] = "PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 137438953472] = "PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT = 274877906944] = "PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 274877906944] = "PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR = 67108864] = "PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 134217728] = "PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 16777216] = "PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 262144] = "PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 131072] = "PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 4194304] = "PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 4194304] = "PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 33554432] = "PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 2097152] = "PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 2097152] = "PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 33554432] = "PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 8388608] = "PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 524288] = "PIPELINE_STAGE_2_TASK_SHADER_BIT_NV", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 1048576] = "PIPELINE_STAGE_2_MESH_SHADER_BIT_NV", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT = 524288] = "PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT = 1048576] = "PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI = 549755813888] = "PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI = 1099511627776] = "PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR = 268435456] = "PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT = 1073741824] = "PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_RESEVED_41_BIT_HUAWEI = 2199023255552] = "PIPELINE_STAGE_2_RESEVED_41_BIT_HUAWEI", PipelineStageFlagBits2[PipelineStageFlagBits2.PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV = 536870912] = "PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV"; -}(PipelineStageFlagBits2 || (PipelineStageFlagBits2 = {})); -export var SubmitFlagBits; -!function(SubmitFlagBits) { - SubmitFlagBits[SubmitFlagBits.PROTECTED = 1] = "PROTECTED", SubmitFlagBits[SubmitFlagBits.PROTECTED_BIT_KHR = 1] = "PROTECTED_BIT_KHR"; -}(SubmitFlagBits || (SubmitFlagBits = {})); -export var EventCreateFlagBits; -!function(EventCreateFlagBits) { - EventCreateFlagBits[EventCreateFlagBits.DEVICE_ONLY = 1] = "DEVICE_ONLY", EventCreateFlagBits[EventCreateFlagBits.DEVICE_ONLY_BIT_KHR = 1] = "DEVICE_ONLY_BIT_KHR"; -}(EventCreateFlagBits || (EventCreateFlagBits = {})); -export var PipelineLayoutCreateFlagBits; -!function(PipelineLayoutCreateFlagBits) { - PipelineLayoutCreateFlagBits[PipelineLayoutCreateFlagBits.RESERVED_0_BIT_AMD = 1] = "RESERVED_0_BIT_AMD", PipelineLayoutCreateFlagBits[PipelineLayoutCreateFlagBits.INDEPENDENT_SETS_BIT_EXT = 2] = "INDEPENDENT_SETS_BIT_EXT"; -}(PipelineLayoutCreateFlagBits || (PipelineLayoutCreateFlagBits = {})); -export var ProvokingVertexModeEXT; -!function(ProvokingVertexModeEXT) { - ProvokingVertexModeEXT[ProvokingVertexModeEXT.PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT = 0] = "PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT", ProvokingVertexModeEXT[ProvokingVertexModeEXT.PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT = 1] = "PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT"; -}(ProvokingVertexModeEXT || (ProvokingVertexModeEXT = {})); -export var AccelerationStructureMotionInstanceTypeNV; -!function(AccelerationStructureMotionInstanceTypeNV) { - AccelerationStructureMotionInstanceTypeNV[AccelerationStructureMotionInstanceTypeNV.ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV = 0] = "ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV", AccelerationStructureMotionInstanceTypeNV[AccelerationStructureMotionInstanceTypeNV.ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV = 1] = "ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV", AccelerationStructureMotionInstanceTypeNV[AccelerationStructureMotionInstanceTypeNV.ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV = 2] = "ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV"; -}(AccelerationStructureMotionInstanceTypeNV || (AccelerationStructureMotionInstanceTypeNV = {})); -export var PipelineColorBlendStateCreateFlagBits; -!function(PipelineColorBlendStateCreateFlagBits) { - PipelineColorBlendStateCreateFlagBits[PipelineColorBlendStateCreateFlagBits.RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM = 1] = "RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM", PipelineColorBlendStateCreateFlagBits[PipelineColorBlendStateCreateFlagBits.RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT = 1] = "RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT"; -}(PipelineColorBlendStateCreateFlagBits || (PipelineColorBlendStateCreateFlagBits = {})); -export var PipelineDepthStencilStateCreateFlagBits; -!function(PipelineDepthStencilStateCreateFlagBits) { - PipelineDepthStencilStateCreateFlagBits[PipelineDepthStencilStateCreateFlagBits.RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = 1] = "RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM", PipelineDepthStencilStateCreateFlagBits[PipelineDepthStencilStateCreateFlagBits.RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = 2] = "RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM", PipelineDepthStencilStateCreateFlagBits[PipelineDepthStencilStateCreateFlagBits.RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 1] = "RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT", PipelineDepthStencilStateCreateFlagBits[PipelineDepthStencilStateCreateFlagBits.RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 2] = "RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT"; -}(PipelineDepthStencilStateCreateFlagBits || (PipelineDepthStencilStateCreateFlagBits = {})); -export var GraphicsPipelineLibraryFlagBitsEXT; -!function(GraphicsPipelineLibraryFlagBitsEXT) { - GraphicsPipelineLibraryFlagBitsEXT[GraphicsPipelineLibraryFlagBitsEXT.GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT = 1] = "GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT", GraphicsPipelineLibraryFlagBitsEXT[GraphicsPipelineLibraryFlagBitsEXT.GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT = 2] = "GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT", GraphicsPipelineLibraryFlagBitsEXT[GraphicsPipelineLibraryFlagBitsEXT.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT = 4] = "GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT", GraphicsPipelineLibraryFlagBitsEXT[GraphicsPipelineLibraryFlagBitsEXT.GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT = 8] = "GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT"; -}(GraphicsPipelineLibraryFlagBitsEXT || (GraphicsPipelineLibraryFlagBitsEXT = {})); -export var DeviceAddressBindingFlagBitsEXT; -!function(DeviceAddressBindingFlagBitsEXT) { - DeviceAddressBindingFlagBitsEXT[DeviceAddressBindingFlagBitsEXT.DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT = 1] = "DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT"; -}(DeviceAddressBindingFlagBitsEXT || (DeviceAddressBindingFlagBitsEXT = {})); -export var DeviceAddressBindingTypeEXT; -!function(DeviceAddressBindingTypeEXT) { - DeviceAddressBindingTypeEXT[DeviceAddressBindingTypeEXT.DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT = 0] = "DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT", DeviceAddressBindingTypeEXT[DeviceAddressBindingTypeEXT.DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT = 1] = "DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT"; -}(DeviceAddressBindingTypeEXT || (DeviceAddressBindingTypeEXT = {})); -export var VideoCodecOperationFlagBitsKHR; -!function(VideoCodecOperationFlagBitsKHR) { - VideoCodecOperationFlagBitsKHR[VideoCodecOperationFlagBitsKHR.VIDEO_CODEC_OPERATION_NONE_KHR = 0] = "VIDEO_CODEC_OPERATION_NONE_KHR", VideoCodecOperationFlagBitsKHR[VideoCodecOperationFlagBitsKHR.VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT = 65536] = "VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT", VideoCodecOperationFlagBitsKHR[VideoCodecOperationFlagBitsKHR.VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT = 131072] = "VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT", VideoCodecOperationFlagBitsKHR[VideoCodecOperationFlagBitsKHR.VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT = 1] = "VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT", VideoCodecOperationFlagBitsKHR[VideoCodecOperationFlagBitsKHR.VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT = 2] = "VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT"; -}(VideoCodecOperationFlagBitsKHR || (VideoCodecOperationFlagBitsKHR = {})); -export var VideoChromaSubsamplingFlagBitsKHR; -!function(VideoChromaSubsamplingFlagBitsKHR) { - VideoChromaSubsamplingFlagBitsKHR[VideoChromaSubsamplingFlagBitsKHR.VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR = 0] = "VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR", VideoChromaSubsamplingFlagBitsKHR[VideoChromaSubsamplingFlagBitsKHR.VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR = 1] = "VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR", VideoChromaSubsamplingFlagBitsKHR[VideoChromaSubsamplingFlagBitsKHR.VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR = 2] = "VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR", VideoChromaSubsamplingFlagBitsKHR[VideoChromaSubsamplingFlagBitsKHR.VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR = 4] = "VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR", VideoChromaSubsamplingFlagBitsKHR[VideoChromaSubsamplingFlagBitsKHR.VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR = 8] = "VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR"; -}(VideoChromaSubsamplingFlagBitsKHR || (VideoChromaSubsamplingFlagBitsKHR = {})); -export var VideoComponentBitDepthFlagBitsKHR; -!function(VideoComponentBitDepthFlagBitsKHR) { - VideoComponentBitDepthFlagBitsKHR[VideoComponentBitDepthFlagBitsKHR.VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR = 0] = "VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR", VideoComponentBitDepthFlagBitsKHR[VideoComponentBitDepthFlagBitsKHR.VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR = 1] = "VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR", VideoComponentBitDepthFlagBitsKHR[VideoComponentBitDepthFlagBitsKHR.VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR = 4] = "VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR", VideoComponentBitDepthFlagBitsKHR[VideoComponentBitDepthFlagBitsKHR.VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR = 16] = "VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR"; -}(VideoComponentBitDepthFlagBitsKHR || (VideoComponentBitDepthFlagBitsKHR = {})); -export var VideoCapabilityFlagBitsKHR; -!function(VideoCapabilityFlagBitsKHR) { - VideoCapabilityFlagBitsKHR[VideoCapabilityFlagBitsKHR.VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR = 1] = "VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR", VideoCapabilityFlagBitsKHR[VideoCapabilityFlagBitsKHR.VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 2] = "VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR"; -}(VideoCapabilityFlagBitsKHR || (VideoCapabilityFlagBitsKHR = {})); -export var VideoSessionCreateFlagBitsKHR; -!function(VideoSessionCreateFlagBitsKHR) { - VideoSessionCreateFlagBitsKHR[VideoSessionCreateFlagBitsKHR.VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 1] = "VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR"; -}(VideoSessionCreateFlagBitsKHR || (VideoSessionCreateFlagBitsKHR = {})); -export var VideoDecodeH264PictureLayoutFlagBitsEXT; -!function(VideoDecodeH264PictureLayoutFlagBitsEXT) { - VideoDecodeH264PictureLayoutFlagBitsEXT[VideoDecodeH264PictureLayoutFlagBitsEXT.VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT = 0] = "VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT", VideoDecodeH264PictureLayoutFlagBitsEXT[VideoDecodeH264PictureLayoutFlagBitsEXT.VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT = 1] = "VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT", VideoDecodeH264PictureLayoutFlagBitsEXT[VideoDecodeH264PictureLayoutFlagBitsEXT.VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT = 2] = "VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT"; -}(VideoDecodeH264PictureLayoutFlagBitsEXT || (VideoDecodeH264PictureLayoutFlagBitsEXT = {})); -export var VideoCodingControlFlagBitsKHR; -!function(VideoCodingControlFlagBitsKHR) { - VideoCodingControlFlagBitsKHR[VideoCodingControlFlagBitsKHR.VIDEO_CODING_CONTROL_RESET_BIT_KHR = 1] = "VIDEO_CODING_CONTROL_RESET_BIT_KHR", VideoCodingControlFlagBitsKHR[VideoCodingControlFlagBitsKHR.VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 2] = "VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR", VideoCodingControlFlagBitsKHR[VideoCodingControlFlagBitsKHR.VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR = 4] = "VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR"; -}(VideoCodingControlFlagBitsKHR || (VideoCodingControlFlagBitsKHR = {})); -export var QueryResultStatusKHR; -!function(QueryResultStatusKHR) { - QueryResultStatusKHR[QueryResultStatusKHR.QUERY_RESULT_STATUS_ERROR_KHR = -1] = "QUERY_RESULT_STATUS_ERROR_KHR", QueryResultStatusKHR[QueryResultStatusKHR.QUERY_RESULT_STATUS_NOT_READY_KHR = 0] = "QUERY_RESULT_STATUS_NOT_READY_KHR", QueryResultStatusKHR[QueryResultStatusKHR.QUERY_RESULT_STATUS_COMPLETE_KHR = 1] = "QUERY_RESULT_STATUS_COMPLETE_KHR"; -}(QueryResultStatusKHR || (QueryResultStatusKHR = {})); -export var VideoDecodeUsageFlagBitsKHR; -!function(VideoDecodeUsageFlagBitsKHR) { - VideoDecodeUsageFlagBitsKHR[VideoDecodeUsageFlagBitsKHR.VIDEO_DECODE_USAGE_DEFAULT_KHR = 0] = "VIDEO_DECODE_USAGE_DEFAULT_KHR", VideoDecodeUsageFlagBitsKHR[VideoDecodeUsageFlagBitsKHR.VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR = 1] = "VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR", VideoDecodeUsageFlagBitsKHR[VideoDecodeUsageFlagBitsKHR.VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR = 2] = "VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR", VideoDecodeUsageFlagBitsKHR[VideoDecodeUsageFlagBitsKHR.VIDEO_DECODE_USAGE_STREAMING_BIT_KHR = 4] = "VIDEO_DECODE_USAGE_STREAMING_BIT_KHR"; -}(VideoDecodeUsageFlagBitsKHR || (VideoDecodeUsageFlagBitsKHR = {})); -export var VideoDecodeCapabilityFlagBitsKHR; -!function(VideoDecodeCapabilityFlagBitsKHR) { - VideoDecodeCapabilityFlagBitsKHR[VideoDecodeCapabilityFlagBitsKHR.VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR = 1] = "VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR", VideoDecodeCapabilityFlagBitsKHR[VideoDecodeCapabilityFlagBitsKHR.VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR = 2] = "VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR"; -}(VideoDecodeCapabilityFlagBitsKHR || (VideoDecodeCapabilityFlagBitsKHR = {})); -export var VideoEncodeUsageFlagBitsKHR; -!function(VideoEncodeUsageFlagBitsKHR) { - VideoEncodeUsageFlagBitsKHR[VideoEncodeUsageFlagBitsKHR.VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0] = "VIDEO_ENCODE_USAGE_DEFAULT_KHR", VideoEncodeUsageFlagBitsKHR[VideoEncodeUsageFlagBitsKHR.VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 1] = "VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR", VideoEncodeUsageFlagBitsKHR[VideoEncodeUsageFlagBitsKHR.VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 2] = "VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR", VideoEncodeUsageFlagBitsKHR[VideoEncodeUsageFlagBitsKHR.VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 4] = "VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR", VideoEncodeUsageFlagBitsKHR[VideoEncodeUsageFlagBitsKHR.VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 8] = "VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR"; -}(VideoEncodeUsageFlagBitsKHR || (VideoEncodeUsageFlagBitsKHR = {})); -export var VideoEncodeContentFlagBitsKHR; -!function(VideoEncodeContentFlagBitsKHR) { - VideoEncodeContentFlagBitsKHR[VideoEncodeContentFlagBitsKHR.VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0] = "VIDEO_ENCODE_CONTENT_DEFAULT_KHR", VideoEncodeContentFlagBitsKHR[VideoEncodeContentFlagBitsKHR.VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 1] = "VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR", VideoEncodeContentFlagBitsKHR[VideoEncodeContentFlagBitsKHR.VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 2] = "VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR", VideoEncodeContentFlagBitsKHR[VideoEncodeContentFlagBitsKHR.VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 4] = "VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR"; -}(VideoEncodeContentFlagBitsKHR || (VideoEncodeContentFlagBitsKHR = {})); -export var VideoEncodeTuningModeKHR; -!function(VideoEncodeTuningModeKHR) { - VideoEncodeTuningModeKHR[VideoEncodeTuningModeKHR.VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0] = "VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR", VideoEncodeTuningModeKHR[VideoEncodeTuningModeKHR.VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1] = "VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR", VideoEncodeTuningModeKHR[VideoEncodeTuningModeKHR.VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2] = "VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR", VideoEncodeTuningModeKHR[VideoEncodeTuningModeKHR.VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3] = "VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR", VideoEncodeTuningModeKHR[VideoEncodeTuningModeKHR.VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4] = "VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR"; -}(VideoEncodeTuningModeKHR || (VideoEncodeTuningModeKHR = {})); -export var VideoEncodeCapabilityFlagBitsKHR; -!function(VideoEncodeCapabilityFlagBitsKHR) { - VideoEncodeCapabilityFlagBitsKHR[VideoEncodeCapabilityFlagBitsKHR.VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 1] = "VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR"; -}(VideoEncodeCapabilityFlagBitsKHR || (VideoEncodeCapabilityFlagBitsKHR = {})); -export var VideoEncodeRateControlModeFlagBitsKHR; -!function(VideoEncodeRateControlModeFlagBitsKHR) { - VideoEncodeRateControlModeFlagBitsKHR[VideoEncodeRateControlModeFlagBitsKHR.VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR = 0] = "VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR", VideoEncodeRateControlModeFlagBitsKHR[VideoEncodeRateControlModeFlagBitsKHR.VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 1] = "VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR", VideoEncodeRateControlModeFlagBitsKHR[VideoEncodeRateControlModeFlagBitsKHR.VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 2] = "VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR"; -}(VideoEncodeRateControlModeFlagBitsKHR || (VideoEncodeRateControlModeFlagBitsKHR = {})); -export var VideoEncodeH264CapabilityFlagBitsEXT; -!function(VideoEncodeH264CapabilityFlagBitsEXT) { - VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT = 1] = "VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT = 2] = "VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 4] = "VIDEO_ENCODE_H264_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_BIT_EXT = 8] = "VIDEO_ENCODE_H264_CAPABILITY_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_SCALING_LISTS_BIT_EXT = 16] = "VIDEO_ENCODE_H264_CAPABILITY_SCALING_LISTS_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 32] = "VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT = 64] = "VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT = 128] = "VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_PIC_INIT_QP_MINUS26_BIT_EXT = 256] = "VIDEO_ENCODE_H264_CAPABILITY_PIC_INIT_QP_MINUS26_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 512] = "VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_EXPLICIT_BIT_EXT = 1024] = "VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_EXPLICIT_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_IMPLICIT_BIT_EXT = 2048] = "VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_IMPLICIT_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 4096] = "VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT = 8192] = "VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT = 16384] = "VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT = 32768] = "VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT = 65536] = "VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT = 131072] = "VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT = 262144] = "VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_DISABLE_DIRECT_SPATIAL_MV_PRED_BIT_EXT = 524288] = "VIDEO_ENCODE_H264_CAPABILITY_DISABLE_DIRECT_SPATIAL_MV_PRED_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT = 1048576] = "VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_SLICE_MB_COUNT_BIT_EXT = 2097152] = "VIDEO_ENCODE_H264_CAPABILITY_SLICE_MB_COUNT_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT = 4194304] = "VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 8388608] = "VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT", VideoEncodeH264CapabilityFlagBitsEXT[VideoEncodeH264CapabilityFlagBitsEXT.VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 16777216] = "VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT"; -}(VideoEncodeH264CapabilityFlagBitsEXT || (VideoEncodeH264CapabilityFlagBitsEXT = {})); -export var VideoEncodeH264InputModeFlagBitsEXT; -!function(VideoEncodeH264InputModeFlagBitsEXT) { - VideoEncodeH264InputModeFlagBitsEXT[VideoEncodeH264InputModeFlagBitsEXT.VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT = 1] = "VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT", VideoEncodeH264InputModeFlagBitsEXT[VideoEncodeH264InputModeFlagBitsEXT.VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT = 2] = "VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT", VideoEncodeH264InputModeFlagBitsEXT[VideoEncodeH264InputModeFlagBitsEXT.VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT = 4] = "VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT"; -}(VideoEncodeH264InputModeFlagBitsEXT || (VideoEncodeH264InputModeFlagBitsEXT = {})); -export var VideoEncodeH264OutputModeFlagBitsEXT; -!function(VideoEncodeH264OutputModeFlagBitsEXT) { - VideoEncodeH264OutputModeFlagBitsEXT[VideoEncodeH264OutputModeFlagBitsEXT.VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT = 1] = "VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT", VideoEncodeH264OutputModeFlagBitsEXT[VideoEncodeH264OutputModeFlagBitsEXT.VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT = 2] = "VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT", VideoEncodeH264OutputModeFlagBitsEXT[VideoEncodeH264OutputModeFlagBitsEXT.VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT = 4] = "VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT"; -}(VideoEncodeH264OutputModeFlagBitsEXT || (VideoEncodeH264OutputModeFlagBitsEXT = {})); -export var VideoEncodeH264RateControlStructureEXT; -!function(VideoEncodeH264RateControlStructureEXT) { - VideoEncodeH264RateControlStructureEXT[VideoEncodeH264RateControlStructureEXT.VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0] = "VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT", VideoEncodeH264RateControlStructureEXT[VideoEncodeH264RateControlStructureEXT.VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1] = "VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT", VideoEncodeH264RateControlStructureEXT[VideoEncodeH264RateControlStructureEXT.VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2] = "VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT"; -}(VideoEncodeH264RateControlStructureEXT || (VideoEncodeH264RateControlStructureEXT = {})); -export var ImageFormatConstraintsFlagBitsFUCHSIA; -ImageFormatConstraintsFlagBitsFUCHSIA || (ImageFormatConstraintsFlagBitsFUCHSIA = {}); -export var ImageConstraintsInfoFlagBitsFUCHSIA; -!function(ImageConstraintsInfoFlagBitsFUCHSIA) { - ImageConstraintsInfoFlagBitsFUCHSIA[ImageConstraintsInfoFlagBitsFUCHSIA.IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 1] = "IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA", ImageConstraintsInfoFlagBitsFUCHSIA[ImageConstraintsInfoFlagBitsFUCHSIA.IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 2] = "IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA", ImageConstraintsInfoFlagBitsFUCHSIA[ImageConstraintsInfoFlagBitsFUCHSIA.IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 4] = "IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA", ImageConstraintsInfoFlagBitsFUCHSIA[ImageConstraintsInfoFlagBitsFUCHSIA.IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 8] = "IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA", ImageConstraintsInfoFlagBitsFUCHSIA[ImageConstraintsInfoFlagBitsFUCHSIA.IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 16] = "IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA"; -}(ImageConstraintsInfoFlagBitsFUCHSIA || (ImageConstraintsInfoFlagBitsFUCHSIA = {})); -export var FormatFeatureFlagBits2; -!function(FormatFeatureFlagBits2) { - FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT = 1] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = 1] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_IMAGE_BIT = 2] = "FORMAT_FEATURE_2_STORAGE_IMAGE_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = 2] = "FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT = 4] = "FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = 4] = "FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT = 8] = "FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 8] = "FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT = 16] = "FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 16] = "FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 32] = "FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR = 32] = "FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_VERTEX_BUFFER_BIT = 64] = "FORMAT_FEATURE_2_VERTEX_BUFFER_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR = 64] = "FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT = 128] = "FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR = 128] = "FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT = 256] = "FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR = 256] = "FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT = 512] = "FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 512] = "FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_BLIT_SRC_BIT = 1024] = "FORMAT_FEATURE_2_BLIT_SRC_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR = 1024] = "FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_BLIT_DST_BIT = 2048] = "FORMAT_FEATURE_2_BLIT_DST_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_BLIT_DST_BIT_KHR = 2048] = "FORMAT_FEATURE_2_BLIT_DST_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 4096] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR = 4096] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT = 8192] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 8192] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_TRANSFER_SRC_BIT = 16384] = "FORMAT_FEATURE_2_TRANSFER_SRC_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR = 16384] = "FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_TRANSFER_DST_BIT = 32768] = "FORMAT_FEATURE_2_TRANSFER_DST_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR = 32768] = "FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 65536] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR = 65536] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT = 131072] = "FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 131072] = "FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 262144] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 262144] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 524288] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 524288] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 1048576] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 1048576] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 2097152] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 2097152] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_DISJOINT_BIT = 4194304] = "FORMAT_FEATURE_2_DISJOINT_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_DISJOINT_BIT_KHR = 4194304] = "FORMAT_FEATURE_2_DISJOINT_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT = 8388608] = "FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR = 8388608] = "FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT = 2147483648] = "FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = 2147483648] = "FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT = 4294967296] = "FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = 4294967296] = "FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT = 8589934592] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = 8589934592] = "FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR = 33554432] = "FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR = 67108864] = "FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 536870912] = "FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 16777216] = "FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1073741824] = "FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_RESERVED_44_BIT_EXT = 17592186044416] = "FORMAT_FEATURE_2_RESERVED_44_BIT_EXT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_RESERVED_45_BIT_EXT = 35184372088832] = "FORMAT_FEATURE_2_RESERVED_45_BIT_EXT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 134217728] = "FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 268435456] = "FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV = 274877906944] = "FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM = 17179869184] = "FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM = 34359738368] = "FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM = 68719476736] = "FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM = 137438953472] = "FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_RESERVED_39_BIT_EXT = 549755813888] = "FORMAT_FEATURE_2_RESERVED_39_BIT_EXT", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV = 1099511627776] = "FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV = 2199023255552] = "FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV", FormatFeatureFlagBits2[FormatFeatureFlagBits2.FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV = 4398046511104] = "FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV"; -}(FormatFeatureFlagBits2 || (FormatFeatureFlagBits2 = {})); -export var RenderingFlagBits; -!function(RenderingFlagBits) { - RenderingFlagBits[RenderingFlagBits.CONTENTS_SECONDARY_COMMAND_BUFFERS = 1] = "CONTENTS_SECONDARY_COMMAND_BUFFERS", RenderingFlagBits[RenderingFlagBits.CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR = 1] = "CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR", RenderingFlagBits[RenderingFlagBits.SUSPENDING = 2] = "SUSPENDING", RenderingFlagBits[RenderingFlagBits.SUSPENDING_BIT_KHR = 2] = "SUSPENDING_BIT_KHR", RenderingFlagBits[RenderingFlagBits.RESUMING = 4] = "RESUMING", RenderingFlagBits[RenderingFlagBits.RESUMING_BIT_KHR = 4] = "RESUMING_BIT_KHR", RenderingFlagBits[RenderingFlagBits.ENABLE_LEGACY_DITHERING_BIT_EXT = 8] = "ENABLE_LEGACY_DITHERING_BIT_EXT"; -}(RenderingFlagBits || (RenderingFlagBits = {})); -export var VideoEncodeH265CapabilityFlagBitsEXT; -!function(VideoEncodeH265CapabilityFlagBitsEXT) { - VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 1] = "VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT = 2] = "VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_SAMPLE_ADAPTIVE_OFFSET_ENABLED_BIT_EXT = 4] = "VIDEO_ENCODE_H265_CAPABILITY_SAMPLE_ADAPTIVE_OFFSET_ENABLED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_PCM_ENABLE_BIT_EXT = 8] = "VIDEO_ENCODE_H265_CAPABILITY_PCM_ENABLE_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_SPS_TEMPORAL_MVP_ENABLED_BIT_EXT = 16] = "VIDEO_ENCODE_H265_CAPABILITY_SPS_TEMPORAL_MVP_ENABLED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 32] = "VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_INIT_QP_MINUS26_BIT_EXT = 64] = "VIDEO_ENCODE_H265_CAPABILITY_INIT_QP_MINUS26_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT = 128] = "VIDEO_ENCODE_H265_CAPABILITY_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_SIGN_DATA_HIDING_ENABLED_BIT_EXT = 256] = "VIDEO_ENCODE_H265_CAPABILITY_SIGN_DATA_HIDING_ENABLED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_ENABLED_BIT_EXT = 512] = "VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_ENABLED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_DISABLED_BIT_EXT = 1024] = "VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_DISABLED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_BIT_EXT = 2048] = "VIDEO_ENCODE_H265_CAPABILITY_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 4096] = "VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_BIPRED_BIT_EXT = 8192] = "VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_BIPRED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 16384] = "VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_TRANSQUANT_BYPASS_ENABLED_BIT_EXT = 32768] = "VIDEO_ENCODE_H265_CAPABILITY_TRANSQUANT_BYPASS_ENABLED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_ENTROPY_CODING_SYNC_ENABLED_BIT_EXT = 65536] = "VIDEO_ENCODE_H265_CAPABILITY_ENTROPY_CODING_SYNC_ENABLED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_DEBLOCKING_FILTER_OVERRIDE_ENABLED_BIT_EXT = 131072] = "VIDEO_ENCODE_H265_CAPABILITY_DEBLOCKING_FILTER_OVERRIDE_ENABLED_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_FRAME_BIT_EXT = 262144] = "VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_FRAME_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_PER_TILE_BIT_EXT = 524288] = "VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_PER_TILE_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_SLICE_BIT_EXT = 1048576] = "VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_SLICE_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_SLICE_SEGMENT_CTB_COUNT_BIT_EXT = 2097152] = "VIDEO_ENCODE_H265_CAPABILITY_SLICE_SEGMENT_CTB_COUNT_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT = 4194304] = "VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT = 8388608] = "VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 16777216] = "VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT", VideoEncodeH265CapabilityFlagBitsEXT[VideoEncodeH265CapabilityFlagBitsEXT.VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 33554432] = "VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT"; -}(VideoEncodeH265CapabilityFlagBitsEXT || (VideoEncodeH265CapabilityFlagBitsEXT = {})); -export var VideoEncodeH265InputModeFlagBitsEXT; -!function(VideoEncodeH265InputModeFlagBitsEXT) { - VideoEncodeH265InputModeFlagBitsEXT[VideoEncodeH265InputModeFlagBitsEXT.VIDEO_ENCODE_H265_INPUT_MODE_FRAME_BIT_EXT = 1] = "VIDEO_ENCODE_H265_INPUT_MODE_FRAME_BIT_EXT", VideoEncodeH265InputModeFlagBitsEXT[VideoEncodeH265InputModeFlagBitsEXT.VIDEO_ENCODE_H265_INPUT_MODE_SLICE_SEGMENT_BIT_EXT = 2] = "VIDEO_ENCODE_H265_INPUT_MODE_SLICE_SEGMENT_BIT_EXT", VideoEncodeH265InputModeFlagBitsEXT[VideoEncodeH265InputModeFlagBitsEXT.VIDEO_ENCODE_H265_INPUT_MODE_NON_VCL_BIT_EXT = 4] = "VIDEO_ENCODE_H265_INPUT_MODE_NON_VCL_BIT_EXT"; -}(VideoEncodeH265InputModeFlagBitsEXT || (VideoEncodeH265InputModeFlagBitsEXT = {})); -export var VideoEncodeH265OutputModeFlagBitsEXT; -!function(VideoEncodeH265OutputModeFlagBitsEXT) { - VideoEncodeH265OutputModeFlagBitsEXT[VideoEncodeH265OutputModeFlagBitsEXT.VIDEO_ENCODE_H265_OUTPUT_MODE_FRAME_BIT_EXT = 1] = "VIDEO_ENCODE_H265_OUTPUT_MODE_FRAME_BIT_EXT", VideoEncodeH265OutputModeFlagBitsEXT[VideoEncodeH265OutputModeFlagBitsEXT.VIDEO_ENCODE_H265_OUTPUT_MODE_SLICE_SEGMENT_BIT_EXT = 2] = "VIDEO_ENCODE_H265_OUTPUT_MODE_SLICE_SEGMENT_BIT_EXT", VideoEncodeH265OutputModeFlagBitsEXT[VideoEncodeH265OutputModeFlagBitsEXT.VIDEO_ENCODE_H265_OUTPUT_MODE_NON_VCL_BIT_EXT = 4] = "VIDEO_ENCODE_H265_OUTPUT_MODE_NON_VCL_BIT_EXT"; -}(VideoEncodeH265OutputModeFlagBitsEXT || (VideoEncodeH265OutputModeFlagBitsEXT = {})); -export var VideoEncodeH265RateControlStructureEXT; -!function(VideoEncodeH265RateControlStructureEXT) { - VideoEncodeH265RateControlStructureEXT[VideoEncodeH265RateControlStructureEXT.VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0] = "VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT", VideoEncodeH265RateControlStructureEXT[VideoEncodeH265RateControlStructureEXT.VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1] = "VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT", VideoEncodeH265RateControlStructureEXT[VideoEncodeH265RateControlStructureEXT.VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2] = "VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT"; -}(VideoEncodeH265RateControlStructureEXT || (VideoEncodeH265RateControlStructureEXT = {})); -export var VideoEncodeH265CtbSizeFlagBitsEXT; -!function(VideoEncodeH265CtbSizeFlagBitsEXT) { - VideoEncodeH265CtbSizeFlagBitsEXT[VideoEncodeH265CtbSizeFlagBitsEXT.VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT = 1] = "VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT", VideoEncodeH265CtbSizeFlagBitsEXT[VideoEncodeH265CtbSizeFlagBitsEXT.VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT = 2] = "VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT", VideoEncodeH265CtbSizeFlagBitsEXT[VideoEncodeH265CtbSizeFlagBitsEXT.VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT = 4] = "VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT"; -}(VideoEncodeH265CtbSizeFlagBitsEXT || (VideoEncodeH265CtbSizeFlagBitsEXT = {})); -export var VideoEncodeH265TransformBlockSizeFlagBitsEXT; -!function(VideoEncodeH265TransformBlockSizeFlagBitsEXT) { - VideoEncodeH265TransformBlockSizeFlagBitsEXT[VideoEncodeH265TransformBlockSizeFlagBitsEXT.VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT = 1] = "VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT", VideoEncodeH265TransformBlockSizeFlagBitsEXT[VideoEncodeH265TransformBlockSizeFlagBitsEXT.VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT = 2] = "VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT", VideoEncodeH265TransformBlockSizeFlagBitsEXT[VideoEncodeH265TransformBlockSizeFlagBitsEXT.VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT = 4] = "VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT", VideoEncodeH265TransformBlockSizeFlagBitsEXT[VideoEncodeH265TransformBlockSizeFlagBitsEXT.VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT = 8] = "VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT"; -}(VideoEncodeH265TransformBlockSizeFlagBitsEXT || (VideoEncodeH265TransformBlockSizeFlagBitsEXT = {})); -export var ExportMetalObjectTypeFlagBitsEXT; -!function(ExportMetalObjectTypeFlagBitsEXT) { - ExportMetalObjectTypeFlagBitsEXT[ExportMetalObjectTypeFlagBitsEXT.EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 1] = "EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT", ExportMetalObjectTypeFlagBitsEXT[ExportMetalObjectTypeFlagBitsEXT.EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 2] = "EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT", ExportMetalObjectTypeFlagBitsEXT[ExportMetalObjectTypeFlagBitsEXT.EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 4] = "EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT", ExportMetalObjectTypeFlagBitsEXT[ExportMetalObjectTypeFlagBitsEXT.EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 8] = "EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT", ExportMetalObjectTypeFlagBitsEXT[ExportMetalObjectTypeFlagBitsEXT.EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 16] = "EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT", ExportMetalObjectTypeFlagBitsEXT[ExportMetalObjectTypeFlagBitsEXT.EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 32] = "EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT"; -}(ExportMetalObjectTypeFlagBitsEXT || (ExportMetalObjectTypeFlagBitsEXT = {})); -export var InstanceCreateFlagBits; -!function(InstanceCreateFlagBits) { - InstanceCreateFlagBits[InstanceCreateFlagBits.ENUMERATE_PORTABILITY_BIT_KHR = 1] = "ENUMERATE_PORTABILITY_BIT_KHR"; -}(InstanceCreateFlagBits || (InstanceCreateFlagBits = {})); -export var ImageCompressionFlagBitsEXT; -!function(ImageCompressionFlagBitsEXT) { - ImageCompressionFlagBitsEXT[ImageCompressionFlagBitsEXT.IMAGE_COMPRESSION_DEFAULT_EXT = 0] = "IMAGE_COMPRESSION_DEFAULT_EXT", ImageCompressionFlagBitsEXT[ImageCompressionFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT = 1] = "IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT", ImageCompressionFlagBitsEXT[ImageCompressionFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT = 2] = "IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT", ImageCompressionFlagBitsEXT[ImageCompressionFlagBitsEXT.IMAGE_COMPRESSION_DISABLED_EXT = 4] = "IMAGE_COMPRESSION_DISABLED_EXT"; -}(ImageCompressionFlagBitsEXT || (ImageCompressionFlagBitsEXT = {})); -export var ImageCompressionFixedRateFlagBitsEXT; -!function(ImageCompressionFixedRateFlagBitsEXT) { - ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT = 0] = "IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT = 1] = "IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT = 2] = "IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT = 4] = "IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT = 8] = "IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT = 16] = "IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT = 32] = "IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT = 64] = "IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT = 128] = "IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT = 256] = "IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT = 512] = "IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT = 1024] = "IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT = 2048] = "IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT = 4096] = "IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT = 8192] = "IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT = 16384] = "IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT = 32768] = "IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT = 65536] = "IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT = 131072] = "IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT = 262144] = "IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT = 524288] = "IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT = 1048576] = "IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT = 2097152] = "IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT = 4194304] = "IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT", ImageCompressionFixedRateFlagBitsEXT[ImageCompressionFixedRateFlagBitsEXT.IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT = 8388608] = "IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT"; -}(ImageCompressionFixedRateFlagBitsEXT || (ImageCompressionFixedRateFlagBitsEXT = {})); -export var PipelineRobustnessBufferBehaviorEXT; -!function(PipelineRobustnessBufferBehaviorEXT) { - PipelineRobustnessBufferBehaviorEXT[PipelineRobustnessBufferBehaviorEXT.PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT = 0] = "PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT", PipelineRobustnessBufferBehaviorEXT[PipelineRobustnessBufferBehaviorEXT.PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT = 1] = "PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT", PipelineRobustnessBufferBehaviorEXT[PipelineRobustnessBufferBehaviorEXT.PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT = 2] = "PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT", PipelineRobustnessBufferBehaviorEXT[PipelineRobustnessBufferBehaviorEXT.PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT = 3] = "PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT"; -}(PipelineRobustnessBufferBehaviorEXT || (PipelineRobustnessBufferBehaviorEXT = {})); -export var PipelineRobustnessImageBehaviorEXT; -!function(PipelineRobustnessImageBehaviorEXT) { - PipelineRobustnessImageBehaviorEXT[PipelineRobustnessImageBehaviorEXT.PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT = 0] = "PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT", PipelineRobustnessImageBehaviorEXT[PipelineRobustnessImageBehaviorEXT.PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT = 1] = "PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT", PipelineRobustnessImageBehaviorEXT[PipelineRobustnessImageBehaviorEXT.PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT = 2] = "PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT", PipelineRobustnessImageBehaviorEXT[PipelineRobustnessImageBehaviorEXT.PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT = 3] = "PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT"; -}(PipelineRobustnessImageBehaviorEXT || (PipelineRobustnessImageBehaviorEXT = {})); -export var OpticalFlowGridSizeFlagBitsNV; -!function(OpticalFlowGridSizeFlagBitsNV) { - OpticalFlowGridSizeFlagBitsNV[OpticalFlowGridSizeFlagBitsNV.OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV = 0] = "OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV", OpticalFlowGridSizeFlagBitsNV[OpticalFlowGridSizeFlagBitsNV.OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV = 1] = "OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV", OpticalFlowGridSizeFlagBitsNV[OpticalFlowGridSizeFlagBitsNV.OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV = 2] = "OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV", OpticalFlowGridSizeFlagBitsNV[OpticalFlowGridSizeFlagBitsNV.OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV = 4] = "OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV", OpticalFlowGridSizeFlagBitsNV[OpticalFlowGridSizeFlagBitsNV.OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV = 8] = "OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV"; -}(OpticalFlowGridSizeFlagBitsNV || (OpticalFlowGridSizeFlagBitsNV = {})); -export var OpticalFlowUsageFlagBitsNV; -!function(OpticalFlowUsageFlagBitsNV) { - OpticalFlowUsageFlagBitsNV[OpticalFlowUsageFlagBitsNV.OPTICAL_FLOW_USAGE_UNKNOWN_NV = 0] = "OPTICAL_FLOW_USAGE_UNKNOWN_NV", OpticalFlowUsageFlagBitsNV[OpticalFlowUsageFlagBitsNV.OPTICAL_FLOW_USAGE_INPUT_BIT_NV = 1] = "OPTICAL_FLOW_USAGE_INPUT_BIT_NV", OpticalFlowUsageFlagBitsNV[OpticalFlowUsageFlagBitsNV.OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV = 2] = "OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV", OpticalFlowUsageFlagBitsNV[OpticalFlowUsageFlagBitsNV.OPTICAL_FLOW_USAGE_HINT_BIT_NV = 4] = "OPTICAL_FLOW_USAGE_HINT_BIT_NV", OpticalFlowUsageFlagBitsNV[OpticalFlowUsageFlagBitsNV.OPTICAL_FLOW_USAGE_COST_BIT_NV = 8] = "OPTICAL_FLOW_USAGE_COST_BIT_NV", OpticalFlowUsageFlagBitsNV[OpticalFlowUsageFlagBitsNV.OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV = 16] = "OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV"; -}(OpticalFlowUsageFlagBitsNV || (OpticalFlowUsageFlagBitsNV = {})); -export var OpticalFlowPerformanceLevelNV; -!function(OpticalFlowPerformanceLevelNV) { - OpticalFlowPerformanceLevelNV[OpticalFlowPerformanceLevelNV.OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV = 0] = "OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV", OpticalFlowPerformanceLevelNV[OpticalFlowPerformanceLevelNV.OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV = 1] = "OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV", OpticalFlowPerformanceLevelNV[OpticalFlowPerformanceLevelNV.OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV = 2] = "OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV", OpticalFlowPerformanceLevelNV[OpticalFlowPerformanceLevelNV.OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV = 3] = "OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV"; -}(OpticalFlowPerformanceLevelNV || (OpticalFlowPerformanceLevelNV = {})); -export var OpticalFlowSessionBindingPointNV; -!function(OpticalFlowSessionBindingPointNV) { - OpticalFlowSessionBindingPointNV[OpticalFlowSessionBindingPointNV.OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV = 0] = "OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV", OpticalFlowSessionBindingPointNV[OpticalFlowSessionBindingPointNV.OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV = 1] = "OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV", OpticalFlowSessionBindingPointNV[OpticalFlowSessionBindingPointNV.OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV = 2] = "OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV", OpticalFlowSessionBindingPointNV[OpticalFlowSessionBindingPointNV.OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV = 3] = "OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV", OpticalFlowSessionBindingPointNV[OpticalFlowSessionBindingPointNV.OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV = 4] = "OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV", OpticalFlowSessionBindingPointNV[OpticalFlowSessionBindingPointNV.OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV = 5] = "OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV", OpticalFlowSessionBindingPointNV[OpticalFlowSessionBindingPointNV.OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV = 6] = "OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV", OpticalFlowSessionBindingPointNV[OpticalFlowSessionBindingPointNV.OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV = 7] = "OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV", OpticalFlowSessionBindingPointNV[OpticalFlowSessionBindingPointNV.OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV = 8] = "OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV"; -}(OpticalFlowSessionBindingPointNV || (OpticalFlowSessionBindingPointNV = {})); -export var OpticalFlowSessionCreateFlagBitsNV; -!function(OpticalFlowSessionCreateFlagBitsNV) { - OpticalFlowSessionCreateFlagBitsNV[OpticalFlowSessionCreateFlagBitsNV.OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV = 1] = "OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV", OpticalFlowSessionCreateFlagBitsNV[OpticalFlowSessionCreateFlagBitsNV.OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV = 2] = "OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV", OpticalFlowSessionCreateFlagBitsNV[OpticalFlowSessionCreateFlagBitsNV.OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV = 4] = "OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV", OpticalFlowSessionCreateFlagBitsNV[OpticalFlowSessionCreateFlagBitsNV.OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV = 8] = "OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV", OpticalFlowSessionCreateFlagBitsNV[OpticalFlowSessionCreateFlagBitsNV.OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV = 16] = "OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV"; -}(OpticalFlowSessionCreateFlagBitsNV || (OpticalFlowSessionCreateFlagBitsNV = {})); -export var OpticalFlowExecuteFlagBitsNV; -!function(OpticalFlowExecuteFlagBitsNV) { - OpticalFlowExecuteFlagBitsNV[OpticalFlowExecuteFlagBitsNV.OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV = 1] = "OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV"; -}(OpticalFlowExecuteFlagBitsNV || (OpticalFlowExecuteFlagBitsNV = {})); -export var MicromapTypeEXT; -!function(MicromapTypeEXT) { - MicromapTypeEXT[MicromapTypeEXT.MICROMAP_TYPE_OPACITY_MICROMAP_EXT = 0] = "MICROMAP_TYPE_OPACITY_MICROMAP_EXT"; -}(MicromapTypeEXT || (MicromapTypeEXT = {})); -export var BuildMicromapFlagBitsEXT; -!function(BuildMicromapFlagBitsEXT) { - BuildMicromapFlagBitsEXT[BuildMicromapFlagBitsEXT.BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT = 1] = "BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT", BuildMicromapFlagBitsEXT[BuildMicromapFlagBitsEXT.BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT = 2] = "BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT", BuildMicromapFlagBitsEXT[BuildMicromapFlagBitsEXT.BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT = 4] = "BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT"; -}(BuildMicromapFlagBitsEXT || (BuildMicromapFlagBitsEXT = {})); -export var MicromapCreateFlagBitsEXT; -!function(MicromapCreateFlagBitsEXT) { - MicromapCreateFlagBitsEXT[MicromapCreateFlagBitsEXT.MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 1] = "MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT"; -}(MicromapCreateFlagBitsEXT || (MicromapCreateFlagBitsEXT = {})); -export var CopyMicromapModeEXT; -!function(CopyMicromapModeEXT) { - CopyMicromapModeEXT[CopyMicromapModeEXT.COPY_MICROMAP_MODE_CLONE_EXT = 0] = "COPY_MICROMAP_MODE_CLONE_EXT", CopyMicromapModeEXT[CopyMicromapModeEXT.COPY_MICROMAP_MODE_SERIALIZE_EXT = 1] = "COPY_MICROMAP_MODE_SERIALIZE_EXT", CopyMicromapModeEXT[CopyMicromapModeEXT.COPY_MICROMAP_MODE_DESERIALIZE_EXT = 2] = "COPY_MICROMAP_MODE_DESERIALIZE_EXT", CopyMicromapModeEXT[CopyMicromapModeEXT.COPY_MICROMAP_MODE_COMPACT_EXT = 3] = "COPY_MICROMAP_MODE_COMPACT_EXT"; -}(CopyMicromapModeEXT || (CopyMicromapModeEXT = {})); -export var BuildMicromapModeEXT; -!function(BuildMicromapModeEXT) { - BuildMicromapModeEXT[BuildMicromapModeEXT.BUILD_MICROMAP_MODE_BUILD_EXT = 0] = "BUILD_MICROMAP_MODE_BUILD_EXT"; -}(BuildMicromapModeEXT || (BuildMicromapModeEXT = {})); -export var OpacityMicromapFormatEXT; -!function(OpacityMicromapFormatEXT) { - OpacityMicromapFormatEXT[OpacityMicromapFormatEXT.OPACITY_MICROMAP_FORMAT_2_STATE_EXT = 1] = "OPACITY_MICROMAP_FORMAT_2_STATE_EXT", OpacityMicromapFormatEXT[OpacityMicromapFormatEXT.OPACITY_MICROMAP_FORMAT_4_STATE_EXT = 2] = "OPACITY_MICROMAP_FORMAT_4_STATE_EXT"; -}(OpacityMicromapFormatEXT || (OpacityMicromapFormatEXT = {})); -export var OpacityMicromapSpecialIndexEXT; -!function(OpacityMicromapSpecialIndexEXT) { - OpacityMicromapSpecialIndexEXT[OpacityMicromapSpecialIndexEXT.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT = -1] = "OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT", OpacityMicromapSpecialIndexEXT[OpacityMicromapSpecialIndexEXT.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT = -2] = "OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT", OpacityMicromapSpecialIndexEXT[OpacityMicromapSpecialIndexEXT.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT = -3] = "OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT", OpacityMicromapSpecialIndexEXT[OpacityMicromapSpecialIndexEXT.OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT = -4] = "OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT"; -}(OpacityMicromapSpecialIndexEXT || (OpacityMicromapSpecialIndexEXT = {})); -export var DeviceFaultAddressTypeEXT; -!function(DeviceFaultAddressTypeEXT) { - DeviceFaultAddressTypeEXT[DeviceFaultAddressTypeEXT.DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT = 0] = "DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT", DeviceFaultAddressTypeEXT[DeviceFaultAddressTypeEXT.DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT = 1] = "DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT", DeviceFaultAddressTypeEXT[DeviceFaultAddressTypeEXT.DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT = 2] = "DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT", DeviceFaultAddressTypeEXT[DeviceFaultAddressTypeEXT.DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT = 3] = "DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT", DeviceFaultAddressTypeEXT[DeviceFaultAddressTypeEXT.DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT = 4] = "DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT", DeviceFaultAddressTypeEXT[DeviceFaultAddressTypeEXT.DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT = 5] = "DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT", DeviceFaultAddressTypeEXT[DeviceFaultAddressTypeEXT.DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT = 6] = "DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT"; -}(DeviceFaultAddressTypeEXT || (DeviceFaultAddressTypeEXT = {})); -export var DeviceFaultVendorBinaryHeaderVersionEXT; -!function(DeviceFaultVendorBinaryHeaderVersionEXT) { - DeviceFaultVendorBinaryHeaderVersionEXT[DeviceFaultVendorBinaryHeaderVersionEXT.DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT = 1] = "DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT"; -}(DeviceFaultVendorBinaryHeaderVersionEXT || (DeviceFaultVendorBinaryHeaderVersionEXT = {})); -export class StdVideoH264SpsVuiFlags { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH264SpsVuiFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SpsVuiFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264SpsVuiFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH264SpsVuiFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.aspect_ratio_info_present_flag && (this.aspect_ratio_info_present_flag = data.aspect_ratio_info_present_flag), void 0 !== data.overscan_info_present_flag && (this.overscan_info_present_flag = data.overscan_info_present_flag), void 0 !== data.overscan_appropriate_flag && (this.overscan_appropriate_flag = data.overscan_appropriate_flag), void 0 !== data.video_signal_type_present_flag && (this.video_signal_type_present_flag = data.video_signal_type_present_flag), void 0 !== data.video_full_range_flag && (this.video_full_range_flag = data.video_full_range_flag), void 0 !== data.color_description_present_flag && (this.color_description_present_flag = data.color_description_present_flag), void 0 !== data.chroma_loc_info_present_flag && (this.chroma_loc_info_present_flag = data.chroma_loc_info_present_flag), void 0 !== data.timing_info_present_flag && (this.timing_info_present_flag = data.timing_info_present_flag), void 0 !== data.fixed_frame_rate_flag && (this.fixed_frame_rate_flag = data.fixed_frame_rate_flag), void 0 !== data.bitstream_restriction_flag && (this.bitstream_restriction_flag = data.bitstream_restriction_flag), void 0 !== data.nal_hrd_parameters_present_flag && (this.nal_hrd_parameters_present_flag = data.nal_hrd_parameters_present_flag), void 0 !== data.vcl_hrd_parameters_present_flag && (this.vcl_hrd_parameters_present_flag = data.vcl_hrd_parameters_present_flag); - } - get aspect_ratio_info_present_flag() { - return this.#view.getUint32(0, LE); - } - set aspect_ratio_info_present_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get overscan_info_present_flag() { - return this.#view.getUint32(4, LE); - } - set overscan_info_present_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get overscan_appropriate_flag() { - return this.#view.getUint32(8, LE); - } - set overscan_appropriate_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get video_signal_type_present_flag() { - return this.#view.getUint32(12, LE); - } - set video_signal_type_present_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get video_full_range_flag() { - return this.#view.getUint32(16, LE); - } - set video_full_range_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } - get color_description_present_flag() { - return this.#view.getUint32(20, LE); - } - set color_description_present_flag(value) { - this.#view.setUint32(20, Number(value), LE); - } - get chroma_loc_info_present_flag() { - return this.#view.getUint32(24, LE); - } - set chroma_loc_info_present_flag(value) { - this.#view.setUint32(24, Number(value), LE); - } - get timing_info_present_flag() { - return this.#view.getUint32(28, LE); - } - set timing_info_present_flag(value) { - this.#view.setUint32(28, Number(value), LE); - } - get fixed_frame_rate_flag() { - return this.#view.getUint32(32, LE); - } - set fixed_frame_rate_flag(value) { - this.#view.setUint32(32, Number(value), LE); - } - get bitstream_restriction_flag() { - return this.#view.getUint32(36, LE); - } - set bitstream_restriction_flag(value) { - this.#view.setUint32(36, Number(value), LE); - } - get nal_hrd_parameters_present_flag() { - return this.#view.getUint32(40, LE); - } - set nal_hrd_parameters_present_flag(value) { - this.#view.setUint32(40, Number(value), LE); - } - get vcl_hrd_parameters_present_flag() { - return this.#view.getUint32(44, LE); - } - set vcl_hrd_parameters_present_flag(value) { - this.#view.setUint32(44, Number(value), LE); - } -} -export class StdVideoH264HrdParameters { - static size = 308; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH264HrdParameters.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264HrdParameters.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264HrdParameters.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH264HrdParameters.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.cpb_cnt_minus1 && (this.cpb_cnt_minus1 = data.cpb_cnt_minus1), void 0 !== data.bit_rate_scale && (this.bit_rate_scale = data.bit_rate_scale), void 0 !== data.cpb_size_scale && (this.cpb_size_scale = data.cpb_size_scale), void 0 !== data.reserved1 && (this.reserved1 = data.reserved1), void 0 !== data.bit_rate_value_minus1 && (this.bit_rate_value_minus1 = data.bit_rate_value_minus1), void 0 !== data.cpb_size_value_minus1 && (this.cpb_size_value_minus1 = data.cpb_size_value_minus1), void 0 !== data.cbr_flag && (this.cbr_flag = data.cbr_flag), void 0 !== data.initial_cpb_removal_delay_length_minus1 && (this.initial_cpb_removal_delay_length_minus1 = data.initial_cpb_removal_delay_length_minus1), void 0 !== data.cpb_removal_delay_length_minus1 && (this.cpb_removal_delay_length_minus1 = data.cpb_removal_delay_length_minus1), void 0 !== data.dpb_output_delay_length_minus1 && (this.dpb_output_delay_length_minus1 = data.dpb_output_delay_length_minus1), void 0 !== data.time_offset_length && (this.time_offset_length = data.time_offset_length); - } - get cpb_cnt_minus1() { - return this.#view.getUint8(0); - } - set cpb_cnt_minus1(value) { - this.#view.setUint8(0, Number(value)); - } - get bit_rate_scale() { - return this.#view.getUint8(1); - } - set bit_rate_scale(value) { - this.#view.setUint8(1, Number(value)); - } - get cpb_size_scale() { - return this.#view.getUint8(2); - } - set cpb_size_scale(value) { - this.#view.setUint8(2, Number(value)); - } - get reserved1() { - return this.#view.getUint8(3); - } - set reserved1(value) { - this.#view.setUint8(3, Number(value)); - } - get bit_rate_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 4, 32); - } - set bit_rate_value_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 4); - } - get cpb_size_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 132, 32); - } - set cpb_size_value_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 132); - } - get cbr_flag() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 260, 32); - } - set cbr_flag(value) { - this.#data.set(new Uint8Array(value.buffer), 260); - } - get initial_cpb_removal_delay_length_minus1() { - return this.#view.getUint32(292, LE); - } - set initial_cpb_removal_delay_length_minus1(value) { - this.#view.setUint32(292, Number(value), LE); - } - get cpb_removal_delay_length_minus1() { - return this.#view.getUint32(296, LE); - } - set cpb_removal_delay_length_minus1(value) { - this.#view.setUint32(296, Number(value), LE); - } - get dpb_output_delay_length_minus1() { - return this.#view.getUint32(300, LE); - } - set dpb_output_delay_length_minus1(value) { - this.#view.setUint32(300, Number(value), LE); - } - get time_offset_length() { - return this.#view.getUint32(304, LE); - } - set time_offset_length(value) { - this.#view.setUint32(304, Number(value), LE); - } -} -export class StdVideoH264SequenceParameterSetVui { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH264SequenceParameterSetVui.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SequenceParameterSetVui.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264SequenceParameterSetVui.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH264SequenceParameterSetVui.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.aspect_ratio_idc && (this.aspect_ratio_idc = data.aspect_ratio_idc), void 0 !== data.sar_width && (this.sar_width = data.sar_width), void 0 !== data.sar_height && (this.sar_height = data.sar_height), void 0 !== data.video_format && (this.video_format = data.video_format), void 0 !== data.colour_primaries && (this.colour_primaries = data.colour_primaries), void 0 !== data.transfer_characteristics && (this.transfer_characteristics = data.transfer_characteristics), void 0 !== data.matrix_coefficients && (this.matrix_coefficients = data.matrix_coefficients), void 0 !== data.num_units_in_tick && (this.num_units_in_tick = data.num_units_in_tick), void 0 !== data.time_scale && (this.time_scale = data.time_scale), void 0 !== data.max_num_reorder_frames && (this.max_num_reorder_frames = data.max_num_reorder_frames), void 0 !== data.max_dec_frame_buffering && (this.max_dec_frame_buffering = data.max_dec_frame_buffering), void 0 !== data.chroma_sample_loc_type_top_field && (this.chroma_sample_loc_type_top_field = data.chroma_sample_loc_type_top_field), void 0 !== data.chroma_sample_loc_type_bottom_field && (this.chroma_sample_loc_type_bottom_field = data.chroma_sample_loc_type_bottom_field), void 0 !== data.reserved1 && (this.reserved1 = data.reserved1), void 0 !== data.pHrdParameters && (this.pHrdParameters = data.pHrdParameters); - } - get flags() { - return new StdVideoH264SpsVuiFlags(this.#data.subarray(0, 0 + StdVideoH264SpsVuiFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH264SpsVuiFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get aspect_ratio_idc() { - return this.#view.getUint32(48, LE); - } - set aspect_ratio_idc(value) { - this.#view.setUint32(48, Number(value), LE); - } - get sar_width() { - return this.#view.getUint16(52, LE); - } - set sar_width(value) { - this.#view.setUint16(52, Number(value), LE); - } - get sar_height() { - return this.#view.getUint16(54, LE); - } - set sar_height(value) { - this.#view.setUint16(54, Number(value), LE); - } - get video_format() { - return this.#view.getUint8(56); - } - set video_format(value) { - this.#view.setUint8(56, Number(value)); - } - get colour_primaries() { - return this.#view.getUint8(57); - } - set colour_primaries(value) { - this.#view.setUint8(57, Number(value)); - } - get transfer_characteristics() { - return this.#view.getUint8(58); - } - set transfer_characteristics(value) { - this.#view.setUint8(58, Number(value)); - } - get matrix_coefficients() { - return this.#view.getUint8(59); - } - set matrix_coefficients(value) { - this.#view.setUint8(59, Number(value)); - } - get num_units_in_tick() { - return this.#view.getUint32(60, LE); - } - set num_units_in_tick(value) { - this.#view.setUint32(60, Number(value), LE); - } - get time_scale() { - return this.#view.getUint32(64, LE); - } - set time_scale(value) { - this.#view.setUint32(64, Number(value), LE); - } - get max_num_reorder_frames() { - return this.#view.getUint8(68); - } - set max_num_reorder_frames(value) { - this.#view.setUint8(68, Number(value)); - } - get max_dec_frame_buffering() { - return this.#view.getUint8(69); - } - set max_dec_frame_buffering(value) { - this.#view.setUint8(69, Number(value)); - } - get chroma_sample_loc_type_top_field() { - return this.#view.getUint8(70); - } - set chroma_sample_loc_type_top_field(value) { - this.#view.setUint8(70, Number(value)); - } - get chroma_sample_loc_type_bottom_field() { - return this.#view.getUint8(71); - } - set chroma_sample_loc_type_bottom_field(value) { - this.#view.setUint8(71, Number(value)); - } - get reserved1() { - return this.#view.getUint32(72, LE); - } - set reserved1(value) { - this.#view.setUint32(72, Number(value), LE); - } - get pHrdParameters() { - return this.#view.getBigUint64(80, LE); - } - set pHrdParameters(value) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoH264SpsFlags { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH264SpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SpsFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264SpsFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH264SpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.constraint_set0_flag && (this.constraint_set0_flag = data.constraint_set0_flag), void 0 !== data.constraint_set1_flag && (this.constraint_set1_flag = data.constraint_set1_flag), void 0 !== data.constraint_set2_flag && (this.constraint_set2_flag = data.constraint_set2_flag), void 0 !== data.constraint_set3_flag && (this.constraint_set3_flag = data.constraint_set3_flag), void 0 !== data.constraint_set4_flag && (this.constraint_set4_flag = data.constraint_set4_flag), void 0 !== data.constraint_set5_flag && (this.constraint_set5_flag = data.constraint_set5_flag), void 0 !== data.direct_8x8_inference_flag && (this.direct_8x8_inference_flag = data.direct_8x8_inference_flag), void 0 !== data.mb_adaptive_frame_field_flag && (this.mb_adaptive_frame_field_flag = data.mb_adaptive_frame_field_flag), void 0 !== data.frame_mbs_only_flag && (this.frame_mbs_only_flag = data.frame_mbs_only_flag), void 0 !== data.delta_pic_order_always_zero_flag && (this.delta_pic_order_always_zero_flag = data.delta_pic_order_always_zero_flag), void 0 !== data.separate_colour_plane_flag && (this.separate_colour_plane_flag = data.separate_colour_plane_flag), void 0 !== data.gaps_in_frame_num_value_allowed_flag && (this.gaps_in_frame_num_value_allowed_flag = data.gaps_in_frame_num_value_allowed_flag), void 0 !== data.qpprime_y_zero_transform_bypass_flag && (this.qpprime_y_zero_transform_bypass_flag = data.qpprime_y_zero_transform_bypass_flag), void 0 !== data.frame_cropping_flag && (this.frame_cropping_flag = data.frame_cropping_flag), void 0 !== data.seq_scaling_matrix_present_flag && (this.seq_scaling_matrix_present_flag = data.seq_scaling_matrix_present_flag), void 0 !== data.vui_parameters_present_flag && (this.vui_parameters_present_flag = data.vui_parameters_present_flag); - } - get constraint_set0_flag() { - return this.#view.getUint32(0, LE); - } - set constraint_set0_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get constraint_set1_flag() { - return this.#view.getUint32(4, LE); - } - set constraint_set1_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get constraint_set2_flag() { - return this.#view.getUint32(8, LE); - } - set constraint_set2_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get constraint_set3_flag() { - return this.#view.getUint32(12, LE); - } - set constraint_set3_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get constraint_set4_flag() { - return this.#view.getUint32(16, LE); - } - set constraint_set4_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } - get constraint_set5_flag() { - return this.#view.getUint32(20, LE); - } - set constraint_set5_flag(value) { - this.#view.setUint32(20, Number(value), LE); - } - get direct_8x8_inference_flag() { - return this.#view.getUint32(24, LE); - } - set direct_8x8_inference_flag(value) { - this.#view.setUint32(24, Number(value), LE); - } - get mb_adaptive_frame_field_flag() { - return this.#view.getUint32(28, LE); - } - set mb_adaptive_frame_field_flag(value) { - this.#view.setUint32(28, Number(value), LE); - } - get frame_mbs_only_flag() { - return this.#view.getUint32(32, LE); - } - set frame_mbs_only_flag(value) { - this.#view.setUint32(32, Number(value), LE); - } - get delta_pic_order_always_zero_flag() { - return this.#view.getUint32(36, LE); - } - set delta_pic_order_always_zero_flag(value) { - this.#view.setUint32(36, Number(value), LE); - } - get separate_colour_plane_flag() { - return this.#view.getUint32(40, LE); - } - set separate_colour_plane_flag(value) { - this.#view.setUint32(40, Number(value), LE); - } - get gaps_in_frame_num_value_allowed_flag() { - return this.#view.getUint32(44, LE); - } - set gaps_in_frame_num_value_allowed_flag(value) { - this.#view.setUint32(44, Number(value), LE); - } - get qpprime_y_zero_transform_bypass_flag() { - return this.#view.getUint32(48, LE); - } - set qpprime_y_zero_transform_bypass_flag(value) { - this.#view.setUint32(48, Number(value), LE); - } - get frame_cropping_flag() { - return this.#view.getUint32(52, LE); - } - set frame_cropping_flag(value) { - this.#view.setUint32(52, Number(value), LE); - } - get seq_scaling_matrix_present_flag() { - return this.#view.getUint32(56, LE); - } - set seq_scaling_matrix_present_flag(value) { - this.#view.setUint32(56, Number(value), LE); - } - get vui_parameters_present_flag() { - return this.#view.getUint32(60, LE); - } - set vui_parameters_present_flag(value) { - this.#view.setUint32(60, Number(value), LE); - } -} -export class StdVideoH264ScalingLists { - static size = 484; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH264ScalingLists.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264ScalingLists.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264ScalingLists.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH264ScalingLists.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.scaling_list_present_mask && (this.scaling_list_present_mask = data.scaling_list_present_mask), void 0 !== data.use_default_scaling_matrix_mask && (this.use_default_scaling_matrix_mask = data.use_default_scaling_matrix_mask), void 0 !== data.ScalingList4x4 && (this.ScalingList4x4 = data.ScalingList4x4), void 0 !== data.ScalingList8x8 && (this.ScalingList8x8 = data.ScalingList8x8); - } - get scaling_list_present_mask() { - return this.#view.getUint16(0, LE); - } - set scaling_list_present_mask(value) { - this.#view.setUint16(0, Number(value), LE); - } - get use_default_scaling_matrix_mask() { - return this.#view.getUint16(2, LE); - } - set use_default_scaling_matrix_mask(value) { - this.#view.setUint16(2, Number(value), LE); - } - get ScalingList4x4() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 4, 96); - } - set ScalingList4x4(value) { - this.#data.set(new Uint8Array(value.buffer), 4); - } - get ScalingList8x8() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 100, 384); - } - set ScalingList8x8(value) { - this.#data.set(new Uint8Array(value.buffer), 100); - } -} -export class StdVideoH264SequenceParameterSet { - static size = 152; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH264SequenceParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SequenceParameterSet.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264SequenceParameterSet.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH264SequenceParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.profile_idc && (this.profile_idc = data.profile_idc), void 0 !== data.level_idc && (this.level_idc = data.level_idc), void 0 !== data.chroma_format_idc && (this.chroma_format_idc = data.chroma_format_idc), void 0 !== data.seq_parameter_set_id && (this.seq_parameter_set_id = data.seq_parameter_set_id), void 0 !== data.bit_depth_luma_minus8 && (this.bit_depth_luma_minus8 = data.bit_depth_luma_minus8), void 0 !== data.bit_depth_chroma_minus8 && (this.bit_depth_chroma_minus8 = data.bit_depth_chroma_minus8), void 0 !== data.log2_max_frame_num_minus4 && (this.log2_max_frame_num_minus4 = data.log2_max_frame_num_minus4), void 0 !== data.pic_order_cnt_type && (this.pic_order_cnt_type = data.pic_order_cnt_type), void 0 !== data.offset_for_non_ref_pic && (this.offset_for_non_ref_pic = data.offset_for_non_ref_pic), void 0 !== data.offset_for_top_to_bottom_field && (this.offset_for_top_to_bottom_field = data.offset_for_top_to_bottom_field), void 0 !== data.log2_max_pic_order_cnt_lsb_minus4 && (this.log2_max_pic_order_cnt_lsb_minus4 = data.log2_max_pic_order_cnt_lsb_minus4), void 0 !== data.num_ref_frames_in_pic_order_cnt_cycle && (this.num_ref_frames_in_pic_order_cnt_cycle = data.num_ref_frames_in_pic_order_cnt_cycle), void 0 !== data.max_num_ref_frames && (this.max_num_ref_frames = data.max_num_ref_frames), void 0 !== data.reserved1 && (this.reserved1 = data.reserved1), void 0 !== data.pic_width_in_mbs_minus1 && (this.pic_width_in_mbs_minus1 = data.pic_width_in_mbs_minus1), void 0 !== data.pic_height_in_map_units_minus1 && (this.pic_height_in_map_units_minus1 = data.pic_height_in_map_units_minus1), void 0 !== data.frame_crop_left_offset && (this.frame_crop_left_offset = data.frame_crop_left_offset), void 0 !== data.frame_crop_right_offset && (this.frame_crop_right_offset = data.frame_crop_right_offset), void 0 !== data.frame_crop_top_offset && (this.frame_crop_top_offset = data.frame_crop_top_offset), void 0 !== data.frame_crop_bottom_offset && (this.frame_crop_bottom_offset = data.frame_crop_bottom_offset), void 0 !== data.reserved2 && (this.reserved2 = data.reserved2), void 0 !== data.pOffsetForRefFrame && (this.pOffsetForRefFrame = data.pOffsetForRefFrame), void 0 !== data.pScalingLists && (this.pScalingLists = data.pScalingLists), void 0 !== data.pSequenceParameterSetVui && (this.pSequenceParameterSetVui = data.pSequenceParameterSetVui); - } - get flags() { - return new StdVideoH264SpsFlags(this.#data.subarray(0, 0 + StdVideoH264SpsFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH264SpsFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get profile_idc() { - return this.#view.getUint32(64, LE); - } - set profile_idc(value) { - this.#view.setUint32(64, Number(value), LE); - } - get level_idc() { - return this.#view.getUint32(68, LE); - } - set level_idc(value) { - this.#view.setUint32(68, Number(value), LE); - } - get chroma_format_idc() { - return this.#view.getUint32(72, LE); - } - set chroma_format_idc(value) { - this.#view.setUint32(72, Number(value), LE); - } - get seq_parameter_set_id() { - return this.#view.getUint8(76); - } - set seq_parameter_set_id(value) { - this.#view.setUint8(76, Number(value)); - } - get bit_depth_luma_minus8() { - return this.#view.getUint8(77); - } - set bit_depth_luma_minus8(value) { - this.#view.setUint8(77, Number(value)); - } - get bit_depth_chroma_minus8() { - return this.#view.getUint8(78); - } - set bit_depth_chroma_minus8(value) { - this.#view.setUint8(78, Number(value)); - } - get log2_max_frame_num_minus4() { - return this.#view.getUint8(79); - } - set log2_max_frame_num_minus4(value) { - this.#view.setUint8(79, Number(value)); - } - get pic_order_cnt_type() { - return this.#view.getUint32(80, LE); - } - set pic_order_cnt_type(value) { - this.#view.setUint32(80, Number(value), LE); - } - get offset_for_non_ref_pic() { - return this.#view.getInt32(84, LE); - } - set offset_for_non_ref_pic(value) { - this.#view.setInt32(84, Number(value), LE); - } - get offset_for_top_to_bottom_field() { - return this.#view.getInt32(88, LE); - } - set offset_for_top_to_bottom_field(value) { - this.#view.setInt32(88, Number(value), LE); - } - get log2_max_pic_order_cnt_lsb_minus4() { - return this.#view.getUint8(92); - } - set log2_max_pic_order_cnt_lsb_minus4(value) { - this.#view.setUint8(92, Number(value)); - } - get num_ref_frames_in_pic_order_cnt_cycle() { - return this.#view.getUint8(93); - } - set num_ref_frames_in_pic_order_cnt_cycle(value) { - this.#view.setUint8(93, Number(value)); - } - get max_num_ref_frames() { - return this.#view.getUint8(94); - } - set max_num_ref_frames(value) { - this.#view.setUint8(94, Number(value)); - } - get reserved1() { - return this.#view.getUint8(95); - } - set reserved1(value) { - this.#view.setUint8(95, Number(value)); - } - get pic_width_in_mbs_minus1() { - return this.#view.getUint32(96, LE); - } - set pic_width_in_mbs_minus1(value) { - this.#view.setUint32(96, Number(value), LE); - } - get pic_height_in_map_units_minus1() { - return this.#view.getUint32(100, LE); - } - set pic_height_in_map_units_minus1(value) { - this.#view.setUint32(100, Number(value), LE); - } - get frame_crop_left_offset() { - return this.#view.getUint32(104, LE); - } - set frame_crop_left_offset(value) { - this.#view.setUint32(104, Number(value), LE); - } - get frame_crop_right_offset() { - return this.#view.getUint32(108, LE); - } - set frame_crop_right_offset(value) { - this.#view.setUint32(108, Number(value), LE); - } - get frame_crop_top_offset() { - return this.#view.getUint32(112, LE); - } - set frame_crop_top_offset(value) { - this.#view.setUint32(112, Number(value), LE); - } - get frame_crop_bottom_offset() { - return this.#view.getUint32(116, LE); - } - set frame_crop_bottom_offset(value) { - this.#view.setUint32(116, Number(value), LE); - } - get reserved2() { - return this.#view.getUint32(120, LE); - } - set reserved2(value) { - this.#view.setUint32(120, Number(value), LE); - } - get pOffsetForRefFrame() { - return this.#view.getBigUint64(128, LE); - } - set pOffsetForRefFrame(value) { - this.#view.setBigUint64(128, BigInt(anyPointer(value)), LE); - } - get pScalingLists() { - return this.#view.getBigUint64(136, LE); - } - set pScalingLists(value) { - this.#view.setBigUint64(136, BigInt(anyPointer(value)), LE); - } - get pSequenceParameterSetVui() { - return this.#view.getBigUint64(144, LE); - } - set pSequenceParameterSetVui(value) { - this.#view.setBigUint64(144, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoH264PpsFlags { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH264PpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264PpsFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264PpsFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH264PpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.transform_8x8_mode_flag && (this.transform_8x8_mode_flag = data.transform_8x8_mode_flag), void 0 !== data.redundant_pic_cnt_present_flag && (this.redundant_pic_cnt_present_flag = data.redundant_pic_cnt_present_flag), void 0 !== data.constrained_intra_pred_flag && (this.constrained_intra_pred_flag = data.constrained_intra_pred_flag), void 0 !== data.deblocking_filter_control_present_flag && (this.deblocking_filter_control_present_flag = data.deblocking_filter_control_present_flag), void 0 !== data.weighted_pred_flag && (this.weighted_pred_flag = data.weighted_pred_flag), void 0 !== data.bottom_field_pic_order_in_frame_present_flag && (this.bottom_field_pic_order_in_frame_present_flag = data.bottom_field_pic_order_in_frame_present_flag), void 0 !== data.entropy_coding_mode_flag && (this.entropy_coding_mode_flag = data.entropy_coding_mode_flag), void 0 !== data.pic_scaling_matrix_present_flag && (this.pic_scaling_matrix_present_flag = data.pic_scaling_matrix_present_flag); - } - get transform_8x8_mode_flag() { - return this.#view.getUint32(0, LE); - } - set transform_8x8_mode_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get redundant_pic_cnt_present_flag() { - return this.#view.getUint32(4, LE); - } - set redundant_pic_cnt_present_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get constrained_intra_pred_flag() { - return this.#view.getUint32(8, LE); - } - set constrained_intra_pred_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get deblocking_filter_control_present_flag() { - return this.#view.getUint32(12, LE); - } - set deblocking_filter_control_present_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get weighted_pred_flag() { - return this.#view.getUint32(16, LE); - } - set weighted_pred_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } - get bottom_field_pic_order_in_frame_present_flag() { - return this.#view.getUint32(20, LE); - } - set bottom_field_pic_order_in_frame_present_flag(value) { - this.#view.setUint32(20, Number(value), LE); - } - get entropy_coding_mode_flag() { - return this.#view.getUint32(24, LE); - } - set entropy_coding_mode_flag(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pic_scaling_matrix_present_flag() { - return this.#view.getUint32(28, LE); - } - set pic_scaling_matrix_present_flag(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class StdVideoH264PictureParameterSet { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH264PictureParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264PictureParameterSet.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264PictureParameterSet.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH264PictureParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.seq_parameter_set_id && (this.seq_parameter_set_id = data.seq_parameter_set_id), void 0 !== data.pic_parameter_set_id && (this.pic_parameter_set_id = data.pic_parameter_set_id), void 0 !== data.num_ref_idx_l0_default_active_minus1 && (this.num_ref_idx_l0_default_active_minus1 = data.num_ref_idx_l0_default_active_minus1), void 0 !== data.num_ref_idx_l1_default_active_minus1 && (this.num_ref_idx_l1_default_active_minus1 = data.num_ref_idx_l1_default_active_minus1), void 0 !== data.weighted_bipred_idc && (this.weighted_bipred_idc = data.weighted_bipred_idc), void 0 !== data.pic_init_qp_minus26 && (this.pic_init_qp_minus26 = data.pic_init_qp_minus26), void 0 !== data.pic_init_qs_minus26 && (this.pic_init_qs_minus26 = data.pic_init_qs_minus26), void 0 !== data.chroma_qp_index_offset && (this.chroma_qp_index_offset = data.chroma_qp_index_offset), void 0 !== data.second_chroma_qp_index_offset && (this.second_chroma_qp_index_offset = data.second_chroma_qp_index_offset), void 0 !== data.pScalingLists && (this.pScalingLists = data.pScalingLists); - } - get flags() { - return new StdVideoH264PpsFlags(this.#data.subarray(0, 0 + StdVideoH264PpsFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH264PpsFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get seq_parameter_set_id() { - return this.#view.getUint8(32); - } - set seq_parameter_set_id(value) { - this.#view.setUint8(32, Number(value)); - } - get pic_parameter_set_id() { - return this.#view.getUint8(33); - } - set pic_parameter_set_id(value) { - this.#view.setUint8(33, Number(value)); - } - get num_ref_idx_l0_default_active_minus1() { - return this.#view.getUint8(34); - } - set num_ref_idx_l0_default_active_minus1(value) { - this.#view.setUint8(34, Number(value)); - } - get num_ref_idx_l1_default_active_minus1() { - return this.#view.getUint8(35); - } - set num_ref_idx_l1_default_active_minus1(value) { - this.#view.setUint8(35, Number(value)); - } - get weighted_bipred_idc() { - return this.#view.getUint32(36, LE); - } - set weighted_bipred_idc(value) { - this.#view.setUint32(36, Number(value), LE); - } - get pic_init_qp_minus26() { - return this.#view.getInt8(40); - } - set pic_init_qp_minus26(value) { - this.#view.setInt8(40, Number(value)); - } - get pic_init_qs_minus26() { - return this.#view.getInt8(41); - } - set pic_init_qs_minus26(value) { - this.#view.setInt8(41, Number(value)); - } - get chroma_qp_index_offset() { - return this.#view.getInt8(42); - } - set chroma_qp_index_offset(value) { - this.#view.setInt8(42, Number(value)); - } - get second_chroma_qp_index_offset() { - return this.#view.getInt8(43); - } - set second_chroma_qp_index_offset(value) { - this.#view.setInt8(43, Number(value)); - } - get pScalingLists() { - return this.#view.getBigUint64(48, LE); - } - set pScalingLists(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoDecodeH264PictureInfoFlags { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoDecodeH264PictureInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264PictureInfoFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH264PictureInfoFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoDecodeH264PictureInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.field_pic_flag && (this.field_pic_flag = data.field_pic_flag), void 0 !== data.is_intra && (this.is_intra = data.is_intra), void 0 !== data.IdrPicFlag && (this.IdrPicFlag = data.IdrPicFlag), void 0 !== data.bottom_field_flag && (this.bottom_field_flag = data.bottom_field_flag), void 0 !== data.is_reference && (this.is_reference = data.is_reference), void 0 !== data.complementary_field_pair && (this.complementary_field_pair = data.complementary_field_pair); - } - get field_pic_flag() { - return this.#view.getUint32(0, LE); - } - set field_pic_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get is_intra() { - return this.#view.getUint32(4, LE); - } - set is_intra(value) { - this.#view.setUint32(4, Number(value), LE); - } - get IdrPicFlag() { - return this.#view.getUint32(8, LE); - } - set IdrPicFlag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get bottom_field_flag() { - return this.#view.getUint32(12, LE); - } - set bottom_field_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get is_reference() { - return this.#view.getUint32(16, LE); - } - set is_reference(value) { - this.#view.setUint32(16, Number(value), LE); - } - get complementary_field_pair() { - return this.#view.getUint32(20, LE); - } - set complementary_field_pair(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class StdVideoDecodeH264PictureInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoDecodeH264PictureInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264PictureInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH264PictureInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoDecodeH264PictureInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.seq_parameter_set_id && (this.seq_parameter_set_id = data.seq_parameter_set_id), void 0 !== data.pic_parameter_set_id && (this.pic_parameter_set_id = data.pic_parameter_set_id), void 0 !== data.reserved1 && (this.reserved1 = data.reserved1), void 0 !== data.reserved2 && (this.reserved2 = data.reserved2), void 0 !== data.frame_num && (this.frame_num = data.frame_num), void 0 !== data.idr_pic_id && (this.idr_pic_id = data.idr_pic_id), void 0 !== data.PicOrderCnt && (this.PicOrderCnt = data.PicOrderCnt); - } - get flags() { - return new StdVideoDecodeH264PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH264PictureInfoFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoDecodeH264PictureInfoFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get seq_parameter_set_id() { - return this.#view.getUint8(24); - } - set seq_parameter_set_id(value) { - this.#view.setUint8(24, Number(value)); - } - get pic_parameter_set_id() { - return this.#view.getUint8(25); - } - set pic_parameter_set_id(value) { - this.#view.setUint8(25, Number(value)); - } - get reserved1() { - return this.#view.getUint8(26); - } - set reserved1(value) { - this.#view.setUint8(26, Number(value)); - } - get reserved2() { - return this.#view.getUint8(27); - } - set reserved2(value) { - this.#view.setUint8(27, Number(value)); - } - get frame_num() { - return this.#view.getUint16(28, LE); - } - set frame_num(value) { - this.#view.setUint16(28, Number(value), LE); - } - get idr_pic_id() { - return this.#view.getUint16(30, LE); - } - set idr_pic_id(value) { - this.#view.setUint16(30, Number(value), LE); - } - get PicOrderCnt() { - return new Int32Array(this.#data.buffer, this.#data.byteOffset + 32, 2); - } - set PicOrderCnt(value) { - this.#data.set(new Uint8Array(value.buffer), 32); - } -} -export class StdVideoDecodeH264ReferenceInfoFlags { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264ReferenceInfoFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH264ReferenceInfoFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.top_field_flag && (this.top_field_flag = data.top_field_flag), void 0 !== data.bottom_field_flag && (this.bottom_field_flag = data.bottom_field_flag), void 0 !== data.used_for_long_term_reference && (this.used_for_long_term_reference = data.used_for_long_term_reference), void 0 !== data.is_non_existing && (this.is_non_existing = data.is_non_existing); - } - get top_field_flag() { - return this.#view.getUint32(0, LE); - } - set top_field_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get bottom_field_flag() { - return this.#view.getUint32(4, LE); - } - set bottom_field_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get used_for_long_term_reference() { - return this.#view.getUint32(8, LE); - } - set used_for_long_term_reference(value) { - this.#view.setUint32(8, Number(value), LE); - } - get is_non_existing() { - return this.#view.getUint32(12, LE); - } - set is_non_existing(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class StdVideoDecodeH264ReferenceInfo { - static size = 28; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264ReferenceInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH264ReferenceInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.FrameNum && (this.FrameNum = data.FrameNum), void 0 !== data.reserved && (this.reserved = data.reserved), void 0 !== data.PicOrderCnt && (this.PicOrderCnt = data.PicOrderCnt); - } - get flags() { - return new StdVideoDecodeH264ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH264ReferenceInfoFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoDecodeH264ReferenceInfoFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get FrameNum() { - return this.#view.getUint16(16, LE); - } - set FrameNum(value) { - this.#view.setUint16(16, Number(value), LE); - } - get reserved() { - return this.#view.getUint16(18, LE); - } - set reserved(value) { - this.#view.setUint16(18, Number(value), LE); - } - get PicOrderCnt() { - return new Int32Array(this.#data.buffer, this.#data.byteOffset + 20, 2); - } - set PicOrderCnt(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } -} -export class StdVideoEncodeH264WeightTableFlags { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264WeightTableFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264WeightTableFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264WeightTableFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264WeightTableFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.luma_weight_l0_flag && (this.luma_weight_l0_flag = data.luma_weight_l0_flag), void 0 !== data.chroma_weight_l0_flag && (this.chroma_weight_l0_flag = data.chroma_weight_l0_flag), void 0 !== data.luma_weight_l1_flag && (this.luma_weight_l1_flag = data.luma_weight_l1_flag), void 0 !== data.chroma_weight_l1_flag && (this.chroma_weight_l1_flag = data.chroma_weight_l1_flag); - } - get luma_weight_l0_flag() { - return this.#view.getUint32(0, LE); - } - set luma_weight_l0_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get chroma_weight_l0_flag() { - return this.#view.getUint32(4, LE); - } - set chroma_weight_l0_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get luma_weight_l1_flag() { - return this.#view.getUint32(8, LE); - } - set luma_weight_l1_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get chroma_weight_l1_flag() { - return this.#view.getUint32(12, LE); - } - set chroma_weight_l1_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class StdVideoEncodeH264WeightTable { - static size = 404; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264WeightTable.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264WeightTable.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264WeightTable.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264WeightTable.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.luma_log2_weight_denom && (this.luma_log2_weight_denom = data.luma_log2_weight_denom), void 0 !== data.chroma_log2_weight_denom && (this.chroma_log2_weight_denom = data.chroma_log2_weight_denom), void 0 !== data.luma_weight_l0 && (this.luma_weight_l0 = data.luma_weight_l0), void 0 !== data.luma_offset_l0 && (this.luma_offset_l0 = data.luma_offset_l0), void 0 !== data.chroma_weight_l0 && (this.chroma_weight_l0 = data.chroma_weight_l0), void 0 !== data.chroma_offset_l0 && (this.chroma_offset_l0 = data.chroma_offset_l0), void 0 !== data.luma_weight_l1 && (this.luma_weight_l1 = data.luma_weight_l1), void 0 !== data.luma_offset_l1 && (this.luma_offset_l1 = data.luma_offset_l1), void 0 !== data.chroma_weight_l1 && (this.chroma_weight_l1 = data.chroma_weight_l1), void 0 !== data.chroma_offset_l1 && (this.chroma_offset_l1 = data.chroma_offset_l1); - } - get flags() { - return new StdVideoEncodeH264WeightTableFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264WeightTableFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH264WeightTableFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get luma_log2_weight_denom() { - return this.#view.getUint8(16); - } - set luma_log2_weight_denom(value) { - this.#view.setUint8(16, Number(value)); - } - get chroma_log2_weight_denom() { - return this.#view.getUint8(17); - } - set chroma_log2_weight_denom(value) { - this.#view.setUint8(17, Number(value)); - } - get luma_weight_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 18, 32); - } - set luma_weight_l0(value) { - this.#data.set(new Uint8Array(value.buffer), 18); - } - get luma_offset_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 50, 32); - } - set luma_offset_l0(value) { - this.#data.set(new Uint8Array(value.buffer), 50); - } - get chroma_weight_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 82, 64); - } - set chroma_weight_l0(value) { - this.#data.set(new Uint8Array(value.buffer), 82); - } - get chroma_offset_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 146, 64); - } - set chroma_offset_l0(value) { - this.#data.set(new Uint8Array(value.buffer), 146); - } - get luma_weight_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 210, 32); - } - set luma_weight_l1(value) { - this.#data.set(new Uint8Array(value.buffer), 210); - } - get luma_offset_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 242, 32); - } - set luma_offset_l1(value) { - this.#data.set(new Uint8Array(value.buffer), 242); - } - get chroma_weight_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 274, 64); - } - set chroma_weight_l1(value) { - this.#data.set(new Uint8Array(value.buffer), 274); - } - get chroma_offset_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 338, 64); - } - set chroma_offset_l1(value) { - this.#data.set(new Uint8Array(value.buffer), 338); - } -} -export class StdVideoEncodeH264SliceHeaderFlags { - static size = 20; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264SliceHeaderFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264SliceHeaderFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264SliceHeaderFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264SliceHeaderFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.direct_spatial_mv_pred_flag && (this.direct_spatial_mv_pred_flag = data.direct_spatial_mv_pred_flag), void 0 !== data.num_ref_idx_active_override_flag && (this.num_ref_idx_active_override_flag = data.num_ref_idx_active_override_flag), void 0 !== data.no_output_of_prior_pics_flag && (this.no_output_of_prior_pics_flag = data.no_output_of_prior_pics_flag), void 0 !== data.adaptive_ref_pic_marking_mode_flag && (this.adaptive_ref_pic_marking_mode_flag = data.adaptive_ref_pic_marking_mode_flag), void 0 !== data.no_prior_references_available_flag && (this.no_prior_references_available_flag = data.no_prior_references_available_flag); - } - get direct_spatial_mv_pred_flag() { - return this.#view.getUint32(0, LE); - } - set direct_spatial_mv_pred_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get num_ref_idx_active_override_flag() { - return this.#view.getUint32(4, LE); - } - set num_ref_idx_active_override_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get no_output_of_prior_pics_flag() { - return this.#view.getUint32(8, LE); - } - set no_output_of_prior_pics_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get adaptive_ref_pic_marking_mode_flag() { - return this.#view.getUint32(12, LE); - } - set adaptive_ref_pic_marking_mode_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get no_prior_references_available_flag() { - return this.#view.getUint32(16, LE); - } - set no_prior_references_available_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class StdVideoEncodeH264PictureInfoFlags { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264PictureInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264PictureInfoFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264PictureInfoFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264PictureInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.idr_flag && (this.idr_flag = data.idr_flag), void 0 !== data.is_reference_flag && (this.is_reference_flag = data.is_reference_flag), void 0 !== data.used_for_long_term_reference && (this.used_for_long_term_reference = data.used_for_long_term_reference); - } - get idr_flag() { - return this.#view.getUint32(0, LE); - } - set idr_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get is_reference_flag() { - return this.#view.getUint32(4, LE); - } - set is_reference_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get used_for_long_term_reference() { - return this.#view.getUint32(8, LE); - } - set used_for_long_term_reference(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class StdVideoEncodeH264ReferenceInfoFlags { - static size = 4; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264ReferenceInfoFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264ReferenceInfoFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.used_for_long_term_reference && (this.used_for_long_term_reference = data.used_for_long_term_reference); - } - get used_for_long_term_reference() { - return this.#view.getUint32(0, LE); - } - set used_for_long_term_reference(value) { - this.#view.setUint32(0, Number(value), LE); - } -} -export class StdVideoEncodeH264RefMgmtFlags { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264RefMgmtFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefMgmtFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264RefMgmtFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264RefMgmtFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.ref_pic_list_modification_l0_flag && (this.ref_pic_list_modification_l0_flag = data.ref_pic_list_modification_l0_flag), void 0 !== data.ref_pic_list_modification_l1_flag && (this.ref_pic_list_modification_l1_flag = data.ref_pic_list_modification_l1_flag); - } - get ref_pic_list_modification_l0_flag() { - return this.#view.getUint32(0, LE); - } - set ref_pic_list_modification_l0_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get ref_pic_list_modification_l1_flag() { - return this.#view.getUint32(4, LE); - } - set ref_pic_list_modification_l1_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class StdVideoEncodeH264RefListModEntry { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264RefListModEntry.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefListModEntry.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264RefListModEntry.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264RefListModEntry.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.modification_of_pic_nums_idc && (this.modification_of_pic_nums_idc = data.modification_of_pic_nums_idc), void 0 !== data.abs_diff_pic_num_minus1 && (this.abs_diff_pic_num_minus1 = data.abs_diff_pic_num_minus1), void 0 !== data.long_term_pic_num && (this.long_term_pic_num = data.long_term_pic_num); - } - get modification_of_pic_nums_idc() { - return this.#view.getUint32(0, LE); - } - set modification_of_pic_nums_idc(value) { - this.#view.setUint32(0, Number(value), LE); - } - get abs_diff_pic_num_minus1() { - return this.#view.getUint16(4, LE); - } - set abs_diff_pic_num_minus1(value) { - this.#view.setUint16(4, Number(value), LE); - } - get long_term_pic_num() { - return this.#view.getUint16(6, LE); - } - set long_term_pic_num(value) { - this.#view.setUint16(6, Number(value), LE); - } -} -export class StdVideoEncodeH264RefPicMarkingEntry { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264RefPicMarkingEntry.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefPicMarkingEntry.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264RefPicMarkingEntry.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264RefPicMarkingEntry.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.operation && (this.operation = data.operation), void 0 !== data.difference_of_pic_nums_minus1 && (this.difference_of_pic_nums_minus1 = data.difference_of_pic_nums_minus1), void 0 !== data.long_term_pic_num && (this.long_term_pic_num = data.long_term_pic_num), void 0 !== data.long_term_frame_idx && (this.long_term_frame_idx = data.long_term_frame_idx), void 0 !== data.max_long_term_frame_idx_plus1 && (this.max_long_term_frame_idx_plus1 = data.max_long_term_frame_idx_plus1); - } - get operation() { - return this.#view.getUint32(0, LE); - } - set operation(value) { - this.#view.setUint32(0, Number(value), LE); - } - get difference_of_pic_nums_minus1() { - return this.#view.getUint16(4, LE); - } - set difference_of_pic_nums_minus1(value) { - this.#view.setUint16(4, Number(value), LE); - } - get long_term_pic_num() { - return this.#view.getUint16(6, LE); - } - set long_term_pic_num(value) { - this.#view.setUint16(6, Number(value), LE); - } - get long_term_frame_idx() { - return this.#view.getUint16(8, LE); - } - set long_term_frame_idx(value) { - this.#view.setUint16(8, Number(value), LE); - } - get max_long_term_frame_idx_plus1() { - return this.#view.getUint16(10, LE); - } - set max_long_term_frame_idx_plus1(value) { - this.#view.setUint16(10, Number(value), LE); - } -} -export class StdVideoEncodeH264RefMemMgmtCtrlOperations { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264RefMemMgmtCtrlOperations.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefMemMgmtCtrlOperations.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264RefMemMgmtCtrlOperations.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264RefMemMgmtCtrlOperations.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.refList0ModOpCount && (this.refList0ModOpCount = data.refList0ModOpCount), void 0 !== data.pRefList0ModOperations && (this.pRefList0ModOperations = data.pRefList0ModOperations), void 0 !== data.refList1ModOpCount && (this.refList1ModOpCount = data.refList1ModOpCount), void 0 !== data.pRefList1ModOperations && (this.pRefList1ModOperations = data.pRefList1ModOperations), void 0 !== data.refPicMarkingOpCount && (this.refPicMarkingOpCount = data.refPicMarkingOpCount), void 0 !== data.pRefPicMarkingOperations && (this.pRefPicMarkingOperations = data.pRefPicMarkingOperations); - } - get flags() { - return new StdVideoEncodeH264RefMgmtFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264RefMgmtFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH264RefMgmtFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get refList0ModOpCount() { - return this.#view.getUint8(8); - } - set refList0ModOpCount(value) { - this.#view.setUint8(8, Number(value)); - } - get pRefList0ModOperations() { - return this.#view.getBigUint64(16, LE); - } - set pRefList0ModOperations(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get refList1ModOpCount() { - return this.#view.getUint8(24); - } - set refList1ModOpCount(value) { - this.#view.setUint8(24, Number(value)); - } - get pRefList1ModOperations() { - return this.#view.getBigUint64(32, LE); - } - set pRefList1ModOperations(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get refPicMarkingOpCount() { - return this.#view.getUint8(40); - } - set refPicMarkingOpCount(value) { - this.#view.setUint8(40, Number(value)); - } - get pRefPicMarkingOperations() { - return this.#view.getBigUint64(48, LE); - } - set pRefPicMarkingOperations(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoEncodeH264PictureInfo { - static size = 28; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264PictureInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264PictureInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264PictureInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264PictureInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.seq_parameter_set_id && (this.seq_parameter_set_id = data.seq_parameter_set_id), void 0 !== data.pic_parameter_set_id && (this.pic_parameter_set_id = data.pic_parameter_set_id), void 0 !== data.pictureType && (this.pictureType = data.pictureType), void 0 !== data.frame_num && (this.frame_num = data.frame_num), void 0 !== data.PicOrderCnt && (this.PicOrderCnt = data.PicOrderCnt); - } - get flags() { - return new StdVideoEncodeH264PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264PictureInfoFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH264PictureInfoFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get seq_parameter_set_id() { - return this.#view.getUint8(12); - } - set seq_parameter_set_id(value) { - this.#view.setUint8(12, Number(value)); - } - get pic_parameter_set_id() { - return this.#view.getUint8(13); - } - set pic_parameter_set_id(value) { - this.#view.setUint8(13, Number(value)); - } - get pictureType() { - return this.#view.getUint32(16, LE); - } - set pictureType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get frame_num() { - return this.#view.getUint32(20, LE); - } - set frame_num(value) { - this.#view.setUint32(20, Number(value), LE); - } - get PicOrderCnt() { - return this.#view.getInt32(24, LE); - } - set PicOrderCnt(value) { - this.#view.setInt32(24, Number(value), LE); - } -} -export class StdVideoEncodeH264ReferenceInfo { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264ReferenceInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264ReferenceInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.FrameNum && (this.FrameNum = data.FrameNum), void 0 !== data.PicOrderCnt && (this.PicOrderCnt = data.PicOrderCnt), void 0 !== data.long_term_pic_num && (this.long_term_pic_num = data.long_term_pic_num), void 0 !== data.long_term_frame_idx && (this.long_term_frame_idx = data.long_term_frame_idx); - } - get flags() { - return new StdVideoEncodeH264ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264ReferenceInfoFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH264ReferenceInfoFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get FrameNum() { - return this.#view.getUint32(4, LE); - } - set FrameNum(value) { - this.#view.setUint32(4, Number(value), LE); - } - get PicOrderCnt() { - return this.#view.getInt32(8, LE); - } - set PicOrderCnt(value) { - this.#view.setInt32(8, Number(value), LE); - } - get long_term_pic_num() { - return this.#view.getUint16(12, LE); - } - set long_term_pic_num(value) { - this.#view.setUint16(12, Number(value), LE); - } - get long_term_frame_idx() { - return this.#view.getUint16(14, LE); - } - set long_term_frame_idx(value) { - this.#view.setUint16(14, Number(value), LE); - } -} -export class StdVideoEncodeH264SliceHeader { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH264SliceHeader.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264SliceHeader.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264SliceHeader.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH264SliceHeader.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.first_mb_in_slice && (this.first_mb_in_slice = data.first_mb_in_slice), void 0 !== data.slice_type && (this.slice_type = data.slice_type), void 0 !== data.idr_pic_id && (this.idr_pic_id = data.idr_pic_id), void 0 !== data.num_ref_idx_l0_active_minus1 && (this.num_ref_idx_l0_active_minus1 = data.num_ref_idx_l0_active_minus1), void 0 !== data.num_ref_idx_l1_active_minus1 && (this.num_ref_idx_l1_active_minus1 = data.num_ref_idx_l1_active_minus1), void 0 !== data.cabac_init_idc && (this.cabac_init_idc = data.cabac_init_idc), void 0 !== data.disable_deblocking_filter_idc && (this.disable_deblocking_filter_idc = data.disable_deblocking_filter_idc), void 0 !== data.slice_alpha_c0_offset_div2 && (this.slice_alpha_c0_offset_div2 = data.slice_alpha_c0_offset_div2), void 0 !== data.slice_beta_offset_div2 && (this.slice_beta_offset_div2 = data.slice_beta_offset_div2), void 0 !== data.pWeightTable && (this.pWeightTable = data.pWeightTable); - } - get flags() { - return new StdVideoEncodeH264SliceHeaderFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264SliceHeaderFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH264SliceHeaderFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get first_mb_in_slice() { - return this.#view.getUint32(20, LE); - } - set first_mb_in_slice(value) { - this.#view.setUint32(20, Number(value), LE); - } - get slice_type() { - return this.#view.getUint32(24, LE); - } - set slice_type(value) { - this.#view.setUint32(24, Number(value), LE); - } - get idr_pic_id() { - return this.#view.getUint16(28, LE); - } - set idr_pic_id(value) { - this.#view.setUint16(28, Number(value), LE); - } - get num_ref_idx_l0_active_minus1() { - return this.#view.getUint8(30); - } - set num_ref_idx_l0_active_minus1(value) { - this.#view.setUint8(30, Number(value)); - } - get num_ref_idx_l1_active_minus1() { - return this.#view.getUint8(31); - } - set num_ref_idx_l1_active_minus1(value) { - this.#view.setUint8(31, Number(value)); - } - get cabac_init_idc() { - return this.#view.getUint32(32, LE); - } - set cabac_init_idc(value) { - this.#view.setUint32(32, Number(value), LE); - } - get disable_deblocking_filter_idc() { - return this.#view.getUint32(36, LE); - } - set disable_deblocking_filter_idc(value) { - this.#view.setUint32(36, Number(value), LE); - } - get slice_alpha_c0_offset_div2() { - return this.#view.getInt8(40); - } - set slice_alpha_c0_offset_div2(value) { - this.#view.setInt8(40, Number(value)); - } - get slice_beta_offset_div2() { - return this.#view.getInt8(41); - } - set slice_beta_offset_div2(value) { - this.#view.setInt8(41, Number(value)); - } - get pWeightTable() { - return this.#view.getBigUint64(48, LE); - } - set pWeightTable(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoH265ProfileTierLevelFlags { - static size = 20; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265ProfileTierLevelFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ProfileTierLevelFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ProfileTierLevelFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265ProfileTierLevelFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.general_tier_flag && (this.general_tier_flag = data.general_tier_flag), void 0 !== data.general_progressive_source_flag && (this.general_progressive_source_flag = data.general_progressive_source_flag), void 0 !== data.general_interlaced_source_flag && (this.general_interlaced_source_flag = data.general_interlaced_source_flag), void 0 !== data.general_non_packed_constraint_flag && (this.general_non_packed_constraint_flag = data.general_non_packed_constraint_flag), void 0 !== data.general_frame_only_constraint_flag && (this.general_frame_only_constraint_flag = data.general_frame_only_constraint_flag); - } - get general_tier_flag() { - return this.#view.getUint32(0, LE); - } - set general_tier_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get general_progressive_source_flag() { - return this.#view.getUint32(4, LE); - } - set general_progressive_source_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get general_interlaced_source_flag() { - return this.#view.getUint32(8, LE); - } - set general_interlaced_source_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get general_non_packed_constraint_flag() { - return this.#view.getUint32(12, LE); - } - set general_non_packed_constraint_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get general_frame_only_constraint_flag() { - return this.#view.getUint32(16, LE); - } - set general_frame_only_constraint_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class StdVideoH265ProfileTierLevel { - static size = 28; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265ProfileTierLevel.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ProfileTierLevel.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ProfileTierLevel.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265ProfileTierLevel.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.general_profile_idc && (this.general_profile_idc = data.general_profile_idc), void 0 !== data.general_level_idc && (this.general_level_idc = data.general_level_idc); - } - get flags() { - return new StdVideoH265ProfileTierLevelFlags(this.#data.subarray(0, 0 + StdVideoH265ProfileTierLevelFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH265ProfileTierLevelFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get general_profile_idc() { - return this.#view.getUint32(20, LE); - } - set general_profile_idc(value) { - this.#view.setUint32(20, Number(value), LE); - } - get general_level_idc() { - return this.#view.getUint32(24, LE); - } - set general_level_idc(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class StdVideoH265DecPicBufMgr { - static size = 44; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265DecPicBufMgr.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265DecPicBufMgr.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265DecPicBufMgr.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265DecPicBufMgr.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.max_latency_increase_plus1 && (this.max_latency_increase_plus1 = data.max_latency_increase_plus1), void 0 !== data.max_dec_pic_buffering_minus1 && (this.max_dec_pic_buffering_minus1 = data.max_dec_pic_buffering_minus1), void 0 !== data.max_num_reorder_pics && (this.max_num_reorder_pics = data.max_num_reorder_pics); - } - get max_latency_increase_plus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 0, 7); - } - set max_latency_increase_plus1(value) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - get max_dec_pic_buffering_minus1() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 28, 7); - } - set max_dec_pic_buffering_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 28); - } - get max_num_reorder_pics() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 35, 7); - } - set max_num_reorder_pics(value) { - this.#data.set(new Uint8Array(value.buffer), 35); - } -} -export class StdVideoH265SubLayerHrdParameters { - static size = 516; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265SubLayerHrdParameters.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SubLayerHrdParameters.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SubLayerHrdParameters.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265SubLayerHrdParameters.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.bit_rate_value_minus1 && (this.bit_rate_value_minus1 = data.bit_rate_value_minus1), void 0 !== data.cpb_size_value_minus1 && (this.cpb_size_value_minus1 = data.cpb_size_value_minus1), void 0 !== data.cpb_size_du_value_minus1 && (this.cpb_size_du_value_minus1 = data.cpb_size_du_value_minus1), void 0 !== data.bit_rate_du_value_minus1 && (this.bit_rate_du_value_minus1 = data.bit_rate_du_value_minus1), void 0 !== data.cbr_flag && (this.cbr_flag = data.cbr_flag); - } - get bit_rate_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 0, 32); - } - set bit_rate_value_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - get cpb_size_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 128, 32); - } - set cpb_size_value_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 128); - } - get cpb_size_du_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 256, 32); - } - set cpb_size_du_value_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 256); - } - get bit_rate_du_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 384, 32); - } - set bit_rate_du_value_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 384); - } - get cbr_flag() { - return this.#view.getUint32(512, LE); - } - set cbr_flag(value) { - this.#view.setUint32(512, Number(value), LE); - } -} -export class StdVideoH265HrdFlags { - static size = 28; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265HrdFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265HrdFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265HrdFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265HrdFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.nal_hrd_parameters_present_flag && (this.nal_hrd_parameters_present_flag = data.nal_hrd_parameters_present_flag), void 0 !== data.vcl_hrd_parameters_present_flag && (this.vcl_hrd_parameters_present_flag = data.vcl_hrd_parameters_present_flag), void 0 !== data.sub_pic_hrd_params_present_flag && (this.sub_pic_hrd_params_present_flag = data.sub_pic_hrd_params_present_flag), void 0 !== data.sub_pic_cpb_params_in_pic_timing_sei_flag && (this.sub_pic_cpb_params_in_pic_timing_sei_flag = data.sub_pic_cpb_params_in_pic_timing_sei_flag), void 0 !== data.fixed_pic_rate_general_flag && (this.fixed_pic_rate_general_flag = data.fixed_pic_rate_general_flag), void 0 !== data.fixed_pic_rate_within_cvs_flag && (this.fixed_pic_rate_within_cvs_flag = data.fixed_pic_rate_within_cvs_flag), void 0 !== data.low_delay_hrd_flag && (this.low_delay_hrd_flag = data.low_delay_hrd_flag); - } - get nal_hrd_parameters_present_flag() { - return this.#view.getUint32(0, LE); - } - set nal_hrd_parameters_present_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get vcl_hrd_parameters_present_flag() { - return this.#view.getUint32(4, LE); - } - set vcl_hrd_parameters_present_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get sub_pic_hrd_params_present_flag() { - return this.#view.getUint32(8, LE); - } - set sub_pic_hrd_params_present_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get sub_pic_cpb_params_in_pic_timing_sei_flag() { - return this.#view.getUint32(12, LE); - } - set sub_pic_cpb_params_in_pic_timing_sei_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get fixed_pic_rate_general_flag() { - return this.#view.getUint32(16, LE); - } - set fixed_pic_rate_general_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } - get fixed_pic_rate_within_cvs_flag() { - return this.#view.getUint32(20, LE); - } - set fixed_pic_rate_within_cvs_flag(value) { - this.#view.setUint32(20, Number(value), LE); - } - get low_delay_hrd_flag() { - return this.#view.getUint32(24, LE); - } - set low_delay_hrd_flag(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class StdVideoH265HrdParameters { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265HrdParameters.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265HrdParameters.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265HrdParameters.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265HrdParameters.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.tick_divisor_minus2 && (this.tick_divisor_minus2 = data.tick_divisor_minus2), void 0 !== data.du_cpb_removal_delay_increment_length_minus1 && (this.du_cpb_removal_delay_increment_length_minus1 = data.du_cpb_removal_delay_increment_length_minus1), void 0 !== data.dpb_output_delay_du_length_minus1 && (this.dpb_output_delay_du_length_minus1 = data.dpb_output_delay_du_length_minus1), void 0 !== data.bit_rate_scale && (this.bit_rate_scale = data.bit_rate_scale), void 0 !== data.cpb_size_scale && (this.cpb_size_scale = data.cpb_size_scale), void 0 !== data.cpb_size_du_scale && (this.cpb_size_du_scale = data.cpb_size_du_scale), void 0 !== data.initial_cpb_removal_delay_length_minus1 && (this.initial_cpb_removal_delay_length_minus1 = data.initial_cpb_removal_delay_length_minus1), void 0 !== data.au_cpb_removal_delay_length_minus1 && (this.au_cpb_removal_delay_length_minus1 = data.au_cpb_removal_delay_length_minus1), void 0 !== data.dpb_output_delay_length_minus1 && (this.dpb_output_delay_length_minus1 = data.dpb_output_delay_length_minus1), void 0 !== data.cpb_cnt_minus1 && (this.cpb_cnt_minus1 = data.cpb_cnt_minus1), void 0 !== data.elemental_duration_in_tc_minus1 && (this.elemental_duration_in_tc_minus1 = data.elemental_duration_in_tc_minus1), void 0 !== data.reserved && (this.reserved = data.reserved), void 0 !== data.pSubLayerHrdParametersNal && (this.pSubLayerHrdParametersNal = data.pSubLayerHrdParametersNal), void 0 !== data.pSubLayerHrdParametersVcl && (this.pSubLayerHrdParametersVcl = data.pSubLayerHrdParametersVcl); - } - get flags() { - return new StdVideoH265HrdFlags(this.#data.subarray(0, 0 + StdVideoH265HrdFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH265HrdFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get tick_divisor_minus2() { - return this.#view.getUint8(28); - } - set tick_divisor_minus2(value) { - this.#view.setUint8(28, Number(value)); - } - get du_cpb_removal_delay_increment_length_minus1() { - return this.#view.getUint8(29); - } - set du_cpb_removal_delay_increment_length_minus1(value) { - this.#view.setUint8(29, Number(value)); - } - get dpb_output_delay_du_length_minus1() { - return this.#view.getUint8(30); - } - set dpb_output_delay_du_length_minus1(value) { - this.#view.setUint8(30, Number(value)); - } - get bit_rate_scale() { - return this.#view.getUint8(31); - } - set bit_rate_scale(value) { - this.#view.setUint8(31, Number(value)); - } - get cpb_size_scale() { - return this.#view.getUint8(32); - } - set cpb_size_scale(value) { - this.#view.setUint8(32, Number(value)); - } - get cpb_size_du_scale() { - return this.#view.getUint8(33); - } - set cpb_size_du_scale(value) { - this.#view.setUint8(33, Number(value)); - } - get initial_cpb_removal_delay_length_minus1() { - return this.#view.getUint8(34); - } - set initial_cpb_removal_delay_length_minus1(value) { - this.#view.setUint8(34, Number(value)); - } - get au_cpb_removal_delay_length_minus1() { - return this.#view.getUint8(35); - } - set au_cpb_removal_delay_length_minus1(value) { - this.#view.setUint8(35, Number(value)); - } - get dpb_output_delay_length_minus1() { - return this.#view.getUint8(36); - } - set dpb_output_delay_length_minus1(value) { - this.#view.setUint8(36, Number(value)); - } - get cpb_cnt_minus1() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 37, 7); - } - set cpb_cnt_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 37); - } - get elemental_duration_in_tc_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 44, 7); - } - set elemental_duration_in_tc_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 44); - } - get reserved() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 58, 3); - } - set reserved(value) { - this.#data.set(new Uint8Array(value.buffer), 58); - } - get pSubLayerHrdParametersNal() { - return this.#view.getBigUint64(64, LE); - } - set pSubLayerHrdParametersNal(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - get pSubLayerHrdParametersVcl() { - return this.#view.getBigUint64(72, LE); - } - set pSubLayerHrdParametersVcl(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoH265VpsFlags { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265VpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265VpsFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265VpsFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265VpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.vps_temporal_id_nesting_flag && (this.vps_temporal_id_nesting_flag = data.vps_temporal_id_nesting_flag), void 0 !== data.vps_sub_layer_ordering_info_present_flag && (this.vps_sub_layer_ordering_info_present_flag = data.vps_sub_layer_ordering_info_present_flag), void 0 !== data.vps_timing_info_present_flag && (this.vps_timing_info_present_flag = data.vps_timing_info_present_flag), void 0 !== data.vps_poc_proportional_to_timing_flag && (this.vps_poc_proportional_to_timing_flag = data.vps_poc_proportional_to_timing_flag); - } - get vps_temporal_id_nesting_flag() { - return this.#view.getUint32(0, LE); - } - set vps_temporal_id_nesting_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get vps_sub_layer_ordering_info_present_flag() { - return this.#view.getUint32(4, LE); - } - set vps_sub_layer_ordering_info_present_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get vps_timing_info_present_flag() { - return this.#view.getUint32(8, LE); - } - set vps_timing_info_present_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get vps_poc_proportional_to_timing_flag() { - return this.#view.getUint32(12, LE); - } - set vps_poc_proportional_to_timing_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class StdVideoH265VideoParameterSet { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265VideoParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265VideoParameterSet.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265VideoParameterSet.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265VideoParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.vps_video_parameter_set_id && (this.vps_video_parameter_set_id = data.vps_video_parameter_set_id), void 0 !== data.vps_max_sub_layers_minus1 && (this.vps_max_sub_layers_minus1 = data.vps_max_sub_layers_minus1), void 0 !== data.reserved1 && (this.reserved1 = data.reserved1), void 0 !== data.reserved2 && (this.reserved2 = data.reserved2), void 0 !== data.vps_num_units_in_tick && (this.vps_num_units_in_tick = data.vps_num_units_in_tick), void 0 !== data.vps_time_scale && (this.vps_time_scale = data.vps_time_scale), void 0 !== data.vps_num_ticks_poc_diff_one_minus1 && (this.vps_num_ticks_poc_diff_one_minus1 = data.vps_num_ticks_poc_diff_one_minus1), void 0 !== data.reserved3 && (this.reserved3 = data.reserved3), void 0 !== data.pDecPicBufMgr && (this.pDecPicBufMgr = data.pDecPicBufMgr), void 0 !== data.pHrdParameters && (this.pHrdParameters = data.pHrdParameters), void 0 !== data.pProfileTierLevel && (this.pProfileTierLevel = data.pProfileTierLevel); - } - get flags() { - return new StdVideoH265VpsFlags(this.#data.subarray(0, 0 + StdVideoH265VpsFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH265VpsFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get vps_video_parameter_set_id() { - return this.#view.getUint8(16); - } - set vps_video_parameter_set_id(value) { - this.#view.setUint8(16, Number(value)); - } - get vps_max_sub_layers_minus1() { - return this.#view.getUint8(17); - } - set vps_max_sub_layers_minus1(value) { - this.#view.setUint8(17, Number(value)); - } - get reserved1() { - return this.#view.getUint8(18); - } - set reserved1(value) { - this.#view.setUint8(18, Number(value)); - } - get reserved2() { - return this.#view.getUint8(19); - } - set reserved2(value) { - this.#view.setUint8(19, Number(value)); - } - get vps_num_units_in_tick() { - return this.#view.getUint32(20, LE); - } - set vps_num_units_in_tick(value) { - this.#view.setUint32(20, Number(value), LE); - } - get vps_time_scale() { - return this.#view.getUint32(24, LE); - } - set vps_time_scale(value) { - this.#view.setUint32(24, Number(value), LE); - } - get vps_num_ticks_poc_diff_one_minus1() { - return this.#view.getUint32(28, LE); - } - set vps_num_ticks_poc_diff_one_minus1(value) { - this.#view.setUint32(28, Number(value), LE); - } - get reserved3() { - return this.#view.getUint32(32, LE); - } - set reserved3(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pDecPicBufMgr() { - return this.#view.getBigUint64(40, LE); - } - set pDecPicBufMgr(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get pHrdParameters() { - return this.#view.getBigUint64(48, LE); - } - set pHrdParameters(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get pProfileTierLevel() { - return this.#view.getBigUint64(56, LE); - } - set pProfileTierLevel(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoH265ScalingLists { - static size = 1000; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265ScalingLists.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ScalingLists.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ScalingLists.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265ScalingLists.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.ScalingList4x4 && (this.ScalingList4x4 = data.ScalingList4x4), void 0 !== data.ScalingList8x8 && (this.ScalingList8x8 = data.ScalingList8x8), void 0 !== data.ScalingList16x16 && (this.ScalingList16x16 = data.ScalingList16x16), void 0 !== data.ScalingList32x32 && (this.ScalingList32x32 = data.ScalingList32x32), void 0 !== data.ScalingListDCCoef16x16 && (this.ScalingListDCCoef16x16 = data.ScalingListDCCoef16x16), void 0 !== data.ScalingListDCCoef32x32 && (this.ScalingListDCCoef32x32 = data.ScalingListDCCoef32x32); - } - get ScalingList4x4() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 96); - } - set ScalingList4x4(value) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - get ScalingList8x8() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 96, 384); - } - set ScalingList8x8(value) { - this.#data.set(new Uint8Array(value.buffer), 96); - } - get ScalingList16x16() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 480, 384); - } - set ScalingList16x16(value) { - this.#data.set(new Uint8Array(value.buffer), 480); - } - get ScalingList32x32() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 864, 128); - } - set ScalingList32x32(value) { - this.#data.set(new Uint8Array(value.buffer), 864); - } - get ScalingListDCCoef16x16() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 992, 6); - } - set ScalingListDCCoef16x16(value) { - this.#data.set(new Uint8Array(value.buffer), 992); - } - get ScalingListDCCoef32x32() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 998, 2); - } - set ScalingListDCCoef32x32(value) { - this.#data.set(new Uint8Array(value.buffer), 998); - } -} -export class StdVideoH265ShortTermRefPicSetFlags { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSetFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ShortTermRefPicSetFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ShortTermRefPicSetFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSetFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.inter_ref_pic_set_prediction_flag && (this.inter_ref_pic_set_prediction_flag = data.inter_ref_pic_set_prediction_flag), void 0 !== data.delta_rps_sign && (this.delta_rps_sign = data.delta_rps_sign); - } - get inter_ref_pic_set_prediction_flag() { - return this.#view.getUint32(0, LE); - } - set inter_ref_pic_set_prediction_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get delta_rps_sign() { - return this.#view.getUint32(4, LE); - } - set delta_rps_sign(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class StdVideoH265ShortTermRefPicSet { - static size = 92; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ShortTermRefPicSet.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ShortTermRefPicSet.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.delta_idx_minus1 && (this.delta_idx_minus1 = data.delta_idx_minus1), void 0 !== data.use_delta_flag && (this.use_delta_flag = data.use_delta_flag), void 0 !== data.abs_delta_rps_minus1 && (this.abs_delta_rps_minus1 = data.abs_delta_rps_minus1), void 0 !== data.used_by_curr_pic_flag && (this.used_by_curr_pic_flag = data.used_by_curr_pic_flag), void 0 !== data.used_by_curr_pic_s0_flag && (this.used_by_curr_pic_s0_flag = data.used_by_curr_pic_s0_flag), void 0 !== data.used_by_curr_pic_s1_flag && (this.used_by_curr_pic_s1_flag = data.used_by_curr_pic_s1_flag), void 0 !== data.reserved1 && (this.reserved1 = data.reserved1), void 0 !== data.reserved2 && (this.reserved2 = data.reserved2), void 0 !== data.reserved3 && (this.reserved3 = data.reserved3), void 0 !== data.num_negative_pics && (this.num_negative_pics = data.num_negative_pics), void 0 !== data.num_positive_pics && (this.num_positive_pics = data.num_positive_pics), void 0 !== data.delta_poc_s0_minus1 && (this.delta_poc_s0_minus1 = data.delta_poc_s0_minus1), void 0 !== data.delta_poc_s1_minus1 && (this.delta_poc_s1_minus1 = data.delta_poc_s1_minus1); - } - get flags() { - return new StdVideoH265ShortTermRefPicSetFlags(this.#data.subarray(0, 0 + StdVideoH265ShortTermRefPicSetFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH265ShortTermRefPicSetFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get delta_idx_minus1() { - return this.#view.getUint32(8, LE); - } - set delta_idx_minus1(value) { - this.#view.setUint32(8, Number(value), LE); - } - get use_delta_flag() { - return this.#view.getUint16(12, LE); - } - set use_delta_flag(value) { - this.#view.setUint16(12, Number(value), LE); - } - get abs_delta_rps_minus1() { - return this.#view.getUint16(14, LE); - } - set abs_delta_rps_minus1(value) { - this.#view.setUint16(14, Number(value), LE); - } - get used_by_curr_pic_flag() { - return this.#view.getUint16(16, LE); - } - set used_by_curr_pic_flag(value) { - this.#view.setUint16(16, Number(value), LE); - } - get used_by_curr_pic_s0_flag() { - return this.#view.getUint16(18, LE); - } - set used_by_curr_pic_s0_flag(value) { - this.#view.setUint16(18, Number(value), LE); - } - get used_by_curr_pic_s1_flag() { - return this.#view.getUint16(20, LE); - } - set used_by_curr_pic_s1_flag(value) { - this.#view.setUint16(20, Number(value), LE); - } - get reserved1() { - return this.#view.getUint16(22, LE); - } - set reserved1(value) { - this.#view.setUint16(22, Number(value), LE); - } - get reserved2() { - return this.#view.getUint8(24); - } - set reserved2(value) { - this.#view.setUint8(24, Number(value)); - } - get reserved3() { - return this.#view.getUint8(25); - } - set reserved3(value) { - this.#view.setUint8(25, Number(value)); - } - get num_negative_pics() { - return this.#view.getUint8(26); - } - set num_negative_pics(value) { - this.#view.setUint8(26, Number(value)); - } - get num_positive_pics() { - return this.#view.getUint8(27); - } - set num_positive_pics(value) { - this.#view.setUint8(27, Number(value)); - } - get delta_poc_s0_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 28, 16); - } - set delta_poc_s0_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 28); - } - get delta_poc_s1_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 60, 16); - } - set delta_poc_s1_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 60); - } -} -export class StdVideoH265LongTermRefPicsSps { - static size = 132; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265LongTermRefPicsSps.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265LongTermRefPicsSps.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265LongTermRefPicsSps.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265LongTermRefPicsSps.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.used_by_curr_pic_lt_sps_flag && (this.used_by_curr_pic_lt_sps_flag = data.used_by_curr_pic_lt_sps_flag), void 0 !== data.lt_ref_pic_poc_lsb_sps && (this.lt_ref_pic_poc_lsb_sps = data.lt_ref_pic_poc_lsb_sps); - } - get used_by_curr_pic_lt_sps_flag() { - return this.#view.getUint32(0, LE); - } - set used_by_curr_pic_lt_sps_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get lt_ref_pic_poc_lsb_sps() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 4, 32); - } - set lt_ref_pic_poc_lsb_sps(value) { - this.#data.set(new Uint8Array(value.buffer), 4); - } -} -export class StdVideoH265SpsVuiFlags { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265SpsVuiFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SpsVuiFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SpsVuiFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265SpsVuiFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.aspect_ratio_info_present_flag && (this.aspect_ratio_info_present_flag = data.aspect_ratio_info_present_flag), void 0 !== data.overscan_info_present_flag && (this.overscan_info_present_flag = data.overscan_info_present_flag), void 0 !== data.overscan_appropriate_flag && (this.overscan_appropriate_flag = data.overscan_appropriate_flag), void 0 !== data.video_signal_type_present_flag && (this.video_signal_type_present_flag = data.video_signal_type_present_flag), void 0 !== data.video_full_range_flag && (this.video_full_range_flag = data.video_full_range_flag), void 0 !== data.colour_description_present_flag && (this.colour_description_present_flag = data.colour_description_present_flag), void 0 !== data.chroma_loc_info_present_flag && (this.chroma_loc_info_present_flag = data.chroma_loc_info_present_flag), void 0 !== data.neutral_chroma_indication_flag && (this.neutral_chroma_indication_flag = data.neutral_chroma_indication_flag), void 0 !== data.field_seq_flag && (this.field_seq_flag = data.field_seq_flag), void 0 !== data.frame_field_info_present_flag && (this.frame_field_info_present_flag = data.frame_field_info_present_flag), void 0 !== data.default_display_window_flag && (this.default_display_window_flag = data.default_display_window_flag), void 0 !== data.vui_timing_info_present_flag && (this.vui_timing_info_present_flag = data.vui_timing_info_present_flag), void 0 !== data.vui_poc_proportional_to_timing_flag && (this.vui_poc_proportional_to_timing_flag = data.vui_poc_proportional_to_timing_flag), void 0 !== data.vui_hrd_parameters_present_flag && (this.vui_hrd_parameters_present_flag = data.vui_hrd_parameters_present_flag), void 0 !== data.bitstream_restriction_flag && (this.bitstream_restriction_flag = data.bitstream_restriction_flag), void 0 !== data.tiles_fixed_structure_flag && (this.tiles_fixed_structure_flag = data.tiles_fixed_structure_flag), void 0 !== data.motion_vectors_over_pic_boundaries_flag && (this.motion_vectors_over_pic_boundaries_flag = data.motion_vectors_over_pic_boundaries_flag), void 0 !== data.restricted_ref_pic_lists_flag && (this.restricted_ref_pic_lists_flag = data.restricted_ref_pic_lists_flag); - } - get aspect_ratio_info_present_flag() { - return this.#view.getUint32(0, LE); - } - set aspect_ratio_info_present_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get overscan_info_present_flag() { - return this.#view.getUint32(4, LE); - } - set overscan_info_present_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get overscan_appropriate_flag() { - return this.#view.getUint32(8, LE); - } - set overscan_appropriate_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get video_signal_type_present_flag() { - return this.#view.getUint32(12, LE); - } - set video_signal_type_present_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get video_full_range_flag() { - return this.#view.getUint32(16, LE); - } - set video_full_range_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } - get colour_description_present_flag() { - return this.#view.getUint32(20, LE); - } - set colour_description_present_flag(value) { - this.#view.setUint32(20, Number(value), LE); - } - get chroma_loc_info_present_flag() { - return this.#view.getUint32(24, LE); - } - set chroma_loc_info_present_flag(value) { - this.#view.setUint32(24, Number(value), LE); - } - get neutral_chroma_indication_flag() { - return this.#view.getUint32(28, LE); - } - set neutral_chroma_indication_flag(value) { - this.#view.setUint32(28, Number(value), LE); - } - get field_seq_flag() { - return this.#view.getUint32(32, LE); - } - set field_seq_flag(value) { - this.#view.setUint32(32, Number(value), LE); - } - get frame_field_info_present_flag() { - return this.#view.getUint32(36, LE); - } - set frame_field_info_present_flag(value) { - this.#view.setUint32(36, Number(value), LE); - } - get default_display_window_flag() { - return this.#view.getUint32(40, LE); - } - set default_display_window_flag(value) { - this.#view.setUint32(40, Number(value), LE); - } - get vui_timing_info_present_flag() { - return this.#view.getUint32(44, LE); - } - set vui_timing_info_present_flag(value) { - this.#view.setUint32(44, Number(value), LE); - } - get vui_poc_proportional_to_timing_flag() { - return this.#view.getUint32(48, LE); - } - set vui_poc_proportional_to_timing_flag(value) { - this.#view.setUint32(48, Number(value), LE); - } - get vui_hrd_parameters_present_flag() { - return this.#view.getUint32(52, LE); - } - set vui_hrd_parameters_present_flag(value) { - this.#view.setUint32(52, Number(value), LE); - } - get bitstream_restriction_flag() { - return this.#view.getUint32(56, LE); - } - set bitstream_restriction_flag(value) { - this.#view.setUint32(56, Number(value), LE); - } - get tiles_fixed_structure_flag() { - return this.#view.getUint32(60, LE); - } - set tiles_fixed_structure_flag(value) { - this.#view.setUint32(60, Number(value), LE); - } - get motion_vectors_over_pic_boundaries_flag() { - return this.#view.getUint32(64, LE); - } - set motion_vectors_over_pic_boundaries_flag(value) { - this.#view.setUint32(64, Number(value), LE); - } - get restricted_ref_pic_lists_flag() { - return this.#view.getUint32(68, LE); - } - set restricted_ref_pic_lists_flag(value) { - this.#view.setUint32(68, Number(value), LE); - } -} -export class StdVideoH265SequenceParameterSetVui { - static size = 128; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265SequenceParameterSetVui.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SequenceParameterSetVui.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SequenceParameterSetVui.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265SequenceParameterSetVui.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.aspect_ratio_idc && (this.aspect_ratio_idc = data.aspect_ratio_idc), void 0 !== data.sar_width && (this.sar_width = data.sar_width), void 0 !== data.sar_height && (this.sar_height = data.sar_height), void 0 !== data.video_format && (this.video_format = data.video_format), void 0 !== data.colour_primaries && (this.colour_primaries = data.colour_primaries), void 0 !== data.transfer_characteristics && (this.transfer_characteristics = data.transfer_characteristics), void 0 !== data.matrix_coeffs && (this.matrix_coeffs = data.matrix_coeffs), void 0 !== data.chroma_sample_loc_type_top_field && (this.chroma_sample_loc_type_top_field = data.chroma_sample_loc_type_top_field), void 0 !== data.chroma_sample_loc_type_bottom_field && (this.chroma_sample_loc_type_bottom_field = data.chroma_sample_loc_type_bottom_field), void 0 !== data.reserved1 && (this.reserved1 = data.reserved1), void 0 !== data.reserved2 && (this.reserved2 = data.reserved2), void 0 !== data.def_disp_win_left_offset && (this.def_disp_win_left_offset = data.def_disp_win_left_offset), void 0 !== data.def_disp_win_right_offset && (this.def_disp_win_right_offset = data.def_disp_win_right_offset), void 0 !== data.def_disp_win_top_offset && (this.def_disp_win_top_offset = data.def_disp_win_top_offset), void 0 !== data.def_disp_win_bottom_offset && (this.def_disp_win_bottom_offset = data.def_disp_win_bottom_offset), void 0 !== data.vui_num_units_in_tick && (this.vui_num_units_in_tick = data.vui_num_units_in_tick), void 0 !== data.vui_time_scale && (this.vui_time_scale = data.vui_time_scale), void 0 !== data.vui_num_ticks_poc_diff_one_minus1 && (this.vui_num_ticks_poc_diff_one_minus1 = data.vui_num_ticks_poc_diff_one_minus1), void 0 !== data.min_spatial_segmentation_idc && (this.min_spatial_segmentation_idc = data.min_spatial_segmentation_idc), void 0 !== data.reserved3 && (this.reserved3 = data.reserved3), void 0 !== data.max_bytes_per_pic_denom && (this.max_bytes_per_pic_denom = data.max_bytes_per_pic_denom), void 0 !== data.max_bits_per_min_cu_denom && (this.max_bits_per_min_cu_denom = data.max_bits_per_min_cu_denom), void 0 !== data.log2_max_mv_length_horizontal && (this.log2_max_mv_length_horizontal = data.log2_max_mv_length_horizontal), void 0 !== data.log2_max_mv_length_vertical && (this.log2_max_mv_length_vertical = data.log2_max_mv_length_vertical), void 0 !== data.pHrdParameters && (this.pHrdParameters = data.pHrdParameters); - } - get flags() { - return new StdVideoH265SpsVuiFlags(this.#data.subarray(0, 0 + StdVideoH265SpsVuiFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH265SpsVuiFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get aspect_ratio_idc() { - return this.#view.getUint32(72, LE); - } - set aspect_ratio_idc(value) { - this.#view.setUint32(72, Number(value), LE); - } - get sar_width() { - return this.#view.getUint16(76, LE); - } - set sar_width(value) { - this.#view.setUint16(76, Number(value), LE); - } - get sar_height() { - return this.#view.getUint16(78, LE); - } - set sar_height(value) { - this.#view.setUint16(78, Number(value), LE); - } - get video_format() { - return this.#view.getUint8(80); - } - set video_format(value) { - this.#view.setUint8(80, Number(value)); - } - get colour_primaries() { - return this.#view.getUint8(81); - } - set colour_primaries(value) { - this.#view.setUint8(81, Number(value)); - } - get transfer_characteristics() { - return this.#view.getUint8(82); - } - set transfer_characteristics(value) { - this.#view.setUint8(82, Number(value)); - } - get matrix_coeffs() { - return this.#view.getUint8(83); - } - set matrix_coeffs(value) { - this.#view.setUint8(83, Number(value)); - } - get chroma_sample_loc_type_top_field() { - return this.#view.getUint8(84); - } - set chroma_sample_loc_type_top_field(value) { - this.#view.setUint8(84, Number(value)); - } - get chroma_sample_loc_type_bottom_field() { - return this.#view.getUint8(85); - } - set chroma_sample_loc_type_bottom_field(value) { - this.#view.setUint8(85, Number(value)); - } - get reserved1() { - return this.#view.getUint8(86); - } - set reserved1(value) { - this.#view.setUint8(86, Number(value)); - } - get reserved2() { - return this.#view.getUint8(87); - } - set reserved2(value) { - this.#view.setUint8(87, Number(value)); - } - get def_disp_win_left_offset() { - return this.#view.getUint16(88, LE); - } - set def_disp_win_left_offset(value) { - this.#view.setUint16(88, Number(value), LE); - } - get def_disp_win_right_offset() { - return this.#view.getUint16(90, LE); - } - set def_disp_win_right_offset(value) { - this.#view.setUint16(90, Number(value), LE); - } - get def_disp_win_top_offset() { - return this.#view.getUint16(92, LE); - } - set def_disp_win_top_offset(value) { - this.#view.setUint16(92, Number(value), LE); - } - get def_disp_win_bottom_offset() { - return this.#view.getUint16(94, LE); - } - set def_disp_win_bottom_offset(value) { - this.#view.setUint16(94, Number(value), LE); - } - get vui_num_units_in_tick() { - return this.#view.getUint32(96, LE); - } - set vui_num_units_in_tick(value) { - this.#view.setUint32(96, Number(value), LE); - } - get vui_time_scale() { - return this.#view.getUint32(100, LE); - } - set vui_time_scale(value) { - this.#view.setUint32(100, Number(value), LE); - } - get vui_num_ticks_poc_diff_one_minus1() { - return this.#view.getUint32(104, LE); - } - set vui_num_ticks_poc_diff_one_minus1(value) { - this.#view.setUint32(104, Number(value), LE); - } - get min_spatial_segmentation_idc() { - return this.#view.getUint16(108, LE); - } - set min_spatial_segmentation_idc(value) { - this.#view.setUint16(108, Number(value), LE); - } - get reserved3() { - return this.#view.getUint16(110, LE); - } - set reserved3(value) { - this.#view.setUint16(110, Number(value), LE); - } - get max_bytes_per_pic_denom() { - return this.#view.getUint8(112); - } - set max_bytes_per_pic_denom(value) { - this.#view.setUint8(112, Number(value)); - } - get max_bits_per_min_cu_denom() { - return this.#view.getUint8(113); - } - set max_bits_per_min_cu_denom(value) { - this.#view.setUint8(113, Number(value)); - } - get log2_max_mv_length_horizontal() { - return this.#view.getUint8(114); - } - set log2_max_mv_length_horizontal(value) { - this.#view.setUint8(114, Number(value)); - } - get log2_max_mv_length_vertical() { - return this.#view.getUint8(115); - } - set log2_max_mv_length_vertical(value) { - this.#view.setUint8(115, Number(value)); - } - get pHrdParameters() { - return this.#view.getBigUint64(120, LE); - } - set pHrdParameters(value) { - this.#view.setBigUint64(120, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoH265PredictorPaletteEntries { - static size = 768; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265PredictorPaletteEntries.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265PredictorPaletteEntries.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265PredictorPaletteEntries.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265PredictorPaletteEntries.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.PredictorPaletteEntries && (this.PredictorPaletteEntries = data.PredictorPaletteEntries); - } - get PredictorPaletteEntries() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 0, 384); - } - set PredictorPaletteEntries(value) { - this.#data.set(new Uint8Array(value.buffer), 0); - } -} -export class StdVideoH265SpsFlags { - static size = 120; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265SpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SpsFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SpsFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265SpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.sps_temporal_id_nesting_flag && (this.sps_temporal_id_nesting_flag = data.sps_temporal_id_nesting_flag), void 0 !== data.separate_colour_plane_flag && (this.separate_colour_plane_flag = data.separate_colour_plane_flag), void 0 !== data.conformance_window_flag && (this.conformance_window_flag = data.conformance_window_flag), void 0 !== data.sps_sub_layer_ordering_info_present_flag && (this.sps_sub_layer_ordering_info_present_flag = data.sps_sub_layer_ordering_info_present_flag), void 0 !== data.scaling_list_enabled_flag && (this.scaling_list_enabled_flag = data.scaling_list_enabled_flag), void 0 !== data.sps_scaling_list_data_present_flag && (this.sps_scaling_list_data_present_flag = data.sps_scaling_list_data_present_flag), void 0 !== data.amp_enabled_flag && (this.amp_enabled_flag = data.amp_enabled_flag), void 0 !== data.sample_adaptive_offset_enabled_flag && (this.sample_adaptive_offset_enabled_flag = data.sample_adaptive_offset_enabled_flag), void 0 !== data.pcm_enabled_flag && (this.pcm_enabled_flag = data.pcm_enabled_flag), void 0 !== data.pcm_loop_filter_disabled_flag && (this.pcm_loop_filter_disabled_flag = data.pcm_loop_filter_disabled_flag), void 0 !== data.long_term_ref_pics_present_flag && (this.long_term_ref_pics_present_flag = data.long_term_ref_pics_present_flag), void 0 !== data.sps_temporal_mvp_enabled_flag && (this.sps_temporal_mvp_enabled_flag = data.sps_temporal_mvp_enabled_flag), void 0 !== data.strong_intra_smoothing_enabled_flag && (this.strong_intra_smoothing_enabled_flag = data.strong_intra_smoothing_enabled_flag), void 0 !== data.vui_parameters_present_flag && (this.vui_parameters_present_flag = data.vui_parameters_present_flag), void 0 !== data.sps_extension_present_flag && (this.sps_extension_present_flag = data.sps_extension_present_flag), void 0 !== data.sps_range_extension_flag && (this.sps_range_extension_flag = data.sps_range_extension_flag), void 0 !== data.transform_skip_rotation_enabled_flag && (this.transform_skip_rotation_enabled_flag = data.transform_skip_rotation_enabled_flag), void 0 !== data.transform_skip_context_enabled_flag && (this.transform_skip_context_enabled_flag = data.transform_skip_context_enabled_flag), void 0 !== data.implicit_rdpcm_enabled_flag && (this.implicit_rdpcm_enabled_flag = data.implicit_rdpcm_enabled_flag), void 0 !== data.explicit_rdpcm_enabled_flag && (this.explicit_rdpcm_enabled_flag = data.explicit_rdpcm_enabled_flag), void 0 !== data.extended_precision_processing_flag && (this.extended_precision_processing_flag = data.extended_precision_processing_flag), void 0 !== data.intra_smoothing_disabled_flag && (this.intra_smoothing_disabled_flag = data.intra_smoothing_disabled_flag), void 0 !== data.high_precision_offsets_enabled_flag && (this.high_precision_offsets_enabled_flag = data.high_precision_offsets_enabled_flag), void 0 !== data.persistent_rice_adaptation_enabled_flag && (this.persistent_rice_adaptation_enabled_flag = data.persistent_rice_adaptation_enabled_flag), void 0 !== data.cabac_bypass_alignment_enabled_flag && (this.cabac_bypass_alignment_enabled_flag = data.cabac_bypass_alignment_enabled_flag), void 0 !== data.sps_scc_extension_flag && (this.sps_scc_extension_flag = data.sps_scc_extension_flag), void 0 !== data.sps_curr_pic_ref_enabled_flag && (this.sps_curr_pic_ref_enabled_flag = data.sps_curr_pic_ref_enabled_flag), void 0 !== data.palette_mode_enabled_flag && (this.palette_mode_enabled_flag = data.palette_mode_enabled_flag), void 0 !== data.sps_palette_predictor_initializers_present_flag && (this.sps_palette_predictor_initializers_present_flag = data.sps_palette_predictor_initializers_present_flag), void 0 !== data.intra_boundary_filtering_disabled_flag && (this.intra_boundary_filtering_disabled_flag = data.intra_boundary_filtering_disabled_flag); - } - get sps_temporal_id_nesting_flag() { - return this.#view.getUint32(0, LE); - } - set sps_temporal_id_nesting_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get separate_colour_plane_flag() { - return this.#view.getUint32(4, LE); - } - set separate_colour_plane_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get conformance_window_flag() { - return this.#view.getUint32(8, LE); - } - set conformance_window_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get sps_sub_layer_ordering_info_present_flag() { - return this.#view.getUint32(12, LE); - } - set sps_sub_layer_ordering_info_present_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get scaling_list_enabled_flag() { - return this.#view.getUint32(16, LE); - } - set scaling_list_enabled_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } - get sps_scaling_list_data_present_flag() { - return this.#view.getUint32(20, LE); - } - set sps_scaling_list_data_present_flag(value) { - this.#view.setUint32(20, Number(value), LE); - } - get amp_enabled_flag() { - return this.#view.getUint32(24, LE); - } - set amp_enabled_flag(value) { - this.#view.setUint32(24, Number(value), LE); - } - get sample_adaptive_offset_enabled_flag() { - return this.#view.getUint32(28, LE); - } - set sample_adaptive_offset_enabled_flag(value) { - this.#view.setUint32(28, Number(value), LE); - } - get pcm_enabled_flag() { - return this.#view.getUint32(32, LE); - } - set pcm_enabled_flag(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pcm_loop_filter_disabled_flag() { - return this.#view.getUint32(36, LE); - } - set pcm_loop_filter_disabled_flag(value) { - this.#view.setUint32(36, Number(value), LE); - } - get long_term_ref_pics_present_flag() { - return this.#view.getUint32(40, LE); - } - set long_term_ref_pics_present_flag(value) { - this.#view.setUint32(40, Number(value), LE); - } - get sps_temporal_mvp_enabled_flag() { - return this.#view.getUint32(44, LE); - } - set sps_temporal_mvp_enabled_flag(value) { - this.#view.setUint32(44, Number(value), LE); - } - get strong_intra_smoothing_enabled_flag() { - return this.#view.getUint32(48, LE); - } - set strong_intra_smoothing_enabled_flag(value) { - this.#view.setUint32(48, Number(value), LE); - } - get vui_parameters_present_flag() { - return this.#view.getUint32(52, LE); - } - set vui_parameters_present_flag(value) { - this.#view.setUint32(52, Number(value), LE); - } - get sps_extension_present_flag() { - return this.#view.getUint32(56, LE); - } - set sps_extension_present_flag(value) { - this.#view.setUint32(56, Number(value), LE); - } - get sps_range_extension_flag() { - return this.#view.getUint32(60, LE); - } - set sps_range_extension_flag(value) { - this.#view.setUint32(60, Number(value), LE); - } - get transform_skip_rotation_enabled_flag() { - return this.#view.getUint32(64, LE); - } - set transform_skip_rotation_enabled_flag(value) { - this.#view.setUint32(64, Number(value), LE); - } - get transform_skip_context_enabled_flag() { - return this.#view.getUint32(68, LE); - } - set transform_skip_context_enabled_flag(value) { - this.#view.setUint32(68, Number(value), LE); - } - get implicit_rdpcm_enabled_flag() { - return this.#view.getUint32(72, LE); - } - set implicit_rdpcm_enabled_flag(value) { - this.#view.setUint32(72, Number(value), LE); - } - get explicit_rdpcm_enabled_flag() { - return this.#view.getUint32(76, LE); - } - set explicit_rdpcm_enabled_flag(value) { - this.#view.setUint32(76, Number(value), LE); - } - get extended_precision_processing_flag() { - return this.#view.getUint32(80, LE); - } - set extended_precision_processing_flag(value) { - this.#view.setUint32(80, Number(value), LE); - } - get intra_smoothing_disabled_flag() { - return this.#view.getUint32(84, LE); - } - set intra_smoothing_disabled_flag(value) { - this.#view.setUint32(84, Number(value), LE); - } - get high_precision_offsets_enabled_flag() { - return this.#view.getUint32(88, LE); - } - set high_precision_offsets_enabled_flag(value) { - this.#view.setUint32(88, Number(value), LE); - } - get persistent_rice_adaptation_enabled_flag() { - return this.#view.getUint32(92, LE); - } - set persistent_rice_adaptation_enabled_flag(value) { - this.#view.setUint32(92, Number(value), LE); - } - get cabac_bypass_alignment_enabled_flag() { - return this.#view.getUint32(96, LE); - } - set cabac_bypass_alignment_enabled_flag(value) { - this.#view.setUint32(96, Number(value), LE); - } - get sps_scc_extension_flag() { - return this.#view.getUint32(100, LE); - } - set sps_scc_extension_flag(value) { - this.#view.setUint32(100, Number(value), LE); - } - get sps_curr_pic_ref_enabled_flag() { - return this.#view.getUint32(104, LE); - } - set sps_curr_pic_ref_enabled_flag(value) { - this.#view.setUint32(104, Number(value), LE); - } - get palette_mode_enabled_flag() { - return this.#view.getUint32(108, LE); - } - set palette_mode_enabled_flag(value) { - this.#view.setUint32(108, Number(value), LE); - } - get sps_palette_predictor_initializers_present_flag() { - return this.#view.getUint32(112, LE); - } - set sps_palette_predictor_initializers_present_flag(value) { - this.#view.setUint32(112, Number(value), LE); - } - get intra_boundary_filtering_disabled_flag() { - return this.#view.getUint32(116, LE); - } - set intra_boundary_filtering_disabled_flag(value) { - this.#view.setUint32(116, Number(value), LE); - } -} -export class StdVideoH265SequenceParameterSet { - static size = 232; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265SequenceParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SequenceParameterSet.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SequenceParameterSet.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265SequenceParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.chroma_format_idc && (this.chroma_format_idc = data.chroma_format_idc), void 0 !== data.pic_width_in_luma_samples && (this.pic_width_in_luma_samples = data.pic_width_in_luma_samples), void 0 !== data.pic_height_in_luma_samples && (this.pic_height_in_luma_samples = data.pic_height_in_luma_samples), void 0 !== data.sps_video_parameter_set_id && (this.sps_video_parameter_set_id = data.sps_video_parameter_set_id), void 0 !== data.sps_max_sub_layers_minus1 && (this.sps_max_sub_layers_minus1 = data.sps_max_sub_layers_minus1), void 0 !== data.sps_seq_parameter_set_id && (this.sps_seq_parameter_set_id = data.sps_seq_parameter_set_id), void 0 !== data.bit_depth_luma_minus8 && (this.bit_depth_luma_minus8 = data.bit_depth_luma_minus8), void 0 !== data.bit_depth_chroma_minus8 && (this.bit_depth_chroma_minus8 = data.bit_depth_chroma_minus8), void 0 !== data.log2_max_pic_order_cnt_lsb_minus4 && (this.log2_max_pic_order_cnt_lsb_minus4 = data.log2_max_pic_order_cnt_lsb_minus4), void 0 !== data.log2_min_luma_coding_block_size_minus3 && (this.log2_min_luma_coding_block_size_minus3 = data.log2_min_luma_coding_block_size_minus3), void 0 !== data.log2_diff_max_min_luma_coding_block_size && (this.log2_diff_max_min_luma_coding_block_size = data.log2_diff_max_min_luma_coding_block_size), void 0 !== data.log2_min_luma_transform_block_size_minus2 && (this.log2_min_luma_transform_block_size_minus2 = data.log2_min_luma_transform_block_size_minus2), void 0 !== data.log2_diff_max_min_luma_transform_block_size && (this.log2_diff_max_min_luma_transform_block_size = data.log2_diff_max_min_luma_transform_block_size), void 0 !== data.max_transform_hierarchy_depth_inter && (this.max_transform_hierarchy_depth_inter = data.max_transform_hierarchy_depth_inter), void 0 !== data.max_transform_hierarchy_depth_intra && (this.max_transform_hierarchy_depth_intra = data.max_transform_hierarchy_depth_intra), void 0 !== data.num_short_term_ref_pic_sets && (this.num_short_term_ref_pic_sets = data.num_short_term_ref_pic_sets), void 0 !== data.num_long_term_ref_pics_sps && (this.num_long_term_ref_pics_sps = data.num_long_term_ref_pics_sps), void 0 !== data.pcm_sample_bit_depth_luma_minus1 && (this.pcm_sample_bit_depth_luma_minus1 = data.pcm_sample_bit_depth_luma_minus1), void 0 !== data.pcm_sample_bit_depth_chroma_minus1 && (this.pcm_sample_bit_depth_chroma_minus1 = data.pcm_sample_bit_depth_chroma_minus1), void 0 !== data.log2_min_pcm_luma_coding_block_size_minus3 && (this.log2_min_pcm_luma_coding_block_size_minus3 = data.log2_min_pcm_luma_coding_block_size_minus3), void 0 !== data.log2_diff_max_min_pcm_luma_coding_block_size && (this.log2_diff_max_min_pcm_luma_coding_block_size = data.log2_diff_max_min_pcm_luma_coding_block_size), void 0 !== data.reserved1 && (this.reserved1 = data.reserved1), void 0 !== data.reserved2 && (this.reserved2 = data.reserved2), void 0 !== data.palette_max_size && (this.palette_max_size = data.palette_max_size), void 0 !== data.delta_palette_max_predictor_size && (this.delta_palette_max_predictor_size = data.delta_palette_max_predictor_size), void 0 !== data.motion_vector_resolution_control_idc && (this.motion_vector_resolution_control_idc = data.motion_vector_resolution_control_idc), void 0 !== data.sps_num_palette_predictor_initializers_minus1 && (this.sps_num_palette_predictor_initializers_minus1 = data.sps_num_palette_predictor_initializers_minus1), void 0 !== data.conf_win_left_offset && (this.conf_win_left_offset = data.conf_win_left_offset), void 0 !== data.conf_win_right_offset && (this.conf_win_right_offset = data.conf_win_right_offset), void 0 !== data.conf_win_top_offset && (this.conf_win_top_offset = data.conf_win_top_offset), void 0 !== data.conf_win_bottom_offset && (this.conf_win_bottom_offset = data.conf_win_bottom_offset), void 0 !== data.pProfileTierLevel && (this.pProfileTierLevel = data.pProfileTierLevel), void 0 !== data.pDecPicBufMgr && (this.pDecPicBufMgr = data.pDecPicBufMgr), void 0 !== data.pScalingLists && (this.pScalingLists = data.pScalingLists), void 0 !== data.pShortTermRefPicSet && (this.pShortTermRefPicSet = data.pShortTermRefPicSet), void 0 !== data.pLongTermRefPicsSps && (this.pLongTermRefPicsSps = data.pLongTermRefPicsSps), void 0 !== data.pSequenceParameterSetVui && (this.pSequenceParameterSetVui = data.pSequenceParameterSetVui), void 0 !== data.pPredictorPaletteEntries && (this.pPredictorPaletteEntries = data.pPredictorPaletteEntries); - } - get flags() { - return new StdVideoH265SpsFlags(this.#data.subarray(0, 0 + StdVideoH265SpsFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH265SpsFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get chroma_format_idc() { - return this.#view.getUint32(120, LE); - } - set chroma_format_idc(value) { - this.#view.setUint32(120, Number(value), LE); - } - get pic_width_in_luma_samples() { - return this.#view.getUint32(124, LE); - } - set pic_width_in_luma_samples(value) { - this.#view.setUint32(124, Number(value), LE); - } - get pic_height_in_luma_samples() { - return this.#view.getUint32(128, LE); - } - set pic_height_in_luma_samples(value) { - this.#view.setUint32(128, Number(value), LE); - } - get sps_video_parameter_set_id() { - return this.#view.getUint8(132); - } - set sps_video_parameter_set_id(value) { - this.#view.setUint8(132, Number(value)); - } - get sps_max_sub_layers_minus1() { - return this.#view.getUint8(133); - } - set sps_max_sub_layers_minus1(value) { - this.#view.setUint8(133, Number(value)); - } - get sps_seq_parameter_set_id() { - return this.#view.getUint8(134); - } - set sps_seq_parameter_set_id(value) { - this.#view.setUint8(134, Number(value)); - } - get bit_depth_luma_minus8() { - return this.#view.getUint8(135); - } - set bit_depth_luma_minus8(value) { - this.#view.setUint8(135, Number(value)); - } - get bit_depth_chroma_minus8() { - return this.#view.getUint8(136); - } - set bit_depth_chroma_minus8(value) { - this.#view.setUint8(136, Number(value)); - } - get log2_max_pic_order_cnt_lsb_minus4() { - return this.#view.getUint8(137); - } - set log2_max_pic_order_cnt_lsb_minus4(value) { - this.#view.setUint8(137, Number(value)); - } - get log2_min_luma_coding_block_size_minus3() { - return this.#view.getUint8(138); - } - set log2_min_luma_coding_block_size_minus3(value) { - this.#view.setUint8(138, Number(value)); - } - get log2_diff_max_min_luma_coding_block_size() { - return this.#view.getUint8(139); - } - set log2_diff_max_min_luma_coding_block_size(value) { - this.#view.setUint8(139, Number(value)); - } - get log2_min_luma_transform_block_size_minus2() { - return this.#view.getUint8(140); - } - set log2_min_luma_transform_block_size_minus2(value) { - this.#view.setUint8(140, Number(value)); - } - get log2_diff_max_min_luma_transform_block_size() { - return this.#view.getUint8(141); - } - set log2_diff_max_min_luma_transform_block_size(value) { - this.#view.setUint8(141, Number(value)); - } - get max_transform_hierarchy_depth_inter() { - return this.#view.getUint8(142); - } - set max_transform_hierarchy_depth_inter(value) { - this.#view.setUint8(142, Number(value)); - } - get max_transform_hierarchy_depth_intra() { - return this.#view.getUint8(143); - } - set max_transform_hierarchy_depth_intra(value) { - this.#view.setUint8(143, Number(value)); - } - get num_short_term_ref_pic_sets() { - return this.#view.getUint8(144); - } - set num_short_term_ref_pic_sets(value) { - this.#view.setUint8(144, Number(value)); - } - get num_long_term_ref_pics_sps() { - return this.#view.getUint8(145); - } - set num_long_term_ref_pics_sps(value) { - this.#view.setUint8(145, Number(value)); - } - get pcm_sample_bit_depth_luma_minus1() { - return this.#view.getUint8(146); - } - set pcm_sample_bit_depth_luma_minus1(value) { - this.#view.setUint8(146, Number(value)); - } - get pcm_sample_bit_depth_chroma_minus1() { - return this.#view.getUint8(147); - } - set pcm_sample_bit_depth_chroma_minus1(value) { - this.#view.setUint8(147, Number(value)); - } - get log2_min_pcm_luma_coding_block_size_minus3() { - return this.#view.getUint8(148); - } - set log2_min_pcm_luma_coding_block_size_minus3(value) { - this.#view.setUint8(148, Number(value)); - } - get log2_diff_max_min_pcm_luma_coding_block_size() { - return this.#view.getUint8(149); - } - set log2_diff_max_min_pcm_luma_coding_block_size(value) { - this.#view.setUint8(149, Number(value)); - } - get reserved1() { - return this.#view.getUint8(150); - } - set reserved1(value) { - this.#view.setUint8(150, Number(value)); - } - get reserved2() { - return this.#view.getUint8(151); - } - set reserved2(value) { - this.#view.setUint8(151, Number(value)); - } - get palette_max_size() { - return this.#view.getUint8(152); - } - set palette_max_size(value) { - this.#view.setUint8(152, Number(value)); - } - get delta_palette_max_predictor_size() { - return this.#view.getUint8(153); - } - set delta_palette_max_predictor_size(value) { - this.#view.setUint8(153, Number(value)); - } - get motion_vector_resolution_control_idc() { - return this.#view.getUint8(154); - } - set motion_vector_resolution_control_idc(value) { - this.#view.setUint8(154, Number(value)); - } - get sps_num_palette_predictor_initializers_minus1() { - return this.#view.getUint8(155); - } - set sps_num_palette_predictor_initializers_minus1(value) { - this.#view.setUint8(155, Number(value)); - } - get conf_win_left_offset() { - return this.#view.getUint32(156, LE); - } - set conf_win_left_offset(value) { - this.#view.setUint32(156, Number(value), LE); - } - get conf_win_right_offset() { - return this.#view.getUint32(160, LE); - } - set conf_win_right_offset(value) { - this.#view.setUint32(160, Number(value), LE); - } - get conf_win_top_offset() { - return this.#view.getUint32(164, LE); - } - set conf_win_top_offset(value) { - this.#view.setUint32(164, Number(value), LE); - } - get conf_win_bottom_offset() { - return this.#view.getUint32(168, LE); - } - set conf_win_bottom_offset(value) { - this.#view.setUint32(168, Number(value), LE); - } - get pProfileTierLevel() { - return this.#view.getBigUint64(176, LE); - } - set pProfileTierLevel(value) { - this.#view.setBigUint64(176, BigInt(anyPointer(value)), LE); - } - get pDecPicBufMgr() { - return this.#view.getBigUint64(184, LE); - } - set pDecPicBufMgr(value) { - this.#view.setBigUint64(184, BigInt(anyPointer(value)), LE); - } - get pScalingLists() { - return this.#view.getBigUint64(192, LE); - } - set pScalingLists(value) { - this.#view.setBigUint64(192, BigInt(anyPointer(value)), LE); - } - get pShortTermRefPicSet() { - return this.#view.getBigUint64(200, LE); - } - set pShortTermRefPicSet(value) { - this.#view.setBigUint64(200, BigInt(anyPointer(value)), LE); - } - get pLongTermRefPicsSps() { - return this.#view.getBigUint64(208, LE); - } - set pLongTermRefPicsSps(value) { - this.#view.setBigUint64(208, BigInt(anyPointer(value)), LE); - } - get pSequenceParameterSetVui() { - return this.#view.getBigUint64(216, LE); - } - set pSequenceParameterSetVui(value) { - this.#view.setBigUint64(216, BigInt(anyPointer(value)), LE); - } - get pPredictorPaletteEntries() { - return this.#view.getBigUint64(224, LE); - } - set pPredictorPaletteEntries(value) { - this.#view.setBigUint64(224, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoH265PpsFlags { - static size = 124; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265PpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265PpsFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265PpsFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265PpsFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.dependent_slice_segments_enabled_flag && (this.dependent_slice_segments_enabled_flag = data.dependent_slice_segments_enabled_flag), void 0 !== data.output_flag_present_flag && (this.output_flag_present_flag = data.output_flag_present_flag), void 0 !== data.sign_data_hiding_enabled_flag && (this.sign_data_hiding_enabled_flag = data.sign_data_hiding_enabled_flag), void 0 !== data.cabac_init_present_flag && (this.cabac_init_present_flag = data.cabac_init_present_flag), void 0 !== data.constrained_intra_pred_flag && (this.constrained_intra_pred_flag = data.constrained_intra_pred_flag), void 0 !== data.transform_skip_enabled_flag && (this.transform_skip_enabled_flag = data.transform_skip_enabled_flag), void 0 !== data.cu_qp_delta_enabled_flag && (this.cu_qp_delta_enabled_flag = data.cu_qp_delta_enabled_flag), void 0 !== data.pps_slice_chroma_qp_offsets_present_flag && (this.pps_slice_chroma_qp_offsets_present_flag = data.pps_slice_chroma_qp_offsets_present_flag), void 0 !== data.weighted_pred_flag && (this.weighted_pred_flag = data.weighted_pred_flag), void 0 !== data.weighted_bipred_flag && (this.weighted_bipred_flag = data.weighted_bipred_flag), void 0 !== data.transquant_bypass_enabled_flag && (this.transquant_bypass_enabled_flag = data.transquant_bypass_enabled_flag), void 0 !== data.tiles_enabled_flag && (this.tiles_enabled_flag = data.tiles_enabled_flag), void 0 !== data.entropy_coding_sync_enabled_flag && (this.entropy_coding_sync_enabled_flag = data.entropy_coding_sync_enabled_flag), void 0 !== data.uniform_spacing_flag && (this.uniform_spacing_flag = data.uniform_spacing_flag), void 0 !== data.loop_filter_across_tiles_enabled_flag && (this.loop_filter_across_tiles_enabled_flag = data.loop_filter_across_tiles_enabled_flag), void 0 !== data.pps_loop_filter_across_slices_enabled_flag && (this.pps_loop_filter_across_slices_enabled_flag = data.pps_loop_filter_across_slices_enabled_flag), void 0 !== data.deblocking_filter_control_present_flag && (this.deblocking_filter_control_present_flag = data.deblocking_filter_control_present_flag), void 0 !== data.deblocking_filter_override_enabled_flag && (this.deblocking_filter_override_enabled_flag = data.deblocking_filter_override_enabled_flag), void 0 !== data.pps_deblocking_filter_disabled_flag && (this.pps_deblocking_filter_disabled_flag = data.pps_deblocking_filter_disabled_flag), void 0 !== data.pps_scaling_list_data_present_flag && (this.pps_scaling_list_data_present_flag = data.pps_scaling_list_data_present_flag), void 0 !== data.lists_modification_present_flag && (this.lists_modification_present_flag = data.lists_modification_present_flag), void 0 !== data.slice_segment_header_extension_present_flag && (this.slice_segment_header_extension_present_flag = data.slice_segment_header_extension_present_flag), void 0 !== data.pps_extension_present_flag && (this.pps_extension_present_flag = data.pps_extension_present_flag), void 0 !== data.cross_component_prediction_enabled_flag && (this.cross_component_prediction_enabled_flag = data.cross_component_prediction_enabled_flag), void 0 !== data.chroma_qp_offset_list_enabled_flag && (this.chroma_qp_offset_list_enabled_flag = data.chroma_qp_offset_list_enabled_flag), void 0 !== data.pps_curr_pic_ref_enabled_flag && (this.pps_curr_pic_ref_enabled_flag = data.pps_curr_pic_ref_enabled_flag), void 0 !== data.residual_adaptive_colour_transform_enabled_flag && (this.residual_adaptive_colour_transform_enabled_flag = data.residual_adaptive_colour_transform_enabled_flag), void 0 !== data.pps_slice_act_qp_offsets_present_flag && (this.pps_slice_act_qp_offsets_present_flag = data.pps_slice_act_qp_offsets_present_flag), void 0 !== data.pps_palette_predictor_initializers_present_flag && (this.pps_palette_predictor_initializers_present_flag = data.pps_palette_predictor_initializers_present_flag), void 0 !== data.monochrome_palette_flag && (this.monochrome_palette_flag = data.monochrome_palette_flag), void 0 !== data.pps_range_extension_flag && (this.pps_range_extension_flag = data.pps_range_extension_flag); - } - get dependent_slice_segments_enabled_flag() { - return this.#view.getUint32(0, LE); - } - set dependent_slice_segments_enabled_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get output_flag_present_flag() { - return this.#view.getUint32(4, LE); - } - set output_flag_present_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get sign_data_hiding_enabled_flag() { - return this.#view.getUint32(8, LE); - } - set sign_data_hiding_enabled_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get cabac_init_present_flag() { - return this.#view.getUint32(12, LE); - } - set cabac_init_present_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get constrained_intra_pred_flag() { - return this.#view.getUint32(16, LE); - } - set constrained_intra_pred_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } - get transform_skip_enabled_flag() { - return this.#view.getUint32(20, LE); - } - set transform_skip_enabled_flag(value) { - this.#view.setUint32(20, Number(value), LE); - } - get cu_qp_delta_enabled_flag() { - return this.#view.getUint32(24, LE); - } - set cu_qp_delta_enabled_flag(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pps_slice_chroma_qp_offsets_present_flag() { - return this.#view.getUint32(28, LE); - } - set pps_slice_chroma_qp_offsets_present_flag(value) { - this.#view.setUint32(28, Number(value), LE); - } - get weighted_pred_flag() { - return this.#view.getUint32(32, LE); - } - set weighted_pred_flag(value) { - this.#view.setUint32(32, Number(value), LE); - } - get weighted_bipred_flag() { - return this.#view.getUint32(36, LE); - } - set weighted_bipred_flag(value) { - this.#view.setUint32(36, Number(value), LE); - } - get transquant_bypass_enabled_flag() { - return this.#view.getUint32(40, LE); - } - set transquant_bypass_enabled_flag(value) { - this.#view.setUint32(40, Number(value), LE); - } - get tiles_enabled_flag() { - return this.#view.getUint32(44, LE); - } - set tiles_enabled_flag(value) { - this.#view.setUint32(44, Number(value), LE); - } - get entropy_coding_sync_enabled_flag() { - return this.#view.getUint32(48, LE); - } - set entropy_coding_sync_enabled_flag(value) { - this.#view.setUint32(48, Number(value), LE); - } - get uniform_spacing_flag() { - return this.#view.getUint32(52, LE); - } - set uniform_spacing_flag(value) { - this.#view.setUint32(52, Number(value), LE); - } - get loop_filter_across_tiles_enabled_flag() { - return this.#view.getUint32(56, LE); - } - set loop_filter_across_tiles_enabled_flag(value) { - this.#view.setUint32(56, Number(value), LE); - } - get pps_loop_filter_across_slices_enabled_flag() { - return this.#view.getUint32(60, LE); - } - set pps_loop_filter_across_slices_enabled_flag(value) { - this.#view.setUint32(60, Number(value), LE); - } - get deblocking_filter_control_present_flag() { - return this.#view.getUint32(64, LE); - } - set deblocking_filter_control_present_flag(value) { - this.#view.setUint32(64, Number(value), LE); - } - get deblocking_filter_override_enabled_flag() { - return this.#view.getUint32(68, LE); - } - set deblocking_filter_override_enabled_flag(value) { - this.#view.setUint32(68, Number(value), LE); - } - get pps_deblocking_filter_disabled_flag() { - return this.#view.getUint32(72, LE); - } - set pps_deblocking_filter_disabled_flag(value) { - this.#view.setUint32(72, Number(value), LE); - } - get pps_scaling_list_data_present_flag() { - return this.#view.getUint32(76, LE); - } - set pps_scaling_list_data_present_flag(value) { - this.#view.setUint32(76, Number(value), LE); - } - get lists_modification_present_flag() { - return this.#view.getUint32(80, LE); - } - set lists_modification_present_flag(value) { - this.#view.setUint32(80, Number(value), LE); - } - get slice_segment_header_extension_present_flag() { - return this.#view.getUint32(84, LE); - } - set slice_segment_header_extension_present_flag(value) { - this.#view.setUint32(84, Number(value), LE); - } - get pps_extension_present_flag() { - return this.#view.getUint32(88, LE); - } - set pps_extension_present_flag(value) { - this.#view.setUint32(88, Number(value), LE); - } - get cross_component_prediction_enabled_flag() { - return this.#view.getUint32(92, LE); - } - set cross_component_prediction_enabled_flag(value) { - this.#view.setUint32(92, Number(value), LE); - } - get chroma_qp_offset_list_enabled_flag() { - return this.#view.getUint32(96, LE); - } - set chroma_qp_offset_list_enabled_flag(value) { - this.#view.setUint32(96, Number(value), LE); - } - get pps_curr_pic_ref_enabled_flag() { - return this.#view.getUint32(100, LE); - } - set pps_curr_pic_ref_enabled_flag(value) { - this.#view.setUint32(100, Number(value), LE); - } - get residual_adaptive_colour_transform_enabled_flag() { - return this.#view.getUint32(104, LE); - } - set residual_adaptive_colour_transform_enabled_flag(value) { - this.#view.setUint32(104, Number(value), LE); - } - get pps_slice_act_qp_offsets_present_flag() { - return this.#view.getUint32(108, LE); - } - set pps_slice_act_qp_offsets_present_flag(value) { - this.#view.setUint32(108, Number(value), LE); - } - get pps_palette_predictor_initializers_present_flag() { - return this.#view.getUint32(112, LE); - } - set pps_palette_predictor_initializers_present_flag(value) { - this.#view.setUint32(112, Number(value), LE); - } - get monochrome_palette_flag() { - return this.#view.getUint32(116, LE); - } - set monochrome_palette_flag(value) { - this.#view.setUint32(116, Number(value), LE); - } - get pps_range_extension_flag() { - return this.#view.getUint32(120, LE); - } - set pps_range_extension_flag(value) { - this.#view.setUint32(120, Number(value), LE); - } -} -export class StdVideoH265PictureParameterSet { - static size = 264; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoH265PictureParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265PictureParameterSet.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265PictureParameterSet.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoH265PictureParameterSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pps_pic_parameter_set_id && (this.pps_pic_parameter_set_id = data.pps_pic_parameter_set_id), void 0 !== data.pps_seq_parameter_set_id && (this.pps_seq_parameter_set_id = data.pps_seq_parameter_set_id), void 0 !== data.sps_video_parameter_set_id && (this.sps_video_parameter_set_id = data.sps_video_parameter_set_id), void 0 !== data.num_extra_slice_header_bits && (this.num_extra_slice_header_bits = data.num_extra_slice_header_bits), void 0 !== data.num_ref_idx_l0_default_active_minus1 && (this.num_ref_idx_l0_default_active_minus1 = data.num_ref_idx_l0_default_active_minus1), void 0 !== data.num_ref_idx_l1_default_active_minus1 && (this.num_ref_idx_l1_default_active_minus1 = data.num_ref_idx_l1_default_active_minus1), void 0 !== data.init_qp_minus26 && (this.init_qp_minus26 = data.init_qp_minus26), void 0 !== data.diff_cu_qp_delta_depth && (this.diff_cu_qp_delta_depth = data.diff_cu_qp_delta_depth), void 0 !== data.pps_cb_qp_offset && (this.pps_cb_qp_offset = data.pps_cb_qp_offset), void 0 !== data.pps_cr_qp_offset && (this.pps_cr_qp_offset = data.pps_cr_qp_offset), void 0 !== data.pps_beta_offset_div2 && (this.pps_beta_offset_div2 = data.pps_beta_offset_div2), void 0 !== data.pps_tc_offset_div2 && (this.pps_tc_offset_div2 = data.pps_tc_offset_div2), void 0 !== data.log2_parallel_merge_level_minus2 && (this.log2_parallel_merge_level_minus2 = data.log2_parallel_merge_level_minus2), void 0 !== data.log2_max_transform_skip_block_size_minus2 && (this.log2_max_transform_skip_block_size_minus2 = data.log2_max_transform_skip_block_size_minus2), void 0 !== data.diff_cu_chroma_qp_offset_depth && (this.diff_cu_chroma_qp_offset_depth = data.diff_cu_chroma_qp_offset_depth), void 0 !== data.chroma_qp_offset_list_len_minus1 && (this.chroma_qp_offset_list_len_minus1 = data.chroma_qp_offset_list_len_minus1), void 0 !== data.cb_qp_offset_list && (this.cb_qp_offset_list = data.cb_qp_offset_list), void 0 !== data.cr_qp_offset_list && (this.cr_qp_offset_list = data.cr_qp_offset_list), void 0 !== data.log2_sao_offset_scale_luma && (this.log2_sao_offset_scale_luma = data.log2_sao_offset_scale_luma), void 0 !== data.log2_sao_offset_scale_chroma && (this.log2_sao_offset_scale_chroma = data.log2_sao_offset_scale_chroma), void 0 !== data.pps_act_y_qp_offset_plus5 && (this.pps_act_y_qp_offset_plus5 = data.pps_act_y_qp_offset_plus5), void 0 !== data.pps_act_cb_qp_offset_plus5 && (this.pps_act_cb_qp_offset_plus5 = data.pps_act_cb_qp_offset_plus5), void 0 !== data.pps_act_cr_qp_offset_plus3 && (this.pps_act_cr_qp_offset_plus3 = data.pps_act_cr_qp_offset_plus3), void 0 !== data.pps_num_palette_predictor_initializers && (this.pps_num_palette_predictor_initializers = data.pps_num_palette_predictor_initializers), void 0 !== data.luma_bit_depth_entry_minus8 && (this.luma_bit_depth_entry_minus8 = data.luma_bit_depth_entry_minus8), void 0 !== data.chroma_bit_depth_entry_minus8 && (this.chroma_bit_depth_entry_minus8 = data.chroma_bit_depth_entry_minus8), void 0 !== data.num_tile_columns_minus1 && (this.num_tile_columns_minus1 = data.num_tile_columns_minus1), void 0 !== data.num_tile_rows_minus1 && (this.num_tile_rows_minus1 = data.num_tile_rows_minus1), void 0 !== data.reserved1 && (this.reserved1 = data.reserved1), void 0 !== data.reserved2 && (this.reserved2 = data.reserved2), void 0 !== data.column_width_minus1 && (this.column_width_minus1 = data.column_width_minus1), void 0 !== data.row_height_minus1 && (this.row_height_minus1 = data.row_height_minus1), void 0 !== data.reserved3 && (this.reserved3 = data.reserved3), void 0 !== data.pScalingLists && (this.pScalingLists = data.pScalingLists), void 0 !== data.pPredictorPaletteEntries && (this.pPredictorPaletteEntries = data.pPredictorPaletteEntries); - } - get flags() { - return new StdVideoH265PpsFlags(this.#data.subarray(0, 0 + StdVideoH265PpsFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoH265PpsFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get pps_pic_parameter_set_id() { - return this.#view.getUint8(124); - } - set pps_pic_parameter_set_id(value) { - this.#view.setUint8(124, Number(value)); - } - get pps_seq_parameter_set_id() { - return this.#view.getUint8(125); - } - set pps_seq_parameter_set_id(value) { - this.#view.setUint8(125, Number(value)); - } - get sps_video_parameter_set_id() { - return this.#view.getUint8(126); - } - set sps_video_parameter_set_id(value) { - this.#view.setUint8(126, Number(value)); - } - get num_extra_slice_header_bits() { - return this.#view.getUint8(127); - } - set num_extra_slice_header_bits(value) { - this.#view.setUint8(127, Number(value)); - } - get num_ref_idx_l0_default_active_minus1() { - return this.#view.getUint8(128); - } - set num_ref_idx_l0_default_active_minus1(value) { - this.#view.setUint8(128, Number(value)); - } - get num_ref_idx_l1_default_active_minus1() { - return this.#view.getUint8(129); - } - set num_ref_idx_l1_default_active_minus1(value) { - this.#view.setUint8(129, Number(value)); - } - get init_qp_minus26() { - return this.#view.getInt8(130); - } - set init_qp_minus26(value) { - this.#view.setInt8(130, Number(value)); - } - get diff_cu_qp_delta_depth() { - return this.#view.getUint8(131); - } - set diff_cu_qp_delta_depth(value) { - this.#view.setUint8(131, Number(value)); - } - get pps_cb_qp_offset() { - return this.#view.getInt8(132); - } - set pps_cb_qp_offset(value) { - this.#view.setInt8(132, Number(value)); - } - get pps_cr_qp_offset() { - return this.#view.getInt8(133); - } - set pps_cr_qp_offset(value) { - this.#view.setInt8(133, Number(value)); - } - get pps_beta_offset_div2() { - return this.#view.getInt8(134); - } - set pps_beta_offset_div2(value) { - this.#view.setInt8(134, Number(value)); - } - get pps_tc_offset_div2() { - return this.#view.getInt8(135); - } - set pps_tc_offset_div2(value) { - this.#view.setInt8(135, Number(value)); - } - get log2_parallel_merge_level_minus2() { - return this.#view.getUint8(136); - } - set log2_parallel_merge_level_minus2(value) { - this.#view.setUint8(136, Number(value)); - } - get log2_max_transform_skip_block_size_minus2() { - return this.#view.getUint8(137); - } - set log2_max_transform_skip_block_size_minus2(value) { - this.#view.setUint8(137, Number(value)); - } - get diff_cu_chroma_qp_offset_depth() { - return this.#view.getUint8(138); - } - set diff_cu_chroma_qp_offset_depth(value) { - this.#view.setUint8(138, Number(value)); - } - get chroma_qp_offset_list_len_minus1() { - return this.#view.getUint8(139); - } - set chroma_qp_offset_list_len_minus1(value) { - this.#view.setUint8(139, Number(value)); - } - get cb_qp_offset_list() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 140, 6); - } - set cb_qp_offset_list(value) { - this.#data.set(new Uint8Array(value.buffer), 140); - } - get cr_qp_offset_list() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 146, 6); - } - set cr_qp_offset_list(value) { - this.#data.set(new Uint8Array(value.buffer), 146); - } - get log2_sao_offset_scale_luma() { - return this.#view.getUint8(152); - } - set log2_sao_offset_scale_luma(value) { - this.#view.setUint8(152, Number(value)); - } - get log2_sao_offset_scale_chroma() { - return this.#view.getUint8(153); - } - set log2_sao_offset_scale_chroma(value) { - this.#view.setUint8(153, Number(value)); - } - get pps_act_y_qp_offset_plus5() { - return this.#view.getInt8(154); - } - set pps_act_y_qp_offset_plus5(value) { - this.#view.setInt8(154, Number(value)); - } - get pps_act_cb_qp_offset_plus5() { - return this.#view.getInt8(155); - } - set pps_act_cb_qp_offset_plus5(value) { - this.#view.setInt8(155, Number(value)); - } - get pps_act_cr_qp_offset_plus3() { - return this.#view.getInt8(156); - } - set pps_act_cr_qp_offset_plus3(value) { - this.#view.setInt8(156, Number(value)); - } - get pps_num_palette_predictor_initializers() { - return this.#view.getUint8(157); - } - set pps_num_palette_predictor_initializers(value) { - this.#view.setUint8(157, Number(value)); - } - get luma_bit_depth_entry_minus8() { - return this.#view.getUint8(158); - } - set luma_bit_depth_entry_minus8(value) { - this.#view.setUint8(158, Number(value)); - } - get chroma_bit_depth_entry_minus8() { - return this.#view.getUint8(159); - } - set chroma_bit_depth_entry_minus8(value) { - this.#view.setUint8(159, Number(value)); - } - get num_tile_columns_minus1() { - return this.#view.getUint8(160); - } - set num_tile_columns_minus1(value) { - this.#view.setUint8(160, Number(value)); - } - get num_tile_rows_minus1() { - return this.#view.getUint8(161); - } - set num_tile_rows_minus1(value) { - this.#view.setUint8(161, Number(value)); - } - get reserved1() { - return this.#view.getUint8(162); - } - set reserved1(value) { - this.#view.setUint8(162, Number(value)); - } - get reserved2() { - return this.#view.getUint8(163); - } - set reserved2(value) { - this.#view.setUint8(163, Number(value)); - } - get column_width_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 164, 19); - } - set column_width_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 164); - } - get row_height_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 202, 21); - } - set row_height_minus1(value) { - this.#data.set(new Uint8Array(value.buffer), 202); - } - get reserved3() { - return this.#view.getUint32(244, LE); - } - set reserved3(value) { - this.#view.setUint32(244, Number(value), LE); - } - get pScalingLists() { - return this.#view.getBigUint64(248, LE); - } - set pScalingLists(value) { - this.#view.setBigUint64(248, BigInt(anyPointer(value)), LE); - } - get pPredictorPaletteEntries() { - return this.#view.getBigUint64(256, LE); - } - set pPredictorPaletteEntries(value) { - this.#view.setBigUint64(256, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoDecodeH265PictureInfoFlags { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoDecodeH265PictureInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265PictureInfoFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH265PictureInfoFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoDecodeH265PictureInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.IrapPicFlag && (this.IrapPicFlag = data.IrapPicFlag), void 0 !== data.IdrPicFlag && (this.IdrPicFlag = data.IdrPicFlag), void 0 !== data.IsReference && (this.IsReference = data.IsReference), void 0 !== data.short_term_ref_pic_set_sps_flag && (this.short_term_ref_pic_set_sps_flag = data.short_term_ref_pic_set_sps_flag); - } - get IrapPicFlag() { - return this.#view.getUint32(0, LE); - } - set IrapPicFlag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get IdrPicFlag() { - return this.#view.getUint32(4, LE); - } - set IdrPicFlag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get IsReference() { - return this.#view.getUint32(8, LE); - } - set IsReference(value) { - this.#view.setUint32(8, Number(value), LE); - } - get short_term_ref_pic_set_sps_flag() { - return this.#view.getUint32(12, LE); - } - set short_term_ref_pic_set_sps_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class StdVideoDecodeH265PictureInfo { - static size = 52; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoDecodeH265PictureInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265PictureInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH265PictureInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoDecodeH265PictureInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.sps_video_parameter_set_id && (this.sps_video_parameter_set_id = data.sps_video_parameter_set_id), void 0 !== data.pps_seq_parameter_set_id && (this.pps_seq_parameter_set_id = data.pps_seq_parameter_set_id), void 0 !== data.pps_pic_parameter_set_id && (this.pps_pic_parameter_set_id = data.pps_pic_parameter_set_id), void 0 !== data.NumDeltaPocsOfRefRpsIdx && (this.NumDeltaPocsOfRefRpsIdx = data.NumDeltaPocsOfRefRpsIdx), void 0 !== data.PicOrderCntVal && (this.PicOrderCntVal = data.PicOrderCntVal), void 0 !== data.NumBitsForSTRefPicSetInSlice && (this.NumBitsForSTRefPicSetInSlice = data.NumBitsForSTRefPicSetInSlice), void 0 !== data.reserved && (this.reserved = data.reserved), void 0 !== data.RefPicSetStCurrBefore && (this.RefPicSetStCurrBefore = data.RefPicSetStCurrBefore), void 0 !== data.RefPicSetStCurrAfter && (this.RefPicSetStCurrAfter = data.RefPicSetStCurrAfter), void 0 !== data.RefPicSetLtCurr && (this.RefPicSetLtCurr = data.RefPicSetLtCurr); - } - get flags() { - return new StdVideoDecodeH265PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH265PictureInfoFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoDecodeH265PictureInfoFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get sps_video_parameter_set_id() { - return this.#view.getUint8(16); - } - set sps_video_parameter_set_id(value) { - this.#view.setUint8(16, Number(value)); - } - get pps_seq_parameter_set_id() { - return this.#view.getUint8(17); - } - set pps_seq_parameter_set_id(value) { - this.#view.setUint8(17, Number(value)); - } - get pps_pic_parameter_set_id() { - return this.#view.getUint8(18); - } - set pps_pic_parameter_set_id(value) { - this.#view.setUint8(18, Number(value)); - } - get NumDeltaPocsOfRefRpsIdx() { - return this.#view.getUint8(19); - } - set NumDeltaPocsOfRefRpsIdx(value) { - this.#view.setUint8(19, Number(value)); - } - get PicOrderCntVal() { - return this.#view.getInt32(20, LE); - } - set PicOrderCntVal(value) { - this.#view.setInt32(20, Number(value), LE); - } - get NumBitsForSTRefPicSetInSlice() { - return this.#view.getUint16(24, LE); - } - set NumBitsForSTRefPicSetInSlice(value) { - this.#view.setUint16(24, Number(value), LE); - } - get reserved() { - return this.#view.getUint16(26, LE); - } - set reserved(value) { - this.#view.setUint16(26, Number(value), LE); - } - get RefPicSetStCurrBefore() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 28, 8); - } - set RefPicSetStCurrBefore(value) { - this.#data.set(new Uint8Array(value.buffer), 28); - } - get RefPicSetStCurrAfter() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 36, 8); - } - set RefPicSetStCurrAfter(value) { - this.#data.set(new Uint8Array(value.buffer), 36); - } - get RefPicSetLtCurr() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 44, 8); - } - set RefPicSetLtCurr(value) { - this.#data.set(new Uint8Array(value.buffer), 44); - } -} -export class StdVideoDecodeH265ReferenceInfoFlags { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265ReferenceInfoFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH265ReferenceInfoFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.used_for_long_term_reference && (this.used_for_long_term_reference = data.used_for_long_term_reference), void 0 !== data.unused_for_reference && (this.unused_for_reference = data.unused_for_reference); - } - get used_for_long_term_reference() { - return this.#view.getUint32(0, LE); - } - set used_for_long_term_reference(value) { - this.#view.setUint32(0, Number(value), LE); - } - get unused_for_reference() { - return this.#view.getUint32(4, LE); - } - set unused_for_reference(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class StdVideoDecodeH265ReferenceInfo { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265ReferenceInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH265ReferenceInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.PicOrderCntVal && (this.PicOrderCntVal = data.PicOrderCntVal); - } - get flags() { - return new StdVideoDecodeH265ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH265ReferenceInfoFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoDecodeH265ReferenceInfoFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get PicOrderCntVal() { - return this.#view.getInt32(8, LE); - } - set PicOrderCntVal(value) { - this.#view.setInt32(8, Number(value), LE); - } -} -export class StdVideoEncodeH265WeightTableFlags { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265WeightTableFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265WeightTableFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265WeightTableFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265WeightTableFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.luma_weight_l0_flag && (this.luma_weight_l0_flag = data.luma_weight_l0_flag), void 0 !== data.chroma_weight_l0_flag && (this.chroma_weight_l0_flag = data.chroma_weight_l0_flag), void 0 !== data.luma_weight_l1_flag && (this.luma_weight_l1_flag = data.luma_weight_l1_flag), void 0 !== data.chroma_weight_l1_flag && (this.chroma_weight_l1_flag = data.chroma_weight_l1_flag); - } - get luma_weight_l0_flag() { - return this.#view.getUint16(0, LE); - } - set luma_weight_l0_flag(value) { - this.#view.setUint16(0, Number(value), LE); - } - get chroma_weight_l0_flag() { - return this.#view.getUint16(2, LE); - } - set chroma_weight_l0_flag(value) { - this.#view.setUint16(2, Number(value), LE); - } - get luma_weight_l1_flag() { - return this.#view.getUint16(4, LE); - } - set luma_weight_l1_flag(value) { - this.#view.setUint16(4, Number(value), LE); - } - get chroma_weight_l1_flag() { - return this.#view.getUint16(6, LE); - } - set chroma_weight_l1_flag(value) { - this.#view.setUint16(6, Number(value), LE); - } -} -export class StdVideoEncodeH265WeightTable { - static size = 190; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265WeightTable.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265WeightTable.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265WeightTable.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265WeightTable.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.luma_log2_weight_denom && (this.luma_log2_weight_denom = data.luma_log2_weight_denom), void 0 !== data.delta_chroma_log2_weight_denom && (this.delta_chroma_log2_weight_denom = data.delta_chroma_log2_weight_denom), void 0 !== data.delta_luma_weight_l0 && (this.delta_luma_weight_l0 = data.delta_luma_weight_l0), void 0 !== data.luma_offset_l0 && (this.luma_offset_l0 = data.luma_offset_l0), void 0 !== data.delta_chroma_weight_l0 && (this.delta_chroma_weight_l0 = data.delta_chroma_weight_l0), void 0 !== data.delta_chroma_offset_l0 && (this.delta_chroma_offset_l0 = data.delta_chroma_offset_l0), void 0 !== data.delta_luma_weight_l1 && (this.delta_luma_weight_l1 = data.delta_luma_weight_l1), void 0 !== data.luma_offset_l1 && (this.luma_offset_l1 = data.luma_offset_l1), void 0 !== data.delta_chroma_weight_l1 && (this.delta_chroma_weight_l1 = data.delta_chroma_weight_l1), void 0 !== data.delta_chroma_offset_l1 && (this.delta_chroma_offset_l1 = data.delta_chroma_offset_l1); - } - get flags() { - return new StdVideoEncodeH265WeightTableFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265WeightTableFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH265WeightTableFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get luma_log2_weight_denom() { - return this.#view.getUint8(8); - } - set luma_log2_weight_denom(value) { - this.#view.setUint8(8, Number(value)); - } - get delta_chroma_log2_weight_denom() { - return this.#view.getInt8(9); - } - set delta_chroma_log2_weight_denom(value) { - this.#view.setInt8(9, Number(value)); - } - get delta_luma_weight_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 10, 15); - } - set delta_luma_weight_l0(value) { - this.#data.set(new Uint8Array(value.buffer), 10); - } - get luma_offset_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 25, 15); - } - set luma_offset_l0(value) { - this.#data.set(new Uint8Array(value.buffer), 25); - } - get delta_chroma_weight_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 40, 30); - } - set delta_chroma_weight_l0(value) { - this.#data.set(new Uint8Array(value.buffer), 40); - } - get delta_chroma_offset_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 70, 30); - } - set delta_chroma_offset_l0(value) { - this.#data.set(new Uint8Array(value.buffer), 70); - } - get delta_luma_weight_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 100, 15); - } - set delta_luma_weight_l1(value) { - this.#data.set(new Uint8Array(value.buffer), 100); - } - get luma_offset_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 115, 15); - } - set luma_offset_l1(value) { - this.#data.set(new Uint8Array(value.buffer), 115); - } - get delta_chroma_weight_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 130, 30); - } - set delta_chroma_weight_l1(value) { - this.#data.set(new Uint8Array(value.buffer), 130); - } - get delta_chroma_offset_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 160, 30); - } - set delta_chroma_offset_l1(value) { - this.#data.set(new Uint8Array(value.buffer), 160); - } -} -export class StdVideoEncodeH265SliceSegmentLongTermRefPics { - static size = 148; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentLongTermRefPics.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265SliceSegmentLongTermRefPics.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265SliceSegmentLongTermRefPics.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentLongTermRefPics.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.num_long_term_sps && (this.num_long_term_sps = data.num_long_term_sps), void 0 !== data.num_long_term_pics && (this.num_long_term_pics = data.num_long_term_pics), void 0 !== data.lt_idx_sps && (this.lt_idx_sps = data.lt_idx_sps), void 0 !== data.poc_lsb_lt && (this.poc_lsb_lt = data.poc_lsb_lt), void 0 !== data.used_by_curr_pic_lt_flag && (this.used_by_curr_pic_lt_flag = data.used_by_curr_pic_lt_flag), void 0 !== data.delta_poc_msb_present_flag && (this.delta_poc_msb_present_flag = data.delta_poc_msb_present_flag), void 0 !== data.delta_poc_msb_cycle_lt && (this.delta_poc_msb_cycle_lt = data.delta_poc_msb_cycle_lt); - } - get num_long_term_sps() { - return this.#view.getUint8(0); - } - set num_long_term_sps(value) { - this.#view.setUint8(0, Number(value)); - } - get num_long_term_pics() { - return this.#view.getUint8(1); - } - set num_long_term_pics(value) { - this.#view.setUint8(1, Number(value)); - } - get lt_idx_sps() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 2, 32); - } - set lt_idx_sps(value) { - this.#data.set(new Uint8Array(value.buffer), 2); - } - get poc_lsb_lt() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 34, 16); - } - set poc_lsb_lt(value) { - this.#data.set(new Uint8Array(value.buffer), 34); - } - get used_by_curr_pic_lt_flag() { - return this.#view.getUint16(50, LE); - } - set used_by_curr_pic_lt_flag(value) { - this.#view.setUint16(50, Number(value), LE); - } - get delta_poc_msb_present_flag() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 52, 48); - } - set delta_poc_msb_present_flag(value) { - this.#data.set(new Uint8Array(value.buffer), 52); - } - get delta_poc_msb_cycle_lt() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 100, 48); - } - set delta_poc_msb_cycle_lt(value) { - this.#data.set(new Uint8Array(value.buffer), 100); - } -} -export class StdVideoEncodeH265SliceSegmentHeaderFlags { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeaderFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265SliceSegmentHeaderFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265SliceSegmentHeaderFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeaderFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.first_slice_segment_in_pic_flag && (this.first_slice_segment_in_pic_flag = data.first_slice_segment_in_pic_flag), void 0 !== data.no_output_of_prior_pics_flag && (this.no_output_of_prior_pics_flag = data.no_output_of_prior_pics_flag), void 0 !== data.dependent_slice_segment_flag && (this.dependent_slice_segment_flag = data.dependent_slice_segment_flag), void 0 !== data.pic_output_flag && (this.pic_output_flag = data.pic_output_flag), void 0 !== data.short_term_ref_pic_set_sps_flag && (this.short_term_ref_pic_set_sps_flag = data.short_term_ref_pic_set_sps_flag), void 0 !== data.slice_temporal_mvp_enable_flag && (this.slice_temporal_mvp_enable_flag = data.slice_temporal_mvp_enable_flag), void 0 !== data.slice_sao_luma_flag && (this.slice_sao_luma_flag = data.slice_sao_luma_flag), void 0 !== data.slice_sao_chroma_flag && (this.slice_sao_chroma_flag = data.slice_sao_chroma_flag), void 0 !== data.num_ref_idx_active_override_flag && (this.num_ref_idx_active_override_flag = data.num_ref_idx_active_override_flag), void 0 !== data.mvd_l1_zero_flag && (this.mvd_l1_zero_flag = data.mvd_l1_zero_flag), void 0 !== data.cabac_init_flag && (this.cabac_init_flag = data.cabac_init_flag), void 0 !== data.cu_chroma_qp_offset_enabled_flag && (this.cu_chroma_qp_offset_enabled_flag = data.cu_chroma_qp_offset_enabled_flag), void 0 !== data.deblocking_filter_override_flag && (this.deblocking_filter_override_flag = data.deblocking_filter_override_flag), void 0 !== data.slice_deblocking_filter_disabled_flag && (this.slice_deblocking_filter_disabled_flag = data.slice_deblocking_filter_disabled_flag), void 0 !== data.collocated_from_l0_flag && (this.collocated_from_l0_flag = data.collocated_from_l0_flag), void 0 !== data.slice_loop_filter_across_slices_enabled_flag && (this.slice_loop_filter_across_slices_enabled_flag = data.slice_loop_filter_across_slices_enabled_flag); - } - get first_slice_segment_in_pic_flag() { - return this.#view.getUint32(0, LE); - } - set first_slice_segment_in_pic_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get no_output_of_prior_pics_flag() { - return this.#view.getUint32(4, LE); - } - set no_output_of_prior_pics_flag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get dependent_slice_segment_flag() { - return this.#view.getUint32(8, LE); - } - set dependent_slice_segment_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get pic_output_flag() { - return this.#view.getUint32(12, LE); - } - set pic_output_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get short_term_ref_pic_set_sps_flag() { - return this.#view.getUint32(16, LE); - } - set short_term_ref_pic_set_sps_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } - get slice_temporal_mvp_enable_flag() { - return this.#view.getUint32(20, LE); - } - set slice_temporal_mvp_enable_flag(value) { - this.#view.setUint32(20, Number(value), LE); - } - get slice_sao_luma_flag() { - return this.#view.getUint32(24, LE); - } - set slice_sao_luma_flag(value) { - this.#view.setUint32(24, Number(value), LE); - } - get slice_sao_chroma_flag() { - return this.#view.getUint32(28, LE); - } - set slice_sao_chroma_flag(value) { - this.#view.setUint32(28, Number(value), LE); - } - get num_ref_idx_active_override_flag() { - return this.#view.getUint32(32, LE); - } - set num_ref_idx_active_override_flag(value) { - this.#view.setUint32(32, Number(value), LE); - } - get mvd_l1_zero_flag() { - return this.#view.getUint32(36, LE); - } - set mvd_l1_zero_flag(value) { - this.#view.setUint32(36, Number(value), LE); - } - get cabac_init_flag() { - return this.#view.getUint32(40, LE); - } - set cabac_init_flag(value) { - this.#view.setUint32(40, Number(value), LE); - } - get cu_chroma_qp_offset_enabled_flag() { - return this.#view.getUint32(44, LE); - } - set cu_chroma_qp_offset_enabled_flag(value) { - this.#view.setUint32(44, Number(value), LE); - } - get deblocking_filter_override_flag() { - return this.#view.getUint32(48, LE); - } - set deblocking_filter_override_flag(value) { - this.#view.setUint32(48, Number(value), LE); - } - get slice_deblocking_filter_disabled_flag() { - return this.#view.getUint32(52, LE); - } - set slice_deblocking_filter_disabled_flag(value) { - this.#view.setUint32(52, Number(value), LE); - } - get collocated_from_l0_flag() { - return this.#view.getUint32(56, LE); - } - set collocated_from_l0_flag(value) { - this.#view.setUint32(56, Number(value), LE); - } - get slice_loop_filter_across_slices_enabled_flag() { - return this.#view.getUint32(60, LE); - } - set slice_loop_filter_across_slices_enabled_flag(value) { - this.#view.setUint32(60, Number(value), LE); - } -} -export class StdVideoEncodeH265SliceSegmentHeader { - static size = 112; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeader.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265SliceSegmentHeader.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265SliceSegmentHeader.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeader.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.slice_type && (this.slice_type = data.slice_type), void 0 !== data.slice_segment_address && (this.slice_segment_address = data.slice_segment_address), void 0 !== data.short_term_ref_pic_set_idx && (this.short_term_ref_pic_set_idx = data.short_term_ref_pic_set_idx), void 0 !== data.collocated_ref_idx && (this.collocated_ref_idx = data.collocated_ref_idx), void 0 !== data.num_ref_idx_l0_active_minus1 && (this.num_ref_idx_l0_active_minus1 = data.num_ref_idx_l0_active_minus1), void 0 !== data.num_ref_idx_l1_active_minus1 && (this.num_ref_idx_l1_active_minus1 = data.num_ref_idx_l1_active_minus1), void 0 !== data.MaxNumMergeCand && (this.MaxNumMergeCand = data.MaxNumMergeCand), void 0 !== data.slice_cb_qp_offset && (this.slice_cb_qp_offset = data.slice_cb_qp_offset), void 0 !== data.slice_cr_qp_offset && (this.slice_cr_qp_offset = data.slice_cr_qp_offset), void 0 !== data.slice_beta_offset_div2 && (this.slice_beta_offset_div2 = data.slice_beta_offset_div2), void 0 !== data.slice_tc_offset_div2 && (this.slice_tc_offset_div2 = data.slice_tc_offset_div2), void 0 !== data.slice_act_y_qp_offset && (this.slice_act_y_qp_offset = data.slice_act_y_qp_offset), void 0 !== data.slice_act_cb_qp_offset && (this.slice_act_cb_qp_offset = data.slice_act_cb_qp_offset), void 0 !== data.slice_act_cr_qp_offset && (this.slice_act_cr_qp_offset = data.slice_act_cr_qp_offset), void 0 !== data.pShortTermRefPicSet && (this.pShortTermRefPicSet = data.pShortTermRefPicSet), void 0 !== data.pLongTermRefPics && (this.pLongTermRefPics = data.pLongTermRefPics), void 0 !== data.pWeightTable && (this.pWeightTable = data.pWeightTable); - } - get flags() { - return new StdVideoEncodeH265SliceSegmentHeaderFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265SliceSegmentHeaderFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH265SliceSegmentHeaderFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get slice_type() { - return this.#view.getUint32(64, LE); - } - set slice_type(value) { - this.#view.setUint32(64, Number(value), LE); - } - get slice_segment_address() { - return this.#view.getUint32(68, LE); - } - set slice_segment_address(value) { - this.#view.setUint32(68, Number(value), LE); - } - get short_term_ref_pic_set_idx() { - return this.#view.getUint8(72); - } - set short_term_ref_pic_set_idx(value) { - this.#view.setUint8(72, Number(value)); - } - get collocated_ref_idx() { - return this.#view.getUint8(73); - } - set collocated_ref_idx(value) { - this.#view.setUint8(73, Number(value)); - } - get num_ref_idx_l0_active_minus1() { - return this.#view.getUint8(74); - } - set num_ref_idx_l0_active_minus1(value) { - this.#view.setUint8(74, Number(value)); - } - get num_ref_idx_l1_active_minus1() { - return this.#view.getUint8(75); - } - set num_ref_idx_l1_active_minus1(value) { - this.#view.setUint8(75, Number(value)); - } - get MaxNumMergeCand() { - return this.#view.getUint8(76); - } - set MaxNumMergeCand(value) { - this.#view.setUint8(76, Number(value)); - } - get slice_cb_qp_offset() { - return this.#view.getInt8(77); - } - set slice_cb_qp_offset(value) { - this.#view.setInt8(77, Number(value)); - } - get slice_cr_qp_offset() { - return this.#view.getInt8(78); - } - set slice_cr_qp_offset(value) { - this.#view.setInt8(78, Number(value)); - } - get slice_beta_offset_div2() { - return this.#view.getInt8(79); - } - set slice_beta_offset_div2(value) { - this.#view.setInt8(79, Number(value)); - } - get slice_tc_offset_div2() { - return this.#view.getInt8(80); - } - set slice_tc_offset_div2(value) { - this.#view.setInt8(80, Number(value)); - } - get slice_act_y_qp_offset() { - return this.#view.getInt8(81); - } - set slice_act_y_qp_offset(value) { - this.#view.setInt8(81, Number(value)); - } - get slice_act_cb_qp_offset() { - return this.#view.getInt8(82); - } - set slice_act_cb_qp_offset(value) { - this.#view.setInt8(82, Number(value)); - } - get slice_act_cr_qp_offset() { - return this.#view.getInt8(83); - } - set slice_act_cr_qp_offset(value) { - this.#view.setInt8(83, Number(value)); - } - get pShortTermRefPicSet() { - return this.#view.getBigUint64(88, LE); - } - set pShortTermRefPicSet(value) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } - get pLongTermRefPics() { - return this.#view.getBigUint64(96, LE); - } - set pLongTermRefPics(value) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } - get pWeightTable() { - return this.#view.getBigUint64(104, LE); - } - set pWeightTable(value) { - this.#view.setBigUint64(104, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoEncodeH265ReferenceModificationFlags { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModificationFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceModificationFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265ReferenceModificationFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModificationFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.ref_pic_list_modification_flag_l0 && (this.ref_pic_list_modification_flag_l0 = data.ref_pic_list_modification_flag_l0), void 0 !== data.ref_pic_list_modification_flag_l1 && (this.ref_pic_list_modification_flag_l1 = data.ref_pic_list_modification_flag_l1); - } - get ref_pic_list_modification_flag_l0() { - return this.#view.getUint32(0, LE); - } - set ref_pic_list_modification_flag_l0(value) { - this.#view.setUint32(0, Number(value), LE); - } - get ref_pic_list_modification_flag_l1() { - return this.#view.getUint32(4, LE); - } - set ref_pic_list_modification_flag_l1(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class StdVideoEncodeH265ReferenceModifications { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModifications.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceModifications.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265ReferenceModifications.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModifications.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.referenceList0ModificationsCount && (this.referenceList0ModificationsCount = data.referenceList0ModificationsCount), void 0 !== data.pReferenceList0Modifications && (this.pReferenceList0Modifications = data.pReferenceList0Modifications), void 0 !== data.referenceList1ModificationsCount && (this.referenceList1ModificationsCount = data.referenceList1ModificationsCount), void 0 !== data.pReferenceList1Modifications && (this.pReferenceList1Modifications = data.pReferenceList1Modifications); - } - get flags() { - return new StdVideoEncodeH265ReferenceModificationFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265ReferenceModificationFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH265ReferenceModificationFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get referenceList0ModificationsCount() { - return this.#view.getUint8(8); - } - set referenceList0ModificationsCount(value) { - this.#view.setUint8(8, Number(value)); - } - get pReferenceList0Modifications() { - return this.#view.getBigUint64(16, LE); - } - set pReferenceList0Modifications(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get referenceList1ModificationsCount() { - return this.#view.getUint8(24); - } - set referenceList1ModificationsCount(value) { - this.#view.setUint8(24, Number(value)); - } - get pReferenceList1Modifications() { - return this.#view.getBigUint64(32, LE); - } - set pReferenceList1Modifications(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class StdVideoEncodeH265PictureInfoFlags { - static size = 20; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265PictureInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265PictureInfoFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265PictureInfoFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265PictureInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.is_reference_flag && (this.is_reference_flag = data.is_reference_flag), void 0 !== data.IrapPicFlag && (this.IrapPicFlag = data.IrapPicFlag), void 0 !== data.long_term_flag && (this.long_term_flag = data.long_term_flag), void 0 !== data.discardable_flag && (this.discardable_flag = data.discardable_flag), void 0 !== data.cross_layer_bla_flag && (this.cross_layer_bla_flag = data.cross_layer_bla_flag); - } - get is_reference_flag() { - return this.#view.getUint32(0, LE); - } - set is_reference_flag(value) { - this.#view.setUint32(0, Number(value), LE); - } - get IrapPicFlag() { - return this.#view.getUint32(4, LE); - } - set IrapPicFlag(value) { - this.#view.setUint32(4, Number(value), LE); - } - get long_term_flag() { - return this.#view.getUint32(8, LE); - } - set long_term_flag(value) { - this.#view.setUint32(8, Number(value), LE); - } - get discardable_flag() { - return this.#view.getUint32(12, LE); - } - set discardable_flag(value) { - this.#view.setUint32(12, Number(value), LE); - } - get cross_layer_bla_flag() { - return this.#view.getUint32(16, LE); - } - set cross_layer_bla_flag(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class StdVideoEncodeH265PictureInfo { - static size = 36; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265PictureInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265PictureInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265PictureInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265PictureInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.PictureType && (this.PictureType = data.PictureType), void 0 !== data.sps_video_parameter_set_id && (this.sps_video_parameter_set_id = data.sps_video_parameter_set_id), void 0 !== data.pps_seq_parameter_set_id && (this.pps_seq_parameter_set_id = data.pps_seq_parameter_set_id), void 0 !== data.pps_pic_parameter_set_id && (this.pps_pic_parameter_set_id = data.pps_pic_parameter_set_id), void 0 !== data.PicOrderCntVal && (this.PicOrderCntVal = data.PicOrderCntVal), void 0 !== data.TemporalId && (this.TemporalId = data.TemporalId); - } - get flags() { - return new StdVideoEncodeH265PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265PictureInfoFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH265PictureInfoFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get PictureType() { - return this.#view.getUint32(20, LE); - } - set PictureType(value) { - this.#view.setUint32(20, Number(value), LE); - } - get sps_video_parameter_set_id() { - return this.#view.getUint8(24); - } - set sps_video_parameter_set_id(value) { - this.#view.setUint8(24, Number(value)); - } - get pps_seq_parameter_set_id() { - return this.#view.getUint8(25); - } - set pps_seq_parameter_set_id(value) { - this.#view.setUint8(25, Number(value)); - } - get pps_pic_parameter_set_id() { - return this.#view.getUint8(26); - } - set pps_pic_parameter_set_id(value) { - this.#view.setUint8(26, Number(value)); - } - get PicOrderCntVal() { - return this.#view.getInt32(28, LE); - } - set PicOrderCntVal(value) { - this.#view.setInt32(28, Number(value), LE); - } - get TemporalId() { - return this.#view.getUint8(32); - } - set TemporalId(value) { - this.#view.setUint8(32, Number(value)); - } -} -export class StdVideoEncodeH265ReferenceInfoFlags { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceInfoFlags.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265ReferenceInfoFlags.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfoFlags.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.used_for_long_term_reference && (this.used_for_long_term_reference = data.used_for_long_term_reference), void 0 !== data.unused_for_reference && (this.unused_for_reference = data.unused_for_reference); - } - get used_for_long_term_reference() { - return this.#view.getUint32(0, LE); - } - set used_for_long_term_reference(value) { - this.#view.setUint32(0, Number(value), LE); - } - get unused_for_reference() { - return this.#view.getUint32(4, LE); - } - set unused_for_reference(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class StdVideoEncodeH265ReferenceInfo { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265ReferenceInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.PicOrderCntVal && (this.PicOrderCntVal = data.PicOrderCntVal), void 0 !== data.TemporalId && (this.TemporalId = data.TemporalId); - } - get flags() { - return new StdVideoEncodeH265ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265ReferenceInfoFlags.size)); - } - set flags(value) { - if (value[BUFFER].byteLength < StdVideoEncodeH265ReferenceInfoFlags.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get PicOrderCntVal() { - return this.#view.getInt32(8, LE); - } - set PicOrderCntVal(value) { - this.#view.setInt32(8, Number(value), LE); - } - get TemporalId() { - return this.#view.getUint8(12); - } - set TemporalId(value) { - this.#view.setUint8(12, Number(value)); - } -} -export class BaseOutStructure { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BaseOutStructure.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BaseOutStructure.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BaseOutStructure.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BaseOutStructure.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.sType && (this.sType = data.sType), void 0 !== data.pNext && (this.pNext = data.pNext); - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} -export class BaseInStructure { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BaseInStructure.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BaseInStructure.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BaseInStructure.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BaseInStructure.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.sType && (this.sType = data.sType), void 0 !== data.pNext && (this.pNext = data.pNext); - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} -export class Offset2D { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(Offset2D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Offset2D.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(Offset2D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.x && (this.x = data.x), void 0 !== data.y && (this.y = data.y); - } - get x() { - return this.#view.getInt32(0, LE); - } - set x(value) { - this.#view.setInt32(0, Number(value), LE); - } - get y() { - return this.#view.getInt32(4, LE); - } - set y(value) { - this.#view.setInt32(4, Number(value), LE); - } -} -export class Offset3D { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(Offset3D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Offset3D.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(Offset3D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.x && (this.x = data.x), void 0 !== data.y && (this.y = data.y), void 0 !== data.z && (this.z = data.z); - } - get x() { - return this.#view.getInt32(0, LE); - } - set x(value) { - this.#view.setInt32(0, Number(value), LE); - } - get y() { - return this.#view.getInt32(4, LE); - } - set y(value) { - this.#view.setInt32(4, Number(value), LE); - } - get z() { - return this.#view.getInt32(8, LE); - } - set z(value) { - this.#view.setInt32(8, Number(value), LE); - } -} -export class Extent2D { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(Extent2D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Extent2D.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(Extent2D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.width && (this.width = data.width), void 0 !== data.height && (this.height = data.height); - } - get width() { - return this.#view.getUint32(0, LE); - } - set width(value) { - this.#view.setUint32(0, Number(value), LE); - } - get height() { - return this.#view.getUint32(4, LE); - } - set height(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class Extent3D { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(Extent3D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Extent3D.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(Extent3D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.width && (this.width = data.width), void 0 !== data.height && (this.height = data.height), void 0 !== data.depth && (this.depth = data.depth); - } - get width() { - return this.#view.getUint32(0, LE); - } - set width(value) { - this.#view.setUint32(0, Number(value), LE); - } - get height() { - return this.#view.getUint32(4, LE); - } - set height(value) { - this.#view.setUint32(4, Number(value), LE); - } - get depth() { - return this.#view.getUint32(8, LE); - } - set depth(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class Viewport { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(Viewport.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Viewport.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < Viewport.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(Viewport.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.x && (this.x = data.x), void 0 !== data.y && (this.y = data.y), void 0 !== data.width && (this.width = data.width), void 0 !== data.height && (this.height = data.height), void 0 !== data.minDepth && (this.minDepth = data.minDepth), void 0 !== data.maxDepth && (this.maxDepth = data.maxDepth); - } - get x() { - return this.#view.getFloat32(0, LE); - } - set x(value) { - this.#view.setFloat32(0, Number(value), LE); - } - get y() { - return this.#view.getFloat32(4, LE); - } - set y(value) { - this.#view.setFloat32(4, Number(value), LE); - } - get width() { - return this.#view.getFloat32(8, LE); - } - set width(value) { - this.#view.setFloat32(8, Number(value), LE); - } - get height() { - return this.#view.getFloat32(12, LE); - } - set height(value) { - this.#view.setFloat32(12, Number(value), LE); - } - get minDepth() { - return this.#view.getFloat32(16, LE); - } - set minDepth(value) { - this.#view.setFloat32(16, Number(value), LE); - } - get maxDepth() { - return this.#view.getFloat32(20, LE); - } - set maxDepth(value) { - this.#view.setFloat32(20, Number(value), LE); - } -} -export class Rect2D { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(Rect2D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Rect2D.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < Rect2D.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(Rect2D.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.extent && (this.extent = data.extent); - } - get offset() { - return new Offset2D(this.#data.subarray(0, 0 + Offset2D.size)); - } - set offset(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get extent() { - return new Extent2D(this.#data.subarray(8, 8 + Extent2D.size)); - } - set extent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 8); - } -} -export class ClearRect { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ClearRect.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ClearRect.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ClearRect.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ClearRect.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.rect && (this.rect = data.rect), void 0 !== data.baseArrayLayer && (this.baseArrayLayer = data.baseArrayLayer), void 0 !== data.layerCount && (this.layerCount = data.layerCount); - } - get rect() { - return new Rect2D(this.#data.subarray(0, 0 + Rect2D.size)); - } - set rect(value) { - if (value[BUFFER].byteLength < Rect2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get baseArrayLayer() { - return this.#view.getUint32(16, LE); - } - set baseArrayLayer(value) { - this.#view.setUint32(16, Number(value), LE); - } - get layerCount() { - return this.#view.getUint32(20, LE); - } - set layerCount(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class ComponentMapping { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ComponentMapping.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ComponentMapping.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ComponentMapping.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ComponentMapping.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.r && (this.r = data.r), void 0 !== data.g && (this.g = data.g), void 0 !== data.b && (this.b = data.b), void 0 !== data.a && (this.a = data.a); - } - get r() { - return this.#view.getUint32(0, LE); - } - set r(value) { - this.#view.setUint32(0, Number(value), LE); - } - get g() { - return this.#view.getUint32(4, LE); - } - set g(value) { - this.#view.setUint32(4, Number(value), LE); - } - get b() { - return this.#view.getUint32(8, LE); - } - set b(value) { - this.#view.setUint32(8, Number(value), LE); - } - get a() { - return this.#view.getUint32(12, LE); - } - set a(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class PhysicalDeviceProperties { - static size = 784; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.apiVersion && (this.apiVersion = data.apiVersion), void 0 !== data.driverVersion && (this.driverVersion = data.driverVersion), void 0 !== data.vendorID && (this.vendorID = data.vendorID), void 0 !== data.deviceID && (this.deviceID = data.deviceID), void 0 !== data.deviceType && (this.deviceType = data.deviceType), void 0 !== data.deviceName && (this.deviceName = data.deviceName), void 0 !== data.pipelineCacheUUID && (this.pipelineCacheUUID = data.pipelineCacheUUID), void 0 !== data.limits && (this.limits = data.limits), void 0 !== data.sparseProperties && (this.sparseProperties = data.sparseProperties); - } - get apiVersion() { - return this.#view.getUint32(0, LE); - } - set apiVersion(value) { - this.#view.setUint32(0, Number(value), LE); - } - get driverVersion() { - return this.#view.getUint32(4, LE); - } - set driverVersion(value) { - this.#view.setUint32(4, Number(value), LE); - } - get vendorID() { - return this.#view.getUint32(8, LE); - } - set vendorID(value) { - this.#view.setUint32(8, Number(value), LE); - } - get deviceID() { - return this.#view.getUint32(12, LE); - } - set deviceID(value) { - this.#view.setUint32(12, Number(value), LE); - } - get deviceType() { - return this.#view.getUint32(16, LE); - } - set deviceType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get deviceName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - set deviceName(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - get pipelineCacheUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 16); - } - set pipelineCacheUUID(value) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - get limits() { - return new PhysicalDeviceLimits(this.#data.subarray(292, 292 + PhysicalDeviceLimits.size)); - } - set limits(value) { - if (value[BUFFER].byteLength < PhysicalDeviceLimits.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 292); - } - get sparseProperties() { - return new PhysicalDeviceSparseProperties(this.#data.subarray(764, 764 + PhysicalDeviceSparseProperties.size)); - } - set sparseProperties(value) { - if (value[BUFFER].byteLength < PhysicalDeviceSparseProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 764); - } -} -export class ExtensionProperties { - static size = 260; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExtensionProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExtensionProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExtensionProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExtensionProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.extensionName && (this.extensionName = data.extensionName), void 0 !== data.specVersion && (this.specVersion = data.specVersion); - } - get extensionName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 256); - } - set extensionName(value) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - get specVersion() { - return this.#view.getUint32(256, LE); - } - set specVersion(value) { - this.#view.setUint32(256, Number(value), LE); - } -} -export class LayerProperties { - static size = 520; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(LayerProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, LayerProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < LayerProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(LayerProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.layerName && (this.layerName = data.layerName), void 0 !== data.specVersion && (this.specVersion = data.specVersion), void 0 !== data.implementationVersion && (this.implementationVersion = data.implementationVersion), void 0 !== data.description && (this.description = data.description); - } - get layerName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 256); - } - set layerName(value) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - get specVersion() { - return this.#view.getUint32(256, LE); - } - set specVersion(value) { - this.#view.setUint32(256, Number(value), LE); - } - get implementationVersion() { - return this.#view.getUint32(260, LE); - } - set implementationVersion(value) { - this.#view.setUint32(260, Number(value), LE); - } - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 264, 256); - } - set description(value) { - this.#data.set(new Uint8Array(value.buffer), 264); - } -} -export class ApplicationInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ApplicationInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ApplicationInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ApplicationInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ApplicationInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pApplicationName && (this.pApplicationName = data.pApplicationName), void 0 !== data.applicationVersion && (this.applicationVersion = data.applicationVersion), void 0 !== data.pEngineName && (this.pEngineName = data.pEngineName), void 0 !== data.engineVersion && (this.engineVersion = data.engineVersion), void 0 !== data.apiVersion && (this.apiVersion = data.apiVersion); - this.sType = StructureType.APPLICATION_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pApplicationName() { - return this.#view.getBigUint64(16, LE); - } - set pApplicationName(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get applicationVersion() { - return this.#view.getUint32(24, LE); - } - set applicationVersion(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pEngineName() { - return this.#view.getBigUint64(32, LE); - } - set pEngineName(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get engineVersion() { - return this.#view.getUint32(40, LE); - } - set engineVersion(value) { - this.#view.setUint32(40, Number(value), LE); - } - get apiVersion() { - return this.#view.getUint32(44, LE); - } - set apiVersion(value) { - this.#view.setUint32(44, Number(value), LE); - } -} -export class AllocationCallbacks { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AllocationCallbacks.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AllocationCallbacks.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AllocationCallbacks.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AllocationCallbacks.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pUserData && (this.pUserData = data.pUserData), void 0 !== data.pfnAllocation && (this.pfnAllocation = data.pfnAllocation), void 0 !== data.pfnReallocation && (this.pfnReallocation = data.pfnReallocation), void 0 !== data.pfnFree && (this.pfnFree = data.pfnFree), void 0 !== data.pfnInternalAllocation && (this.pfnInternalAllocation = data.pfnInternalAllocation), void 0 !== data.pfnInternalFree && (this.pfnInternalFree = data.pfnInternalFree); - } - get pUserData() { - return this.#view.getBigUint64(0, LE); - } - set pUserData(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get pfnAllocation() { - throw new Error('Unknown type: "function"'); - } - set pfnAllocation(value) { - throw new Error('Unknown type: "function"'); - } - get pfnReallocation() { - throw new Error('Unknown type: "function"'); - } - set pfnReallocation(value) { - throw new Error('Unknown type: "function"'); - } - get pfnFree() { - throw new Error('Unknown type: "function"'); - } - set pfnFree(value) { - throw new Error('Unknown type: "function"'); - } - get pfnInternalAllocation() { - throw new Error('Unknown type: "function"'); - } - set pfnInternalAllocation(value) { - throw new Error('Unknown type: "function"'); - } - get pfnInternalFree() { - throw new Error('Unknown type: "function"'); - } - set pfnInternalFree(value) { - throw new Error('Unknown type: "function"'); - } -} -export class DeviceQueueCreateInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceQueueCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceQueueCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceQueueCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceQueueCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.queueFamilyIndex && (this.queueFamilyIndex = data.queueFamilyIndex), void 0 !== data.queueCount && (this.queueCount = data.queueCount), void 0 !== data.pQueuePriorities && (this.pQueuePriorities = data.pQueuePriorities); - this.sType = StructureType.DEVICE_QUEUE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get queueFamilyIndex() { - return this.#view.getUint32(20, LE); - } - set queueFamilyIndex(value) { - this.#view.setUint32(20, Number(value), LE); - } - get queueCount() { - return this.#view.getUint32(24, LE); - } - set queueCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pQueuePriorities() { - return this.#view.getBigUint64(32, LE); - } - set pQueuePriorities(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class DeviceCreateInfo { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.queueCreateInfoCount && (this.queueCreateInfoCount = data.queueCreateInfoCount), void 0 !== data.pQueueCreateInfos && (this.pQueueCreateInfos = data.pQueueCreateInfos), void 0 !== data.enabledLayerCount && (this.enabledLayerCount = data.enabledLayerCount), void 0 !== data.ppEnabledLayerNames && (this.ppEnabledLayerNames = data.ppEnabledLayerNames), void 0 !== data.enabledExtensionCount && (this.enabledExtensionCount = data.enabledExtensionCount), void 0 !== data.ppEnabledExtensionNames && (this.ppEnabledExtensionNames = data.ppEnabledExtensionNames), void 0 !== data.pEnabledFeatures && (this.pEnabledFeatures = data.pEnabledFeatures); - this.sType = StructureType.DEVICE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get queueCreateInfoCount() { - return this.#view.getUint32(20, LE); - } - set queueCreateInfoCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pQueueCreateInfos() { - return this.#view.getBigUint64(24, LE); - } - set pQueueCreateInfos(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get enabledLayerCount() { - return this.#view.getUint32(32, LE); - } - set enabledLayerCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get ppEnabledLayerNames() { - return this.#view.getBigUint64(40, LE); - } - set ppEnabledLayerNames(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get enabledExtensionCount() { - return this.#view.getUint32(48, LE); - } - set enabledExtensionCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get ppEnabledExtensionNames() { - return this.#view.getBigUint64(56, LE); - } - set ppEnabledExtensionNames(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get pEnabledFeatures() { - return this.#view.getBigUint64(64, LE); - } - set pEnabledFeatures(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} -export class InstanceCreateInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(InstanceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, InstanceCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < InstanceCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(InstanceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pApplicationInfo && (this.pApplicationInfo = data.pApplicationInfo), void 0 !== data.enabledLayerCount && (this.enabledLayerCount = data.enabledLayerCount), void 0 !== data.ppEnabledLayerNames && (this.ppEnabledLayerNames = data.ppEnabledLayerNames), void 0 !== data.enabledExtensionCount && (this.enabledExtensionCount = data.enabledExtensionCount), void 0 !== data.ppEnabledExtensionNames && (this.ppEnabledExtensionNames = data.ppEnabledExtensionNames); - this.sType = StructureType.INSTANCE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pApplicationInfo() { - return this.#view.getBigUint64(24, LE); - } - set pApplicationInfo(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get enabledLayerCount() { - return this.#view.getUint32(32, LE); - } - set enabledLayerCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get ppEnabledLayerNames() { - return this.#view.getBigUint64(40, LE); - } - set ppEnabledLayerNames(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get enabledExtensionCount() { - return this.#view.getUint32(48, LE); - } - set enabledExtensionCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get ppEnabledExtensionNames() { - return this.#view.getBigUint64(56, LE); - } - set ppEnabledExtensionNames(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class QueueFamilyProperties { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueueFamilyProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueueFamilyProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.queueFlags && (this.queueFlags = data.queueFlags), void 0 !== data.queueCount && (this.queueCount = data.queueCount), void 0 !== data.timestampValidBits && (this.timestampValidBits = data.timestampValidBits), void 0 !== data.minImageTransferGranularity && (this.minImageTransferGranularity = data.minImageTransferGranularity); - } - get queueFlags() { - return this.#view.getUint32(0, LE); - } - set queueFlags(value) { - this.#view.setUint32(0, Number(value), LE); - } - get queueCount() { - return this.#view.getUint32(4, LE); - } - set queueCount(value) { - this.#view.setUint32(4, Number(value), LE); - } - get timestampValidBits() { - return this.#view.getUint32(8, LE); - } - set timestampValidBits(value) { - this.#view.setUint32(8, Number(value), LE); - } - get minImageTransferGranularity() { - return new Extent3D(this.#data.subarray(12, 12 + Extent3D.size)); - } - set minImageTransferGranularity(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 12); - } -} -export class PhysicalDeviceMemoryProperties { - static size = 520; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMemoryProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMemoryProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.memoryTypeCount && (this.memoryTypeCount = data.memoryTypeCount), void 0 !== data.memoryTypes && (this.memoryTypes = data.memoryTypes), void 0 !== data.memoryHeapCount && (this.memoryHeapCount = data.memoryHeapCount), void 0 !== data.memoryHeaps && (this.memoryHeaps = data.memoryHeaps); - } - get memoryTypeCount() { - return this.#view.getUint32(0, LE); - } - set memoryTypeCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get memoryTypes() { - let result = []; - for(let i = 0; i < 32; i++)result.push(new MemoryType(this.#data.subarray(4 + 8 * i, 4 + 8 * i + MemoryType.size))); - return result; - } - set memoryTypes(value) { - for(let i = 0; i < value.length; i++){ - if (value[i][BUFFER].byteLength < MemoryType.size) throw new Error("Data buffer too small"); - this.#data.set(value[i][BUFFER], 4 + 8 * i); - } - } - get memoryHeapCount() { - return this.#view.getUint32(260, LE); - } - set memoryHeapCount(value) { - this.#view.setUint32(260, Number(value), LE); - } - get memoryHeaps() { - let result = []; - for(let i = 0; i < 16; i++)result.push(new MemoryHeap(this.#data.subarray(264 + 16 * i, 264 + 16 * i + MemoryHeap.size))); - return result; - } - set memoryHeaps(value) { - for(let i = 0; i < value.length; i++){ - if (value[i][BUFFER].byteLength < MemoryHeap.size) throw new Error("Data buffer too small"); - this.#data.set(value[i][BUFFER], 264 + 16 * i); - } - } -} -export class MemoryAllocateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryAllocateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryAllocateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.allocationSize && (this.allocationSize = data.allocationSize), void 0 !== data.memoryTypeIndex && (this.memoryTypeIndex = data.memoryTypeIndex); - this.sType = StructureType.MEMORY_ALLOCATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get allocationSize() { - return this.#view.getBigUint64(16, LE); - } - set allocationSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get memoryTypeIndex() { - return this.#view.getUint32(24, LE); - } - set memoryTypeIndex(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class MemoryRequirements { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryRequirements.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryRequirements.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.size && (this.size = data.size), void 0 !== data.alignment && (this.alignment = data.alignment), void 0 !== data.memoryTypeBits && (this.memoryTypeBits = data.memoryTypeBits); - } - get size() { - return this.#view.getBigUint64(0, LE); - } - set size(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get alignment() { - return this.#view.getBigUint64(8, LE); - } - set alignment(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - set memoryTypeBits(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SparseImageFormatProperties { - static size = 20; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SparseImageFormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageFormatProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageFormatProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SparseImageFormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.aspectMask && (this.aspectMask = data.aspectMask), void 0 !== data.imageGranularity && (this.imageGranularity = data.imageGranularity), void 0 !== data.flags && (this.flags = data.flags); - } - get aspectMask() { - return this.#view.getUint32(0, LE); - } - set aspectMask(value) { - this.#view.setUint32(0, Number(value), LE); - } - get imageGranularity() { - return new Extent3D(this.#data.subarray(4, 4 + Extent3D.size)); - } - set imageGranularity(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 4); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SparseImageMemoryRequirements { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SparseImageMemoryRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryRequirements.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageMemoryRequirements.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SparseImageMemoryRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.formatProperties && (this.formatProperties = data.formatProperties), void 0 !== data.imageMipTailFirstLod && (this.imageMipTailFirstLod = data.imageMipTailFirstLod), void 0 !== data.imageMipTailSize && (this.imageMipTailSize = data.imageMipTailSize), void 0 !== data.imageMipTailOffset && (this.imageMipTailOffset = data.imageMipTailOffset), void 0 !== data.imageMipTailStride && (this.imageMipTailStride = data.imageMipTailStride); - } - get formatProperties() { - return new SparseImageFormatProperties(this.#data.subarray(0, 0 + SparseImageFormatProperties.size)); - } - set formatProperties(value) { - if (value[BUFFER].byteLength < SparseImageFormatProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get imageMipTailFirstLod() { - return this.#view.getUint32(20, LE); - } - set imageMipTailFirstLod(value) { - this.#view.setUint32(20, Number(value), LE); - } - get imageMipTailSize() { - return this.#view.getBigUint64(24, LE); - } - set imageMipTailSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get imageMipTailOffset() { - return this.#view.getBigUint64(32, LE); - } - set imageMipTailOffset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get imageMipTailStride() { - return this.#view.getBigUint64(40, LE); - } - set imageMipTailStride(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } -} -export class MemoryType { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryType.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryType.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryType.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryType.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.propertyFlags && (this.propertyFlags = data.propertyFlags), void 0 !== data.heapIndex && (this.heapIndex = data.heapIndex); - } - get propertyFlags() { - return this.#view.getUint32(0, LE); - } - set propertyFlags(value) { - this.#view.setUint32(0, Number(value), LE); - } - get heapIndex() { - return this.#view.getUint32(4, LE); - } - set heapIndex(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class MemoryHeap { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryHeap.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryHeap.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryHeap.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryHeap.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.size && (this.size = data.size), void 0 !== data.flags && (this.flags = data.flags); - } - get size() { - return this.#view.getBigUint64(0, LE); - } - set size(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get flags() { - return this.#view.getUint32(8, LE); - } - set flags(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class MappedMemoryRange { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MappedMemoryRange.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MappedMemoryRange.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MappedMemoryRange.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MappedMemoryRange.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.size && (this.size = data.size); - this.sType = StructureType.MAPPED_MEMORY_RANGE; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(16, LE); - } - set memory(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get offset() { - return this.#view.getBigUint64(24, LE); - } - set offset(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(32, LE); - } - set size(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class FormatProperties { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FormatProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FormatProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.linearTilingFeatures && (this.linearTilingFeatures = data.linearTilingFeatures), void 0 !== data.optimalTilingFeatures && (this.optimalTilingFeatures = data.optimalTilingFeatures), void 0 !== data.bufferFeatures && (this.bufferFeatures = data.bufferFeatures); - } - get linearTilingFeatures() { - return this.#view.getUint32(0, LE); - } - set linearTilingFeatures(value) { - this.#view.setUint32(0, Number(value), LE); - } - get optimalTilingFeatures() { - return this.#view.getUint32(4, LE); - } - set optimalTilingFeatures(value) { - this.#view.setUint32(4, Number(value), LE); - } - get bufferFeatures() { - return this.#view.getUint32(8, LE); - } - set bufferFeatures(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class ImageFormatProperties { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageFormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageFormatProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageFormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.maxExtent && (this.maxExtent = data.maxExtent), void 0 !== data.maxMipLevels && (this.maxMipLevels = data.maxMipLevels), void 0 !== data.maxArrayLayers && (this.maxArrayLayers = data.maxArrayLayers), void 0 !== data.sampleCounts && (this.sampleCounts = data.sampleCounts), void 0 !== data.maxResourceSize && (this.maxResourceSize = data.maxResourceSize); - } - get maxExtent() { - return new Extent3D(this.#data.subarray(0, 0 + Extent3D.size)); - } - set maxExtent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get maxMipLevels() { - return this.#view.getUint32(12, LE); - } - set maxMipLevels(value) { - this.#view.setUint32(12, Number(value), LE); - } - get maxArrayLayers() { - return this.#view.getUint32(16, LE); - } - set maxArrayLayers(value) { - this.#view.setUint32(16, Number(value), LE); - } - get sampleCounts() { - return this.#view.getUint32(20, LE); - } - set sampleCounts(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxResourceSize() { - return this.#view.getBigUint64(24, LE); - } - set maxResourceSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class DescriptorBufferInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorBufferInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorBufferInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorBufferInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorBufferInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.range && (this.range = data.range); - } - get buffer() { - return this.#view.getBigUint64(0, LE); - } - set buffer(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get offset() { - return this.#view.getBigUint64(8, LE); - } - set offset(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get range() { - return this.#view.getBigUint64(16, LE); - } - set range(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class DescriptorImageInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorImageInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorImageInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorImageInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorImageInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.sampler && (this.sampler = data.sampler), void 0 !== data.imageView && (this.imageView = data.imageView), void 0 !== data.imageLayout && (this.imageLayout = data.imageLayout); - } - get sampler() { - return this.#view.getBigUint64(0, LE); - } - set sampler(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get imageView() { - return this.#view.getBigUint64(8, LE); - } - set imageView(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageLayout() { - return this.#view.getUint32(16, LE); - } - set imageLayout(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class WriteDescriptorSet { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(WriteDescriptorSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSet.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < WriteDescriptorSet.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(WriteDescriptorSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.dstSet && (this.dstSet = data.dstSet), void 0 !== data.dstBinding && (this.dstBinding = data.dstBinding), void 0 !== data.dstArrayElement && (this.dstArrayElement = data.dstArrayElement), void 0 !== data.descriptorCount && (this.descriptorCount = data.descriptorCount), void 0 !== data.descriptorType && (this.descriptorType = data.descriptorType), void 0 !== data.pImageInfo && (this.pImageInfo = data.pImageInfo), void 0 !== data.pBufferInfo && (this.pBufferInfo = data.pBufferInfo), void 0 !== data.pTexelBufferView && (this.pTexelBufferView = data.pTexelBufferView); - this.sType = StructureType.WRITE_DESCRIPTOR_SET; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dstSet() { - return this.#view.getBigUint64(16, LE); - } - set dstSet(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dstBinding() { - return this.#view.getUint32(24, LE); - } - set dstBinding(value) { - this.#view.setUint32(24, Number(value), LE); - } - get dstArrayElement() { - return this.#view.getUint32(28, LE); - } - set dstArrayElement(value) { - this.#view.setUint32(28, Number(value), LE); - } - get descriptorCount() { - return this.#view.getUint32(32, LE); - } - set descriptorCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get descriptorType() { - return this.#view.getUint32(36, LE); - } - set descriptorType(value) { - this.#view.setUint32(36, Number(value), LE); - } - get pImageInfo() { - return this.#view.getBigUint64(40, LE); - } - set pImageInfo(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get pBufferInfo() { - return this.#view.getBigUint64(48, LE); - } - set pBufferInfo(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get pTexelBufferView() { - return this.#view.getBigUint64(56, LE); - } - set pTexelBufferView(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class CopyDescriptorSet { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyDescriptorSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyDescriptorSet.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyDescriptorSet.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyDescriptorSet.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcSet && (this.srcSet = data.srcSet), void 0 !== data.srcBinding && (this.srcBinding = data.srcBinding), void 0 !== data.srcArrayElement && (this.srcArrayElement = data.srcArrayElement), void 0 !== data.dstSet && (this.dstSet = data.dstSet), void 0 !== data.dstBinding && (this.dstBinding = data.dstBinding), void 0 !== data.dstArrayElement && (this.dstArrayElement = data.dstArrayElement), void 0 !== data.descriptorCount && (this.descriptorCount = data.descriptorCount); - this.sType = StructureType.COPY_DESCRIPTOR_SET; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcSet() { - return this.#view.getBigUint64(16, LE); - } - set srcSet(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get srcBinding() { - return this.#view.getUint32(24, LE); - } - set srcBinding(value) { - this.#view.setUint32(24, Number(value), LE); - } - get srcArrayElement() { - return this.#view.getUint32(28, LE); - } - set srcArrayElement(value) { - this.#view.setUint32(28, Number(value), LE); - } - get dstSet() { - return this.#view.getBigUint64(32, LE); - } - set dstSet(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get dstBinding() { - return this.#view.getUint32(40, LE); - } - set dstBinding(value) { - this.#view.setUint32(40, Number(value), LE); - } - get dstArrayElement() { - return this.#view.getUint32(44, LE); - } - set dstArrayElement(value) { - this.#view.setUint32(44, Number(value), LE); - } - get descriptorCount() { - return this.#view.getUint32(48, LE); - } - set descriptorCount(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class BufferCreateInfo { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.size && (this.size = data.size), void 0 !== data.usage && (this.usage = data.usage), void 0 !== data.sharingMode && (this.sharingMode = data.sharingMode), void 0 !== data.queueFamilyIndexCount && (this.queueFamilyIndexCount = data.queueFamilyIndexCount), void 0 !== data.pQueueFamilyIndices && (this.pQueueFamilyIndices = data.pQueueFamilyIndices); - this.sType = StructureType.BUFFER_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get size() { - return this.#view.getBigUint64(24, LE); - } - set size(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get usage() { - return this.#view.getUint32(32, LE); - } - set usage(value) { - this.#view.setUint32(32, Number(value), LE); - } - get sharingMode() { - return this.#view.getUint32(36, LE); - } - set sharingMode(value) { - this.#view.setUint32(36, Number(value), LE); - } - get queueFamilyIndexCount() { - return this.#view.getUint32(40, LE); - } - set queueFamilyIndexCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pQueueFamilyIndices() { - return this.#view.getBigUint64(48, LE); - } - set pQueueFamilyIndices(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class BufferViewCreateInfo { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferViewCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferViewCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferViewCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferViewCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.format && (this.format = data.format), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.range && (this.range = data.range); - this.sType = StructureType.BUFFER_VIEW_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get buffer() { - return this.#view.getBigUint64(24, LE); - } - set buffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get format() { - return this.#view.getUint32(32, LE); - } - set format(value) { - this.#view.setUint32(32, Number(value), LE); - } - get offset() { - return this.#view.getBigUint64(40, LE); - } - set offset(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get range() { - return this.#view.getBigUint64(48, LE); - } - set range(value) { - this.#view.setBigUint64(48, BigInt(value), LE); - } -} -export class ImageSubresource { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageSubresource.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresource.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSubresource.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageSubresource.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.aspectMask && (this.aspectMask = data.aspectMask), void 0 !== data.mipLevel && (this.mipLevel = data.mipLevel), void 0 !== data.arrayLayer && (this.arrayLayer = data.arrayLayer); - } - get aspectMask() { - return this.#view.getUint32(0, LE); - } - set aspectMask(value) { - this.#view.setUint32(0, Number(value), LE); - } - get mipLevel() { - return this.#view.getUint32(4, LE); - } - set mipLevel(value) { - this.#view.setUint32(4, Number(value), LE); - } - get arrayLayer() { - return this.#view.getUint32(8, LE); - } - set arrayLayer(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class ImageSubresourceLayers { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageSubresourceLayers.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresourceLayers.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageSubresourceLayers.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.aspectMask && (this.aspectMask = data.aspectMask), void 0 !== data.mipLevel && (this.mipLevel = data.mipLevel), void 0 !== data.baseArrayLayer && (this.baseArrayLayer = data.baseArrayLayer), void 0 !== data.layerCount && (this.layerCount = data.layerCount); - } - get aspectMask() { - return this.#view.getUint32(0, LE); - } - set aspectMask(value) { - this.#view.setUint32(0, Number(value), LE); - } - get mipLevel() { - return this.#view.getUint32(4, LE); - } - set mipLevel(value) { - this.#view.setUint32(4, Number(value), LE); - } - get baseArrayLayer() { - return this.#view.getUint32(8, LE); - } - set baseArrayLayer(value) { - this.#view.setUint32(8, Number(value), LE); - } - get layerCount() { - return this.#view.getUint32(12, LE); - } - set layerCount(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class ImageSubresourceRange { - static size = 20; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageSubresourceRange.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresourceRange.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSubresourceRange.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageSubresourceRange.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.aspectMask && (this.aspectMask = data.aspectMask), void 0 !== data.baseMipLevel && (this.baseMipLevel = data.baseMipLevel), void 0 !== data.levelCount && (this.levelCount = data.levelCount), void 0 !== data.baseArrayLayer && (this.baseArrayLayer = data.baseArrayLayer), void 0 !== data.layerCount && (this.layerCount = data.layerCount); - } - get aspectMask() { - return this.#view.getUint32(0, LE); - } - set aspectMask(value) { - this.#view.setUint32(0, Number(value), LE); - } - get baseMipLevel() { - return this.#view.getUint32(4, LE); - } - set baseMipLevel(value) { - this.#view.setUint32(4, Number(value), LE); - } - get levelCount() { - return this.#view.getUint32(8, LE); - } - set levelCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get baseArrayLayer() { - return this.#view.getUint32(12, LE); - } - set baseArrayLayer(value) { - this.#view.setUint32(12, Number(value), LE); - } - get layerCount() { - return this.#view.getUint32(16, LE); - } - set layerCount(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MemoryBarrier { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryBarrier.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryBarrier.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryBarrier.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryBarrier.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcAccessMask && (this.srcAccessMask = data.srcAccessMask), void 0 !== data.dstAccessMask && (this.dstAccessMask = data.dstAccessMask); - this.sType = StructureType.MEMORY_BARRIER; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcAccessMask() { - return this.#view.getUint32(16, LE); - } - set srcAccessMask(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dstAccessMask() { - return this.#view.getUint32(20, LE); - } - set dstAccessMask(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class BufferMemoryBarrier { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferMemoryBarrier.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferMemoryBarrier.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferMemoryBarrier.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferMemoryBarrier.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcAccessMask && (this.srcAccessMask = data.srcAccessMask), void 0 !== data.dstAccessMask && (this.dstAccessMask = data.dstAccessMask), void 0 !== data.srcQueueFamilyIndex && (this.srcQueueFamilyIndex = data.srcQueueFamilyIndex), void 0 !== data.dstQueueFamilyIndex && (this.dstQueueFamilyIndex = data.dstQueueFamilyIndex), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.size && (this.size = data.size); - this.sType = StructureType.BUFFER_MEMORY_BARRIER; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcAccessMask() { - return this.#view.getUint32(16, LE); - } - set srcAccessMask(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dstAccessMask() { - return this.#view.getUint32(20, LE); - } - set dstAccessMask(value) { - this.#view.setUint32(20, Number(value), LE); - } - get srcQueueFamilyIndex() { - return this.#view.getUint32(24, LE); - } - set srcQueueFamilyIndex(value) { - this.#view.setUint32(24, Number(value), LE); - } - get dstQueueFamilyIndex() { - return this.#view.getUint32(28, LE); - } - set dstQueueFamilyIndex(value) { - this.#view.setUint32(28, Number(value), LE); - } - get buffer() { - return this.#view.getBigUint64(32, LE); - } - set buffer(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get offset() { - return this.#view.getBigUint64(40, LE); - } - set offset(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(48, LE); - } - set size(value) { - this.#view.setBigUint64(48, BigInt(value), LE); - } -} -export class ImageMemoryBarrier { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageMemoryBarrier.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageMemoryBarrier.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageMemoryBarrier.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageMemoryBarrier.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcAccessMask && (this.srcAccessMask = data.srcAccessMask), void 0 !== data.dstAccessMask && (this.dstAccessMask = data.dstAccessMask), void 0 !== data.oldLayout && (this.oldLayout = data.oldLayout), void 0 !== data.newLayout && (this.newLayout = data.newLayout), void 0 !== data.srcQueueFamilyIndex && (this.srcQueueFamilyIndex = data.srcQueueFamilyIndex), void 0 !== data.dstQueueFamilyIndex && (this.dstQueueFamilyIndex = data.dstQueueFamilyIndex), void 0 !== data.image && (this.image = data.image), void 0 !== data.subresourceRange && (this.subresourceRange = data.subresourceRange); - this.sType = StructureType.IMAGE_MEMORY_BARRIER; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcAccessMask() { - return this.#view.getUint32(16, LE); - } - set srcAccessMask(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dstAccessMask() { - return this.#view.getUint32(20, LE); - } - set dstAccessMask(value) { - this.#view.setUint32(20, Number(value), LE); - } - get oldLayout() { - return this.#view.getUint32(24, LE); - } - set oldLayout(value) { - this.#view.setUint32(24, Number(value), LE); - } - get newLayout() { - return this.#view.getUint32(28, LE); - } - set newLayout(value) { - this.#view.setUint32(28, Number(value), LE); - } - get srcQueueFamilyIndex() { - return this.#view.getUint32(32, LE); - } - set srcQueueFamilyIndex(value) { - this.#view.setUint32(32, Number(value), LE); - } - get dstQueueFamilyIndex() { - return this.#view.getUint32(36, LE); - } - set dstQueueFamilyIndex(value) { - this.#view.setUint32(36, Number(value), LE); - } - get image() { - return this.#view.getBigUint64(40, LE); - } - set image(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get subresourceRange() { - return new ImageSubresourceRange(this.#data.subarray(48, 48 + ImageSubresourceRange.size)); - } - set subresourceRange(value) { - if (value[BUFFER].byteLength < ImageSubresourceRange.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 48); - } -} -export class ImageCreateInfo { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.imageType && (this.imageType = data.imageType), void 0 !== data.format && (this.format = data.format), void 0 !== data.extent && (this.extent = data.extent), void 0 !== data.mipLevels && (this.mipLevels = data.mipLevels), void 0 !== data.arrayLayers && (this.arrayLayers = data.arrayLayers), void 0 !== data.samples && (this.samples = data.samples), void 0 !== data.tiling && (this.tiling = data.tiling), void 0 !== data.usage && (this.usage = data.usage), void 0 !== data.sharingMode && (this.sharingMode = data.sharingMode), void 0 !== data.queueFamilyIndexCount && (this.queueFamilyIndexCount = data.queueFamilyIndexCount), void 0 !== data.pQueueFamilyIndices && (this.pQueueFamilyIndices = data.pQueueFamilyIndices), void 0 !== data.initialLayout && (this.initialLayout = data.initialLayout); - this.sType = StructureType.IMAGE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get imageType() { - return this.#view.getUint32(20, LE); - } - set imageType(value) { - this.#view.setUint32(20, Number(value), LE); - } - get format() { - return this.#view.getUint32(24, LE); - } - set format(value) { - this.#view.setUint32(24, Number(value), LE); - } - get extent() { - return new Extent3D(this.#data.subarray(28, 28 + Extent3D.size)); - } - set extent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 28); - } - get mipLevels() { - return this.#view.getUint32(40, LE); - } - set mipLevels(value) { - this.#view.setUint32(40, Number(value), LE); - } - get arrayLayers() { - return this.#view.getUint32(44, LE); - } - set arrayLayers(value) { - this.#view.setUint32(44, Number(value), LE); - } - get samples() { - return this.#view.getUint32(48, LE); - } - set samples(value) { - this.#view.setUint32(48, Number(value), LE); - } - get tiling() { - return this.#view.getUint32(52, LE); - } - set tiling(value) { - this.#view.setUint32(52, Number(value), LE); - } - get usage() { - return this.#view.getUint32(56, LE); - } - set usage(value) { - this.#view.setUint32(56, Number(value), LE); - } - get sharingMode() { - return this.#view.getUint32(60, LE); - } - set sharingMode(value) { - this.#view.setUint32(60, Number(value), LE); - } - get queueFamilyIndexCount() { - return this.#view.getUint32(64, LE); - } - set queueFamilyIndexCount(value) { - this.#view.setUint32(64, Number(value), LE); - } - get pQueueFamilyIndices() { - return this.#view.getBigUint64(72, LE); - } - set pQueueFamilyIndices(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - get initialLayout() { - return this.#view.getUint32(80, LE); - } - set initialLayout(value) { - this.#view.setUint32(80, Number(value), LE); - } -} -export class SubresourceLayout { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubresourceLayout.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubresourceLayout.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubresourceLayout.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubresourceLayout.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.size && (this.size = data.size), void 0 !== data.rowPitch && (this.rowPitch = data.rowPitch), void 0 !== data.arrayPitch && (this.arrayPitch = data.arrayPitch), void 0 !== data.depthPitch && (this.depthPitch = data.depthPitch); - } - get offset() { - return this.#view.getBigUint64(0, LE); - } - set offset(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(8, LE); - } - set size(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get rowPitch() { - return this.#view.getBigUint64(16, LE); - } - set rowPitch(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get arrayPitch() { - return this.#view.getBigUint64(24, LE); - } - set arrayPitch(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get depthPitch() { - return this.#view.getBigUint64(32, LE); - } - set depthPitch(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class ImageViewCreateInfo { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageViewCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageViewCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.image && (this.image = data.image), void 0 !== data.viewType && (this.viewType = data.viewType), void 0 !== data.format && (this.format = data.format), void 0 !== data.components && (this.components = data.components), void 0 !== data.subresourceRange && (this.subresourceRange = data.subresourceRange); - this.sType = StructureType.IMAGE_VIEW_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get image() { - return this.#view.getBigUint64(24, LE); - } - set image(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get viewType() { - return this.#view.getUint32(32, LE); - } - set viewType(value) { - this.#view.setUint32(32, Number(value), LE); - } - get format() { - return this.#view.getUint32(36, LE); - } - set format(value) { - this.#view.setUint32(36, Number(value), LE); - } - get components() { - return new ComponentMapping(this.#data.subarray(40, 40 + ComponentMapping.size)); - } - set components(value) { - if (value[BUFFER].byteLength < ComponentMapping.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } - get subresourceRange() { - return new ImageSubresourceRange(this.#data.subarray(56, 56 + ImageSubresourceRange.size)); - } - set subresourceRange(value) { - if (value[BUFFER].byteLength < ImageSubresourceRange.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 56); - } -} -export class BufferCopy { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferCopy.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCopy.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCopy.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferCopy.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.srcOffset && (this.srcOffset = data.srcOffset), void 0 !== data.dstOffset && (this.dstOffset = data.dstOffset), void 0 !== data.size && (this.size = data.size); - } - get srcOffset() { - return this.#view.getBigUint64(0, LE); - } - set srcOffset(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get dstOffset() { - return this.#view.getBigUint64(8, LE); - } - set dstOffset(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(16, LE); - } - set size(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class SparseMemoryBind { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SparseMemoryBind.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseMemoryBind.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SparseMemoryBind.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SparseMemoryBind.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.resourceOffset && (this.resourceOffset = data.resourceOffset), void 0 !== data.size && (this.size = data.size), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.memoryOffset && (this.memoryOffset = data.memoryOffset), void 0 !== data.flags && (this.flags = data.flags); - } - get resourceOffset() { - return this.#view.getBigUint64(0, LE); - } - set resourceOffset(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(8, LE); - } - set size(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get memory() { - return this.#view.getBigUint64(16, LE); - } - set memory(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get memoryOffset() { - return this.#view.getBigUint64(24, LE); - } - set memoryOffset(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get flags() { - return this.#view.getUint32(32, LE); - } - set flags(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class SparseImageMemoryBind { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SparseImageMemoryBind.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryBind.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageMemoryBind.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SparseImageMemoryBind.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.subresource && (this.subresource = data.subresource), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.extent && (this.extent = data.extent), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.memoryOffset && (this.memoryOffset = data.memoryOffset), void 0 !== data.flags && (this.flags = data.flags); - } - get subresource() { - return new ImageSubresource(this.#data.subarray(0, 0 + ImageSubresource.size)); - } - set subresource(value) { - if (value[BUFFER].byteLength < ImageSubresource.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get offset() { - return new Offset3D(this.#data.subarray(12, 12 + Offset3D.size)); - } - set offset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 12); - } - get extent() { - return new Extent3D(this.#data.subarray(24, 24 + Extent3D.size)); - } - set extent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get memory() { - return this.#view.getBigUint64(40, LE); - } - set memory(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get memoryOffset() { - return this.#view.getBigUint64(48, LE); - } - set memoryOffset(value) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - get flags() { - return this.#view.getUint32(56, LE); - } - set flags(value) { - this.#view.setUint32(56, Number(value), LE); - } -} -export class SparseBufferMemoryBindInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SparseBufferMemoryBindInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseBufferMemoryBindInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SparseBufferMemoryBindInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SparseBufferMemoryBindInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.bindCount && (this.bindCount = data.bindCount), void 0 !== data.pBinds && (this.pBinds = data.pBinds); - } - get buffer() { - return this.#view.getBigUint64(0, LE); - } - set buffer(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get bindCount() { - return this.#view.getUint32(8, LE); - } - set bindCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get pBinds() { - return this.#view.getBigUint64(16, LE); - } - set pBinds(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class SparseImageOpaqueMemoryBindInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SparseImageOpaqueMemoryBindInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageOpaqueMemoryBindInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageOpaqueMemoryBindInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SparseImageOpaqueMemoryBindInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.image && (this.image = data.image), void 0 !== data.bindCount && (this.bindCount = data.bindCount), void 0 !== data.pBinds && (this.pBinds = data.pBinds); - } - get image() { - return this.#view.getBigUint64(0, LE); - } - set image(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get bindCount() { - return this.#view.getUint32(8, LE); - } - set bindCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get pBinds() { - return this.#view.getBigUint64(16, LE); - } - set pBinds(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class SparseImageMemoryBindInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SparseImageMemoryBindInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryBindInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageMemoryBindInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SparseImageMemoryBindInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.image && (this.image = data.image), void 0 !== data.bindCount && (this.bindCount = data.bindCount), void 0 !== data.pBinds && (this.pBinds = data.pBinds); - } - get image() { - return this.#view.getBigUint64(0, LE); - } - set image(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get bindCount() { - return this.#view.getUint32(8, LE); - } - set bindCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get pBinds() { - return this.#view.getBigUint64(16, LE); - } - set pBinds(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class BindSparseInfo { - static size = 96; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindSparseInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindSparseInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindSparseInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindSparseInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.waitSemaphoreCount && (this.waitSemaphoreCount = data.waitSemaphoreCount), void 0 !== data.pWaitSemaphores && (this.pWaitSemaphores = data.pWaitSemaphores), void 0 !== data.bufferBindCount && (this.bufferBindCount = data.bufferBindCount), void 0 !== data.pBufferBinds && (this.pBufferBinds = data.pBufferBinds), void 0 !== data.imageOpaqueBindCount && (this.imageOpaqueBindCount = data.imageOpaqueBindCount), void 0 !== data.pImageOpaqueBinds && (this.pImageOpaqueBinds = data.pImageOpaqueBinds), void 0 !== data.imageBindCount && (this.imageBindCount = data.imageBindCount), void 0 !== data.pImageBinds && (this.pImageBinds = data.pImageBinds), void 0 !== data.signalSemaphoreCount && (this.signalSemaphoreCount = data.signalSemaphoreCount), void 0 !== data.pSignalSemaphores && (this.pSignalSemaphores = data.pSignalSemaphores); - this.sType = StructureType.BIND_SPARSE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get waitSemaphoreCount() { - return this.#view.getUint32(16, LE); - } - set waitSemaphoreCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pWaitSemaphores() { - return this.#view.getBigUint64(24, LE); - } - set pWaitSemaphores(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get bufferBindCount() { - return this.#view.getUint32(32, LE); - } - set bufferBindCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pBufferBinds() { - return this.#view.getBigUint64(40, LE); - } - set pBufferBinds(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get imageOpaqueBindCount() { - return this.#view.getUint32(48, LE); - } - set imageOpaqueBindCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pImageOpaqueBinds() { - return this.#view.getBigUint64(56, LE); - } - set pImageOpaqueBinds(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get imageBindCount() { - return this.#view.getUint32(64, LE); - } - set imageBindCount(value) { - this.#view.setUint32(64, Number(value), LE); - } - get pImageBinds() { - return this.#view.getBigUint64(72, LE); - } - set pImageBinds(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - get signalSemaphoreCount() { - return this.#view.getUint32(80, LE); - } - set signalSemaphoreCount(value) { - this.#view.setUint32(80, Number(value), LE); - } - get pSignalSemaphores() { - return this.#view.getBigUint64(88, LE); - } - set pSignalSemaphores(value) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } -} -export class ImageCopy { - static size = 68; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageCopy.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCopy.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCopy.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageCopy.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.srcSubresource && (this.srcSubresource = data.srcSubresource), void 0 !== data.srcOffset && (this.srcOffset = data.srcOffset), void 0 !== data.dstSubresource && (this.dstSubresource = data.dstSubresource), void 0 !== data.dstOffset && (this.dstOffset = data.dstOffset), void 0 !== data.extent && (this.extent = data.extent); - } - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(0, 0 + ImageSubresourceLayers.size)); - } - set srcSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get srcOffset() { - return new Offset3D(this.#data.subarray(16, 16 + Offset3D.size)); - } - set srcOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(28, 28 + ImageSubresourceLayers.size)); - } - set dstSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 28); - } - get dstOffset() { - return new Offset3D(this.#data.subarray(44, 44 + Offset3D.size)); - } - set dstOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 44); - } - get extent() { - return new Extent3D(this.#data.subarray(56, 56 + Extent3D.size)); - } - set extent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 56); - } -} -export class ImageBlit { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageBlit.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageBlit.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageBlit.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageBlit.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.srcSubresource && (this.srcSubresource = data.srcSubresource), void 0 !== data.srcOffsets && (this.srcOffsets = data.srcOffsets), void 0 !== data.dstSubresource && (this.dstSubresource = data.dstSubresource), void 0 !== data.dstOffsets && (this.dstOffsets = data.dstOffsets); - } - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(0, 0 + ImageSubresourceLayers.size)); - } - set srcSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get srcOffsets() { - let result = []; - for(let i = 0; i < 2; i++)result.push(new Offset3D(this.#data.subarray(16 + 12 * i, 16 + 12 * i + Offset3D.size))); - return result; - } - set srcOffsets(value) { - for(let i = 0; i < value.length; i++){ - if (value[i][BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[i][BUFFER], 16 + 12 * i); - } - } - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(40, 40 + ImageSubresourceLayers.size)); - } - set dstSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } - get dstOffsets() { - let result = []; - for(let i = 0; i < 2; i++)result.push(new Offset3D(this.#data.subarray(56 + 12 * i, 56 + 12 * i + Offset3D.size))); - return result; - } - set dstOffsets(value) { - for(let i = 0; i < value.length; i++){ - if (value[i][BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[i][BUFFER], 56 + 12 * i); - } - } -} -export class BufferImageCopy { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferImageCopy.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferImageCopy.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferImageCopy.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferImageCopy.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.bufferOffset && (this.bufferOffset = data.bufferOffset), void 0 !== data.bufferRowLength && (this.bufferRowLength = data.bufferRowLength), void 0 !== data.bufferImageHeight && (this.bufferImageHeight = data.bufferImageHeight), void 0 !== data.imageSubresource && (this.imageSubresource = data.imageSubresource), void 0 !== data.imageOffset && (this.imageOffset = data.imageOffset), void 0 !== data.imageExtent && (this.imageExtent = data.imageExtent); - } - get bufferOffset() { - return this.#view.getBigUint64(0, LE); - } - set bufferOffset(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get bufferRowLength() { - return this.#view.getUint32(8, LE); - } - set bufferRowLength(value) { - this.#view.setUint32(8, Number(value), LE); - } - get bufferImageHeight() { - return this.#view.getUint32(12, LE); - } - set bufferImageHeight(value) { - this.#view.setUint32(12, Number(value), LE); - } - get imageSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - set imageSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get imageOffset() { - return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); - } - set imageOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get imageExtent() { - return new Extent3D(this.#data.subarray(44, 44 + Extent3D.size)); - } - set imageExtent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 44); - } -} -export class CopyMemoryIndirectCommandNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyMemoryIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryIndirectCommandNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMemoryIndirectCommandNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyMemoryIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.srcAddress && (this.srcAddress = data.srcAddress), void 0 !== data.dstAddress && (this.dstAddress = data.dstAddress), void 0 !== data.size && (this.size = data.size); - } - get srcAddress() { - return this.#view.getBigUint64(0, LE); - } - set srcAddress(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get dstAddress() { - return this.#view.getBigUint64(8, LE); - } - set dstAddress(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(16, LE); - } - set size(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class CopyMemoryToImageIndirectCommandNV { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyMemoryToImageIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryToImageIndirectCommandNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMemoryToImageIndirectCommandNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyMemoryToImageIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.srcAddress && (this.srcAddress = data.srcAddress), void 0 !== data.bufferRowLength && (this.bufferRowLength = data.bufferRowLength), void 0 !== data.bufferImageHeight && (this.bufferImageHeight = data.bufferImageHeight), void 0 !== data.imageSubresource && (this.imageSubresource = data.imageSubresource), void 0 !== data.imageOffset && (this.imageOffset = data.imageOffset), void 0 !== data.imageExtent && (this.imageExtent = data.imageExtent); - } - get srcAddress() { - return this.#view.getBigUint64(0, LE); - } - set srcAddress(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get bufferRowLength() { - return this.#view.getUint32(8, LE); - } - set bufferRowLength(value) { - this.#view.setUint32(8, Number(value), LE); - } - get bufferImageHeight() { - return this.#view.getUint32(12, LE); - } - set bufferImageHeight(value) { - this.#view.setUint32(12, Number(value), LE); - } - get imageSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - set imageSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get imageOffset() { - return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); - } - set imageOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get imageExtent() { - return new Extent3D(this.#data.subarray(44, 44 + Extent3D.size)); - } - set imageExtent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 44); - } -} -export class ImageResolve { - static size = 68; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageResolve.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageResolve.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageResolve.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageResolve.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.srcSubresource && (this.srcSubresource = data.srcSubresource), void 0 !== data.srcOffset && (this.srcOffset = data.srcOffset), void 0 !== data.dstSubresource && (this.dstSubresource = data.dstSubresource), void 0 !== data.dstOffset && (this.dstOffset = data.dstOffset), void 0 !== data.extent && (this.extent = data.extent); - } - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(0, 0 + ImageSubresourceLayers.size)); - } - set srcSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get srcOffset() { - return new Offset3D(this.#data.subarray(16, 16 + Offset3D.size)); - } - set srcOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(28, 28 + ImageSubresourceLayers.size)); - } - set dstSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 28); - } - get dstOffset() { - return new Offset3D(this.#data.subarray(44, 44 + Offset3D.size)); - } - set dstOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 44); - } - get extent() { - return new Extent3D(this.#data.subarray(56, 56 + Extent3D.size)); - } - set extent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 56); - } -} -export class ShaderModuleCreateInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ShaderModuleCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderModuleCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderModuleCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ShaderModuleCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.codeSize && (this.codeSize = data.codeSize), void 0 !== data.pCode && (this.pCode = data.pCode); - this.sType = StructureType.SHADER_MODULE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get codeSize() { - return this.#view.getBigUint64(24, LE); - } - set codeSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get pCode() { - return this.#view.getBigUint64(32, LE); - } - set pCode(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class DescriptorSetLayoutBinding { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorSetLayoutBinding.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutBinding.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutBinding.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorSetLayoutBinding.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.binding && (this.binding = data.binding), void 0 !== data.descriptorType && (this.descriptorType = data.descriptorType), void 0 !== data.descriptorCount && (this.descriptorCount = data.descriptorCount), void 0 !== data.stageFlags && (this.stageFlags = data.stageFlags), void 0 !== data.pImmutableSamplers && (this.pImmutableSamplers = data.pImmutableSamplers); - } - get binding() { - return this.#view.getUint32(0, LE); - } - set binding(value) { - this.#view.setUint32(0, Number(value), LE); - } - get descriptorType() { - return this.#view.getUint32(4, LE); - } - set descriptorType(value) { - this.#view.setUint32(4, Number(value), LE); - } - get descriptorCount() { - return this.#view.getUint32(8, LE); - } - set descriptorCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get stageFlags() { - return this.#view.getUint32(12, LE); - } - set stageFlags(value) { - this.#view.setUint32(12, Number(value), LE); - } - get pImmutableSamplers() { - return this.#view.getBigUint64(16, LE); - } - set pImmutableSamplers(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class DescriptorSetLayoutCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorSetLayoutCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorSetLayoutCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.bindingCount && (this.bindingCount = data.bindingCount), void 0 !== data.pBindings && (this.pBindings = data.pBindings); - this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get bindingCount() { - return this.#view.getUint32(20, LE); - } - set bindingCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pBindings() { - return this.#view.getBigUint64(24, LE); - } - set pBindings(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class DescriptorPoolSize { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorPoolSize.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorPoolSize.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorPoolSize.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorPoolSize.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.type && (this.type = data.type), void 0 !== data.descriptorCount && (this.descriptorCount = data.descriptorCount); - } - get type() { - return this.#view.getUint32(0, LE); - } - set type(value) { - this.#view.setUint32(0, Number(value), LE); - } - get descriptorCount() { - return this.#view.getUint32(4, LE); - } - set descriptorCount(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class DescriptorPoolCreateInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorPoolCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorPoolCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorPoolCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorPoolCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.maxSets && (this.maxSets = data.maxSets), void 0 !== data.poolSizeCount && (this.poolSizeCount = data.poolSizeCount), void 0 !== data.pPoolSizes && (this.pPoolSizes = data.pPoolSizes); - this.sType = StructureType.DESCRIPTOR_POOL_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxSets() { - return this.#view.getUint32(20, LE); - } - set maxSets(value) { - this.#view.setUint32(20, Number(value), LE); - } - get poolSizeCount() { - return this.#view.getUint32(24, LE); - } - set poolSizeCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pPoolSizes() { - return this.#view.getBigUint64(32, LE); - } - set pPoolSizes(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class DescriptorSetAllocateInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorSetAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetAllocateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetAllocateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorSetAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.descriptorPool && (this.descriptorPool = data.descriptorPool), void 0 !== data.descriptorSetCount && (this.descriptorSetCount = data.descriptorSetCount), void 0 !== data.pSetLayouts && (this.pSetLayouts = data.pSetLayouts); - this.sType = StructureType.DESCRIPTOR_SET_ALLOCATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get descriptorPool() { - return this.#view.getBigUint64(16, LE); - } - set descriptorPool(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get descriptorSetCount() { - return this.#view.getUint32(24, LE); - } - set descriptorSetCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pSetLayouts() { - return this.#view.getBigUint64(32, LE); - } - set pSetLayouts(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class SpecializationMapEntry { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SpecializationMapEntry.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SpecializationMapEntry.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SpecializationMapEntry.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SpecializationMapEntry.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.constantID && (this.constantID = data.constantID), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.size && (this.size = data.size); - } - get constantID() { - return this.#view.getUint32(0, LE); - } - set constantID(value) { - this.#view.setUint32(0, Number(value), LE); - } - get offset() { - return this.#view.getUint32(4, LE); - } - set offset(value) { - this.#view.setUint32(4, Number(value), LE); - } - get size() { - return this.#view.getBigUint64(8, LE); - } - set size(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} -export class SpecializationInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SpecializationInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SpecializationInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SpecializationInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SpecializationInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.mapEntryCount && (this.mapEntryCount = data.mapEntryCount), void 0 !== data.pMapEntries && (this.pMapEntries = data.pMapEntries), void 0 !== data.dataSize && (this.dataSize = data.dataSize), void 0 !== data.pData && (this.pData = data.pData); - } - get mapEntryCount() { - return this.#view.getUint32(0, LE); - } - set mapEntryCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pMapEntries() { - return this.#view.getBigUint64(8, LE); - } - set pMapEntries(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dataSize() { - return this.#view.getBigUint64(16, LE); - } - set dataSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get pData() { - return this.#view.getBigUint64(24, LE); - } - set pData(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PipelineShaderStageCreateInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineShaderStageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineShaderStageCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineShaderStageCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineShaderStageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.stage && (this.stage = data.stage), void 0 !== data.module && (this.module = data.module), void 0 !== data.pName && (this.pName = data.pName), void 0 !== data.pSpecializationInfo && (this.pSpecializationInfo = data.pSpecializationInfo); - this.sType = StructureType.PIPELINE_SHADER_STAGE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stage() { - return this.#view.getUint32(20, LE); - } - set stage(value) { - this.#view.setUint32(20, Number(value), LE); - } - get module() { - return this.#view.getBigUint64(24, LE); - } - set module(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pName() { - return this.#view.getBigUint64(32, LE); - } - set pName(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get pSpecializationInfo() { - return this.#view.getBigUint64(40, LE); - } - set pSpecializationInfo(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class ComputePipelineCreateInfo { - static size = 96; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ComputePipelineCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ComputePipelineCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ComputePipelineCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ComputePipelineCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.stage && (this.stage = data.stage), void 0 !== data.layout && (this.layout = data.layout), void 0 !== data.basePipelineHandle && (this.basePipelineHandle = data.basePipelineHandle), void 0 !== data.basePipelineIndex && (this.basePipelineIndex = data.basePipelineIndex); - this.sType = StructureType.COMPUTE_PIPELINE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stage() { - return new PipelineShaderStageCreateInfo(this.#data.subarray(20, 20 + PipelineShaderStageCreateInfo.size)); - } - set stage(value) { - if (value[BUFFER].byteLength < PipelineShaderStageCreateInfo.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } - get layout() { - return this.#view.getBigUint64(72, LE); - } - set layout(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - get basePipelineHandle() { - return this.#view.getBigUint64(80, LE); - } - set basePipelineHandle(value) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } - get basePipelineIndex() { - return this.#view.getInt32(88, LE); - } - set basePipelineIndex(value) { - this.#view.setInt32(88, Number(value), LE); - } -} -export class VertexInputBindingDescription { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VertexInputBindingDescription.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputBindingDescription.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputBindingDescription.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VertexInputBindingDescription.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.binding && (this.binding = data.binding), void 0 !== data.stride && (this.stride = data.stride), void 0 !== data.inputRate && (this.inputRate = data.inputRate); - } - get binding() { - return this.#view.getUint32(0, LE); - } - set binding(value) { - this.#view.setUint32(0, Number(value), LE); - } - get stride() { - return this.#view.getUint32(4, LE); - } - set stride(value) { - this.#view.setUint32(4, Number(value), LE); - } - get inputRate() { - return this.#view.getUint32(8, LE); - } - set inputRate(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class VertexInputAttributeDescription { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VertexInputAttributeDescription.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputAttributeDescription.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputAttributeDescription.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VertexInputAttributeDescription.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.location && (this.location = data.location), void 0 !== data.binding && (this.binding = data.binding), void 0 !== data.format && (this.format = data.format), void 0 !== data.offset && (this.offset = data.offset); - } - get location() { - return this.#view.getUint32(0, LE); - } - set location(value) { - this.#view.setUint32(0, Number(value), LE); - } - get binding() { - return this.#view.getUint32(4, LE); - } - set binding(value) { - this.#view.setUint32(4, Number(value), LE); - } - get format() { - return this.#view.getUint32(8, LE); - } - set format(value) { - this.#view.setUint32(8, Number(value), LE); - } - get offset() { - return this.#view.getUint32(12, LE); - } - set offset(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class PipelineVertexInputStateCreateInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineVertexInputStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineVertexInputStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineVertexInputStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineVertexInputStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.vertexBindingDescriptionCount && (this.vertexBindingDescriptionCount = data.vertexBindingDescriptionCount), void 0 !== data.pVertexBindingDescriptions && (this.pVertexBindingDescriptions = data.pVertexBindingDescriptions), void 0 !== data.vertexAttributeDescriptionCount && (this.vertexAttributeDescriptionCount = data.vertexAttributeDescriptionCount), void 0 !== data.pVertexAttributeDescriptions && (this.pVertexAttributeDescriptions = data.pVertexAttributeDescriptions); - this.sType = StructureType.PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get vertexBindingDescriptionCount() { - return this.#view.getUint32(20, LE); - } - set vertexBindingDescriptionCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pVertexBindingDescriptions() { - return this.#view.getBigUint64(24, LE); - } - set pVertexBindingDescriptions(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get vertexAttributeDescriptionCount() { - return this.#view.getUint32(32, LE); - } - set vertexAttributeDescriptionCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pVertexAttributeDescriptions() { - return this.#view.getBigUint64(40, LE); - } - set pVertexAttributeDescriptions(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class PipelineInputAssemblyStateCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineInputAssemblyStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineInputAssemblyStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineInputAssemblyStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineInputAssemblyStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.topology && (this.topology = data.topology), void 0 !== data.primitiveRestartEnable && (this.primitiveRestartEnable = data.primitiveRestartEnable); - this.sType = StructureType.PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get topology() { - return this.#view.getUint32(20, LE); - } - set topology(value) { - this.#view.setUint32(20, Number(value), LE); - } - get primitiveRestartEnable() { - return this.#view.getUint32(24, LE); - } - set primitiveRestartEnable(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PipelineTessellationStateCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineTessellationStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineTessellationStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineTessellationStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineTessellationStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.patchControlPoints && (this.patchControlPoints = data.patchControlPoints); - this.sType = StructureType.PIPELINE_TESSELLATION_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get patchControlPoints() { - return this.#view.getUint32(20, LE); - } - set patchControlPoints(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PipelineViewportStateCreateInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineViewportStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineViewportStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.viewportCount && (this.viewportCount = data.viewportCount), void 0 !== data.pViewports && (this.pViewports = data.pViewports), void 0 !== data.scissorCount && (this.scissorCount = data.scissorCount), void 0 !== data.pScissors && (this.pScissors = data.pScissors); - this.sType = StructureType.PIPELINE_VIEWPORT_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get viewportCount() { - return this.#view.getUint32(20, LE); - } - set viewportCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pViewports() { - return this.#view.getBigUint64(24, LE); - } - set pViewports(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get scissorCount() { - return this.#view.getUint32(32, LE); - } - set scissorCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pScissors() { - return this.#view.getBigUint64(40, LE); - } - set pScissors(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class PipelineRasterizationStateCreateInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRasterizationStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRasterizationStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.depthClampEnable && (this.depthClampEnable = data.depthClampEnable), void 0 !== data.rasterizerDiscardEnable && (this.rasterizerDiscardEnable = data.rasterizerDiscardEnable), void 0 !== data.polygonMode && (this.polygonMode = data.polygonMode), void 0 !== data.cullMode && (this.cullMode = data.cullMode), void 0 !== data.frontFace && (this.frontFace = data.frontFace), void 0 !== data.depthBiasEnable && (this.depthBiasEnable = data.depthBiasEnable), void 0 !== data.depthBiasConstantFactor && (this.depthBiasConstantFactor = data.depthBiasConstantFactor), void 0 !== data.depthBiasClamp && (this.depthBiasClamp = data.depthBiasClamp), void 0 !== data.depthBiasSlopeFactor && (this.depthBiasSlopeFactor = data.depthBiasSlopeFactor), void 0 !== data.lineWidth && (this.lineWidth = data.lineWidth); - this.sType = StructureType.PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get depthClampEnable() { - return this.#view.getUint32(20, LE); - } - set depthClampEnable(value) { - this.#view.setUint32(20, Number(value), LE); - } - get rasterizerDiscardEnable() { - return this.#view.getUint32(24, LE); - } - set rasterizerDiscardEnable(value) { - this.#view.setUint32(24, Number(value), LE); - } - get polygonMode() { - return this.#view.getUint32(28, LE); - } - set polygonMode(value) { - this.#view.setUint32(28, Number(value), LE); - } - get cullMode() { - return this.#view.getUint32(32, LE); - } - set cullMode(value) { - this.#view.setUint32(32, Number(value), LE); - } - get frontFace() { - return this.#view.getUint32(36, LE); - } - set frontFace(value) { - this.#view.setUint32(36, Number(value), LE); - } - get depthBiasEnable() { - return this.#view.getUint32(40, LE); - } - set depthBiasEnable(value) { - this.#view.setUint32(40, Number(value), LE); - } - get depthBiasConstantFactor() { - return this.#view.getFloat32(44, LE); - } - set depthBiasConstantFactor(value) { - this.#view.setFloat32(44, Number(value), LE); - } - get depthBiasClamp() { - return this.#view.getFloat32(48, LE); - } - set depthBiasClamp(value) { - this.#view.setFloat32(48, Number(value), LE); - } - get depthBiasSlopeFactor() { - return this.#view.getFloat32(52, LE); - } - set depthBiasSlopeFactor(value) { - this.#view.setFloat32(52, Number(value), LE); - } - get lineWidth() { - return this.#view.getFloat32(56, LE); - } - set lineWidth(value) { - this.#view.setFloat32(56, Number(value), LE); - } -} -export class PipelineMultisampleStateCreateInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineMultisampleStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineMultisampleStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineMultisampleStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineMultisampleStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.rasterizationSamples && (this.rasterizationSamples = data.rasterizationSamples), void 0 !== data.sampleShadingEnable && (this.sampleShadingEnable = data.sampleShadingEnable), void 0 !== data.minSampleShading && (this.minSampleShading = data.minSampleShading), void 0 !== data.pSampleMask && (this.pSampleMask = data.pSampleMask), void 0 !== data.alphaToCoverageEnable && (this.alphaToCoverageEnable = data.alphaToCoverageEnable), void 0 !== data.alphaToOneEnable && (this.alphaToOneEnable = data.alphaToOneEnable); - this.sType = StructureType.PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rasterizationSamples() { - return this.#view.getUint32(20, LE); - } - set rasterizationSamples(value) { - this.#view.setUint32(20, Number(value), LE); - } - get sampleShadingEnable() { - return this.#view.getUint32(24, LE); - } - set sampleShadingEnable(value) { - this.#view.setUint32(24, Number(value), LE); - } - get minSampleShading() { - return this.#view.getFloat32(28, LE); - } - set minSampleShading(value) { - this.#view.setFloat32(28, Number(value), LE); - } - get pSampleMask() { - return this.#view.getBigUint64(32, LE); - } - set pSampleMask(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get alphaToCoverageEnable() { - return this.#view.getUint32(40, LE); - } - set alphaToCoverageEnable(value) { - this.#view.setUint32(40, Number(value), LE); - } - get alphaToOneEnable() { - return this.#view.getUint32(44, LE); - } - set alphaToOneEnable(value) { - this.#view.setUint32(44, Number(value), LE); - } -} -export class PipelineColorBlendAttachmentState { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineColorBlendAttachmentState.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorBlendAttachmentState.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineColorBlendAttachmentState.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineColorBlendAttachmentState.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.blendEnable && (this.blendEnable = data.blendEnable), void 0 !== data.srcColorBlendFactor && (this.srcColorBlendFactor = data.srcColorBlendFactor), void 0 !== data.dstColorBlendFactor && (this.dstColorBlendFactor = data.dstColorBlendFactor), void 0 !== data.colorBlendOp && (this.colorBlendOp = data.colorBlendOp), void 0 !== data.srcAlphaBlendFactor && (this.srcAlphaBlendFactor = data.srcAlphaBlendFactor), void 0 !== data.dstAlphaBlendFactor && (this.dstAlphaBlendFactor = data.dstAlphaBlendFactor), void 0 !== data.alphaBlendOp && (this.alphaBlendOp = data.alphaBlendOp), void 0 !== data.colorWriteMask && (this.colorWriteMask = data.colorWriteMask); - } - get blendEnable() { - return this.#view.getUint32(0, LE); - } - set blendEnable(value) { - this.#view.setUint32(0, Number(value), LE); - } - get srcColorBlendFactor() { - return this.#view.getUint32(4, LE); - } - set srcColorBlendFactor(value) { - this.#view.setUint32(4, Number(value), LE); - } - get dstColorBlendFactor() { - return this.#view.getUint32(8, LE); - } - set dstColorBlendFactor(value) { - this.#view.setUint32(8, Number(value), LE); - } - get colorBlendOp() { - return this.#view.getUint32(12, LE); - } - set colorBlendOp(value) { - this.#view.setUint32(12, Number(value), LE); - } - get srcAlphaBlendFactor() { - return this.#view.getUint32(16, LE); - } - set srcAlphaBlendFactor(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dstAlphaBlendFactor() { - return this.#view.getUint32(20, LE); - } - set dstAlphaBlendFactor(value) { - this.#view.setUint32(20, Number(value), LE); - } - get alphaBlendOp() { - return this.#view.getUint32(24, LE); - } - set alphaBlendOp(value) { - this.#view.setUint32(24, Number(value), LE); - } - get colorWriteMask() { - return this.#view.getUint32(28, LE); - } - set colorWriteMask(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PipelineColorBlendStateCreateInfo { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineColorBlendStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorBlendStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineColorBlendStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineColorBlendStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.logicOpEnable && (this.logicOpEnable = data.logicOpEnable), void 0 !== data.logicOp && (this.logicOp = data.logicOp), void 0 !== data.attachmentCount && (this.attachmentCount = data.attachmentCount), void 0 !== data.pAttachments && (this.pAttachments = data.pAttachments), void 0 !== data.blendConstants && (this.blendConstants = data.blendConstants); - this.sType = StructureType.PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get logicOpEnable() { - return this.#view.getUint32(20, LE); - } - set logicOpEnable(value) { - this.#view.setUint32(20, Number(value), LE); - } - get logicOp() { - return this.#view.getUint32(24, LE); - } - set logicOp(value) { - this.#view.setUint32(24, Number(value), LE); - } - get attachmentCount() { - return this.#view.getUint32(28, LE); - } - set attachmentCount(value) { - this.#view.setUint32(28, Number(value), LE); - } - get pAttachments() { - return this.#view.getBigUint64(32, LE); - } - set pAttachments(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get blendConstants() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 40, 4); - } - set blendConstants(value) { - this.#data.set(new Uint8Array(value.buffer), 40); - } -} -export class PipelineDynamicStateCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineDynamicStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineDynamicStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineDynamicStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineDynamicStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.dynamicStateCount && (this.dynamicStateCount = data.dynamicStateCount), void 0 !== data.pDynamicStates && (this.pDynamicStates = data.pDynamicStates); - this.sType = StructureType.PIPELINE_DYNAMIC_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dynamicStateCount() { - return this.#view.getUint32(20, LE); - } - set dynamicStateCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pDynamicStates() { - return this.#view.getBigUint64(24, LE); - } - set pDynamicStates(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class StencilOpState { - static size = 28; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StencilOpState.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StencilOpState.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StencilOpState.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StencilOpState.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.failOp && (this.failOp = data.failOp), void 0 !== data.passOp && (this.passOp = data.passOp), void 0 !== data.depthFailOp && (this.depthFailOp = data.depthFailOp), void 0 !== data.compareOp && (this.compareOp = data.compareOp), void 0 !== data.compareMask && (this.compareMask = data.compareMask), void 0 !== data.writeMask && (this.writeMask = data.writeMask), void 0 !== data.reference && (this.reference = data.reference); - } - get failOp() { - return this.#view.getUint32(0, LE); - } - set failOp(value) { - this.#view.setUint32(0, Number(value), LE); - } - get passOp() { - return this.#view.getUint32(4, LE); - } - set passOp(value) { - this.#view.setUint32(4, Number(value), LE); - } - get depthFailOp() { - return this.#view.getUint32(8, LE); - } - set depthFailOp(value) { - this.#view.setUint32(8, Number(value), LE); - } - get compareOp() { - return this.#view.getUint32(12, LE); - } - set compareOp(value) { - this.#view.setUint32(12, Number(value), LE); - } - get compareMask() { - return this.#view.getUint32(16, LE); - } - set compareMask(value) { - this.#view.setUint32(16, Number(value), LE); - } - get writeMask() { - return this.#view.getUint32(20, LE); - } - set writeMask(value) { - this.#view.setUint32(20, Number(value), LE); - } - get reference() { - return this.#view.getUint32(24, LE); - } - set reference(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PipelineDepthStencilStateCreateInfo { - static size = 104; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineDepthStencilStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineDepthStencilStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineDepthStencilStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineDepthStencilStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.depthTestEnable && (this.depthTestEnable = data.depthTestEnable), void 0 !== data.depthWriteEnable && (this.depthWriteEnable = data.depthWriteEnable), void 0 !== data.depthCompareOp && (this.depthCompareOp = data.depthCompareOp), void 0 !== data.depthBoundsTestEnable && (this.depthBoundsTestEnable = data.depthBoundsTestEnable), void 0 !== data.stencilTestEnable && (this.stencilTestEnable = data.stencilTestEnable), void 0 !== data.front && (this.front = data.front), void 0 !== data.back && (this.back = data.back), void 0 !== data.minDepthBounds && (this.minDepthBounds = data.minDepthBounds), void 0 !== data.maxDepthBounds && (this.maxDepthBounds = data.maxDepthBounds); - this.sType = StructureType.PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get depthTestEnable() { - return this.#view.getUint32(20, LE); - } - set depthTestEnable(value) { - this.#view.setUint32(20, Number(value), LE); - } - get depthWriteEnable() { - return this.#view.getUint32(24, LE); - } - set depthWriteEnable(value) { - this.#view.setUint32(24, Number(value), LE); - } - get depthCompareOp() { - return this.#view.getUint32(28, LE); - } - set depthCompareOp(value) { - this.#view.setUint32(28, Number(value), LE); - } - get depthBoundsTestEnable() { - return this.#view.getUint32(32, LE); - } - set depthBoundsTestEnable(value) { - this.#view.setUint32(32, Number(value), LE); - } - get stencilTestEnable() { - return this.#view.getUint32(36, LE); - } - set stencilTestEnable(value) { - this.#view.setUint32(36, Number(value), LE); - } - get front() { - return new StencilOpState(this.#data.subarray(40, 40 + StencilOpState.size)); - } - set front(value) { - if (value[BUFFER].byteLength < StencilOpState.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } - get back() { - return new StencilOpState(this.#data.subarray(68, 68 + StencilOpState.size)); - } - set back(value) { - if (value[BUFFER].byteLength < StencilOpState.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 68); - } - get minDepthBounds() { - return this.#view.getFloat32(96, LE); - } - set minDepthBounds(value) { - this.#view.setFloat32(96, Number(value), LE); - } - get maxDepthBounds() { - return this.#view.getFloat32(100, LE); - } - set maxDepthBounds(value) { - this.#view.setFloat32(100, Number(value), LE); - } -} -export class GraphicsPipelineCreateInfo { - static size = 144; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GraphicsPipelineCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsPipelineCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GraphicsPipelineCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GraphicsPipelineCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.stageCount && (this.stageCount = data.stageCount), void 0 !== data.pStages && (this.pStages = data.pStages), void 0 !== data.pVertexInputState && (this.pVertexInputState = data.pVertexInputState), void 0 !== data.pInputAssemblyState && (this.pInputAssemblyState = data.pInputAssemblyState), void 0 !== data.pTessellationState && (this.pTessellationState = data.pTessellationState), void 0 !== data.pViewportState && (this.pViewportState = data.pViewportState), void 0 !== data.pRasterizationState && (this.pRasterizationState = data.pRasterizationState), void 0 !== data.pMultisampleState && (this.pMultisampleState = data.pMultisampleState), void 0 !== data.pDepthStencilState && (this.pDepthStencilState = data.pDepthStencilState), void 0 !== data.pColorBlendState && (this.pColorBlendState = data.pColorBlendState), void 0 !== data.pDynamicState && (this.pDynamicState = data.pDynamicState), void 0 !== data.layout && (this.layout = data.layout), void 0 !== data.renderPass && (this.renderPass = data.renderPass), void 0 !== data.subpass && (this.subpass = data.subpass), void 0 !== data.basePipelineHandle && (this.basePipelineHandle = data.basePipelineHandle), void 0 !== data.basePipelineIndex && (this.basePipelineIndex = data.basePipelineIndex); - this.sType = StructureType.GRAPHICS_PIPELINE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stageCount() { - return this.#view.getUint32(20, LE); - } - set stageCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pStages() { - return this.#view.getBigUint64(24, LE); - } - set pStages(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pVertexInputState() { - return this.#view.getBigUint64(32, LE); - } - set pVertexInputState(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get pInputAssemblyState() { - return this.#view.getBigUint64(40, LE); - } - set pInputAssemblyState(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get pTessellationState() { - return this.#view.getBigUint64(48, LE); - } - set pTessellationState(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get pViewportState() { - return this.#view.getBigUint64(56, LE); - } - set pViewportState(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get pRasterizationState() { - return this.#view.getBigUint64(64, LE); - } - set pRasterizationState(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - get pMultisampleState() { - return this.#view.getBigUint64(72, LE); - } - set pMultisampleState(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - get pDepthStencilState() { - return this.#view.getBigUint64(80, LE); - } - set pDepthStencilState(value) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } - get pColorBlendState() { - return this.#view.getBigUint64(88, LE); - } - set pColorBlendState(value) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } - get pDynamicState() { - return this.#view.getBigUint64(96, LE); - } - set pDynamicState(value) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } - get layout() { - return this.#view.getBigUint64(104, LE); - } - set layout(value) { - this.#view.setBigUint64(104, BigInt(anyPointer(value)), LE); - } - get renderPass() { - return this.#view.getBigUint64(112, LE); - } - set renderPass(value) { - this.#view.setBigUint64(112, BigInt(anyPointer(value)), LE); - } - get subpass() { - return this.#view.getUint32(120, LE); - } - set subpass(value) { - this.#view.setUint32(120, Number(value), LE); - } - get basePipelineHandle() { - return this.#view.getBigUint64(128, LE); - } - set basePipelineHandle(value) { - this.#view.setBigUint64(128, BigInt(anyPointer(value)), LE); - } - get basePipelineIndex() { - return this.#view.getInt32(136, LE); - } - set basePipelineIndex(value) { - this.#view.setInt32(136, Number(value), LE); - } -} -export class PipelineCacheCreateInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineCacheCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCacheCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCacheCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineCacheCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.initialDataSize && (this.initialDataSize = data.initialDataSize), void 0 !== data.pInitialData && (this.pInitialData = data.pInitialData); - this.sType = StructureType.PIPELINE_CACHE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get initialDataSize() { - return this.#view.getBigUint64(24, LE); - } - set initialDataSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get pInitialData() { - return this.#view.getBigUint64(32, LE); - } - set pInitialData(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class PipelineCacheHeaderVersionOne { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineCacheHeaderVersionOne.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCacheHeaderVersionOne.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCacheHeaderVersionOne.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineCacheHeaderVersionOne.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.headerSize && (this.headerSize = data.headerSize), void 0 !== data.headerVersion && (this.headerVersion = data.headerVersion), void 0 !== data.vendorID && (this.vendorID = data.vendorID), void 0 !== data.deviceID && (this.deviceID = data.deviceID), void 0 !== data.pipelineCacheUUID && (this.pipelineCacheUUID = data.pipelineCacheUUID); - } - get headerSize() { - return this.#view.getUint32(0, LE); - } - set headerSize(value) { - this.#view.setUint32(0, Number(value), LE); - } - get headerVersion() { - return this.#view.getUint32(4, LE); - } - set headerVersion(value) { - this.#view.setUint32(4, Number(value), LE); - } - get vendorID() { - return this.#view.getUint32(8, LE); - } - set vendorID(value) { - this.#view.setUint32(8, Number(value), LE); - } - get deviceID() { - return this.#view.getUint32(12, LE); - } - set deviceID(value) { - this.#view.setUint32(12, Number(value), LE); - } - get pipelineCacheUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - set pipelineCacheUUID(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } -} -export class PushConstantRange { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PushConstantRange.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PushConstantRange.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PushConstantRange.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PushConstantRange.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.stageFlags && (this.stageFlags = data.stageFlags), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.size && (this.size = data.size); - } - get stageFlags() { - return this.#view.getUint32(0, LE); - } - set stageFlags(value) { - this.#view.setUint32(0, Number(value), LE); - } - get offset() { - return this.#view.getUint32(4, LE); - } - set offset(value) { - this.#view.setUint32(4, Number(value), LE); - } - get size() { - return this.#view.getUint32(8, LE); - } - set size(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class PipelineLayoutCreateInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineLayoutCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineLayoutCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineLayoutCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineLayoutCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.setLayoutCount && (this.setLayoutCount = data.setLayoutCount), void 0 !== data.pSetLayouts && (this.pSetLayouts = data.pSetLayouts), void 0 !== data.pushConstantRangeCount && (this.pushConstantRangeCount = data.pushConstantRangeCount), void 0 !== data.pPushConstantRanges && (this.pPushConstantRanges = data.pPushConstantRanges); - this.sType = StructureType.PIPELINE_LAYOUT_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get setLayoutCount() { - return this.#view.getUint32(20, LE); - } - set setLayoutCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pSetLayouts() { - return this.#view.getBigUint64(24, LE); - } - set pSetLayouts(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pushConstantRangeCount() { - return this.#view.getUint32(32, LE); - } - set pushConstantRangeCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pPushConstantRanges() { - return this.#view.getBigUint64(40, LE); - } - set pPushConstantRanges(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class SamplerCreateInfo { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SamplerCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SamplerCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.magFilter && (this.magFilter = data.magFilter), void 0 !== data.minFilter && (this.minFilter = data.minFilter), void 0 !== data.mipmapMode && (this.mipmapMode = data.mipmapMode), void 0 !== data.addressModeU && (this.addressModeU = data.addressModeU), void 0 !== data.addressModeV && (this.addressModeV = data.addressModeV), void 0 !== data.addressModeW && (this.addressModeW = data.addressModeW), void 0 !== data.mipLodBias && (this.mipLodBias = data.mipLodBias), void 0 !== data.anisotropyEnable && (this.anisotropyEnable = data.anisotropyEnable), void 0 !== data.maxAnisotropy && (this.maxAnisotropy = data.maxAnisotropy), void 0 !== data.compareEnable && (this.compareEnable = data.compareEnable), void 0 !== data.compareOp && (this.compareOp = data.compareOp), void 0 !== data.minLod && (this.minLod = data.minLod), void 0 !== data.maxLod && (this.maxLod = data.maxLod), void 0 !== data.borderColor && (this.borderColor = data.borderColor), void 0 !== data.unnormalizedCoordinates && (this.unnormalizedCoordinates = data.unnormalizedCoordinates); - this.sType = StructureType.SAMPLER_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get magFilter() { - return this.#view.getUint32(20, LE); - } - set magFilter(value) { - this.#view.setUint32(20, Number(value), LE); - } - get minFilter() { - return this.#view.getUint32(24, LE); - } - set minFilter(value) { - this.#view.setUint32(24, Number(value), LE); - } - get mipmapMode() { - return this.#view.getUint32(28, LE); - } - set mipmapMode(value) { - this.#view.setUint32(28, Number(value), LE); - } - get addressModeU() { - return this.#view.getUint32(32, LE); - } - set addressModeU(value) { - this.#view.setUint32(32, Number(value), LE); - } - get addressModeV() { - return this.#view.getUint32(36, LE); - } - set addressModeV(value) { - this.#view.setUint32(36, Number(value), LE); - } - get addressModeW() { - return this.#view.getUint32(40, LE); - } - set addressModeW(value) { - this.#view.setUint32(40, Number(value), LE); - } - get mipLodBias() { - return this.#view.getFloat32(44, LE); - } - set mipLodBias(value) { - this.#view.setFloat32(44, Number(value), LE); - } - get anisotropyEnable() { - return this.#view.getUint32(48, LE); - } - set anisotropyEnable(value) { - this.#view.setUint32(48, Number(value), LE); - } - get maxAnisotropy() { - return this.#view.getFloat32(52, LE); - } - set maxAnisotropy(value) { - this.#view.setFloat32(52, Number(value), LE); - } - get compareEnable() { - return this.#view.getUint32(56, LE); - } - set compareEnable(value) { - this.#view.setUint32(56, Number(value), LE); - } - get compareOp() { - return this.#view.getUint32(60, LE); - } - set compareOp(value) { - this.#view.setUint32(60, Number(value), LE); - } - get minLod() { - return this.#view.getFloat32(64, LE); - } - set minLod(value) { - this.#view.setFloat32(64, Number(value), LE); - } - get maxLod() { - return this.#view.getFloat32(68, LE); - } - set maxLod(value) { - this.#view.setFloat32(68, Number(value), LE); - } - get borderColor() { - return this.#view.getUint32(72, LE); - } - set borderColor(value) { - this.#view.setUint32(72, Number(value), LE); - } - get unnormalizedCoordinates() { - return this.#view.getUint32(76, LE); - } - set unnormalizedCoordinates(value) { - this.#view.setUint32(76, Number(value), LE); - } -} -export class CommandPoolCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CommandPoolCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandPoolCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CommandPoolCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CommandPoolCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.queueFamilyIndex && (this.queueFamilyIndex = data.queueFamilyIndex); - this.sType = StructureType.COMMAND_POOL_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get queueFamilyIndex() { - return this.#view.getUint32(20, LE); - } - set queueFamilyIndex(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class CommandBufferAllocateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CommandBufferAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferAllocateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferAllocateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CommandBufferAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.commandPool && (this.commandPool = data.commandPool), void 0 !== data.level && (this.level = data.level), void 0 !== data.commandBufferCount && (this.commandBufferCount = data.commandBufferCount); - this.sType = StructureType.COMMAND_BUFFER_ALLOCATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get commandPool() { - return this.#view.getBigUint64(16, LE); - } - set commandPool(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get level() { - return this.#view.getUint32(24, LE); - } - set level(value) { - this.#view.setUint32(24, Number(value), LE); - } - get commandBufferCount() { - return this.#view.getUint32(28, LE); - } - set commandBufferCount(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class CommandBufferInheritanceInfo { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CommandBufferInheritanceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CommandBufferInheritanceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.renderPass && (this.renderPass = data.renderPass), void 0 !== data.subpass && (this.subpass = data.subpass), void 0 !== data.framebuffer && (this.framebuffer = data.framebuffer), void 0 !== data.occlusionQueryEnable && (this.occlusionQueryEnable = data.occlusionQueryEnable), void 0 !== data.queryFlags && (this.queryFlags = data.queryFlags), void 0 !== data.pipelineStatistics && (this.pipelineStatistics = data.pipelineStatistics); - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get renderPass() { - return this.#view.getBigUint64(16, LE); - } - set renderPass(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get subpass() { - return this.#view.getUint32(24, LE); - } - set subpass(value) { - this.#view.setUint32(24, Number(value), LE); - } - get framebuffer() { - return this.#view.getBigUint64(32, LE); - } - set framebuffer(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get occlusionQueryEnable() { - return this.#view.getUint32(40, LE); - } - set occlusionQueryEnable(value) { - this.#view.setUint32(40, Number(value), LE); - } - get queryFlags() { - return this.#view.getUint32(44, LE); - } - set queryFlags(value) { - this.#view.setUint32(44, Number(value), LE); - } - get pipelineStatistics() { - return this.#view.getUint32(48, LE); - } - set pipelineStatistics(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class CommandBufferBeginInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CommandBufferBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferBeginInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferBeginInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CommandBufferBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pInheritanceInfo && (this.pInheritanceInfo = data.pInheritanceInfo); - this.sType = StructureType.COMMAND_BUFFER_BEGIN_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pInheritanceInfo() { - return this.#view.getBigUint64(24, LE); - } - set pInheritanceInfo(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class RenderPassBeginInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassBeginInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassBeginInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.renderPass && (this.renderPass = data.renderPass), void 0 !== data.framebuffer && (this.framebuffer = data.framebuffer), void 0 !== data.renderArea && (this.renderArea = data.renderArea), void 0 !== data.clearValueCount && (this.clearValueCount = data.clearValueCount), void 0 !== data.pClearValues && (this.pClearValues = data.pClearValues); - this.sType = StructureType.RENDER_PASS_BEGIN_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get renderPass() { - return this.#view.getBigUint64(16, LE); - } - set renderPass(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get framebuffer() { - return this.#view.getBigUint64(24, LE); - } - set framebuffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get renderArea() { - return new Rect2D(this.#data.subarray(32, 32 + Rect2D.size)); - } - set renderArea(value) { - if (value[BUFFER].byteLength < Rect2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get clearValueCount() { - return this.#view.getUint32(48, LE); - } - set clearValueCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pClearValues() { - return this.#view.getBigUint64(56, LE); - } - set pClearValues(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class ClearDepthStencilValue { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ClearDepthStencilValue.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ClearDepthStencilValue.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ClearDepthStencilValue.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ClearDepthStencilValue.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.depth && (this.depth = data.depth), void 0 !== data.stencil && (this.stencil = data.stencil); - } - get depth() { - return this.#view.getFloat32(0, LE); - } - set depth(value) { - this.#view.setFloat32(0, Number(value), LE); - } - get stencil() { - return this.#view.getUint32(4, LE); - } - set stencil(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class ClearAttachment { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ClearAttachment.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ClearAttachment.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ClearAttachment.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ClearAttachment.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.aspectMask && (this.aspectMask = data.aspectMask), void 0 !== data.colorAttachment && (this.colorAttachment = data.colorAttachment), void 0 !== data.clearValue && (this.clearValue = data.clearValue); - } - get aspectMask() { - return this.#view.getUint32(0, LE); - } - set aspectMask(value) { - this.#view.setUint32(0, Number(value), LE); - } - get colorAttachment() { - return this.#view.getUint32(4, LE); - } - set colorAttachment(value) { - this.#view.setUint32(4, Number(value), LE); - } - get clearValue() { - throw new Error('Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}'); - } - set clearValue(value) { - throw new Error('Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}'); - } -} -export class AttachmentDescription { - static size = 36; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AttachmentDescription.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentDescription.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentDescription.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AttachmentDescription.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.format && (this.format = data.format), void 0 !== data.samples && (this.samples = data.samples), void 0 !== data.loadOp && (this.loadOp = data.loadOp), void 0 !== data.storeOp && (this.storeOp = data.storeOp), void 0 !== data.stencilLoadOp && (this.stencilLoadOp = data.stencilLoadOp), void 0 !== data.stencilStoreOp && (this.stencilStoreOp = data.stencilStoreOp), void 0 !== data.initialLayout && (this.initialLayout = data.initialLayout), void 0 !== data.finalLayout && (this.finalLayout = data.finalLayout); - } - get flags() { - return this.#view.getUint32(0, LE); - } - set flags(value) { - this.#view.setUint32(0, Number(value), LE); - } - get format() { - return this.#view.getUint32(4, LE); - } - set format(value) { - this.#view.setUint32(4, Number(value), LE); - } - get samples() { - return this.#view.getUint32(8, LE); - } - set samples(value) { - this.#view.setUint32(8, Number(value), LE); - } - get loadOp() { - return this.#view.getUint32(12, LE); - } - set loadOp(value) { - this.#view.setUint32(12, Number(value), LE); - } - get storeOp() { - return this.#view.getUint32(16, LE); - } - set storeOp(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stencilLoadOp() { - return this.#view.getUint32(20, LE); - } - set stencilLoadOp(value) { - this.#view.setUint32(20, Number(value), LE); - } - get stencilStoreOp() { - return this.#view.getUint32(24, LE); - } - set stencilStoreOp(value) { - this.#view.setUint32(24, Number(value), LE); - } - get initialLayout() { - return this.#view.getUint32(28, LE); - } - set initialLayout(value) { - this.#view.setUint32(28, Number(value), LE); - } - get finalLayout() { - return this.#view.getUint32(32, LE); - } - set finalLayout(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class AttachmentReference { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AttachmentReference.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentReference.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentReference.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AttachmentReference.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.attachment && (this.attachment = data.attachment), void 0 !== data.layout && (this.layout = data.layout); - } - get attachment() { - return this.#view.getUint32(0, LE); - } - set attachment(value) { - this.#view.setUint32(0, Number(value), LE); - } - get layout() { - return this.#view.getUint32(4, LE); - } - set layout(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class SubpassDescription { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassDescription.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDescription.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDescription.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassDescription.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pipelineBindPoint && (this.pipelineBindPoint = data.pipelineBindPoint), void 0 !== data.inputAttachmentCount && (this.inputAttachmentCount = data.inputAttachmentCount), void 0 !== data.pInputAttachments && (this.pInputAttachments = data.pInputAttachments), void 0 !== data.colorAttachmentCount && (this.colorAttachmentCount = data.colorAttachmentCount), void 0 !== data.pColorAttachments && (this.pColorAttachments = data.pColorAttachments), void 0 !== data.pResolveAttachments && (this.pResolveAttachments = data.pResolveAttachments), void 0 !== data.pDepthStencilAttachment && (this.pDepthStencilAttachment = data.pDepthStencilAttachment), void 0 !== data.preserveAttachmentCount && (this.preserveAttachmentCount = data.preserveAttachmentCount), void 0 !== data.pPreserveAttachments && (this.pPreserveAttachments = data.pPreserveAttachments); - } - get flags() { - return this.#view.getUint32(0, LE); - } - set flags(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pipelineBindPoint() { - return this.#view.getUint32(4, LE); - } - set pipelineBindPoint(value) { - this.#view.setUint32(4, Number(value), LE); - } - get inputAttachmentCount() { - return this.#view.getUint32(8, LE); - } - set inputAttachmentCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get pInputAttachments() { - return this.#view.getBigUint64(16, LE); - } - set pInputAttachments(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get colorAttachmentCount() { - return this.#view.getUint32(24, LE); - } - set colorAttachmentCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pColorAttachments() { - return this.#view.getBigUint64(32, LE); - } - set pColorAttachments(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get pResolveAttachments() { - return this.#view.getBigUint64(40, LE); - } - set pResolveAttachments(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get pDepthStencilAttachment() { - return this.#view.getBigUint64(48, LE); - } - set pDepthStencilAttachment(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get preserveAttachmentCount() { - return this.#view.getUint32(56, LE); - } - set preserveAttachmentCount(value) { - this.#view.setUint32(56, Number(value), LE); - } - get pPreserveAttachments() { - return this.#view.getBigUint64(64, LE); - } - set pPreserveAttachments(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} -export class SubpassDependency { - static size = 28; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassDependency.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDependency.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDependency.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassDependency.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.srcSubpass && (this.srcSubpass = data.srcSubpass), void 0 !== data.dstSubpass && (this.dstSubpass = data.dstSubpass), void 0 !== data.srcStageMask && (this.srcStageMask = data.srcStageMask), void 0 !== data.dstStageMask && (this.dstStageMask = data.dstStageMask), void 0 !== data.srcAccessMask && (this.srcAccessMask = data.srcAccessMask), void 0 !== data.dstAccessMask && (this.dstAccessMask = data.dstAccessMask), void 0 !== data.dependencyFlags && (this.dependencyFlags = data.dependencyFlags); - } - get srcSubpass() { - return this.#view.getUint32(0, LE); - } - set srcSubpass(value) { - this.#view.setUint32(0, Number(value), LE); - } - get dstSubpass() { - return this.#view.getUint32(4, LE); - } - set dstSubpass(value) { - this.#view.setUint32(4, Number(value), LE); - } - get srcStageMask() { - return this.#view.getUint32(8, LE); - } - set srcStageMask(value) { - this.#view.setUint32(8, Number(value), LE); - } - get dstStageMask() { - return this.#view.getUint32(12, LE); - } - set dstStageMask(value) { - this.#view.setUint32(12, Number(value), LE); - } - get srcAccessMask() { - return this.#view.getUint32(16, LE); - } - set srcAccessMask(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dstAccessMask() { - return this.#view.getUint32(20, LE); - } - set dstAccessMask(value) { - this.#view.setUint32(20, Number(value), LE); - } - get dependencyFlags() { - return this.#view.getUint32(24, LE); - } - set dependencyFlags(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class RenderPassCreateInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.attachmentCount && (this.attachmentCount = data.attachmentCount), void 0 !== data.pAttachments && (this.pAttachments = data.pAttachments), void 0 !== data.subpassCount && (this.subpassCount = data.subpassCount), void 0 !== data.pSubpasses && (this.pSubpasses = data.pSubpasses), void 0 !== data.dependencyCount && (this.dependencyCount = data.dependencyCount), void 0 !== data.pDependencies && (this.pDependencies = data.pDependencies); - this.sType = StructureType.RENDER_PASS_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get attachmentCount() { - return this.#view.getUint32(20, LE); - } - set attachmentCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pAttachments() { - return this.#view.getBigUint64(24, LE); - } - set pAttachments(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get subpassCount() { - return this.#view.getUint32(32, LE); - } - set subpassCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pSubpasses() { - return this.#view.getBigUint64(40, LE); - } - set pSubpasses(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get dependencyCount() { - return this.#view.getUint32(48, LE); - } - set dependencyCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pDependencies() { - return this.#view.getBigUint64(56, LE); - } - set pDependencies(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class EventCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(EventCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, EventCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < EventCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(EventCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.EVENT_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class FenceCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FenceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FenceCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FenceCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FenceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.FENCE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceFeatures { - static size = 220; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.robustBufferAccess && (this.robustBufferAccess = data.robustBufferAccess), void 0 !== data.fullDrawIndexUint32 && (this.fullDrawIndexUint32 = data.fullDrawIndexUint32), void 0 !== data.imageCubeArray && (this.imageCubeArray = data.imageCubeArray), void 0 !== data.independentBlend && (this.independentBlend = data.independentBlend), void 0 !== data.geometryShader && (this.geometryShader = data.geometryShader), void 0 !== data.tessellationShader && (this.tessellationShader = data.tessellationShader), void 0 !== data.sampleRateShading && (this.sampleRateShading = data.sampleRateShading), void 0 !== data.dualSrcBlend && (this.dualSrcBlend = data.dualSrcBlend), void 0 !== data.logicOp && (this.logicOp = data.logicOp), void 0 !== data.multiDrawIndirect && (this.multiDrawIndirect = data.multiDrawIndirect), void 0 !== data.drawIndirectFirstInstance && (this.drawIndirectFirstInstance = data.drawIndirectFirstInstance), void 0 !== data.depthClamp && (this.depthClamp = data.depthClamp), void 0 !== data.depthBiasClamp && (this.depthBiasClamp = data.depthBiasClamp), void 0 !== data.fillModeNonSolid && (this.fillModeNonSolid = data.fillModeNonSolid), void 0 !== data.depthBounds && (this.depthBounds = data.depthBounds), void 0 !== data.wideLines && (this.wideLines = data.wideLines), void 0 !== data.largePoints && (this.largePoints = data.largePoints), void 0 !== data.alphaToOne && (this.alphaToOne = data.alphaToOne), void 0 !== data.multiViewport && (this.multiViewport = data.multiViewport), void 0 !== data.samplerAnisotropy && (this.samplerAnisotropy = data.samplerAnisotropy), void 0 !== data.textureCompressionETC2 && (this.textureCompressionETC2 = data.textureCompressionETC2), void 0 !== data.textureCompressionASTC_LDR && (this.textureCompressionASTC_LDR = data.textureCompressionASTC_LDR), void 0 !== data.textureCompressionBC && (this.textureCompressionBC = data.textureCompressionBC), void 0 !== data.occlusionQueryPrecise && (this.occlusionQueryPrecise = data.occlusionQueryPrecise), void 0 !== data.pipelineStatisticsQuery && (this.pipelineStatisticsQuery = data.pipelineStatisticsQuery), void 0 !== data.vertexPipelineStoresAndAtomics && (this.vertexPipelineStoresAndAtomics = data.vertexPipelineStoresAndAtomics), void 0 !== data.fragmentStoresAndAtomics && (this.fragmentStoresAndAtomics = data.fragmentStoresAndAtomics), void 0 !== data.shaderTessellationAndGeometryPointSize && (this.shaderTessellationAndGeometryPointSize = data.shaderTessellationAndGeometryPointSize), void 0 !== data.shaderImageGatherExtended && (this.shaderImageGatherExtended = data.shaderImageGatherExtended), void 0 !== data.shaderStorageImageExtendedFormats && (this.shaderStorageImageExtendedFormats = data.shaderStorageImageExtendedFormats), void 0 !== data.shaderStorageImageMultisample && (this.shaderStorageImageMultisample = data.shaderStorageImageMultisample), void 0 !== data.shaderStorageImageReadWithoutFormat && (this.shaderStorageImageReadWithoutFormat = data.shaderStorageImageReadWithoutFormat), void 0 !== data.shaderStorageImageWriteWithoutFormat && (this.shaderStorageImageWriteWithoutFormat = data.shaderStorageImageWriteWithoutFormat), void 0 !== data.shaderUniformBufferArrayDynamicIndexing && (this.shaderUniformBufferArrayDynamicIndexing = data.shaderUniformBufferArrayDynamicIndexing), void 0 !== data.shaderSampledImageArrayDynamicIndexing && (this.shaderSampledImageArrayDynamicIndexing = data.shaderSampledImageArrayDynamicIndexing), void 0 !== data.shaderStorageBufferArrayDynamicIndexing && (this.shaderStorageBufferArrayDynamicIndexing = data.shaderStorageBufferArrayDynamicIndexing), void 0 !== data.shaderStorageImageArrayDynamicIndexing && (this.shaderStorageImageArrayDynamicIndexing = data.shaderStorageImageArrayDynamicIndexing), void 0 !== data.shaderClipDistance && (this.shaderClipDistance = data.shaderClipDistance), void 0 !== data.shaderCullDistance && (this.shaderCullDistance = data.shaderCullDistance), void 0 !== data.shaderFloat64 && (this.shaderFloat64 = data.shaderFloat64), void 0 !== data.shaderInt64 && (this.shaderInt64 = data.shaderInt64), void 0 !== data.shaderInt16 && (this.shaderInt16 = data.shaderInt16), void 0 !== data.shaderResourceResidency && (this.shaderResourceResidency = data.shaderResourceResidency), void 0 !== data.shaderResourceMinLod && (this.shaderResourceMinLod = data.shaderResourceMinLod), void 0 !== data.sparseBinding && (this.sparseBinding = data.sparseBinding), void 0 !== data.sparseResidencyBuffer && (this.sparseResidencyBuffer = data.sparseResidencyBuffer), void 0 !== data.sparseResidencyImage2D && (this.sparseResidencyImage2D = data.sparseResidencyImage2D), void 0 !== data.sparseResidencyImage3D && (this.sparseResidencyImage3D = data.sparseResidencyImage3D), void 0 !== data.sparseResidency2Samples && (this.sparseResidency2Samples = data.sparseResidency2Samples), void 0 !== data.sparseResidency4Samples && (this.sparseResidency4Samples = data.sparseResidency4Samples), void 0 !== data.sparseResidency8Samples && (this.sparseResidency8Samples = data.sparseResidency8Samples), void 0 !== data.sparseResidency16Samples && (this.sparseResidency16Samples = data.sparseResidency16Samples), void 0 !== data.sparseResidencyAliased && (this.sparseResidencyAliased = data.sparseResidencyAliased), void 0 !== data.variableMultisampleRate && (this.variableMultisampleRate = data.variableMultisampleRate), void 0 !== data.inheritedQueries && (this.inheritedQueries = data.inheritedQueries); - } - get robustBufferAccess() { - return this.#view.getUint32(0, LE); - } - set robustBufferAccess(value) { - this.#view.setUint32(0, Number(value), LE); - } - get fullDrawIndexUint32() { - return this.#view.getUint32(4, LE); - } - set fullDrawIndexUint32(value) { - this.#view.setUint32(4, Number(value), LE); - } - get imageCubeArray() { - return this.#view.getUint32(8, LE); - } - set imageCubeArray(value) { - this.#view.setUint32(8, Number(value), LE); - } - get independentBlend() { - return this.#view.getUint32(12, LE); - } - set independentBlend(value) { - this.#view.setUint32(12, Number(value), LE); - } - get geometryShader() { - return this.#view.getUint32(16, LE); - } - set geometryShader(value) { - this.#view.setUint32(16, Number(value), LE); - } - get tessellationShader() { - return this.#view.getUint32(20, LE); - } - set tessellationShader(value) { - this.#view.setUint32(20, Number(value), LE); - } - get sampleRateShading() { - return this.#view.getUint32(24, LE); - } - set sampleRateShading(value) { - this.#view.setUint32(24, Number(value), LE); - } - get dualSrcBlend() { - return this.#view.getUint32(28, LE); - } - set dualSrcBlend(value) { - this.#view.setUint32(28, Number(value), LE); - } - get logicOp() { - return this.#view.getUint32(32, LE); - } - set logicOp(value) { - this.#view.setUint32(32, Number(value), LE); - } - get multiDrawIndirect() { - return this.#view.getUint32(36, LE); - } - set multiDrawIndirect(value) { - this.#view.setUint32(36, Number(value), LE); - } - get drawIndirectFirstInstance() { - return this.#view.getUint32(40, LE); - } - set drawIndirectFirstInstance(value) { - this.#view.setUint32(40, Number(value), LE); - } - get depthClamp() { - return this.#view.getUint32(44, LE); - } - set depthClamp(value) { - this.#view.setUint32(44, Number(value), LE); - } - get depthBiasClamp() { - return this.#view.getUint32(48, LE); - } - set depthBiasClamp(value) { - this.#view.setUint32(48, Number(value), LE); - } - get fillModeNonSolid() { - return this.#view.getUint32(52, LE); - } - set fillModeNonSolid(value) { - this.#view.setUint32(52, Number(value), LE); - } - get depthBounds() { - return this.#view.getUint32(56, LE); - } - set depthBounds(value) { - this.#view.setUint32(56, Number(value), LE); - } - get wideLines() { - return this.#view.getUint32(60, LE); - } - set wideLines(value) { - this.#view.setUint32(60, Number(value), LE); - } - get largePoints() { - return this.#view.getUint32(64, LE); - } - set largePoints(value) { - this.#view.setUint32(64, Number(value), LE); - } - get alphaToOne() { - return this.#view.getUint32(68, LE); - } - set alphaToOne(value) { - this.#view.setUint32(68, Number(value), LE); - } - get multiViewport() { - return this.#view.getUint32(72, LE); - } - set multiViewport(value) { - this.#view.setUint32(72, Number(value), LE); - } - get samplerAnisotropy() { - return this.#view.getUint32(76, LE); - } - set samplerAnisotropy(value) { - this.#view.setUint32(76, Number(value), LE); - } - get textureCompressionETC2() { - return this.#view.getUint32(80, LE); - } - set textureCompressionETC2(value) { - this.#view.setUint32(80, Number(value), LE); - } - get textureCompressionASTC_LDR() { - return this.#view.getUint32(84, LE); - } - set textureCompressionASTC_LDR(value) { - this.#view.setUint32(84, Number(value), LE); - } - get textureCompressionBC() { - return this.#view.getUint32(88, LE); - } - set textureCompressionBC(value) { - this.#view.setUint32(88, Number(value), LE); - } - get occlusionQueryPrecise() { - return this.#view.getUint32(92, LE); - } - set occlusionQueryPrecise(value) { - this.#view.setUint32(92, Number(value), LE); - } - get pipelineStatisticsQuery() { - return this.#view.getUint32(96, LE); - } - set pipelineStatisticsQuery(value) { - this.#view.setUint32(96, Number(value), LE); - } - get vertexPipelineStoresAndAtomics() { - return this.#view.getUint32(100, LE); - } - set vertexPipelineStoresAndAtomics(value) { - this.#view.setUint32(100, Number(value), LE); - } - get fragmentStoresAndAtomics() { - return this.#view.getUint32(104, LE); - } - set fragmentStoresAndAtomics(value) { - this.#view.setUint32(104, Number(value), LE); - } - get shaderTessellationAndGeometryPointSize() { - return this.#view.getUint32(108, LE); - } - set shaderTessellationAndGeometryPointSize(value) { - this.#view.setUint32(108, Number(value), LE); - } - get shaderImageGatherExtended() { - return this.#view.getUint32(112, LE); - } - set shaderImageGatherExtended(value) { - this.#view.setUint32(112, Number(value), LE); - } - get shaderStorageImageExtendedFormats() { - return this.#view.getUint32(116, LE); - } - set shaderStorageImageExtendedFormats(value) { - this.#view.setUint32(116, Number(value), LE); - } - get shaderStorageImageMultisample() { - return this.#view.getUint32(120, LE); - } - set shaderStorageImageMultisample(value) { - this.#view.setUint32(120, Number(value), LE); - } - get shaderStorageImageReadWithoutFormat() { - return this.#view.getUint32(124, LE); - } - set shaderStorageImageReadWithoutFormat(value) { - this.#view.setUint32(124, Number(value), LE); - } - get shaderStorageImageWriteWithoutFormat() { - return this.#view.getUint32(128, LE); - } - set shaderStorageImageWriteWithoutFormat(value) { - this.#view.setUint32(128, Number(value), LE); - } - get shaderUniformBufferArrayDynamicIndexing() { - return this.#view.getUint32(132, LE); - } - set shaderUniformBufferArrayDynamicIndexing(value) { - this.#view.setUint32(132, Number(value), LE); - } - get shaderSampledImageArrayDynamicIndexing() { - return this.#view.getUint32(136, LE); - } - set shaderSampledImageArrayDynamicIndexing(value) { - this.#view.setUint32(136, Number(value), LE); - } - get shaderStorageBufferArrayDynamicIndexing() { - return this.#view.getUint32(140, LE); - } - set shaderStorageBufferArrayDynamicIndexing(value) { - this.#view.setUint32(140, Number(value), LE); - } - get shaderStorageImageArrayDynamicIndexing() { - return this.#view.getUint32(144, LE); - } - set shaderStorageImageArrayDynamicIndexing(value) { - this.#view.setUint32(144, Number(value), LE); - } - get shaderClipDistance() { - return this.#view.getUint32(148, LE); - } - set shaderClipDistance(value) { - this.#view.setUint32(148, Number(value), LE); - } - get shaderCullDistance() { - return this.#view.getUint32(152, LE); - } - set shaderCullDistance(value) { - this.#view.setUint32(152, Number(value), LE); - } - get shaderFloat64() { - return this.#view.getUint32(156, LE); - } - set shaderFloat64(value) { - this.#view.setUint32(156, Number(value), LE); - } - get shaderInt64() { - return this.#view.getUint32(160, LE); - } - set shaderInt64(value) { - this.#view.setUint32(160, Number(value), LE); - } - get shaderInt16() { - return this.#view.getUint32(164, LE); - } - set shaderInt16(value) { - this.#view.setUint32(164, Number(value), LE); - } - get shaderResourceResidency() { - return this.#view.getUint32(168, LE); - } - set shaderResourceResidency(value) { - this.#view.setUint32(168, Number(value), LE); - } - get shaderResourceMinLod() { - return this.#view.getUint32(172, LE); - } - set shaderResourceMinLod(value) { - this.#view.setUint32(172, Number(value), LE); - } - get sparseBinding() { - return this.#view.getUint32(176, LE); - } - set sparseBinding(value) { - this.#view.setUint32(176, Number(value), LE); - } - get sparseResidencyBuffer() { - return this.#view.getUint32(180, LE); - } - set sparseResidencyBuffer(value) { - this.#view.setUint32(180, Number(value), LE); - } - get sparseResidencyImage2D() { - return this.#view.getUint32(184, LE); - } - set sparseResidencyImage2D(value) { - this.#view.setUint32(184, Number(value), LE); - } - get sparseResidencyImage3D() { - return this.#view.getUint32(188, LE); - } - set sparseResidencyImage3D(value) { - this.#view.setUint32(188, Number(value), LE); - } - get sparseResidency2Samples() { - return this.#view.getUint32(192, LE); - } - set sparseResidency2Samples(value) { - this.#view.setUint32(192, Number(value), LE); - } - get sparseResidency4Samples() { - return this.#view.getUint32(196, LE); - } - set sparseResidency4Samples(value) { - this.#view.setUint32(196, Number(value), LE); - } - get sparseResidency8Samples() { - return this.#view.getUint32(200, LE); - } - set sparseResidency8Samples(value) { - this.#view.setUint32(200, Number(value), LE); - } - get sparseResidency16Samples() { - return this.#view.getUint32(204, LE); - } - set sparseResidency16Samples(value) { - this.#view.setUint32(204, Number(value), LE); - } - get sparseResidencyAliased() { - return this.#view.getUint32(208, LE); - } - set sparseResidencyAliased(value) { - this.#view.setUint32(208, Number(value), LE); - } - get variableMultisampleRate() { - return this.#view.getUint32(212, LE); - } - set variableMultisampleRate(value) { - this.#view.setUint32(212, Number(value), LE); - } - get inheritedQueries() { - return this.#view.getUint32(216, LE); - } - set inheritedQueries(value) { - this.#view.setUint32(216, Number(value), LE); - } -} -export class PhysicalDeviceSparseProperties { - static size = 20; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSparseProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSparseProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSparseProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSparseProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.residencyStandard2DBlockShape && (this.residencyStandard2DBlockShape = data.residencyStandard2DBlockShape), void 0 !== data.residencyStandard2DMultisampleBlockShape && (this.residencyStandard2DMultisampleBlockShape = data.residencyStandard2DMultisampleBlockShape), void 0 !== data.residencyStandard3DBlockShape && (this.residencyStandard3DBlockShape = data.residencyStandard3DBlockShape), void 0 !== data.residencyAlignedMipSize && (this.residencyAlignedMipSize = data.residencyAlignedMipSize), void 0 !== data.residencyNonResidentStrict && (this.residencyNonResidentStrict = data.residencyNonResidentStrict); - } - get residencyStandard2DBlockShape() { - return this.#view.getUint32(0, LE); - } - set residencyStandard2DBlockShape(value) { - this.#view.setUint32(0, Number(value), LE); - } - get residencyStandard2DMultisampleBlockShape() { - return this.#view.getUint32(4, LE); - } - set residencyStandard2DMultisampleBlockShape(value) { - this.#view.setUint32(4, Number(value), LE); - } - get residencyStandard3DBlockShape() { - return this.#view.getUint32(8, LE); - } - set residencyStandard3DBlockShape(value) { - this.#view.setUint32(8, Number(value), LE); - } - get residencyAlignedMipSize() { - return this.#view.getUint32(12, LE); - } - set residencyAlignedMipSize(value) { - this.#view.setUint32(12, Number(value), LE); - } - get residencyNonResidentStrict() { - return this.#view.getUint32(16, LE); - } - set residencyNonResidentStrict(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceLimits { - static size = 504; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceLimits.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLimits.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLimits.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceLimits.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.maxImageDimension1D && (this.maxImageDimension1D = data.maxImageDimension1D), void 0 !== data.maxImageDimension2D && (this.maxImageDimension2D = data.maxImageDimension2D), void 0 !== data.maxImageDimension3D && (this.maxImageDimension3D = data.maxImageDimension3D), void 0 !== data.maxImageDimensionCube && (this.maxImageDimensionCube = data.maxImageDimensionCube), void 0 !== data.maxImageArrayLayers && (this.maxImageArrayLayers = data.maxImageArrayLayers), void 0 !== data.maxTexelBufferElements && (this.maxTexelBufferElements = data.maxTexelBufferElements), void 0 !== data.maxUniformBufferRange && (this.maxUniformBufferRange = data.maxUniformBufferRange), void 0 !== data.maxStorageBufferRange && (this.maxStorageBufferRange = data.maxStorageBufferRange), void 0 !== data.maxPushConstantsSize && (this.maxPushConstantsSize = data.maxPushConstantsSize), void 0 !== data.maxMemoryAllocationCount && (this.maxMemoryAllocationCount = data.maxMemoryAllocationCount), void 0 !== data.maxSamplerAllocationCount && (this.maxSamplerAllocationCount = data.maxSamplerAllocationCount), void 0 !== data.bufferImageGranularity && (this.bufferImageGranularity = data.bufferImageGranularity), void 0 !== data.sparseAddressSpaceSize && (this.sparseAddressSpaceSize = data.sparseAddressSpaceSize), void 0 !== data.maxBoundDescriptorSets && (this.maxBoundDescriptorSets = data.maxBoundDescriptorSets), void 0 !== data.maxPerStageDescriptorSamplers && (this.maxPerStageDescriptorSamplers = data.maxPerStageDescriptorSamplers), void 0 !== data.maxPerStageDescriptorUniformBuffers && (this.maxPerStageDescriptorUniformBuffers = data.maxPerStageDescriptorUniformBuffers), void 0 !== data.maxPerStageDescriptorStorageBuffers && (this.maxPerStageDescriptorStorageBuffers = data.maxPerStageDescriptorStorageBuffers), void 0 !== data.maxPerStageDescriptorSampledImages && (this.maxPerStageDescriptorSampledImages = data.maxPerStageDescriptorSampledImages), void 0 !== data.maxPerStageDescriptorStorageImages && (this.maxPerStageDescriptorStorageImages = data.maxPerStageDescriptorStorageImages), void 0 !== data.maxPerStageDescriptorInputAttachments && (this.maxPerStageDescriptorInputAttachments = data.maxPerStageDescriptorInputAttachments), void 0 !== data.maxPerStageResources && (this.maxPerStageResources = data.maxPerStageResources), void 0 !== data.maxDescriptorSetSamplers && (this.maxDescriptorSetSamplers = data.maxDescriptorSetSamplers), void 0 !== data.maxDescriptorSetUniformBuffers && (this.maxDescriptorSetUniformBuffers = data.maxDescriptorSetUniformBuffers), void 0 !== data.maxDescriptorSetUniformBuffersDynamic && (this.maxDescriptorSetUniformBuffersDynamic = data.maxDescriptorSetUniformBuffersDynamic), void 0 !== data.maxDescriptorSetStorageBuffers && (this.maxDescriptorSetStorageBuffers = data.maxDescriptorSetStorageBuffers), void 0 !== data.maxDescriptorSetStorageBuffersDynamic && (this.maxDescriptorSetStorageBuffersDynamic = data.maxDescriptorSetStorageBuffersDynamic), void 0 !== data.maxDescriptorSetSampledImages && (this.maxDescriptorSetSampledImages = data.maxDescriptorSetSampledImages), void 0 !== data.maxDescriptorSetStorageImages && (this.maxDescriptorSetStorageImages = data.maxDescriptorSetStorageImages), void 0 !== data.maxDescriptorSetInputAttachments && (this.maxDescriptorSetInputAttachments = data.maxDescriptorSetInputAttachments), void 0 !== data.maxVertexInputAttributes && (this.maxVertexInputAttributes = data.maxVertexInputAttributes), void 0 !== data.maxVertexInputBindings && (this.maxVertexInputBindings = data.maxVertexInputBindings), void 0 !== data.maxVertexInputAttributeOffset && (this.maxVertexInputAttributeOffset = data.maxVertexInputAttributeOffset), void 0 !== data.maxVertexInputBindingStride && (this.maxVertexInputBindingStride = data.maxVertexInputBindingStride), void 0 !== data.maxVertexOutputComponents && (this.maxVertexOutputComponents = data.maxVertexOutputComponents), void 0 !== data.maxTessellationGenerationLevel && (this.maxTessellationGenerationLevel = data.maxTessellationGenerationLevel), void 0 !== data.maxTessellationPatchSize && (this.maxTessellationPatchSize = data.maxTessellationPatchSize), void 0 !== data.maxTessellationControlPerVertexInputComponents && (this.maxTessellationControlPerVertexInputComponents = data.maxTessellationControlPerVertexInputComponents), void 0 !== data.maxTessellationControlPerVertexOutputComponents && (this.maxTessellationControlPerVertexOutputComponents = data.maxTessellationControlPerVertexOutputComponents), void 0 !== data.maxTessellationControlPerPatchOutputComponents && (this.maxTessellationControlPerPatchOutputComponents = data.maxTessellationControlPerPatchOutputComponents), void 0 !== data.maxTessellationControlTotalOutputComponents && (this.maxTessellationControlTotalOutputComponents = data.maxTessellationControlTotalOutputComponents), void 0 !== data.maxTessellationEvaluationInputComponents && (this.maxTessellationEvaluationInputComponents = data.maxTessellationEvaluationInputComponents), void 0 !== data.maxTessellationEvaluationOutputComponents && (this.maxTessellationEvaluationOutputComponents = data.maxTessellationEvaluationOutputComponents), void 0 !== data.maxGeometryShaderInvocations && (this.maxGeometryShaderInvocations = data.maxGeometryShaderInvocations), void 0 !== data.maxGeometryInputComponents && (this.maxGeometryInputComponents = data.maxGeometryInputComponents), void 0 !== data.maxGeometryOutputComponents && (this.maxGeometryOutputComponents = data.maxGeometryOutputComponents), void 0 !== data.maxGeometryOutputVertices && (this.maxGeometryOutputVertices = data.maxGeometryOutputVertices), void 0 !== data.maxGeometryTotalOutputComponents && (this.maxGeometryTotalOutputComponents = data.maxGeometryTotalOutputComponents), void 0 !== data.maxFragmentInputComponents && (this.maxFragmentInputComponents = data.maxFragmentInputComponents), void 0 !== data.maxFragmentOutputAttachments && (this.maxFragmentOutputAttachments = data.maxFragmentOutputAttachments), void 0 !== data.maxFragmentDualSrcAttachments && (this.maxFragmentDualSrcAttachments = data.maxFragmentDualSrcAttachments), void 0 !== data.maxFragmentCombinedOutputResources && (this.maxFragmentCombinedOutputResources = data.maxFragmentCombinedOutputResources), void 0 !== data.maxComputeSharedMemorySize && (this.maxComputeSharedMemorySize = data.maxComputeSharedMemorySize), void 0 !== data.maxComputeWorkGroupCount && (this.maxComputeWorkGroupCount = data.maxComputeWorkGroupCount), void 0 !== data.maxComputeWorkGroupInvocations && (this.maxComputeWorkGroupInvocations = data.maxComputeWorkGroupInvocations), void 0 !== data.maxComputeWorkGroupSize && (this.maxComputeWorkGroupSize = data.maxComputeWorkGroupSize), void 0 !== data.subPixelPrecisionBits && (this.subPixelPrecisionBits = data.subPixelPrecisionBits), void 0 !== data.subTexelPrecisionBits && (this.subTexelPrecisionBits = data.subTexelPrecisionBits), void 0 !== data.mipmapPrecisionBits && (this.mipmapPrecisionBits = data.mipmapPrecisionBits), void 0 !== data.maxDrawIndexedIndexValue && (this.maxDrawIndexedIndexValue = data.maxDrawIndexedIndexValue), void 0 !== data.maxDrawIndirectCount && (this.maxDrawIndirectCount = data.maxDrawIndirectCount), void 0 !== data.maxSamplerLodBias && (this.maxSamplerLodBias = data.maxSamplerLodBias), void 0 !== data.maxSamplerAnisotropy && (this.maxSamplerAnisotropy = data.maxSamplerAnisotropy), void 0 !== data.maxViewports && (this.maxViewports = data.maxViewports), void 0 !== data.maxViewportDimensions && (this.maxViewportDimensions = data.maxViewportDimensions), void 0 !== data.viewportBoundsRange && (this.viewportBoundsRange = data.viewportBoundsRange), void 0 !== data.viewportSubPixelBits && (this.viewportSubPixelBits = data.viewportSubPixelBits), void 0 !== data.minMemoryMapAlignment && (this.minMemoryMapAlignment = data.minMemoryMapAlignment), void 0 !== data.minTexelBufferOffsetAlignment && (this.minTexelBufferOffsetAlignment = data.minTexelBufferOffsetAlignment), void 0 !== data.minUniformBufferOffsetAlignment && (this.minUniformBufferOffsetAlignment = data.minUniformBufferOffsetAlignment), void 0 !== data.minStorageBufferOffsetAlignment && (this.minStorageBufferOffsetAlignment = data.minStorageBufferOffsetAlignment), void 0 !== data.minTexelOffset && (this.minTexelOffset = data.minTexelOffset), void 0 !== data.maxTexelOffset && (this.maxTexelOffset = data.maxTexelOffset), void 0 !== data.minTexelGatherOffset && (this.minTexelGatherOffset = data.minTexelGatherOffset), void 0 !== data.maxTexelGatherOffset && (this.maxTexelGatherOffset = data.maxTexelGatherOffset), void 0 !== data.minInterpolationOffset && (this.minInterpolationOffset = data.minInterpolationOffset), void 0 !== data.maxInterpolationOffset && (this.maxInterpolationOffset = data.maxInterpolationOffset), void 0 !== data.subPixelInterpolationOffsetBits && (this.subPixelInterpolationOffsetBits = data.subPixelInterpolationOffsetBits), void 0 !== data.maxFramebufferWidth && (this.maxFramebufferWidth = data.maxFramebufferWidth), void 0 !== data.maxFramebufferHeight && (this.maxFramebufferHeight = data.maxFramebufferHeight), void 0 !== data.maxFramebufferLayers && (this.maxFramebufferLayers = data.maxFramebufferLayers), void 0 !== data.framebufferColorSampleCounts && (this.framebufferColorSampleCounts = data.framebufferColorSampleCounts), void 0 !== data.framebufferDepthSampleCounts && (this.framebufferDepthSampleCounts = data.framebufferDepthSampleCounts), void 0 !== data.framebufferStencilSampleCounts && (this.framebufferStencilSampleCounts = data.framebufferStencilSampleCounts), void 0 !== data.framebufferNoAttachmentsSampleCounts && (this.framebufferNoAttachmentsSampleCounts = data.framebufferNoAttachmentsSampleCounts), void 0 !== data.maxColorAttachments && (this.maxColorAttachments = data.maxColorAttachments), void 0 !== data.sampledImageColorSampleCounts && (this.sampledImageColorSampleCounts = data.sampledImageColorSampleCounts), void 0 !== data.sampledImageIntegerSampleCounts && (this.sampledImageIntegerSampleCounts = data.sampledImageIntegerSampleCounts), void 0 !== data.sampledImageDepthSampleCounts && (this.sampledImageDepthSampleCounts = data.sampledImageDepthSampleCounts), void 0 !== data.sampledImageStencilSampleCounts && (this.sampledImageStencilSampleCounts = data.sampledImageStencilSampleCounts), void 0 !== data.storageImageSampleCounts && (this.storageImageSampleCounts = data.storageImageSampleCounts), void 0 !== data.maxSampleMaskWords && (this.maxSampleMaskWords = data.maxSampleMaskWords), void 0 !== data.timestampComputeAndGraphics && (this.timestampComputeAndGraphics = data.timestampComputeAndGraphics), void 0 !== data.timestampPeriod && (this.timestampPeriod = data.timestampPeriod), void 0 !== data.maxClipDistances && (this.maxClipDistances = data.maxClipDistances), void 0 !== data.maxCullDistances && (this.maxCullDistances = data.maxCullDistances), void 0 !== data.maxCombinedClipAndCullDistances && (this.maxCombinedClipAndCullDistances = data.maxCombinedClipAndCullDistances), void 0 !== data.discreteQueuePriorities && (this.discreteQueuePriorities = data.discreteQueuePriorities), void 0 !== data.pointSizeRange && (this.pointSizeRange = data.pointSizeRange), void 0 !== data.lineWidthRange && (this.lineWidthRange = data.lineWidthRange), void 0 !== data.pointSizeGranularity && (this.pointSizeGranularity = data.pointSizeGranularity), void 0 !== data.lineWidthGranularity && (this.lineWidthGranularity = data.lineWidthGranularity), void 0 !== data.strictLines && (this.strictLines = data.strictLines), void 0 !== data.standardSampleLocations && (this.standardSampleLocations = data.standardSampleLocations), void 0 !== data.optimalBufferCopyOffsetAlignment && (this.optimalBufferCopyOffsetAlignment = data.optimalBufferCopyOffsetAlignment), void 0 !== data.optimalBufferCopyRowPitchAlignment && (this.optimalBufferCopyRowPitchAlignment = data.optimalBufferCopyRowPitchAlignment), void 0 !== data.nonCoherentAtomSize && (this.nonCoherentAtomSize = data.nonCoherentAtomSize); - } - get maxImageDimension1D() { - return this.#view.getUint32(0, LE); - } - set maxImageDimension1D(value) { - this.#view.setUint32(0, Number(value), LE); - } - get maxImageDimension2D() { - return this.#view.getUint32(4, LE); - } - set maxImageDimension2D(value) { - this.#view.setUint32(4, Number(value), LE); - } - get maxImageDimension3D() { - return this.#view.getUint32(8, LE); - } - set maxImageDimension3D(value) { - this.#view.setUint32(8, Number(value), LE); - } - get maxImageDimensionCube() { - return this.#view.getUint32(12, LE); - } - set maxImageDimensionCube(value) { - this.#view.setUint32(12, Number(value), LE); - } - get maxImageArrayLayers() { - return this.#view.getUint32(16, LE); - } - set maxImageArrayLayers(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxTexelBufferElements() { - return this.#view.getUint32(20, LE); - } - set maxTexelBufferElements(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxUniformBufferRange() { - return this.#view.getUint32(24, LE); - } - set maxUniformBufferRange(value) { - this.#view.setUint32(24, Number(value), LE); - } - get maxStorageBufferRange() { - return this.#view.getUint32(28, LE); - } - set maxStorageBufferRange(value) { - this.#view.setUint32(28, Number(value), LE); - } - get maxPushConstantsSize() { - return this.#view.getUint32(32, LE); - } - set maxPushConstantsSize(value) { - this.#view.setUint32(32, Number(value), LE); - } - get maxMemoryAllocationCount() { - return this.#view.getUint32(36, LE); - } - set maxMemoryAllocationCount(value) { - this.#view.setUint32(36, Number(value), LE); - } - get maxSamplerAllocationCount() { - return this.#view.getUint32(40, LE); - } - set maxSamplerAllocationCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get bufferImageGranularity() { - return this.#view.getBigUint64(48, LE); - } - set bufferImageGranularity(value) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - get sparseAddressSpaceSize() { - return this.#view.getBigUint64(56, LE); - } - set sparseAddressSpaceSize(value) { - this.#view.setBigUint64(56, BigInt(value), LE); - } - get maxBoundDescriptorSets() { - return this.#view.getUint32(64, LE); - } - set maxBoundDescriptorSets(value) { - this.#view.setUint32(64, Number(value), LE); - } - get maxPerStageDescriptorSamplers() { - return this.#view.getUint32(68, LE); - } - set maxPerStageDescriptorSamplers(value) { - this.#view.setUint32(68, Number(value), LE); - } - get maxPerStageDescriptorUniformBuffers() { - return this.#view.getUint32(72, LE); - } - set maxPerStageDescriptorUniformBuffers(value) { - this.#view.setUint32(72, Number(value), LE); - } - get maxPerStageDescriptorStorageBuffers() { - return this.#view.getUint32(76, LE); - } - set maxPerStageDescriptorStorageBuffers(value) { - this.#view.setUint32(76, Number(value), LE); - } - get maxPerStageDescriptorSampledImages() { - return this.#view.getUint32(80, LE); - } - set maxPerStageDescriptorSampledImages(value) { - this.#view.setUint32(80, Number(value), LE); - } - get maxPerStageDescriptorStorageImages() { - return this.#view.getUint32(84, LE); - } - set maxPerStageDescriptorStorageImages(value) { - this.#view.setUint32(84, Number(value), LE); - } - get maxPerStageDescriptorInputAttachments() { - return this.#view.getUint32(88, LE); - } - set maxPerStageDescriptorInputAttachments(value) { - this.#view.setUint32(88, Number(value), LE); - } - get maxPerStageResources() { - return this.#view.getUint32(92, LE); - } - set maxPerStageResources(value) { - this.#view.setUint32(92, Number(value), LE); - } - get maxDescriptorSetSamplers() { - return this.#view.getUint32(96, LE); - } - set maxDescriptorSetSamplers(value) { - this.#view.setUint32(96, Number(value), LE); - } - get maxDescriptorSetUniformBuffers() { - return this.#view.getUint32(100, LE); - } - set maxDescriptorSetUniformBuffers(value) { - this.#view.setUint32(100, Number(value), LE); - } - get maxDescriptorSetUniformBuffersDynamic() { - return this.#view.getUint32(104, LE); - } - set maxDescriptorSetUniformBuffersDynamic(value) { - this.#view.setUint32(104, Number(value), LE); - } - get maxDescriptorSetStorageBuffers() { - return this.#view.getUint32(108, LE); - } - set maxDescriptorSetStorageBuffers(value) { - this.#view.setUint32(108, Number(value), LE); - } - get maxDescriptorSetStorageBuffersDynamic() { - return this.#view.getUint32(112, LE); - } - set maxDescriptorSetStorageBuffersDynamic(value) { - this.#view.setUint32(112, Number(value), LE); - } - get maxDescriptorSetSampledImages() { - return this.#view.getUint32(116, LE); - } - set maxDescriptorSetSampledImages(value) { - this.#view.setUint32(116, Number(value), LE); - } - get maxDescriptorSetStorageImages() { - return this.#view.getUint32(120, LE); - } - set maxDescriptorSetStorageImages(value) { - this.#view.setUint32(120, Number(value), LE); - } - get maxDescriptorSetInputAttachments() { - return this.#view.getUint32(124, LE); - } - set maxDescriptorSetInputAttachments(value) { - this.#view.setUint32(124, Number(value), LE); - } - get maxVertexInputAttributes() { - return this.#view.getUint32(128, LE); - } - set maxVertexInputAttributes(value) { - this.#view.setUint32(128, Number(value), LE); - } - get maxVertexInputBindings() { - return this.#view.getUint32(132, LE); - } - set maxVertexInputBindings(value) { - this.#view.setUint32(132, Number(value), LE); - } - get maxVertexInputAttributeOffset() { - return this.#view.getUint32(136, LE); - } - set maxVertexInputAttributeOffset(value) { - this.#view.setUint32(136, Number(value), LE); - } - get maxVertexInputBindingStride() { - return this.#view.getUint32(140, LE); - } - set maxVertexInputBindingStride(value) { - this.#view.setUint32(140, Number(value), LE); - } - get maxVertexOutputComponents() { - return this.#view.getUint32(144, LE); - } - set maxVertexOutputComponents(value) { - this.#view.setUint32(144, Number(value), LE); - } - get maxTessellationGenerationLevel() { - return this.#view.getUint32(148, LE); - } - set maxTessellationGenerationLevel(value) { - this.#view.setUint32(148, Number(value), LE); - } - get maxTessellationPatchSize() { - return this.#view.getUint32(152, LE); - } - set maxTessellationPatchSize(value) { - this.#view.setUint32(152, Number(value), LE); - } - get maxTessellationControlPerVertexInputComponents() { - return this.#view.getUint32(156, LE); - } - set maxTessellationControlPerVertexInputComponents(value) { - this.#view.setUint32(156, Number(value), LE); - } - get maxTessellationControlPerVertexOutputComponents() { - return this.#view.getUint32(160, LE); - } - set maxTessellationControlPerVertexOutputComponents(value) { - this.#view.setUint32(160, Number(value), LE); - } - get maxTessellationControlPerPatchOutputComponents() { - return this.#view.getUint32(164, LE); - } - set maxTessellationControlPerPatchOutputComponents(value) { - this.#view.setUint32(164, Number(value), LE); - } - get maxTessellationControlTotalOutputComponents() { - return this.#view.getUint32(168, LE); - } - set maxTessellationControlTotalOutputComponents(value) { - this.#view.setUint32(168, Number(value), LE); - } - get maxTessellationEvaluationInputComponents() { - return this.#view.getUint32(172, LE); - } - set maxTessellationEvaluationInputComponents(value) { - this.#view.setUint32(172, Number(value), LE); - } - get maxTessellationEvaluationOutputComponents() { - return this.#view.getUint32(176, LE); - } - set maxTessellationEvaluationOutputComponents(value) { - this.#view.setUint32(176, Number(value), LE); - } - get maxGeometryShaderInvocations() { - return this.#view.getUint32(180, LE); - } - set maxGeometryShaderInvocations(value) { - this.#view.setUint32(180, Number(value), LE); - } - get maxGeometryInputComponents() { - return this.#view.getUint32(184, LE); - } - set maxGeometryInputComponents(value) { - this.#view.setUint32(184, Number(value), LE); - } - get maxGeometryOutputComponents() { - return this.#view.getUint32(188, LE); - } - set maxGeometryOutputComponents(value) { - this.#view.setUint32(188, Number(value), LE); - } - get maxGeometryOutputVertices() { - return this.#view.getUint32(192, LE); - } - set maxGeometryOutputVertices(value) { - this.#view.setUint32(192, Number(value), LE); - } - get maxGeometryTotalOutputComponents() { - return this.#view.getUint32(196, LE); - } - set maxGeometryTotalOutputComponents(value) { - this.#view.setUint32(196, Number(value), LE); - } - get maxFragmentInputComponents() { - return this.#view.getUint32(200, LE); - } - set maxFragmentInputComponents(value) { - this.#view.setUint32(200, Number(value), LE); - } - get maxFragmentOutputAttachments() { - return this.#view.getUint32(204, LE); - } - set maxFragmentOutputAttachments(value) { - this.#view.setUint32(204, Number(value), LE); - } - get maxFragmentDualSrcAttachments() { - return this.#view.getUint32(208, LE); - } - set maxFragmentDualSrcAttachments(value) { - this.#view.setUint32(208, Number(value), LE); - } - get maxFragmentCombinedOutputResources() { - return this.#view.getUint32(212, LE); - } - set maxFragmentCombinedOutputResources(value) { - this.#view.setUint32(212, Number(value), LE); - } - get maxComputeSharedMemorySize() { - return this.#view.getUint32(216, LE); - } - set maxComputeSharedMemorySize(value) { - this.#view.setUint32(216, Number(value), LE); - } - get maxComputeWorkGroupCount() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 220, 3); - } - set maxComputeWorkGroupCount(value) { - this.#data.set(new Uint8Array(value.buffer), 220); - } - get maxComputeWorkGroupInvocations() { - return this.#view.getUint32(232, LE); - } - set maxComputeWorkGroupInvocations(value) { - this.#view.setUint32(232, Number(value), LE); - } - get maxComputeWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 236, 3); - } - set maxComputeWorkGroupSize(value) { - this.#data.set(new Uint8Array(value.buffer), 236); - } - get subPixelPrecisionBits() { - return this.#view.getUint32(248, LE); - } - set subPixelPrecisionBits(value) { - this.#view.setUint32(248, Number(value), LE); - } - get subTexelPrecisionBits() { - return this.#view.getUint32(252, LE); - } - set subTexelPrecisionBits(value) { - this.#view.setUint32(252, Number(value), LE); - } - get mipmapPrecisionBits() { - return this.#view.getUint32(256, LE); - } - set mipmapPrecisionBits(value) { - this.#view.setUint32(256, Number(value), LE); - } - get maxDrawIndexedIndexValue() { - return this.#view.getUint32(260, LE); - } - set maxDrawIndexedIndexValue(value) { - this.#view.setUint32(260, Number(value), LE); - } - get maxDrawIndirectCount() { - return this.#view.getUint32(264, LE); - } - set maxDrawIndirectCount(value) { - this.#view.setUint32(264, Number(value), LE); - } - get maxSamplerLodBias() { - return this.#view.getFloat32(268, LE); - } - set maxSamplerLodBias(value) { - this.#view.setFloat32(268, Number(value), LE); - } - get maxSamplerAnisotropy() { - return this.#view.getFloat32(272, LE); - } - set maxSamplerAnisotropy(value) { - this.#view.setFloat32(272, Number(value), LE); - } - get maxViewports() { - return this.#view.getUint32(276, LE); - } - set maxViewports(value) { - this.#view.setUint32(276, Number(value), LE); - } - get maxViewportDimensions() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 280, 2); - } - set maxViewportDimensions(value) { - this.#data.set(new Uint8Array(value.buffer), 280); - } - get viewportBoundsRange() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 288, 2); - } - set viewportBoundsRange(value) { - this.#data.set(new Uint8Array(value.buffer), 288); - } - get viewportSubPixelBits() { - return this.#view.getUint32(296, LE); - } - set viewportSubPixelBits(value) { - this.#view.setUint32(296, Number(value), LE); - } - get minMemoryMapAlignment() { - return this.#view.getBigUint64(304, LE); - } - set minMemoryMapAlignment(value) { - this.#view.setBigUint64(304, BigInt(value), LE); - } - get minTexelBufferOffsetAlignment() { - return this.#view.getBigUint64(312, LE); - } - set minTexelBufferOffsetAlignment(value) { - this.#view.setBigUint64(312, BigInt(value), LE); - } - get minUniformBufferOffsetAlignment() { - return this.#view.getBigUint64(320, LE); - } - set minUniformBufferOffsetAlignment(value) { - this.#view.setBigUint64(320, BigInt(value), LE); - } - get minStorageBufferOffsetAlignment() { - return this.#view.getBigUint64(328, LE); - } - set minStorageBufferOffsetAlignment(value) { - this.#view.setBigUint64(328, BigInt(value), LE); - } - get minTexelOffset() { - return this.#view.getInt32(336, LE); - } - set minTexelOffset(value) { - this.#view.setInt32(336, Number(value), LE); - } - get maxTexelOffset() { - return this.#view.getUint32(340, LE); - } - set maxTexelOffset(value) { - this.#view.setUint32(340, Number(value), LE); - } - get minTexelGatherOffset() { - return this.#view.getInt32(344, LE); - } - set minTexelGatherOffset(value) { - this.#view.setInt32(344, Number(value), LE); - } - get maxTexelGatherOffset() { - return this.#view.getUint32(348, LE); - } - set maxTexelGatherOffset(value) { - this.#view.setUint32(348, Number(value), LE); - } - get minInterpolationOffset() { - return this.#view.getFloat32(352, LE); - } - set minInterpolationOffset(value) { - this.#view.setFloat32(352, Number(value), LE); - } - get maxInterpolationOffset() { - return this.#view.getFloat32(356, LE); - } - set maxInterpolationOffset(value) { - this.#view.setFloat32(356, Number(value), LE); - } - get subPixelInterpolationOffsetBits() { - return this.#view.getUint32(360, LE); - } - set subPixelInterpolationOffsetBits(value) { - this.#view.setUint32(360, Number(value), LE); - } - get maxFramebufferWidth() { - return this.#view.getUint32(364, LE); - } - set maxFramebufferWidth(value) { - this.#view.setUint32(364, Number(value), LE); - } - get maxFramebufferHeight() { - return this.#view.getUint32(368, LE); - } - set maxFramebufferHeight(value) { - this.#view.setUint32(368, Number(value), LE); - } - get maxFramebufferLayers() { - return this.#view.getUint32(372, LE); - } - set maxFramebufferLayers(value) { - this.#view.setUint32(372, Number(value), LE); - } - get framebufferColorSampleCounts() { - return this.#view.getUint32(376, LE); - } - set framebufferColorSampleCounts(value) { - this.#view.setUint32(376, Number(value), LE); - } - get framebufferDepthSampleCounts() { - return this.#view.getUint32(380, LE); - } - set framebufferDepthSampleCounts(value) { - this.#view.setUint32(380, Number(value), LE); - } - get framebufferStencilSampleCounts() { - return this.#view.getUint32(384, LE); - } - set framebufferStencilSampleCounts(value) { - this.#view.setUint32(384, Number(value), LE); - } - get framebufferNoAttachmentsSampleCounts() { - return this.#view.getUint32(388, LE); - } - set framebufferNoAttachmentsSampleCounts(value) { - this.#view.setUint32(388, Number(value), LE); - } - get maxColorAttachments() { - return this.#view.getUint32(392, LE); - } - set maxColorAttachments(value) { - this.#view.setUint32(392, Number(value), LE); - } - get sampledImageColorSampleCounts() { - return this.#view.getUint32(396, LE); - } - set sampledImageColorSampleCounts(value) { - this.#view.setUint32(396, Number(value), LE); - } - get sampledImageIntegerSampleCounts() { - return this.#view.getUint32(400, LE); - } - set sampledImageIntegerSampleCounts(value) { - this.#view.setUint32(400, Number(value), LE); - } - get sampledImageDepthSampleCounts() { - return this.#view.getUint32(404, LE); - } - set sampledImageDepthSampleCounts(value) { - this.#view.setUint32(404, Number(value), LE); - } - get sampledImageStencilSampleCounts() { - return this.#view.getUint32(408, LE); - } - set sampledImageStencilSampleCounts(value) { - this.#view.setUint32(408, Number(value), LE); - } - get storageImageSampleCounts() { - return this.#view.getUint32(412, LE); - } - set storageImageSampleCounts(value) { - this.#view.setUint32(412, Number(value), LE); - } - get maxSampleMaskWords() { - return this.#view.getUint32(416, LE); - } - set maxSampleMaskWords(value) { - this.#view.setUint32(416, Number(value), LE); - } - get timestampComputeAndGraphics() { - return this.#view.getUint32(420, LE); - } - set timestampComputeAndGraphics(value) { - this.#view.setUint32(420, Number(value), LE); - } - get timestampPeriod() { - return this.#view.getFloat32(424, LE); - } - set timestampPeriod(value) { - this.#view.setFloat32(424, Number(value), LE); - } - get maxClipDistances() { - return this.#view.getUint32(428, LE); - } - set maxClipDistances(value) { - this.#view.setUint32(428, Number(value), LE); - } - get maxCullDistances() { - return this.#view.getUint32(432, LE); - } - set maxCullDistances(value) { - this.#view.setUint32(432, Number(value), LE); - } - get maxCombinedClipAndCullDistances() { - return this.#view.getUint32(436, LE); - } - set maxCombinedClipAndCullDistances(value) { - this.#view.setUint32(436, Number(value), LE); - } - get discreteQueuePriorities() { - return this.#view.getUint32(440, LE); - } - set discreteQueuePriorities(value) { - this.#view.setUint32(440, Number(value), LE); - } - get pointSizeRange() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 444, 2); - } - set pointSizeRange(value) { - this.#data.set(new Uint8Array(value.buffer), 444); - } - get lineWidthRange() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 452, 2); - } - set lineWidthRange(value) { - this.#data.set(new Uint8Array(value.buffer), 452); - } - get pointSizeGranularity() { - return this.#view.getFloat32(460, LE); - } - set pointSizeGranularity(value) { - this.#view.setFloat32(460, Number(value), LE); - } - get lineWidthGranularity() { - return this.#view.getFloat32(464, LE); - } - set lineWidthGranularity(value) { - this.#view.setFloat32(464, Number(value), LE); - } - get strictLines() { - return this.#view.getUint32(468, LE); - } - set strictLines(value) { - this.#view.setUint32(468, Number(value), LE); - } - get standardSampleLocations() { - return this.#view.getUint32(472, LE); - } - set standardSampleLocations(value) { - this.#view.setUint32(472, Number(value), LE); - } - get optimalBufferCopyOffsetAlignment() { - return this.#view.getBigUint64(480, LE); - } - set optimalBufferCopyOffsetAlignment(value) { - this.#view.setBigUint64(480, BigInt(value), LE); - } - get optimalBufferCopyRowPitchAlignment() { - return this.#view.getBigUint64(488, LE); - } - set optimalBufferCopyRowPitchAlignment(value) { - this.#view.setBigUint64(488, BigInt(value), LE); - } - get nonCoherentAtomSize() { - return this.#view.getBigUint64(496, LE); - } - set nonCoherentAtomSize(value) { - this.#view.setBigUint64(496, BigInt(value), LE); - } -} -export class SemaphoreCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SemaphoreCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SemaphoreCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.SEMAPHORE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class QueryPoolCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueryPoolCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueryPoolCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueryPoolCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueryPoolCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.queryType && (this.queryType = data.queryType), void 0 !== data.queryCount && (this.queryCount = data.queryCount), void 0 !== data.pipelineStatistics && (this.pipelineStatistics = data.pipelineStatistics); - this.sType = StructureType.QUERY_POOL_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get queryType() { - return this.#view.getUint32(20, LE); - } - set queryType(value) { - this.#view.setUint32(20, Number(value), LE); - } - get queryCount() { - return this.#view.getUint32(24, LE); - } - set queryCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pipelineStatistics() { - return this.#view.getUint32(28, LE); - } - set pipelineStatistics(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class FramebufferCreateInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FramebufferCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FramebufferCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FramebufferCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.renderPass && (this.renderPass = data.renderPass), void 0 !== data.attachmentCount && (this.attachmentCount = data.attachmentCount), void 0 !== data.pAttachments && (this.pAttachments = data.pAttachments), void 0 !== data.width && (this.width = data.width), void 0 !== data.height && (this.height = data.height), void 0 !== data.layers && (this.layers = data.layers); - this.sType = StructureType.FRAMEBUFFER_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get renderPass() { - return this.#view.getBigUint64(24, LE); - } - set renderPass(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get attachmentCount() { - return this.#view.getUint32(32, LE); - } - set attachmentCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pAttachments() { - return this.#view.getBigUint64(40, LE); - } - set pAttachments(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get width() { - return this.#view.getUint32(48, LE); - } - set width(value) { - this.#view.setUint32(48, Number(value), LE); - } - get height() { - return this.#view.getUint32(52, LE); - } - set height(value) { - this.#view.setUint32(52, Number(value), LE); - } - get layers() { - return this.#view.getUint32(56, LE); - } - set layers(value) { - this.#view.setUint32(56, Number(value), LE); - } -} -export class DrawIndirectCommand { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DrawIndirectCommand.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawIndirectCommand.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DrawIndirectCommand.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DrawIndirectCommand.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.vertexCount && (this.vertexCount = data.vertexCount), void 0 !== data.instanceCount && (this.instanceCount = data.instanceCount), void 0 !== data.firstVertex && (this.firstVertex = data.firstVertex), void 0 !== data.firstInstance && (this.firstInstance = data.firstInstance); - } - get vertexCount() { - return this.#view.getUint32(0, LE); - } - set vertexCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get instanceCount() { - return this.#view.getUint32(4, LE); - } - set instanceCount(value) { - this.#view.setUint32(4, Number(value), LE); - } - get firstVertex() { - return this.#view.getUint32(8, LE); - } - set firstVertex(value) { - this.#view.setUint32(8, Number(value), LE); - } - get firstInstance() { - return this.#view.getUint32(12, LE); - } - set firstInstance(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class DrawIndexedIndirectCommand { - static size = 20; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DrawIndexedIndirectCommand.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawIndexedIndirectCommand.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DrawIndexedIndirectCommand.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DrawIndexedIndirectCommand.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.indexCount && (this.indexCount = data.indexCount), void 0 !== data.instanceCount && (this.instanceCount = data.instanceCount), void 0 !== data.firstIndex && (this.firstIndex = data.firstIndex), void 0 !== data.vertexOffset && (this.vertexOffset = data.vertexOffset), void 0 !== data.firstInstance && (this.firstInstance = data.firstInstance); - } - get indexCount() { - return this.#view.getUint32(0, LE); - } - set indexCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get instanceCount() { - return this.#view.getUint32(4, LE); - } - set instanceCount(value) { - this.#view.setUint32(4, Number(value), LE); - } - get firstIndex() { - return this.#view.getUint32(8, LE); - } - set firstIndex(value) { - this.#view.setUint32(8, Number(value), LE); - } - get vertexOffset() { - return this.#view.getInt32(12, LE); - } - set vertexOffset(value) { - this.#view.setInt32(12, Number(value), LE); - } - get firstInstance() { - return this.#view.getUint32(16, LE); - } - set firstInstance(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DispatchIndirectCommand { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DispatchIndirectCommand.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DispatchIndirectCommand.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DispatchIndirectCommand.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DispatchIndirectCommand.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.x && (this.x = data.x), void 0 !== data.y && (this.y = data.y), void 0 !== data.z && (this.z = data.z); - } - get x() { - return this.#view.getUint32(0, LE); - } - set x(value) { - this.#view.setUint32(0, Number(value), LE); - } - get y() { - return this.#view.getUint32(4, LE); - } - set y(value) { - this.#view.setUint32(4, Number(value), LE); - } - get z() { - return this.#view.getUint32(8, LE); - } - set z(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class MultiDrawInfoEXT { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MultiDrawInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultiDrawInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MultiDrawInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MultiDrawInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.firstVertex && (this.firstVertex = data.firstVertex), void 0 !== data.vertexCount && (this.vertexCount = data.vertexCount); - } - get firstVertex() { - return this.#view.getUint32(0, LE); - } - set firstVertex(value) { - this.#view.setUint32(0, Number(value), LE); - } - get vertexCount() { - return this.#view.getUint32(4, LE); - } - set vertexCount(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class MultiDrawIndexedInfoEXT { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MultiDrawIndexedInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultiDrawIndexedInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MultiDrawIndexedInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MultiDrawIndexedInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.firstIndex && (this.firstIndex = data.firstIndex), void 0 !== data.indexCount && (this.indexCount = data.indexCount), void 0 !== data.vertexOffset && (this.vertexOffset = data.vertexOffset); - } - get firstIndex() { - return this.#view.getUint32(0, LE); - } - set firstIndex(value) { - this.#view.setUint32(0, Number(value), LE); - } - get indexCount() { - return this.#view.getUint32(4, LE); - } - set indexCount(value) { - this.#view.setUint32(4, Number(value), LE); - } - get vertexOffset() { - return this.#view.getInt32(8, LE); - } - set vertexOffset(value) { - this.#view.setInt32(8, Number(value), LE); - } -} -export class SubmitInfo { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubmitInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubmitInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.waitSemaphoreCount && (this.waitSemaphoreCount = data.waitSemaphoreCount), void 0 !== data.pWaitSemaphores && (this.pWaitSemaphores = data.pWaitSemaphores), void 0 !== data.pWaitDstStageMask && (this.pWaitDstStageMask = data.pWaitDstStageMask), void 0 !== data.commandBufferCount && (this.commandBufferCount = data.commandBufferCount), void 0 !== data.pCommandBuffers && (this.pCommandBuffers = data.pCommandBuffers), void 0 !== data.signalSemaphoreCount && (this.signalSemaphoreCount = data.signalSemaphoreCount), void 0 !== data.pSignalSemaphores && (this.pSignalSemaphores = data.pSignalSemaphores); - this.sType = StructureType.SUBMIT_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get waitSemaphoreCount() { - return this.#view.getUint32(16, LE); - } - set waitSemaphoreCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pWaitSemaphores() { - return this.#view.getBigUint64(24, LE); - } - set pWaitSemaphores(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pWaitDstStageMask() { - return this.#view.getBigUint64(32, LE); - } - set pWaitDstStageMask(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get commandBufferCount() { - return this.#view.getUint32(40, LE); - } - set commandBufferCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pCommandBuffers() { - return this.#view.getBigUint64(48, LE); - } - set pCommandBuffers(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get signalSemaphoreCount() { - return this.#view.getUint32(56, LE); - } - set signalSemaphoreCount(value) { - this.#view.setUint32(56, Number(value), LE); - } - get pSignalSemaphores() { - return this.#view.getBigUint64(64, LE); - } - set pSignalSemaphores(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} -export class DisplayPropertiesKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.display && (this.display = data.display), void 0 !== data.displayName && (this.displayName = data.displayName), void 0 !== data.physicalDimensions && (this.physicalDimensions = data.physicalDimensions), void 0 !== data.physicalResolution && (this.physicalResolution = data.physicalResolution), void 0 !== data.supportedTransforms && (this.supportedTransforms = data.supportedTransforms), void 0 !== data.planeReorderPossible && (this.planeReorderPossible = data.planeReorderPossible), void 0 !== data.persistentContent && (this.persistentContent = data.persistentContent); - } - get display() { - return this.#view.getBigUint64(0, LE); - } - set display(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get displayName() { - return this.#view.getBigUint64(8, LE); - } - set displayName(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get physicalDimensions() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - set physicalDimensions(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get physicalResolution() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - set physicalResolution(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get supportedTransforms() { - return this.#view.getUint32(32, LE); - } - set supportedTransforms(value) { - this.#view.setUint32(32, Number(value), LE); - } - get planeReorderPossible() { - return this.#view.getUint32(36, LE); - } - set planeReorderPossible(value) { - this.#view.setUint32(36, Number(value), LE); - } - get persistentContent() { - return this.#view.getUint32(40, LE); - } - set persistentContent(value) { - this.#view.setUint32(40, Number(value), LE); - } -} -export class DisplayPlanePropertiesKHR { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayPlanePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlanePropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlanePropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayPlanePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.currentDisplay && (this.currentDisplay = data.currentDisplay), void 0 !== data.currentStackIndex && (this.currentStackIndex = data.currentStackIndex); - } - get currentDisplay() { - return this.#view.getBigUint64(0, LE); - } - set currentDisplay(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get currentStackIndex() { - return this.#view.getUint32(8, LE); - } - set currentStackIndex(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class DisplayModeParametersKHR { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayModeParametersKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModeParametersKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayModeParametersKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayModeParametersKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.visibleRegion && (this.visibleRegion = data.visibleRegion), void 0 !== data.refreshRate && (this.refreshRate = data.refreshRate); - } - get visibleRegion() { - return new Extent2D(this.#data.subarray(0, 0 + Extent2D.size)); - } - set visibleRegion(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get refreshRate() { - return this.#view.getUint32(8, LE); - } - set refreshRate(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class DisplayModePropertiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayModePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModePropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayModePropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayModePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.displayMode && (this.displayMode = data.displayMode), void 0 !== data.parameters && (this.parameters = data.parameters); - } - get displayMode() { - return this.#view.getBigUint64(0, LE); - } - set displayMode(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get parameters() { - return new DisplayModeParametersKHR(this.#data.subarray(8, 8 + DisplayModeParametersKHR.size)); - } - set parameters(value) { - if (value[BUFFER].byteLength < DisplayModeParametersKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 8); - } -} -export class DisplayModeCreateInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayModeCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModeCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayModeCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayModeCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.parameters && (this.parameters = data.parameters); - this.sType = StructureType.DISPLAY_MODE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get parameters() { - return new DisplayModeParametersKHR(this.#data.subarray(20, 20 + DisplayModeParametersKHR.size)); - } - set parameters(value) { - if (value[BUFFER].byteLength < DisplayModeParametersKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } -} -export class DisplayPlaneCapabilitiesKHR { - static size = 68; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayPlaneCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneCapabilitiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlaneCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayPlaneCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.supportedAlpha && (this.supportedAlpha = data.supportedAlpha), void 0 !== data.minSrcPosition && (this.minSrcPosition = data.minSrcPosition), void 0 !== data.maxSrcPosition && (this.maxSrcPosition = data.maxSrcPosition), void 0 !== data.minSrcExtent && (this.minSrcExtent = data.minSrcExtent), void 0 !== data.maxSrcExtent && (this.maxSrcExtent = data.maxSrcExtent), void 0 !== data.minDstPosition && (this.minDstPosition = data.minDstPosition), void 0 !== data.maxDstPosition && (this.maxDstPosition = data.maxDstPosition), void 0 !== data.minDstExtent && (this.minDstExtent = data.minDstExtent), void 0 !== data.maxDstExtent && (this.maxDstExtent = data.maxDstExtent); - } - get supportedAlpha() { - return this.#view.getUint32(0, LE); - } - set supportedAlpha(value) { - this.#view.setUint32(0, Number(value), LE); - } - get minSrcPosition() { - return new Offset2D(this.#data.subarray(4, 4 + Offset2D.size)); - } - set minSrcPosition(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 4); - } - get maxSrcPosition() { - return new Offset2D(this.#data.subarray(12, 12 + Offset2D.size)); - } - set maxSrcPosition(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 12); - } - get minSrcExtent() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - set minSrcExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } - get maxSrcExtent() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - set maxSrcExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 28); - } - get minDstPosition() { - return new Offset2D(this.#data.subarray(36, 36 + Offset2D.size)); - } - set minDstPosition(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 36); - } - get maxDstPosition() { - return new Offset2D(this.#data.subarray(44, 44 + Offset2D.size)); - } - set maxDstPosition(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 44); - } - get minDstExtent() { - return new Extent2D(this.#data.subarray(52, 52 + Extent2D.size)); - } - set minDstExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 52); - } - get maxDstExtent() { - return new Extent2D(this.#data.subarray(60, 60 + Extent2D.size)); - } - set maxDstExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 60); - } -} -export class DisplaySurfaceCreateInfoKHR { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplaySurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplaySurfaceCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplaySurfaceCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplaySurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.displayMode && (this.displayMode = data.displayMode), void 0 !== data.planeIndex && (this.planeIndex = data.planeIndex), void 0 !== data.planeStackIndex && (this.planeStackIndex = data.planeStackIndex), void 0 !== data.transform && (this.transform = data.transform), void 0 !== data.globalAlpha && (this.globalAlpha = data.globalAlpha), void 0 !== data.alphaMode && (this.alphaMode = data.alphaMode), void 0 !== data.imageExtent && (this.imageExtent = data.imageExtent); - this.sType = StructureType.DISPLAY_SURFACE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get displayMode() { - return this.#view.getBigUint64(24, LE); - } - set displayMode(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get planeIndex() { - return this.#view.getUint32(32, LE); - } - set planeIndex(value) { - this.#view.setUint32(32, Number(value), LE); - } - get planeStackIndex() { - return this.#view.getUint32(36, LE); - } - set planeStackIndex(value) { - this.#view.setUint32(36, Number(value), LE); - } - get transform() { - return this.#view.getUint32(40, LE); - } - set transform(value) { - this.#view.setUint32(40, Number(value), LE); - } - get globalAlpha() { - return this.#view.getFloat32(44, LE); - } - set globalAlpha(value) { - this.#view.setFloat32(44, Number(value), LE); - } - get alphaMode() { - return this.#view.getUint32(48, LE); - } - set alphaMode(value) { - this.#view.setUint32(48, Number(value), LE); - } - get imageExtent() { - return new Extent2D(this.#data.subarray(52, 52 + Extent2D.size)); - } - set imageExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 52); - } -} -export class DisplayPresentInfoKHR { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayPresentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPresentInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPresentInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayPresentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcRect && (this.srcRect = data.srcRect), void 0 !== data.dstRect && (this.dstRect = data.dstRect), void 0 !== data.persistent && (this.persistent = data.persistent); - this.sType = StructureType.DISPLAY_PRESENT_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcRect() { - return new Rect2D(this.#data.subarray(16, 16 + Rect2D.size)); - } - set srcRect(value) { - if (value[BUFFER].byteLength < Rect2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get dstRect() { - return new Rect2D(this.#data.subarray(32, 32 + Rect2D.size)); - } - set dstRect(value) { - if (value[BUFFER].byteLength < Rect2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get persistent() { - return this.#view.getUint32(48, LE); - } - set persistent(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class SurfaceCapabilitiesKHR { - static size = 52; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilitiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.minImageCount && (this.minImageCount = data.minImageCount), void 0 !== data.maxImageCount && (this.maxImageCount = data.maxImageCount), void 0 !== data.currentExtent && (this.currentExtent = data.currentExtent), void 0 !== data.minImageExtent && (this.minImageExtent = data.minImageExtent), void 0 !== data.maxImageExtent && (this.maxImageExtent = data.maxImageExtent), void 0 !== data.maxImageArrayLayers && (this.maxImageArrayLayers = data.maxImageArrayLayers), void 0 !== data.supportedTransforms && (this.supportedTransforms = data.supportedTransforms), void 0 !== data.currentTransform && (this.currentTransform = data.currentTransform), void 0 !== data.supportedCompositeAlpha && (this.supportedCompositeAlpha = data.supportedCompositeAlpha), void 0 !== data.supportedUsageFlags && (this.supportedUsageFlags = data.supportedUsageFlags); - } - get minImageCount() { - return this.#view.getUint32(0, LE); - } - set minImageCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get maxImageCount() { - return this.#view.getUint32(4, LE); - } - set maxImageCount(value) { - this.#view.setUint32(4, Number(value), LE); - } - get currentExtent() { - return new Extent2D(this.#data.subarray(8, 8 + Extent2D.size)); - } - set currentExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 8); - } - get minImageExtent() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - set minImageExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get maxImageExtent() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - set maxImageExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get maxImageArrayLayers() { - return this.#view.getUint32(32, LE); - } - set maxImageArrayLayers(value) { - this.#view.setUint32(32, Number(value), LE); - } - get supportedTransforms() { - return this.#view.getUint32(36, LE); - } - set supportedTransforms(value) { - this.#view.setUint32(36, Number(value), LE); - } - get currentTransform() { - return this.#view.getUint32(40, LE); - } - set currentTransform(value) { - this.#view.setUint32(40, Number(value), LE); - } - get supportedCompositeAlpha() { - return this.#view.getUint32(44, LE); - } - set supportedCompositeAlpha(value) { - this.#view.setUint32(44, Number(value), LE); - } - get supportedUsageFlags() { - return this.#view.getUint32(48, LE); - } - set supportedUsageFlags(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class AndroidSurfaceCreateInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AndroidSurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidSurfaceCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidSurfaceCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AndroidSurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.window && (this.window = data.window); - this.sType = StructureType.ANDROID_SURFACE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get window() { - return this.#view.getBigUint64(24, LE); - } - set window(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ViSurfaceCreateInfoNN { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ViSurfaceCreateInfoNN.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ViSurfaceCreateInfoNN.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ViSurfaceCreateInfoNN.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ViSurfaceCreateInfoNN.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.window && (this.window = data.window); - this.sType = StructureType.VI_SURFACE_CREATE_INFO_NN; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get window() { - return this.#view.getBigUint64(24, LE); - } - set window(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class WaylandSurfaceCreateInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(WaylandSurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WaylandSurfaceCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < WaylandSurfaceCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(WaylandSurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.display && (this.display = data.display), void 0 !== data.surface && (this.surface = data.surface); - this.sType = StructureType.WAYLAND_SURFACE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get display() { - return this.#view.getBigUint64(24, LE); - } - set display(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get surface() { - return this.#view.getBigUint64(32, LE); - } - set surface(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class Win32SurfaceCreateInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(Win32SurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Win32SurfaceCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < Win32SurfaceCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(Win32SurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.hinstance && (this.hinstance = data.hinstance), void 0 !== data.hwnd && (this.hwnd = data.hwnd); - this.sType = StructureType.WIN32_SURFACE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get hinstance() { - return this.#view.getBigUint64(24, LE); - } - set hinstance(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get hwnd() { - return this.#view.getBigUint64(32, LE); - } - set hwnd(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class XlibSurfaceCreateInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(XlibSurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, XlibSurfaceCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < XlibSurfaceCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(XlibSurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.dpy && (this.dpy = data.dpy), void 0 !== data.window && (this.window = data.window); - this.sType = StructureType.XLIB_SURFACE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dpy() { - return this.#view.getBigUint64(24, LE); - } - set dpy(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get window() { - return this.#view.getBigUint64(32, LE); - } - set window(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class XcbSurfaceCreateInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(XcbSurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, XcbSurfaceCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < XcbSurfaceCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(XcbSurfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.connection && (this.connection = data.connection), void 0 !== data.window && (this.window = data.window); - this.sType = StructureType.XCB_SURFACE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get connection() { - return this.#view.getBigUint64(24, LE); - } - set connection(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get window() { - return this.#view.getBigUint64(32, LE); - } - set window(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class DirectFBSurfaceCreateInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DirectFBSurfaceCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DirectFBSurfaceCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DirectFBSurfaceCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DirectFBSurfaceCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.dfb && (this.dfb = data.dfb), void 0 !== data.surface && (this.surface = data.surface); - this.sType = StructureType.DIRECTFB_SURFACE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dfb() { - return this.#view.getBigUint64(24, LE); - } - set dfb(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get surface() { - return this.#view.getBigUint64(32, LE); - } - set surface(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ImagePipeSurfaceCreateInfoFUCHSIA { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImagePipeSurfaceCreateInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImagePipeSurfaceCreateInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImagePipeSurfaceCreateInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImagePipeSurfaceCreateInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.imagePipeHandle && (this.imagePipeHandle = data.imagePipeHandle); - this.sType = StructureType.IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get imagePipeHandle() { - return this.#view.getBigUint64(24, LE); - } - set imagePipeHandle(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class StreamDescriptorSurfaceCreateInfoGGP { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StreamDescriptorSurfaceCreateInfoGGP.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StreamDescriptorSurfaceCreateInfoGGP.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StreamDescriptorSurfaceCreateInfoGGP.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StreamDescriptorSurfaceCreateInfoGGP.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.streamDescriptor && (this.streamDescriptor = data.streamDescriptor); - this.sType = StructureType.STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get streamDescriptor() { - return this.#view.getBigUint64(24, LE); - } - set streamDescriptor(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ScreenSurfaceCreateInfoQNX { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ScreenSurfaceCreateInfoQNX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ScreenSurfaceCreateInfoQNX.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ScreenSurfaceCreateInfoQNX.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ScreenSurfaceCreateInfoQNX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.context && (this.context = data.context), void 0 !== data.window && (this.window = data.window); - this.sType = StructureType.SCREEN_SURFACE_CREATE_INFO_QNX; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get context() { - return this.#view.getBigUint64(24, LE); - } - set context(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get window() { - return this.#view.getBigUint64(32, LE); - } - set window(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class SurfaceFormatKHR { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceFormatKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFormatKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceFormatKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceFormatKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.format && (this.format = data.format), void 0 !== data.colorSpace && (this.colorSpace = data.colorSpace); - } - get format() { - return this.#view.getUint32(0, LE); - } - set format(value) { - this.#view.setUint32(0, Number(value), LE); - } - get colorSpace() { - return this.#view.getUint32(4, LE); - } - set colorSpace(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class SwapchainCreateInfoKHR { - static size = 104; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SwapchainCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SwapchainCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.surface && (this.surface = data.surface), void 0 !== data.minImageCount && (this.minImageCount = data.minImageCount), void 0 !== data.imageFormat && (this.imageFormat = data.imageFormat), void 0 !== data.imageColorSpace && (this.imageColorSpace = data.imageColorSpace), void 0 !== data.imageExtent && (this.imageExtent = data.imageExtent), void 0 !== data.imageArrayLayers && (this.imageArrayLayers = data.imageArrayLayers), void 0 !== data.imageUsage && (this.imageUsage = data.imageUsage), void 0 !== data.imageSharingMode && (this.imageSharingMode = data.imageSharingMode), void 0 !== data.queueFamilyIndexCount && (this.queueFamilyIndexCount = data.queueFamilyIndexCount), void 0 !== data.pQueueFamilyIndices && (this.pQueueFamilyIndices = data.pQueueFamilyIndices), void 0 !== data.preTransform && (this.preTransform = data.preTransform), void 0 !== data.compositeAlpha && (this.compositeAlpha = data.compositeAlpha), void 0 !== data.presentMode && (this.presentMode = data.presentMode), void 0 !== data.clipped && (this.clipped = data.clipped), void 0 !== data.oldSwapchain && (this.oldSwapchain = data.oldSwapchain); - this.sType = StructureType.SWAPCHAIN_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get surface() { - return this.#view.getBigUint64(24, LE); - } - set surface(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get minImageCount() { - return this.#view.getUint32(32, LE); - } - set minImageCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get imageFormat() { - return this.#view.getUint32(36, LE); - } - set imageFormat(value) { - this.#view.setUint32(36, Number(value), LE); - } - get imageColorSpace() { - return this.#view.getUint32(40, LE); - } - set imageColorSpace(value) { - this.#view.setUint32(40, Number(value), LE); - } - get imageExtent() { - return new Extent2D(this.#data.subarray(44, 44 + Extent2D.size)); - } - set imageExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 44); - } - get imageArrayLayers() { - return this.#view.getUint32(52, LE); - } - set imageArrayLayers(value) { - this.#view.setUint32(52, Number(value), LE); - } - get imageUsage() { - return this.#view.getUint32(56, LE); - } - set imageUsage(value) { - this.#view.setUint32(56, Number(value), LE); - } - get imageSharingMode() { - return this.#view.getUint32(60, LE); - } - set imageSharingMode(value) { - this.#view.setUint32(60, Number(value), LE); - } - get queueFamilyIndexCount() { - return this.#view.getUint32(64, LE); - } - set queueFamilyIndexCount(value) { - this.#view.setUint32(64, Number(value), LE); - } - get pQueueFamilyIndices() { - return this.#view.getBigUint64(72, LE); - } - set pQueueFamilyIndices(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - get preTransform() { - return this.#view.getUint32(80, LE); - } - set preTransform(value) { - this.#view.setUint32(80, Number(value), LE); - } - get compositeAlpha() { - return this.#view.getUint32(84, LE); - } - set compositeAlpha(value) { - this.#view.setUint32(84, Number(value), LE); - } - get presentMode() { - return this.#view.getUint32(88, LE); - } - set presentMode(value) { - this.#view.setUint32(88, Number(value), LE); - } - get clipped() { - return this.#view.getUint32(92, LE); - } - set clipped(value) { - this.#view.setUint32(92, Number(value), LE); - } - get oldSwapchain() { - return this.#view.getBigUint64(96, LE); - } - set oldSwapchain(value) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } -} -export class PresentInfoKHR { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PresentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PresentInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PresentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.waitSemaphoreCount && (this.waitSemaphoreCount = data.waitSemaphoreCount), void 0 !== data.pWaitSemaphores && (this.pWaitSemaphores = data.pWaitSemaphores), void 0 !== data.swapchainCount && (this.swapchainCount = data.swapchainCount), void 0 !== data.pSwapchains && (this.pSwapchains = data.pSwapchains), void 0 !== data.pImageIndices && (this.pImageIndices = data.pImageIndices), void 0 !== data.pResults && (this.pResults = data.pResults); - this.sType = StructureType.PRESENT_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get waitSemaphoreCount() { - return this.#view.getUint32(16, LE); - } - set waitSemaphoreCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pWaitSemaphores() { - return this.#view.getBigUint64(24, LE); - } - set pWaitSemaphores(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get swapchainCount() { - return this.#view.getUint32(32, LE); - } - set swapchainCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pSwapchains() { - return this.#view.getBigUint64(40, LE); - } - set pSwapchains(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get pImageIndices() { - return this.#view.getBigUint64(48, LE); - } - set pImageIndices(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get pResults() { - return this.#view.getBigUint64(56, LE); - } - set pResults(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class DebugReportCallbackCreateInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DebugReportCallbackCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugReportCallbackCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DebugReportCallbackCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DebugReportCallbackCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pfnCallback && (this.pfnCallback = data.pfnCallback), void 0 !== data.pUserData && (this.pUserData = data.pUserData); - this.sType = StructureType.DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pfnCallback() { - throw new Error('Unknown type: "function"'); - } - set pfnCallback(value) { - throw new Error('Unknown type: "function"'); - } - get pUserData() { - return this.#view.getBigUint64(32, LE); - } - set pUserData(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ValidationFlagsEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ValidationFlagsEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ValidationFlagsEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ValidationFlagsEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ValidationFlagsEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.disabledValidationCheckCount && (this.disabledValidationCheckCount = data.disabledValidationCheckCount), void 0 !== data.pDisabledValidationChecks && (this.pDisabledValidationChecks = data.pDisabledValidationChecks); - this.sType = StructureType.VALIDATION_FLAGS_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get disabledValidationCheckCount() { - return this.#view.getUint32(16, LE); - } - set disabledValidationCheckCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pDisabledValidationChecks() { - return this.#view.getBigUint64(24, LE); - } - set pDisabledValidationChecks(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ValidationFeaturesEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ValidationFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ValidationFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ValidationFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ValidationFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.enabledValidationFeatureCount && (this.enabledValidationFeatureCount = data.enabledValidationFeatureCount), void 0 !== data.pEnabledValidationFeatures && (this.pEnabledValidationFeatures = data.pEnabledValidationFeatures), void 0 !== data.disabledValidationFeatureCount && (this.disabledValidationFeatureCount = data.disabledValidationFeatureCount), void 0 !== data.pDisabledValidationFeatures && (this.pDisabledValidationFeatures = data.pDisabledValidationFeatures); - this.sType = StructureType.VALIDATION_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get enabledValidationFeatureCount() { - return this.#view.getUint32(16, LE); - } - set enabledValidationFeatureCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pEnabledValidationFeatures() { - return this.#view.getBigUint64(24, LE); - } - set pEnabledValidationFeatures(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get disabledValidationFeatureCount() { - return this.#view.getUint32(32, LE); - } - set disabledValidationFeatureCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pDisabledValidationFeatures() { - return this.#view.getBigUint64(40, LE); - } - set pDisabledValidationFeatures(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class PipelineRasterizationStateRasterizationOrderAMD { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRasterizationStateRasterizationOrderAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationStateRasterizationOrderAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationStateRasterizationOrderAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRasterizationStateRasterizationOrderAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.rasterizationOrder && (this.rasterizationOrder = data.rasterizationOrder); - this.sType = StructureType.PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get rasterizationOrder() { - return this.#view.getUint32(16, LE); - } - set rasterizationOrder(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DebugMarkerObjectNameInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DebugMarkerObjectNameInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugMarkerObjectNameInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DebugMarkerObjectNameInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DebugMarkerObjectNameInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.objectType && (this.objectType = data.objectType), void 0 !== data.object && (this.object = data.object), void 0 !== data.pObjectName && (this.pObjectName = data.pObjectName); - this.sType = StructureType.DEBUG_MARKER_OBJECT_NAME_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get objectType() { - return this.#view.getUint32(16, LE); - } - set objectType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get object() { - return this.#view.getBigUint64(24, LE); - } - set object(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get pObjectName() { - return this.#view.getBigUint64(32, LE); - } - set pObjectName(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class DebugMarkerObjectTagInfoEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DebugMarkerObjectTagInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugMarkerObjectTagInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DebugMarkerObjectTagInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DebugMarkerObjectTagInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.objectType && (this.objectType = data.objectType), void 0 !== data.object && (this.object = data.object), void 0 !== data.tagName && (this.tagName = data.tagName), void 0 !== data.tagSize && (this.tagSize = data.tagSize), void 0 !== data.pTag && (this.pTag = data.pTag); - this.sType = StructureType.DEBUG_MARKER_OBJECT_TAG_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get objectType() { - return this.#view.getUint32(16, LE); - } - set objectType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get object() { - return this.#view.getBigUint64(24, LE); - } - set object(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get tagName() { - return this.#view.getBigUint64(32, LE); - } - set tagName(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get tagSize() { - return this.#view.getBigUint64(40, LE); - } - set tagSize(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get pTag() { - return this.#view.getBigUint64(48, LE); - } - set pTag(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class DebugMarkerMarkerInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DebugMarkerMarkerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugMarkerMarkerInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DebugMarkerMarkerInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DebugMarkerMarkerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pMarkerName && (this.pMarkerName = data.pMarkerName), void 0 !== data.color && (this.color = data.color); - this.sType = StructureType.DEBUG_MARKER_MARKER_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pMarkerName() { - return this.#view.getBigUint64(16, LE); - } - set pMarkerName(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get color() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 24, 4); - } - set color(value) { - this.#data.set(new Uint8Array(value.buffer), 24); - } -} -export class DedicatedAllocationImageCreateInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DedicatedAllocationImageCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DedicatedAllocationImageCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DedicatedAllocationImageCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DedicatedAllocationImageCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.dedicatedAllocation && (this.dedicatedAllocation = data.dedicatedAllocation); - this.sType = StructureType.DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dedicatedAllocation() { - return this.#view.getUint32(16, LE); - } - set dedicatedAllocation(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DedicatedAllocationBufferCreateInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DedicatedAllocationBufferCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DedicatedAllocationBufferCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DedicatedAllocationBufferCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DedicatedAllocationBufferCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.dedicatedAllocation && (this.dedicatedAllocation = data.dedicatedAllocation); - this.sType = StructureType.DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dedicatedAllocation() { - return this.#view.getUint32(16, LE); - } - set dedicatedAllocation(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DedicatedAllocationMemoryAllocateInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DedicatedAllocationMemoryAllocateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DedicatedAllocationMemoryAllocateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DedicatedAllocationMemoryAllocateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DedicatedAllocationMemoryAllocateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.image && (this.image = data.image), void 0 !== data.buffer && (this.buffer = data.buffer); - this.sType = StructureType.DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get image() { - return this.#view.getBigUint64(16, LE); - } - set image(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get buffer() { - return this.#view.getBigUint64(24, LE); - } - set buffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ExternalImageFormatPropertiesNV { - static size = 44; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalImageFormatPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalImageFormatPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalImageFormatPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalImageFormatPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.imageFormatProperties && (this.imageFormatProperties = data.imageFormatProperties), void 0 !== data.externalMemoryFeatures && (this.externalMemoryFeatures = data.externalMemoryFeatures), void 0 !== data.exportFromImportedHandleTypes && (this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes), void 0 !== data.compatibleHandleTypes && (this.compatibleHandleTypes = data.compatibleHandleTypes); - } - get imageFormatProperties() { - return new ImageFormatProperties(this.#data.subarray(0, 0 + ImageFormatProperties.size)); - } - set imageFormatProperties(value) { - if (value[BUFFER].byteLength < ImageFormatProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get externalMemoryFeatures() { - return this.#view.getUint32(32, LE); - } - set externalMemoryFeatures(value) { - this.#view.setUint32(32, Number(value), LE); - } - get exportFromImportedHandleTypes() { - return this.#view.getUint32(36, LE); - } - set exportFromImportedHandleTypes(value) { - this.#view.setUint32(36, Number(value), LE); - } - get compatibleHandleTypes() { - return this.#view.getUint32(40, LE); - } - set compatibleHandleTypes(value) { - this.#view.setUint32(40, Number(value), LE); - } -} -export class ExternalMemoryImageCreateInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalMemoryImageCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryImageCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalMemoryImageCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalMemoryImageCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleTypes && (this.handleTypes = data.handleTypes); - this.sType = StructureType.EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleTypes() { - return this.#view.getUint32(16, LE); - } - set handleTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ExportMemoryAllocateInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMemoryAllocateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryAllocateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMemoryAllocateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMemoryAllocateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleTypes && (this.handleTypes = data.handleTypes); - this.sType = StructureType.EXPORT_MEMORY_ALLOCATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleTypes() { - return this.#view.getUint32(16, LE); - } - set handleTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImportMemoryWin32HandleInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMemoryWin32HandleInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryWin32HandleInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryWin32HandleInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMemoryWin32HandleInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.handle && (this.handle = data.handle); - this.sType = StructureType.IMPORT_MEMORY_WIN32_HANDLE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(16, LE); - } - set handleType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get handle() { - return this.#view.getBigUint64(24, LE); - } - set handle(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ExportMemoryWin32HandleInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMemoryWin32HandleInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryWin32HandleInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMemoryWin32HandleInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMemoryWin32HandleInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pAttributes && (this.pAttributes = data.pAttributes), void 0 !== data.dwAccess && (this.dwAccess = data.dwAccess); - this.sType = StructureType.EXPORT_MEMORY_WIN32_HANDLE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pAttributes() { - return this.#view.getBigUint64(16, LE); - } - set pAttributes(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dwAccess() { - return this.#view.getUint32(24, LE); - } - set dwAccess(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class Win32KeyedMutexAcquireReleaseInfoNV { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Win32KeyedMutexAcquireReleaseInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < Win32KeyedMutexAcquireReleaseInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.acquireCount && (this.acquireCount = data.acquireCount), void 0 !== data.pAcquireSyncs && (this.pAcquireSyncs = data.pAcquireSyncs), void 0 !== data.pAcquireKeys && (this.pAcquireKeys = data.pAcquireKeys), void 0 !== data.pAcquireTimeoutMilliseconds && (this.pAcquireTimeoutMilliseconds = data.pAcquireTimeoutMilliseconds), void 0 !== data.releaseCount && (this.releaseCount = data.releaseCount), void 0 !== data.pReleaseSyncs && (this.pReleaseSyncs = data.pReleaseSyncs), void 0 !== data.pReleaseKeys && (this.pReleaseKeys = data.pReleaseKeys); - this.sType = StructureType.WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get acquireCount() { - return this.#view.getUint32(16, LE); - } - set acquireCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pAcquireSyncs() { - return this.#view.getBigUint64(24, LE); - } - set pAcquireSyncs(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pAcquireKeys() { - return this.#view.getBigUint64(32, LE); - } - set pAcquireKeys(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get pAcquireTimeoutMilliseconds() { - return this.#view.getBigUint64(40, LE); - } - set pAcquireTimeoutMilliseconds(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get releaseCount() { - return this.#view.getUint32(48, LE); - } - set releaseCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pReleaseSyncs() { - return this.#view.getBigUint64(56, LE); - } - set pReleaseSyncs(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get pReleaseKeys() { - return this.#view.getBigUint64(64, LE); - } - set pReleaseKeys(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceDeviceGeneratedCommandsFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceGeneratedCommands && (this.deviceGeneratedCommands = data.deviceGeneratedCommands); - this.sType = StructureType.PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceGeneratedCommands() { - return this.#view.getUint32(16, LE); - } - set deviceGeneratedCommands(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DevicePrivateDataCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DevicePrivateDataCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DevicePrivateDataCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DevicePrivateDataCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DevicePrivateDataCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.privateDataSlotRequestCount && (this.privateDataSlotRequestCount = data.privateDataSlotRequestCount); - this.sType = StructureType.DEVICE_PRIVATE_DATA_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get privateDataSlotRequestCount() { - return this.#view.getUint32(16, LE); - } - set privateDataSlotRequestCount(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PrivateDataSlotCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PrivateDataSlotCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PrivateDataSlotCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PrivateDataSlotCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PrivateDataSlotCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.PRIVATE_DATA_SLOT_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevicePrivateDataFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePrivateDataFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePrivateDataFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePrivateDataFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePrivateDataFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.privateData && (this.privateData = data.privateData); - this.sType = StructureType.PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get privateData() { - return this.#view.getUint32(16, LE); - } - set privateData(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceDeviceGeneratedCommandsPropertiesNV { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxGraphicsShaderGroupCount && (this.maxGraphicsShaderGroupCount = data.maxGraphicsShaderGroupCount), void 0 !== data.maxIndirectSequenceCount && (this.maxIndirectSequenceCount = data.maxIndirectSequenceCount), void 0 !== data.maxIndirectCommandsTokenCount && (this.maxIndirectCommandsTokenCount = data.maxIndirectCommandsTokenCount), void 0 !== data.maxIndirectCommandsStreamCount && (this.maxIndirectCommandsStreamCount = data.maxIndirectCommandsStreamCount), void 0 !== data.maxIndirectCommandsTokenOffset && (this.maxIndirectCommandsTokenOffset = data.maxIndirectCommandsTokenOffset), void 0 !== data.maxIndirectCommandsStreamStride && (this.maxIndirectCommandsStreamStride = data.maxIndirectCommandsStreamStride), void 0 !== data.minSequencesCountBufferOffsetAlignment && (this.minSequencesCountBufferOffsetAlignment = data.minSequencesCountBufferOffsetAlignment), void 0 !== data.minSequencesIndexBufferOffsetAlignment && (this.minSequencesIndexBufferOffsetAlignment = data.minSequencesIndexBufferOffsetAlignment), void 0 !== data.minIndirectCommandsBufferOffsetAlignment && (this.minIndirectCommandsBufferOffsetAlignment = data.minIndirectCommandsBufferOffsetAlignment); - this.sType = StructureType.PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxGraphicsShaderGroupCount() { - return this.#view.getUint32(16, LE); - } - set maxGraphicsShaderGroupCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxIndirectSequenceCount() { - return this.#view.getUint32(20, LE); - } - set maxIndirectSequenceCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxIndirectCommandsTokenCount() { - return this.#view.getUint32(24, LE); - } - set maxIndirectCommandsTokenCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get maxIndirectCommandsStreamCount() { - return this.#view.getUint32(28, LE); - } - set maxIndirectCommandsStreamCount(value) { - this.#view.setUint32(28, Number(value), LE); - } - get maxIndirectCommandsTokenOffset() { - return this.#view.getUint32(32, LE); - } - set maxIndirectCommandsTokenOffset(value) { - this.#view.setUint32(32, Number(value), LE); - } - get maxIndirectCommandsStreamStride() { - return this.#view.getUint32(36, LE); - } - set maxIndirectCommandsStreamStride(value) { - this.#view.setUint32(36, Number(value), LE); - } - get minSequencesCountBufferOffsetAlignment() { - return this.#view.getUint32(40, LE); - } - set minSequencesCountBufferOffsetAlignment(value) { - this.#view.setUint32(40, Number(value), LE); - } - get minSequencesIndexBufferOffsetAlignment() { - return this.#view.getUint32(44, LE); - } - set minSequencesIndexBufferOffsetAlignment(value) { - this.#view.setUint32(44, Number(value), LE); - } - get minIndirectCommandsBufferOffsetAlignment() { - return this.#view.getUint32(48, LE); - } - set minIndirectCommandsBufferOffsetAlignment(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class PhysicalDeviceMultiDrawPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMultiDrawPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiDrawPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiDrawPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMultiDrawPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxMultiDrawCount && (this.maxMultiDrawCount = data.maxMultiDrawCount); - this.sType = StructureType.PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxMultiDrawCount() { - return this.#view.getUint32(16, LE); - } - set maxMultiDrawCount(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class GraphicsShaderGroupCreateInfoNV { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GraphicsShaderGroupCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsShaderGroupCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GraphicsShaderGroupCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GraphicsShaderGroupCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stageCount && (this.stageCount = data.stageCount), void 0 !== data.pStages && (this.pStages = data.pStages), void 0 !== data.pVertexInputState && (this.pVertexInputState = data.pVertexInputState), void 0 !== data.pTessellationState && (this.pTessellationState = data.pTessellationState); - this.sType = StructureType.GRAPHICS_SHADER_GROUP_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stageCount() { - return this.#view.getUint32(16, LE); - } - set stageCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pStages() { - return this.#view.getBigUint64(24, LE); - } - set pStages(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pVertexInputState() { - return this.#view.getBigUint64(32, LE); - } - set pVertexInputState(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get pTessellationState() { - return this.#view.getBigUint64(40, LE); - } - set pTessellationState(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class GraphicsPipelineShaderGroupsCreateInfoNV { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GraphicsPipelineShaderGroupsCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsPipelineShaderGroupsCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GraphicsPipelineShaderGroupsCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GraphicsPipelineShaderGroupsCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.groupCount && (this.groupCount = data.groupCount), void 0 !== data.pGroups && (this.pGroups = data.pGroups), void 0 !== data.pipelineCount && (this.pipelineCount = data.pipelineCount), void 0 !== data.pPipelines && (this.pPipelines = data.pPipelines); - this.sType = StructureType.GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get groupCount() { - return this.#view.getUint32(16, LE); - } - set groupCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pGroups() { - return this.#view.getBigUint64(24, LE); - } - set pGroups(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pipelineCount() { - return this.#view.getUint32(32, LE); - } - set pipelineCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pPipelines() { - return this.#view.getBigUint64(40, LE); - } - set pPipelines(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class BindShaderGroupIndirectCommandNV { - static size = 4; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindShaderGroupIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindShaderGroupIndirectCommandNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindShaderGroupIndirectCommandNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindShaderGroupIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.groupIndex && (this.groupIndex = data.groupIndex); - } - get groupIndex() { - return this.#view.getUint32(0, LE); - } - set groupIndex(value) { - this.#view.setUint32(0, Number(value), LE); - } -} -export class BindIndexBufferIndirectCommandNV { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindIndexBufferIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindIndexBufferIndirectCommandNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindIndexBufferIndirectCommandNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindIndexBufferIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.bufferAddress && (this.bufferAddress = data.bufferAddress), void 0 !== data.size && (this.size = data.size), void 0 !== data.indexType && (this.indexType = data.indexType); - } - get bufferAddress() { - return this.#view.getBigUint64(0, LE); - } - set bufferAddress(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get size() { - return this.#view.getUint32(8, LE); - } - set size(value) { - this.#view.setUint32(8, Number(value), LE); - } - get indexType() { - return this.#view.getUint32(12, LE); - } - set indexType(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class BindVertexBufferIndirectCommandNV { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindVertexBufferIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindVertexBufferIndirectCommandNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindVertexBufferIndirectCommandNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindVertexBufferIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.bufferAddress && (this.bufferAddress = data.bufferAddress), void 0 !== data.size && (this.size = data.size), void 0 !== data.stride && (this.stride = data.stride); - } - get bufferAddress() { - return this.#view.getBigUint64(0, LE); - } - set bufferAddress(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get size() { - return this.#view.getUint32(8, LE); - } - set size(value) { - this.#view.setUint32(8, Number(value), LE); - } - get stride() { - return this.#view.getUint32(12, LE); - } - set stride(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class SetStateFlagsIndirectCommandNV { - static size = 4; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SetStateFlagsIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SetStateFlagsIndirectCommandNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SetStateFlagsIndirectCommandNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SetStateFlagsIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.data && (this.data = data.data); - } - get data() { - return this.#view.getUint32(0, LE); - } - set data(value) { - this.#view.setUint32(0, Number(value), LE); - } -} -export class IndirectCommandsStreamNV { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(IndirectCommandsStreamNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IndirectCommandsStreamNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < IndirectCommandsStreamNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(IndirectCommandsStreamNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.offset && (this.offset = data.offset); - } - get buffer() { - return this.#view.getBigUint64(0, LE); - } - set buffer(value) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - get offset() { - return this.#view.getBigUint64(8, LE); - } - set offset(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} -export class IndirectCommandsLayoutTokenNV { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(IndirectCommandsLayoutTokenNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IndirectCommandsLayoutTokenNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < IndirectCommandsLayoutTokenNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(IndirectCommandsLayoutTokenNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.tokenType && (this.tokenType = data.tokenType), void 0 !== data.stream && (this.stream = data.stream), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.vertexBindingUnit && (this.vertexBindingUnit = data.vertexBindingUnit), void 0 !== data.vertexDynamicStride && (this.vertexDynamicStride = data.vertexDynamicStride), void 0 !== data.pushconstantPipelineLayout && (this.pushconstantPipelineLayout = data.pushconstantPipelineLayout), void 0 !== data.pushconstantShaderStageFlags && (this.pushconstantShaderStageFlags = data.pushconstantShaderStageFlags), void 0 !== data.pushconstantOffset && (this.pushconstantOffset = data.pushconstantOffset), void 0 !== data.pushconstantSize && (this.pushconstantSize = data.pushconstantSize), void 0 !== data.indirectStateFlags && (this.indirectStateFlags = data.indirectStateFlags), void 0 !== data.indexTypeCount && (this.indexTypeCount = data.indexTypeCount), void 0 !== data.pIndexTypes && (this.pIndexTypes = data.pIndexTypes), void 0 !== data.pIndexTypeValues && (this.pIndexTypeValues = data.pIndexTypeValues); - this.sType = StructureType.INDIRECT_COMMANDS_LAYOUT_TOKEN_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get tokenType() { - return this.#view.getUint32(16, LE); - } - set tokenType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stream() { - return this.#view.getUint32(20, LE); - } - set stream(value) { - this.#view.setUint32(20, Number(value), LE); - } - get offset() { - return this.#view.getUint32(24, LE); - } - set offset(value) { - this.#view.setUint32(24, Number(value), LE); - } - get vertexBindingUnit() { - return this.#view.getUint32(28, LE); - } - set vertexBindingUnit(value) { - this.#view.setUint32(28, Number(value), LE); - } - get vertexDynamicStride() { - return this.#view.getUint32(32, LE); - } - set vertexDynamicStride(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pushconstantPipelineLayout() { - return this.#view.getBigUint64(40, LE); - } - set pushconstantPipelineLayout(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get pushconstantShaderStageFlags() { - return this.#view.getUint32(48, LE); - } - set pushconstantShaderStageFlags(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pushconstantOffset() { - return this.#view.getUint32(52, LE); - } - set pushconstantOffset(value) { - this.#view.setUint32(52, Number(value), LE); - } - get pushconstantSize() { - return this.#view.getUint32(56, LE); - } - set pushconstantSize(value) { - this.#view.setUint32(56, Number(value), LE); - } - get indirectStateFlags() { - return this.#view.getUint32(60, LE); - } - set indirectStateFlags(value) { - this.#view.setUint32(60, Number(value), LE); - } - get indexTypeCount() { - return this.#view.getUint32(64, LE); - } - set indexTypeCount(value) { - this.#view.setUint32(64, Number(value), LE); - } - get pIndexTypes() { - return this.#view.getBigUint64(72, LE); - } - set pIndexTypes(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - get pIndexTypeValues() { - return this.#view.getBigUint64(80, LE); - } - set pIndexTypeValues(value) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } -} -export class IndirectCommandsLayoutCreateInfoNV { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(IndirectCommandsLayoutCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IndirectCommandsLayoutCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < IndirectCommandsLayoutCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(IndirectCommandsLayoutCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pipelineBindPoint && (this.pipelineBindPoint = data.pipelineBindPoint), void 0 !== data.tokenCount && (this.tokenCount = data.tokenCount), void 0 !== data.pTokens && (this.pTokens = data.pTokens), void 0 !== data.streamCount && (this.streamCount = data.streamCount), void 0 !== data.pStreamStrides && (this.pStreamStrides = data.pStreamStrides); - this.sType = StructureType.INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pipelineBindPoint() { - return this.#view.getUint32(20, LE); - } - set pipelineBindPoint(value) { - this.#view.setUint32(20, Number(value), LE); - } - get tokenCount() { - return this.#view.getUint32(24, LE); - } - set tokenCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pTokens() { - return this.#view.getBigUint64(32, LE); - } - set pTokens(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get streamCount() { - return this.#view.getUint32(40, LE); - } - set streamCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pStreamStrides() { - return this.#view.getBigUint64(48, LE); - } - set pStreamStrides(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class GeneratedCommandsInfoNV { - static size = 120; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GeneratedCommandsInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeneratedCommandsInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GeneratedCommandsInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GeneratedCommandsInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipelineBindPoint && (this.pipelineBindPoint = data.pipelineBindPoint), void 0 !== data.pipeline && (this.pipeline = data.pipeline), void 0 !== data.indirectCommandsLayout && (this.indirectCommandsLayout = data.indirectCommandsLayout), void 0 !== data.streamCount && (this.streamCount = data.streamCount), void 0 !== data.pStreams && (this.pStreams = data.pStreams), void 0 !== data.sequencesCount && (this.sequencesCount = data.sequencesCount), void 0 !== data.preprocessBuffer && (this.preprocessBuffer = data.preprocessBuffer), void 0 !== data.preprocessOffset && (this.preprocessOffset = data.preprocessOffset), void 0 !== data.preprocessSize && (this.preprocessSize = data.preprocessSize), void 0 !== data.sequencesCountBuffer && (this.sequencesCountBuffer = data.sequencesCountBuffer), void 0 !== data.sequencesCountOffset && (this.sequencesCountOffset = data.sequencesCountOffset), void 0 !== data.sequencesIndexBuffer && (this.sequencesIndexBuffer = data.sequencesIndexBuffer), void 0 !== data.sequencesIndexOffset && (this.sequencesIndexOffset = data.sequencesIndexOffset); - this.sType = StructureType.GENERATED_COMMANDS_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipelineBindPoint() { - return this.#view.getUint32(16, LE); - } - set pipelineBindPoint(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pipeline() { - return this.#view.getBigUint64(24, LE); - } - set pipeline(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get indirectCommandsLayout() { - return this.#view.getBigUint64(32, LE); - } - set indirectCommandsLayout(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get streamCount() { - return this.#view.getUint32(40, LE); - } - set streamCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pStreams() { - return this.#view.getBigUint64(48, LE); - } - set pStreams(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get sequencesCount() { - return this.#view.getUint32(56, LE); - } - set sequencesCount(value) { - this.#view.setUint32(56, Number(value), LE); - } - get preprocessBuffer() { - return this.#view.getBigUint64(64, LE); - } - set preprocessBuffer(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - get preprocessOffset() { - return this.#view.getBigUint64(72, LE); - } - set preprocessOffset(value) { - this.#view.setBigUint64(72, BigInt(value), LE); - } - get preprocessSize() { - return this.#view.getBigUint64(80, LE); - } - set preprocessSize(value) { - this.#view.setBigUint64(80, BigInt(value), LE); - } - get sequencesCountBuffer() { - return this.#view.getBigUint64(88, LE); - } - set sequencesCountBuffer(value) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } - get sequencesCountOffset() { - return this.#view.getBigUint64(96, LE); - } - set sequencesCountOffset(value) { - this.#view.setBigUint64(96, BigInt(value), LE); - } - get sequencesIndexBuffer() { - return this.#view.getBigUint64(104, LE); - } - set sequencesIndexBuffer(value) { - this.#view.setBigUint64(104, BigInt(anyPointer(value)), LE); - } - get sequencesIndexOffset() { - return this.#view.getBigUint64(112, LE); - } - set sequencesIndexOffset(value) { - this.#view.setBigUint64(112, BigInt(value), LE); - } -} -export class GeneratedCommandsMemoryRequirementsInfoNV { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GeneratedCommandsMemoryRequirementsInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeneratedCommandsMemoryRequirementsInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GeneratedCommandsMemoryRequirementsInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GeneratedCommandsMemoryRequirementsInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipelineBindPoint && (this.pipelineBindPoint = data.pipelineBindPoint), void 0 !== data.pipeline && (this.pipeline = data.pipeline), void 0 !== data.indirectCommandsLayout && (this.indirectCommandsLayout = data.indirectCommandsLayout), void 0 !== data.maxSequencesCount && (this.maxSequencesCount = data.maxSequencesCount); - this.sType = StructureType.GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipelineBindPoint() { - return this.#view.getUint32(16, LE); - } - set pipelineBindPoint(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pipeline() { - return this.#view.getBigUint64(24, LE); - } - set pipeline(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get indirectCommandsLayout() { - return this.#view.getBigUint64(32, LE); - } - set indirectCommandsLayout(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get maxSequencesCount() { - return this.#view.getUint32(40, LE); - } - set maxSequencesCount(value) { - this.#view.setUint32(40, Number(value), LE); - } -} -export class PhysicalDeviceFeatures2 { - static size = 240; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFeatures2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFeatures2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFeatures2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFeatures2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.features && (this.features = data.features); - this.sType = StructureType.PHYSICAL_DEVICE_FEATURES_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get features() { - return new PhysicalDeviceFeatures(this.#data.subarray(16, 16 + PhysicalDeviceFeatures.size)); - } - set features(value) { - if (value[BUFFER].byteLength < PhysicalDeviceFeatures.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class PhysicalDeviceProperties2 { - static size = 536; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProperties2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProperties2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.properties && (this.properties = data.properties); - this.sType = StructureType.PHYSICAL_DEVICE_PROPERTIES_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get properties() { - return new PhysicalDeviceProperties(this.#data.subarray(16, 16 + PhysicalDeviceProperties.size)); - } - set properties(value) { - if (value[BUFFER].byteLength < PhysicalDeviceProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class FormatProperties2 { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FormatProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FormatProperties2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FormatProperties2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FormatProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.formatProperties && (this.formatProperties = data.formatProperties); - this.sType = StructureType.FORMAT_PROPERTIES_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get formatProperties() { - return new FormatProperties(this.#data.subarray(16, 16 + FormatProperties.size)); - } - set formatProperties(value) { - if (value[BUFFER].byteLength < FormatProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class ImageFormatProperties2 { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageFormatProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatProperties2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageFormatProperties2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageFormatProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageFormatProperties && (this.imageFormatProperties = data.imageFormatProperties); - this.sType = StructureType.IMAGE_FORMAT_PROPERTIES_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageFormatProperties() { - return new ImageFormatProperties(this.#data.subarray(16, 16 + ImageFormatProperties.size)); - } - set imageFormatProperties(value) { - if (value[BUFFER].byteLength < ImageFormatProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class PhysicalDeviceImageFormatInfo2 { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImageFormatInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageFormatInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageFormatInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImageFormatInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.format && (this.format = data.format), void 0 !== data.type && (this.type = data.type), void 0 !== data.tiling && (this.tiling = data.tiling), void 0 !== data.usage && (this.usage = data.usage), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get format() { - return this.#view.getUint32(16, LE); - } - set format(value) { - this.#view.setUint32(16, Number(value), LE); - } - get type() { - return this.#view.getUint32(20, LE); - } - set type(value) { - this.#view.setUint32(20, Number(value), LE); - } - get tiling() { - return this.#view.getUint32(24, LE); - } - set tiling(value) { - this.#view.setUint32(24, Number(value), LE); - } - get usage() { - return this.#view.getUint32(28, LE); - } - set usage(value) { - this.#view.setUint32(28, Number(value), LE); - } - get flags() { - return this.#view.getUint32(32, LE); - } - set flags(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class QueueFamilyProperties2 { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueueFamilyProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyProperties2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyProperties2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueueFamilyProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.queueFamilyProperties && (this.queueFamilyProperties = data.queueFamilyProperties); - this.sType = StructureType.QUEUE_FAMILY_PROPERTIES_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get queueFamilyProperties() { - return new QueueFamilyProperties(this.#data.subarray(16, 16 + QueueFamilyProperties.size)); - } - set queueFamilyProperties(value) { - if (value[BUFFER].byteLength < QueueFamilyProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class PhysicalDeviceMemoryProperties2 { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMemoryProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryProperties2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryProperties2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMemoryProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryProperties && (this.memoryProperties = data.memoryProperties); - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_PROPERTIES_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryProperties() { - return new PhysicalDeviceMemoryProperties(this.#data.subarray(16, 16 + PhysicalDeviceMemoryProperties.size)); - } - set memoryProperties(value) { - if (value[BUFFER].byteLength < PhysicalDeviceMemoryProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class SparseImageFormatProperties2 { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SparseImageFormatProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageFormatProperties2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageFormatProperties2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SparseImageFormatProperties2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.properties && (this.properties = data.properties); - this.sType = StructureType.SPARSE_IMAGE_FORMAT_PROPERTIES_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get properties() { - return new SparseImageFormatProperties(this.#data.subarray(16, 16 + SparseImageFormatProperties.size)); - } - set properties(value) { - if (value[BUFFER].byteLength < SparseImageFormatProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class PhysicalDeviceSparseImageFormatInfo2 { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSparseImageFormatInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSparseImageFormatInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSparseImageFormatInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSparseImageFormatInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.format && (this.format = data.format), void 0 !== data.type && (this.type = data.type), void 0 !== data.samples && (this.samples = data.samples), void 0 !== data.usage && (this.usage = data.usage), void 0 !== data.tiling && (this.tiling = data.tiling); - this.sType = StructureType.PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get format() { - return this.#view.getUint32(16, LE); - } - set format(value) { - this.#view.setUint32(16, Number(value), LE); - } - get type() { - return this.#view.getUint32(20, LE); - } - set type(value) { - this.#view.setUint32(20, Number(value), LE); - } - get samples() { - return this.#view.getUint32(24, LE); - } - set samples(value) { - this.#view.setUint32(24, Number(value), LE); - } - get usage() { - return this.#view.getUint32(28, LE); - } - set usage(value) { - this.#view.setUint32(28, Number(value), LE); - } - get tiling() { - return this.#view.getUint32(32, LE); - } - set tiling(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class PhysicalDevicePushDescriptorPropertiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePushDescriptorPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePushDescriptorPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePushDescriptorPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePushDescriptorPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxPushDescriptors && (this.maxPushDescriptors = data.maxPushDescriptors); - this.sType = StructureType.PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxPushDescriptors() { - return this.#view.getUint32(16, LE); - } - set maxPushDescriptors(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ConformanceVersion { - static size = 4; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ConformanceVersion.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ConformanceVersion.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ConformanceVersion.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ConformanceVersion.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.major && (this.major = data.major), void 0 !== data.minor && (this.minor = data.minor), void 0 !== data.subminor && (this.subminor = data.subminor), void 0 !== data.patch && (this.patch = data.patch); - } - get major() { - return this.#view.getUint8(0); - } - set major(value) { - this.#view.setUint8(0, Number(value)); - } - get minor() { - return this.#view.getUint8(1); - } - set minor(value) { - this.#view.setUint8(1, Number(value)); - } - get subminor() { - return this.#view.getUint8(2); - } - set subminor(value) { - this.#view.setUint8(2, Number(value)); - } - get patch() { - return this.#view.getUint8(3); - } - set patch(value) { - this.#view.setUint8(3, Number(value)); - } -} -export class PhysicalDeviceDriverProperties { - static size = 536; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDriverProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDriverProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDriverProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDriverProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.driverID && (this.driverID = data.driverID), void 0 !== data.driverName && (this.driverName = data.driverName), void 0 !== data.driverInfo && (this.driverInfo = data.driverInfo), void 0 !== data.conformanceVersion && (this.conformanceVersion = data.conformanceVersion); - this.sType = StructureType.PHYSICAL_DEVICE_DRIVER_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get driverID() { - return this.#view.getUint32(16, LE); - } - set driverID(value) { - this.#view.setUint32(16, Number(value), LE); - } - get driverName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - set driverName(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - get driverInfo() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); - } - set driverInfo(value) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - get conformanceVersion() { - return new ConformanceVersion(this.#data.subarray(532, 532 + ConformanceVersion.size)); - } - set conformanceVersion(value) { - if (value[BUFFER].byteLength < ConformanceVersion.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 532); - } -} -export class PresentRegionsKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PresentRegionsKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentRegionsKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PresentRegionsKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PresentRegionsKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.swapchainCount && (this.swapchainCount = data.swapchainCount), void 0 !== data.pRegions && (this.pRegions = data.pRegions); - this.sType = StructureType.PRESENT_REGIONS_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get swapchainCount() { - return this.#view.getUint32(16, LE); - } - set swapchainCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pRegions() { - return this.#view.getBigUint64(24, LE); - } - set pRegions(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PresentRegionKHR { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PresentRegionKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentRegionKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PresentRegionKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PresentRegionKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.rectangleCount && (this.rectangleCount = data.rectangleCount), void 0 !== data.pRectangles && (this.pRectangles = data.pRectangles); - } - get rectangleCount() { - return this.#view.getUint32(0, LE); - } - set rectangleCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pRectangles() { - return this.#view.getBigUint64(8, LE); - } - set pRectangles(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} -export class RectLayerKHR { - static size = 20; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RectLayerKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RectLayerKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RectLayerKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RectLayerKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.extent && (this.extent = data.extent), void 0 !== data.layer && (this.layer = data.layer); - } - get offset() { - return new Offset2D(this.#data.subarray(0, 0 + Offset2D.size)); - } - set offset(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get extent() { - return new Extent2D(this.#data.subarray(8, 8 + Extent2D.size)); - } - set extent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 8); - } - get layer() { - return this.#view.getUint32(16, LE); - } - set layer(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceVariablePointersFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVariablePointersFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVariablePointersFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVariablePointersFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVariablePointersFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.variablePointersStorageBuffer && (this.variablePointersStorageBuffer = data.variablePointersStorageBuffer), void 0 !== data.variablePointers && (this.variablePointers = data.variablePointers); - this.sType = StructureType.PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get variablePointersStorageBuffer() { - return this.#view.getUint32(16, LE); - } - set variablePointersStorageBuffer(value) { - this.#view.setUint32(16, Number(value), LE); - } - get variablePointers() { - return this.#view.getUint32(20, LE); - } - set variablePointers(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class ExternalMemoryProperties { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalMemoryProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalMemoryProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalMemoryProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.externalMemoryFeatures && (this.externalMemoryFeatures = data.externalMemoryFeatures), void 0 !== data.exportFromImportedHandleTypes && (this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes), void 0 !== data.compatibleHandleTypes && (this.compatibleHandleTypes = data.compatibleHandleTypes); - } - get externalMemoryFeatures() { - return this.#view.getUint32(0, LE); - } - set externalMemoryFeatures(value) { - this.#view.setUint32(0, Number(value), LE); - } - get exportFromImportedHandleTypes() { - return this.#view.getUint32(4, LE); - } - set exportFromImportedHandleTypes(value) { - this.#view.setUint32(4, Number(value), LE); - } - get compatibleHandleTypes() { - return this.#view.getUint32(8, LE); - } - set compatibleHandleTypes(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class PhysicalDeviceExternalImageFormatInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExternalImageFormatInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalImageFormatInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalImageFormatInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExternalImageFormatInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(16, LE); - } - set handleType(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ExternalImageFormatProperties { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalImageFormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalImageFormatProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalImageFormatProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalImageFormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.externalMemoryProperties && (this.externalMemoryProperties = data.externalMemoryProperties); - this.sType = StructureType.EXTERNAL_IMAGE_FORMAT_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get externalMemoryProperties() { - return new ExternalMemoryProperties(this.#data.subarray(16, 16 + ExternalMemoryProperties.size)); - } - set externalMemoryProperties(value) { - if (value[BUFFER].byteLength < ExternalMemoryProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class PhysicalDeviceExternalBufferInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExternalBufferInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalBufferInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalBufferInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExternalBufferInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.usage && (this.usage = data.usage), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get usage() { - return this.#view.getUint32(20, LE); - } - set usage(value) { - this.#view.setUint32(20, Number(value), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class ExternalBufferProperties { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalBufferProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalBufferProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalBufferProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalBufferProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.externalMemoryProperties && (this.externalMemoryProperties = data.externalMemoryProperties); - this.sType = StructureType.EXTERNAL_BUFFER_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get externalMemoryProperties() { - return new ExternalMemoryProperties(this.#data.subarray(16, 16 + ExternalMemoryProperties.size)); - } - set externalMemoryProperties(value) { - if (value[BUFFER].byteLength < ExternalMemoryProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class PhysicalDeviceIDProperties { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceIDProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceIDProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceIDProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceIDProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceUUID && (this.deviceUUID = data.deviceUUID), void 0 !== data.driverUUID && (this.driverUUID = data.driverUUID), void 0 !== data.deviceLUID && (this.deviceLUID = data.deviceLUID), void 0 !== data.deviceNodeMask && (this.deviceNodeMask = data.deviceNodeMask), void 0 !== data.deviceLUIDValid && (this.deviceLUIDValid = data.deviceLUIDValid); - this.sType = StructureType.PHYSICAL_DEVICE_ID_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - set deviceUUID(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - get driverUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 32, 16); - } - set driverUUID(value) { - this.#data.set(new Uint8Array(value.buffer), 32); - } - get deviceLUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 48, 8); - } - set deviceLUID(value) { - this.#data.set(new Uint8Array(value.buffer), 48); - } - get deviceNodeMask() { - return this.#view.getUint32(56, LE); - } - set deviceNodeMask(value) { - this.#view.setUint32(56, Number(value), LE); - } - get deviceLUIDValid() { - return this.#view.getUint32(60, LE); - } - set deviceLUIDValid(value) { - this.#view.setUint32(60, Number(value), LE); - } -} -export class ExternalMemoryImageCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalMemoryImageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryImageCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalMemoryImageCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalMemoryImageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleTypes && (this.handleTypes = data.handleTypes); - this.sType = StructureType.EXTERNAL_MEMORY_IMAGE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleTypes() { - return this.#view.getUint32(16, LE); - } - set handleTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ExternalMemoryBufferCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalMemoryBufferCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryBufferCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalMemoryBufferCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalMemoryBufferCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleTypes && (this.handleTypes = data.handleTypes); - this.sType = StructureType.EXTERNAL_MEMORY_BUFFER_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleTypes() { - return this.#view.getUint32(16, LE); - } - set handleTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ExportMemoryAllocateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMemoryAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryAllocateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMemoryAllocateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMemoryAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleTypes && (this.handleTypes = data.handleTypes); - this.sType = StructureType.EXPORT_MEMORY_ALLOCATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleTypes() { - return this.#view.getUint32(16, LE); - } - set handleTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImportMemoryWin32HandleInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMemoryWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryWin32HandleInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryWin32HandleInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMemoryWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.handle && (this.handle = data.handle), void 0 !== data.name && (this.name = data.name); - this.sType = StructureType.IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(16, LE); - } - set handleType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get handle() { - return this.#view.getBigUint64(24, LE); - } - set handle(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get name() { - return this.#view.getBigUint64(32, LE); - } - set name(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ExportMemoryWin32HandleInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMemoryWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryWin32HandleInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMemoryWin32HandleInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMemoryWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pAttributes && (this.pAttributes = data.pAttributes), void 0 !== data.dwAccess && (this.dwAccess = data.dwAccess), void 0 !== data.name && (this.name = data.name); - this.sType = StructureType.EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pAttributes() { - return this.#view.getBigUint64(16, LE); - } - set pAttributes(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dwAccess() { - return this.#view.getUint32(24, LE); - } - set dwAccess(value) { - this.#view.setUint32(24, Number(value), LE); - } - get name() { - return this.#view.getBigUint64(32, LE); - } - set name(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ImportMemoryZirconHandleInfoFUCHSIA { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMemoryZirconHandleInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryZirconHandleInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryZirconHandleInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMemoryZirconHandleInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.handle && (this.handle = data.handle); - this.sType = StructureType.IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(16, LE); - } - set handleType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get handle() { - return this.#view.getBigUint64(24, LE); - } - set handle(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class MemoryZirconHandlePropertiesFUCHSIA { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryZirconHandlePropertiesFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryZirconHandlePropertiesFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryZirconHandlePropertiesFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryZirconHandlePropertiesFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryTypeBits && (this.memoryTypeBits = data.memoryTypeBits); - this.sType = StructureType.MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - set memoryTypeBits(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MemoryGetZirconHandleInfoFUCHSIA { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryGetZirconHandleInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetZirconHandleInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetZirconHandleInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryGetZirconHandleInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(16, LE); - } - set memory(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class MemoryWin32HandlePropertiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryWin32HandlePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryWin32HandlePropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryWin32HandlePropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryWin32HandlePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryTypeBits && (this.memoryTypeBits = data.memoryTypeBits); - this.sType = StructureType.MEMORY_WIN32_HANDLE_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - set memoryTypeBits(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MemoryGetWin32HandleInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryGetWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetWin32HandleInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetWin32HandleInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryGetWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.MEMORY_GET_WIN32_HANDLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(16, LE); - } - set memory(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class ImportMemoryFdInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMemoryFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryFdInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryFdInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMemoryFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.fd && (this.fd = data.fd); - this.sType = StructureType.IMPORT_MEMORY_FD_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(16, LE); - } - set handleType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get fd() { - return this.#view.getInt32(20, LE); - } - set fd(value) { - this.#view.setInt32(20, Number(value), LE); - } -} -export class MemoryFdPropertiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryFdPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryFdPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryFdPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryFdPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryTypeBits && (this.memoryTypeBits = data.memoryTypeBits); - this.sType = StructureType.MEMORY_FD_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - set memoryTypeBits(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MemoryGetFdInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryGetFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetFdInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetFdInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryGetFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.MEMORY_GET_FD_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(16, LE); - } - set memory(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class Win32KeyedMutexAcquireReleaseInfoKHR { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Win32KeyedMutexAcquireReleaseInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < Win32KeyedMutexAcquireReleaseInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.acquireCount && (this.acquireCount = data.acquireCount), void 0 !== data.pAcquireSyncs && (this.pAcquireSyncs = data.pAcquireSyncs), void 0 !== data.pAcquireKeys && (this.pAcquireKeys = data.pAcquireKeys), void 0 !== data.pAcquireTimeouts && (this.pAcquireTimeouts = data.pAcquireTimeouts), void 0 !== data.releaseCount && (this.releaseCount = data.releaseCount), void 0 !== data.pReleaseSyncs && (this.pReleaseSyncs = data.pReleaseSyncs), void 0 !== data.pReleaseKeys && (this.pReleaseKeys = data.pReleaseKeys); - this.sType = StructureType.WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get acquireCount() { - return this.#view.getUint32(16, LE); - } - set acquireCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pAcquireSyncs() { - return this.#view.getBigUint64(24, LE); - } - set pAcquireSyncs(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pAcquireKeys() { - return this.#view.getBigUint64(32, LE); - } - set pAcquireKeys(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get pAcquireTimeouts() { - return this.#view.getBigUint64(40, LE); - } - set pAcquireTimeouts(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get releaseCount() { - return this.#view.getUint32(48, LE); - } - set releaseCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pReleaseSyncs() { - return this.#view.getBigUint64(56, LE); - } - set pReleaseSyncs(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get pReleaseKeys() { - return this.#view.getBigUint64(64, LE); - } - set pReleaseKeys(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceExternalSemaphoreInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExternalSemaphoreInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalSemaphoreInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalSemaphoreInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExternalSemaphoreInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(16, LE); - } - set handleType(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ExternalSemaphoreProperties { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalSemaphoreProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalSemaphoreProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalSemaphoreProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalSemaphoreProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.exportFromImportedHandleTypes && (this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes), void 0 !== data.compatibleHandleTypes && (this.compatibleHandleTypes = data.compatibleHandleTypes), void 0 !== data.externalSemaphoreFeatures && (this.externalSemaphoreFeatures = data.externalSemaphoreFeatures); - this.sType = StructureType.EXTERNAL_SEMAPHORE_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get exportFromImportedHandleTypes() { - return this.#view.getUint32(16, LE); - } - set exportFromImportedHandleTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } - get compatibleHandleTypes() { - return this.#view.getUint32(20, LE); - } - set compatibleHandleTypes(value) { - this.#view.setUint32(20, Number(value), LE); - } - get externalSemaphoreFeatures() { - return this.#view.getUint32(24, LE); - } - set externalSemaphoreFeatures(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class ExportSemaphoreCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportSemaphoreCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportSemaphoreCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportSemaphoreCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportSemaphoreCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleTypes && (this.handleTypes = data.handleTypes); - this.sType = StructureType.EXPORT_SEMAPHORE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleTypes() { - return this.#view.getUint32(16, LE); - } - set handleTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImportSemaphoreWin32HandleInfoKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportSemaphoreWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportSemaphoreWin32HandleInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportSemaphoreWin32HandleInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportSemaphoreWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.handle && (this.handle = data.handle), void 0 !== data.name && (this.name = data.name); - this.sType = StructureType.IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - set semaphore(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(24, LE); - } - set flags(value) { - this.#view.setUint32(24, Number(value), LE); - } - get handleType() { - return this.#view.getUint32(28, LE); - } - set handleType(value) { - this.#view.setUint32(28, Number(value), LE); - } - get handle() { - return this.#view.getBigUint64(32, LE); - } - set handle(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get name() { - return this.#view.getBigUint64(40, LE); - } - set name(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class ExportSemaphoreWin32HandleInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportSemaphoreWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportSemaphoreWin32HandleInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportSemaphoreWin32HandleInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportSemaphoreWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pAttributes && (this.pAttributes = data.pAttributes), void 0 !== data.dwAccess && (this.dwAccess = data.dwAccess), void 0 !== data.name && (this.name = data.name); - this.sType = StructureType.EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pAttributes() { - return this.#view.getBigUint64(16, LE); - } - set pAttributes(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dwAccess() { - return this.#view.getUint32(24, LE); - } - set dwAccess(value) { - this.#view.setUint32(24, Number(value), LE); - } - get name() { - return this.#view.getBigUint64(32, LE); - } - set name(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class D3D12FenceSubmitInfoKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(D3D12FenceSubmitInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, D3D12FenceSubmitInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < D3D12FenceSubmitInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(D3D12FenceSubmitInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.waitSemaphoreValuesCount && (this.waitSemaphoreValuesCount = data.waitSemaphoreValuesCount), void 0 !== data.pWaitSemaphoreValues && (this.pWaitSemaphoreValues = data.pWaitSemaphoreValues), void 0 !== data.signalSemaphoreValuesCount && (this.signalSemaphoreValuesCount = data.signalSemaphoreValuesCount), void 0 !== data.pSignalSemaphoreValues && (this.pSignalSemaphoreValues = data.pSignalSemaphoreValues); - this.sType = StructureType.D3D12_FENCE_SUBMIT_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get waitSemaphoreValuesCount() { - return this.#view.getUint32(16, LE); - } - set waitSemaphoreValuesCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pWaitSemaphoreValues() { - return this.#view.getBigUint64(24, LE); - } - set pWaitSemaphoreValues(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get signalSemaphoreValuesCount() { - return this.#view.getUint32(32, LE); - } - set signalSemaphoreValuesCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pSignalSemaphoreValues() { - return this.#view.getBigUint64(40, LE); - } - set pSignalSemaphoreValues(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class SemaphoreGetWin32HandleInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SemaphoreGetWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreGetWin32HandleInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreGetWin32HandleInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SemaphoreGetWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - set semaphore(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class ImportSemaphoreFdInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportSemaphoreFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportSemaphoreFdInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportSemaphoreFdInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportSemaphoreFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.fd && (this.fd = data.fd); - this.sType = StructureType.IMPORT_SEMAPHORE_FD_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - set semaphore(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(24, LE); - } - set flags(value) { - this.#view.setUint32(24, Number(value), LE); - } - get handleType() { - return this.#view.getUint32(28, LE); - } - set handleType(value) { - this.#view.setUint32(28, Number(value), LE); - } - get fd() { - return this.#view.getInt32(32, LE); - } - set fd(value) { - this.#view.setInt32(32, Number(value), LE); - } -} -export class SemaphoreGetFdInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SemaphoreGetFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreGetFdInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreGetFdInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SemaphoreGetFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.SEMAPHORE_GET_FD_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - set semaphore(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class ImportSemaphoreZirconHandleInfoFUCHSIA { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportSemaphoreZirconHandleInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportSemaphoreZirconHandleInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportSemaphoreZirconHandleInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportSemaphoreZirconHandleInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.zirconHandle && (this.zirconHandle = data.zirconHandle); - this.sType = StructureType.IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - set semaphore(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(24, LE); - } - set flags(value) { - this.#view.setUint32(24, Number(value), LE); - } - get handleType() { - return this.#view.getUint32(28, LE); - } - set handleType(value) { - this.#view.setUint32(28, Number(value), LE); - } - get zirconHandle() { - return this.#view.getBigUint64(32, LE); - } - set zirconHandle(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class SemaphoreGetZirconHandleInfoFUCHSIA { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SemaphoreGetZirconHandleInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreGetZirconHandleInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreGetZirconHandleInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SemaphoreGetZirconHandleInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - set semaphore(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceExternalFenceInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExternalFenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalFenceInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalFenceInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExternalFenceInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(16, LE); - } - set handleType(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ExternalFenceProperties { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalFenceProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalFenceProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalFenceProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalFenceProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.exportFromImportedHandleTypes && (this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes), void 0 !== data.compatibleHandleTypes && (this.compatibleHandleTypes = data.compatibleHandleTypes), void 0 !== data.externalFenceFeatures && (this.externalFenceFeatures = data.externalFenceFeatures); - this.sType = StructureType.EXTERNAL_FENCE_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get exportFromImportedHandleTypes() { - return this.#view.getUint32(16, LE); - } - set exportFromImportedHandleTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } - get compatibleHandleTypes() { - return this.#view.getUint32(20, LE); - } - set compatibleHandleTypes(value) { - this.#view.setUint32(20, Number(value), LE); - } - get externalFenceFeatures() { - return this.#view.getUint32(24, LE); - } - set externalFenceFeatures(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class ExportFenceCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportFenceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportFenceCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportFenceCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportFenceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleTypes && (this.handleTypes = data.handleTypes); - this.sType = StructureType.EXPORT_FENCE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleTypes() { - return this.#view.getUint32(16, LE); - } - set handleTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImportFenceWin32HandleInfoKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportFenceWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportFenceWin32HandleInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportFenceWin32HandleInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportFenceWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fence && (this.fence = data.fence), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.handle && (this.handle = data.handle), void 0 !== data.name && (this.name = data.name); - this.sType = StructureType.IMPORT_FENCE_WIN32_HANDLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fence() { - return this.#view.getBigUint64(16, LE); - } - set fence(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(24, LE); - } - set flags(value) { - this.#view.setUint32(24, Number(value), LE); - } - get handleType() { - return this.#view.getUint32(28, LE); - } - set handleType(value) { - this.#view.setUint32(28, Number(value), LE); - } - get handle() { - return this.#view.getBigUint64(32, LE); - } - set handle(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get name() { - return this.#view.getBigUint64(40, LE); - } - set name(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class ExportFenceWin32HandleInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportFenceWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportFenceWin32HandleInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportFenceWin32HandleInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportFenceWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pAttributes && (this.pAttributes = data.pAttributes), void 0 !== data.dwAccess && (this.dwAccess = data.dwAccess), void 0 !== data.name && (this.name = data.name); - this.sType = StructureType.EXPORT_FENCE_WIN32_HANDLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pAttributes() { - return this.#view.getBigUint64(16, LE); - } - set pAttributes(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dwAccess() { - return this.#view.getUint32(24, LE); - } - set dwAccess(value) { - this.#view.setUint32(24, Number(value), LE); - } - get name() { - return this.#view.getBigUint64(32, LE); - } - set name(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class FenceGetWin32HandleInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FenceGetWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FenceGetWin32HandleInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FenceGetWin32HandleInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FenceGetWin32HandleInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fence && (this.fence = data.fence), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.FENCE_GET_WIN32_HANDLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fence() { - return this.#view.getBigUint64(16, LE); - } - set fence(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class ImportFenceFdInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportFenceFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportFenceFdInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportFenceFdInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportFenceFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fence && (this.fence = data.fence), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.fd && (this.fd = data.fd); - this.sType = StructureType.IMPORT_FENCE_FD_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fence() { - return this.#view.getBigUint64(16, LE); - } - set fence(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(24, LE); - } - set flags(value) { - this.#view.setUint32(24, Number(value), LE); - } - get handleType() { - return this.#view.getUint32(28, LE); - } - set handleType(value) { - this.#view.setUint32(28, Number(value), LE); - } - get fd() { - return this.#view.getInt32(32, LE); - } - set fd(value) { - this.#view.setInt32(32, Number(value), LE); - } -} -export class FenceGetFdInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FenceGetFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FenceGetFdInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FenceGetFdInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FenceGetFdInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fence && (this.fence = data.fence), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.FENCE_GET_FD_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fence() { - return this.#view.getBigUint64(16, LE); - } - set fence(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceMultiviewFeatures { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMultiviewFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiviewFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiviewFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMultiviewFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.multiview && (this.multiview = data.multiview), void 0 !== data.multiviewGeometryShader && (this.multiviewGeometryShader = data.multiviewGeometryShader), void 0 !== data.multiviewTessellationShader && (this.multiviewTessellationShader = data.multiviewTessellationShader); - this.sType = StructureType.PHYSICAL_DEVICE_MULTIVIEW_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get multiview() { - return this.#view.getUint32(16, LE); - } - set multiview(value) { - this.#view.setUint32(16, Number(value), LE); - } - get multiviewGeometryShader() { - return this.#view.getUint32(20, LE); - } - set multiviewGeometryShader(value) { - this.#view.setUint32(20, Number(value), LE); - } - get multiviewTessellationShader() { - return this.#view.getUint32(24, LE); - } - set multiviewTessellationShader(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceMultiviewProperties { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMultiviewProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiviewProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiviewProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMultiviewProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxMultiviewViewCount && (this.maxMultiviewViewCount = data.maxMultiviewViewCount), void 0 !== data.maxMultiviewInstanceIndex && (this.maxMultiviewInstanceIndex = data.maxMultiviewInstanceIndex); - this.sType = StructureType.PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxMultiviewViewCount() { - return this.#view.getUint32(16, LE); - } - set maxMultiviewViewCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxMultiviewInstanceIndex() { - return this.#view.getUint32(20, LE); - } - set maxMultiviewInstanceIndex(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class RenderPassMultiviewCreateInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassMultiviewCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassMultiviewCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassMultiviewCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassMultiviewCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.subpassCount && (this.subpassCount = data.subpassCount), void 0 !== data.pViewMasks && (this.pViewMasks = data.pViewMasks), void 0 !== data.dependencyCount && (this.dependencyCount = data.dependencyCount), void 0 !== data.pViewOffsets && (this.pViewOffsets = data.pViewOffsets), void 0 !== data.correlationMaskCount && (this.correlationMaskCount = data.correlationMaskCount), void 0 !== data.pCorrelationMasks && (this.pCorrelationMasks = data.pCorrelationMasks); - this.sType = StructureType.RENDER_PASS_MULTIVIEW_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get subpassCount() { - return this.#view.getUint32(16, LE); - } - set subpassCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pViewMasks() { - return this.#view.getBigUint64(24, LE); - } - set pViewMasks(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get dependencyCount() { - return this.#view.getUint32(32, LE); - } - set dependencyCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pViewOffsets() { - return this.#view.getBigUint64(40, LE); - } - set pViewOffsets(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get correlationMaskCount() { - return this.#view.getUint32(48, LE); - } - set correlationMaskCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pCorrelationMasks() { - return this.#view.getBigUint64(56, LE); - } - set pCorrelationMasks(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class SurfaceCapabilities2EXT { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceCapabilities2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilities2EXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilities2EXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceCapabilities2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minImageCount && (this.minImageCount = data.minImageCount), void 0 !== data.maxImageCount && (this.maxImageCount = data.maxImageCount), void 0 !== data.currentExtent && (this.currentExtent = data.currentExtent), void 0 !== data.minImageExtent && (this.minImageExtent = data.minImageExtent), void 0 !== data.maxImageExtent && (this.maxImageExtent = data.maxImageExtent), void 0 !== data.maxImageArrayLayers && (this.maxImageArrayLayers = data.maxImageArrayLayers), void 0 !== data.supportedTransforms && (this.supportedTransforms = data.supportedTransforms), void 0 !== data.currentTransform && (this.currentTransform = data.currentTransform), void 0 !== data.supportedCompositeAlpha && (this.supportedCompositeAlpha = data.supportedCompositeAlpha), void 0 !== data.supportedUsageFlags && (this.supportedUsageFlags = data.supportedUsageFlags), void 0 !== data.supportedSurfaceCounters && (this.supportedSurfaceCounters = data.supportedSurfaceCounters); - this.sType = StructureType.SURFACE_CAPABILITIES_2_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minImageCount() { - return this.#view.getUint32(16, LE); - } - set minImageCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxImageCount() { - return this.#view.getUint32(20, LE); - } - set maxImageCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get currentExtent() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - set currentExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get minImageExtent() { - return new Extent2D(this.#data.subarray(32, 32 + Extent2D.size)); - } - set minImageExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get maxImageExtent() { - return new Extent2D(this.#data.subarray(40, 40 + Extent2D.size)); - } - set maxImageExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } - get maxImageArrayLayers() { - return this.#view.getUint32(48, LE); - } - set maxImageArrayLayers(value) { - this.#view.setUint32(48, Number(value), LE); - } - get supportedTransforms() { - return this.#view.getUint32(52, LE); - } - set supportedTransforms(value) { - this.#view.setUint32(52, Number(value), LE); - } - get currentTransform() { - return this.#view.getUint32(56, LE); - } - set currentTransform(value) { - this.#view.setUint32(56, Number(value), LE); - } - get supportedCompositeAlpha() { - return this.#view.getUint32(60, LE); - } - set supportedCompositeAlpha(value) { - this.#view.setUint32(60, Number(value), LE); - } - get supportedUsageFlags() { - return this.#view.getUint32(64, LE); - } - set supportedUsageFlags(value) { - this.#view.setUint32(64, Number(value), LE); - } - get supportedSurfaceCounters() { - return this.#view.getUint32(68, LE); - } - set supportedSurfaceCounters(value) { - this.#view.setUint32(68, Number(value), LE); - } -} -export class DisplayPowerInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayPowerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPowerInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPowerInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayPowerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.powerState && (this.powerState = data.powerState); - this.sType = StructureType.DISPLAY_POWER_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get powerState() { - return this.#view.getUint32(16, LE); - } - set powerState(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DeviceEventInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceEventInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceEventInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceEventInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceEventInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceEvent && (this.deviceEvent = data.deviceEvent); - this.sType = StructureType.DEVICE_EVENT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceEvent() { - return this.#view.getUint32(16, LE); - } - set deviceEvent(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DisplayEventInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayEventInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayEventInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayEventInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayEventInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.displayEvent && (this.displayEvent = data.displayEvent); - this.sType = StructureType.DISPLAY_EVENT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get displayEvent() { - return this.#view.getUint32(16, LE); - } - set displayEvent(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SwapchainCounterCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SwapchainCounterCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainCounterCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainCounterCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SwapchainCounterCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.surfaceCounters && (this.surfaceCounters = data.surfaceCounters); - this.sType = StructureType.SWAPCHAIN_COUNTER_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get surfaceCounters() { - return this.#view.getUint32(16, LE); - } - set surfaceCounters(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceGroupProperties { - static size = 288; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceGroupProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGroupProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceGroupProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceGroupProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.physicalDeviceCount && (this.physicalDeviceCount = data.physicalDeviceCount), void 0 !== data.physicalDevices && (this.physicalDevices = data.physicalDevices), void 0 !== data.subsetAllocation && (this.subsetAllocation = data.subsetAllocation); - this.sType = StructureType.PHYSICAL_DEVICE_GROUP_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get physicalDeviceCount() { - return this.#view.getUint32(16, LE); - } - set physicalDeviceCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get physicalDevices() { - let result = []; - for(let i = 0; i < 32; i++)result.push(this.#view.getBigUint64(24 + 8 * i, LE)); - return result; - } - set physicalDevices(value) { - for(let i = 0; i < value.length; i++)this.#view.setBigUint64(24 + 8 * i, BigInt(anyPointer(value[i])), LE); - } - get subsetAllocation() { - return this.#view.getUint32(280, LE); - } - set subsetAllocation(value) { - this.#view.setUint32(280, Number(value), LE); - } -} -export class MemoryAllocateFlagsInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryAllocateFlagsInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryAllocateFlagsInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryAllocateFlagsInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryAllocateFlagsInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.deviceMask && (this.deviceMask = data.deviceMask); - this.sType = StructureType.MEMORY_ALLOCATE_FLAGS_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get deviceMask() { - return this.#view.getUint32(20, LE); - } - set deviceMask(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class BindBufferMemoryInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindBufferMemoryInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindBufferMemoryInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindBufferMemoryInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindBufferMemoryInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.memoryOffset && (this.memoryOffset = data.memoryOffset); - this.sType = StructureType.BIND_BUFFER_MEMORY_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get buffer() { - return this.#view.getBigUint64(16, LE); - } - set buffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(24, LE); - } - set memory(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get memoryOffset() { - return this.#view.getBigUint64(32, LE); - } - set memoryOffset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class BindBufferMemoryDeviceGroupInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindBufferMemoryDeviceGroupInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindBufferMemoryDeviceGroupInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindBufferMemoryDeviceGroupInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindBufferMemoryDeviceGroupInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceIndexCount && (this.deviceIndexCount = data.deviceIndexCount), void 0 !== data.pDeviceIndices && (this.pDeviceIndices = data.pDeviceIndices); - this.sType = StructureType.BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceIndexCount() { - return this.#view.getUint32(16, LE); - } - set deviceIndexCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pDeviceIndices() { - return this.#view.getBigUint64(24, LE); - } - set pDeviceIndices(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class BindImageMemoryInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindImageMemoryInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImageMemoryInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindImageMemoryInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindImageMemoryInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.image && (this.image = data.image), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.memoryOffset && (this.memoryOffset = data.memoryOffset); - this.sType = StructureType.BIND_IMAGE_MEMORY_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get image() { - return this.#view.getBigUint64(16, LE); - } - set image(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(24, LE); - } - set memory(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get memoryOffset() { - return this.#view.getBigUint64(32, LE); - } - set memoryOffset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class BindImageMemoryDeviceGroupInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindImageMemoryDeviceGroupInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImageMemoryDeviceGroupInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindImageMemoryDeviceGroupInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindImageMemoryDeviceGroupInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceIndexCount && (this.deviceIndexCount = data.deviceIndexCount), void 0 !== data.pDeviceIndices && (this.pDeviceIndices = data.pDeviceIndices), void 0 !== data.splitInstanceBindRegionCount && (this.splitInstanceBindRegionCount = data.splitInstanceBindRegionCount), void 0 !== data.pSplitInstanceBindRegions && (this.pSplitInstanceBindRegions = data.pSplitInstanceBindRegions); - this.sType = StructureType.BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceIndexCount() { - return this.#view.getUint32(16, LE); - } - set deviceIndexCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pDeviceIndices() { - return this.#view.getBigUint64(24, LE); - } - set pDeviceIndices(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get splitInstanceBindRegionCount() { - return this.#view.getUint32(32, LE); - } - set splitInstanceBindRegionCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pSplitInstanceBindRegions() { - return this.#view.getBigUint64(40, LE); - } - set pSplitInstanceBindRegions(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class DeviceGroupRenderPassBeginInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceGroupRenderPassBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupRenderPassBeginInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupRenderPassBeginInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceGroupRenderPassBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceMask && (this.deviceMask = data.deviceMask), void 0 !== data.deviceRenderAreaCount && (this.deviceRenderAreaCount = data.deviceRenderAreaCount), void 0 !== data.pDeviceRenderAreas && (this.pDeviceRenderAreas = data.pDeviceRenderAreas); - this.sType = StructureType.DEVICE_GROUP_RENDER_PASS_BEGIN_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceMask() { - return this.#view.getUint32(16, LE); - } - set deviceMask(value) { - this.#view.setUint32(16, Number(value), LE); - } - get deviceRenderAreaCount() { - return this.#view.getUint32(20, LE); - } - set deviceRenderAreaCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pDeviceRenderAreas() { - return this.#view.getBigUint64(24, LE); - } - set pDeviceRenderAreas(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class DeviceGroupCommandBufferBeginInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceGroupCommandBufferBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupCommandBufferBeginInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupCommandBufferBeginInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceGroupCommandBufferBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceMask && (this.deviceMask = data.deviceMask); - this.sType = StructureType.DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceMask() { - return this.#view.getUint32(16, LE); - } - set deviceMask(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DeviceGroupSubmitInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceGroupSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupSubmitInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupSubmitInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceGroupSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.waitSemaphoreCount && (this.waitSemaphoreCount = data.waitSemaphoreCount), void 0 !== data.pWaitSemaphoreDeviceIndices && (this.pWaitSemaphoreDeviceIndices = data.pWaitSemaphoreDeviceIndices), void 0 !== data.commandBufferCount && (this.commandBufferCount = data.commandBufferCount), void 0 !== data.pCommandBufferDeviceMasks && (this.pCommandBufferDeviceMasks = data.pCommandBufferDeviceMasks), void 0 !== data.signalSemaphoreCount && (this.signalSemaphoreCount = data.signalSemaphoreCount), void 0 !== data.pSignalSemaphoreDeviceIndices && (this.pSignalSemaphoreDeviceIndices = data.pSignalSemaphoreDeviceIndices); - this.sType = StructureType.DEVICE_GROUP_SUBMIT_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get waitSemaphoreCount() { - return this.#view.getUint32(16, LE); - } - set waitSemaphoreCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pWaitSemaphoreDeviceIndices() { - return this.#view.getBigUint64(24, LE); - } - set pWaitSemaphoreDeviceIndices(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get commandBufferCount() { - return this.#view.getUint32(32, LE); - } - set commandBufferCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pCommandBufferDeviceMasks() { - return this.#view.getBigUint64(40, LE); - } - set pCommandBufferDeviceMasks(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get signalSemaphoreCount() { - return this.#view.getUint32(48, LE); - } - set signalSemaphoreCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pSignalSemaphoreDeviceIndices() { - return this.#view.getBigUint64(56, LE); - } - set pSignalSemaphoreDeviceIndices(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class DeviceGroupBindSparseInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceGroupBindSparseInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupBindSparseInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupBindSparseInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceGroupBindSparseInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.resourceDeviceIndex && (this.resourceDeviceIndex = data.resourceDeviceIndex), void 0 !== data.memoryDeviceIndex && (this.memoryDeviceIndex = data.memoryDeviceIndex); - this.sType = StructureType.DEVICE_GROUP_BIND_SPARSE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get resourceDeviceIndex() { - return this.#view.getUint32(16, LE); - } - set resourceDeviceIndex(value) { - this.#view.setUint32(16, Number(value), LE); - } - get memoryDeviceIndex() { - return this.#view.getUint32(20, LE); - } - set memoryDeviceIndex(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class DeviceGroupPresentCapabilitiesKHR { - static size = 152; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceGroupPresentCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupPresentCapabilitiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupPresentCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceGroupPresentCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.presentMask && (this.presentMask = data.presentMask), void 0 !== data.modes && (this.modes = data.modes); - this.sType = StructureType.DEVICE_GROUP_PRESENT_CAPABILITIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get presentMask() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 16, 32); - } - set presentMask(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - get modes() { - return this.#view.getUint32(144, LE); - } - set modes(value) { - this.#view.setUint32(144, Number(value), LE); - } -} -export class ImageSwapchainCreateInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageSwapchainCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSwapchainCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSwapchainCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageSwapchainCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.swapchain && (this.swapchain = data.swapchain); - this.sType = StructureType.IMAGE_SWAPCHAIN_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get swapchain() { - return this.#view.getBigUint64(16, LE); - } - set swapchain(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class BindImageMemorySwapchainInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindImageMemorySwapchainInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImageMemorySwapchainInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindImageMemorySwapchainInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindImageMemorySwapchainInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.swapchain && (this.swapchain = data.swapchain), void 0 !== data.imageIndex && (this.imageIndex = data.imageIndex); - this.sType = StructureType.BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get swapchain() { - return this.#view.getBigUint64(16, LE); - } - set swapchain(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get imageIndex() { - return this.#view.getUint32(24, LE); - } - set imageIndex(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class AcquireNextImageInfoKHR { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AcquireNextImageInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AcquireNextImageInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AcquireNextImageInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AcquireNextImageInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.swapchain && (this.swapchain = data.swapchain), void 0 !== data.timeout && (this.timeout = data.timeout), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.fence && (this.fence = data.fence), void 0 !== data.deviceMask && (this.deviceMask = data.deviceMask); - this.sType = StructureType.ACQUIRE_NEXT_IMAGE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get swapchain() { - return this.#view.getBigUint64(16, LE); - } - set swapchain(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get timeout() { - return this.#view.getBigUint64(24, LE); - } - set timeout(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get semaphore() { - return this.#view.getBigUint64(32, LE); - } - set semaphore(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get fence() { - return this.#view.getBigUint64(40, LE); - } - set fence(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get deviceMask() { - return this.#view.getUint32(48, LE); - } - set deviceMask(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class DeviceGroupPresentInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceGroupPresentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupPresentInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupPresentInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceGroupPresentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.swapchainCount && (this.swapchainCount = data.swapchainCount), void 0 !== data.pDeviceMasks && (this.pDeviceMasks = data.pDeviceMasks), void 0 !== data.mode && (this.mode = data.mode); - this.sType = StructureType.DEVICE_GROUP_PRESENT_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get swapchainCount() { - return this.#view.getUint32(16, LE); - } - set swapchainCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pDeviceMasks() { - return this.#view.getBigUint64(24, LE); - } - set pDeviceMasks(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get mode() { - return this.#view.getUint32(32, LE); - } - set mode(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class DeviceGroupDeviceCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceGroupDeviceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupDeviceCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupDeviceCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceGroupDeviceCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.physicalDeviceCount && (this.physicalDeviceCount = data.physicalDeviceCount), void 0 !== data.pPhysicalDevices && (this.pPhysicalDevices = data.pPhysicalDevices); - this.sType = StructureType.DEVICE_GROUP_DEVICE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get physicalDeviceCount() { - return this.#view.getUint32(16, LE); - } - set physicalDeviceCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pPhysicalDevices() { - return this.#view.getBigUint64(24, LE); - } - set pPhysicalDevices(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class DeviceGroupSwapchainCreateInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceGroupSwapchainCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupSwapchainCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupSwapchainCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceGroupSwapchainCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.modes && (this.modes = data.modes); - this.sType = StructureType.DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get modes() { - return this.#view.getUint32(16, LE); - } - set modes(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DescriptorUpdateTemplateEntry { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorUpdateTemplateEntry.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorUpdateTemplateEntry.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorUpdateTemplateEntry.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorUpdateTemplateEntry.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.dstBinding && (this.dstBinding = data.dstBinding), void 0 !== data.dstArrayElement && (this.dstArrayElement = data.dstArrayElement), void 0 !== data.descriptorCount && (this.descriptorCount = data.descriptorCount), void 0 !== data.descriptorType && (this.descriptorType = data.descriptorType), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.stride && (this.stride = data.stride); - } - get dstBinding() { - return this.#view.getUint32(0, LE); - } - set dstBinding(value) { - this.#view.setUint32(0, Number(value), LE); - } - get dstArrayElement() { - return this.#view.getUint32(4, LE); - } - set dstArrayElement(value) { - this.#view.setUint32(4, Number(value), LE); - } - get descriptorCount() { - return this.#view.getUint32(8, LE); - } - set descriptorCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get descriptorType() { - return this.#view.getUint32(12, LE); - } - set descriptorType(value) { - this.#view.setUint32(12, Number(value), LE); - } - get offset() { - return this.#view.getBigUint64(16, LE); - } - set offset(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get stride() { - return this.#view.getBigUint64(24, LE); - } - set stride(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class DescriptorUpdateTemplateCreateInfo { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorUpdateTemplateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorUpdateTemplateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorUpdateTemplateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorUpdateTemplateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.descriptorUpdateEntryCount && (this.descriptorUpdateEntryCount = data.descriptorUpdateEntryCount), void 0 !== data.pDescriptorUpdateEntries && (this.pDescriptorUpdateEntries = data.pDescriptorUpdateEntries), void 0 !== data.templateType && (this.templateType = data.templateType), void 0 !== data.descriptorSetLayout && (this.descriptorSetLayout = data.descriptorSetLayout), void 0 !== data.pipelineBindPoint && (this.pipelineBindPoint = data.pipelineBindPoint), void 0 !== data.pipelineLayout && (this.pipelineLayout = data.pipelineLayout), void 0 !== data.set && (this.set = data.set); - this.sType = StructureType.DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get descriptorUpdateEntryCount() { - return this.#view.getUint32(20, LE); - } - set descriptorUpdateEntryCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pDescriptorUpdateEntries() { - return this.#view.getBigUint64(24, LE); - } - set pDescriptorUpdateEntries(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get templateType() { - return this.#view.getUint32(32, LE); - } - set templateType(value) { - this.#view.setUint32(32, Number(value), LE); - } - get descriptorSetLayout() { - return this.#view.getBigUint64(40, LE); - } - set descriptorSetLayout(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get pipelineBindPoint() { - return this.#view.getUint32(48, LE); - } - set pipelineBindPoint(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pipelineLayout() { - return this.#view.getBigUint64(56, LE); - } - set pipelineLayout(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get set() { - return this.#view.getUint32(64, LE); - } - set set(value) { - this.#view.setUint32(64, Number(value), LE); - } -} -export class XYColorEXT { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(XYColorEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, XYColorEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < XYColorEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(XYColorEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.x && (this.x = data.x), void 0 !== data.y && (this.y = data.y); - } - get x() { - return this.#view.getFloat32(0, LE); - } - set x(value) { - this.#view.setFloat32(0, Number(value), LE); - } - get y() { - return this.#view.getFloat32(4, LE); - } - set y(value) { - this.#view.setFloat32(4, Number(value), LE); - } -} -export class PhysicalDevicePresentIdFeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePresentIdFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentIdFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePresentIdFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePresentIdFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.presentId && (this.presentId = data.presentId); - this.sType = StructureType.PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get presentId() { - return this.#view.getUint32(16, LE); - } - set presentId(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PresentIdKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PresentIdKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentIdKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PresentIdKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PresentIdKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.swapchainCount && (this.swapchainCount = data.swapchainCount), void 0 !== data.pPresentIds && (this.pPresentIds = data.pPresentIds); - this.sType = StructureType.PRESENT_ID_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get swapchainCount() { - return this.#view.getUint32(16, LE); - } - set swapchainCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pPresentIds() { - return this.#view.getBigUint64(24, LE); - } - set pPresentIds(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDevicePresentWaitFeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePresentWaitFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentWaitFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePresentWaitFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePresentWaitFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.presentWait && (this.presentWait = data.presentWait); - this.sType = StructureType.PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get presentWait() { - return this.#view.getUint32(16, LE); - } - set presentWait(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class HdrMetadataEXT { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(HdrMetadataEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, HdrMetadataEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < HdrMetadataEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(HdrMetadataEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.displayPrimaryRed && (this.displayPrimaryRed = data.displayPrimaryRed), void 0 !== data.displayPrimaryGreen && (this.displayPrimaryGreen = data.displayPrimaryGreen), void 0 !== data.displayPrimaryBlue && (this.displayPrimaryBlue = data.displayPrimaryBlue), void 0 !== data.whitePoint && (this.whitePoint = data.whitePoint), void 0 !== data.maxLuminance && (this.maxLuminance = data.maxLuminance), void 0 !== data.minLuminance && (this.minLuminance = data.minLuminance), void 0 !== data.maxContentLightLevel && (this.maxContentLightLevel = data.maxContentLightLevel), void 0 !== data.maxFrameAverageLightLevel && (this.maxFrameAverageLightLevel = data.maxFrameAverageLightLevel); - this.sType = StructureType.HDR_METADATA_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get displayPrimaryRed() { - return new XYColorEXT(this.#data.subarray(16, 16 + XYColorEXT.size)); - } - set displayPrimaryRed(value) { - if (value[BUFFER].byteLength < XYColorEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get displayPrimaryGreen() { - return new XYColorEXT(this.#data.subarray(24, 24 + XYColorEXT.size)); - } - set displayPrimaryGreen(value) { - if (value[BUFFER].byteLength < XYColorEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get displayPrimaryBlue() { - return new XYColorEXT(this.#data.subarray(32, 32 + XYColorEXT.size)); - } - set displayPrimaryBlue(value) { - if (value[BUFFER].byteLength < XYColorEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get whitePoint() { - return new XYColorEXT(this.#data.subarray(40, 40 + XYColorEXT.size)); - } - set whitePoint(value) { - if (value[BUFFER].byteLength < XYColorEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } - get maxLuminance() { - return this.#view.getFloat32(48, LE); - } - set maxLuminance(value) { - this.#view.setFloat32(48, Number(value), LE); - } - get minLuminance() { - return this.#view.getFloat32(52, LE); - } - set minLuminance(value) { - this.#view.setFloat32(52, Number(value), LE); - } - get maxContentLightLevel() { - return this.#view.getFloat32(56, LE); - } - set maxContentLightLevel(value) { - this.#view.setFloat32(56, Number(value), LE); - } - get maxFrameAverageLightLevel() { - return this.#view.getFloat32(60, LE); - } - set maxFrameAverageLightLevel(value) { - this.#view.setFloat32(60, Number(value), LE); - } -} -export class DisplayNativeHdrSurfaceCapabilitiesAMD { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayNativeHdrSurfaceCapabilitiesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayNativeHdrSurfaceCapabilitiesAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayNativeHdrSurfaceCapabilitiesAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayNativeHdrSurfaceCapabilitiesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.localDimmingSupport && (this.localDimmingSupport = data.localDimmingSupport); - this.sType = StructureType.DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get localDimmingSupport() { - return this.#view.getUint32(16, LE); - } - set localDimmingSupport(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SwapchainDisplayNativeHdrCreateInfoAMD { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SwapchainDisplayNativeHdrCreateInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainDisplayNativeHdrCreateInfoAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainDisplayNativeHdrCreateInfoAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SwapchainDisplayNativeHdrCreateInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.localDimmingEnable && (this.localDimmingEnable = data.localDimmingEnable); - this.sType = StructureType.SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get localDimmingEnable() { - return this.#view.getUint32(16, LE); - } - set localDimmingEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class RefreshCycleDurationGOOGLE { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RefreshCycleDurationGOOGLE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RefreshCycleDurationGOOGLE.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RefreshCycleDurationGOOGLE.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RefreshCycleDurationGOOGLE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.refreshDuration && (this.refreshDuration = data.refreshDuration); - } - get refreshDuration() { - return this.#view.getBigUint64(0, LE); - } - set refreshDuration(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } -} -export class PastPresentationTimingGOOGLE { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PastPresentationTimingGOOGLE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PastPresentationTimingGOOGLE.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PastPresentationTimingGOOGLE.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PastPresentationTimingGOOGLE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.presentID && (this.presentID = data.presentID), void 0 !== data.desiredPresentTime && (this.desiredPresentTime = data.desiredPresentTime), void 0 !== data.actualPresentTime && (this.actualPresentTime = data.actualPresentTime), void 0 !== data.earliestPresentTime && (this.earliestPresentTime = data.earliestPresentTime), void 0 !== data.presentMargin && (this.presentMargin = data.presentMargin); - } - get presentID() { - return this.#view.getUint32(0, LE); - } - set presentID(value) { - this.#view.setUint32(0, Number(value), LE); - } - get desiredPresentTime() { - return this.#view.getBigUint64(8, LE); - } - set desiredPresentTime(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get actualPresentTime() { - return this.#view.getBigUint64(16, LE); - } - set actualPresentTime(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get earliestPresentTime() { - return this.#view.getBigUint64(24, LE); - } - set earliestPresentTime(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get presentMargin() { - return this.#view.getBigUint64(32, LE); - } - set presentMargin(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class PresentTimesInfoGOOGLE { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PresentTimesInfoGOOGLE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentTimesInfoGOOGLE.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PresentTimesInfoGOOGLE.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PresentTimesInfoGOOGLE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.swapchainCount && (this.swapchainCount = data.swapchainCount), void 0 !== data.pTimes && (this.pTimes = data.pTimes); - this.sType = StructureType.PRESENT_TIMES_INFO_GOOGLE; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get swapchainCount() { - return this.#view.getUint32(16, LE); - } - set swapchainCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pTimes() { - return this.#view.getBigUint64(24, LE); - } - set pTimes(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PresentTimeGOOGLE { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PresentTimeGOOGLE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentTimeGOOGLE.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PresentTimeGOOGLE.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PresentTimeGOOGLE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.presentID && (this.presentID = data.presentID), void 0 !== data.desiredPresentTime && (this.desiredPresentTime = data.desiredPresentTime); - } - get presentID() { - return this.#view.getUint32(0, LE); - } - set presentID(value) { - this.#view.setUint32(0, Number(value), LE); - } - get desiredPresentTime() { - return this.#view.getBigUint64(8, LE); - } - set desiredPresentTime(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} -export class IOSSurfaceCreateInfoMVK { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(IOSSurfaceCreateInfoMVK.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IOSSurfaceCreateInfoMVK.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < IOSSurfaceCreateInfoMVK.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(IOSSurfaceCreateInfoMVK.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pView && (this.pView = data.pView); - this.sType = StructureType.IOS_SURFACE_CREATE_INFO_MVK; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pView() { - return this.#view.getBigUint64(24, LE); - } - set pView(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class MacOSSurfaceCreateInfoMVK { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MacOSSurfaceCreateInfoMVK.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MacOSSurfaceCreateInfoMVK.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MacOSSurfaceCreateInfoMVK.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MacOSSurfaceCreateInfoMVK.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pView && (this.pView = data.pView); - this.sType = StructureType.MACOS_SURFACE_CREATE_INFO_MVK; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pView() { - return this.#view.getBigUint64(24, LE); - } - set pView(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class MetalSurfaceCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MetalSurfaceCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MetalSurfaceCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MetalSurfaceCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MetalSurfaceCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pLayer && (this.pLayer = data.pLayer); - this.sType = StructureType.METAL_SURFACE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pLayer() { - return this.#view.getBigUint64(24, LE); - } - set pLayer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ViewportWScalingNV { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ViewportWScalingNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ViewportWScalingNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ViewportWScalingNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ViewportWScalingNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.xcoeff && (this.xcoeff = data.xcoeff), void 0 !== data.ycoeff && (this.ycoeff = data.ycoeff); - } - get xcoeff() { - return this.#view.getFloat32(0, LE); - } - set xcoeff(value) { - this.#view.setFloat32(0, Number(value), LE); - } - get ycoeff() { - return this.#view.getFloat32(4, LE); - } - set ycoeff(value) { - this.#view.setFloat32(4, Number(value), LE); - } -} -export class PipelineViewportWScalingStateCreateInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineViewportWScalingStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportWScalingStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportWScalingStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineViewportWScalingStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.viewportWScalingEnable && (this.viewportWScalingEnable = data.viewportWScalingEnable), void 0 !== data.viewportCount && (this.viewportCount = data.viewportCount), void 0 !== data.pViewportWScalings && (this.pViewportWScalings = data.pViewportWScalings); - this.sType = StructureType.PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get viewportWScalingEnable() { - return this.#view.getUint32(16, LE); - } - set viewportWScalingEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } - get viewportCount() { - return this.#view.getUint32(20, LE); - } - set viewportCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pViewportWScalings() { - return this.#view.getBigUint64(24, LE); - } - set pViewportWScalings(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ViewportSwizzleNV { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ViewportSwizzleNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ViewportSwizzleNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ViewportSwizzleNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ViewportSwizzleNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.x && (this.x = data.x), void 0 !== data.y && (this.y = data.y), void 0 !== data.z && (this.z = data.z), void 0 !== data.w && (this.w = data.w); - } - get x() { - return this.#view.getUint32(0, LE); - } - set x(value) { - this.#view.setUint32(0, Number(value), LE); - } - get y() { - return this.#view.getUint32(4, LE); - } - set y(value) { - this.#view.setUint32(4, Number(value), LE); - } - get z() { - return this.#view.getUint32(8, LE); - } - set z(value) { - this.#view.setUint32(8, Number(value), LE); - } - get w() { - return this.#view.getUint32(12, LE); - } - set w(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class PipelineViewportSwizzleStateCreateInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineViewportSwizzleStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportSwizzleStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportSwizzleStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineViewportSwizzleStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.viewportCount && (this.viewportCount = data.viewportCount), void 0 !== data.pViewportSwizzles && (this.pViewportSwizzles = data.pViewportSwizzles); - this.sType = StructureType.PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get viewportCount() { - return this.#view.getUint32(20, LE); - } - set viewportCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pViewportSwizzles() { - return this.#view.getBigUint64(24, LE); - } - set pViewportSwizzles(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceDiscardRectanglePropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDiscardRectanglePropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDiscardRectanglePropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDiscardRectanglePropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDiscardRectanglePropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxDiscardRectangles && (this.maxDiscardRectangles = data.maxDiscardRectangles); - this.sType = StructureType.PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxDiscardRectangles() { - return this.#view.getUint32(16, LE); - } - set maxDiscardRectangles(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineDiscardRectangleStateCreateInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineDiscardRectangleStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineDiscardRectangleStateCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineDiscardRectangleStateCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineDiscardRectangleStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.discardRectangleMode && (this.discardRectangleMode = data.discardRectangleMode), void 0 !== data.discardRectangleCount && (this.discardRectangleCount = data.discardRectangleCount), void 0 !== data.pDiscardRectangles && (this.pDiscardRectangles = data.pDiscardRectangles); - this.sType = StructureType.PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get discardRectangleMode() { - return this.#view.getUint32(20, LE); - } - set discardRectangleMode(value) { - this.#view.setUint32(20, Number(value), LE); - } - get discardRectangleCount() { - return this.#view.getUint32(24, LE); - } - set discardRectangleCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pDiscardRectangles() { - return this.#view.getBigUint64(32, LE); - } - set pDiscardRectangles(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.perViewPositionAllComponents && (this.perViewPositionAllComponents = data.perViewPositionAllComponents); - this.sType = StructureType.PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get perViewPositionAllComponents() { - return this.#view.getUint32(16, LE); - } - set perViewPositionAllComponents(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class InputAttachmentAspectReference { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(InputAttachmentAspectReference.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, InputAttachmentAspectReference.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < InputAttachmentAspectReference.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(InputAttachmentAspectReference.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.subpass && (this.subpass = data.subpass), void 0 !== data.inputAttachmentIndex && (this.inputAttachmentIndex = data.inputAttachmentIndex), void 0 !== data.aspectMask && (this.aspectMask = data.aspectMask); - } - get subpass() { - return this.#view.getUint32(0, LE); - } - set subpass(value) { - this.#view.setUint32(0, Number(value), LE); - } - get inputAttachmentIndex() { - return this.#view.getUint32(4, LE); - } - set inputAttachmentIndex(value) { - this.#view.setUint32(4, Number(value), LE); - } - get aspectMask() { - return this.#view.getUint32(8, LE); - } - set aspectMask(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class RenderPassInputAttachmentAspectCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassInputAttachmentAspectCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassInputAttachmentAspectCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassInputAttachmentAspectCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassInputAttachmentAspectCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.aspectReferenceCount && (this.aspectReferenceCount = data.aspectReferenceCount), void 0 !== data.pAspectReferences && (this.pAspectReferences = data.pAspectReferences); - this.sType = StructureType.RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get aspectReferenceCount() { - return this.#view.getUint32(16, LE); - } - set aspectReferenceCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pAspectReferences() { - return this.#view.getBigUint64(24, LE); - } - set pAspectReferences(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceSurfaceInfo2KHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSurfaceInfo2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSurfaceInfo2KHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSurfaceInfo2KHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSurfaceInfo2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.surface && (this.surface = data.surface); - this.sType = StructureType.PHYSICAL_DEVICE_SURFACE_INFO_2_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get surface() { - return this.#view.getBigUint64(16, LE); - } - set surface(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class SurfaceCapabilities2KHR { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceCapabilities2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilities2KHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilities2KHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceCapabilities2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.surfaceCapabilities && (this.surfaceCapabilities = data.surfaceCapabilities); - this.sType = StructureType.SURFACE_CAPABILITIES_2_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get surfaceCapabilities() { - return new SurfaceCapabilitiesKHR(this.#data.subarray(16, 16 + SurfaceCapabilitiesKHR.size)); - } - set surfaceCapabilities(value) { - if (value[BUFFER].byteLength < SurfaceCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class SurfaceFormat2KHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceFormat2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFormat2KHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceFormat2KHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceFormat2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.surfaceFormat && (this.surfaceFormat = data.surfaceFormat); - this.sType = StructureType.SURFACE_FORMAT_2_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get surfaceFormat() { - return new SurfaceFormatKHR(this.#data.subarray(16, 16 + SurfaceFormatKHR.size)); - } - set surfaceFormat(value) { - if (value[BUFFER].byteLength < SurfaceFormatKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class DisplayProperties2KHR { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayProperties2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayProperties2KHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayProperties2KHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayProperties2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.displayProperties && (this.displayProperties = data.displayProperties); - this.sType = StructureType.DISPLAY_PROPERTIES_2_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get displayProperties() { - return new DisplayPropertiesKHR(this.#data.subarray(16, 16 + DisplayPropertiesKHR.size)); - } - set displayProperties(value) { - if (value[BUFFER].byteLength < DisplayPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class DisplayPlaneProperties2KHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayPlaneProperties2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneProperties2KHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlaneProperties2KHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayPlaneProperties2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.displayPlaneProperties && (this.displayPlaneProperties = data.displayPlaneProperties); - this.sType = StructureType.DISPLAY_PLANE_PROPERTIES_2_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get displayPlaneProperties() { - return new DisplayPlanePropertiesKHR(this.#data.subarray(16, 16 + DisplayPlanePropertiesKHR.size)); - } - set displayPlaneProperties(value) { - if (value[BUFFER].byteLength < DisplayPlanePropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class DisplayModeProperties2KHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayModeProperties2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModeProperties2KHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayModeProperties2KHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayModeProperties2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.displayModeProperties && (this.displayModeProperties = data.displayModeProperties); - this.sType = StructureType.DISPLAY_MODE_PROPERTIES_2_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get displayModeProperties() { - return new DisplayModePropertiesKHR(this.#data.subarray(16, 16 + DisplayModePropertiesKHR.size)); - } - set displayModeProperties(value) { - if (value[BUFFER].byteLength < DisplayModePropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class DisplayPlaneInfo2KHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayPlaneInfo2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneInfo2KHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlaneInfo2KHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayPlaneInfo2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.mode && (this.mode = data.mode), void 0 !== data.planeIndex && (this.planeIndex = data.planeIndex); - this.sType = StructureType.DISPLAY_PLANE_INFO_2_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get mode() { - return this.#view.getBigUint64(16, LE); - } - set mode(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get planeIndex() { - return this.#view.getUint32(24, LE); - } - set planeIndex(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class DisplayPlaneCapabilities2KHR { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DisplayPlaneCapabilities2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneCapabilities2KHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlaneCapabilities2KHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DisplayPlaneCapabilities2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.capabilities && (this.capabilities = data.capabilities); - this.sType = StructureType.DISPLAY_PLANE_CAPABILITIES_2_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get capabilities() { - return new DisplayPlaneCapabilitiesKHR(this.#data.subarray(16, 16 + DisplayPlaneCapabilitiesKHR.size)); - } - set capabilities(value) { - if (value[BUFFER].byteLength < DisplayPlaneCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class SharedPresentSurfaceCapabilitiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SharedPresentSurfaceCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SharedPresentSurfaceCapabilitiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SharedPresentSurfaceCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SharedPresentSurfaceCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.sharedPresentSupportedUsageFlags && (this.sharedPresentSupportedUsageFlags = data.sharedPresentSupportedUsageFlags); - this.sType = StructureType.SHARED_PRESENT_SURFACE_CAPABILITIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get sharedPresentSupportedUsageFlags() { - return this.#view.getUint32(16, LE); - } - set sharedPresentSupportedUsageFlags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevice16BitStorageFeatures { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevice16BitStorageFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevice16BitStorageFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevice16BitStorageFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevice16BitStorageFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.storageBuffer16BitAccess && (this.storageBuffer16BitAccess = data.storageBuffer16BitAccess), void 0 !== data.uniformAndStorageBuffer16BitAccess && (this.uniformAndStorageBuffer16BitAccess = data.uniformAndStorageBuffer16BitAccess), void 0 !== data.storagePushConstant16 && (this.storagePushConstant16 = data.storagePushConstant16), void 0 !== data.storageInputOutput16 && (this.storageInputOutput16 = data.storageInputOutput16); - this.sType = StructureType.PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get storageBuffer16BitAccess() { - return this.#view.getUint32(16, LE); - } - set storageBuffer16BitAccess(value) { - this.#view.setUint32(16, Number(value), LE); - } - get uniformAndStorageBuffer16BitAccess() { - return this.#view.getUint32(20, LE); - } - set uniformAndStorageBuffer16BitAccess(value) { - this.#view.setUint32(20, Number(value), LE); - } - get storagePushConstant16() { - return this.#view.getUint32(24, LE); - } - set storagePushConstant16(value) { - this.#view.setUint32(24, Number(value), LE); - } - get storageInputOutput16() { - return this.#view.getUint32(28, LE); - } - set storageInputOutput16(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDeviceSubgroupProperties { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSubgroupProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubgroupProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubgroupProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSubgroupProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.subgroupSize && (this.subgroupSize = data.subgroupSize), void 0 !== data.supportedStages && (this.supportedStages = data.supportedStages), void 0 !== data.supportedOperations && (this.supportedOperations = data.supportedOperations), void 0 !== data.quadOperationsInAllStages && (this.quadOperationsInAllStages = data.quadOperationsInAllStages); - this.sType = StructureType.PHYSICAL_DEVICE_SUBGROUP_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get subgroupSize() { - return this.#view.getUint32(16, LE); - } - set subgroupSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get supportedStages() { - return this.#view.getUint32(20, LE); - } - set supportedStages(value) { - this.#view.setUint32(20, Number(value), LE); - } - get supportedOperations() { - return this.#view.getUint32(24, LE); - } - set supportedOperations(value) { - this.#view.setUint32(24, Number(value), LE); - } - get quadOperationsInAllStages() { - return this.#view.getUint32(28, LE); - } - set quadOperationsInAllStages(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDeviceShaderSubgroupExtendedTypesFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderSubgroupExtendedTypes && (this.shaderSubgroupExtendedTypes = data.shaderSubgroupExtendedTypes); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderSubgroupExtendedTypes() { - return this.#view.getUint32(16, LE); - } - set shaderSubgroupExtendedTypes(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class BufferMemoryRequirementsInfo2 { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferMemoryRequirementsInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferMemoryRequirementsInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferMemoryRequirementsInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferMemoryRequirementsInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.buffer && (this.buffer = data.buffer); - this.sType = StructureType.BUFFER_MEMORY_REQUIREMENTS_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get buffer() { - return this.#view.getBigUint64(16, LE); - } - set buffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class DeviceBufferMemoryRequirements { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceBufferMemoryRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceBufferMemoryRequirements.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceBufferMemoryRequirements.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceBufferMemoryRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pCreateInfo && (this.pCreateInfo = data.pCreateInfo); - this.sType = StructureType.DEVICE_BUFFER_MEMORY_REQUIREMENTS; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pCreateInfo() { - return this.#view.getBigUint64(16, LE); - } - set pCreateInfo(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class ImageMemoryRequirementsInfo2 { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageMemoryRequirementsInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageMemoryRequirementsInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageMemoryRequirementsInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageMemoryRequirementsInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.image && (this.image = data.image); - this.sType = StructureType.IMAGE_MEMORY_REQUIREMENTS_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get image() { - return this.#view.getBigUint64(16, LE); - } - set image(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class ImageSparseMemoryRequirementsInfo2 { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageSparseMemoryRequirementsInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSparseMemoryRequirementsInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSparseMemoryRequirementsInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageSparseMemoryRequirementsInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.image && (this.image = data.image); - this.sType = StructureType.IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get image() { - return this.#view.getBigUint64(16, LE); - } - set image(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class DeviceImageMemoryRequirements { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceImageMemoryRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceImageMemoryRequirements.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceImageMemoryRequirements.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceImageMemoryRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pCreateInfo && (this.pCreateInfo = data.pCreateInfo), void 0 !== data.planeAspect && (this.planeAspect = data.planeAspect); - this.sType = StructureType.DEVICE_IMAGE_MEMORY_REQUIREMENTS; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pCreateInfo() { - return this.#view.getBigUint64(16, LE); - } - set pCreateInfo(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get planeAspect() { - return this.#view.getUint32(24, LE); - } - set planeAspect(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class MemoryRequirements2 { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryRequirements2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryRequirements2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryRequirements2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryRequirements2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryRequirements && (this.memoryRequirements = data.memoryRequirements); - this.sType = StructureType.MEMORY_REQUIREMENTS_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryRequirements() { - return new MemoryRequirements(this.#data.subarray(16, 16 + MemoryRequirements.size)); - } - set memoryRequirements(value) { - if (value[BUFFER].byteLength < MemoryRequirements.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class SparseImageMemoryRequirements2 { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SparseImageMemoryRequirements2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryRequirements2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageMemoryRequirements2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SparseImageMemoryRequirements2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryRequirements && (this.memoryRequirements = data.memoryRequirements); - this.sType = StructureType.SPARSE_IMAGE_MEMORY_REQUIREMENTS_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryRequirements() { - return new SparseImageMemoryRequirements(this.#data.subarray(16, 16 + SparseImageMemoryRequirements.size)); - } - set memoryRequirements(value) { - if (value[BUFFER].byteLength < SparseImageMemoryRequirements.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class PhysicalDevicePointClippingProperties { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePointClippingProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePointClippingProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePointClippingProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePointClippingProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pointClippingBehavior && (this.pointClippingBehavior = data.pointClippingBehavior); - this.sType = StructureType.PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pointClippingBehavior() { - return this.#view.getUint32(16, LE); - } - set pointClippingBehavior(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MemoryDedicatedRequirements { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryDedicatedRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryDedicatedRequirements.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryDedicatedRequirements.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryDedicatedRequirements.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.prefersDedicatedAllocation && (this.prefersDedicatedAllocation = data.prefersDedicatedAllocation), void 0 !== data.requiresDedicatedAllocation && (this.requiresDedicatedAllocation = data.requiresDedicatedAllocation); - this.sType = StructureType.MEMORY_DEDICATED_REQUIREMENTS; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get prefersDedicatedAllocation() { - return this.#view.getUint32(16, LE); - } - set prefersDedicatedAllocation(value) { - this.#view.setUint32(16, Number(value), LE); - } - get requiresDedicatedAllocation() { - return this.#view.getUint32(20, LE); - } - set requiresDedicatedAllocation(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class MemoryDedicatedAllocateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryDedicatedAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryDedicatedAllocateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryDedicatedAllocateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryDedicatedAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.image && (this.image = data.image), void 0 !== data.buffer && (this.buffer = data.buffer); - this.sType = StructureType.MEMORY_DEDICATED_ALLOCATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get image() { - return this.#view.getBigUint64(16, LE); - } - set image(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get buffer() { - return this.#view.getBigUint64(24, LE); - } - set buffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ImageViewUsageCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageViewUsageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewUsageCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewUsageCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageViewUsageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.usage && (this.usage = data.usage); - this.sType = StructureType.IMAGE_VIEW_USAGE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get usage() { - return this.#view.getUint32(16, LE); - } - set usage(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineTessellationDomainOriginStateCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineTessellationDomainOriginStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineTessellationDomainOriginStateCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineTessellationDomainOriginStateCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineTessellationDomainOriginStateCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.domainOrigin && (this.domainOrigin = data.domainOrigin); - this.sType = StructureType.PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get domainOrigin() { - return this.#view.getUint32(16, LE); - } - set domainOrigin(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SamplerYcbcrConversionInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SamplerYcbcrConversionInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerYcbcrConversionInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerYcbcrConversionInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SamplerYcbcrConversionInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.conversion && (this.conversion = data.conversion); - this.sType = StructureType.SAMPLER_YCBCR_CONVERSION_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get conversion() { - return this.#view.getBigUint64(16, LE); - } - set conversion(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class SamplerYcbcrConversionCreateInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SamplerYcbcrConversionCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerYcbcrConversionCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerYcbcrConversionCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SamplerYcbcrConversionCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.format && (this.format = data.format), void 0 !== data.ycbcrModel && (this.ycbcrModel = data.ycbcrModel), void 0 !== data.ycbcrRange && (this.ycbcrRange = data.ycbcrRange), void 0 !== data.components && (this.components = data.components), void 0 !== data.xChromaOffset && (this.xChromaOffset = data.xChromaOffset), void 0 !== data.yChromaOffset && (this.yChromaOffset = data.yChromaOffset), void 0 !== data.chromaFilter && (this.chromaFilter = data.chromaFilter), void 0 !== data.forceExplicitReconstruction && (this.forceExplicitReconstruction = data.forceExplicitReconstruction); - this.sType = StructureType.SAMPLER_YCBCR_CONVERSION_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get format() { - return this.#view.getUint32(16, LE); - } - set format(value) { - this.#view.setUint32(16, Number(value), LE); - } - get ycbcrModel() { - return this.#view.getUint32(20, LE); - } - set ycbcrModel(value) { - this.#view.setUint32(20, Number(value), LE); - } - get ycbcrRange() { - return this.#view.getUint32(24, LE); - } - set ycbcrRange(value) { - this.#view.setUint32(24, Number(value), LE); - } - get components() { - return new ComponentMapping(this.#data.subarray(28, 28 + ComponentMapping.size)); - } - set components(value) { - if (value[BUFFER].byteLength < ComponentMapping.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 28); - } - get xChromaOffset() { - return this.#view.getUint32(44, LE); - } - set xChromaOffset(value) { - this.#view.setUint32(44, Number(value), LE); - } - get yChromaOffset() { - return this.#view.getUint32(48, LE); - } - set yChromaOffset(value) { - this.#view.setUint32(48, Number(value), LE); - } - get chromaFilter() { - return this.#view.getUint32(52, LE); - } - set chromaFilter(value) { - this.#view.setUint32(52, Number(value), LE); - } - get forceExplicitReconstruction() { - return this.#view.getUint32(56, LE); - } - set forceExplicitReconstruction(value) { - this.#view.setUint32(56, Number(value), LE); - } -} -export class BindImagePlaneMemoryInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindImagePlaneMemoryInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImagePlaneMemoryInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindImagePlaneMemoryInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindImagePlaneMemoryInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.planeAspect && (this.planeAspect = data.planeAspect); - this.sType = StructureType.BIND_IMAGE_PLANE_MEMORY_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get planeAspect() { - return this.#view.getUint32(16, LE); - } - set planeAspect(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImagePlaneMemoryRequirementsInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImagePlaneMemoryRequirementsInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImagePlaneMemoryRequirementsInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImagePlaneMemoryRequirementsInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImagePlaneMemoryRequirementsInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.planeAspect && (this.planeAspect = data.planeAspect); - this.sType = StructureType.IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get planeAspect() { - return this.#view.getUint32(16, LE); - } - set planeAspect(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceSamplerYcbcrConversionFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSamplerYcbcrConversionFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSamplerYcbcrConversionFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSamplerYcbcrConversionFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSamplerYcbcrConversionFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.samplerYcbcrConversion && (this.samplerYcbcrConversion = data.samplerYcbcrConversion); - this.sType = StructureType.PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get samplerYcbcrConversion() { - return this.#view.getUint32(16, LE); - } - set samplerYcbcrConversion(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SamplerYcbcrConversionImageFormatProperties { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SamplerYcbcrConversionImageFormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerYcbcrConversionImageFormatProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerYcbcrConversionImageFormatProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SamplerYcbcrConversionImageFormatProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.combinedImageSamplerDescriptorCount && (this.combinedImageSamplerDescriptorCount = data.combinedImageSamplerDescriptorCount); - this.sType = StructureType.SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get combinedImageSamplerDescriptorCount() { - return this.#view.getUint32(16, LE); - } - set combinedImageSamplerDescriptorCount(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class TextureLODGatherFormatPropertiesAMD { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(TextureLODGatherFormatPropertiesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TextureLODGatherFormatPropertiesAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < TextureLODGatherFormatPropertiesAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(TextureLODGatherFormatPropertiesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.supportsTextureGatherLODBiasAMD && (this.supportsTextureGatherLODBiasAMD = data.supportsTextureGatherLODBiasAMD); - this.sType = StructureType.TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get supportsTextureGatherLODBiasAMD() { - return this.#view.getUint32(16, LE); - } - set supportsTextureGatherLODBiasAMD(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ConditionalRenderingBeginInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ConditionalRenderingBeginInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ConditionalRenderingBeginInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ConditionalRenderingBeginInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ConditionalRenderingBeginInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.CONDITIONAL_RENDERING_BEGIN_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get buffer() { - return this.#view.getBigUint64(16, LE); - } - set buffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get offset() { - return this.#view.getBigUint64(24, LE); - } - set offset(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get flags() { - return this.#view.getUint32(32, LE); - } - set flags(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class ProtectedSubmitInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ProtectedSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ProtectedSubmitInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ProtectedSubmitInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ProtectedSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.protectedSubmit && (this.protectedSubmit = data.protectedSubmit); - this.sType = StructureType.PROTECTED_SUBMIT_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get protectedSubmit() { - return this.#view.getUint32(16, LE); - } - set protectedSubmit(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceProtectedMemoryFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProtectedMemoryFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProtectedMemoryFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.protectedMemory && (this.protectedMemory = data.protectedMemory); - this.sType = StructureType.PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get protectedMemory() { - return this.#view.getUint32(16, LE); - } - set protectedMemory(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceProtectedMemoryProperties { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProtectedMemoryProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProtectedMemoryProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.protectedNoFault && (this.protectedNoFault = data.protectedNoFault); - this.sType = StructureType.PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get protectedNoFault() { - return this.#view.getUint32(16, LE); - } - set protectedNoFault(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DeviceQueueInfo2 { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceQueueInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceQueueInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceQueueInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceQueueInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.queueFamilyIndex && (this.queueFamilyIndex = data.queueFamilyIndex), void 0 !== data.queueIndex && (this.queueIndex = data.queueIndex); - this.sType = StructureType.DEVICE_QUEUE_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get queueFamilyIndex() { - return this.#view.getUint32(20, LE); - } - set queueFamilyIndex(value) { - this.#view.setUint32(20, Number(value), LE); - } - get queueIndex() { - return this.#view.getUint32(24, LE); - } - set queueIndex(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PipelineCoverageToColorStateCreateInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineCoverageToColorStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCoverageToColorStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCoverageToColorStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineCoverageToColorStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.coverageToColorEnable && (this.coverageToColorEnable = data.coverageToColorEnable), void 0 !== data.coverageToColorLocation && (this.coverageToColorLocation = data.coverageToColorLocation); - this.sType = StructureType.PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get coverageToColorEnable() { - return this.#view.getUint32(20, LE); - } - set coverageToColorEnable(value) { - this.#view.setUint32(20, Number(value), LE); - } - get coverageToColorLocation() { - return this.#view.getUint32(24, LE); - } - set coverageToColorLocation(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceSamplerFilterMinmaxProperties { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSamplerFilterMinmaxProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSamplerFilterMinmaxProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSamplerFilterMinmaxProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSamplerFilterMinmaxProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.filterMinmaxSingleComponentFormats && (this.filterMinmaxSingleComponentFormats = data.filterMinmaxSingleComponentFormats), void 0 !== data.filterMinmaxImageComponentMapping && (this.filterMinmaxImageComponentMapping = data.filterMinmaxImageComponentMapping); - this.sType = StructureType.PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get filterMinmaxSingleComponentFormats() { - return this.#view.getUint32(16, LE); - } - set filterMinmaxSingleComponentFormats(value) { - this.#view.setUint32(16, Number(value), LE); - } - get filterMinmaxImageComponentMapping() { - return this.#view.getUint32(20, LE); - } - set filterMinmaxImageComponentMapping(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class SampleLocationEXT { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SampleLocationEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SampleLocationEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SampleLocationEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SampleLocationEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.x && (this.x = data.x), void 0 !== data.y && (this.y = data.y); - } - get x() { - return this.#view.getFloat32(0, LE); - } - set x(value) { - this.#view.setFloat32(0, Number(value), LE); - } - get y() { - return this.#view.getFloat32(4, LE); - } - set y(value) { - this.#view.setFloat32(4, Number(value), LE); - } -} -export class SampleLocationsInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SampleLocationsInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SampleLocationsInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SampleLocationsInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SampleLocationsInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.sampleLocationsPerPixel && (this.sampleLocationsPerPixel = data.sampleLocationsPerPixel), void 0 !== data.sampleLocationGridSize && (this.sampleLocationGridSize = data.sampleLocationGridSize), void 0 !== data.sampleLocationsCount && (this.sampleLocationsCount = data.sampleLocationsCount), void 0 !== data.pSampleLocations && (this.pSampleLocations = data.pSampleLocations); - this.sType = StructureType.SAMPLE_LOCATIONS_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get sampleLocationsPerPixel() { - return this.#view.getUint32(16, LE); - } - set sampleLocationsPerPixel(value) { - this.#view.setUint32(16, Number(value), LE); - } - get sampleLocationGridSize() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - set sampleLocationGridSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } - get sampleLocationsCount() { - return this.#view.getUint32(28, LE); - } - set sampleLocationsCount(value) { - this.#view.setUint32(28, Number(value), LE); - } - get pSampleLocations() { - return this.#view.getBigUint64(32, LE); - } - set pSampleLocations(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class AttachmentSampleLocationsEXT { - static size = 44; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AttachmentSampleLocationsEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentSampleLocationsEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentSampleLocationsEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AttachmentSampleLocationsEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.attachmentIndex && (this.attachmentIndex = data.attachmentIndex), void 0 !== data.sampleLocationsInfo && (this.sampleLocationsInfo = data.sampleLocationsInfo); - } - get attachmentIndex() { - return this.#view.getUint32(0, LE); - } - set attachmentIndex(value) { - this.#view.setUint32(0, Number(value), LE); - } - get sampleLocationsInfo() { - return new SampleLocationsInfoEXT(this.#data.subarray(4, 4 + SampleLocationsInfoEXT.size)); - } - set sampleLocationsInfo(value) { - if (value[BUFFER].byteLength < SampleLocationsInfoEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 4); - } -} -export class SubpassSampleLocationsEXT { - static size = 44; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassSampleLocationsEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassSampleLocationsEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassSampleLocationsEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassSampleLocationsEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.subpassIndex && (this.subpassIndex = data.subpassIndex), void 0 !== data.sampleLocationsInfo && (this.sampleLocationsInfo = data.sampleLocationsInfo); - } - get subpassIndex() { - return this.#view.getUint32(0, LE); - } - set subpassIndex(value) { - this.#view.setUint32(0, Number(value), LE); - } - get sampleLocationsInfo() { - return new SampleLocationsInfoEXT(this.#data.subarray(4, 4 + SampleLocationsInfoEXT.size)); - } - set sampleLocationsInfo(value) { - if (value[BUFFER].byteLength < SampleLocationsInfoEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 4); - } -} -export class RenderPassSampleLocationsBeginInfoEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassSampleLocationsBeginInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassSampleLocationsBeginInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassSampleLocationsBeginInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassSampleLocationsBeginInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.attachmentInitialSampleLocationsCount && (this.attachmentInitialSampleLocationsCount = data.attachmentInitialSampleLocationsCount), void 0 !== data.pAttachmentInitialSampleLocations && (this.pAttachmentInitialSampleLocations = data.pAttachmentInitialSampleLocations), void 0 !== data.postSubpassSampleLocationsCount && (this.postSubpassSampleLocationsCount = data.postSubpassSampleLocationsCount), void 0 !== data.pPostSubpassSampleLocations && (this.pPostSubpassSampleLocations = data.pPostSubpassSampleLocations); - this.sType = StructureType.RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get attachmentInitialSampleLocationsCount() { - return this.#view.getUint32(16, LE); - } - set attachmentInitialSampleLocationsCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pAttachmentInitialSampleLocations() { - return this.#view.getBigUint64(24, LE); - } - set pAttachmentInitialSampleLocations(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get postSubpassSampleLocationsCount() { - return this.#view.getUint32(32, LE); - } - set postSubpassSampleLocationsCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pPostSubpassSampleLocations() { - return this.#view.getBigUint64(40, LE); - } - set pPostSubpassSampleLocations(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class PipelineSampleLocationsStateCreateInfoEXT { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineSampleLocationsStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineSampleLocationsStateCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineSampleLocationsStateCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineSampleLocationsStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.sampleLocationsEnable && (this.sampleLocationsEnable = data.sampleLocationsEnable), void 0 !== data.sampleLocationsInfo && (this.sampleLocationsInfo = data.sampleLocationsInfo); - this.sType = StructureType.PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get sampleLocationsEnable() { - return this.#view.getUint32(16, LE); - } - set sampleLocationsEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } - get sampleLocationsInfo() { - return new SampleLocationsInfoEXT(this.#data.subarray(20, 20 + SampleLocationsInfoEXT.size)); - } - set sampleLocationsInfo(value) { - if (value[BUFFER].byteLength < SampleLocationsInfoEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } -} -export class PhysicalDeviceSampleLocationsPropertiesEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSampleLocationsPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSampleLocationsPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSampleLocationsPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSampleLocationsPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.sampleLocationSampleCounts && (this.sampleLocationSampleCounts = data.sampleLocationSampleCounts), void 0 !== data.maxSampleLocationGridSize && (this.maxSampleLocationGridSize = data.maxSampleLocationGridSize), void 0 !== data.sampleLocationCoordinateRange && (this.sampleLocationCoordinateRange = data.sampleLocationCoordinateRange), void 0 !== data.sampleLocationSubPixelBits && (this.sampleLocationSubPixelBits = data.sampleLocationSubPixelBits), void 0 !== data.variableSampleLocations && (this.variableSampleLocations = data.variableSampleLocations); - this.sType = StructureType.PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get sampleLocationSampleCounts() { - return this.#view.getUint32(16, LE); - } - set sampleLocationSampleCounts(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxSampleLocationGridSize() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - set maxSampleLocationGridSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } - get sampleLocationCoordinateRange() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 28, 2); - } - set sampleLocationCoordinateRange(value) { - this.#data.set(new Uint8Array(value.buffer), 28); - } - get sampleLocationSubPixelBits() { - return this.#view.getUint32(36, LE); - } - set sampleLocationSubPixelBits(value) { - this.#view.setUint32(36, Number(value), LE); - } - get variableSampleLocations() { - return this.#view.getUint32(40, LE); - } - set variableSampleLocations(value) { - this.#view.setUint32(40, Number(value), LE); - } -} -export class MultisamplePropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MultisamplePropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultisamplePropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MultisamplePropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MultisamplePropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxSampleLocationGridSize && (this.maxSampleLocationGridSize = data.maxSampleLocationGridSize); - this.sType = StructureType.MULTISAMPLE_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxSampleLocationGridSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - set maxSampleLocationGridSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class SamplerReductionModeCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SamplerReductionModeCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerReductionModeCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerReductionModeCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SamplerReductionModeCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.reductionMode && (this.reductionMode = data.reductionMode); - this.sType = StructureType.SAMPLER_REDUCTION_MODE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get reductionMode() { - return this.#view.getUint32(16, LE); - } - set reductionMode(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceBlendOperationAdvancedFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.advancedBlendCoherentOperations && (this.advancedBlendCoherentOperations = data.advancedBlendCoherentOperations); - this.sType = StructureType.PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get advancedBlendCoherentOperations() { - return this.#view.getUint32(16, LE); - } - set advancedBlendCoherentOperations(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceMultiDrawFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMultiDrawFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiDrawFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiDrawFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMultiDrawFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.multiDraw && (this.multiDraw = data.multiDraw); - this.sType = StructureType.PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get multiDraw() { - return this.#view.getUint32(16, LE); - } - set multiDraw(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceBlendOperationAdvancedPropertiesEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.advancedBlendMaxColorAttachments && (this.advancedBlendMaxColorAttachments = data.advancedBlendMaxColorAttachments), void 0 !== data.advancedBlendIndependentBlend && (this.advancedBlendIndependentBlend = data.advancedBlendIndependentBlend), void 0 !== data.advancedBlendNonPremultipliedSrcColor && (this.advancedBlendNonPremultipliedSrcColor = data.advancedBlendNonPremultipliedSrcColor), void 0 !== data.advancedBlendNonPremultipliedDstColor && (this.advancedBlendNonPremultipliedDstColor = data.advancedBlendNonPremultipliedDstColor), void 0 !== data.advancedBlendCorrelatedOverlap && (this.advancedBlendCorrelatedOverlap = data.advancedBlendCorrelatedOverlap), void 0 !== data.advancedBlendAllOperations && (this.advancedBlendAllOperations = data.advancedBlendAllOperations); - this.sType = StructureType.PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get advancedBlendMaxColorAttachments() { - return this.#view.getUint32(16, LE); - } - set advancedBlendMaxColorAttachments(value) { - this.#view.setUint32(16, Number(value), LE); - } - get advancedBlendIndependentBlend() { - return this.#view.getUint32(20, LE); - } - set advancedBlendIndependentBlend(value) { - this.#view.setUint32(20, Number(value), LE); - } - get advancedBlendNonPremultipliedSrcColor() { - return this.#view.getUint32(24, LE); - } - set advancedBlendNonPremultipliedSrcColor(value) { - this.#view.setUint32(24, Number(value), LE); - } - get advancedBlendNonPremultipliedDstColor() { - return this.#view.getUint32(28, LE); - } - set advancedBlendNonPremultipliedDstColor(value) { - this.#view.setUint32(28, Number(value), LE); - } - get advancedBlendCorrelatedOverlap() { - return this.#view.getUint32(32, LE); - } - set advancedBlendCorrelatedOverlap(value) { - this.#view.setUint32(32, Number(value), LE); - } - get advancedBlendAllOperations() { - return this.#view.getUint32(36, LE); - } - set advancedBlendAllOperations(value) { - this.#view.setUint32(36, Number(value), LE); - } -} -export class PipelineColorBlendAdvancedStateCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineColorBlendAdvancedStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorBlendAdvancedStateCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineColorBlendAdvancedStateCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineColorBlendAdvancedStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcPremultiplied && (this.srcPremultiplied = data.srcPremultiplied), void 0 !== data.dstPremultiplied && (this.dstPremultiplied = data.dstPremultiplied), void 0 !== data.blendOverlap && (this.blendOverlap = data.blendOverlap); - this.sType = StructureType.PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcPremultiplied() { - return this.#view.getUint32(16, LE); - } - set srcPremultiplied(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dstPremultiplied() { - return this.#view.getUint32(20, LE); - } - set dstPremultiplied(value) { - this.#view.setUint32(20, Number(value), LE); - } - get blendOverlap() { - return this.#view.getUint32(24, LE); - } - set blendOverlap(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceInlineUniformBlockFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInlineUniformBlockFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceInlineUniformBlockFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.inlineUniformBlock && (this.inlineUniformBlock = data.inlineUniformBlock), void 0 !== data.descriptorBindingInlineUniformBlockUpdateAfterBind && (this.descriptorBindingInlineUniformBlockUpdateAfterBind = data.descriptorBindingInlineUniformBlockUpdateAfterBind); - this.sType = StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get inlineUniformBlock() { - return this.#view.getUint32(16, LE); - } - set inlineUniformBlock(value) { - this.#view.setUint32(16, Number(value), LE); - } - get descriptorBindingInlineUniformBlockUpdateAfterBind() { - return this.#view.getUint32(20, LE); - } - set descriptorBindingInlineUniformBlockUpdateAfterBind(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceInlineUniformBlockProperties { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInlineUniformBlockProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceInlineUniformBlockProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxInlineUniformBlockSize && (this.maxInlineUniformBlockSize = data.maxInlineUniformBlockSize), void 0 !== data.maxPerStageDescriptorInlineUniformBlocks && (this.maxPerStageDescriptorInlineUniformBlocks = data.maxPerStageDescriptorInlineUniformBlocks), void 0 !== data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks && (this.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks), void 0 !== data.maxDescriptorSetInlineUniformBlocks && (this.maxDescriptorSetInlineUniformBlocks = data.maxDescriptorSetInlineUniformBlocks), void 0 !== data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks && (this.maxDescriptorSetUpdateAfterBindInlineUniformBlocks = data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks); - this.sType = StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxInlineUniformBlockSize() { - return this.#view.getUint32(16, LE); - } - set maxInlineUniformBlockSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxPerStageDescriptorInlineUniformBlocks() { - return this.#view.getUint32(20, LE); - } - set maxPerStageDescriptorInlineUniformBlocks(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks() { - return this.#view.getUint32(24, LE); - } - set maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(value) { - this.#view.setUint32(24, Number(value), LE); - } - get maxDescriptorSetInlineUniformBlocks() { - return this.#view.getUint32(28, LE); - } - set maxDescriptorSetInlineUniformBlocks(value) { - this.#view.setUint32(28, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindInlineUniformBlocks() { - return this.#view.getUint32(32, LE); - } - set maxDescriptorSetUpdateAfterBindInlineUniformBlocks(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class WriteDescriptorSetInlineUniformBlock { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(WriteDescriptorSetInlineUniformBlock.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSetInlineUniformBlock.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < WriteDescriptorSetInlineUniformBlock.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(WriteDescriptorSetInlineUniformBlock.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.dataSize && (this.dataSize = data.dataSize), void 0 !== data.pData && (this.pData = data.pData); - this.sType = StructureType.WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dataSize() { - return this.#view.getUint32(16, LE); - } - set dataSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pData() { - return this.#view.getBigUint64(24, LE); - } - set pData(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class DescriptorPoolInlineUniformBlockCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorPoolInlineUniformBlockCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorPoolInlineUniformBlockCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorPoolInlineUniformBlockCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorPoolInlineUniformBlockCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxInlineUniformBlockBindings && (this.maxInlineUniformBlockBindings = data.maxInlineUniformBlockBindings); - this.sType = StructureType.DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxInlineUniformBlockBindings() { - return this.#view.getUint32(16, LE); - } - set maxInlineUniformBlockBindings(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineCoverageModulationStateCreateInfoNV { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineCoverageModulationStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCoverageModulationStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCoverageModulationStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineCoverageModulationStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.coverageModulationMode && (this.coverageModulationMode = data.coverageModulationMode), void 0 !== data.coverageModulationTableEnable && (this.coverageModulationTableEnable = data.coverageModulationTableEnable), void 0 !== data.coverageModulationTableCount && (this.coverageModulationTableCount = data.coverageModulationTableCount), void 0 !== data.pCoverageModulationTable && (this.pCoverageModulationTable = data.pCoverageModulationTable); - this.sType = StructureType.PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get coverageModulationMode() { - return this.#view.getUint32(20, LE); - } - set coverageModulationMode(value) { - this.#view.setUint32(20, Number(value), LE); - } - get coverageModulationTableEnable() { - return this.#view.getUint32(24, LE); - } - set coverageModulationTableEnable(value) { - this.#view.setUint32(24, Number(value), LE); - } - get coverageModulationTableCount() { - return this.#view.getUint32(28, LE); - } - set coverageModulationTableCount(value) { - this.#view.setUint32(28, Number(value), LE); - } - get pCoverageModulationTable() { - return this.#view.getBigUint64(32, LE); - } - set pCoverageModulationTable(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ImageFormatListCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageFormatListCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatListCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageFormatListCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageFormatListCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.viewFormatCount && (this.viewFormatCount = data.viewFormatCount), void 0 !== data.pViewFormats && (this.pViewFormats = data.pViewFormats); - this.sType = StructureType.IMAGE_FORMAT_LIST_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get viewFormatCount() { - return this.#view.getUint32(16, LE); - } - set viewFormatCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pViewFormats() { - return this.#view.getBigUint64(24, LE); - } - set pViewFormats(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ValidationCacheCreateInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ValidationCacheCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ValidationCacheCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ValidationCacheCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ValidationCacheCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.initialDataSize && (this.initialDataSize = data.initialDataSize), void 0 !== data.pInitialData && (this.pInitialData = data.pInitialData); - this.sType = StructureType.VALIDATION_CACHE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get initialDataSize() { - return this.#view.getBigUint64(24, LE); - } - set initialDataSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get pInitialData() { - return this.#view.getBigUint64(32, LE); - } - set pInitialData(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ShaderModuleValidationCacheCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ShaderModuleValidationCacheCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderModuleValidationCacheCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderModuleValidationCacheCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ShaderModuleValidationCacheCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.validationCache && (this.validationCache = data.validationCache); - this.sType = StructureType.SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get validationCache() { - return this.#view.getBigUint64(16, LE); - } - set validationCache(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceMaintenance3Properties { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMaintenance3Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMaintenance3Properties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMaintenance3Properties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMaintenance3Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxPerSetDescriptors && (this.maxPerSetDescriptors = data.maxPerSetDescriptors), void 0 !== data.maxMemoryAllocationSize && (this.maxMemoryAllocationSize = data.maxMemoryAllocationSize); - this.sType = StructureType.PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxPerSetDescriptors() { - return this.#view.getUint32(16, LE); - } - set maxPerSetDescriptors(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxMemoryAllocationSize() { - return this.#view.getBigUint64(24, LE); - } - set maxMemoryAllocationSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class PhysicalDeviceMaintenance4Features { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMaintenance4Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMaintenance4Features.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMaintenance4Features.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMaintenance4Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maintenance4 && (this.maintenance4 = data.maintenance4); - this.sType = StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maintenance4() { - return this.#view.getUint32(16, LE); - } - set maintenance4(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceMaintenance4Properties { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMaintenance4Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMaintenance4Properties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMaintenance4Properties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMaintenance4Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxBufferSize && (this.maxBufferSize = data.maxBufferSize); - this.sType = StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxBufferSize() { - return this.#view.getBigUint64(16, LE); - } - set maxBufferSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class DescriptorSetLayoutSupport { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorSetLayoutSupport.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutSupport.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutSupport.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorSetLayoutSupport.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.supported && (this.supported = data.supported); - this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_SUPPORT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get supported() { - return this.#view.getUint32(16, LE); - } - set supported(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceShaderDrawParametersFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderDrawParametersFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderDrawParametersFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderDrawParametersFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderDrawParametersFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderDrawParameters && (this.shaderDrawParameters = data.shaderDrawParameters); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderDrawParameters() { - return this.#view.getUint32(16, LE); - } - set shaderDrawParameters(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceShaderFloat16Int8Features { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderFloat16Int8Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderFloat16Int8Features.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderFloat16Int8Features.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderFloat16Int8Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderFloat16 && (this.shaderFloat16 = data.shaderFloat16), void 0 !== data.shaderInt8 && (this.shaderInt8 = data.shaderInt8); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderFloat16() { - return this.#view.getUint32(16, LE); - } - set shaderFloat16(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shaderInt8() { - return this.#view.getUint32(20, LE); - } - set shaderInt8(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceFloatControlsProperties { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFloatControlsProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFloatControlsProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFloatControlsProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFloatControlsProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.denormBehaviorIndependence && (this.denormBehaviorIndependence = data.denormBehaviorIndependence), void 0 !== data.roundingModeIndependence && (this.roundingModeIndependence = data.roundingModeIndependence), void 0 !== data.shaderSignedZeroInfNanPreserveFloat16 && (this.shaderSignedZeroInfNanPreserveFloat16 = data.shaderSignedZeroInfNanPreserveFloat16), void 0 !== data.shaderSignedZeroInfNanPreserveFloat32 && (this.shaderSignedZeroInfNanPreserveFloat32 = data.shaderSignedZeroInfNanPreserveFloat32), void 0 !== data.shaderSignedZeroInfNanPreserveFloat64 && (this.shaderSignedZeroInfNanPreserveFloat64 = data.shaderSignedZeroInfNanPreserveFloat64), void 0 !== data.shaderDenormPreserveFloat16 && (this.shaderDenormPreserveFloat16 = data.shaderDenormPreserveFloat16), void 0 !== data.shaderDenormPreserveFloat32 && (this.shaderDenormPreserveFloat32 = data.shaderDenormPreserveFloat32), void 0 !== data.shaderDenormPreserveFloat64 && (this.shaderDenormPreserveFloat64 = data.shaderDenormPreserveFloat64), void 0 !== data.shaderDenormFlushToZeroFloat16 && (this.shaderDenormFlushToZeroFloat16 = data.shaderDenormFlushToZeroFloat16), void 0 !== data.shaderDenormFlushToZeroFloat32 && (this.shaderDenormFlushToZeroFloat32 = data.shaderDenormFlushToZeroFloat32), void 0 !== data.shaderDenormFlushToZeroFloat64 && (this.shaderDenormFlushToZeroFloat64 = data.shaderDenormFlushToZeroFloat64), void 0 !== data.shaderRoundingModeRTEFloat16 && (this.shaderRoundingModeRTEFloat16 = data.shaderRoundingModeRTEFloat16), void 0 !== data.shaderRoundingModeRTEFloat32 && (this.shaderRoundingModeRTEFloat32 = data.shaderRoundingModeRTEFloat32), void 0 !== data.shaderRoundingModeRTEFloat64 && (this.shaderRoundingModeRTEFloat64 = data.shaderRoundingModeRTEFloat64), void 0 !== data.shaderRoundingModeRTZFloat16 && (this.shaderRoundingModeRTZFloat16 = data.shaderRoundingModeRTZFloat16), void 0 !== data.shaderRoundingModeRTZFloat32 && (this.shaderRoundingModeRTZFloat32 = data.shaderRoundingModeRTZFloat32), void 0 !== data.shaderRoundingModeRTZFloat64 && (this.shaderRoundingModeRTZFloat64 = data.shaderRoundingModeRTZFloat64); - this.sType = StructureType.PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get denormBehaviorIndependence() { - return this.#view.getUint32(16, LE); - } - set denormBehaviorIndependence(value) { - this.#view.setUint32(16, Number(value), LE); - } - get roundingModeIndependence() { - return this.#view.getUint32(20, LE); - } - set roundingModeIndependence(value) { - this.#view.setUint32(20, Number(value), LE); - } - get shaderSignedZeroInfNanPreserveFloat16() { - return this.#view.getUint32(24, LE); - } - set shaderSignedZeroInfNanPreserveFloat16(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shaderSignedZeroInfNanPreserveFloat32() { - return this.#view.getUint32(28, LE); - } - set shaderSignedZeroInfNanPreserveFloat32(value) { - this.#view.setUint32(28, Number(value), LE); - } - get shaderSignedZeroInfNanPreserveFloat64() { - return this.#view.getUint32(32, LE); - } - set shaderSignedZeroInfNanPreserveFloat64(value) { - this.#view.setUint32(32, Number(value), LE); - } - get shaderDenormPreserveFloat16() { - return this.#view.getUint32(36, LE); - } - set shaderDenormPreserveFloat16(value) { - this.#view.setUint32(36, Number(value), LE); - } - get shaderDenormPreserveFloat32() { - return this.#view.getUint32(40, LE); - } - set shaderDenormPreserveFloat32(value) { - this.#view.setUint32(40, Number(value), LE); - } - get shaderDenormPreserveFloat64() { - return this.#view.getUint32(44, LE); - } - set shaderDenormPreserveFloat64(value) { - this.#view.setUint32(44, Number(value), LE); - } - get shaderDenormFlushToZeroFloat16() { - return this.#view.getUint32(48, LE); - } - set shaderDenormFlushToZeroFloat16(value) { - this.#view.setUint32(48, Number(value), LE); - } - get shaderDenormFlushToZeroFloat32() { - return this.#view.getUint32(52, LE); - } - set shaderDenormFlushToZeroFloat32(value) { - this.#view.setUint32(52, Number(value), LE); - } - get shaderDenormFlushToZeroFloat64() { - return this.#view.getUint32(56, LE); - } - set shaderDenormFlushToZeroFloat64(value) { - this.#view.setUint32(56, Number(value), LE); - } - get shaderRoundingModeRTEFloat16() { - return this.#view.getUint32(60, LE); - } - set shaderRoundingModeRTEFloat16(value) { - this.#view.setUint32(60, Number(value), LE); - } - get shaderRoundingModeRTEFloat32() { - return this.#view.getUint32(64, LE); - } - set shaderRoundingModeRTEFloat32(value) { - this.#view.setUint32(64, Number(value), LE); - } - get shaderRoundingModeRTEFloat64() { - return this.#view.getUint32(68, LE); - } - set shaderRoundingModeRTEFloat64(value) { - this.#view.setUint32(68, Number(value), LE); - } - get shaderRoundingModeRTZFloat16() { - return this.#view.getUint32(72, LE); - } - set shaderRoundingModeRTZFloat16(value) { - this.#view.setUint32(72, Number(value), LE); - } - get shaderRoundingModeRTZFloat32() { - return this.#view.getUint32(76, LE); - } - set shaderRoundingModeRTZFloat32(value) { - this.#view.setUint32(76, Number(value), LE); - } - get shaderRoundingModeRTZFloat64() { - return this.#view.getUint32(80, LE); - } - set shaderRoundingModeRTZFloat64(value) { - this.#view.setUint32(80, Number(value), LE); - } -} -export class PhysicalDeviceHostQueryResetFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceHostQueryResetFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceHostQueryResetFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceHostQueryResetFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceHostQueryResetFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.hostQueryReset && (this.hostQueryReset = data.hostQueryReset); - this.sType = StructureType.PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get hostQueryReset() { - return this.#view.getUint32(16, LE); - } - set hostQueryReset(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class NativeBufferUsage2ANDROID { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(NativeBufferUsage2ANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, NativeBufferUsage2ANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < NativeBufferUsage2ANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(NativeBufferUsage2ANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.consumer && (this.consumer = data.consumer), void 0 !== data.producer && (this.producer = data.producer); - } - get consumer() { - return this.#view.getBigUint64(0, LE); - } - set consumer(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get producer() { - return this.#view.getBigUint64(8, LE); - } - set producer(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} -export class NativeBufferANDROID { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(NativeBufferANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, NativeBufferANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < NativeBufferANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(NativeBufferANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handle && (this.handle = data.handle), void 0 !== data.stride && (this.stride = data.stride), void 0 !== data.format && (this.format = data.format), void 0 !== data.usage && (this.usage = data.usage), void 0 !== data.usage2 && (this.usage2 = data.usage2); - this.sType = StructureType.NATIVE_BUFFER_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handle() { - return this.#view.getBigUint64(16, LE); - } - set handle(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get stride() { - return this.#view.getInt32(24, LE); - } - set stride(value) { - this.#view.setInt32(24, Number(value), LE); - } - get format() { - return this.#view.getInt32(28, LE); - } - set format(value) { - this.#view.setInt32(28, Number(value), LE); - } - get usage() { - return this.#view.getInt32(32, LE); - } - set usage(value) { - this.#view.setInt32(32, Number(value), LE); - } - get usage2() { - return new NativeBufferUsage2ANDROID(this.#data.subarray(40, 40 + NativeBufferUsage2ANDROID.size)); - } - set usage2(value) { - if (value[BUFFER].byteLength < NativeBufferUsage2ANDROID.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } -} -export class SwapchainImageCreateInfoANDROID { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SwapchainImageCreateInfoANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainImageCreateInfoANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainImageCreateInfoANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SwapchainImageCreateInfoANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.usage && (this.usage = data.usage); - this.sType = StructureType.SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get usage() { - return this.#view.getUint32(16, LE); - } - set usage(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevicePresentationPropertiesANDROID { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePresentationPropertiesANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentationPropertiesANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePresentationPropertiesANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePresentationPropertiesANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.sharedImage && (this.sharedImage = data.sharedImage); - this.sType = StructureType.PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get sharedImage() { - return this.#view.getUint32(16, LE); - } - set sharedImage(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ShaderResourceUsageAMD { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ShaderResourceUsageAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderResourceUsageAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderResourceUsageAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ShaderResourceUsageAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.numUsedVgprs && (this.numUsedVgprs = data.numUsedVgprs), void 0 !== data.numUsedSgprs && (this.numUsedSgprs = data.numUsedSgprs), void 0 !== data.ldsSizePerLocalWorkGroup && (this.ldsSizePerLocalWorkGroup = data.ldsSizePerLocalWorkGroup), void 0 !== data.ldsUsageSizeInBytes && (this.ldsUsageSizeInBytes = data.ldsUsageSizeInBytes), void 0 !== data.scratchMemUsageInBytes && (this.scratchMemUsageInBytes = data.scratchMemUsageInBytes); - } - get numUsedVgprs() { - return this.#view.getUint32(0, LE); - } - set numUsedVgprs(value) { - this.#view.setUint32(0, Number(value), LE); - } - get numUsedSgprs() { - return this.#view.getUint32(4, LE); - } - set numUsedSgprs(value) { - this.#view.setUint32(4, Number(value), LE); - } - get ldsSizePerLocalWorkGroup() { - return this.#view.getUint32(8, LE); - } - set ldsSizePerLocalWorkGroup(value) { - this.#view.setUint32(8, Number(value), LE); - } - get ldsUsageSizeInBytes() { - return this.#view.getBigUint64(16, LE); - } - set ldsUsageSizeInBytes(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get scratchMemUsageInBytes() { - return this.#view.getBigUint64(24, LE); - } - set scratchMemUsageInBytes(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class ShaderStatisticsInfoAMD { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ShaderStatisticsInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderStatisticsInfoAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderStatisticsInfoAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ShaderStatisticsInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.shaderStageMask && (this.shaderStageMask = data.shaderStageMask), void 0 !== data.resourceUsage && (this.resourceUsage = data.resourceUsage), void 0 !== data.numPhysicalVgprs && (this.numPhysicalVgprs = data.numPhysicalVgprs), void 0 !== data.numPhysicalSgprs && (this.numPhysicalSgprs = data.numPhysicalSgprs), void 0 !== data.numAvailableVgprs && (this.numAvailableVgprs = data.numAvailableVgprs), void 0 !== data.numAvailableSgprs && (this.numAvailableSgprs = data.numAvailableSgprs), void 0 !== data.computeWorkGroupSize && (this.computeWorkGroupSize = data.computeWorkGroupSize); - } - get shaderStageMask() { - return this.#view.getUint32(0, LE); - } - set shaderStageMask(value) { - this.#view.setUint32(0, Number(value), LE); - } - get resourceUsage() { - return new ShaderResourceUsageAMD(this.#data.subarray(4, 4 + ShaderResourceUsageAMD.size)); - } - set resourceUsage(value) { - if (value[BUFFER].byteLength < ShaderResourceUsageAMD.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 4); - } - get numPhysicalVgprs() { - return this.#view.getUint32(36, LE); - } - set numPhysicalVgprs(value) { - this.#view.setUint32(36, Number(value), LE); - } - get numPhysicalSgprs() { - return this.#view.getUint32(40, LE); - } - set numPhysicalSgprs(value) { - this.#view.setUint32(40, Number(value), LE); - } - get numAvailableVgprs() { - return this.#view.getUint32(44, LE); - } - set numAvailableVgprs(value) { - this.#view.setUint32(44, Number(value), LE); - } - get numAvailableSgprs() { - return this.#view.getUint32(48, LE); - } - set numAvailableSgprs(value) { - this.#view.setUint32(48, Number(value), LE); - } - get computeWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 52, 3); - } - set computeWorkGroupSize(value) { - this.#data.set(new Uint8Array(value.buffer), 52); - } -} -export class DeviceQueueGlobalPriorityCreateInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceQueueGlobalPriorityCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceQueueGlobalPriorityCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceQueueGlobalPriorityCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceQueueGlobalPriorityCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.globalPriority && (this.globalPriority = data.globalPriority); - this.sType = StructureType.DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get globalPriority() { - return this.#view.getUint32(16, LE); - } - set globalPriority(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceGlobalPriorityQueryFeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.globalPriorityQuery && (this.globalPriorityQuery = data.globalPriorityQuery); - this.sType = StructureType.PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get globalPriorityQuery() { - return this.#view.getUint32(16, LE); - } - set globalPriorityQuery(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class QueueFamilyGlobalPriorityPropertiesKHR { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueueFamilyGlobalPriorityPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyGlobalPriorityPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyGlobalPriorityPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueueFamilyGlobalPriorityPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.priorityCount && (this.priorityCount = data.priorityCount), void 0 !== data.priorities && (this.priorities = data.priorities); - this.sType = StructureType.QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get priorityCount() { - return this.#view.getUint32(16, LE); - } - set priorityCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get priorities() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 20, 16); - } - set priorities(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } -} -export class DebugUtilsObjectNameInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DebugUtilsObjectNameInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsObjectNameInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsObjectNameInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DebugUtilsObjectNameInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.objectType && (this.objectType = data.objectType), void 0 !== data.objectHandle && (this.objectHandle = data.objectHandle), void 0 !== data.pObjectName && (this.pObjectName = data.pObjectName); - this.sType = StructureType.DEBUG_UTILS_OBJECT_NAME_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get objectType() { - return this.#view.getUint32(16, LE); - } - set objectType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get objectHandle() { - return this.#view.getBigUint64(24, LE); - } - set objectHandle(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get pObjectName() { - return this.#view.getBigUint64(32, LE); - } - set pObjectName(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class DebugUtilsObjectTagInfoEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DebugUtilsObjectTagInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsObjectTagInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsObjectTagInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DebugUtilsObjectTagInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.objectType && (this.objectType = data.objectType), void 0 !== data.objectHandle && (this.objectHandle = data.objectHandle), void 0 !== data.tagName && (this.tagName = data.tagName), void 0 !== data.tagSize && (this.tagSize = data.tagSize), void 0 !== data.pTag && (this.pTag = data.pTag); - this.sType = StructureType.DEBUG_UTILS_OBJECT_TAG_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get objectType() { - return this.#view.getUint32(16, LE); - } - set objectType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get objectHandle() { - return this.#view.getBigUint64(24, LE); - } - set objectHandle(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get tagName() { - return this.#view.getBigUint64(32, LE); - } - set tagName(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get tagSize() { - return this.#view.getBigUint64(40, LE); - } - set tagSize(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get pTag() { - return this.#view.getBigUint64(48, LE); - } - set pTag(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class DebugUtilsLabelEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DebugUtilsLabelEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsLabelEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsLabelEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DebugUtilsLabelEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pLabelName && (this.pLabelName = data.pLabelName), void 0 !== data.color && (this.color = data.color); - this.sType = StructureType.DEBUG_UTILS_LABEL_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pLabelName() { - return this.#view.getBigUint64(16, LE); - } - set pLabelName(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get color() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 24, 4); - } - set color(value) { - this.#data.set(new Uint8Array(value.buffer), 24); - } -} -export class DebugUtilsMessengerCreateInfoEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DebugUtilsMessengerCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsMessengerCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsMessengerCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DebugUtilsMessengerCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.messageSeverity && (this.messageSeverity = data.messageSeverity), void 0 !== data.messageType && (this.messageType = data.messageType), void 0 !== data.pfnUserCallback && (this.pfnUserCallback = data.pfnUserCallback), void 0 !== data.pUserData && (this.pUserData = data.pUserData); - this.sType = StructureType.DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get messageSeverity() { - return this.#view.getUint32(20, LE); - } - set messageSeverity(value) { - this.#view.setUint32(20, Number(value), LE); - } - get messageType() { - return this.#view.getUint32(24, LE); - } - set messageType(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pfnUserCallback() { - throw new Error('Unknown type: "function"'); - } - set pfnUserCallback(value) { - throw new Error('Unknown type: "function"'); - } - get pUserData() { - return this.#view.getBigUint64(40, LE); - } - set pUserData(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class DebugUtilsMessengerCallbackDataEXT { - static size = 96; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DebugUtilsMessengerCallbackDataEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsMessengerCallbackDataEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsMessengerCallbackDataEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DebugUtilsMessengerCallbackDataEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pMessageIdName && (this.pMessageIdName = data.pMessageIdName), void 0 !== data.messageIdNumber && (this.messageIdNumber = data.messageIdNumber), void 0 !== data.pMessage && (this.pMessage = data.pMessage), void 0 !== data.queueLabelCount && (this.queueLabelCount = data.queueLabelCount), void 0 !== data.pQueueLabels && (this.pQueueLabels = data.pQueueLabels), void 0 !== data.cmdBufLabelCount && (this.cmdBufLabelCount = data.cmdBufLabelCount), void 0 !== data.pCmdBufLabels && (this.pCmdBufLabels = data.pCmdBufLabels), void 0 !== data.objectCount && (this.objectCount = data.objectCount), void 0 !== data.pObjects && (this.pObjects = data.pObjects); - this.sType = StructureType.DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pMessageIdName() { - return this.#view.getBigUint64(24, LE); - } - set pMessageIdName(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get messageIdNumber() { - return this.#view.getInt32(32, LE); - } - set messageIdNumber(value) { - this.#view.setInt32(32, Number(value), LE); - } - get pMessage() { - return this.#view.getBigUint64(40, LE); - } - set pMessage(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get queueLabelCount() { - return this.#view.getUint32(48, LE); - } - set queueLabelCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pQueueLabels() { - return this.#view.getBigUint64(56, LE); - } - set pQueueLabels(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get cmdBufLabelCount() { - return this.#view.getUint32(64, LE); - } - set cmdBufLabelCount(value) { - this.#view.setUint32(64, Number(value), LE); - } - get pCmdBufLabels() { - return this.#view.getBigUint64(72, LE); - } - set pCmdBufLabels(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - get objectCount() { - return this.#view.getUint32(80, LE); - } - set objectCount(value) { - this.#view.setUint32(80, Number(value), LE); - } - get pObjects() { - return this.#view.getBigUint64(88, LE); - } - set pObjects(value) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceDeviceMemoryReportFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDeviceMemoryReportFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDeviceMemoryReportFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDeviceMemoryReportFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDeviceMemoryReportFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceMemoryReport && (this.deviceMemoryReport = data.deviceMemoryReport); - this.sType = StructureType.PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceMemoryReport() { - return this.#view.getUint32(16, LE); - } - set deviceMemoryReport(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DeviceDeviceMemoryReportCreateInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceDeviceMemoryReportCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceDeviceMemoryReportCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceDeviceMemoryReportCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceDeviceMemoryReportCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pfnUserCallback && (this.pfnUserCallback = data.pfnUserCallback), void 0 !== data.pUserData && (this.pUserData = data.pUserData); - this.sType = StructureType.DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pfnUserCallback() { - throw new Error('Unknown type: "function"'); - } - set pfnUserCallback(value) { - throw new Error('Unknown type: "function"'); - } - get pUserData() { - return this.#view.getBigUint64(32, LE); - } - set pUserData(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class DeviceMemoryReportCallbackDataEXT { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceMemoryReportCallbackDataEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceMemoryReportCallbackDataEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceMemoryReportCallbackDataEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceMemoryReportCallbackDataEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.type && (this.type = data.type), void 0 !== data.memoryObjectId && (this.memoryObjectId = data.memoryObjectId), void 0 !== data.size && (this.size = data.size), void 0 !== data.objectType && (this.objectType = data.objectType), void 0 !== data.objectHandle && (this.objectHandle = data.objectHandle), void 0 !== data.heapIndex && (this.heapIndex = data.heapIndex); - this.sType = StructureType.DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get type() { - return this.#view.getUint32(20, LE); - } - set type(value) { - this.#view.setUint32(20, Number(value), LE); - } - get memoryObjectId() { - return this.#view.getBigUint64(24, LE); - } - set memoryObjectId(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(32, LE); - } - set size(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get objectType() { - return this.#view.getUint32(40, LE); - } - set objectType(value) { - this.#view.setUint32(40, Number(value), LE); - } - get objectHandle() { - return this.#view.getBigUint64(48, LE); - } - set objectHandle(value) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - get heapIndex() { - return this.#view.getUint32(56, LE); - } - set heapIndex(value) { - this.#view.setUint32(56, Number(value), LE); - } -} -export class ImportMemoryHostPointerInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMemoryHostPointerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryHostPointerInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryHostPointerInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMemoryHostPointerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.handleType && (this.handleType = data.handleType), void 0 !== data.pHostPointer && (this.pHostPointer = data.pHostPointer); - this.sType = StructureType.IMPORT_MEMORY_HOST_POINTER_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(16, LE); - } - set handleType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pHostPointer() { - return this.#view.getBigUint64(24, LE); - } - set pHostPointer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class MemoryHostPointerPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryHostPointerPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryHostPointerPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryHostPointerPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryHostPointerPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryTypeBits && (this.memoryTypeBits = data.memoryTypeBits); - this.sType = StructureType.MEMORY_HOST_POINTER_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - set memoryTypeBits(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceExternalMemoryHostPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExternalMemoryHostPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalMemoryHostPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalMemoryHostPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExternalMemoryHostPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minImportedHostPointerAlignment && (this.minImportedHostPointerAlignment = data.minImportedHostPointerAlignment); - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minImportedHostPointerAlignment() { - return this.#view.getBigUint64(16, LE); - } - set minImportedHostPointerAlignment(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class PhysicalDeviceConservativeRasterizationPropertiesEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceConservativeRasterizationPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceConservativeRasterizationPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceConservativeRasterizationPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceConservativeRasterizationPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.primitiveOverestimationSize && (this.primitiveOverestimationSize = data.primitiveOverestimationSize), void 0 !== data.maxExtraPrimitiveOverestimationSize && (this.maxExtraPrimitiveOverestimationSize = data.maxExtraPrimitiveOverestimationSize), void 0 !== data.extraPrimitiveOverestimationSizeGranularity && (this.extraPrimitiveOverestimationSizeGranularity = data.extraPrimitiveOverestimationSizeGranularity), void 0 !== data.primitiveUnderestimation && (this.primitiveUnderestimation = data.primitiveUnderestimation), void 0 !== data.conservativePointAndLineRasterization && (this.conservativePointAndLineRasterization = data.conservativePointAndLineRasterization), void 0 !== data.degenerateTrianglesRasterized && (this.degenerateTrianglesRasterized = data.degenerateTrianglesRasterized), void 0 !== data.degenerateLinesRasterized && (this.degenerateLinesRasterized = data.degenerateLinesRasterized), void 0 !== data.fullyCoveredFragmentShaderInputVariable && (this.fullyCoveredFragmentShaderInputVariable = data.fullyCoveredFragmentShaderInputVariable), void 0 !== data.conservativeRasterizationPostDepthCoverage && (this.conservativeRasterizationPostDepthCoverage = data.conservativeRasterizationPostDepthCoverage); - this.sType = StructureType.PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get primitiveOverestimationSize() { - return this.#view.getFloat32(16, LE); - } - set primitiveOverestimationSize(value) { - this.#view.setFloat32(16, Number(value), LE); - } - get maxExtraPrimitiveOverestimationSize() { - return this.#view.getFloat32(20, LE); - } - set maxExtraPrimitiveOverestimationSize(value) { - this.#view.setFloat32(20, Number(value), LE); - } - get extraPrimitiveOverestimationSizeGranularity() { - return this.#view.getFloat32(24, LE); - } - set extraPrimitiveOverestimationSizeGranularity(value) { - this.#view.setFloat32(24, Number(value), LE); - } - get primitiveUnderestimation() { - return this.#view.getUint32(28, LE); - } - set primitiveUnderestimation(value) { - this.#view.setUint32(28, Number(value), LE); - } - get conservativePointAndLineRasterization() { - return this.#view.getUint32(32, LE); - } - set conservativePointAndLineRasterization(value) { - this.#view.setUint32(32, Number(value), LE); - } - get degenerateTrianglesRasterized() { - return this.#view.getUint32(36, LE); - } - set degenerateTrianglesRasterized(value) { - this.#view.setUint32(36, Number(value), LE); - } - get degenerateLinesRasterized() { - return this.#view.getUint32(40, LE); - } - set degenerateLinesRasterized(value) { - this.#view.setUint32(40, Number(value), LE); - } - get fullyCoveredFragmentShaderInputVariable() { - return this.#view.getUint32(44, LE); - } - set fullyCoveredFragmentShaderInputVariable(value) { - this.#view.setUint32(44, Number(value), LE); - } - get conservativeRasterizationPostDepthCoverage() { - return this.#view.getUint32(48, LE); - } - set conservativeRasterizationPostDepthCoverage(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class CalibratedTimestampInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CalibratedTimestampInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CalibratedTimestampInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CalibratedTimestampInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CalibratedTimestampInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.timeDomain && (this.timeDomain = data.timeDomain); - this.sType = StructureType.CALIBRATED_TIMESTAMP_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get timeDomain() { - return this.#view.getUint32(16, LE); - } - set timeDomain(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceShaderCorePropertiesAMD { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderCorePropertiesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCorePropertiesAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderCorePropertiesAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderCorePropertiesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderEngineCount && (this.shaderEngineCount = data.shaderEngineCount), void 0 !== data.shaderArraysPerEngineCount && (this.shaderArraysPerEngineCount = data.shaderArraysPerEngineCount), void 0 !== data.computeUnitsPerShaderArray && (this.computeUnitsPerShaderArray = data.computeUnitsPerShaderArray), void 0 !== data.simdPerComputeUnit && (this.simdPerComputeUnit = data.simdPerComputeUnit), void 0 !== data.wavefrontsPerSimd && (this.wavefrontsPerSimd = data.wavefrontsPerSimd), void 0 !== data.wavefrontSize && (this.wavefrontSize = data.wavefrontSize), void 0 !== data.sgprsPerSimd && (this.sgprsPerSimd = data.sgprsPerSimd), void 0 !== data.minSgprAllocation && (this.minSgprAllocation = data.minSgprAllocation), void 0 !== data.maxSgprAllocation && (this.maxSgprAllocation = data.maxSgprAllocation), void 0 !== data.sgprAllocationGranularity && (this.sgprAllocationGranularity = data.sgprAllocationGranularity), void 0 !== data.vgprsPerSimd && (this.vgprsPerSimd = data.vgprsPerSimd), void 0 !== data.minVgprAllocation && (this.minVgprAllocation = data.minVgprAllocation), void 0 !== data.maxVgprAllocation && (this.maxVgprAllocation = data.maxVgprAllocation), void 0 !== data.vgprAllocationGranularity && (this.vgprAllocationGranularity = data.vgprAllocationGranularity); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderEngineCount() { - return this.#view.getUint32(16, LE); - } - set shaderEngineCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shaderArraysPerEngineCount() { - return this.#view.getUint32(20, LE); - } - set shaderArraysPerEngineCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get computeUnitsPerShaderArray() { - return this.#view.getUint32(24, LE); - } - set computeUnitsPerShaderArray(value) { - this.#view.setUint32(24, Number(value), LE); - } - get simdPerComputeUnit() { - return this.#view.getUint32(28, LE); - } - set simdPerComputeUnit(value) { - this.#view.setUint32(28, Number(value), LE); - } - get wavefrontsPerSimd() { - return this.#view.getUint32(32, LE); - } - set wavefrontsPerSimd(value) { - this.#view.setUint32(32, Number(value), LE); - } - get wavefrontSize() { - return this.#view.getUint32(36, LE); - } - set wavefrontSize(value) { - this.#view.setUint32(36, Number(value), LE); - } - get sgprsPerSimd() { - return this.#view.getUint32(40, LE); - } - set sgprsPerSimd(value) { - this.#view.setUint32(40, Number(value), LE); - } - get minSgprAllocation() { - return this.#view.getUint32(44, LE); - } - set minSgprAllocation(value) { - this.#view.setUint32(44, Number(value), LE); - } - get maxSgprAllocation() { - return this.#view.getUint32(48, LE); - } - set maxSgprAllocation(value) { - this.#view.setUint32(48, Number(value), LE); - } - get sgprAllocationGranularity() { - return this.#view.getUint32(52, LE); - } - set sgprAllocationGranularity(value) { - this.#view.setUint32(52, Number(value), LE); - } - get vgprsPerSimd() { - return this.#view.getUint32(56, LE); - } - set vgprsPerSimd(value) { - this.#view.setUint32(56, Number(value), LE); - } - get minVgprAllocation() { - return this.#view.getUint32(60, LE); - } - set minVgprAllocation(value) { - this.#view.setUint32(60, Number(value), LE); - } - get maxVgprAllocation() { - return this.#view.getUint32(64, LE); - } - set maxVgprAllocation(value) { - this.#view.setUint32(64, Number(value), LE); - } - get vgprAllocationGranularity() { - return this.#view.getUint32(68, LE); - } - set vgprAllocationGranularity(value) { - this.#view.setUint32(68, Number(value), LE); - } -} -export class PhysicalDeviceShaderCoreProperties2AMD { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderCoreProperties2AMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCoreProperties2AMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderCoreProperties2AMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderCoreProperties2AMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderCoreFeatures && (this.shaderCoreFeatures = data.shaderCoreFeatures), void 0 !== data.activeComputeUnitCount && (this.activeComputeUnitCount = data.activeComputeUnitCount); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderCoreFeatures() { - return this.#view.getUint32(16, LE); - } - set shaderCoreFeatures(value) { - this.#view.setUint32(16, Number(value), LE); - } - get activeComputeUnitCount() { - return this.#view.getUint32(20, LE); - } - set activeComputeUnitCount(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PipelineRasterizationConservativeStateCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRasterizationConservativeStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationConservativeStateCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationConservativeStateCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRasterizationConservativeStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.conservativeRasterizationMode && (this.conservativeRasterizationMode = data.conservativeRasterizationMode), void 0 !== data.extraPrimitiveOverestimationSize && (this.extraPrimitiveOverestimationSize = data.extraPrimitiveOverestimationSize); - this.sType = StructureType.PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get conservativeRasterizationMode() { - return this.#view.getUint32(20, LE); - } - set conservativeRasterizationMode(value) { - this.#view.setUint32(20, Number(value), LE); - } - get extraPrimitiveOverestimationSize() { - return this.#view.getFloat32(24, LE); - } - set extraPrimitiveOverestimationSize(value) { - this.#view.setFloat32(24, Number(value), LE); - } -} -export class PhysicalDeviceDescriptorIndexingFeatures { - static size = 96; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorIndexingFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorIndexingFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderInputAttachmentArrayDynamicIndexing && (this.shaderInputAttachmentArrayDynamicIndexing = data.shaderInputAttachmentArrayDynamicIndexing), void 0 !== data.shaderUniformTexelBufferArrayDynamicIndexing && (this.shaderUniformTexelBufferArrayDynamicIndexing = data.shaderUniformTexelBufferArrayDynamicIndexing), void 0 !== data.shaderStorageTexelBufferArrayDynamicIndexing && (this.shaderStorageTexelBufferArrayDynamicIndexing = data.shaderStorageTexelBufferArrayDynamicIndexing), void 0 !== data.shaderUniformBufferArrayNonUniformIndexing && (this.shaderUniformBufferArrayNonUniformIndexing = data.shaderUniformBufferArrayNonUniformIndexing), void 0 !== data.shaderSampledImageArrayNonUniformIndexing && (this.shaderSampledImageArrayNonUniformIndexing = data.shaderSampledImageArrayNonUniformIndexing), void 0 !== data.shaderStorageBufferArrayNonUniformIndexing && (this.shaderStorageBufferArrayNonUniformIndexing = data.shaderStorageBufferArrayNonUniformIndexing), void 0 !== data.shaderStorageImageArrayNonUniformIndexing && (this.shaderStorageImageArrayNonUniformIndexing = data.shaderStorageImageArrayNonUniformIndexing), void 0 !== data.shaderInputAttachmentArrayNonUniformIndexing && (this.shaderInputAttachmentArrayNonUniformIndexing = data.shaderInputAttachmentArrayNonUniformIndexing), void 0 !== data.shaderUniformTexelBufferArrayNonUniformIndexing && (this.shaderUniformTexelBufferArrayNonUniformIndexing = data.shaderUniformTexelBufferArrayNonUniformIndexing), void 0 !== data.shaderStorageTexelBufferArrayNonUniformIndexing && (this.shaderStorageTexelBufferArrayNonUniformIndexing = data.shaderStorageTexelBufferArrayNonUniformIndexing), void 0 !== data.descriptorBindingUniformBufferUpdateAfterBind && (this.descriptorBindingUniformBufferUpdateAfterBind = data.descriptorBindingUniformBufferUpdateAfterBind), void 0 !== data.descriptorBindingSampledImageUpdateAfterBind && (this.descriptorBindingSampledImageUpdateAfterBind = data.descriptorBindingSampledImageUpdateAfterBind), void 0 !== data.descriptorBindingStorageImageUpdateAfterBind && (this.descriptorBindingStorageImageUpdateAfterBind = data.descriptorBindingStorageImageUpdateAfterBind), void 0 !== data.descriptorBindingStorageBufferUpdateAfterBind && (this.descriptorBindingStorageBufferUpdateAfterBind = data.descriptorBindingStorageBufferUpdateAfterBind), void 0 !== data.descriptorBindingUniformTexelBufferUpdateAfterBind && (this.descriptorBindingUniformTexelBufferUpdateAfterBind = data.descriptorBindingUniformTexelBufferUpdateAfterBind), void 0 !== data.descriptorBindingStorageTexelBufferUpdateAfterBind && (this.descriptorBindingStorageTexelBufferUpdateAfterBind = data.descriptorBindingStorageTexelBufferUpdateAfterBind), void 0 !== data.descriptorBindingUpdateUnusedWhilePending && (this.descriptorBindingUpdateUnusedWhilePending = data.descriptorBindingUpdateUnusedWhilePending), void 0 !== data.descriptorBindingPartiallyBound && (this.descriptorBindingPartiallyBound = data.descriptorBindingPartiallyBound), void 0 !== data.descriptorBindingVariableDescriptorCount && (this.descriptorBindingVariableDescriptorCount = data.descriptorBindingVariableDescriptorCount), void 0 !== data.runtimeDescriptorArray && (this.runtimeDescriptorArray = data.runtimeDescriptorArray); - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderInputAttachmentArrayDynamicIndexing() { - return this.#view.getUint32(16, LE); - } - set shaderInputAttachmentArrayDynamicIndexing(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shaderUniformTexelBufferArrayDynamicIndexing() { - return this.#view.getUint32(20, LE); - } - set shaderUniformTexelBufferArrayDynamicIndexing(value) { - this.#view.setUint32(20, Number(value), LE); - } - get shaderStorageTexelBufferArrayDynamicIndexing() { - return this.#view.getUint32(24, LE); - } - set shaderStorageTexelBufferArrayDynamicIndexing(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shaderUniformBufferArrayNonUniformIndexing() { - return this.#view.getUint32(28, LE); - } - set shaderUniformBufferArrayNonUniformIndexing(value) { - this.#view.setUint32(28, Number(value), LE); - } - get shaderSampledImageArrayNonUniformIndexing() { - return this.#view.getUint32(32, LE); - } - set shaderSampledImageArrayNonUniformIndexing(value) { - this.#view.setUint32(32, Number(value), LE); - } - get shaderStorageBufferArrayNonUniformIndexing() { - return this.#view.getUint32(36, LE); - } - set shaderStorageBufferArrayNonUniformIndexing(value) { - this.#view.setUint32(36, Number(value), LE); - } - get shaderStorageImageArrayNonUniformIndexing() { - return this.#view.getUint32(40, LE); - } - set shaderStorageImageArrayNonUniformIndexing(value) { - this.#view.setUint32(40, Number(value), LE); - } - get shaderInputAttachmentArrayNonUniformIndexing() { - return this.#view.getUint32(44, LE); - } - set shaderInputAttachmentArrayNonUniformIndexing(value) { - this.#view.setUint32(44, Number(value), LE); - } - get shaderUniformTexelBufferArrayNonUniformIndexing() { - return this.#view.getUint32(48, LE); - } - set shaderUniformTexelBufferArrayNonUniformIndexing(value) { - this.#view.setUint32(48, Number(value), LE); - } - get shaderStorageTexelBufferArrayNonUniformIndexing() { - return this.#view.getUint32(52, LE); - } - set shaderStorageTexelBufferArrayNonUniformIndexing(value) { - this.#view.setUint32(52, Number(value), LE); - } - get descriptorBindingUniformBufferUpdateAfterBind() { - return this.#view.getUint32(56, LE); - } - set descriptorBindingUniformBufferUpdateAfterBind(value) { - this.#view.setUint32(56, Number(value), LE); - } - get descriptorBindingSampledImageUpdateAfterBind() { - return this.#view.getUint32(60, LE); - } - set descriptorBindingSampledImageUpdateAfterBind(value) { - this.#view.setUint32(60, Number(value), LE); - } - get descriptorBindingStorageImageUpdateAfterBind() { - return this.#view.getUint32(64, LE); - } - set descriptorBindingStorageImageUpdateAfterBind(value) { - this.#view.setUint32(64, Number(value), LE); - } - get descriptorBindingStorageBufferUpdateAfterBind() { - return this.#view.getUint32(68, LE); - } - set descriptorBindingStorageBufferUpdateAfterBind(value) { - this.#view.setUint32(68, Number(value), LE); - } - get descriptorBindingUniformTexelBufferUpdateAfterBind() { - return this.#view.getUint32(72, LE); - } - set descriptorBindingUniformTexelBufferUpdateAfterBind(value) { - this.#view.setUint32(72, Number(value), LE); - } - get descriptorBindingStorageTexelBufferUpdateAfterBind() { - return this.#view.getUint32(76, LE); - } - set descriptorBindingStorageTexelBufferUpdateAfterBind(value) { - this.#view.setUint32(76, Number(value), LE); - } - get descriptorBindingUpdateUnusedWhilePending() { - return this.#view.getUint32(80, LE); - } - set descriptorBindingUpdateUnusedWhilePending(value) { - this.#view.setUint32(80, Number(value), LE); - } - get descriptorBindingPartiallyBound() { - return this.#view.getUint32(84, LE); - } - set descriptorBindingPartiallyBound(value) { - this.#view.setUint32(84, Number(value), LE); - } - get descriptorBindingVariableDescriptorCount() { - return this.#view.getUint32(88, LE); - } - set descriptorBindingVariableDescriptorCount(value) { - this.#view.setUint32(88, Number(value), LE); - } - get runtimeDescriptorArray() { - return this.#view.getUint32(92, LE); - } - set runtimeDescriptorArray(value) { - this.#view.setUint32(92, Number(value), LE); - } -} -export class PhysicalDeviceDescriptorIndexingProperties { - static size = 112; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorIndexingProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorIndexingProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxUpdateAfterBindDescriptorsInAllPools && (this.maxUpdateAfterBindDescriptorsInAllPools = data.maxUpdateAfterBindDescriptorsInAllPools), void 0 !== data.shaderUniformBufferArrayNonUniformIndexingNative && (this.shaderUniformBufferArrayNonUniformIndexingNative = data.shaderUniformBufferArrayNonUniformIndexingNative), void 0 !== data.shaderSampledImageArrayNonUniformIndexingNative && (this.shaderSampledImageArrayNonUniformIndexingNative = data.shaderSampledImageArrayNonUniformIndexingNative), void 0 !== data.shaderStorageBufferArrayNonUniformIndexingNative && (this.shaderStorageBufferArrayNonUniformIndexingNative = data.shaderStorageBufferArrayNonUniformIndexingNative), void 0 !== data.shaderStorageImageArrayNonUniformIndexingNative && (this.shaderStorageImageArrayNonUniformIndexingNative = data.shaderStorageImageArrayNonUniformIndexingNative), void 0 !== data.shaderInputAttachmentArrayNonUniformIndexingNative && (this.shaderInputAttachmentArrayNonUniformIndexingNative = data.shaderInputAttachmentArrayNonUniformIndexingNative), void 0 !== data.robustBufferAccessUpdateAfterBind && (this.robustBufferAccessUpdateAfterBind = data.robustBufferAccessUpdateAfterBind), void 0 !== data.quadDivergentImplicitLod && (this.quadDivergentImplicitLod = data.quadDivergentImplicitLod), void 0 !== data.maxPerStageDescriptorUpdateAfterBindSamplers && (this.maxPerStageDescriptorUpdateAfterBindSamplers = data.maxPerStageDescriptorUpdateAfterBindSamplers), void 0 !== data.maxPerStageDescriptorUpdateAfterBindUniformBuffers && (this.maxPerStageDescriptorUpdateAfterBindUniformBuffers = data.maxPerStageDescriptorUpdateAfterBindUniformBuffers), void 0 !== data.maxPerStageDescriptorUpdateAfterBindStorageBuffers && (this.maxPerStageDescriptorUpdateAfterBindStorageBuffers = data.maxPerStageDescriptorUpdateAfterBindStorageBuffers), void 0 !== data.maxPerStageDescriptorUpdateAfterBindSampledImages && (this.maxPerStageDescriptorUpdateAfterBindSampledImages = data.maxPerStageDescriptorUpdateAfterBindSampledImages), void 0 !== data.maxPerStageDescriptorUpdateAfterBindStorageImages && (this.maxPerStageDescriptorUpdateAfterBindStorageImages = data.maxPerStageDescriptorUpdateAfterBindStorageImages), void 0 !== data.maxPerStageDescriptorUpdateAfterBindInputAttachments && (this.maxPerStageDescriptorUpdateAfterBindInputAttachments = data.maxPerStageDescriptorUpdateAfterBindInputAttachments), void 0 !== data.maxPerStageUpdateAfterBindResources && (this.maxPerStageUpdateAfterBindResources = data.maxPerStageUpdateAfterBindResources), void 0 !== data.maxDescriptorSetUpdateAfterBindSamplers && (this.maxDescriptorSetUpdateAfterBindSamplers = data.maxDescriptorSetUpdateAfterBindSamplers), void 0 !== data.maxDescriptorSetUpdateAfterBindUniformBuffers && (this.maxDescriptorSetUpdateAfterBindUniformBuffers = data.maxDescriptorSetUpdateAfterBindUniformBuffers), void 0 !== data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic && (this.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic), void 0 !== data.maxDescriptorSetUpdateAfterBindStorageBuffers && (this.maxDescriptorSetUpdateAfterBindStorageBuffers = data.maxDescriptorSetUpdateAfterBindStorageBuffers), void 0 !== data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic && (this.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic), void 0 !== data.maxDescriptorSetUpdateAfterBindSampledImages && (this.maxDescriptorSetUpdateAfterBindSampledImages = data.maxDescriptorSetUpdateAfterBindSampledImages), void 0 !== data.maxDescriptorSetUpdateAfterBindStorageImages && (this.maxDescriptorSetUpdateAfterBindStorageImages = data.maxDescriptorSetUpdateAfterBindStorageImages), void 0 !== data.maxDescriptorSetUpdateAfterBindInputAttachments && (this.maxDescriptorSetUpdateAfterBindInputAttachments = data.maxDescriptorSetUpdateAfterBindInputAttachments); - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxUpdateAfterBindDescriptorsInAllPools() { - return this.#view.getUint32(16, LE); - } - set maxUpdateAfterBindDescriptorsInAllPools(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shaderUniformBufferArrayNonUniformIndexingNative() { - return this.#view.getUint32(20, LE); - } - set shaderUniformBufferArrayNonUniformIndexingNative(value) { - this.#view.setUint32(20, Number(value), LE); - } - get shaderSampledImageArrayNonUniformIndexingNative() { - return this.#view.getUint32(24, LE); - } - set shaderSampledImageArrayNonUniformIndexingNative(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shaderStorageBufferArrayNonUniformIndexingNative() { - return this.#view.getUint32(28, LE); - } - set shaderStorageBufferArrayNonUniformIndexingNative(value) { - this.#view.setUint32(28, Number(value), LE); - } - get shaderStorageImageArrayNonUniformIndexingNative() { - return this.#view.getUint32(32, LE); - } - set shaderStorageImageArrayNonUniformIndexingNative(value) { - this.#view.setUint32(32, Number(value), LE); - } - get shaderInputAttachmentArrayNonUniformIndexingNative() { - return this.#view.getUint32(36, LE); - } - set shaderInputAttachmentArrayNonUniformIndexingNative(value) { - this.#view.setUint32(36, Number(value), LE); - } - get robustBufferAccessUpdateAfterBind() { - return this.#view.getUint32(40, LE); - } - set robustBufferAccessUpdateAfterBind(value) { - this.#view.setUint32(40, Number(value), LE); - } - get quadDivergentImplicitLod() { - return this.#view.getUint32(44, LE); - } - set quadDivergentImplicitLod(value) { - this.#view.setUint32(44, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindSamplers() { - return this.#view.getUint32(48, LE); - } - set maxPerStageDescriptorUpdateAfterBindSamplers(value) { - this.#view.setUint32(48, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindUniformBuffers() { - return this.#view.getUint32(52, LE); - } - set maxPerStageDescriptorUpdateAfterBindUniformBuffers(value) { - this.#view.setUint32(52, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindStorageBuffers() { - return this.#view.getUint32(56, LE); - } - set maxPerStageDescriptorUpdateAfterBindStorageBuffers(value) { - this.#view.setUint32(56, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindSampledImages() { - return this.#view.getUint32(60, LE); - } - set maxPerStageDescriptorUpdateAfterBindSampledImages(value) { - this.#view.setUint32(60, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindStorageImages() { - return this.#view.getUint32(64, LE); - } - set maxPerStageDescriptorUpdateAfterBindStorageImages(value) { - this.#view.setUint32(64, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindInputAttachments() { - return this.#view.getUint32(68, LE); - } - set maxPerStageDescriptorUpdateAfterBindInputAttachments(value) { - this.#view.setUint32(68, Number(value), LE); - } - get maxPerStageUpdateAfterBindResources() { - return this.#view.getUint32(72, LE); - } - set maxPerStageUpdateAfterBindResources(value) { - this.#view.setUint32(72, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindSamplers() { - return this.#view.getUint32(76, LE); - } - set maxDescriptorSetUpdateAfterBindSamplers(value) { - this.#view.setUint32(76, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindUniformBuffers() { - return this.#view.getUint32(80, LE); - } - set maxDescriptorSetUpdateAfterBindUniformBuffers(value) { - this.#view.setUint32(80, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindUniformBuffersDynamic() { - return this.#view.getUint32(84, LE); - } - set maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(value) { - this.#view.setUint32(84, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindStorageBuffers() { - return this.#view.getUint32(88, LE); - } - set maxDescriptorSetUpdateAfterBindStorageBuffers(value) { - this.#view.setUint32(88, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindStorageBuffersDynamic() { - return this.#view.getUint32(92, LE); - } - set maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(value) { - this.#view.setUint32(92, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindSampledImages() { - return this.#view.getUint32(96, LE); - } - set maxDescriptorSetUpdateAfterBindSampledImages(value) { - this.#view.setUint32(96, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindStorageImages() { - return this.#view.getUint32(100, LE); - } - set maxDescriptorSetUpdateAfterBindStorageImages(value) { - this.#view.setUint32(100, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindInputAttachments() { - return this.#view.getUint32(104, LE); - } - set maxDescriptorSetUpdateAfterBindInputAttachments(value) { - this.#view.setUint32(104, Number(value), LE); - } -} -export class DescriptorSetLayoutBindingFlagsCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorSetLayoutBindingFlagsCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutBindingFlagsCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutBindingFlagsCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorSetLayoutBindingFlagsCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.bindingCount && (this.bindingCount = data.bindingCount), void 0 !== data.pBindingFlags && (this.pBindingFlags = data.pBindingFlags); - this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get bindingCount() { - return this.#view.getUint32(16, LE); - } - set bindingCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pBindingFlags() { - return this.#view.getBigUint64(24, LE); - } - set pBindingFlags(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class DescriptorSetVariableDescriptorCountAllocateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetVariableDescriptorCountAllocateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetVariableDescriptorCountAllocateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.descriptorSetCount && (this.descriptorSetCount = data.descriptorSetCount), void 0 !== data.pDescriptorCounts && (this.pDescriptorCounts = data.pDescriptorCounts); - this.sType = StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get descriptorSetCount() { - return this.#view.getUint32(16, LE); - } - set descriptorSetCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pDescriptorCounts() { - return this.#view.getBigUint64(24, LE); - } - set pDescriptorCounts(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class DescriptorSetVariableDescriptorCountLayoutSupport { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountLayoutSupport.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetVariableDescriptorCountLayoutSupport.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetVariableDescriptorCountLayoutSupport.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountLayoutSupport.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxVariableDescriptorCount && (this.maxVariableDescriptorCount = data.maxVariableDescriptorCount); - this.sType = StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxVariableDescriptorCount() { - return this.#view.getUint32(16, LE); - } - set maxVariableDescriptorCount(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class AttachmentDescription2 { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AttachmentDescription2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentDescription2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentDescription2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AttachmentDescription2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.format && (this.format = data.format), void 0 !== data.samples && (this.samples = data.samples), void 0 !== data.loadOp && (this.loadOp = data.loadOp), void 0 !== data.storeOp && (this.storeOp = data.storeOp), void 0 !== data.stencilLoadOp && (this.stencilLoadOp = data.stencilLoadOp), void 0 !== data.stencilStoreOp && (this.stencilStoreOp = data.stencilStoreOp), void 0 !== data.initialLayout && (this.initialLayout = data.initialLayout), void 0 !== data.finalLayout && (this.finalLayout = data.finalLayout); - this.sType = StructureType.ATTACHMENT_DESCRIPTION_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get format() { - return this.#view.getUint32(20, LE); - } - set format(value) { - this.#view.setUint32(20, Number(value), LE); - } - get samples() { - return this.#view.getUint32(24, LE); - } - set samples(value) { - this.#view.setUint32(24, Number(value), LE); - } - get loadOp() { - return this.#view.getUint32(28, LE); - } - set loadOp(value) { - this.#view.setUint32(28, Number(value), LE); - } - get storeOp() { - return this.#view.getUint32(32, LE); - } - set storeOp(value) { - this.#view.setUint32(32, Number(value), LE); - } - get stencilLoadOp() { - return this.#view.getUint32(36, LE); - } - set stencilLoadOp(value) { - this.#view.setUint32(36, Number(value), LE); - } - get stencilStoreOp() { - return this.#view.getUint32(40, LE); - } - set stencilStoreOp(value) { - this.#view.setUint32(40, Number(value), LE); - } - get initialLayout() { - return this.#view.getUint32(44, LE); - } - set initialLayout(value) { - this.#view.setUint32(44, Number(value), LE); - } - get finalLayout() { - return this.#view.getUint32(48, LE); - } - set finalLayout(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class AttachmentReference2 { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AttachmentReference2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentReference2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentReference2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AttachmentReference2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.attachment && (this.attachment = data.attachment), void 0 !== data.layout && (this.layout = data.layout), void 0 !== data.aspectMask && (this.aspectMask = data.aspectMask); - this.sType = StructureType.ATTACHMENT_REFERENCE_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get attachment() { - return this.#view.getUint32(16, LE); - } - set attachment(value) { - this.#view.setUint32(16, Number(value), LE); - } - get layout() { - return this.#view.getUint32(20, LE); - } - set layout(value) { - this.#view.setUint32(20, Number(value), LE); - } - get aspectMask() { - return this.#view.getUint32(24, LE); - } - set aspectMask(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class SubpassDescription2 { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassDescription2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDescription2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDescription2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassDescription2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pipelineBindPoint && (this.pipelineBindPoint = data.pipelineBindPoint), void 0 !== data.viewMask && (this.viewMask = data.viewMask), void 0 !== data.inputAttachmentCount && (this.inputAttachmentCount = data.inputAttachmentCount), void 0 !== data.pInputAttachments && (this.pInputAttachments = data.pInputAttachments), void 0 !== data.colorAttachmentCount && (this.colorAttachmentCount = data.colorAttachmentCount), void 0 !== data.pColorAttachments && (this.pColorAttachments = data.pColorAttachments), void 0 !== data.pResolveAttachments && (this.pResolveAttachments = data.pResolveAttachments), void 0 !== data.pDepthStencilAttachment && (this.pDepthStencilAttachment = data.pDepthStencilAttachment), void 0 !== data.preserveAttachmentCount && (this.preserveAttachmentCount = data.preserveAttachmentCount), void 0 !== data.pPreserveAttachments && (this.pPreserveAttachments = data.pPreserveAttachments); - this.sType = StructureType.SUBPASS_DESCRIPTION_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pipelineBindPoint() { - return this.#view.getUint32(20, LE); - } - set pipelineBindPoint(value) { - this.#view.setUint32(20, Number(value), LE); - } - get viewMask() { - return this.#view.getUint32(24, LE); - } - set viewMask(value) { - this.#view.setUint32(24, Number(value), LE); - } - get inputAttachmentCount() { - return this.#view.getUint32(28, LE); - } - set inputAttachmentCount(value) { - this.#view.setUint32(28, Number(value), LE); - } - get pInputAttachments() { - return this.#view.getBigUint64(32, LE); - } - set pInputAttachments(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get colorAttachmentCount() { - return this.#view.getUint32(40, LE); - } - set colorAttachmentCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pColorAttachments() { - return this.#view.getBigUint64(48, LE); - } - set pColorAttachments(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get pResolveAttachments() { - return this.#view.getBigUint64(56, LE); - } - set pResolveAttachments(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get pDepthStencilAttachment() { - return this.#view.getBigUint64(64, LE); - } - set pDepthStencilAttachment(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - get preserveAttachmentCount() { - return this.#view.getUint32(72, LE); - } - set preserveAttachmentCount(value) { - this.#view.setUint32(72, Number(value), LE); - } - get pPreserveAttachments() { - return this.#view.getBigUint64(80, LE); - } - set pPreserveAttachments(value) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } -} -export class SubpassDependency2 { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassDependency2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDependency2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDependency2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassDependency2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcSubpass && (this.srcSubpass = data.srcSubpass), void 0 !== data.dstSubpass && (this.dstSubpass = data.dstSubpass), void 0 !== data.srcStageMask && (this.srcStageMask = data.srcStageMask), void 0 !== data.dstStageMask && (this.dstStageMask = data.dstStageMask), void 0 !== data.srcAccessMask && (this.srcAccessMask = data.srcAccessMask), void 0 !== data.dstAccessMask && (this.dstAccessMask = data.dstAccessMask), void 0 !== data.dependencyFlags && (this.dependencyFlags = data.dependencyFlags), void 0 !== data.viewOffset && (this.viewOffset = data.viewOffset); - this.sType = StructureType.SUBPASS_DEPENDENCY_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcSubpass() { - return this.#view.getUint32(16, LE); - } - set srcSubpass(value) { - this.#view.setUint32(16, Number(value), LE); - } - get dstSubpass() { - return this.#view.getUint32(20, LE); - } - set dstSubpass(value) { - this.#view.setUint32(20, Number(value), LE); - } - get srcStageMask() { - return this.#view.getUint32(24, LE); - } - set srcStageMask(value) { - this.#view.setUint32(24, Number(value), LE); - } - get dstStageMask() { - return this.#view.getUint32(28, LE); - } - set dstStageMask(value) { - this.#view.setUint32(28, Number(value), LE); - } - get srcAccessMask() { - return this.#view.getUint32(32, LE); - } - set srcAccessMask(value) { - this.#view.setUint32(32, Number(value), LE); - } - get dstAccessMask() { - return this.#view.getUint32(36, LE); - } - set dstAccessMask(value) { - this.#view.setUint32(36, Number(value), LE); - } - get dependencyFlags() { - return this.#view.getUint32(40, LE); - } - set dependencyFlags(value) { - this.#view.setUint32(40, Number(value), LE); - } - get viewOffset() { - return this.#view.getInt32(44, LE); - } - set viewOffset(value) { - this.#view.setInt32(44, Number(value), LE); - } -} -export class RenderPassCreateInfo2 { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassCreateInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreateInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreateInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassCreateInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.attachmentCount && (this.attachmentCount = data.attachmentCount), void 0 !== data.pAttachments && (this.pAttachments = data.pAttachments), void 0 !== data.subpassCount && (this.subpassCount = data.subpassCount), void 0 !== data.pSubpasses && (this.pSubpasses = data.pSubpasses), void 0 !== data.dependencyCount && (this.dependencyCount = data.dependencyCount), void 0 !== data.pDependencies && (this.pDependencies = data.pDependencies), void 0 !== data.correlatedViewMaskCount && (this.correlatedViewMaskCount = data.correlatedViewMaskCount), void 0 !== data.pCorrelatedViewMasks && (this.pCorrelatedViewMasks = data.pCorrelatedViewMasks); - this.sType = StructureType.RENDER_PASS_CREATE_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get attachmentCount() { - return this.#view.getUint32(20, LE); - } - set attachmentCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pAttachments() { - return this.#view.getBigUint64(24, LE); - } - set pAttachments(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get subpassCount() { - return this.#view.getUint32(32, LE); - } - set subpassCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pSubpasses() { - return this.#view.getBigUint64(40, LE); - } - set pSubpasses(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get dependencyCount() { - return this.#view.getUint32(48, LE); - } - set dependencyCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pDependencies() { - return this.#view.getBigUint64(56, LE); - } - set pDependencies(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get correlatedViewMaskCount() { - return this.#view.getUint32(64, LE); - } - set correlatedViewMaskCount(value) { - this.#view.setUint32(64, Number(value), LE); - } - get pCorrelatedViewMasks() { - return this.#view.getBigUint64(72, LE); - } - set pCorrelatedViewMasks(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } -} -export class SubpassBeginInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassBeginInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassBeginInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.contents && (this.contents = data.contents); - this.sType = StructureType.SUBPASS_BEGIN_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get contents() { - return this.#view.getUint32(16, LE); - } - set contents(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SubpassEndInfo { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassEndInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassEndInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassEndInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassEndInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext); - this.sType = StructureType.SUBPASS_END_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceTimelineSemaphoreFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTimelineSemaphoreFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTimelineSemaphoreFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.timelineSemaphore && (this.timelineSemaphore = data.timelineSemaphore); - this.sType = StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get timelineSemaphore() { - return this.#view.getUint32(16, LE); - } - set timelineSemaphore(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceTimelineSemaphoreProperties { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTimelineSemaphoreProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTimelineSemaphoreProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxTimelineSemaphoreValueDifference && (this.maxTimelineSemaphoreValueDifference = data.maxTimelineSemaphoreValueDifference); - this.sType = StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxTimelineSemaphoreValueDifference() { - return this.#view.getBigUint64(16, LE); - } - set maxTimelineSemaphoreValueDifference(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class SemaphoreTypeCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SemaphoreTypeCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreTypeCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreTypeCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SemaphoreTypeCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphoreType && (this.semaphoreType = data.semaphoreType), void 0 !== data.initialValue && (this.initialValue = data.initialValue); - this.sType = StructureType.SEMAPHORE_TYPE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphoreType() { - return this.#view.getUint32(16, LE); - } - set semaphoreType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get initialValue() { - return this.#view.getBigUint64(24, LE); - } - set initialValue(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class TimelineSemaphoreSubmitInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(TimelineSemaphoreSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TimelineSemaphoreSubmitInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < TimelineSemaphoreSubmitInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(TimelineSemaphoreSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.waitSemaphoreValueCount && (this.waitSemaphoreValueCount = data.waitSemaphoreValueCount), void 0 !== data.pWaitSemaphoreValues && (this.pWaitSemaphoreValues = data.pWaitSemaphoreValues), void 0 !== data.signalSemaphoreValueCount && (this.signalSemaphoreValueCount = data.signalSemaphoreValueCount), void 0 !== data.pSignalSemaphoreValues && (this.pSignalSemaphoreValues = data.pSignalSemaphoreValues); - this.sType = StructureType.TIMELINE_SEMAPHORE_SUBMIT_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get waitSemaphoreValueCount() { - return this.#view.getUint32(16, LE); - } - set waitSemaphoreValueCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pWaitSemaphoreValues() { - return this.#view.getBigUint64(24, LE); - } - set pWaitSemaphoreValues(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get signalSemaphoreValueCount() { - return this.#view.getUint32(32, LE); - } - set signalSemaphoreValueCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pSignalSemaphoreValues() { - return this.#view.getBigUint64(40, LE); - } - set pSignalSemaphoreValues(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class SemaphoreWaitInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SemaphoreWaitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreWaitInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreWaitInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SemaphoreWaitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.semaphoreCount && (this.semaphoreCount = data.semaphoreCount), void 0 !== data.pSemaphores && (this.pSemaphores = data.pSemaphores), void 0 !== data.pValues && (this.pValues = data.pValues); - this.sType = StructureType.SEMAPHORE_WAIT_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get semaphoreCount() { - return this.#view.getUint32(20, LE); - } - set semaphoreCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pSemaphores() { - return this.#view.getBigUint64(24, LE); - } - set pSemaphores(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pValues() { - return this.#view.getBigUint64(32, LE); - } - set pValues(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class SemaphoreSignalInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SemaphoreSignalInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreSignalInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreSignalInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SemaphoreSignalInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.value && (this.value = data.value); - this.sType = StructureType.SEMAPHORE_SIGNAL_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - set semaphore(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get value() { - return this.#view.getBigUint64(24, LE); - } - set value(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class VertexInputBindingDivisorDescriptionEXT { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VertexInputBindingDivisorDescriptionEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputBindingDivisorDescriptionEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputBindingDivisorDescriptionEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VertexInputBindingDivisorDescriptionEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.binding && (this.binding = data.binding), void 0 !== data.divisor && (this.divisor = data.divisor); - } - get binding() { - return this.#view.getUint32(0, LE); - } - set binding(value) { - this.#view.setUint32(0, Number(value), LE); - } - get divisor() { - return this.#view.getUint32(4, LE); - } - set divisor(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class PipelineVertexInputDivisorStateCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineVertexInputDivisorStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineVertexInputDivisorStateCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineVertexInputDivisorStateCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineVertexInputDivisorStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.vertexBindingDivisorCount && (this.vertexBindingDivisorCount = data.vertexBindingDivisorCount), void 0 !== data.pVertexBindingDivisors && (this.pVertexBindingDivisors = data.pVertexBindingDivisors); - this.sType = StructureType.PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get vertexBindingDivisorCount() { - return this.#view.getUint32(16, LE); - } - set vertexBindingDivisorCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pVertexBindingDivisors() { - return this.#view.getBigUint64(24, LE); - } - set pVertexBindingDivisors(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceVertexAttributeDivisorPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxVertexAttribDivisor && (this.maxVertexAttribDivisor = data.maxVertexAttribDivisor); - this.sType = StructureType.PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxVertexAttribDivisor() { - return this.#view.getUint32(16, LE); - } - set maxVertexAttribDivisor(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevicePCIBusInfoPropertiesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePCIBusInfoPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePCIBusInfoPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePCIBusInfoPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePCIBusInfoPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pciDomain && (this.pciDomain = data.pciDomain), void 0 !== data.pciBus && (this.pciBus = data.pciBus), void 0 !== data.pciDevice && (this.pciDevice = data.pciDevice), void 0 !== data.pciFunction && (this.pciFunction = data.pciFunction); - this.sType = StructureType.PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pciDomain() { - return this.#view.getUint32(16, LE); - } - set pciDomain(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pciBus() { - return this.#view.getUint32(20, LE); - } - set pciBus(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pciDevice() { - return this.#view.getUint32(24, LE); - } - set pciDevice(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pciFunction() { - return this.#view.getUint32(28, LE); - } - set pciFunction(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class ImportAndroidHardwareBufferInfoANDROID { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportAndroidHardwareBufferInfoANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportAndroidHardwareBufferInfoANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportAndroidHardwareBufferInfoANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportAndroidHardwareBufferInfoANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.buffer && (this.buffer = data.buffer); - this.sType = StructureType.IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get buffer() { - return this.#view.getBigUint64(16, LE); - } - set buffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class AndroidHardwareBufferUsageANDROID { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AndroidHardwareBufferUsageANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferUsageANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidHardwareBufferUsageANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AndroidHardwareBufferUsageANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.androidHardwareBufferUsage && (this.androidHardwareBufferUsage = data.androidHardwareBufferUsage); - this.sType = StructureType.ANDROID_HARDWARE_BUFFER_USAGE_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get androidHardwareBufferUsage() { - return this.#view.getBigUint64(16, LE); - } - set androidHardwareBufferUsage(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class AndroidHardwareBufferPropertiesANDROID { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AndroidHardwareBufferPropertiesANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferPropertiesANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidHardwareBufferPropertiesANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AndroidHardwareBufferPropertiesANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.allocationSize && (this.allocationSize = data.allocationSize), void 0 !== data.memoryTypeBits && (this.memoryTypeBits = data.memoryTypeBits); - this.sType = StructureType.ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get allocationSize() { - return this.#view.getBigUint64(16, LE); - } - set allocationSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get memoryTypeBits() { - return this.#view.getUint32(24, LE); - } - set memoryTypeBits(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class MemoryGetAndroidHardwareBufferInfoANDROID { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryGetAndroidHardwareBufferInfoANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetAndroidHardwareBufferInfoANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetAndroidHardwareBufferInfoANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryGetAndroidHardwareBufferInfoANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memory && (this.memory = data.memory); - this.sType = StructureType.MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(16, LE); - } - set memory(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class AndroidHardwareBufferFormatPropertiesANDROID { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AndroidHardwareBufferFormatPropertiesANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferFormatPropertiesANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidHardwareBufferFormatPropertiesANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AndroidHardwareBufferFormatPropertiesANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.format && (this.format = data.format), void 0 !== data.externalFormat && (this.externalFormat = data.externalFormat), void 0 !== data.formatFeatures && (this.formatFeatures = data.formatFeatures), void 0 !== data.samplerYcbcrConversionComponents && (this.samplerYcbcrConversionComponents = data.samplerYcbcrConversionComponents), void 0 !== data.suggestedYcbcrModel && (this.suggestedYcbcrModel = data.suggestedYcbcrModel), void 0 !== data.suggestedYcbcrRange && (this.suggestedYcbcrRange = data.suggestedYcbcrRange), void 0 !== data.suggestedXChromaOffset && (this.suggestedXChromaOffset = data.suggestedXChromaOffset), void 0 !== data.suggestedYChromaOffset && (this.suggestedYChromaOffset = data.suggestedYChromaOffset); - this.sType = StructureType.ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get format() { - return this.#view.getUint32(16, LE); - } - set format(value) { - this.#view.setUint32(16, Number(value), LE); - } - get externalFormat() { - return this.#view.getBigUint64(24, LE); - } - set externalFormat(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get formatFeatures() { - return this.#view.getUint32(32, LE); - } - set formatFeatures(value) { - this.#view.setUint32(32, Number(value), LE); - } - get samplerYcbcrConversionComponents() { - return new ComponentMapping(this.#data.subarray(36, 36 + ComponentMapping.size)); - } - set samplerYcbcrConversionComponents(value) { - if (value[BUFFER].byteLength < ComponentMapping.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 36); - } - get suggestedYcbcrModel() { - return this.#view.getUint32(52, LE); - } - set suggestedYcbcrModel(value) { - this.#view.setUint32(52, Number(value), LE); - } - get suggestedYcbcrRange() { - return this.#view.getUint32(56, LE); - } - set suggestedYcbcrRange(value) { - this.#view.setUint32(56, Number(value), LE); - } - get suggestedXChromaOffset() { - return this.#view.getUint32(60, LE); - } - set suggestedXChromaOffset(value) { - this.#view.setUint32(60, Number(value), LE); - } - get suggestedYChromaOffset() { - return this.#view.getUint32(64, LE); - } - set suggestedYChromaOffset(value) { - this.#view.setUint32(64, Number(value), LE); - } -} -export class CommandBufferInheritanceConditionalRenderingInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CommandBufferInheritanceConditionalRenderingInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceConditionalRenderingInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceConditionalRenderingInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CommandBufferInheritanceConditionalRenderingInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.conditionalRenderingEnable && (this.conditionalRenderingEnable = data.conditionalRenderingEnable); - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get conditionalRenderingEnable() { - return this.#view.getUint32(16, LE); - } - set conditionalRenderingEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ExternalFormatANDROID { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExternalFormatANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalFormatANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalFormatANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExternalFormatANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.externalFormat && (this.externalFormat = data.externalFormat); - this.sType = StructureType.EXTERNAL_FORMAT_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get externalFormat() { - return this.#view.getBigUint64(16, LE); - } - set externalFormat(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class PhysicalDevice8BitStorageFeatures { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevice8BitStorageFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevice8BitStorageFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevice8BitStorageFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevice8BitStorageFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.storageBuffer8BitAccess && (this.storageBuffer8BitAccess = data.storageBuffer8BitAccess), void 0 !== data.uniformAndStorageBuffer8BitAccess && (this.uniformAndStorageBuffer8BitAccess = data.uniformAndStorageBuffer8BitAccess), void 0 !== data.storagePushConstant8 && (this.storagePushConstant8 = data.storagePushConstant8); - this.sType = StructureType.PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get storageBuffer8BitAccess() { - return this.#view.getUint32(16, LE); - } - set storageBuffer8BitAccess(value) { - this.#view.setUint32(16, Number(value), LE); - } - get uniformAndStorageBuffer8BitAccess() { - return this.#view.getUint32(20, LE); - } - set uniformAndStorageBuffer8BitAccess(value) { - this.#view.setUint32(20, Number(value), LE); - } - get storagePushConstant8() { - return this.#view.getUint32(24, LE); - } - set storagePushConstant8(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceConditionalRenderingFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceConditionalRenderingFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceConditionalRenderingFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceConditionalRenderingFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceConditionalRenderingFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.conditionalRendering && (this.conditionalRendering = data.conditionalRendering), void 0 !== data.inheritedConditionalRendering && (this.inheritedConditionalRendering = data.inheritedConditionalRendering); - this.sType = StructureType.PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get conditionalRendering() { - return this.#view.getUint32(16, LE); - } - set conditionalRendering(value) { - this.#view.setUint32(16, Number(value), LE); - } - get inheritedConditionalRendering() { - return this.#view.getUint32(20, LE); - } - set inheritedConditionalRendering(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceVulkanMemoryModelFeatures { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVulkanMemoryModelFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkanMemoryModelFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkanMemoryModelFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVulkanMemoryModelFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.vulkanMemoryModel && (this.vulkanMemoryModel = data.vulkanMemoryModel), void 0 !== data.vulkanMemoryModelDeviceScope && (this.vulkanMemoryModelDeviceScope = data.vulkanMemoryModelDeviceScope), void 0 !== data.vulkanMemoryModelAvailabilityVisibilityChains && (this.vulkanMemoryModelAvailabilityVisibilityChains = data.vulkanMemoryModelAvailabilityVisibilityChains); - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get vulkanMemoryModel() { - return this.#view.getUint32(16, LE); - } - set vulkanMemoryModel(value) { - this.#view.setUint32(16, Number(value), LE); - } - get vulkanMemoryModelDeviceScope() { - return this.#view.getUint32(20, LE); - } - set vulkanMemoryModelDeviceScope(value) { - this.#view.setUint32(20, Number(value), LE); - } - get vulkanMemoryModelAvailabilityVisibilityChains() { - return this.#view.getUint32(24, LE); - } - set vulkanMemoryModelAvailabilityVisibilityChains(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceShaderAtomicInt64Features { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderAtomicInt64Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderAtomicInt64Features.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderAtomicInt64Features.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderAtomicInt64Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderBufferInt64Atomics && (this.shaderBufferInt64Atomics = data.shaderBufferInt64Atomics), void 0 !== data.shaderSharedInt64Atomics && (this.shaderSharedInt64Atomics = data.shaderSharedInt64Atomics); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderBufferInt64Atomics() { - return this.#view.getUint32(16, LE); - } - set shaderBufferInt64Atomics(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shaderSharedInt64Atomics() { - return this.#view.getUint32(20, LE); - } - set shaderSharedInt64Atomics(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceShaderAtomicFloatFeaturesEXT { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloatFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderAtomicFloatFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderAtomicFloatFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloatFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderBufferFloat32Atomics && (this.shaderBufferFloat32Atomics = data.shaderBufferFloat32Atomics), void 0 !== data.shaderBufferFloat32AtomicAdd && (this.shaderBufferFloat32AtomicAdd = data.shaderBufferFloat32AtomicAdd), void 0 !== data.shaderBufferFloat64Atomics && (this.shaderBufferFloat64Atomics = data.shaderBufferFloat64Atomics), void 0 !== data.shaderBufferFloat64AtomicAdd && (this.shaderBufferFloat64AtomicAdd = data.shaderBufferFloat64AtomicAdd), void 0 !== data.shaderSharedFloat32Atomics && (this.shaderSharedFloat32Atomics = data.shaderSharedFloat32Atomics), void 0 !== data.shaderSharedFloat32AtomicAdd && (this.shaderSharedFloat32AtomicAdd = data.shaderSharedFloat32AtomicAdd), void 0 !== data.shaderSharedFloat64Atomics && (this.shaderSharedFloat64Atomics = data.shaderSharedFloat64Atomics), void 0 !== data.shaderSharedFloat64AtomicAdd && (this.shaderSharedFloat64AtomicAdd = data.shaderSharedFloat64AtomicAdd), void 0 !== data.shaderImageFloat32Atomics && (this.shaderImageFloat32Atomics = data.shaderImageFloat32Atomics), void 0 !== data.shaderImageFloat32AtomicAdd && (this.shaderImageFloat32AtomicAdd = data.shaderImageFloat32AtomicAdd), void 0 !== data.sparseImageFloat32Atomics && (this.sparseImageFloat32Atomics = data.sparseImageFloat32Atomics), void 0 !== data.sparseImageFloat32AtomicAdd && (this.sparseImageFloat32AtomicAdd = data.sparseImageFloat32AtomicAdd); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderBufferFloat32Atomics() { - return this.#view.getUint32(16, LE); - } - set shaderBufferFloat32Atomics(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shaderBufferFloat32AtomicAdd() { - return this.#view.getUint32(20, LE); - } - set shaderBufferFloat32AtomicAdd(value) { - this.#view.setUint32(20, Number(value), LE); - } - get shaderBufferFloat64Atomics() { - return this.#view.getUint32(24, LE); - } - set shaderBufferFloat64Atomics(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shaderBufferFloat64AtomicAdd() { - return this.#view.getUint32(28, LE); - } - set shaderBufferFloat64AtomicAdd(value) { - this.#view.setUint32(28, Number(value), LE); - } - get shaderSharedFloat32Atomics() { - return this.#view.getUint32(32, LE); - } - set shaderSharedFloat32Atomics(value) { - this.#view.setUint32(32, Number(value), LE); - } - get shaderSharedFloat32AtomicAdd() { - return this.#view.getUint32(36, LE); - } - set shaderSharedFloat32AtomicAdd(value) { - this.#view.setUint32(36, Number(value), LE); - } - get shaderSharedFloat64Atomics() { - return this.#view.getUint32(40, LE); - } - set shaderSharedFloat64Atomics(value) { - this.#view.setUint32(40, Number(value), LE); - } - get shaderSharedFloat64AtomicAdd() { - return this.#view.getUint32(44, LE); - } - set shaderSharedFloat64AtomicAdd(value) { - this.#view.setUint32(44, Number(value), LE); - } - get shaderImageFloat32Atomics() { - return this.#view.getUint32(48, LE); - } - set shaderImageFloat32Atomics(value) { - this.#view.setUint32(48, Number(value), LE); - } - get shaderImageFloat32AtomicAdd() { - return this.#view.getUint32(52, LE); - } - set shaderImageFloat32AtomicAdd(value) { - this.#view.setUint32(52, Number(value), LE); - } - get sparseImageFloat32Atomics() { - return this.#view.getUint32(56, LE); - } - set sparseImageFloat32Atomics(value) { - this.#view.setUint32(56, Number(value), LE); - } - get sparseImageFloat32AtomicAdd() { - return this.#view.getUint32(60, LE); - } - set sparseImageFloat32AtomicAdd(value) { - this.#view.setUint32(60, Number(value), LE); - } -} -export class PhysicalDeviceShaderAtomicFloat2FeaturesEXT { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderBufferFloat16Atomics && (this.shaderBufferFloat16Atomics = data.shaderBufferFloat16Atomics), void 0 !== data.shaderBufferFloat16AtomicAdd && (this.shaderBufferFloat16AtomicAdd = data.shaderBufferFloat16AtomicAdd), void 0 !== data.shaderBufferFloat16AtomicMinMax && (this.shaderBufferFloat16AtomicMinMax = data.shaderBufferFloat16AtomicMinMax), void 0 !== data.shaderBufferFloat32AtomicMinMax && (this.shaderBufferFloat32AtomicMinMax = data.shaderBufferFloat32AtomicMinMax), void 0 !== data.shaderBufferFloat64AtomicMinMax && (this.shaderBufferFloat64AtomicMinMax = data.shaderBufferFloat64AtomicMinMax), void 0 !== data.shaderSharedFloat16Atomics && (this.shaderSharedFloat16Atomics = data.shaderSharedFloat16Atomics), void 0 !== data.shaderSharedFloat16AtomicAdd && (this.shaderSharedFloat16AtomicAdd = data.shaderSharedFloat16AtomicAdd), void 0 !== data.shaderSharedFloat16AtomicMinMax && (this.shaderSharedFloat16AtomicMinMax = data.shaderSharedFloat16AtomicMinMax), void 0 !== data.shaderSharedFloat32AtomicMinMax && (this.shaderSharedFloat32AtomicMinMax = data.shaderSharedFloat32AtomicMinMax), void 0 !== data.shaderSharedFloat64AtomicMinMax && (this.shaderSharedFloat64AtomicMinMax = data.shaderSharedFloat64AtomicMinMax), void 0 !== data.shaderImageFloat32AtomicMinMax && (this.shaderImageFloat32AtomicMinMax = data.shaderImageFloat32AtomicMinMax), void 0 !== data.sparseImageFloat32AtomicMinMax && (this.sparseImageFloat32AtomicMinMax = data.sparseImageFloat32AtomicMinMax); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderBufferFloat16Atomics() { - return this.#view.getUint32(16, LE); - } - set shaderBufferFloat16Atomics(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shaderBufferFloat16AtomicAdd() { - return this.#view.getUint32(20, LE); - } - set shaderBufferFloat16AtomicAdd(value) { - this.#view.setUint32(20, Number(value), LE); - } - get shaderBufferFloat16AtomicMinMax() { - return this.#view.getUint32(24, LE); - } - set shaderBufferFloat16AtomicMinMax(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shaderBufferFloat32AtomicMinMax() { - return this.#view.getUint32(28, LE); - } - set shaderBufferFloat32AtomicMinMax(value) { - this.#view.setUint32(28, Number(value), LE); - } - get shaderBufferFloat64AtomicMinMax() { - return this.#view.getUint32(32, LE); - } - set shaderBufferFloat64AtomicMinMax(value) { - this.#view.setUint32(32, Number(value), LE); - } - get shaderSharedFloat16Atomics() { - return this.#view.getUint32(36, LE); - } - set shaderSharedFloat16Atomics(value) { - this.#view.setUint32(36, Number(value), LE); - } - get shaderSharedFloat16AtomicAdd() { - return this.#view.getUint32(40, LE); - } - set shaderSharedFloat16AtomicAdd(value) { - this.#view.setUint32(40, Number(value), LE); - } - get shaderSharedFloat16AtomicMinMax() { - return this.#view.getUint32(44, LE); - } - set shaderSharedFloat16AtomicMinMax(value) { - this.#view.setUint32(44, Number(value), LE); - } - get shaderSharedFloat32AtomicMinMax() { - return this.#view.getUint32(48, LE); - } - set shaderSharedFloat32AtomicMinMax(value) { - this.#view.setUint32(48, Number(value), LE); - } - get shaderSharedFloat64AtomicMinMax() { - return this.#view.getUint32(52, LE); - } - set shaderSharedFloat64AtomicMinMax(value) { - this.#view.setUint32(52, Number(value), LE); - } - get shaderImageFloat32AtomicMinMax() { - return this.#view.getUint32(56, LE); - } - set shaderImageFloat32AtomicMinMax(value) { - this.#view.setUint32(56, Number(value), LE); - } - get sparseImageFloat32AtomicMinMax() { - return this.#view.getUint32(60, LE); - } - set sparseImageFloat32AtomicMinMax(value) { - this.#view.setUint32(60, Number(value), LE); - } -} -export class PhysicalDeviceVertexAttributeDivisorFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.vertexAttributeInstanceRateDivisor && (this.vertexAttributeInstanceRateDivisor = data.vertexAttributeInstanceRateDivisor), void 0 !== data.vertexAttributeInstanceRateZeroDivisor && (this.vertexAttributeInstanceRateZeroDivisor = data.vertexAttributeInstanceRateZeroDivisor); - this.sType = StructureType.PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get vertexAttributeInstanceRateDivisor() { - return this.#view.getUint32(16, LE); - } - set vertexAttributeInstanceRateDivisor(value) { - this.#view.setUint32(16, Number(value), LE); - } - get vertexAttributeInstanceRateZeroDivisor() { - return this.#view.getUint32(20, LE); - } - set vertexAttributeInstanceRateZeroDivisor(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class QueueFamilyCheckpointPropertiesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueueFamilyCheckpointPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyCheckpointPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyCheckpointPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueueFamilyCheckpointPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.checkpointExecutionStageMask && (this.checkpointExecutionStageMask = data.checkpointExecutionStageMask); - this.sType = StructureType.QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get checkpointExecutionStageMask() { - return this.#view.getUint32(16, LE); - } - set checkpointExecutionStageMask(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class CheckpointDataNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CheckpointDataNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CheckpointDataNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CheckpointDataNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CheckpointDataNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stage && (this.stage = data.stage), void 0 !== data.pCheckpointMarker && (this.pCheckpointMarker = data.pCheckpointMarker); - this.sType = StructureType.CHECKPOINT_DATA_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stage() { - return this.#view.getUint32(16, LE); - } - set stage(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pCheckpointMarker() { - return this.#view.getBigUint64(24, LE); - } - set pCheckpointMarker(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceDepthStencilResolveProperties { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDepthStencilResolveProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthStencilResolveProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDepthStencilResolveProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDepthStencilResolveProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.supportedDepthResolveModes && (this.supportedDepthResolveModes = data.supportedDepthResolveModes), void 0 !== data.supportedStencilResolveModes && (this.supportedStencilResolveModes = data.supportedStencilResolveModes), void 0 !== data.independentResolveNone && (this.independentResolveNone = data.independentResolveNone), void 0 !== data.independentResolve && (this.independentResolve = data.independentResolve); - this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get supportedDepthResolveModes() { - return this.#view.getUint32(16, LE); - } - set supportedDepthResolveModes(value) { - this.#view.setUint32(16, Number(value), LE); - } - get supportedStencilResolveModes() { - return this.#view.getUint32(20, LE); - } - set supportedStencilResolveModes(value) { - this.#view.setUint32(20, Number(value), LE); - } - get independentResolveNone() { - return this.#view.getUint32(24, LE); - } - set independentResolveNone(value) { - this.#view.setUint32(24, Number(value), LE); - } - get independentResolve() { - return this.#view.getUint32(28, LE); - } - set independentResolve(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class SubpassDescriptionDepthStencilResolve { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassDescriptionDepthStencilResolve.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDescriptionDepthStencilResolve.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDescriptionDepthStencilResolve.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassDescriptionDepthStencilResolve.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.depthResolveMode && (this.depthResolveMode = data.depthResolveMode), void 0 !== data.stencilResolveMode && (this.stencilResolveMode = data.stencilResolveMode), void 0 !== data.pDepthStencilResolveAttachment && (this.pDepthStencilResolveAttachment = data.pDepthStencilResolveAttachment); - this.sType = StructureType.SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get depthResolveMode() { - return this.#view.getUint32(16, LE); - } - set depthResolveMode(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stencilResolveMode() { - return this.#view.getUint32(20, LE); - } - set stencilResolveMode(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pDepthStencilResolveAttachment() { - return this.#view.getBigUint64(24, LE); - } - set pDepthStencilResolveAttachment(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ImageViewASTCDecodeModeEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageViewASTCDecodeModeEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewASTCDecodeModeEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewASTCDecodeModeEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageViewASTCDecodeModeEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.decodeMode && (this.decodeMode = data.decodeMode); - this.sType = StructureType.IMAGE_VIEW_ASTC_DECODE_MODE_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get decodeMode() { - return this.#view.getUint32(16, LE); - } - set decodeMode(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceASTCDecodeFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceASTCDecodeFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceASTCDecodeFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceASTCDecodeFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceASTCDecodeFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.decodeModeSharedExponent && (this.decodeModeSharedExponent = data.decodeModeSharedExponent); - this.sType = StructureType.PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get decodeModeSharedExponent() { - return this.#view.getUint32(16, LE); - } - set decodeModeSharedExponent(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceTransformFeedbackFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTransformFeedbackFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTransformFeedbackFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.transformFeedback && (this.transformFeedback = data.transformFeedback), void 0 !== data.geometryStreams && (this.geometryStreams = data.geometryStreams); - this.sType = StructureType.PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get transformFeedback() { - return this.#view.getUint32(16, LE); - } - set transformFeedback(value) { - this.#view.setUint32(16, Number(value), LE); - } - get geometryStreams() { - return this.#view.getUint32(20, LE); - } - set geometryStreams(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceTransformFeedbackPropertiesEXT { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTransformFeedbackPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTransformFeedbackPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxTransformFeedbackStreams && (this.maxTransformFeedbackStreams = data.maxTransformFeedbackStreams), void 0 !== data.maxTransformFeedbackBuffers && (this.maxTransformFeedbackBuffers = data.maxTransformFeedbackBuffers), void 0 !== data.maxTransformFeedbackBufferSize && (this.maxTransformFeedbackBufferSize = data.maxTransformFeedbackBufferSize), void 0 !== data.maxTransformFeedbackStreamDataSize && (this.maxTransformFeedbackStreamDataSize = data.maxTransformFeedbackStreamDataSize), void 0 !== data.maxTransformFeedbackBufferDataSize && (this.maxTransformFeedbackBufferDataSize = data.maxTransformFeedbackBufferDataSize), void 0 !== data.maxTransformFeedbackBufferDataStride && (this.maxTransformFeedbackBufferDataStride = data.maxTransformFeedbackBufferDataStride), void 0 !== data.transformFeedbackQueries && (this.transformFeedbackQueries = data.transformFeedbackQueries), void 0 !== data.transformFeedbackStreamsLinesTriangles && (this.transformFeedbackStreamsLinesTriangles = data.transformFeedbackStreamsLinesTriangles), void 0 !== data.transformFeedbackRasterizationStreamSelect && (this.transformFeedbackRasterizationStreamSelect = data.transformFeedbackRasterizationStreamSelect), void 0 !== data.transformFeedbackDraw && (this.transformFeedbackDraw = data.transformFeedbackDraw); - this.sType = StructureType.PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxTransformFeedbackStreams() { - return this.#view.getUint32(16, LE); - } - set maxTransformFeedbackStreams(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxTransformFeedbackBuffers() { - return this.#view.getUint32(20, LE); - } - set maxTransformFeedbackBuffers(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxTransformFeedbackBufferSize() { - return this.#view.getBigUint64(24, LE); - } - set maxTransformFeedbackBufferSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get maxTransformFeedbackStreamDataSize() { - return this.#view.getUint32(32, LE); - } - set maxTransformFeedbackStreamDataSize(value) { - this.#view.setUint32(32, Number(value), LE); - } - get maxTransformFeedbackBufferDataSize() { - return this.#view.getUint32(36, LE); - } - set maxTransformFeedbackBufferDataSize(value) { - this.#view.setUint32(36, Number(value), LE); - } - get maxTransformFeedbackBufferDataStride() { - return this.#view.getUint32(40, LE); - } - set maxTransformFeedbackBufferDataStride(value) { - this.#view.setUint32(40, Number(value), LE); - } - get transformFeedbackQueries() { - return this.#view.getUint32(44, LE); - } - set transformFeedbackQueries(value) { - this.#view.setUint32(44, Number(value), LE); - } - get transformFeedbackStreamsLinesTriangles() { - return this.#view.getUint32(48, LE); - } - set transformFeedbackStreamsLinesTriangles(value) { - this.#view.setUint32(48, Number(value), LE); - } - get transformFeedbackRasterizationStreamSelect() { - return this.#view.getUint32(52, LE); - } - set transformFeedbackRasterizationStreamSelect(value) { - this.#view.setUint32(52, Number(value), LE); - } - get transformFeedbackDraw() { - return this.#view.getUint32(56, LE); - } - set transformFeedbackDraw(value) { - this.#view.setUint32(56, Number(value), LE); - } -} -export class PipelineRasterizationStateStreamCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRasterizationStateStreamCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationStateStreamCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationStateStreamCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRasterizationStateStreamCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.rasterizationStream && (this.rasterizationStream = data.rasterizationStream); - this.sType = StructureType.PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rasterizationStream() { - return this.#view.getUint32(20, LE); - } - set rasterizationStream(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceRepresentativeFragmentTestFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.representativeFragmentTest && (this.representativeFragmentTest = data.representativeFragmentTest); - this.sType = StructureType.PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get representativeFragmentTest() { - return this.#view.getUint32(16, LE); - } - set representativeFragmentTest(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineRepresentativeFragmentTestStateCreateInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRepresentativeFragmentTestStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRepresentativeFragmentTestStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRepresentativeFragmentTestStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRepresentativeFragmentTestStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.representativeFragmentTestEnable && (this.representativeFragmentTestEnable = data.representativeFragmentTestEnable); - this.sType = StructureType.PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get representativeFragmentTestEnable() { - return this.#view.getUint32(16, LE); - } - set representativeFragmentTestEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceExclusiveScissorFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExclusiveScissorFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExclusiveScissorFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExclusiveScissorFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExclusiveScissorFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.exclusiveScissor && (this.exclusiveScissor = data.exclusiveScissor); - this.sType = StructureType.PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get exclusiveScissor() { - return this.#view.getUint32(16, LE); - } - set exclusiveScissor(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineViewportExclusiveScissorStateCreateInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineViewportExclusiveScissorStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportExclusiveScissorStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportExclusiveScissorStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineViewportExclusiveScissorStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.exclusiveScissorCount && (this.exclusiveScissorCount = data.exclusiveScissorCount), void 0 !== data.pExclusiveScissors && (this.pExclusiveScissors = data.pExclusiveScissors); - this.sType = StructureType.PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get exclusiveScissorCount() { - return this.#view.getUint32(16, LE); - } - set exclusiveScissorCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pExclusiveScissors() { - return this.#view.getBigUint64(24, LE); - } - set pExclusiveScissors(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceCornerSampledImageFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceCornerSampledImageFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCornerSampledImageFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCornerSampledImageFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceCornerSampledImageFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.cornerSampledImage && (this.cornerSampledImage = data.cornerSampledImage); - this.sType = StructureType.PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get cornerSampledImage() { - return this.#view.getUint32(16, LE); - } - set cornerSampledImage(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceComputeShaderDerivativesFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceComputeShaderDerivativesFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceComputeShaderDerivativesFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceComputeShaderDerivativesFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceComputeShaderDerivativesFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.computeDerivativeGroupQuads && (this.computeDerivativeGroupQuads = data.computeDerivativeGroupQuads), void 0 !== data.computeDerivativeGroupLinear && (this.computeDerivativeGroupLinear = data.computeDerivativeGroupLinear); - this.sType = StructureType.PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get computeDerivativeGroupQuads() { - return this.#view.getUint32(16, LE); - } - set computeDerivativeGroupQuads(value) { - this.#view.setUint32(16, Number(value), LE); - } - get computeDerivativeGroupLinear() { - return this.#view.getUint32(20, LE); - } - set computeDerivativeGroupLinear(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceShaderImageFootprintFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderImageFootprintFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderImageFootprintFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderImageFootprintFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderImageFootprintFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageFootprint && (this.imageFootprint = data.imageFootprint); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageFootprint() { - return this.#view.getUint32(16, LE); - } - set imageFootprint(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.dedicatedAllocationImageAliasing && (this.dedicatedAllocationImageAliasing = data.dedicatedAllocationImageAliasing); - this.sType = StructureType.PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dedicatedAllocationImageAliasing() { - return this.#view.getUint32(16, LE); - } - set dedicatedAllocationImageAliasing(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceCopyMemoryIndirectFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCopyMemoryIndirectFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCopyMemoryIndirectFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.indirectCopy && (this.indirectCopy = data.indirectCopy); - this.sType = StructureType.PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get indirectCopy() { - return this.#view.getUint32(16, LE); - } - set indirectCopy(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceCopyMemoryIndirectPropertiesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCopyMemoryIndirectPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCopyMemoryIndirectPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.supportedQueues && (this.supportedQueues = data.supportedQueues); - this.sType = StructureType.PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get supportedQueues() { - return this.#view.getUint32(16, LE); - } - set supportedQueues(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceMemoryDecompressionFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryDecompressionFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryDecompressionFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryDecompression && (this.memoryDecompression = data.memoryDecompression); - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryDecompression() { - return this.#view.getUint32(16, LE); - } - set memoryDecompression(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceMemoryDecompressionPropertiesNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryDecompressionPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryDecompressionPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.decompressionMethods && (this.decompressionMethods = data.decompressionMethods), void 0 !== data.maxDecompressionIndirectCount && (this.maxDecompressionIndirectCount = data.maxDecompressionIndirectCount); - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get decompressionMethods() { - return this.#view.getBigUint64(16, LE); - } - set decompressionMethods(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get maxDecompressionIndirectCount() { - return this.#view.getBigUint64(24, LE); - } - set maxDecompressionIndirectCount(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class ShadingRatePaletteNV { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ShadingRatePaletteNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShadingRatePaletteNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ShadingRatePaletteNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ShadingRatePaletteNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.shadingRatePaletteEntryCount && (this.shadingRatePaletteEntryCount = data.shadingRatePaletteEntryCount), void 0 !== data.pShadingRatePaletteEntries && (this.pShadingRatePaletteEntries = data.pShadingRatePaletteEntries); - } - get shadingRatePaletteEntryCount() { - return this.#view.getUint32(0, LE); - } - set shadingRatePaletteEntryCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pShadingRatePaletteEntries() { - return this.#view.getBigUint64(8, LE); - } - set pShadingRatePaletteEntries(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} -export class PipelineViewportShadingRateImageStateCreateInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineViewportShadingRateImageStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportShadingRateImageStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportShadingRateImageStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineViewportShadingRateImageStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shadingRateImageEnable && (this.shadingRateImageEnable = data.shadingRateImageEnable), void 0 !== data.viewportCount && (this.viewportCount = data.viewportCount), void 0 !== data.pShadingRatePalettes && (this.pShadingRatePalettes = data.pShadingRatePalettes); - this.sType = StructureType.PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shadingRateImageEnable() { - return this.#view.getUint32(16, LE); - } - set shadingRateImageEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } - get viewportCount() { - return this.#view.getUint32(20, LE); - } - set viewportCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pShadingRatePalettes() { - return this.#view.getBigUint64(24, LE); - } - set pShadingRatePalettes(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceShadingRateImageFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShadingRateImageFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShadingRateImageFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShadingRateImageFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShadingRateImageFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shadingRateImage && (this.shadingRateImage = data.shadingRateImage), void 0 !== data.shadingRateCoarseSampleOrder && (this.shadingRateCoarseSampleOrder = data.shadingRateCoarseSampleOrder); - this.sType = StructureType.PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shadingRateImage() { - return this.#view.getUint32(16, LE); - } - set shadingRateImage(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shadingRateCoarseSampleOrder() { - return this.#view.getUint32(20, LE); - } - set shadingRateCoarseSampleOrder(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceShadingRateImagePropertiesNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShadingRateImagePropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShadingRateImagePropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShadingRateImagePropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShadingRateImagePropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shadingRateTexelSize && (this.shadingRateTexelSize = data.shadingRateTexelSize), void 0 !== data.shadingRatePaletteSize && (this.shadingRatePaletteSize = data.shadingRatePaletteSize), void 0 !== data.shadingRateMaxCoarseSamples && (this.shadingRateMaxCoarseSamples = data.shadingRateMaxCoarseSamples); - this.sType = StructureType.PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shadingRateTexelSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - set shadingRateTexelSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get shadingRatePaletteSize() { - return this.#view.getUint32(24, LE); - } - set shadingRatePaletteSize(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shadingRateMaxCoarseSamples() { - return this.#view.getUint32(28, LE); - } - set shadingRateMaxCoarseSamples(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDeviceInvocationMaskFeaturesHUAWEI { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceInvocationMaskFeaturesHUAWEI.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInvocationMaskFeaturesHUAWEI.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceInvocationMaskFeaturesHUAWEI.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceInvocationMaskFeaturesHUAWEI.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.invocationMask && (this.invocationMask = data.invocationMask); - this.sType = StructureType.PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get invocationMask() { - return this.#view.getUint32(16, LE); - } - set invocationMask(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class CoarseSampleLocationNV { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CoarseSampleLocationNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CoarseSampleLocationNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CoarseSampleLocationNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CoarseSampleLocationNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pixelX && (this.pixelX = data.pixelX), void 0 !== data.pixelY && (this.pixelY = data.pixelY), void 0 !== data.sample && (this.sample = data.sample); - } - get pixelX() { - return this.#view.getUint32(0, LE); - } - set pixelX(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pixelY() { - return this.#view.getUint32(4, LE); - } - set pixelY(value) { - this.#view.setUint32(4, Number(value), LE); - } - get sample() { - return this.#view.getUint32(8, LE); - } - set sample(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class CoarseSampleOrderCustomNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CoarseSampleOrderCustomNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CoarseSampleOrderCustomNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CoarseSampleOrderCustomNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CoarseSampleOrderCustomNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.shadingRate && (this.shadingRate = data.shadingRate), void 0 !== data.sampleCount && (this.sampleCount = data.sampleCount), void 0 !== data.sampleLocationCount && (this.sampleLocationCount = data.sampleLocationCount), void 0 !== data.pSampleLocations && (this.pSampleLocations = data.pSampleLocations); - } - get shadingRate() { - return this.#view.getUint32(0, LE); - } - set shadingRate(value) { - this.#view.setUint32(0, Number(value), LE); - } - get sampleCount() { - return this.#view.getUint32(4, LE); - } - set sampleCount(value) { - this.#view.setUint32(4, Number(value), LE); - } - get sampleLocationCount() { - return this.#view.getUint32(8, LE); - } - set sampleLocationCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get pSampleLocations() { - return this.#view.getBigUint64(16, LE); - } - set pSampleLocations(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class PipelineViewportCoarseSampleOrderStateCreateInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineViewportCoarseSampleOrderStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportCoarseSampleOrderStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportCoarseSampleOrderStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineViewportCoarseSampleOrderStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.sampleOrderType && (this.sampleOrderType = data.sampleOrderType), void 0 !== data.customSampleOrderCount && (this.customSampleOrderCount = data.customSampleOrderCount), void 0 !== data.pCustomSampleOrders && (this.pCustomSampleOrders = data.pCustomSampleOrders); - this.sType = StructureType.PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get sampleOrderType() { - return this.#view.getUint32(16, LE); - } - set sampleOrderType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get customSampleOrderCount() { - return this.#view.getUint32(20, LE); - } - set customSampleOrderCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pCustomSampleOrders() { - return this.#view.getBigUint64(24, LE); - } - set pCustomSampleOrders(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceMeshShaderFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMeshShaderFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.taskShader && (this.taskShader = data.taskShader), void 0 !== data.meshShader && (this.meshShader = data.meshShader); - this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get taskShader() { - return this.#view.getUint32(16, LE); - } - set taskShader(value) { - this.#view.setUint32(16, Number(value), LE); - } - get meshShader() { - return this.#view.getUint32(20, LE); - } - set meshShader(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceMeshShaderPropertiesNV { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMeshShaderPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxDrawMeshTasksCount && (this.maxDrawMeshTasksCount = data.maxDrawMeshTasksCount), void 0 !== data.maxTaskWorkGroupInvocations && (this.maxTaskWorkGroupInvocations = data.maxTaskWorkGroupInvocations), void 0 !== data.maxTaskWorkGroupSize && (this.maxTaskWorkGroupSize = data.maxTaskWorkGroupSize), void 0 !== data.maxTaskTotalMemorySize && (this.maxTaskTotalMemorySize = data.maxTaskTotalMemorySize), void 0 !== data.maxTaskOutputCount && (this.maxTaskOutputCount = data.maxTaskOutputCount), void 0 !== data.maxMeshWorkGroupInvocations && (this.maxMeshWorkGroupInvocations = data.maxMeshWorkGroupInvocations), void 0 !== data.maxMeshWorkGroupSize && (this.maxMeshWorkGroupSize = data.maxMeshWorkGroupSize), void 0 !== data.maxMeshTotalMemorySize && (this.maxMeshTotalMemorySize = data.maxMeshTotalMemorySize), void 0 !== data.maxMeshOutputVertices && (this.maxMeshOutputVertices = data.maxMeshOutputVertices), void 0 !== data.maxMeshOutputPrimitives && (this.maxMeshOutputPrimitives = data.maxMeshOutputPrimitives), void 0 !== data.maxMeshMultiviewViewCount && (this.maxMeshMultiviewViewCount = data.maxMeshMultiviewViewCount), void 0 !== data.meshOutputPerVertexGranularity && (this.meshOutputPerVertexGranularity = data.meshOutputPerVertexGranularity), void 0 !== data.meshOutputPerPrimitiveGranularity && (this.meshOutputPerPrimitiveGranularity = data.meshOutputPerPrimitiveGranularity); - this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxDrawMeshTasksCount() { - return this.#view.getUint32(16, LE); - } - set maxDrawMeshTasksCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxTaskWorkGroupInvocations() { - return this.#view.getUint32(20, LE); - } - set maxTaskWorkGroupInvocations(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxTaskWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 24, 3); - } - set maxTaskWorkGroupSize(value) { - this.#data.set(new Uint8Array(value.buffer), 24); - } - get maxTaskTotalMemorySize() { - return this.#view.getUint32(36, LE); - } - set maxTaskTotalMemorySize(value) { - this.#view.setUint32(36, Number(value), LE); - } - get maxTaskOutputCount() { - return this.#view.getUint32(40, LE); - } - set maxTaskOutputCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get maxMeshWorkGroupInvocations() { - return this.#view.getUint32(44, LE); - } - set maxMeshWorkGroupInvocations(value) { - this.#view.setUint32(44, Number(value), LE); - } - get maxMeshWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 48, 3); - } - set maxMeshWorkGroupSize(value) { - this.#data.set(new Uint8Array(value.buffer), 48); - } - get maxMeshTotalMemorySize() { - return this.#view.getUint32(60, LE); - } - set maxMeshTotalMemorySize(value) { - this.#view.setUint32(60, Number(value), LE); - } - get maxMeshOutputVertices() { - return this.#view.getUint32(64, LE); - } - set maxMeshOutputVertices(value) { - this.#view.setUint32(64, Number(value), LE); - } - get maxMeshOutputPrimitives() { - return this.#view.getUint32(68, LE); - } - set maxMeshOutputPrimitives(value) { - this.#view.setUint32(68, Number(value), LE); - } - get maxMeshMultiviewViewCount() { - return this.#view.getUint32(72, LE); - } - set maxMeshMultiviewViewCount(value) { - this.#view.setUint32(72, Number(value), LE); - } - get meshOutputPerVertexGranularity() { - return this.#view.getUint32(76, LE); - } - set meshOutputPerVertexGranularity(value) { - this.#view.setUint32(76, Number(value), LE); - } - get meshOutputPerPrimitiveGranularity() { - return this.#view.getUint32(80, LE); - } - set meshOutputPerPrimitiveGranularity(value) { - this.#view.setUint32(80, Number(value), LE); - } -} -export class DrawMeshTasksIndirectCommandNV { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DrawMeshTasksIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawMeshTasksIndirectCommandNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DrawMeshTasksIndirectCommandNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DrawMeshTasksIndirectCommandNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.taskCount && (this.taskCount = data.taskCount), void 0 !== data.firstTask && (this.firstTask = data.firstTask); - } - get taskCount() { - return this.#view.getUint32(0, LE); - } - set taskCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get firstTask() { - return this.#view.getUint32(4, LE); - } - set firstTask(value) { - this.#view.setUint32(4, Number(value), LE); - } -} -export class PhysicalDeviceMeshShaderFeaturesEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMeshShaderFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.taskShader && (this.taskShader = data.taskShader), void 0 !== data.meshShader && (this.meshShader = data.meshShader), void 0 !== data.multiviewMeshShader && (this.multiviewMeshShader = data.multiviewMeshShader), void 0 !== data.primitiveFragmentShadingRateMeshShader && (this.primitiveFragmentShadingRateMeshShader = data.primitiveFragmentShadingRateMeshShader), void 0 !== data.meshShaderQueries && (this.meshShaderQueries = data.meshShaderQueries); - this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get taskShader() { - return this.#view.getUint32(16, LE); - } - set taskShader(value) { - this.#view.setUint32(16, Number(value), LE); - } - get meshShader() { - return this.#view.getUint32(20, LE); - } - set meshShader(value) { - this.#view.setUint32(20, Number(value), LE); - } - get multiviewMeshShader() { - return this.#view.getUint32(24, LE); - } - set multiviewMeshShader(value) { - this.#view.setUint32(24, Number(value), LE); - } - get primitiveFragmentShadingRateMeshShader() { - return this.#view.getUint32(28, LE); - } - set primitiveFragmentShadingRateMeshShader(value) { - this.#view.setUint32(28, Number(value), LE); - } - get meshShaderQueries() { - return this.#view.getUint32(32, LE); - } - set meshShaderQueries(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class PhysicalDeviceMeshShaderPropertiesEXT { - static size = 160; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMeshShaderPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxTaskWorkGroupTotalCount && (this.maxTaskWorkGroupTotalCount = data.maxTaskWorkGroupTotalCount), void 0 !== data.maxTaskWorkGroupCount && (this.maxTaskWorkGroupCount = data.maxTaskWorkGroupCount), void 0 !== data.maxTaskWorkGroupInvocations && (this.maxTaskWorkGroupInvocations = data.maxTaskWorkGroupInvocations), void 0 !== data.maxTaskWorkGroupSize && (this.maxTaskWorkGroupSize = data.maxTaskWorkGroupSize), void 0 !== data.maxTaskPayloadSize && (this.maxTaskPayloadSize = data.maxTaskPayloadSize), void 0 !== data.maxTaskSharedMemorySize && (this.maxTaskSharedMemorySize = data.maxTaskSharedMemorySize), void 0 !== data.maxTaskPayloadAndSharedMemorySize && (this.maxTaskPayloadAndSharedMemorySize = data.maxTaskPayloadAndSharedMemorySize), void 0 !== data.maxMeshWorkGroupTotalCount && (this.maxMeshWorkGroupTotalCount = data.maxMeshWorkGroupTotalCount), void 0 !== data.maxMeshWorkGroupCount && (this.maxMeshWorkGroupCount = data.maxMeshWorkGroupCount), void 0 !== data.maxMeshWorkGroupInvocations && (this.maxMeshWorkGroupInvocations = data.maxMeshWorkGroupInvocations), void 0 !== data.maxMeshWorkGroupSize && (this.maxMeshWorkGroupSize = data.maxMeshWorkGroupSize), void 0 !== data.maxMeshSharedMemorySize && (this.maxMeshSharedMemorySize = data.maxMeshSharedMemorySize), void 0 !== data.maxMeshPayloadAndSharedMemorySize && (this.maxMeshPayloadAndSharedMemorySize = data.maxMeshPayloadAndSharedMemorySize), void 0 !== data.maxMeshOutputMemorySize && (this.maxMeshOutputMemorySize = data.maxMeshOutputMemorySize), void 0 !== data.maxMeshPayloadAndOutputMemorySize && (this.maxMeshPayloadAndOutputMemorySize = data.maxMeshPayloadAndOutputMemorySize), void 0 !== data.maxMeshOutputComponents && (this.maxMeshOutputComponents = data.maxMeshOutputComponents), void 0 !== data.maxMeshOutputVertices && (this.maxMeshOutputVertices = data.maxMeshOutputVertices), void 0 !== data.maxMeshOutputPrimitives && (this.maxMeshOutputPrimitives = data.maxMeshOutputPrimitives), void 0 !== data.maxMeshOutputLayers && (this.maxMeshOutputLayers = data.maxMeshOutputLayers), void 0 !== data.maxMeshMultiviewViewCount && (this.maxMeshMultiviewViewCount = data.maxMeshMultiviewViewCount), void 0 !== data.meshOutputPerVertexGranularity && (this.meshOutputPerVertexGranularity = data.meshOutputPerVertexGranularity), void 0 !== data.meshOutputPerPrimitiveGranularity && (this.meshOutputPerPrimitiveGranularity = data.meshOutputPerPrimitiveGranularity), void 0 !== data.maxPreferredTaskWorkGroupInvocations && (this.maxPreferredTaskWorkGroupInvocations = data.maxPreferredTaskWorkGroupInvocations), void 0 !== data.maxPreferredMeshWorkGroupInvocations && (this.maxPreferredMeshWorkGroupInvocations = data.maxPreferredMeshWorkGroupInvocations), void 0 !== data.prefersLocalInvocationVertexOutput && (this.prefersLocalInvocationVertexOutput = data.prefersLocalInvocationVertexOutput), void 0 !== data.prefersLocalInvocationPrimitiveOutput && (this.prefersLocalInvocationPrimitiveOutput = data.prefersLocalInvocationPrimitiveOutput), void 0 !== data.prefersCompactVertexOutput && (this.prefersCompactVertexOutput = data.prefersCompactVertexOutput), void 0 !== data.prefersCompactPrimitiveOutput && (this.prefersCompactPrimitiveOutput = data.prefersCompactPrimitiveOutput); - this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxTaskWorkGroupTotalCount() { - return this.#view.getUint32(16, LE); - } - set maxTaskWorkGroupTotalCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxTaskWorkGroupCount() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 20, 3); - } - set maxTaskWorkGroupCount(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - get maxTaskWorkGroupInvocations() { - return this.#view.getUint32(32, LE); - } - set maxTaskWorkGroupInvocations(value) { - this.#view.setUint32(32, Number(value), LE); - } - get maxTaskWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 36, 3); - } - set maxTaskWorkGroupSize(value) { - this.#data.set(new Uint8Array(value.buffer), 36); - } - get maxTaskPayloadSize() { - return this.#view.getUint32(48, LE); - } - set maxTaskPayloadSize(value) { - this.#view.setUint32(48, Number(value), LE); - } - get maxTaskSharedMemorySize() { - return this.#view.getUint32(52, LE); - } - set maxTaskSharedMemorySize(value) { - this.#view.setUint32(52, Number(value), LE); - } - get maxTaskPayloadAndSharedMemorySize() { - return this.#view.getUint32(56, LE); - } - set maxTaskPayloadAndSharedMemorySize(value) { - this.#view.setUint32(56, Number(value), LE); - } - get maxMeshWorkGroupTotalCount() { - return this.#view.getUint32(60, LE); - } - set maxMeshWorkGroupTotalCount(value) { - this.#view.setUint32(60, Number(value), LE); - } - get maxMeshWorkGroupCount() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 64, 3); - } - set maxMeshWorkGroupCount(value) { - this.#data.set(new Uint8Array(value.buffer), 64); - } - get maxMeshWorkGroupInvocations() { - return this.#view.getUint32(76, LE); - } - set maxMeshWorkGroupInvocations(value) { - this.#view.setUint32(76, Number(value), LE); - } - get maxMeshWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 80, 3); - } - set maxMeshWorkGroupSize(value) { - this.#data.set(new Uint8Array(value.buffer), 80); - } - get maxMeshSharedMemorySize() { - return this.#view.getUint32(92, LE); - } - set maxMeshSharedMemorySize(value) { - this.#view.setUint32(92, Number(value), LE); - } - get maxMeshPayloadAndSharedMemorySize() { - return this.#view.getUint32(96, LE); - } - set maxMeshPayloadAndSharedMemorySize(value) { - this.#view.setUint32(96, Number(value), LE); - } - get maxMeshOutputMemorySize() { - return this.#view.getUint32(100, LE); - } - set maxMeshOutputMemorySize(value) { - this.#view.setUint32(100, Number(value), LE); - } - get maxMeshPayloadAndOutputMemorySize() { - return this.#view.getUint32(104, LE); - } - set maxMeshPayloadAndOutputMemorySize(value) { - this.#view.setUint32(104, Number(value), LE); - } - get maxMeshOutputComponents() { - return this.#view.getUint32(108, LE); - } - set maxMeshOutputComponents(value) { - this.#view.setUint32(108, Number(value), LE); - } - get maxMeshOutputVertices() { - return this.#view.getUint32(112, LE); - } - set maxMeshOutputVertices(value) { - this.#view.setUint32(112, Number(value), LE); - } - get maxMeshOutputPrimitives() { - return this.#view.getUint32(116, LE); - } - set maxMeshOutputPrimitives(value) { - this.#view.setUint32(116, Number(value), LE); - } - get maxMeshOutputLayers() { - return this.#view.getUint32(120, LE); - } - set maxMeshOutputLayers(value) { - this.#view.setUint32(120, Number(value), LE); - } - get maxMeshMultiviewViewCount() { - return this.#view.getUint32(124, LE); - } - set maxMeshMultiviewViewCount(value) { - this.#view.setUint32(124, Number(value), LE); - } - get meshOutputPerVertexGranularity() { - return this.#view.getUint32(128, LE); - } - set meshOutputPerVertexGranularity(value) { - this.#view.setUint32(128, Number(value), LE); - } - get meshOutputPerPrimitiveGranularity() { - return this.#view.getUint32(132, LE); - } - set meshOutputPerPrimitiveGranularity(value) { - this.#view.setUint32(132, Number(value), LE); - } - get maxPreferredTaskWorkGroupInvocations() { - return this.#view.getUint32(136, LE); - } - set maxPreferredTaskWorkGroupInvocations(value) { - this.#view.setUint32(136, Number(value), LE); - } - get maxPreferredMeshWorkGroupInvocations() { - return this.#view.getUint32(140, LE); - } - set maxPreferredMeshWorkGroupInvocations(value) { - this.#view.setUint32(140, Number(value), LE); - } - get prefersLocalInvocationVertexOutput() { - return this.#view.getUint32(144, LE); - } - set prefersLocalInvocationVertexOutput(value) { - this.#view.setUint32(144, Number(value), LE); - } - get prefersLocalInvocationPrimitiveOutput() { - return this.#view.getUint32(148, LE); - } - set prefersLocalInvocationPrimitiveOutput(value) { - this.#view.setUint32(148, Number(value), LE); - } - get prefersCompactVertexOutput() { - return this.#view.getUint32(152, LE); - } - set prefersCompactVertexOutput(value) { - this.#view.setUint32(152, Number(value), LE); - } - get prefersCompactPrimitiveOutput() { - return this.#view.getUint32(156, LE); - } - set prefersCompactPrimitiveOutput(value) { - this.#view.setUint32(156, Number(value), LE); - } -} -export class DrawMeshTasksIndirectCommandEXT { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DrawMeshTasksIndirectCommandEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawMeshTasksIndirectCommandEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DrawMeshTasksIndirectCommandEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DrawMeshTasksIndirectCommandEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.groupCountX && (this.groupCountX = data.groupCountX), void 0 !== data.groupCountY && (this.groupCountY = data.groupCountY), void 0 !== data.groupCountZ && (this.groupCountZ = data.groupCountZ); - } - get groupCountX() { - return this.#view.getUint32(0, LE); - } - set groupCountX(value) { - this.#view.setUint32(0, Number(value), LE); - } - get groupCountY() { - return this.#view.getUint32(4, LE); - } - set groupCountY(value) { - this.#view.setUint32(4, Number(value), LE); - } - get groupCountZ() { - return this.#view.getUint32(8, LE); - } - set groupCountZ(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class RayTracingShaderGroupCreateInfoNV { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingShaderGroupCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingShaderGroupCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.type && (this.type = data.type), void 0 !== data.generalShader && (this.generalShader = data.generalShader), void 0 !== data.closestHitShader && (this.closestHitShader = data.closestHitShader), void 0 !== data.anyHitShader && (this.anyHitShader = data.anyHitShader), void 0 !== data.intersectionShader && (this.intersectionShader = data.intersectionShader); - this.sType = StructureType.RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get type() { - return this.#view.getUint32(16, LE); - } - set type(value) { - this.#view.setUint32(16, Number(value), LE); - } - get generalShader() { - return this.#view.getUint32(20, LE); - } - set generalShader(value) { - this.#view.setUint32(20, Number(value), LE); - } - get closestHitShader() { - return this.#view.getUint32(24, LE); - } - set closestHitShader(value) { - this.#view.setUint32(24, Number(value), LE); - } - get anyHitShader() { - return this.#view.getUint32(28, LE); - } - set anyHitShader(value) { - this.#view.setUint32(28, Number(value), LE); - } - get intersectionShader() { - return this.#view.getUint32(32, LE); - } - set intersectionShader(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class RayTracingShaderGroupCreateInfoKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingShaderGroupCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingShaderGroupCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.type && (this.type = data.type), void 0 !== data.generalShader && (this.generalShader = data.generalShader), void 0 !== data.closestHitShader && (this.closestHitShader = data.closestHitShader), void 0 !== data.anyHitShader && (this.anyHitShader = data.anyHitShader), void 0 !== data.intersectionShader && (this.intersectionShader = data.intersectionShader), void 0 !== data.pShaderGroupCaptureReplayHandle && (this.pShaderGroupCaptureReplayHandle = data.pShaderGroupCaptureReplayHandle); - this.sType = StructureType.RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get type() { - return this.#view.getUint32(16, LE); - } - set type(value) { - this.#view.setUint32(16, Number(value), LE); - } - get generalShader() { - return this.#view.getUint32(20, LE); - } - set generalShader(value) { - this.#view.setUint32(20, Number(value), LE); - } - get closestHitShader() { - return this.#view.getUint32(24, LE); - } - set closestHitShader(value) { - this.#view.setUint32(24, Number(value), LE); - } - get anyHitShader() { - return this.#view.getUint32(28, LE); - } - set anyHitShader(value) { - this.#view.setUint32(28, Number(value), LE); - } - get intersectionShader() { - return this.#view.getUint32(32, LE); - } - set intersectionShader(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pShaderGroupCaptureReplayHandle() { - return this.#view.getBigUint64(40, LE); - } - set pShaderGroupCaptureReplayHandle(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class RayTracingPipelineCreateInfoNV { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RayTracingPipelineCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingPipelineCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingPipelineCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RayTracingPipelineCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.stageCount && (this.stageCount = data.stageCount), void 0 !== data.pStages && (this.pStages = data.pStages), void 0 !== data.groupCount && (this.groupCount = data.groupCount), void 0 !== data.pGroups && (this.pGroups = data.pGroups), void 0 !== data.maxRecursionDepth && (this.maxRecursionDepth = data.maxRecursionDepth), void 0 !== data.layout && (this.layout = data.layout), void 0 !== data.basePipelineHandle && (this.basePipelineHandle = data.basePipelineHandle), void 0 !== data.basePipelineIndex && (this.basePipelineIndex = data.basePipelineIndex); - this.sType = StructureType.RAY_TRACING_PIPELINE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stageCount() { - return this.#view.getUint32(20, LE); - } - set stageCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pStages() { - return this.#view.getBigUint64(24, LE); - } - set pStages(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get groupCount() { - return this.#view.getUint32(32, LE); - } - set groupCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pGroups() { - return this.#view.getBigUint64(40, LE); - } - set pGroups(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get maxRecursionDepth() { - return this.#view.getUint32(48, LE); - } - set maxRecursionDepth(value) { - this.#view.setUint32(48, Number(value), LE); - } - get layout() { - return this.#view.getBigUint64(56, LE); - } - set layout(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get basePipelineHandle() { - return this.#view.getBigUint64(64, LE); - } - set basePipelineHandle(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - get basePipelineIndex() { - return this.#view.getInt32(72, LE); - } - set basePipelineIndex(value) { - this.#view.setInt32(72, Number(value), LE); - } -} -export class RayTracingPipelineCreateInfoKHR { - static size = 104; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RayTracingPipelineCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingPipelineCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingPipelineCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RayTracingPipelineCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.stageCount && (this.stageCount = data.stageCount), void 0 !== data.pStages && (this.pStages = data.pStages), void 0 !== data.groupCount && (this.groupCount = data.groupCount), void 0 !== data.pGroups && (this.pGroups = data.pGroups), void 0 !== data.maxPipelineRayRecursionDepth && (this.maxPipelineRayRecursionDepth = data.maxPipelineRayRecursionDepth), void 0 !== data.pLibraryInfo && (this.pLibraryInfo = data.pLibraryInfo), void 0 !== data.pLibraryInterface && (this.pLibraryInterface = data.pLibraryInterface), void 0 !== data.pDynamicState && (this.pDynamicState = data.pDynamicState), void 0 !== data.layout && (this.layout = data.layout), void 0 !== data.basePipelineHandle && (this.basePipelineHandle = data.basePipelineHandle), void 0 !== data.basePipelineIndex && (this.basePipelineIndex = data.basePipelineIndex); - this.sType = StructureType.RAY_TRACING_PIPELINE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stageCount() { - return this.#view.getUint32(20, LE); - } - set stageCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pStages() { - return this.#view.getBigUint64(24, LE); - } - set pStages(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get groupCount() { - return this.#view.getUint32(32, LE); - } - set groupCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pGroups() { - return this.#view.getBigUint64(40, LE); - } - set pGroups(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get maxPipelineRayRecursionDepth() { - return this.#view.getUint32(48, LE); - } - set maxPipelineRayRecursionDepth(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pLibraryInfo() { - return this.#view.getBigUint64(56, LE); - } - set pLibraryInfo(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get pLibraryInterface() { - return this.#view.getBigUint64(64, LE); - } - set pLibraryInterface(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - get pDynamicState() { - return this.#view.getBigUint64(72, LE); - } - set pDynamicState(value) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - get layout() { - return this.#view.getBigUint64(80, LE); - } - set layout(value) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } - get basePipelineHandle() { - return this.#view.getBigUint64(88, LE); - } - set basePipelineHandle(value) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } - get basePipelineIndex() { - return this.#view.getInt32(96, LE); - } - set basePipelineIndex(value) { - this.#view.setInt32(96, Number(value), LE); - } -} -export class GeometryTrianglesNV { - static size = 96; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GeometryTrianglesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryTrianglesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GeometryTrianglesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GeometryTrianglesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.vertexData && (this.vertexData = data.vertexData), void 0 !== data.vertexOffset && (this.vertexOffset = data.vertexOffset), void 0 !== data.vertexCount && (this.vertexCount = data.vertexCount), void 0 !== data.vertexStride && (this.vertexStride = data.vertexStride), void 0 !== data.vertexFormat && (this.vertexFormat = data.vertexFormat), void 0 !== data.indexData && (this.indexData = data.indexData), void 0 !== data.indexOffset && (this.indexOffset = data.indexOffset), void 0 !== data.indexCount && (this.indexCount = data.indexCount), void 0 !== data.indexType && (this.indexType = data.indexType), void 0 !== data.transformData && (this.transformData = data.transformData), void 0 !== data.transformOffset && (this.transformOffset = data.transformOffset); - this.sType = StructureType.GEOMETRY_TRIANGLES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get vertexData() { - return this.#view.getBigUint64(16, LE); - } - set vertexData(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get vertexOffset() { - return this.#view.getBigUint64(24, LE); - } - set vertexOffset(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get vertexCount() { - return this.#view.getUint32(32, LE); - } - set vertexCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get vertexStride() { - return this.#view.getBigUint64(40, LE); - } - set vertexStride(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get vertexFormat() { - return this.#view.getUint32(48, LE); - } - set vertexFormat(value) { - this.#view.setUint32(48, Number(value), LE); - } - get indexData() { - return this.#view.getBigUint64(56, LE); - } - set indexData(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get indexOffset() { - return this.#view.getBigUint64(64, LE); - } - set indexOffset(value) { - this.#view.setBigUint64(64, BigInt(value), LE); - } - get indexCount() { - return this.#view.getUint32(72, LE); - } - set indexCount(value) { - this.#view.setUint32(72, Number(value), LE); - } - get indexType() { - return this.#view.getUint32(76, LE); - } - set indexType(value) { - this.#view.setUint32(76, Number(value), LE); - } - get transformData() { - return this.#view.getBigUint64(80, LE); - } - set transformData(value) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } - get transformOffset() { - return this.#view.getBigUint64(88, LE); - } - set transformOffset(value) { - this.#view.setBigUint64(88, BigInt(value), LE); - } -} -export class GeometryAABBNV { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GeometryAABBNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryAABBNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GeometryAABBNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GeometryAABBNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.aabbData && (this.aabbData = data.aabbData), void 0 !== data.numAABBs && (this.numAABBs = data.numAABBs), void 0 !== data.stride && (this.stride = data.stride), void 0 !== data.offset && (this.offset = data.offset); - this.sType = StructureType.GEOMETRY_AABB_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get aabbData() { - return this.#view.getBigUint64(16, LE); - } - set aabbData(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get numAABBs() { - return this.#view.getUint32(24, LE); - } - set numAABBs(value) { - this.#view.setUint32(24, Number(value), LE); - } - get stride() { - return this.#view.getUint32(28, LE); - } - set stride(value) { - this.#view.setUint32(28, Number(value), LE); - } - get offset() { - return this.#view.getBigUint64(32, LE); - } - set offset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class GeometryDataNV { - static size = 136; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GeometryDataNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryDataNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GeometryDataNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GeometryDataNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.triangles && (this.triangles = data.triangles), void 0 !== data.aabbs && (this.aabbs = data.aabbs); - } - get triangles() { - return new GeometryTrianglesNV(this.#data.subarray(0, 0 + GeometryTrianglesNV.size)); - } - set triangles(value) { - if (value[BUFFER].byteLength < GeometryTrianglesNV.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get aabbs() { - return new GeometryAABBNV(this.#data.subarray(96, 96 + GeometryAABBNV.size)); - } - set aabbs(value) { - if (value[BUFFER].byteLength < GeometryAABBNV.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 96); - } -} -export class GeometryNV { - static size = 160; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GeometryNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GeometryNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GeometryNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.geometryType && (this.geometryType = data.geometryType), void 0 !== data.geometry && (this.geometry = data.geometry), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.GEOMETRY_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get geometryType() { - return this.#view.getUint32(16, LE); - } - set geometryType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get geometry() { - return new GeometryDataNV(this.#data.subarray(20, 20 + GeometryDataNV.size)); - } - set geometry(value) { - if (value[BUFFER].byteLength < GeometryDataNV.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } - get flags() { - return this.#view.getUint32(156, LE); - } - set flags(value) { - this.#view.setUint32(156, Number(value), LE); - } -} -export class AccelerationStructureInfoNV { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.type && (this.type = data.type), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.instanceCount && (this.instanceCount = data.instanceCount), void 0 !== data.geometryCount && (this.geometryCount = data.geometryCount), void 0 !== data.pGeometries && (this.pGeometries = data.pGeometries); - this.sType = StructureType.ACCELERATION_STRUCTURE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get type() { - return this.#view.getUint32(16, LE); - } - set type(value) { - this.#view.setUint32(16, Number(value), LE); - } - get flags() { - return this.#view.getUint32(20, LE); - } - set flags(value) { - this.#view.setUint32(20, Number(value), LE); - } - get instanceCount() { - return this.#view.getUint32(24, LE); - } - set instanceCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get geometryCount() { - return this.#view.getUint32(28, LE); - } - set geometryCount(value) { - this.#view.setUint32(28, Number(value), LE); - } - get pGeometries() { - return this.#view.getBigUint64(32, LE); - } - set pGeometries(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class AccelerationStructureCreateInfoNV { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.compactedSize && (this.compactedSize = data.compactedSize), void 0 !== data.info && (this.info = data.info); - this.sType = StructureType.ACCELERATION_STRUCTURE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get compactedSize() { - return this.#view.getBigUint64(16, LE); - } - set compactedSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get info() { - return new AccelerationStructureInfoNV(this.#data.subarray(24, 24 + AccelerationStructureInfoNV.size)); - } - set info(value) { - if (value[BUFFER].byteLength < AccelerationStructureInfoNV.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } -} -export class BindAccelerationStructureMemoryInfoNV { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindAccelerationStructureMemoryInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindAccelerationStructureMemoryInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindAccelerationStructureMemoryInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindAccelerationStructureMemoryInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.accelerationStructure && (this.accelerationStructure = data.accelerationStructure), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.memoryOffset && (this.memoryOffset = data.memoryOffset), void 0 !== data.deviceIndexCount && (this.deviceIndexCount = data.deviceIndexCount), void 0 !== data.pDeviceIndices && (this.pDeviceIndices = data.pDeviceIndices); - this.sType = StructureType.BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get accelerationStructure() { - return this.#view.getBigUint64(16, LE); - } - set accelerationStructure(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(24, LE); - } - set memory(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get memoryOffset() { - return this.#view.getBigUint64(32, LE); - } - set memoryOffset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get deviceIndexCount() { - return this.#view.getUint32(40, LE); - } - set deviceIndexCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pDeviceIndices() { - return this.#view.getBigUint64(48, LE); - } - set pDeviceIndices(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class WriteDescriptorSetAccelerationStructureKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSetAccelerationStructureKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < WriteDescriptorSetAccelerationStructureKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.accelerationStructureCount && (this.accelerationStructureCount = data.accelerationStructureCount), void 0 !== data.pAccelerationStructures && (this.pAccelerationStructures = data.pAccelerationStructures); - this.sType = StructureType.WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get accelerationStructureCount() { - return this.#view.getUint32(16, LE); - } - set accelerationStructureCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pAccelerationStructures() { - return this.#view.getBigUint64(24, LE); - } - set pAccelerationStructures(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class WriteDescriptorSetAccelerationStructureNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSetAccelerationStructureNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < WriteDescriptorSetAccelerationStructureNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.accelerationStructureCount && (this.accelerationStructureCount = data.accelerationStructureCount), void 0 !== data.pAccelerationStructures && (this.pAccelerationStructures = data.pAccelerationStructures); - this.sType = StructureType.WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get accelerationStructureCount() { - return this.#view.getUint32(16, LE); - } - set accelerationStructureCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pAccelerationStructures() { - return this.#view.getBigUint64(24, LE); - } - set pAccelerationStructures(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class AccelerationStructureMemoryRequirementsInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureMemoryRequirementsInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMemoryRequirementsInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureMemoryRequirementsInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureMemoryRequirementsInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.type && (this.type = data.type), void 0 !== data.accelerationStructure && (this.accelerationStructure = data.accelerationStructure); - this.sType = StructureType.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get type() { - return this.#view.getUint32(16, LE); - } - set type(value) { - this.#view.setUint32(16, Number(value), LE); - } - get accelerationStructure() { - return this.#view.getBigUint64(24, LE); - } - set accelerationStructure(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceAccelerationStructureFeaturesKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceAccelerationStructureFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAccelerationStructureFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAccelerationStructureFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceAccelerationStructureFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.accelerationStructure && (this.accelerationStructure = data.accelerationStructure), void 0 !== data.accelerationStructureCaptureReplay && (this.accelerationStructureCaptureReplay = data.accelerationStructureCaptureReplay), void 0 !== data.accelerationStructureIndirectBuild && (this.accelerationStructureIndirectBuild = data.accelerationStructureIndirectBuild), void 0 !== data.accelerationStructureHostCommands && (this.accelerationStructureHostCommands = data.accelerationStructureHostCommands), void 0 !== data.descriptorBindingAccelerationStructureUpdateAfterBind && (this.descriptorBindingAccelerationStructureUpdateAfterBind = data.descriptorBindingAccelerationStructureUpdateAfterBind); - this.sType = StructureType.PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get accelerationStructure() { - return this.#view.getUint32(16, LE); - } - set accelerationStructure(value) { - this.#view.setUint32(16, Number(value), LE); - } - get accelerationStructureCaptureReplay() { - return this.#view.getUint32(20, LE); - } - set accelerationStructureCaptureReplay(value) { - this.#view.setUint32(20, Number(value), LE); - } - get accelerationStructureIndirectBuild() { - return this.#view.getUint32(24, LE); - } - set accelerationStructureIndirectBuild(value) { - this.#view.setUint32(24, Number(value), LE); - } - get accelerationStructureHostCommands() { - return this.#view.getUint32(28, LE); - } - set accelerationStructureHostCommands(value) { - this.#view.setUint32(28, Number(value), LE); - } - get descriptorBindingAccelerationStructureUpdateAfterBind() { - return this.#view.getUint32(32, LE); - } - set descriptorBindingAccelerationStructureUpdateAfterBind(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class PhysicalDeviceRayTracingPipelineFeaturesKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelineFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingPipelineFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingPipelineFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelineFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.rayTracingPipeline && (this.rayTracingPipeline = data.rayTracingPipeline), void 0 !== data.rayTracingPipelineShaderGroupHandleCaptureReplay && (this.rayTracingPipelineShaderGroupHandleCaptureReplay = data.rayTracingPipelineShaderGroupHandleCaptureReplay), void 0 !== data.rayTracingPipelineShaderGroupHandleCaptureReplayMixed && (this.rayTracingPipelineShaderGroupHandleCaptureReplayMixed = data.rayTracingPipelineShaderGroupHandleCaptureReplayMixed), void 0 !== data.rayTracingPipelineTraceRaysIndirect && (this.rayTracingPipelineTraceRaysIndirect = data.rayTracingPipelineTraceRaysIndirect), void 0 !== data.rayTraversalPrimitiveCulling && (this.rayTraversalPrimitiveCulling = data.rayTraversalPrimitiveCulling); - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get rayTracingPipeline() { - return this.#view.getUint32(16, LE); - } - set rayTracingPipeline(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rayTracingPipelineShaderGroupHandleCaptureReplay() { - return this.#view.getUint32(20, LE); - } - set rayTracingPipelineShaderGroupHandleCaptureReplay(value) { - this.#view.setUint32(20, Number(value), LE); - } - get rayTracingPipelineShaderGroupHandleCaptureReplayMixed() { - return this.#view.getUint32(24, LE); - } - set rayTracingPipelineShaderGroupHandleCaptureReplayMixed(value) { - this.#view.setUint32(24, Number(value), LE); - } - get rayTracingPipelineTraceRaysIndirect() { - return this.#view.getUint32(28, LE); - } - set rayTracingPipelineTraceRaysIndirect(value) { - this.#view.setUint32(28, Number(value), LE); - } - get rayTraversalPrimitiveCulling() { - return this.#view.getUint32(32, LE); - } - set rayTraversalPrimitiveCulling(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class PhysicalDeviceRayQueryFeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRayQueryFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayQueryFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayQueryFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRayQueryFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.rayQuery && (this.rayQuery = data.rayQuery); - this.sType = StructureType.PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get rayQuery() { - return this.#view.getUint32(16, LE); - } - set rayQuery(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceAccelerationStructurePropertiesKHR { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceAccelerationStructurePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAccelerationStructurePropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAccelerationStructurePropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceAccelerationStructurePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxGeometryCount && (this.maxGeometryCount = data.maxGeometryCount), void 0 !== data.maxInstanceCount && (this.maxInstanceCount = data.maxInstanceCount), void 0 !== data.maxPrimitiveCount && (this.maxPrimitiveCount = data.maxPrimitiveCount), void 0 !== data.maxPerStageDescriptorAccelerationStructures && (this.maxPerStageDescriptorAccelerationStructures = data.maxPerStageDescriptorAccelerationStructures), void 0 !== data.maxPerStageDescriptorUpdateAfterBindAccelerationStructures && (this.maxPerStageDescriptorUpdateAfterBindAccelerationStructures = data.maxPerStageDescriptorUpdateAfterBindAccelerationStructures), void 0 !== data.maxDescriptorSetAccelerationStructures && (this.maxDescriptorSetAccelerationStructures = data.maxDescriptorSetAccelerationStructures), void 0 !== data.maxDescriptorSetUpdateAfterBindAccelerationStructures && (this.maxDescriptorSetUpdateAfterBindAccelerationStructures = data.maxDescriptorSetUpdateAfterBindAccelerationStructures), void 0 !== data.minAccelerationStructureScratchOffsetAlignment && (this.minAccelerationStructureScratchOffsetAlignment = data.minAccelerationStructureScratchOffsetAlignment); - this.sType = StructureType.PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxGeometryCount() { - return this.#view.getBigUint64(16, LE); - } - set maxGeometryCount(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get maxInstanceCount() { - return this.#view.getBigUint64(24, LE); - } - set maxInstanceCount(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get maxPrimitiveCount() { - return this.#view.getBigUint64(32, LE); - } - set maxPrimitiveCount(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get maxPerStageDescriptorAccelerationStructures() { - return this.#view.getUint32(40, LE); - } - set maxPerStageDescriptorAccelerationStructures(value) { - this.#view.setUint32(40, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindAccelerationStructures() { - return this.#view.getUint32(44, LE); - } - set maxPerStageDescriptorUpdateAfterBindAccelerationStructures(value) { - this.#view.setUint32(44, Number(value), LE); - } - get maxDescriptorSetAccelerationStructures() { - return this.#view.getUint32(48, LE); - } - set maxDescriptorSetAccelerationStructures(value) { - this.#view.setUint32(48, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindAccelerationStructures() { - return this.#view.getUint32(52, LE); - } - set maxDescriptorSetUpdateAfterBindAccelerationStructures(value) { - this.#view.setUint32(52, Number(value), LE); - } - get minAccelerationStructureScratchOffsetAlignment() { - return this.#view.getUint32(56, LE); - } - set minAccelerationStructureScratchOffsetAlignment(value) { - this.#view.setUint32(56, Number(value), LE); - } -} -export class PhysicalDeviceRayTracingPipelinePropertiesKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelinePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingPipelinePropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingPipelinePropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelinePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderGroupHandleSize && (this.shaderGroupHandleSize = data.shaderGroupHandleSize), void 0 !== data.maxRayRecursionDepth && (this.maxRayRecursionDepth = data.maxRayRecursionDepth), void 0 !== data.maxShaderGroupStride && (this.maxShaderGroupStride = data.maxShaderGroupStride), void 0 !== data.shaderGroupBaseAlignment && (this.shaderGroupBaseAlignment = data.shaderGroupBaseAlignment), void 0 !== data.shaderGroupHandleCaptureReplaySize && (this.shaderGroupHandleCaptureReplaySize = data.shaderGroupHandleCaptureReplaySize), void 0 !== data.maxRayDispatchInvocationCount && (this.maxRayDispatchInvocationCount = data.maxRayDispatchInvocationCount), void 0 !== data.shaderGroupHandleAlignment && (this.shaderGroupHandleAlignment = data.shaderGroupHandleAlignment), void 0 !== data.maxRayHitAttributeSize && (this.maxRayHitAttributeSize = data.maxRayHitAttributeSize); - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderGroupHandleSize() { - return this.#view.getUint32(16, LE); - } - set shaderGroupHandleSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxRayRecursionDepth() { - return this.#view.getUint32(20, LE); - } - set maxRayRecursionDepth(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxShaderGroupStride() { - return this.#view.getUint32(24, LE); - } - set maxShaderGroupStride(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shaderGroupBaseAlignment() { - return this.#view.getUint32(28, LE); - } - set shaderGroupBaseAlignment(value) { - this.#view.setUint32(28, Number(value), LE); - } - get shaderGroupHandleCaptureReplaySize() { - return this.#view.getUint32(32, LE); - } - set shaderGroupHandleCaptureReplaySize(value) { - this.#view.setUint32(32, Number(value), LE); - } - get maxRayDispatchInvocationCount() { - return this.#view.getUint32(36, LE); - } - set maxRayDispatchInvocationCount(value) { - this.#view.setUint32(36, Number(value), LE); - } - get shaderGroupHandleAlignment() { - return this.#view.getUint32(40, LE); - } - set shaderGroupHandleAlignment(value) { - this.#view.setUint32(40, Number(value), LE); - } - get maxRayHitAttributeSize() { - return this.#view.getUint32(44, LE); - } - set maxRayHitAttributeSize(value) { - this.#view.setUint32(44, Number(value), LE); - } -} -export class PhysicalDeviceRayTracingPropertiesNV { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRayTracingPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRayTracingPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderGroupHandleSize && (this.shaderGroupHandleSize = data.shaderGroupHandleSize), void 0 !== data.maxRecursionDepth && (this.maxRecursionDepth = data.maxRecursionDepth), void 0 !== data.maxShaderGroupStride && (this.maxShaderGroupStride = data.maxShaderGroupStride), void 0 !== data.shaderGroupBaseAlignment && (this.shaderGroupBaseAlignment = data.shaderGroupBaseAlignment), void 0 !== data.maxGeometryCount && (this.maxGeometryCount = data.maxGeometryCount), void 0 !== data.maxInstanceCount && (this.maxInstanceCount = data.maxInstanceCount), void 0 !== data.maxTriangleCount && (this.maxTriangleCount = data.maxTriangleCount), void 0 !== data.maxDescriptorSetAccelerationStructures && (this.maxDescriptorSetAccelerationStructures = data.maxDescriptorSetAccelerationStructures); - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderGroupHandleSize() { - return this.#view.getUint32(16, LE); - } - set shaderGroupHandleSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxRecursionDepth() { - return this.#view.getUint32(20, LE); - } - set maxRecursionDepth(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxShaderGroupStride() { - return this.#view.getUint32(24, LE); - } - set maxShaderGroupStride(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shaderGroupBaseAlignment() { - return this.#view.getUint32(28, LE); - } - set shaderGroupBaseAlignment(value) { - this.#view.setUint32(28, Number(value), LE); - } - get maxGeometryCount() { - return this.#view.getBigUint64(32, LE); - } - set maxGeometryCount(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get maxInstanceCount() { - return this.#view.getBigUint64(40, LE); - } - set maxInstanceCount(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get maxTriangleCount() { - return this.#view.getBigUint64(48, LE); - } - set maxTriangleCount(value) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - get maxDescriptorSetAccelerationStructures() { - return this.#view.getUint32(56, LE); - } - set maxDescriptorSetAccelerationStructures(value) { - this.#view.setUint32(56, Number(value), LE); - } -} -export class StridedDeviceAddressRegionKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(StridedDeviceAddressRegionKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StridedDeviceAddressRegionKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < StridedDeviceAddressRegionKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(StridedDeviceAddressRegionKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.deviceAddress && (this.deviceAddress = data.deviceAddress), void 0 !== data.stride && (this.stride = data.stride), void 0 !== data.size && (this.size = data.size); - } - get deviceAddress() { - return this.#view.getBigUint64(0, LE); - } - set deviceAddress(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get stride() { - return this.#view.getBigUint64(8, LE); - } - set stride(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(16, LE); - } - set size(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class TraceRaysIndirectCommandKHR { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(TraceRaysIndirectCommandKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TraceRaysIndirectCommandKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < TraceRaysIndirectCommandKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(TraceRaysIndirectCommandKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.width && (this.width = data.width), void 0 !== data.height && (this.height = data.height), void 0 !== data.depth && (this.depth = data.depth); - } - get width() { - return this.#view.getUint32(0, LE); - } - set width(value) { - this.#view.setUint32(0, Number(value), LE); - } - get height() { - return this.#view.getUint32(4, LE); - } - set height(value) { - this.#view.setUint32(4, Number(value), LE); - } - get depth() { - return this.#view.getUint32(8, LE); - } - set depth(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class TraceRaysIndirectCommand2KHR { - static size = 104; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(TraceRaysIndirectCommand2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TraceRaysIndirectCommand2KHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < TraceRaysIndirectCommand2KHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(TraceRaysIndirectCommand2KHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.raygenShaderRecordAddress && (this.raygenShaderRecordAddress = data.raygenShaderRecordAddress), void 0 !== data.raygenShaderRecordSize && (this.raygenShaderRecordSize = data.raygenShaderRecordSize), void 0 !== data.missShaderBindingTableAddress && (this.missShaderBindingTableAddress = data.missShaderBindingTableAddress), void 0 !== data.missShaderBindingTableSize && (this.missShaderBindingTableSize = data.missShaderBindingTableSize), void 0 !== data.missShaderBindingTableStride && (this.missShaderBindingTableStride = data.missShaderBindingTableStride), void 0 !== data.hitShaderBindingTableAddress && (this.hitShaderBindingTableAddress = data.hitShaderBindingTableAddress), void 0 !== data.hitShaderBindingTableSize && (this.hitShaderBindingTableSize = data.hitShaderBindingTableSize), void 0 !== data.hitShaderBindingTableStride && (this.hitShaderBindingTableStride = data.hitShaderBindingTableStride), void 0 !== data.callableShaderBindingTableAddress && (this.callableShaderBindingTableAddress = data.callableShaderBindingTableAddress), void 0 !== data.callableShaderBindingTableSize && (this.callableShaderBindingTableSize = data.callableShaderBindingTableSize), void 0 !== data.callableShaderBindingTableStride && (this.callableShaderBindingTableStride = data.callableShaderBindingTableStride), void 0 !== data.width && (this.width = data.width), void 0 !== data.height && (this.height = data.height), void 0 !== data.depth && (this.depth = data.depth); - } - get raygenShaderRecordAddress() { - return this.#view.getBigUint64(0, LE); - } - set raygenShaderRecordAddress(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get raygenShaderRecordSize() { - return this.#view.getBigUint64(8, LE); - } - set raygenShaderRecordSize(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get missShaderBindingTableAddress() { - return this.#view.getBigUint64(16, LE); - } - set missShaderBindingTableAddress(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get missShaderBindingTableSize() { - return this.#view.getBigUint64(24, LE); - } - set missShaderBindingTableSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get missShaderBindingTableStride() { - return this.#view.getBigUint64(32, LE); - } - set missShaderBindingTableStride(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get hitShaderBindingTableAddress() { - return this.#view.getBigUint64(40, LE); - } - set hitShaderBindingTableAddress(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get hitShaderBindingTableSize() { - return this.#view.getBigUint64(48, LE); - } - set hitShaderBindingTableSize(value) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - get hitShaderBindingTableStride() { - return this.#view.getBigUint64(56, LE); - } - set hitShaderBindingTableStride(value) { - this.#view.setBigUint64(56, BigInt(value), LE); - } - get callableShaderBindingTableAddress() { - return this.#view.getBigUint64(64, LE); - } - set callableShaderBindingTableAddress(value) { - this.#view.setBigUint64(64, BigInt(value), LE); - } - get callableShaderBindingTableSize() { - return this.#view.getBigUint64(72, LE); - } - set callableShaderBindingTableSize(value) { - this.#view.setBigUint64(72, BigInt(value), LE); - } - get callableShaderBindingTableStride() { - return this.#view.getBigUint64(80, LE); - } - set callableShaderBindingTableStride(value) { - this.#view.setBigUint64(80, BigInt(value), LE); - } - get width() { - return this.#view.getUint32(88, LE); - } - set width(value) { - this.#view.setUint32(88, Number(value), LE); - } - get height() { - return this.#view.getUint32(92, LE); - } - set height(value) { - this.#view.setUint32(92, Number(value), LE); - } - get depth() { - return this.#view.getUint32(96, LE); - } - set depth(value) { - this.#view.setUint32(96, Number(value), LE); - } -} -export class PhysicalDeviceRayTracingMaintenance1FeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.rayTracingMaintenance1 && (this.rayTracingMaintenance1 = data.rayTracingMaintenance1), void 0 !== data.rayTracingPipelineTraceRaysIndirect2 && (this.rayTracingPipelineTraceRaysIndirect2 = data.rayTracingPipelineTraceRaysIndirect2); - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get rayTracingMaintenance1() { - return this.#view.getUint32(16, LE); - } - set rayTracingMaintenance1(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rayTracingPipelineTraceRaysIndirect2() { - return this.#view.getUint32(20, LE); - } - set rayTracingPipelineTraceRaysIndirect2(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class DrmFormatModifierPropertiesListEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DrmFormatModifierPropertiesListEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierPropertiesListEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DrmFormatModifierPropertiesListEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DrmFormatModifierPropertiesListEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.drmFormatModifierCount && (this.drmFormatModifierCount = data.drmFormatModifierCount), void 0 !== data.pDrmFormatModifierProperties && (this.pDrmFormatModifierProperties = data.pDrmFormatModifierProperties); - this.sType = StructureType.DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get drmFormatModifierCount() { - return this.#view.getUint32(16, LE); - } - set drmFormatModifierCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pDrmFormatModifierProperties() { - return this.#view.getBigUint64(24, LE); - } - set pDrmFormatModifierProperties(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class DrmFormatModifierPropertiesEXT { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DrmFormatModifierPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DrmFormatModifierPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DrmFormatModifierPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.drmFormatModifier && (this.drmFormatModifier = data.drmFormatModifier), void 0 !== data.drmFormatModifierPlaneCount && (this.drmFormatModifierPlaneCount = data.drmFormatModifierPlaneCount), void 0 !== data.drmFormatModifierTilingFeatures && (this.drmFormatModifierTilingFeatures = data.drmFormatModifierTilingFeatures); - } - get drmFormatModifier() { - return this.#view.getBigUint64(0, LE); - } - set drmFormatModifier(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get drmFormatModifierPlaneCount() { - return this.#view.getUint32(8, LE); - } - set drmFormatModifierPlaneCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get drmFormatModifierTilingFeatures() { - return this.#view.getUint32(12, LE); - } - set drmFormatModifierTilingFeatures(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class PhysicalDeviceImageDrmFormatModifierInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImageDrmFormatModifierInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageDrmFormatModifierInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageDrmFormatModifierInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImageDrmFormatModifierInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.drmFormatModifier && (this.drmFormatModifier = data.drmFormatModifier), void 0 !== data.sharingMode && (this.sharingMode = data.sharingMode), void 0 !== data.queueFamilyIndexCount && (this.queueFamilyIndexCount = data.queueFamilyIndexCount), void 0 !== data.pQueueFamilyIndices && (this.pQueueFamilyIndices = data.pQueueFamilyIndices); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get drmFormatModifier() { - return this.#view.getBigUint64(16, LE); - } - set drmFormatModifier(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get sharingMode() { - return this.#view.getUint32(24, LE); - } - set sharingMode(value) { - this.#view.setUint32(24, Number(value), LE); - } - get queueFamilyIndexCount() { - return this.#view.getUint32(28, LE); - } - set queueFamilyIndexCount(value) { - this.#view.setUint32(28, Number(value), LE); - } - get pQueueFamilyIndices() { - return this.#view.getBigUint64(32, LE); - } - set pQueueFamilyIndices(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ImageDrmFormatModifierListCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageDrmFormatModifierListCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageDrmFormatModifierListCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageDrmFormatModifierListCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageDrmFormatModifierListCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.drmFormatModifierCount && (this.drmFormatModifierCount = data.drmFormatModifierCount), void 0 !== data.pDrmFormatModifiers && (this.pDrmFormatModifiers = data.pDrmFormatModifiers); - this.sType = StructureType.IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get drmFormatModifierCount() { - return this.#view.getUint32(16, LE); - } - set drmFormatModifierCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pDrmFormatModifiers() { - return this.#view.getBigUint64(24, LE); - } - set pDrmFormatModifiers(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ImageDrmFormatModifierExplicitCreateInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageDrmFormatModifierExplicitCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageDrmFormatModifierExplicitCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageDrmFormatModifierExplicitCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageDrmFormatModifierExplicitCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.drmFormatModifier && (this.drmFormatModifier = data.drmFormatModifier), void 0 !== data.drmFormatModifierPlaneCount && (this.drmFormatModifierPlaneCount = data.drmFormatModifierPlaneCount), void 0 !== data.pPlaneLayouts && (this.pPlaneLayouts = data.pPlaneLayouts); - this.sType = StructureType.IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get drmFormatModifier() { - return this.#view.getBigUint64(16, LE); - } - set drmFormatModifier(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get drmFormatModifierPlaneCount() { - return this.#view.getUint32(24, LE); - } - set drmFormatModifierPlaneCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pPlaneLayouts() { - return this.#view.getBigUint64(32, LE); - } - set pPlaneLayouts(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ImageDrmFormatModifierPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageDrmFormatModifierPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageDrmFormatModifierPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageDrmFormatModifierPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageDrmFormatModifierPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.drmFormatModifier && (this.drmFormatModifier = data.drmFormatModifier); - this.sType = StructureType.IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get drmFormatModifier() { - return this.#view.getBigUint64(16, LE); - } - set drmFormatModifier(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class ImageStencilUsageCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageStencilUsageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageStencilUsageCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageStencilUsageCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageStencilUsageCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stencilUsage && (this.stencilUsage = data.stencilUsage); - this.sType = StructureType.IMAGE_STENCIL_USAGE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stencilUsage() { - return this.#view.getUint32(16, LE); - } - set stencilUsage(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DeviceMemoryOverallocationCreateInfoAMD { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceMemoryOverallocationCreateInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceMemoryOverallocationCreateInfoAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceMemoryOverallocationCreateInfoAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceMemoryOverallocationCreateInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.overallocationBehavior && (this.overallocationBehavior = data.overallocationBehavior); - this.sType = StructureType.DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get overallocationBehavior() { - return this.#view.getUint32(16, LE); - } - set overallocationBehavior(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceFragmentDensityMapFeaturesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMapFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentDensityMap && (this.fragmentDensityMap = data.fragmentDensityMap), void 0 !== data.fragmentDensityMapDynamic && (this.fragmentDensityMapDynamic = data.fragmentDensityMapDynamic), void 0 !== data.fragmentDensityMapNonSubsampledImages && (this.fragmentDensityMapNonSubsampledImages = data.fragmentDensityMapNonSubsampledImages); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentDensityMap() { - return this.#view.getUint32(16, LE); - } - set fragmentDensityMap(value) { - this.#view.setUint32(16, Number(value), LE); - } - get fragmentDensityMapDynamic() { - return this.#view.getUint32(20, LE); - } - set fragmentDensityMapDynamic(value) { - this.#view.setUint32(20, Number(value), LE); - } - get fragmentDensityMapNonSubsampledImages() { - return this.#view.getUint32(24, LE); - } - set fragmentDensityMapNonSubsampledImages(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceFragmentDensityMap2FeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMap2FeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMap2FeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentDensityMapDeferred && (this.fragmentDensityMapDeferred = data.fragmentDensityMapDeferred); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentDensityMapDeferred() { - return this.#view.getUint32(16, LE); - } - set fragmentDensityMapDeferred(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentDensityMapOffset && (this.fragmentDensityMapOffset = data.fragmentDensityMapOffset); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentDensityMapOffset() { - return this.#view.getUint32(16, LE); - } - set fragmentDensityMapOffset(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceFragmentDensityMapPropertiesEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMapPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minFragmentDensityTexelSize && (this.minFragmentDensityTexelSize = data.minFragmentDensityTexelSize), void 0 !== data.maxFragmentDensityTexelSize && (this.maxFragmentDensityTexelSize = data.maxFragmentDensityTexelSize), void 0 !== data.fragmentDensityInvocations && (this.fragmentDensityInvocations = data.fragmentDensityInvocations); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minFragmentDensityTexelSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - set minFragmentDensityTexelSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get maxFragmentDensityTexelSize() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - set maxFragmentDensityTexelSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get fragmentDensityInvocations() { - return this.#view.getUint32(32, LE); - } - set fragmentDensityInvocations(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class PhysicalDeviceFragmentDensityMap2PropertiesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2PropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMap2PropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMap2PropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2PropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.subsampledLoads && (this.subsampledLoads = data.subsampledLoads), void 0 !== data.subsampledCoarseReconstructionEarlyAccess && (this.subsampledCoarseReconstructionEarlyAccess = data.subsampledCoarseReconstructionEarlyAccess), void 0 !== data.maxSubsampledArrayLayers && (this.maxSubsampledArrayLayers = data.maxSubsampledArrayLayers), void 0 !== data.maxDescriptorSetSubsampledSamplers && (this.maxDescriptorSetSubsampledSamplers = data.maxDescriptorSetSubsampledSamplers); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get subsampledLoads() { - return this.#view.getUint32(16, LE); - } - set subsampledLoads(value) { - this.#view.setUint32(16, Number(value), LE); - } - get subsampledCoarseReconstructionEarlyAccess() { - return this.#view.getUint32(20, LE); - } - set subsampledCoarseReconstructionEarlyAccess(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxSubsampledArrayLayers() { - return this.#view.getUint32(24, LE); - } - set maxSubsampledArrayLayers(value) { - this.#view.setUint32(24, Number(value), LE); - } - get maxDescriptorSetSubsampledSamplers() { - return this.#view.getUint32(28, LE); - } - set maxDescriptorSetSubsampledSamplers(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentDensityOffsetGranularity && (this.fragmentDensityOffsetGranularity = data.fragmentDensityOffsetGranularity); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentDensityOffsetGranularity() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - set fragmentDensityOffsetGranularity(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class RenderPassFragmentDensityMapCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassFragmentDensityMapCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassFragmentDensityMapCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassFragmentDensityMapCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassFragmentDensityMapCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentDensityMapAttachment && (this.fragmentDensityMapAttachment = data.fragmentDensityMapAttachment); - this.sType = StructureType.RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentDensityMapAttachment() { - return new AttachmentReference(this.#data.subarray(16, 16 + AttachmentReference.size)); - } - set fragmentDensityMapAttachment(value) { - if (value[BUFFER].byteLength < AttachmentReference.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class SubpassFragmentDensityMapOffsetEndInfoQCOM { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassFragmentDensityMapOffsetEndInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassFragmentDensityMapOffsetEndInfoQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassFragmentDensityMapOffsetEndInfoQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassFragmentDensityMapOffsetEndInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentDensityOffsetCount && (this.fragmentDensityOffsetCount = data.fragmentDensityOffsetCount), void 0 !== data.pFragmentDensityOffsets && (this.pFragmentDensityOffsets = data.pFragmentDensityOffsets); - this.sType = StructureType.SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentDensityOffsetCount() { - return this.#view.getUint32(16, LE); - } - set fragmentDensityOffsetCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pFragmentDensityOffsets() { - return this.#view.getBigUint64(24, LE); - } - set pFragmentDensityOffsets(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceScalarBlockLayoutFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceScalarBlockLayoutFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceScalarBlockLayoutFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceScalarBlockLayoutFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceScalarBlockLayoutFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.scalarBlockLayout && (this.scalarBlockLayout = data.scalarBlockLayout); - this.sType = StructureType.PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get scalarBlockLayout() { - return this.#view.getUint32(16, LE); - } - set scalarBlockLayout(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SurfaceProtectedCapabilitiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceProtectedCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceProtectedCapabilitiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceProtectedCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceProtectedCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.supportsProtected && (this.supportsProtected = data.supportsProtected); - this.sType = StructureType.SURFACE_PROTECTED_CAPABILITIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get supportsProtected() { - return this.#view.getUint32(16, LE); - } - set supportsProtected(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceUniformBufferStandardLayoutFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceUniformBufferStandardLayoutFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceUniformBufferStandardLayoutFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceUniformBufferStandardLayoutFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceUniformBufferStandardLayoutFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.uniformBufferStandardLayout && (this.uniformBufferStandardLayout = data.uniformBufferStandardLayout); - this.sType = StructureType.PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get uniformBufferStandardLayout() { - return this.#view.getUint32(16, LE); - } - set uniformBufferStandardLayout(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceDepthClipEnableFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDepthClipEnableFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthClipEnableFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDepthClipEnableFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDepthClipEnableFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.depthClipEnable && (this.depthClipEnable = data.depthClipEnable); - this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get depthClipEnable() { - return this.#view.getUint32(16, LE); - } - set depthClipEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineRasterizationDepthClipStateCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRasterizationDepthClipStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationDepthClipStateCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationDepthClipStateCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRasterizationDepthClipStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.depthClipEnable && (this.depthClipEnable = data.depthClipEnable); - this.sType = StructureType.PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get depthClipEnable() { - return this.#view.getUint32(20, LE); - } - set depthClipEnable(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceMemoryBudgetPropertiesEXT { - static size = 272; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMemoryBudgetPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryBudgetPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryBudgetPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMemoryBudgetPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.heapBudget && (this.heapBudget = data.heapBudget), void 0 !== data.heapUsage && (this.heapUsage = data.heapUsage); - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get heapBudget() { - return new BigUint64Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - set heapBudget(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - get heapUsage() { - return new BigUint64Array(this.#data.buffer, this.#data.byteOffset + 144, 16); - } - set heapUsage(value) { - this.#data.set(new Uint8Array(value.buffer), 144); - } -} -export class PhysicalDeviceMemoryPriorityFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMemoryPriorityFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryPriorityFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryPriorityFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMemoryPriorityFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryPriority && (this.memoryPriority = data.memoryPriority); - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryPriority() { - return this.#view.getUint32(16, LE); - } - set memoryPriority(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MemoryPriorityAllocateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryPriorityAllocateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryPriorityAllocateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryPriorityAllocateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryPriorityAllocateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.priority && (this.priority = data.priority); - this.sType = StructureType.MEMORY_PRIORITY_ALLOCATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get priority() { - return this.#view.getFloat32(16, LE); - } - set priority(value) { - this.#view.setFloat32(16, Number(value), LE); - } -} -export class PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pageableDeviceLocalMemory && (this.pageableDeviceLocalMemory = data.pageableDeviceLocalMemory); - this.sType = StructureType.PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pageableDeviceLocalMemory() { - return this.#view.getUint32(16, LE); - } - set pageableDeviceLocalMemory(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceBufferDeviceAddressFeatures { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBufferDeviceAddressFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBufferDeviceAddressFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.bufferDeviceAddress && (this.bufferDeviceAddress = data.bufferDeviceAddress), void 0 !== data.bufferDeviceAddressCaptureReplay && (this.bufferDeviceAddressCaptureReplay = data.bufferDeviceAddressCaptureReplay), void 0 !== data.bufferDeviceAddressMultiDevice && (this.bufferDeviceAddressMultiDevice = data.bufferDeviceAddressMultiDevice); - this.sType = StructureType.PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get bufferDeviceAddress() { - return this.#view.getUint32(16, LE); - } - set bufferDeviceAddress(value) { - this.#view.setUint32(16, Number(value), LE); - } - get bufferDeviceAddressCaptureReplay() { - return this.#view.getUint32(20, LE); - } - set bufferDeviceAddressCaptureReplay(value) { - this.#view.setUint32(20, Number(value), LE); - } - get bufferDeviceAddressMultiDevice() { - return this.#view.getUint32(24, LE); - } - set bufferDeviceAddressMultiDevice(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceBufferDeviceAddressFeaturesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBufferDeviceAddressFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBufferDeviceAddressFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.bufferDeviceAddress && (this.bufferDeviceAddress = data.bufferDeviceAddress), void 0 !== data.bufferDeviceAddressCaptureReplay && (this.bufferDeviceAddressCaptureReplay = data.bufferDeviceAddressCaptureReplay), void 0 !== data.bufferDeviceAddressMultiDevice && (this.bufferDeviceAddressMultiDevice = data.bufferDeviceAddressMultiDevice); - this.sType = StructureType.PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get bufferDeviceAddress() { - return this.#view.getUint32(16, LE); - } - set bufferDeviceAddress(value) { - this.#view.setUint32(16, Number(value), LE); - } - get bufferDeviceAddressCaptureReplay() { - return this.#view.getUint32(20, LE); - } - set bufferDeviceAddressCaptureReplay(value) { - this.#view.setUint32(20, Number(value), LE); - } - get bufferDeviceAddressMultiDevice() { - return this.#view.getUint32(24, LE); - } - set bufferDeviceAddressMultiDevice(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class BufferDeviceAddressInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferDeviceAddressInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferDeviceAddressInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferDeviceAddressInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferDeviceAddressInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.buffer && (this.buffer = data.buffer); - this.sType = StructureType.BUFFER_DEVICE_ADDRESS_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get buffer() { - return this.#view.getBigUint64(16, LE); - } - set buffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class BufferOpaqueCaptureAddressCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferOpaqueCaptureAddressCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferOpaqueCaptureAddressCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferOpaqueCaptureAddressCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferOpaqueCaptureAddressCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.opaqueCaptureAddress && (this.opaqueCaptureAddress = data.opaqueCaptureAddress); - this.sType = StructureType.BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get opaqueCaptureAddress() { - return this.#view.getBigUint64(16, LE); - } - set opaqueCaptureAddress(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class BufferDeviceAddressCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferDeviceAddressCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferDeviceAddressCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferDeviceAddressCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferDeviceAddressCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceAddress && (this.deviceAddress = data.deviceAddress); - this.sType = StructureType.BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceAddress() { - return this.#view.getBigUint64(16, LE); - } - set deviceAddress(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class PhysicalDeviceImageViewImageFormatInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImageViewImageFormatInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageViewImageFormatInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageViewImageFormatInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImageViewImageFormatInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageViewType && (this.imageViewType = data.imageViewType); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageViewType() { - return this.#view.getUint32(16, LE); - } - set imageViewType(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class FilterCubicImageViewImageFormatPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FilterCubicImageViewImageFormatPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FilterCubicImageViewImageFormatPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FilterCubicImageViewImageFormatPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FilterCubicImageViewImageFormatPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.filterCubic && (this.filterCubic = data.filterCubic), void 0 !== data.filterCubicMinmax && (this.filterCubicMinmax = data.filterCubicMinmax); - this.sType = StructureType.FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get filterCubic() { - return this.#view.getUint32(16, LE); - } - set filterCubic(value) { - this.#view.setUint32(16, Number(value), LE); - } - get filterCubicMinmax() { - return this.#view.getUint32(20, LE); - } - set filterCubicMinmax(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceImagelessFramebufferFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImagelessFramebufferFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImagelessFramebufferFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImagelessFramebufferFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImagelessFramebufferFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imagelessFramebuffer && (this.imagelessFramebuffer = data.imagelessFramebuffer); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imagelessFramebuffer() { - return this.#view.getUint32(16, LE); - } - set imagelessFramebuffer(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class FramebufferAttachmentsCreateInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FramebufferAttachmentsCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferAttachmentsCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FramebufferAttachmentsCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FramebufferAttachmentsCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.attachmentImageInfoCount && (this.attachmentImageInfoCount = data.attachmentImageInfoCount), void 0 !== data.pAttachmentImageInfos && (this.pAttachmentImageInfos = data.pAttachmentImageInfos); - this.sType = StructureType.FRAMEBUFFER_ATTACHMENTS_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get attachmentImageInfoCount() { - return this.#view.getUint32(16, LE); - } - set attachmentImageInfoCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pAttachmentImageInfos() { - return this.#view.getBigUint64(24, LE); - } - set pAttachmentImageInfos(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class FramebufferAttachmentImageInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FramebufferAttachmentImageInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferAttachmentImageInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FramebufferAttachmentImageInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FramebufferAttachmentImageInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.usage && (this.usage = data.usage), void 0 !== data.width && (this.width = data.width), void 0 !== data.height && (this.height = data.height), void 0 !== data.layerCount && (this.layerCount = data.layerCount), void 0 !== data.viewFormatCount && (this.viewFormatCount = data.viewFormatCount), void 0 !== data.pViewFormats && (this.pViewFormats = data.pViewFormats); - this.sType = StructureType.FRAMEBUFFER_ATTACHMENT_IMAGE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get usage() { - return this.#view.getUint32(20, LE); - } - set usage(value) { - this.#view.setUint32(20, Number(value), LE); - } - get width() { - return this.#view.getUint32(24, LE); - } - set width(value) { - this.#view.setUint32(24, Number(value), LE); - } - get height() { - return this.#view.getUint32(28, LE); - } - set height(value) { - this.#view.setUint32(28, Number(value), LE); - } - get layerCount() { - return this.#view.getUint32(32, LE); - } - set layerCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get viewFormatCount() { - return this.#view.getUint32(36, LE); - } - set viewFormatCount(value) { - this.#view.setUint32(36, Number(value), LE); - } - get pViewFormats() { - return this.#view.getBigUint64(40, LE); - } - set pViewFormats(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class RenderPassAttachmentBeginInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassAttachmentBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassAttachmentBeginInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassAttachmentBeginInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassAttachmentBeginInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.attachmentCount && (this.attachmentCount = data.attachmentCount), void 0 !== data.pAttachments && (this.pAttachments = data.pAttachments); - this.sType = StructureType.RENDER_PASS_ATTACHMENT_BEGIN_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get attachmentCount() { - return this.#view.getUint32(16, LE); - } - set attachmentCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pAttachments() { - return this.#view.getBigUint64(24, LE); - } - set pAttachments(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceTextureCompressionASTCHDRFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceTextureCompressionASTCHDRFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTextureCompressionASTCHDRFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTextureCompressionASTCHDRFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceTextureCompressionASTCHDRFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.textureCompressionASTC_HDR && (this.textureCompressionASTC_HDR = data.textureCompressionASTC_HDR); - this.sType = StructureType.PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get textureCompressionASTC_HDR() { - return this.#view.getUint32(16, LE); - } - set textureCompressionASTC_HDR(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceCooperativeMatrixFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCooperativeMatrixFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCooperativeMatrixFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.cooperativeMatrix && (this.cooperativeMatrix = data.cooperativeMatrix), void 0 !== data.cooperativeMatrixRobustBufferAccess && (this.cooperativeMatrixRobustBufferAccess = data.cooperativeMatrixRobustBufferAccess); - this.sType = StructureType.PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get cooperativeMatrix() { - return this.#view.getUint32(16, LE); - } - set cooperativeMatrix(value) { - this.#view.setUint32(16, Number(value), LE); - } - get cooperativeMatrixRobustBufferAccess() { - return this.#view.getUint32(20, LE); - } - set cooperativeMatrixRobustBufferAccess(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceCooperativeMatrixPropertiesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCooperativeMatrixPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCooperativeMatrixPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.cooperativeMatrixSupportedStages && (this.cooperativeMatrixSupportedStages = data.cooperativeMatrixSupportedStages); - this.sType = StructureType.PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get cooperativeMatrixSupportedStages() { - return this.#view.getUint32(16, LE); - } - set cooperativeMatrixSupportedStages(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class CooperativeMatrixPropertiesNV { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CooperativeMatrixPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CooperativeMatrixPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CooperativeMatrixPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CooperativeMatrixPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.MSize && (this.MSize = data.MSize), void 0 !== data.NSize && (this.NSize = data.NSize), void 0 !== data.KSize && (this.KSize = data.KSize), void 0 !== data.AType && (this.AType = data.AType), void 0 !== data.BType && (this.BType = data.BType), void 0 !== data.CType && (this.CType = data.CType), void 0 !== data.DType && (this.DType = data.DType), void 0 !== data.scope && (this.scope = data.scope); - this.sType = StructureType.COOPERATIVE_MATRIX_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get MSize() { - return this.#view.getUint32(16, LE); - } - set MSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get NSize() { - return this.#view.getUint32(20, LE); - } - set NSize(value) { - this.#view.setUint32(20, Number(value), LE); - } - get KSize() { - return this.#view.getUint32(24, LE); - } - set KSize(value) { - this.#view.setUint32(24, Number(value), LE); - } - get AType() { - return this.#view.getUint32(28, LE); - } - set AType(value) { - this.#view.setUint32(28, Number(value), LE); - } - get BType() { - return this.#view.getUint32(32, LE); - } - set BType(value) { - this.#view.setUint32(32, Number(value), LE); - } - get CType() { - return this.#view.getUint32(36, LE); - } - set CType(value) { - this.#view.setUint32(36, Number(value), LE); - } - get DType() { - return this.#view.getUint32(40, LE); - } - set DType(value) { - this.#view.setUint32(40, Number(value), LE); - } - get scope() { - return this.#view.getUint32(44, LE); - } - set scope(value) { - this.#view.setUint32(44, Number(value), LE); - } -} -export class PhysicalDeviceYcbcrImageArraysFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceYcbcrImageArraysFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceYcbcrImageArraysFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceYcbcrImageArraysFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceYcbcrImageArraysFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.ycbcrImageArrays && (this.ycbcrImageArrays = data.ycbcrImageArrays); - this.sType = StructureType.PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get ycbcrImageArrays() { - return this.#view.getUint32(16, LE); - } - set ycbcrImageArrays(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImageViewHandleInfoNVX { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageViewHandleInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewHandleInfoNVX.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewHandleInfoNVX.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageViewHandleInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageView && (this.imageView = data.imageView), void 0 !== data.descriptorType && (this.descriptorType = data.descriptorType), void 0 !== data.sampler && (this.sampler = data.sampler); - this.sType = StructureType.IMAGE_VIEW_HANDLE_INFO_NVX; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageView() { - return this.#view.getBigUint64(16, LE); - } - set imageView(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get descriptorType() { - return this.#view.getUint32(24, LE); - } - set descriptorType(value) { - this.#view.setUint32(24, Number(value), LE); - } - get sampler() { - return this.#view.getBigUint64(32, LE); - } - set sampler(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ImageViewAddressPropertiesNVX { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageViewAddressPropertiesNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewAddressPropertiesNVX.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewAddressPropertiesNVX.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageViewAddressPropertiesNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceAddress && (this.deviceAddress = data.deviceAddress), void 0 !== data.size && (this.size = data.size); - this.sType = StructureType.IMAGE_VIEW_ADDRESS_PROPERTIES_NVX; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceAddress() { - return this.#view.getBigUint64(16, LE); - } - set deviceAddress(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(24, LE); - } - set size(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class PresentFrameTokenGGP { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PresentFrameTokenGGP.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentFrameTokenGGP.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PresentFrameTokenGGP.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PresentFrameTokenGGP.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.frameToken && (this.frameToken = data.frameToken); - this.sType = StructureType.PRESENT_FRAME_TOKEN_GGP; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get frameToken() { - return this.#view.getBigUint64(16, LE); - } - set frameToken(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class PipelineCreationFeedback { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineCreationFeedback.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCreationFeedback.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCreationFeedback.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineCreationFeedback.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.duration && (this.duration = data.duration); - } - get flags() { - return this.#view.getUint32(0, LE); - } - set flags(value) { - this.#view.setUint32(0, Number(value), LE); - } - get duration() { - return this.#view.getBigUint64(8, LE); - } - set duration(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} -export class PipelineCreationFeedbackCreateInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineCreationFeedbackCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCreationFeedbackCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCreationFeedbackCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineCreationFeedbackCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pPipelineCreationFeedback && (this.pPipelineCreationFeedback = data.pPipelineCreationFeedback), void 0 !== data.pipelineStageCreationFeedbackCount && (this.pipelineStageCreationFeedbackCount = data.pipelineStageCreationFeedbackCount), void 0 !== data.pPipelineStageCreationFeedbacks && (this.pPipelineStageCreationFeedbacks = data.pPipelineStageCreationFeedbacks); - this.sType = StructureType.PIPELINE_CREATION_FEEDBACK_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pPipelineCreationFeedback() { - return this.#view.getBigUint64(16, LE); - } - set pPipelineCreationFeedback(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get pipelineStageCreationFeedbackCount() { - return this.#view.getUint32(24, LE); - } - set pipelineStageCreationFeedbackCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pPipelineStageCreationFeedbacks() { - return this.#view.getBigUint64(32, LE); - } - set pPipelineStageCreationFeedbacks(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class SurfaceFullScreenExclusiveInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceFullScreenExclusiveInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFullScreenExclusiveInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceFullScreenExclusiveInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceFullScreenExclusiveInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fullScreenExclusive && (this.fullScreenExclusive = data.fullScreenExclusive); - this.sType = StructureType.SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fullScreenExclusive() { - return this.#view.getUint32(16, LE); - } - set fullScreenExclusive(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SurfaceFullScreenExclusiveWin32InfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceFullScreenExclusiveWin32InfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFullScreenExclusiveWin32InfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceFullScreenExclusiveWin32InfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceFullScreenExclusiveWin32InfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.hmonitor && (this.hmonitor = data.hmonitor); - this.sType = StructureType.SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get hmonitor() { - return this.#view.getBigUint64(16, LE); - } - set hmonitor(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class SurfaceCapabilitiesFullScreenExclusiveEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceCapabilitiesFullScreenExclusiveEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilitiesFullScreenExclusiveEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilitiesFullScreenExclusiveEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceCapabilitiesFullScreenExclusiveEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fullScreenExclusiveSupported && (this.fullScreenExclusiveSupported = data.fullScreenExclusiveSupported); - this.sType = StructureType.SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fullScreenExclusiveSupported() { - return this.#view.getUint32(16, LE); - } - set fullScreenExclusiveSupported(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevicePresentBarrierFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePresentBarrierFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentBarrierFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePresentBarrierFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePresentBarrierFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.presentBarrier && (this.presentBarrier = data.presentBarrier); - this.sType = StructureType.PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get presentBarrier() { - return this.#view.getUint32(16, LE); - } - set presentBarrier(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SurfaceCapabilitiesPresentBarrierNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SurfaceCapabilitiesPresentBarrierNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilitiesPresentBarrierNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilitiesPresentBarrierNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SurfaceCapabilitiesPresentBarrierNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.presentBarrierSupported && (this.presentBarrierSupported = data.presentBarrierSupported); - this.sType = StructureType.SURFACE_CAPABILITIES_PRESENT_BARRIER_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get presentBarrierSupported() { - return this.#view.getUint32(16, LE); - } - set presentBarrierSupported(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SwapchainPresentBarrierCreateInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SwapchainPresentBarrierCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainPresentBarrierCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainPresentBarrierCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SwapchainPresentBarrierCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.presentBarrierEnable && (this.presentBarrierEnable = data.presentBarrierEnable); - this.sType = StructureType.SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get presentBarrierEnable() { - return this.#view.getUint32(16, LE); - } - set presentBarrierEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevicePerformanceQueryFeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePerformanceQueryFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePerformanceQueryFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePerformanceQueryFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePerformanceQueryFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.performanceCounterQueryPools && (this.performanceCounterQueryPools = data.performanceCounterQueryPools), void 0 !== data.performanceCounterMultipleQueryPools && (this.performanceCounterMultipleQueryPools = data.performanceCounterMultipleQueryPools); - this.sType = StructureType.PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get performanceCounterQueryPools() { - return this.#view.getUint32(16, LE); - } - set performanceCounterQueryPools(value) { - this.#view.setUint32(16, Number(value), LE); - } - get performanceCounterMultipleQueryPools() { - return this.#view.getUint32(20, LE); - } - set performanceCounterMultipleQueryPools(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDevicePerformanceQueryPropertiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePerformanceQueryPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePerformanceQueryPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePerformanceQueryPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePerformanceQueryPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.allowCommandBufferQueryCopies && (this.allowCommandBufferQueryCopies = data.allowCommandBufferQueryCopies); - this.sType = StructureType.PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get allowCommandBufferQueryCopies() { - return this.#view.getUint32(16, LE); - } - set allowCommandBufferQueryCopies(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PerformanceCounterKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PerformanceCounterKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceCounterKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceCounterKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PerformanceCounterKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.unit && (this.unit = data.unit), void 0 !== data.scope && (this.scope = data.scope), void 0 !== data.storage && (this.storage = data.storage), void 0 !== data.uuid && (this.uuid = data.uuid); - this.sType = StructureType.PERFORMANCE_COUNTER_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get unit() { - return this.#view.getUint32(16, LE); - } - set unit(value) { - this.#view.setUint32(16, Number(value), LE); - } - get scope() { - return this.#view.getUint32(20, LE); - } - set scope(value) { - this.#view.setUint32(20, Number(value), LE); - } - get storage() { - return this.#view.getUint32(24, LE); - } - set storage(value) { - this.#view.setUint32(24, Number(value), LE); - } - get uuid() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 28, 16); - } - set uuid(value) { - this.#data.set(new Uint8Array(value.buffer), 28); - } -} -export class PerformanceCounterDescriptionKHR { - static size = 792; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PerformanceCounterDescriptionKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceCounterDescriptionKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceCounterDescriptionKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PerformanceCounterDescriptionKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.name && (this.name = data.name), void 0 !== data.category && (this.category = data.category), void 0 !== data.description && (this.description = data.description); - this.sType = StructureType.PERFORMANCE_COUNTER_DESCRIPTION_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - set name(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - get category() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); - } - set category(value) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 532, 256); - } - set description(value) { - this.#data.set(new Uint8Array(value.buffer), 532); - } -} -export class QueryPoolPerformanceCreateInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueryPoolPerformanceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueryPoolPerformanceCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueryPoolPerformanceCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueryPoolPerformanceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.queueFamilyIndex && (this.queueFamilyIndex = data.queueFamilyIndex), void 0 !== data.counterIndexCount && (this.counterIndexCount = data.counterIndexCount), void 0 !== data.pCounterIndices && (this.pCounterIndices = data.pCounterIndices); - this.sType = StructureType.QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get queueFamilyIndex() { - return this.#view.getUint32(16, LE); - } - set queueFamilyIndex(value) { - this.#view.setUint32(16, Number(value), LE); - } - get counterIndexCount() { - return this.#view.getUint32(20, LE); - } - set counterIndexCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pCounterIndices() { - return this.#view.getBigUint64(24, LE); - } - set pCounterIndices(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class AcquireProfilingLockInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AcquireProfilingLockInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AcquireProfilingLockInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AcquireProfilingLockInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AcquireProfilingLockInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.timeout && (this.timeout = data.timeout); - this.sType = StructureType.ACQUIRE_PROFILING_LOCK_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get timeout() { - return this.#view.getBigUint64(24, LE); - } - set timeout(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class PerformanceQuerySubmitInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PerformanceQuerySubmitInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceQuerySubmitInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceQuerySubmitInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PerformanceQuerySubmitInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.counterPassIndex && (this.counterPassIndex = data.counterPassIndex); - this.sType = StructureType.PERFORMANCE_QUERY_SUBMIT_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get counterPassIndex() { - return this.#view.getUint32(16, LE); - } - set counterPassIndex(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class HeadlessSurfaceCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(HeadlessSurfaceCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, HeadlessSurfaceCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < HeadlessSurfaceCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(HeadlessSurfaceCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.HEADLESS_SURFACE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceCoverageReductionModeFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceCoverageReductionModeFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCoverageReductionModeFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCoverageReductionModeFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceCoverageReductionModeFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.coverageReductionMode && (this.coverageReductionMode = data.coverageReductionMode); - this.sType = StructureType.PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get coverageReductionMode() { - return this.#view.getUint32(16, LE); - } - set coverageReductionMode(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineCoverageReductionStateCreateInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineCoverageReductionStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCoverageReductionStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCoverageReductionStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineCoverageReductionStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.coverageReductionMode && (this.coverageReductionMode = data.coverageReductionMode); - this.sType = StructureType.PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get coverageReductionMode() { - return this.#view.getUint32(20, LE); - } - set coverageReductionMode(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class FramebufferMixedSamplesCombinationNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FramebufferMixedSamplesCombinationNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferMixedSamplesCombinationNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FramebufferMixedSamplesCombinationNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FramebufferMixedSamplesCombinationNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.coverageReductionMode && (this.coverageReductionMode = data.coverageReductionMode), void 0 !== data.rasterizationSamples && (this.rasterizationSamples = data.rasterizationSamples), void 0 !== data.depthStencilSamples && (this.depthStencilSamples = data.depthStencilSamples), void 0 !== data.colorSamples && (this.colorSamples = data.colorSamples); - this.sType = StructureType.FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get coverageReductionMode() { - return this.#view.getUint32(16, LE); - } - set coverageReductionMode(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rasterizationSamples() { - return this.#view.getUint32(20, LE); - } - set rasterizationSamples(value) { - this.#view.setUint32(20, Number(value), LE); - } - get depthStencilSamples() { - return this.#view.getUint32(24, LE); - } - set depthStencilSamples(value) { - this.#view.setUint32(24, Number(value), LE); - } - get colorSamples() { - return this.#view.getUint32(28, LE); - } - set colorSamples(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderIntegerFunctions2 && (this.shaderIntegerFunctions2 = data.shaderIntegerFunctions2); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderIntegerFunctions2() { - return this.#view.getUint32(16, LE); - } - set shaderIntegerFunctions2(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PerformanceValueINTEL { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PerformanceValueINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceValueINTEL.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceValueINTEL.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PerformanceValueINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.type && (this.type = data.type), void 0 !== data.data && (this.data = data.data); - } - get type() { - return this.#view.getUint32(0, LE); - } - set type(value) { - this.#view.setUint32(0, Number(value), LE); - } - get data() { - throw new Error('Unknown type: {"union":["u32","u64","f32","u32","buffer"]}'); - } - set data(value) { - throw new Error('Unknown type: {"union":["u32","u64","f32","u32","buffer"]}'); - } -} -export class InitializePerformanceApiInfoINTEL { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(InitializePerformanceApiInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, InitializePerformanceApiInfoINTEL.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < InitializePerformanceApiInfoINTEL.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(InitializePerformanceApiInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pUserData && (this.pUserData = data.pUserData); - this.sType = StructureType.INITIALIZE_PERFORMANCE_API_INFO_INTEL; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pUserData() { - return this.#view.getBigUint64(16, LE); - } - set pUserData(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class QueryPoolPerformanceQueryCreateInfoINTEL { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueryPoolPerformanceQueryCreateInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueryPoolPerformanceQueryCreateInfoINTEL.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueryPoolPerformanceQueryCreateInfoINTEL.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueryPoolPerformanceQueryCreateInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.performanceCountersSampling && (this.performanceCountersSampling = data.performanceCountersSampling); - this.sType = StructureType.QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get performanceCountersSampling() { - return this.#view.getUint32(16, LE); - } - set performanceCountersSampling(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PerformanceMarkerInfoINTEL { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PerformanceMarkerInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceMarkerInfoINTEL.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceMarkerInfoINTEL.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PerformanceMarkerInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.marker && (this.marker = data.marker); - this.sType = StructureType.PERFORMANCE_MARKER_INFO_INTEL; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get marker() { - return this.#view.getBigUint64(16, LE); - } - set marker(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class PerformanceStreamMarkerInfoINTEL { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PerformanceStreamMarkerInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceStreamMarkerInfoINTEL.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceStreamMarkerInfoINTEL.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PerformanceStreamMarkerInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.marker && (this.marker = data.marker); - this.sType = StructureType.PERFORMANCE_STREAM_MARKER_INFO_INTEL; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get marker() { - return this.#view.getUint32(16, LE); - } - set marker(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PerformanceOverrideInfoINTEL { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PerformanceOverrideInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceOverrideInfoINTEL.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceOverrideInfoINTEL.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PerformanceOverrideInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.type && (this.type = data.type), void 0 !== data.enable && (this.enable = data.enable), void 0 !== data.parameter && (this.parameter = data.parameter); - this.sType = StructureType.PERFORMANCE_OVERRIDE_INFO_INTEL; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get type() { - return this.#view.getUint32(16, LE); - } - set type(value) { - this.#view.setUint32(16, Number(value), LE); - } - get enable() { - return this.#view.getUint32(20, LE); - } - set enable(value) { - this.#view.setUint32(20, Number(value), LE); - } - get parameter() { - return this.#view.getBigUint64(24, LE); - } - set parameter(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class PerformanceConfigurationAcquireInfoINTEL { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PerformanceConfigurationAcquireInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceConfigurationAcquireInfoINTEL.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceConfigurationAcquireInfoINTEL.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PerformanceConfigurationAcquireInfoINTEL.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.type && (this.type = data.type); - this.sType = StructureType.PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get type() { - return this.#view.getUint32(16, LE); - } - set type(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceShaderClockFeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderClockFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderClockFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderClockFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderClockFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderSubgroupClock && (this.shaderSubgroupClock = data.shaderSubgroupClock), void 0 !== data.shaderDeviceClock && (this.shaderDeviceClock = data.shaderDeviceClock); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderSubgroupClock() { - return this.#view.getUint32(16, LE); - } - set shaderSubgroupClock(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shaderDeviceClock() { - return this.#view.getUint32(20, LE); - } - set shaderDeviceClock(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceIndexTypeUint8FeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceIndexTypeUint8FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceIndexTypeUint8FeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceIndexTypeUint8FeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceIndexTypeUint8FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.indexTypeUint8 && (this.indexTypeUint8 = data.indexTypeUint8); - this.sType = StructureType.PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get indexTypeUint8() { - return this.#view.getUint32(16, LE); - } - set indexTypeUint8(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceShaderSMBuiltinsPropertiesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSMBuiltinsPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderSMBuiltinsPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderSMCount && (this.shaderSMCount = data.shaderSMCount), void 0 !== data.shaderWarpsPerSM && (this.shaderWarpsPerSM = data.shaderWarpsPerSM); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderSMCount() { - return this.#view.getUint32(16, LE); - } - set shaderSMCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shaderWarpsPerSM() { - return this.#view.getUint32(20, LE); - } - set shaderWarpsPerSM(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceShaderSMBuiltinsFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSMBuiltinsFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderSMBuiltinsFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderSMBuiltins && (this.shaderSMBuiltins = data.shaderSMBuiltins); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderSMBuiltins() { - return this.#view.getUint32(16, LE); - } - set shaderSMBuiltins(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceFragmentShaderInterlockFeaturesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentShaderSampleInterlock && (this.fragmentShaderSampleInterlock = data.fragmentShaderSampleInterlock), void 0 !== data.fragmentShaderPixelInterlock && (this.fragmentShaderPixelInterlock = data.fragmentShaderPixelInterlock), void 0 !== data.fragmentShaderShadingRateInterlock && (this.fragmentShaderShadingRateInterlock = data.fragmentShaderShadingRateInterlock); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentShaderSampleInterlock() { - return this.#view.getUint32(16, LE); - } - set fragmentShaderSampleInterlock(value) { - this.#view.setUint32(16, Number(value), LE); - } - get fragmentShaderPixelInterlock() { - return this.#view.getUint32(20, LE); - } - set fragmentShaderPixelInterlock(value) { - this.#view.setUint32(20, Number(value), LE); - } - get fragmentShaderShadingRateInterlock() { - return this.#view.getUint32(24, LE); - } - set fragmentShaderShadingRateInterlock(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceSeparateDepthStencilLayoutsFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.separateDepthStencilLayouts && (this.separateDepthStencilLayouts = data.separateDepthStencilLayouts); - this.sType = StructureType.PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get separateDepthStencilLayouts() { - return this.#view.getUint32(16, LE); - } - set separateDepthStencilLayouts(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class AttachmentReferenceStencilLayout { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AttachmentReferenceStencilLayout.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentReferenceStencilLayout.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentReferenceStencilLayout.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AttachmentReferenceStencilLayout.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stencilLayout && (this.stencilLayout = data.stencilLayout); - this.sType = StructureType.ATTACHMENT_REFERENCE_STENCIL_LAYOUT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stencilLayout() { - return this.#view.getUint32(16, LE); - } - set stencilLayout(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.primitiveTopologyListRestart && (this.primitiveTopologyListRestart = data.primitiveTopologyListRestart), void 0 !== data.primitiveTopologyPatchListRestart && (this.primitiveTopologyPatchListRestart = data.primitiveTopologyPatchListRestart); - this.sType = StructureType.PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get primitiveTopologyListRestart() { - return this.#view.getUint32(16, LE); - } - set primitiveTopologyListRestart(value) { - this.#view.setUint32(16, Number(value), LE); - } - get primitiveTopologyPatchListRestart() { - return this.#view.getUint32(20, LE); - } - set primitiveTopologyPatchListRestart(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class AttachmentDescriptionStencilLayout { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AttachmentDescriptionStencilLayout.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentDescriptionStencilLayout.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentDescriptionStencilLayout.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AttachmentDescriptionStencilLayout.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stencilInitialLayout && (this.stencilInitialLayout = data.stencilInitialLayout), void 0 !== data.stencilFinalLayout && (this.stencilFinalLayout = data.stencilFinalLayout); - this.sType = StructureType.ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stencilInitialLayout() { - return this.#view.getUint32(16, LE); - } - set stencilInitialLayout(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stencilFinalLayout() { - return this.#view.getUint32(20, LE); - } - set stencilFinalLayout(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDevicePipelineExecutablePropertiesFeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipelineExecutableInfo && (this.pipelineExecutableInfo = data.pipelineExecutableInfo); - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipelineExecutableInfo() { - return this.#view.getUint32(16, LE); - } - set pipelineExecutableInfo(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipeline && (this.pipeline = data.pipeline); - this.sType = StructureType.PIPELINE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipeline() { - return this.#view.getBigUint64(16, LE); - } - set pipeline(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class PipelineExecutablePropertiesKHR { - static size = 536; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineExecutablePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutablePropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineExecutablePropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineExecutablePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stages && (this.stages = data.stages), void 0 !== data.name && (this.name = data.name), void 0 !== data.description && (this.description = data.description), void 0 !== data.subgroupSize && (this.subgroupSize = data.subgroupSize); - this.sType = StructureType.PIPELINE_EXECUTABLE_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stages() { - return this.#view.getUint32(16, LE); - } - set stages(value) { - this.#view.setUint32(16, Number(value), LE); - } - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - set name(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); - } - set description(value) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - get subgroupSize() { - return this.#view.getUint32(532, LE); - } - set subgroupSize(value) { - this.#view.setUint32(532, Number(value), LE); - } -} -export class PipelineExecutableInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineExecutableInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutableInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineExecutableInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineExecutableInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipeline && (this.pipeline = data.pipeline), void 0 !== data.executableIndex && (this.executableIndex = data.executableIndex); - this.sType = StructureType.PIPELINE_EXECUTABLE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipeline() { - return this.#view.getBigUint64(16, LE); - } - set pipeline(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get executableIndex() { - return this.#view.getUint32(24, LE); - } - set executableIndex(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PipelineExecutableStatisticKHR { - static size = 544; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineExecutableStatisticKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutableStatisticKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineExecutableStatisticKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineExecutableStatisticKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.name && (this.name = data.name), void 0 !== data.description && (this.description = data.description), void 0 !== data.format && (this.format = data.format), void 0 !== data.value && (this.value = data.value); - this.sType = StructureType.PIPELINE_EXECUTABLE_STATISTIC_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); - } - set name(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 272, 256); - } - set description(value) { - this.#data.set(new Uint8Array(value.buffer), 272); - } - get format() { - return this.#view.getUint32(528, LE); - } - set format(value) { - this.#view.setUint32(528, Number(value), LE); - } - get value() { - throw new Error('Unknown type: {"union":["u32","i64","u64","f64"]}'); - } - set value(value) { - throw new Error('Unknown type: {"union":["u32","i64","u64","f64"]}'); - } -} -export class PipelineExecutableInternalRepresentationKHR { - static size = 552; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineExecutableInternalRepresentationKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutableInternalRepresentationKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineExecutableInternalRepresentationKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineExecutableInternalRepresentationKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.name && (this.name = data.name), void 0 !== data.description && (this.description = data.description), void 0 !== data.isText && (this.isText = data.isText), void 0 !== data.dataSize && (this.dataSize = data.dataSize), void 0 !== data.pData && (this.pData = data.pData); - this.sType = StructureType.PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); - } - set name(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 272, 256); - } - set description(value) { - this.#data.set(new Uint8Array(value.buffer), 272); - } - get isText() { - return this.#view.getUint32(528, LE); - } - set isText(value) { - this.#view.setUint32(528, Number(value), LE); - } - get dataSize() { - return this.#view.getBigUint64(536, LE); - } - set dataSize(value) { - this.#view.setBigUint64(536, BigInt(value), LE); - } - get pData() { - return this.#view.getBigUint64(544, LE); - } - set pData(value) { - this.#view.setBigUint64(544, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceShaderDemoteToHelperInvocationFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderDemoteToHelperInvocation && (this.shaderDemoteToHelperInvocation = data.shaderDemoteToHelperInvocation); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderDemoteToHelperInvocation() { - return this.#view.getUint32(16, LE); - } - set shaderDemoteToHelperInvocation(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceTexelBufferAlignmentFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.texelBufferAlignment && (this.texelBufferAlignment = data.texelBufferAlignment); - this.sType = StructureType.PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get texelBufferAlignment() { - return this.#view.getUint32(16, LE); - } - set texelBufferAlignment(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceTexelBufferAlignmentProperties { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTexelBufferAlignmentProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTexelBufferAlignmentProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.storageTexelBufferOffsetAlignmentBytes && (this.storageTexelBufferOffsetAlignmentBytes = data.storageTexelBufferOffsetAlignmentBytes), void 0 !== data.storageTexelBufferOffsetSingleTexelAlignment && (this.storageTexelBufferOffsetSingleTexelAlignment = data.storageTexelBufferOffsetSingleTexelAlignment), void 0 !== data.uniformTexelBufferOffsetAlignmentBytes && (this.uniformTexelBufferOffsetAlignmentBytes = data.uniformTexelBufferOffsetAlignmentBytes), void 0 !== data.uniformTexelBufferOffsetSingleTexelAlignment && (this.uniformTexelBufferOffsetSingleTexelAlignment = data.uniformTexelBufferOffsetSingleTexelAlignment); - this.sType = StructureType.PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get storageTexelBufferOffsetAlignmentBytes() { - return this.#view.getBigUint64(16, LE); - } - set storageTexelBufferOffsetAlignmentBytes(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get storageTexelBufferOffsetSingleTexelAlignment() { - return this.#view.getUint32(24, LE); - } - set storageTexelBufferOffsetSingleTexelAlignment(value) { - this.#view.setUint32(24, Number(value), LE); - } - get uniformTexelBufferOffsetAlignmentBytes() { - return this.#view.getBigUint64(32, LE); - } - set uniformTexelBufferOffsetAlignmentBytes(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get uniformTexelBufferOffsetSingleTexelAlignment() { - return this.#view.getUint32(40, LE); - } - set uniformTexelBufferOffsetSingleTexelAlignment(value) { - this.#view.setUint32(40, Number(value), LE); - } -} -export class PhysicalDeviceSubgroupSizeControlFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubgroupSizeControlFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubgroupSizeControlFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.subgroupSizeControl && (this.subgroupSizeControl = data.subgroupSizeControl), void 0 !== data.computeFullSubgroups && (this.computeFullSubgroups = data.computeFullSubgroups); - this.sType = StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get subgroupSizeControl() { - return this.#view.getUint32(16, LE); - } - set subgroupSizeControl(value) { - this.#view.setUint32(16, Number(value), LE); - } - get computeFullSubgroups() { - return this.#view.getUint32(20, LE); - } - set computeFullSubgroups(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceSubgroupSizeControlProperties { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubgroupSizeControlProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubgroupSizeControlProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minSubgroupSize && (this.minSubgroupSize = data.minSubgroupSize), void 0 !== data.maxSubgroupSize && (this.maxSubgroupSize = data.maxSubgroupSize), void 0 !== data.maxComputeWorkgroupSubgroups && (this.maxComputeWorkgroupSubgroups = data.maxComputeWorkgroupSubgroups), void 0 !== data.requiredSubgroupSizeStages && (this.requiredSubgroupSizeStages = data.requiredSubgroupSizeStages); - this.sType = StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minSubgroupSize() { - return this.#view.getUint32(16, LE); - } - set minSubgroupSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxSubgroupSize() { - return this.#view.getUint32(20, LE); - } - set maxSubgroupSize(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxComputeWorkgroupSubgroups() { - return this.#view.getUint32(24, LE); - } - set maxComputeWorkgroupSubgroups(value) { - this.#view.setUint32(24, Number(value), LE); - } - get requiredSubgroupSizeStages() { - return this.#view.getUint32(28, LE); - } - set requiredSubgroupSizeStages(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PipelineShaderStageRequiredSubgroupSizeCreateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineShaderStageRequiredSubgroupSizeCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineShaderStageRequiredSubgroupSizeCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineShaderStageRequiredSubgroupSizeCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineShaderStageRequiredSubgroupSizeCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.requiredSubgroupSize && (this.requiredSubgroupSize = data.requiredSubgroupSize); - this.sType = StructureType.PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get requiredSubgroupSize() { - return this.#view.getUint32(16, LE); - } - set requiredSubgroupSize(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SubpassShadingPipelineCreateInfoHUAWEI { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassShadingPipelineCreateInfoHUAWEI.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassShadingPipelineCreateInfoHUAWEI.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassShadingPipelineCreateInfoHUAWEI.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassShadingPipelineCreateInfoHUAWEI.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.renderPass && (this.renderPass = data.renderPass), void 0 !== data.subpass && (this.subpass = data.subpass); - this.sType = StructureType.SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get renderPass() { - return this.#view.getBigUint64(16, LE); - } - set renderPass(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get subpass() { - return this.#view.getUint32(24, LE); - } - set subpass(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceSubpassShadingPropertiesHUAWEI { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSubpassShadingPropertiesHUAWEI.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubpassShadingPropertiesHUAWEI.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubpassShadingPropertiesHUAWEI.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSubpassShadingPropertiesHUAWEI.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxSubpassShadingWorkgroupSizeAspectRatio && (this.maxSubpassShadingWorkgroupSizeAspectRatio = data.maxSubpassShadingWorkgroupSizeAspectRatio); - this.sType = StructureType.PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxSubpassShadingWorkgroupSizeAspectRatio() { - return this.#view.getUint32(16, LE); - } - set maxSubpassShadingWorkgroupSizeAspectRatio(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MemoryOpaqueCaptureAddressAllocateInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryOpaqueCaptureAddressAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryOpaqueCaptureAddressAllocateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryOpaqueCaptureAddressAllocateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryOpaqueCaptureAddressAllocateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.opaqueCaptureAddress && (this.opaqueCaptureAddress = data.opaqueCaptureAddress); - this.sType = StructureType.MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get opaqueCaptureAddress() { - return this.#view.getBigUint64(16, LE); - } - set opaqueCaptureAddress(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class DeviceMemoryOpaqueCaptureAddressInfo { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceMemoryOpaqueCaptureAddressInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceMemoryOpaqueCaptureAddressInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceMemoryOpaqueCaptureAddressInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceMemoryOpaqueCaptureAddressInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memory && (this.memory = data.memory); - this.sType = StructureType.DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(16, LE); - } - set memory(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceLineRasterizationFeaturesEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceLineRasterizationFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLineRasterizationFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLineRasterizationFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceLineRasterizationFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.rectangularLines && (this.rectangularLines = data.rectangularLines), void 0 !== data.bresenhamLines && (this.bresenhamLines = data.bresenhamLines), void 0 !== data.smoothLines && (this.smoothLines = data.smoothLines), void 0 !== data.stippledRectangularLines && (this.stippledRectangularLines = data.stippledRectangularLines), void 0 !== data.stippledBresenhamLines && (this.stippledBresenhamLines = data.stippledBresenhamLines), void 0 !== data.stippledSmoothLines && (this.stippledSmoothLines = data.stippledSmoothLines); - this.sType = StructureType.PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get rectangularLines() { - return this.#view.getUint32(16, LE); - } - set rectangularLines(value) { - this.#view.setUint32(16, Number(value), LE); - } - get bresenhamLines() { - return this.#view.getUint32(20, LE); - } - set bresenhamLines(value) { - this.#view.setUint32(20, Number(value), LE); - } - get smoothLines() { - return this.#view.getUint32(24, LE); - } - set smoothLines(value) { - this.#view.setUint32(24, Number(value), LE); - } - get stippledRectangularLines() { - return this.#view.getUint32(28, LE); - } - set stippledRectangularLines(value) { - this.#view.setUint32(28, Number(value), LE); - } - get stippledBresenhamLines() { - return this.#view.getUint32(32, LE); - } - set stippledBresenhamLines(value) { - this.#view.setUint32(32, Number(value), LE); - } - get stippledSmoothLines() { - return this.#view.getUint32(36, LE); - } - set stippledSmoothLines(value) { - this.#view.setUint32(36, Number(value), LE); - } -} -export class PhysicalDeviceLineRasterizationPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceLineRasterizationPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLineRasterizationPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLineRasterizationPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceLineRasterizationPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.lineSubPixelPrecisionBits && (this.lineSubPixelPrecisionBits = data.lineSubPixelPrecisionBits); - this.sType = StructureType.PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get lineSubPixelPrecisionBits() { - return this.#view.getUint32(16, LE); - } - set lineSubPixelPrecisionBits(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineRasterizationLineStateCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRasterizationLineStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationLineStateCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationLineStateCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRasterizationLineStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.lineRasterizationMode && (this.lineRasterizationMode = data.lineRasterizationMode), void 0 !== data.stippledLineEnable && (this.stippledLineEnable = data.stippledLineEnable), void 0 !== data.lineStippleFactor && (this.lineStippleFactor = data.lineStippleFactor), void 0 !== data.lineStipplePattern && (this.lineStipplePattern = data.lineStipplePattern); - this.sType = StructureType.PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get lineRasterizationMode() { - return this.#view.getUint32(16, LE); - } - set lineRasterizationMode(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stippledLineEnable() { - return this.#view.getUint32(20, LE); - } - set stippledLineEnable(value) { - this.#view.setUint32(20, Number(value), LE); - } - get lineStippleFactor() { - return this.#view.getUint32(24, LE); - } - set lineStippleFactor(value) { - this.#view.setUint32(24, Number(value), LE); - } - get lineStipplePattern() { - return this.#view.getUint16(28, LE); - } - set lineStipplePattern(value) { - this.#view.setUint16(28, Number(value), LE); - } -} -export class PhysicalDevicePipelineCreationCacheControlFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePipelineCreationCacheControlFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineCreationCacheControlFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineCreationCacheControlFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePipelineCreationCacheControlFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipelineCreationCacheControl && (this.pipelineCreationCacheControl = data.pipelineCreationCacheControl); - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipelineCreationCacheControl() { - return this.#view.getUint32(16, LE); - } - set pipelineCreationCacheControl(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceVulkan11Features { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVulkan11Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan11Features.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan11Features.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVulkan11Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.storageBuffer16BitAccess && (this.storageBuffer16BitAccess = data.storageBuffer16BitAccess), void 0 !== data.uniformAndStorageBuffer16BitAccess && (this.uniformAndStorageBuffer16BitAccess = data.uniformAndStorageBuffer16BitAccess), void 0 !== data.storagePushConstant16 && (this.storagePushConstant16 = data.storagePushConstant16), void 0 !== data.storageInputOutput16 && (this.storageInputOutput16 = data.storageInputOutput16), void 0 !== data.multiview && (this.multiview = data.multiview), void 0 !== data.multiviewGeometryShader && (this.multiviewGeometryShader = data.multiviewGeometryShader), void 0 !== data.multiviewTessellationShader && (this.multiviewTessellationShader = data.multiviewTessellationShader), void 0 !== data.variablePointersStorageBuffer && (this.variablePointersStorageBuffer = data.variablePointersStorageBuffer), void 0 !== data.variablePointers && (this.variablePointers = data.variablePointers), void 0 !== data.protectedMemory && (this.protectedMemory = data.protectedMemory), void 0 !== data.samplerYcbcrConversion && (this.samplerYcbcrConversion = data.samplerYcbcrConversion), void 0 !== data.shaderDrawParameters && (this.shaderDrawParameters = data.shaderDrawParameters); - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get storageBuffer16BitAccess() { - return this.#view.getUint32(16, LE); - } - set storageBuffer16BitAccess(value) { - this.#view.setUint32(16, Number(value), LE); - } - get uniformAndStorageBuffer16BitAccess() { - return this.#view.getUint32(20, LE); - } - set uniformAndStorageBuffer16BitAccess(value) { - this.#view.setUint32(20, Number(value), LE); - } - get storagePushConstant16() { - return this.#view.getUint32(24, LE); - } - set storagePushConstant16(value) { - this.#view.setUint32(24, Number(value), LE); - } - get storageInputOutput16() { - return this.#view.getUint32(28, LE); - } - set storageInputOutput16(value) { - this.#view.setUint32(28, Number(value), LE); - } - get multiview() { - return this.#view.getUint32(32, LE); - } - set multiview(value) { - this.#view.setUint32(32, Number(value), LE); - } - get multiviewGeometryShader() { - return this.#view.getUint32(36, LE); - } - set multiviewGeometryShader(value) { - this.#view.setUint32(36, Number(value), LE); - } - get multiviewTessellationShader() { - return this.#view.getUint32(40, LE); - } - set multiviewTessellationShader(value) { - this.#view.setUint32(40, Number(value), LE); - } - get variablePointersStorageBuffer() { - return this.#view.getUint32(44, LE); - } - set variablePointersStorageBuffer(value) { - this.#view.setUint32(44, Number(value), LE); - } - get variablePointers() { - return this.#view.getUint32(48, LE); - } - set variablePointers(value) { - this.#view.setUint32(48, Number(value), LE); - } - get protectedMemory() { - return this.#view.getUint32(52, LE); - } - set protectedMemory(value) { - this.#view.setUint32(52, Number(value), LE); - } - get samplerYcbcrConversion() { - return this.#view.getUint32(56, LE); - } - set samplerYcbcrConversion(value) { - this.#view.setUint32(56, Number(value), LE); - } - get shaderDrawParameters() { - return this.#view.getUint32(60, LE); - } - set shaderDrawParameters(value) { - this.#view.setUint32(60, Number(value), LE); - } -} -export class PhysicalDeviceVulkan11Properties { - static size = 112; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVulkan11Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan11Properties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan11Properties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVulkan11Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceUUID && (this.deviceUUID = data.deviceUUID), void 0 !== data.driverUUID && (this.driverUUID = data.driverUUID), void 0 !== data.deviceLUID && (this.deviceLUID = data.deviceLUID), void 0 !== data.deviceNodeMask && (this.deviceNodeMask = data.deviceNodeMask), void 0 !== data.deviceLUIDValid && (this.deviceLUIDValid = data.deviceLUIDValid), void 0 !== data.subgroupSize && (this.subgroupSize = data.subgroupSize), void 0 !== data.subgroupSupportedStages && (this.subgroupSupportedStages = data.subgroupSupportedStages), void 0 !== data.subgroupSupportedOperations && (this.subgroupSupportedOperations = data.subgroupSupportedOperations), void 0 !== data.subgroupQuadOperationsInAllStages && (this.subgroupQuadOperationsInAllStages = data.subgroupQuadOperationsInAllStages), void 0 !== data.pointClippingBehavior && (this.pointClippingBehavior = data.pointClippingBehavior), void 0 !== data.maxMultiviewViewCount && (this.maxMultiviewViewCount = data.maxMultiviewViewCount), void 0 !== data.maxMultiviewInstanceIndex && (this.maxMultiviewInstanceIndex = data.maxMultiviewInstanceIndex), void 0 !== data.protectedNoFault && (this.protectedNoFault = data.protectedNoFault), void 0 !== data.maxPerSetDescriptors && (this.maxPerSetDescriptors = data.maxPerSetDescriptors), void 0 !== data.maxMemoryAllocationSize && (this.maxMemoryAllocationSize = data.maxMemoryAllocationSize); - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - set deviceUUID(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - get driverUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 32, 16); - } - set driverUUID(value) { - this.#data.set(new Uint8Array(value.buffer), 32); - } - get deviceLUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 48, 8); - } - set deviceLUID(value) { - this.#data.set(new Uint8Array(value.buffer), 48); - } - get deviceNodeMask() { - return this.#view.getUint32(56, LE); - } - set deviceNodeMask(value) { - this.#view.setUint32(56, Number(value), LE); - } - get deviceLUIDValid() { - return this.#view.getUint32(60, LE); - } - set deviceLUIDValid(value) { - this.#view.setUint32(60, Number(value), LE); - } - get subgroupSize() { - return this.#view.getUint32(64, LE); - } - set subgroupSize(value) { - this.#view.setUint32(64, Number(value), LE); - } - get subgroupSupportedStages() { - return this.#view.getUint32(68, LE); - } - set subgroupSupportedStages(value) { - this.#view.setUint32(68, Number(value), LE); - } - get subgroupSupportedOperations() { - return this.#view.getUint32(72, LE); - } - set subgroupSupportedOperations(value) { - this.#view.setUint32(72, Number(value), LE); - } - get subgroupQuadOperationsInAllStages() { - return this.#view.getUint32(76, LE); - } - set subgroupQuadOperationsInAllStages(value) { - this.#view.setUint32(76, Number(value), LE); - } - get pointClippingBehavior() { - return this.#view.getUint32(80, LE); - } - set pointClippingBehavior(value) { - this.#view.setUint32(80, Number(value), LE); - } - get maxMultiviewViewCount() { - return this.#view.getUint32(84, LE); - } - set maxMultiviewViewCount(value) { - this.#view.setUint32(84, Number(value), LE); - } - get maxMultiviewInstanceIndex() { - return this.#view.getUint32(88, LE); - } - set maxMultiviewInstanceIndex(value) { - this.#view.setUint32(88, Number(value), LE); - } - get protectedNoFault() { - return this.#view.getUint32(92, LE); - } - set protectedNoFault(value) { - this.#view.setUint32(92, Number(value), LE); - } - get maxPerSetDescriptors() { - return this.#view.getUint32(96, LE); - } - set maxPerSetDescriptors(value) { - this.#view.setUint32(96, Number(value), LE); - } - get maxMemoryAllocationSize() { - return this.#view.getBigUint64(104, LE); - } - set maxMemoryAllocationSize(value) { - this.#view.setBigUint64(104, BigInt(value), LE); - } -} -export class PhysicalDeviceVulkan12Features { - static size = 208; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVulkan12Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan12Features.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan12Features.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVulkan12Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.samplerMirrorClampToEdge && (this.samplerMirrorClampToEdge = data.samplerMirrorClampToEdge), void 0 !== data.drawIndirectCount && (this.drawIndirectCount = data.drawIndirectCount), void 0 !== data.storageBuffer8BitAccess && (this.storageBuffer8BitAccess = data.storageBuffer8BitAccess), void 0 !== data.uniformAndStorageBuffer8BitAccess && (this.uniformAndStorageBuffer8BitAccess = data.uniformAndStorageBuffer8BitAccess), void 0 !== data.storagePushConstant8 && (this.storagePushConstant8 = data.storagePushConstant8), void 0 !== data.shaderBufferInt64Atomics && (this.shaderBufferInt64Atomics = data.shaderBufferInt64Atomics), void 0 !== data.shaderSharedInt64Atomics && (this.shaderSharedInt64Atomics = data.shaderSharedInt64Atomics), void 0 !== data.shaderFloat16 && (this.shaderFloat16 = data.shaderFloat16), void 0 !== data.shaderInt8 && (this.shaderInt8 = data.shaderInt8), void 0 !== data.descriptorIndexing && (this.descriptorIndexing = data.descriptorIndexing), void 0 !== data.shaderInputAttachmentArrayDynamicIndexing && (this.shaderInputAttachmentArrayDynamicIndexing = data.shaderInputAttachmentArrayDynamicIndexing), void 0 !== data.shaderUniformTexelBufferArrayDynamicIndexing && (this.shaderUniformTexelBufferArrayDynamicIndexing = data.shaderUniformTexelBufferArrayDynamicIndexing), void 0 !== data.shaderStorageTexelBufferArrayDynamicIndexing && (this.shaderStorageTexelBufferArrayDynamicIndexing = data.shaderStorageTexelBufferArrayDynamicIndexing), void 0 !== data.shaderUniformBufferArrayNonUniformIndexing && (this.shaderUniformBufferArrayNonUniformIndexing = data.shaderUniformBufferArrayNonUniformIndexing), void 0 !== data.shaderSampledImageArrayNonUniformIndexing && (this.shaderSampledImageArrayNonUniformIndexing = data.shaderSampledImageArrayNonUniformIndexing), void 0 !== data.shaderStorageBufferArrayNonUniformIndexing && (this.shaderStorageBufferArrayNonUniformIndexing = data.shaderStorageBufferArrayNonUniformIndexing), void 0 !== data.shaderStorageImageArrayNonUniformIndexing && (this.shaderStorageImageArrayNonUniformIndexing = data.shaderStorageImageArrayNonUniformIndexing), void 0 !== data.shaderInputAttachmentArrayNonUniformIndexing && (this.shaderInputAttachmentArrayNonUniformIndexing = data.shaderInputAttachmentArrayNonUniformIndexing), void 0 !== data.shaderUniformTexelBufferArrayNonUniformIndexing && (this.shaderUniformTexelBufferArrayNonUniformIndexing = data.shaderUniformTexelBufferArrayNonUniformIndexing), void 0 !== data.shaderStorageTexelBufferArrayNonUniformIndexing && (this.shaderStorageTexelBufferArrayNonUniformIndexing = data.shaderStorageTexelBufferArrayNonUniformIndexing), void 0 !== data.descriptorBindingUniformBufferUpdateAfterBind && (this.descriptorBindingUniformBufferUpdateAfterBind = data.descriptorBindingUniformBufferUpdateAfterBind), void 0 !== data.descriptorBindingSampledImageUpdateAfterBind && (this.descriptorBindingSampledImageUpdateAfterBind = data.descriptorBindingSampledImageUpdateAfterBind), void 0 !== data.descriptorBindingStorageImageUpdateAfterBind && (this.descriptorBindingStorageImageUpdateAfterBind = data.descriptorBindingStorageImageUpdateAfterBind), void 0 !== data.descriptorBindingStorageBufferUpdateAfterBind && (this.descriptorBindingStorageBufferUpdateAfterBind = data.descriptorBindingStorageBufferUpdateAfterBind), void 0 !== data.descriptorBindingUniformTexelBufferUpdateAfterBind && (this.descriptorBindingUniformTexelBufferUpdateAfterBind = data.descriptorBindingUniformTexelBufferUpdateAfterBind), void 0 !== data.descriptorBindingStorageTexelBufferUpdateAfterBind && (this.descriptorBindingStorageTexelBufferUpdateAfterBind = data.descriptorBindingStorageTexelBufferUpdateAfterBind), void 0 !== data.descriptorBindingUpdateUnusedWhilePending && (this.descriptorBindingUpdateUnusedWhilePending = data.descriptorBindingUpdateUnusedWhilePending), void 0 !== data.descriptorBindingPartiallyBound && (this.descriptorBindingPartiallyBound = data.descriptorBindingPartiallyBound), void 0 !== data.descriptorBindingVariableDescriptorCount && (this.descriptorBindingVariableDescriptorCount = data.descriptorBindingVariableDescriptorCount), void 0 !== data.runtimeDescriptorArray && (this.runtimeDescriptorArray = data.runtimeDescriptorArray), void 0 !== data.samplerFilterMinmax && (this.samplerFilterMinmax = data.samplerFilterMinmax), void 0 !== data.scalarBlockLayout && (this.scalarBlockLayout = data.scalarBlockLayout), void 0 !== data.imagelessFramebuffer && (this.imagelessFramebuffer = data.imagelessFramebuffer), void 0 !== data.uniformBufferStandardLayout && (this.uniformBufferStandardLayout = data.uniformBufferStandardLayout), void 0 !== data.shaderSubgroupExtendedTypes && (this.shaderSubgroupExtendedTypes = data.shaderSubgroupExtendedTypes), void 0 !== data.separateDepthStencilLayouts && (this.separateDepthStencilLayouts = data.separateDepthStencilLayouts), void 0 !== data.hostQueryReset && (this.hostQueryReset = data.hostQueryReset), void 0 !== data.timelineSemaphore && (this.timelineSemaphore = data.timelineSemaphore), void 0 !== data.bufferDeviceAddress && (this.bufferDeviceAddress = data.bufferDeviceAddress), void 0 !== data.bufferDeviceAddressCaptureReplay && (this.bufferDeviceAddressCaptureReplay = data.bufferDeviceAddressCaptureReplay), void 0 !== data.bufferDeviceAddressMultiDevice && (this.bufferDeviceAddressMultiDevice = data.bufferDeviceAddressMultiDevice), void 0 !== data.vulkanMemoryModel && (this.vulkanMemoryModel = data.vulkanMemoryModel), void 0 !== data.vulkanMemoryModelDeviceScope && (this.vulkanMemoryModelDeviceScope = data.vulkanMemoryModelDeviceScope), void 0 !== data.vulkanMemoryModelAvailabilityVisibilityChains && (this.vulkanMemoryModelAvailabilityVisibilityChains = data.vulkanMemoryModelAvailabilityVisibilityChains), void 0 !== data.shaderOutputViewportIndex && (this.shaderOutputViewportIndex = data.shaderOutputViewportIndex), void 0 !== data.shaderOutputLayer && (this.shaderOutputLayer = data.shaderOutputLayer), void 0 !== data.subgroupBroadcastDynamicId && (this.subgroupBroadcastDynamicId = data.subgroupBroadcastDynamicId); - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get samplerMirrorClampToEdge() { - return this.#view.getUint32(16, LE); - } - set samplerMirrorClampToEdge(value) { - this.#view.setUint32(16, Number(value), LE); - } - get drawIndirectCount() { - return this.#view.getUint32(20, LE); - } - set drawIndirectCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get storageBuffer8BitAccess() { - return this.#view.getUint32(24, LE); - } - set storageBuffer8BitAccess(value) { - this.#view.setUint32(24, Number(value), LE); - } - get uniformAndStorageBuffer8BitAccess() { - return this.#view.getUint32(28, LE); - } - set uniformAndStorageBuffer8BitAccess(value) { - this.#view.setUint32(28, Number(value), LE); - } - get storagePushConstant8() { - return this.#view.getUint32(32, LE); - } - set storagePushConstant8(value) { - this.#view.setUint32(32, Number(value), LE); - } - get shaderBufferInt64Atomics() { - return this.#view.getUint32(36, LE); - } - set shaderBufferInt64Atomics(value) { - this.#view.setUint32(36, Number(value), LE); - } - get shaderSharedInt64Atomics() { - return this.#view.getUint32(40, LE); - } - set shaderSharedInt64Atomics(value) { - this.#view.setUint32(40, Number(value), LE); - } - get shaderFloat16() { - return this.#view.getUint32(44, LE); - } - set shaderFloat16(value) { - this.#view.setUint32(44, Number(value), LE); - } - get shaderInt8() { - return this.#view.getUint32(48, LE); - } - set shaderInt8(value) { - this.#view.setUint32(48, Number(value), LE); - } - get descriptorIndexing() { - return this.#view.getUint32(52, LE); - } - set descriptorIndexing(value) { - this.#view.setUint32(52, Number(value), LE); - } - get shaderInputAttachmentArrayDynamicIndexing() { - return this.#view.getUint32(56, LE); - } - set shaderInputAttachmentArrayDynamicIndexing(value) { - this.#view.setUint32(56, Number(value), LE); - } - get shaderUniformTexelBufferArrayDynamicIndexing() { - return this.#view.getUint32(60, LE); - } - set shaderUniformTexelBufferArrayDynamicIndexing(value) { - this.#view.setUint32(60, Number(value), LE); - } - get shaderStorageTexelBufferArrayDynamicIndexing() { - return this.#view.getUint32(64, LE); - } - set shaderStorageTexelBufferArrayDynamicIndexing(value) { - this.#view.setUint32(64, Number(value), LE); - } - get shaderUniformBufferArrayNonUniformIndexing() { - return this.#view.getUint32(68, LE); - } - set shaderUniformBufferArrayNonUniformIndexing(value) { - this.#view.setUint32(68, Number(value), LE); - } - get shaderSampledImageArrayNonUniformIndexing() { - return this.#view.getUint32(72, LE); - } - set shaderSampledImageArrayNonUniformIndexing(value) { - this.#view.setUint32(72, Number(value), LE); - } - get shaderStorageBufferArrayNonUniformIndexing() { - return this.#view.getUint32(76, LE); - } - set shaderStorageBufferArrayNonUniformIndexing(value) { - this.#view.setUint32(76, Number(value), LE); - } - get shaderStorageImageArrayNonUniformIndexing() { - return this.#view.getUint32(80, LE); - } - set shaderStorageImageArrayNonUniformIndexing(value) { - this.#view.setUint32(80, Number(value), LE); - } - get shaderInputAttachmentArrayNonUniformIndexing() { - return this.#view.getUint32(84, LE); - } - set shaderInputAttachmentArrayNonUniformIndexing(value) { - this.#view.setUint32(84, Number(value), LE); - } - get shaderUniformTexelBufferArrayNonUniformIndexing() { - return this.#view.getUint32(88, LE); - } - set shaderUniformTexelBufferArrayNonUniformIndexing(value) { - this.#view.setUint32(88, Number(value), LE); - } - get shaderStorageTexelBufferArrayNonUniformIndexing() { - return this.#view.getUint32(92, LE); - } - set shaderStorageTexelBufferArrayNonUniformIndexing(value) { - this.#view.setUint32(92, Number(value), LE); - } - get descriptorBindingUniformBufferUpdateAfterBind() { - return this.#view.getUint32(96, LE); - } - set descriptorBindingUniformBufferUpdateAfterBind(value) { - this.#view.setUint32(96, Number(value), LE); - } - get descriptorBindingSampledImageUpdateAfterBind() { - return this.#view.getUint32(100, LE); - } - set descriptorBindingSampledImageUpdateAfterBind(value) { - this.#view.setUint32(100, Number(value), LE); - } - get descriptorBindingStorageImageUpdateAfterBind() { - return this.#view.getUint32(104, LE); - } - set descriptorBindingStorageImageUpdateAfterBind(value) { - this.#view.setUint32(104, Number(value), LE); - } - get descriptorBindingStorageBufferUpdateAfterBind() { - return this.#view.getUint32(108, LE); - } - set descriptorBindingStorageBufferUpdateAfterBind(value) { - this.#view.setUint32(108, Number(value), LE); - } - get descriptorBindingUniformTexelBufferUpdateAfterBind() { - return this.#view.getUint32(112, LE); - } - set descriptorBindingUniformTexelBufferUpdateAfterBind(value) { - this.#view.setUint32(112, Number(value), LE); - } - get descriptorBindingStorageTexelBufferUpdateAfterBind() { - return this.#view.getUint32(116, LE); - } - set descriptorBindingStorageTexelBufferUpdateAfterBind(value) { - this.#view.setUint32(116, Number(value), LE); - } - get descriptorBindingUpdateUnusedWhilePending() { - return this.#view.getUint32(120, LE); - } - set descriptorBindingUpdateUnusedWhilePending(value) { - this.#view.setUint32(120, Number(value), LE); - } - get descriptorBindingPartiallyBound() { - return this.#view.getUint32(124, LE); - } - set descriptorBindingPartiallyBound(value) { - this.#view.setUint32(124, Number(value), LE); - } - get descriptorBindingVariableDescriptorCount() { - return this.#view.getUint32(128, LE); - } - set descriptorBindingVariableDescriptorCount(value) { - this.#view.setUint32(128, Number(value), LE); - } - get runtimeDescriptorArray() { - return this.#view.getUint32(132, LE); - } - set runtimeDescriptorArray(value) { - this.#view.setUint32(132, Number(value), LE); - } - get samplerFilterMinmax() { - return this.#view.getUint32(136, LE); - } - set samplerFilterMinmax(value) { - this.#view.setUint32(136, Number(value), LE); - } - get scalarBlockLayout() { - return this.#view.getUint32(140, LE); - } - set scalarBlockLayout(value) { - this.#view.setUint32(140, Number(value), LE); - } - get imagelessFramebuffer() { - return this.#view.getUint32(144, LE); - } - set imagelessFramebuffer(value) { - this.#view.setUint32(144, Number(value), LE); - } - get uniformBufferStandardLayout() { - return this.#view.getUint32(148, LE); - } - set uniformBufferStandardLayout(value) { - this.#view.setUint32(148, Number(value), LE); - } - get shaderSubgroupExtendedTypes() { - return this.#view.getUint32(152, LE); - } - set shaderSubgroupExtendedTypes(value) { - this.#view.setUint32(152, Number(value), LE); - } - get separateDepthStencilLayouts() { - return this.#view.getUint32(156, LE); - } - set separateDepthStencilLayouts(value) { - this.#view.setUint32(156, Number(value), LE); - } - get hostQueryReset() { - return this.#view.getUint32(160, LE); - } - set hostQueryReset(value) { - this.#view.setUint32(160, Number(value), LE); - } - get timelineSemaphore() { - return this.#view.getUint32(164, LE); - } - set timelineSemaphore(value) { - this.#view.setUint32(164, Number(value), LE); - } - get bufferDeviceAddress() { - return this.#view.getUint32(168, LE); - } - set bufferDeviceAddress(value) { - this.#view.setUint32(168, Number(value), LE); - } - get bufferDeviceAddressCaptureReplay() { - return this.#view.getUint32(172, LE); - } - set bufferDeviceAddressCaptureReplay(value) { - this.#view.setUint32(172, Number(value), LE); - } - get bufferDeviceAddressMultiDevice() { - return this.#view.getUint32(176, LE); - } - set bufferDeviceAddressMultiDevice(value) { - this.#view.setUint32(176, Number(value), LE); - } - get vulkanMemoryModel() { - return this.#view.getUint32(180, LE); - } - set vulkanMemoryModel(value) { - this.#view.setUint32(180, Number(value), LE); - } - get vulkanMemoryModelDeviceScope() { - return this.#view.getUint32(184, LE); - } - set vulkanMemoryModelDeviceScope(value) { - this.#view.setUint32(184, Number(value), LE); - } - get vulkanMemoryModelAvailabilityVisibilityChains() { - return this.#view.getUint32(188, LE); - } - set vulkanMemoryModelAvailabilityVisibilityChains(value) { - this.#view.setUint32(188, Number(value), LE); - } - get shaderOutputViewportIndex() { - return this.#view.getUint32(192, LE); - } - set shaderOutputViewportIndex(value) { - this.#view.setUint32(192, Number(value), LE); - } - get shaderOutputLayer() { - return this.#view.getUint32(196, LE); - } - set shaderOutputLayer(value) { - this.#view.setUint32(196, Number(value), LE); - } - get subgroupBroadcastDynamicId() { - return this.#view.getUint32(200, LE); - } - set subgroupBroadcastDynamicId(value) { - this.#view.setUint32(200, Number(value), LE); - } -} -export class PhysicalDeviceVulkan12Properties { - static size = 736; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVulkan12Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan12Properties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan12Properties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVulkan12Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.driverID && (this.driverID = data.driverID), void 0 !== data.driverName && (this.driverName = data.driverName), void 0 !== data.driverInfo && (this.driverInfo = data.driverInfo), void 0 !== data.conformanceVersion && (this.conformanceVersion = data.conformanceVersion), void 0 !== data.denormBehaviorIndependence && (this.denormBehaviorIndependence = data.denormBehaviorIndependence), void 0 !== data.roundingModeIndependence && (this.roundingModeIndependence = data.roundingModeIndependence), void 0 !== data.shaderSignedZeroInfNanPreserveFloat16 && (this.shaderSignedZeroInfNanPreserveFloat16 = data.shaderSignedZeroInfNanPreserveFloat16), void 0 !== data.shaderSignedZeroInfNanPreserveFloat32 && (this.shaderSignedZeroInfNanPreserveFloat32 = data.shaderSignedZeroInfNanPreserveFloat32), void 0 !== data.shaderSignedZeroInfNanPreserveFloat64 && (this.shaderSignedZeroInfNanPreserveFloat64 = data.shaderSignedZeroInfNanPreserveFloat64), void 0 !== data.shaderDenormPreserveFloat16 && (this.shaderDenormPreserveFloat16 = data.shaderDenormPreserveFloat16), void 0 !== data.shaderDenormPreserveFloat32 && (this.shaderDenormPreserveFloat32 = data.shaderDenormPreserveFloat32), void 0 !== data.shaderDenormPreserveFloat64 && (this.shaderDenormPreserveFloat64 = data.shaderDenormPreserveFloat64), void 0 !== data.shaderDenormFlushToZeroFloat16 && (this.shaderDenormFlushToZeroFloat16 = data.shaderDenormFlushToZeroFloat16), void 0 !== data.shaderDenormFlushToZeroFloat32 && (this.shaderDenormFlushToZeroFloat32 = data.shaderDenormFlushToZeroFloat32), void 0 !== data.shaderDenormFlushToZeroFloat64 && (this.shaderDenormFlushToZeroFloat64 = data.shaderDenormFlushToZeroFloat64), void 0 !== data.shaderRoundingModeRTEFloat16 && (this.shaderRoundingModeRTEFloat16 = data.shaderRoundingModeRTEFloat16), void 0 !== data.shaderRoundingModeRTEFloat32 && (this.shaderRoundingModeRTEFloat32 = data.shaderRoundingModeRTEFloat32), void 0 !== data.shaderRoundingModeRTEFloat64 && (this.shaderRoundingModeRTEFloat64 = data.shaderRoundingModeRTEFloat64), void 0 !== data.shaderRoundingModeRTZFloat16 && (this.shaderRoundingModeRTZFloat16 = data.shaderRoundingModeRTZFloat16), void 0 !== data.shaderRoundingModeRTZFloat32 && (this.shaderRoundingModeRTZFloat32 = data.shaderRoundingModeRTZFloat32), void 0 !== data.shaderRoundingModeRTZFloat64 && (this.shaderRoundingModeRTZFloat64 = data.shaderRoundingModeRTZFloat64), void 0 !== data.maxUpdateAfterBindDescriptorsInAllPools && (this.maxUpdateAfterBindDescriptorsInAllPools = data.maxUpdateAfterBindDescriptorsInAllPools), void 0 !== data.shaderUniformBufferArrayNonUniformIndexingNative && (this.shaderUniformBufferArrayNonUniformIndexingNative = data.shaderUniformBufferArrayNonUniformIndexingNative), void 0 !== data.shaderSampledImageArrayNonUniformIndexingNative && (this.shaderSampledImageArrayNonUniformIndexingNative = data.shaderSampledImageArrayNonUniformIndexingNative), void 0 !== data.shaderStorageBufferArrayNonUniformIndexingNative && (this.shaderStorageBufferArrayNonUniformIndexingNative = data.shaderStorageBufferArrayNonUniformIndexingNative), void 0 !== data.shaderStorageImageArrayNonUniformIndexingNative && (this.shaderStorageImageArrayNonUniformIndexingNative = data.shaderStorageImageArrayNonUniformIndexingNative), void 0 !== data.shaderInputAttachmentArrayNonUniformIndexingNative && (this.shaderInputAttachmentArrayNonUniformIndexingNative = data.shaderInputAttachmentArrayNonUniformIndexingNative), void 0 !== data.robustBufferAccessUpdateAfterBind && (this.robustBufferAccessUpdateAfterBind = data.robustBufferAccessUpdateAfterBind), void 0 !== data.quadDivergentImplicitLod && (this.quadDivergentImplicitLod = data.quadDivergentImplicitLod), void 0 !== data.maxPerStageDescriptorUpdateAfterBindSamplers && (this.maxPerStageDescriptorUpdateAfterBindSamplers = data.maxPerStageDescriptorUpdateAfterBindSamplers), void 0 !== data.maxPerStageDescriptorUpdateAfterBindUniformBuffers && (this.maxPerStageDescriptorUpdateAfterBindUniformBuffers = data.maxPerStageDescriptorUpdateAfterBindUniformBuffers), void 0 !== data.maxPerStageDescriptorUpdateAfterBindStorageBuffers && (this.maxPerStageDescriptorUpdateAfterBindStorageBuffers = data.maxPerStageDescriptorUpdateAfterBindStorageBuffers), void 0 !== data.maxPerStageDescriptorUpdateAfterBindSampledImages && (this.maxPerStageDescriptorUpdateAfterBindSampledImages = data.maxPerStageDescriptorUpdateAfterBindSampledImages), void 0 !== data.maxPerStageDescriptorUpdateAfterBindStorageImages && (this.maxPerStageDescriptorUpdateAfterBindStorageImages = data.maxPerStageDescriptorUpdateAfterBindStorageImages), void 0 !== data.maxPerStageDescriptorUpdateAfterBindInputAttachments && (this.maxPerStageDescriptorUpdateAfterBindInputAttachments = data.maxPerStageDescriptorUpdateAfterBindInputAttachments), void 0 !== data.maxPerStageUpdateAfterBindResources && (this.maxPerStageUpdateAfterBindResources = data.maxPerStageUpdateAfterBindResources), void 0 !== data.maxDescriptorSetUpdateAfterBindSamplers && (this.maxDescriptorSetUpdateAfterBindSamplers = data.maxDescriptorSetUpdateAfterBindSamplers), void 0 !== data.maxDescriptorSetUpdateAfterBindUniformBuffers && (this.maxDescriptorSetUpdateAfterBindUniformBuffers = data.maxDescriptorSetUpdateAfterBindUniformBuffers), void 0 !== data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic && (this.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic), void 0 !== data.maxDescriptorSetUpdateAfterBindStorageBuffers && (this.maxDescriptorSetUpdateAfterBindStorageBuffers = data.maxDescriptorSetUpdateAfterBindStorageBuffers), void 0 !== data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic && (this.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic), void 0 !== data.maxDescriptorSetUpdateAfterBindSampledImages && (this.maxDescriptorSetUpdateAfterBindSampledImages = data.maxDescriptorSetUpdateAfterBindSampledImages), void 0 !== data.maxDescriptorSetUpdateAfterBindStorageImages && (this.maxDescriptorSetUpdateAfterBindStorageImages = data.maxDescriptorSetUpdateAfterBindStorageImages), void 0 !== data.maxDescriptorSetUpdateAfterBindInputAttachments && (this.maxDescriptorSetUpdateAfterBindInputAttachments = data.maxDescriptorSetUpdateAfterBindInputAttachments), void 0 !== data.supportedDepthResolveModes && (this.supportedDepthResolveModes = data.supportedDepthResolveModes), void 0 !== data.supportedStencilResolveModes && (this.supportedStencilResolveModes = data.supportedStencilResolveModes), void 0 !== data.independentResolveNone && (this.independentResolveNone = data.independentResolveNone), void 0 !== data.independentResolve && (this.independentResolve = data.independentResolve), void 0 !== data.filterMinmaxSingleComponentFormats && (this.filterMinmaxSingleComponentFormats = data.filterMinmaxSingleComponentFormats), void 0 !== data.filterMinmaxImageComponentMapping && (this.filterMinmaxImageComponentMapping = data.filterMinmaxImageComponentMapping), void 0 !== data.maxTimelineSemaphoreValueDifference && (this.maxTimelineSemaphoreValueDifference = data.maxTimelineSemaphoreValueDifference), void 0 !== data.framebufferIntegerColorSampleCounts && (this.framebufferIntegerColorSampleCounts = data.framebufferIntegerColorSampleCounts); - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get driverID() { - return this.#view.getUint32(16, LE); - } - set driverID(value) { - this.#view.setUint32(16, Number(value), LE); - } - get driverName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - set driverName(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - get driverInfo() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); - } - set driverInfo(value) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - get conformanceVersion() { - return new ConformanceVersion(this.#data.subarray(532, 532 + ConformanceVersion.size)); - } - set conformanceVersion(value) { - if (value[BUFFER].byteLength < ConformanceVersion.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 532); - } - get denormBehaviorIndependence() { - return this.#view.getUint32(536, LE); - } - set denormBehaviorIndependence(value) { - this.#view.setUint32(536, Number(value), LE); - } - get roundingModeIndependence() { - return this.#view.getUint32(540, LE); - } - set roundingModeIndependence(value) { - this.#view.setUint32(540, Number(value), LE); - } - get shaderSignedZeroInfNanPreserveFloat16() { - return this.#view.getUint32(544, LE); - } - set shaderSignedZeroInfNanPreserveFloat16(value) { - this.#view.setUint32(544, Number(value), LE); - } - get shaderSignedZeroInfNanPreserveFloat32() { - return this.#view.getUint32(548, LE); - } - set shaderSignedZeroInfNanPreserveFloat32(value) { - this.#view.setUint32(548, Number(value), LE); - } - get shaderSignedZeroInfNanPreserveFloat64() { - return this.#view.getUint32(552, LE); - } - set shaderSignedZeroInfNanPreserveFloat64(value) { - this.#view.setUint32(552, Number(value), LE); - } - get shaderDenormPreserveFloat16() { - return this.#view.getUint32(556, LE); - } - set shaderDenormPreserveFloat16(value) { - this.#view.setUint32(556, Number(value), LE); - } - get shaderDenormPreserveFloat32() { - return this.#view.getUint32(560, LE); - } - set shaderDenormPreserveFloat32(value) { - this.#view.setUint32(560, Number(value), LE); - } - get shaderDenormPreserveFloat64() { - return this.#view.getUint32(564, LE); - } - set shaderDenormPreserveFloat64(value) { - this.#view.setUint32(564, Number(value), LE); - } - get shaderDenormFlushToZeroFloat16() { - return this.#view.getUint32(568, LE); - } - set shaderDenormFlushToZeroFloat16(value) { - this.#view.setUint32(568, Number(value), LE); - } - get shaderDenormFlushToZeroFloat32() { - return this.#view.getUint32(572, LE); - } - set shaderDenormFlushToZeroFloat32(value) { - this.#view.setUint32(572, Number(value), LE); - } - get shaderDenormFlushToZeroFloat64() { - return this.#view.getUint32(576, LE); - } - set shaderDenormFlushToZeroFloat64(value) { - this.#view.setUint32(576, Number(value), LE); - } - get shaderRoundingModeRTEFloat16() { - return this.#view.getUint32(580, LE); - } - set shaderRoundingModeRTEFloat16(value) { - this.#view.setUint32(580, Number(value), LE); - } - get shaderRoundingModeRTEFloat32() { - return this.#view.getUint32(584, LE); - } - set shaderRoundingModeRTEFloat32(value) { - this.#view.setUint32(584, Number(value), LE); - } - get shaderRoundingModeRTEFloat64() { - return this.#view.getUint32(588, LE); - } - set shaderRoundingModeRTEFloat64(value) { - this.#view.setUint32(588, Number(value), LE); - } - get shaderRoundingModeRTZFloat16() { - return this.#view.getUint32(592, LE); - } - set shaderRoundingModeRTZFloat16(value) { - this.#view.setUint32(592, Number(value), LE); - } - get shaderRoundingModeRTZFloat32() { - return this.#view.getUint32(596, LE); - } - set shaderRoundingModeRTZFloat32(value) { - this.#view.setUint32(596, Number(value), LE); - } - get shaderRoundingModeRTZFloat64() { - return this.#view.getUint32(600, LE); - } - set shaderRoundingModeRTZFloat64(value) { - this.#view.setUint32(600, Number(value), LE); - } - get maxUpdateAfterBindDescriptorsInAllPools() { - return this.#view.getUint32(604, LE); - } - set maxUpdateAfterBindDescriptorsInAllPools(value) { - this.#view.setUint32(604, Number(value), LE); - } - get shaderUniformBufferArrayNonUniformIndexingNative() { - return this.#view.getUint32(608, LE); - } - set shaderUniformBufferArrayNonUniformIndexingNative(value) { - this.#view.setUint32(608, Number(value), LE); - } - get shaderSampledImageArrayNonUniformIndexingNative() { - return this.#view.getUint32(612, LE); - } - set shaderSampledImageArrayNonUniformIndexingNative(value) { - this.#view.setUint32(612, Number(value), LE); - } - get shaderStorageBufferArrayNonUniformIndexingNative() { - return this.#view.getUint32(616, LE); - } - set shaderStorageBufferArrayNonUniformIndexingNative(value) { - this.#view.setUint32(616, Number(value), LE); - } - get shaderStorageImageArrayNonUniformIndexingNative() { - return this.#view.getUint32(620, LE); - } - set shaderStorageImageArrayNonUniformIndexingNative(value) { - this.#view.setUint32(620, Number(value), LE); - } - get shaderInputAttachmentArrayNonUniformIndexingNative() { - return this.#view.getUint32(624, LE); - } - set shaderInputAttachmentArrayNonUniformIndexingNative(value) { - this.#view.setUint32(624, Number(value), LE); - } - get robustBufferAccessUpdateAfterBind() { - return this.#view.getUint32(628, LE); - } - set robustBufferAccessUpdateAfterBind(value) { - this.#view.setUint32(628, Number(value), LE); - } - get quadDivergentImplicitLod() { - return this.#view.getUint32(632, LE); - } - set quadDivergentImplicitLod(value) { - this.#view.setUint32(632, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindSamplers() { - return this.#view.getUint32(636, LE); - } - set maxPerStageDescriptorUpdateAfterBindSamplers(value) { - this.#view.setUint32(636, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindUniformBuffers() { - return this.#view.getUint32(640, LE); - } - set maxPerStageDescriptorUpdateAfterBindUniformBuffers(value) { - this.#view.setUint32(640, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindStorageBuffers() { - return this.#view.getUint32(644, LE); - } - set maxPerStageDescriptorUpdateAfterBindStorageBuffers(value) { - this.#view.setUint32(644, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindSampledImages() { - return this.#view.getUint32(648, LE); - } - set maxPerStageDescriptorUpdateAfterBindSampledImages(value) { - this.#view.setUint32(648, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindStorageImages() { - return this.#view.getUint32(652, LE); - } - set maxPerStageDescriptorUpdateAfterBindStorageImages(value) { - this.#view.setUint32(652, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindInputAttachments() { - return this.#view.getUint32(656, LE); - } - set maxPerStageDescriptorUpdateAfterBindInputAttachments(value) { - this.#view.setUint32(656, Number(value), LE); - } - get maxPerStageUpdateAfterBindResources() { - return this.#view.getUint32(660, LE); - } - set maxPerStageUpdateAfterBindResources(value) { - this.#view.setUint32(660, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindSamplers() { - return this.#view.getUint32(664, LE); - } - set maxDescriptorSetUpdateAfterBindSamplers(value) { - this.#view.setUint32(664, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindUniformBuffers() { - return this.#view.getUint32(668, LE); - } - set maxDescriptorSetUpdateAfterBindUniformBuffers(value) { - this.#view.setUint32(668, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindUniformBuffersDynamic() { - return this.#view.getUint32(672, LE); - } - set maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(value) { - this.#view.setUint32(672, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindStorageBuffers() { - return this.#view.getUint32(676, LE); - } - set maxDescriptorSetUpdateAfterBindStorageBuffers(value) { - this.#view.setUint32(676, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindStorageBuffersDynamic() { - return this.#view.getUint32(680, LE); - } - set maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(value) { - this.#view.setUint32(680, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindSampledImages() { - return this.#view.getUint32(684, LE); - } - set maxDescriptorSetUpdateAfterBindSampledImages(value) { - this.#view.setUint32(684, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindStorageImages() { - return this.#view.getUint32(688, LE); - } - set maxDescriptorSetUpdateAfterBindStorageImages(value) { - this.#view.setUint32(688, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindInputAttachments() { - return this.#view.getUint32(692, LE); - } - set maxDescriptorSetUpdateAfterBindInputAttachments(value) { - this.#view.setUint32(692, Number(value), LE); - } - get supportedDepthResolveModes() { - return this.#view.getUint32(696, LE); - } - set supportedDepthResolveModes(value) { - this.#view.setUint32(696, Number(value), LE); - } - get supportedStencilResolveModes() { - return this.#view.getUint32(700, LE); - } - set supportedStencilResolveModes(value) { - this.#view.setUint32(700, Number(value), LE); - } - get independentResolveNone() { - return this.#view.getUint32(704, LE); - } - set independentResolveNone(value) { - this.#view.setUint32(704, Number(value), LE); - } - get independentResolve() { - return this.#view.getUint32(708, LE); - } - set independentResolve(value) { - this.#view.setUint32(708, Number(value), LE); - } - get filterMinmaxSingleComponentFormats() { - return this.#view.getUint32(712, LE); - } - set filterMinmaxSingleComponentFormats(value) { - this.#view.setUint32(712, Number(value), LE); - } - get filterMinmaxImageComponentMapping() { - return this.#view.getUint32(716, LE); - } - set filterMinmaxImageComponentMapping(value) { - this.#view.setUint32(716, Number(value), LE); - } - get maxTimelineSemaphoreValueDifference() { - return this.#view.getBigUint64(720, LE); - } - set maxTimelineSemaphoreValueDifference(value) { - this.#view.setBigUint64(720, BigInt(value), LE); - } - get framebufferIntegerColorSampleCounts() { - return this.#view.getUint32(728, LE); - } - set framebufferIntegerColorSampleCounts(value) { - this.#view.setUint32(728, Number(value), LE); - } -} -export class PhysicalDeviceVulkan13Features { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVulkan13Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan13Features.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan13Features.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVulkan13Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.robustImageAccess && (this.robustImageAccess = data.robustImageAccess), void 0 !== data.inlineUniformBlock && (this.inlineUniformBlock = data.inlineUniformBlock), void 0 !== data.descriptorBindingInlineUniformBlockUpdateAfterBind && (this.descriptorBindingInlineUniformBlockUpdateAfterBind = data.descriptorBindingInlineUniformBlockUpdateAfterBind), void 0 !== data.pipelineCreationCacheControl && (this.pipelineCreationCacheControl = data.pipelineCreationCacheControl), void 0 !== data.privateData && (this.privateData = data.privateData), void 0 !== data.shaderDemoteToHelperInvocation && (this.shaderDemoteToHelperInvocation = data.shaderDemoteToHelperInvocation), void 0 !== data.shaderTerminateInvocation && (this.shaderTerminateInvocation = data.shaderTerminateInvocation), void 0 !== data.subgroupSizeControl && (this.subgroupSizeControl = data.subgroupSizeControl), void 0 !== data.computeFullSubgroups && (this.computeFullSubgroups = data.computeFullSubgroups), void 0 !== data.synchronization2 && (this.synchronization2 = data.synchronization2), void 0 !== data.textureCompressionASTC_HDR && (this.textureCompressionASTC_HDR = data.textureCompressionASTC_HDR), void 0 !== data.shaderZeroInitializeWorkgroupMemory && (this.shaderZeroInitializeWorkgroupMemory = data.shaderZeroInitializeWorkgroupMemory), void 0 !== data.dynamicRendering && (this.dynamicRendering = data.dynamicRendering), void 0 !== data.shaderIntegerDotProduct && (this.shaderIntegerDotProduct = data.shaderIntegerDotProduct), void 0 !== data.maintenance4 && (this.maintenance4 = data.maintenance4); - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get robustImageAccess() { - return this.#view.getUint32(16, LE); - } - set robustImageAccess(value) { - this.#view.setUint32(16, Number(value), LE); - } - get inlineUniformBlock() { - return this.#view.getUint32(20, LE); - } - set inlineUniformBlock(value) { - this.#view.setUint32(20, Number(value), LE); - } - get descriptorBindingInlineUniformBlockUpdateAfterBind() { - return this.#view.getUint32(24, LE); - } - set descriptorBindingInlineUniformBlockUpdateAfterBind(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pipelineCreationCacheControl() { - return this.#view.getUint32(28, LE); - } - set pipelineCreationCacheControl(value) { - this.#view.setUint32(28, Number(value), LE); - } - get privateData() { - return this.#view.getUint32(32, LE); - } - set privateData(value) { - this.#view.setUint32(32, Number(value), LE); - } - get shaderDemoteToHelperInvocation() { - return this.#view.getUint32(36, LE); - } - set shaderDemoteToHelperInvocation(value) { - this.#view.setUint32(36, Number(value), LE); - } - get shaderTerminateInvocation() { - return this.#view.getUint32(40, LE); - } - set shaderTerminateInvocation(value) { - this.#view.setUint32(40, Number(value), LE); - } - get subgroupSizeControl() { - return this.#view.getUint32(44, LE); - } - set subgroupSizeControl(value) { - this.#view.setUint32(44, Number(value), LE); - } - get computeFullSubgroups() { - return this.#view.getUint32(48, LE); - } - set computeFullSubgroups(value) { - this.#view.setUint32(48, Number(value), LE); - } - get synchronization2() { - return this.#view.getUint32(52, LE); - } - set synchronization2(value) { - this.#view.setUint32(52, Number(value), LE); - } - get textureCompressionASTC_HDR() { - return this.#view.getUint32(56, LE); - } - set textureCompressionASTC_HDR(value) { - this.#view.setUint32(56, Number(value), LE); - } - get shaderZeroInitializeWorkgroupMemory() { - return this.#view.getUint32(60, LE); - } - set shaderZeroInitializeWorkgroupMemory(value) { - this.#view.setUint32(60, Number(value), LE); - } - get dynamicRendering() { - return this.#view.getUint32(64, LE); - } - set dynamicRendering(value) { - this.#view.setUint32(64, Number(value), LE); - } - get shaderIntegerDotProduct() { - return this.#view.getUint32(68, LE); - } - set shaderIntegerDotProduct(value) { - this.#view.setUint32(68, Number(value), LE); - } - get maintenance4() { - return this.#view.getUint32(72, LE); - } - set maintenance4(value) { - this.#view.setUint32(72, Number(value), LE); - } -} -export class PhysicalDeviceVulkan13Properties { - static size = 216; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVulkan13Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan13Properties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan13Properties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVulkan13Properties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minSubgroupSize && (this.minSubgroupSize = data.minSubgroupSize), void 0 !== data.maxSubgroupSize && (this.maxSubgroupSize = data.maxSubgroupSize), void 0 !== data.maxComputeWorkgroupSubgroups && (this.maxComputeWorkgroupSubgroups = data.maxComputeWorkgroupSubgroups), void 0 !== data.requiredSubgroupSizeStages && (this.requiredSubgroupSizeStages = data.requiredSubgroupSizeStages), void 0 !== data.maxInlineUniformBlockSize && (this.maxInlineUniformBlockSize = data.maxInlineUniformBlockSize), void 0 !== data.maxPerStageDescriptorInlineUniformBlocks && (this.maxPerStageDescriptorInlineUniformBlocks = data.maxPerStageDescriptorInlineUniformBlocks), void 0 !== data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks && (this.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks), void 0 !== data.maxDescriptorSetInlineUniformBlocks && (this.maxDescriptorSetInlineUniformBlocks = data.maxDescriptorSetInlineUniformBlocks), void 0 !== data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks && (this.maxDescriptorSetUpdateAfterBindInlineUniformBlocks = data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks), void 0 !== data.maxInlineUniformTotalSize && (this.maxInlineUniformTotalSize = data.maxInlineUniformTotalSize), void 0 !== data.integerDotProduct8BitUnsignedAccelerated && (this.integerDotProduct8BitUnsignedAccelerated = data.integerDotProduct8BitUnsignedAccelerated), void 0 !== data.integerDotProduct8BitSignedAccelerated && (this.integerDotProduct8BitSignedAccelerated = data.integerDotProduct8BitSignedAccelerated), void 0 !== data.integerDotProduct8BitMixedSignednessAccelerated && (this.integerDotProduct8BitMixedSignednessAccelerated = data.integerDotProduct8BitMixedSignednessAccelerated), void 0 !== data.integerDotProduct4x8BitPackedUnsignedAccelerated && (this.integerDotProduct4x8BitPackedUnsignedAccelerated = data.integerDotProduct4x8BitPackedUnsignedAccelerated), void 0 !== data.integerDotProduct4x8BitPackedSignedAccelerated && (this.integerDotProduct4x8BitPackedSignedAccelerated = data.integerDotProduct4x8BitPackedSignedAccelerated), void 0 !== data.integerDotProduct4x8BitPackedMixedSignednessAccelerated && (this.integerDotProduct4x8BitPackedMixedSignednessAccelerated = data.integerDotProduct4x8BitPackedMixedSignednessAccelerated), void 0 !== data.integerDotProduct16BitUnsignedAccelerated && (this.integerDotProduct16BitUnsignedAccelerated = data.integerDotProduct16BitUnsignedAccelerated), void 0 !== data.integerDotProduct16BitSignedAccelerated && (this.integerDotProduct16BitSignedAccelerated = data.integerDotProduct16BitSignedAccelerated), void 0 !== data.integerDotProduct16BitMixedSignednessAccelerated && (this.integerDotProduct16BitMixedSignednessAccelerated = data.integerDotProduct16BitMixedSignednessAccelerated), void 0 !== data.integerDotProduct32BitUnsignedAccelerated && (this.integerDotProduct32BitUnsignedAccelerated = data.integerDotProduct32BitUnsignedAccelerated), void 0 !== data.integerDotProduct32BitSignedAccelerated && (this.integerDotProduct32BitSignedAccelerated = data.integerDotProduct32BitSignedAccelerated), void 0 !== data.integerDotProduct32BitMixedSignednessAccelerated && (this.integerDotProduct32BitMixedSignednessAccelerated = data.integerDotProduct32BitMixedSignednessAccelerated), void 0 !== data.integerDotProduct64BitUnsignedAccelerated && (this.integerDotProduct64BitUnsignedAccelerated = data.integerDotProduct64BitUnsignedAccelerated), void 0 !== data.integerDotProduct64BitSignedAccelerated && (this.integerDotProduct64BitSignedAccelerated = data.integerDotProduct64BitSignedAccelerated), void 0 !== data.integerDotProduct64BitMixedSignednessAccelerated && (this.integerDotProduct64BitMixedSignednessAccelerated = data.integerDotProduct64BitMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating8BitSignedAccelerated && (this.integerDotProductAccumulatingSaturating8BitSignedAccelerated = data.integerDotProductAccumulatingSaturating8BitSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated && (this.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating16BitSignedAccelerated && (this.integerDotProductAccumulatingSaturating16BitSignedAccelerated = data.integerDotProductAccumulatingSaturating16BitSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating32BitSignedAccelerated && (this.integerDotProductAccumulatingSaturating32BitSignedAccelerated = data.integerDotProductAccumulatingSaturating32BitSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating64BitSignedAccelerated && (this.integerDotProductAccumulatingSaturating64BitSignedAccelerated = data.integerDotProductAccumulatingSaturating64BitSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated), void 0 !== data.storageTexelBufferOffsetAlignmentBytes && (this.storageTexelBufferOffsetAlignmentBytes = data.storageTexelBufferOffsetAlignmentBytes), void 0 !== data.storageTexelBufferOffsetSingleTexelAlignment && (this.storageTexelBufferOffsetSingleTexelAlignment = data.storageTexelBufferOffsetSingleTexelAlignment), void 0 !== data.uniformTexelBufferOffsetAlignmentBytes && (this.uniformTexelBufferOffsetAlignmentBytes = data.uniformTexelBufferOffsetAlignmentBytes), void 0 !== data.uniformTexelBufferOffsetSingleTexelAlignment && (this.uniformTexelBufferOffsetSingleTexelAlignment = data.uniformTexelBufferOffsetSingleTexelAlignment), void 0 !== data.maxBufferSize && (this.maxBufferSize = data.maxBufferSize); - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minSubgroupSize() { - return this.#view.getUint32(16, LE); - } - set minSubgroupSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxSubgroupSize() { - return this.#view.getUint32(20, LE); - } - set maxSubgroupSize(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxComputeWorkgroupSubgroups() { - return this.#view.getUint32(24, LE); - } - set maxComputeWorkgroupSubgroups(value) { - this.#view.setUint32(24, Number(value), LE); - } - get requiredSubgroupSizeStages() { - return this.#view.getUint32(28, LE); - } - set requiredSubgroupSizeStages(value) { - this.#view.setUint32(28, Number(value), LE); - } - get maxInlineUniformBlockSize() { - return this.#view.getUint32(32, LE); - } - set maxInlineUniformBlockSize(value) { - this.#view.setUint32(32, Number(value), LE); - } - get maxPerStageDescriptorInlineUniformBlocks() { - return this.#view.getUint32(36, LE); - } - set maxPerStageDescriptorInlineUniformBlocks(value) { - this.#view.setUint32(36, Number(value), LE); - } - get maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks() { - return this.#view.getUint32(40, LE); - } - set maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(value) { - this.#view.setUint32(40, Number(value), LE); - } - get maxDescriptorSetInlineUniformBlocks() { - return this.#view.getUint32(44, LE); - } - set maxDescriptorSetInlineUniformBlocks(value) { - this.#view.setUint32(44, Number(value), LE); - } - get maxDescriptorSetUpdateAfterBindInlineUniformBlocks() { - return this.#view.getUint32(48, LE); - } - set maxDescriptorSetUpdateAfterBindInlineUniformBlocks(value) { - this.#view.setUint32(48, Number(value), LE); - } - get maxInlineUniformTotalSize() { - return this.#view.getUint32(52, LE); - } - set maxInlineUniformTotalSize(value) { - this.#view.setUint32(52, Number(value), LE); - } - get integerDotProduct8BitUnsignedAccelerated() { - return this.#view.getUint32(56, LE); - } - set integerDotProduct8BitUnsignedAccelerated(value) { - this.#view.setUint32(56, Number(value), LE); - } - get integerDotProduct8BitSignedAccelerated() { - return this.#view.getUint32(60, LE); - } - set integerDotProduct8BitSignedAccelerated(value) { - this.#view.setUint32(60, Number(value), LE); - } - get integerDotProduct8BitMixedSignednessAccelerated() { - return this.#view.getUint32(64, LE); - } - set integerDotProduct8BitMixedSignednessAccelerated(value) { - this.#view.setUint32(64, Number(value), LE); - } - get integerDotProduct4x8BitPackedUnsignedAccelerated() { - return this.#view.getUint32(68, LE); - } - set integerDotProduct4x8BitPackedUnsignedAccelerated(value) { - this.#view.setUint32(68, Number(value), LE); - } - get integerDotProduct4x8BitPackedSignedAccelerated() { - return this.#view.getUint32(72, LE); - } - set integerDotProduct4x8BitPackedSignedAccelerated(value) { - this.#view.setUint32(72, Number(value), LE); - } - get integerDotProduct4x8BitPackedMixedSignednessAccelerated() { - return this.#view.getUint32(76, LE); - } - set integerDotProduct4x8BitPackedMixedSignednessAccelerated(value) { - this.#view.setUint32(76, Number(value), LE); - } - get integerDotProduct16BitUnsignedAccelerated() { - return this.#view.getUint32(80, LE); - } - set integerDotProduct16BitUnsignedAccelerated(value) { - this.#view.setUint32(80, Number(value), LE); - } - get integerDotProduct16BitSignedAccelerated() { - return this.#view.getUint32(84, LE); - } - set integerDotProduct16BitSignedAccelerated(value) { - this.#view.setUint32(84, Number(value), LE); - } - get integerDotProduct16BitMixedSignednessAccelerated() { - return this.#view.getUint32(88, LE); - } - set integerDotProduct16BitMixedSignednessAccelerated(value) { - this.#view.setUint32(88, Number(value), LE); - } - get integerDotProduct32BitUnsignedAccelerated() { - return this.#view.getUint32(92, LE); - } - set integerDotProduct32BitUnsignedAccelerated(value) { - this.#view.setUint32(92, Number(value), LE); - } - get integerDotProduct32BitSignedAccelerated() { - return this.#view.getUint32(96, LE); - } - set integerDotProduct32BitSignedAccelerated(value) { - this.#view.setUint32(96, Number(value), LE); - } - get integerDotProduct32BitMixedSignednessAccelerated() { - return this.#view.getUint32(100, LE); - } - set integerDotProduct32BitMixedSignednessAccelerated(value) { - this.#view.setUint32(100, Number(value), LE); - } - get integerDotProduct64BitUnsignedAccelerated() { - return this.#view.getUint32(104, LE); - } - set integerDotProduct64BitUnsignedAccelerated(value) { - this.#view.setUint32(104, Number(value), LE); - } - get integerDotProduct64BitSignedAccelerated() { - return this.#view.getUint32(108, LE); - } - set integerDotProduct64BitSignedAccelerated(value) { - this.#view.setUint32(108, Number(value), LE); - } - get integerDotProduct64BitMixedSignednessAccelerated() { - return this.#view.getUint32(112, LE); - } - set integerDotProduct64BitMixedSignednessAccelerated(value) { - this.#view.setUint32(112, Number(value), LE); - } - get integerDotProductAccumulatingSaturating8BitUnsignedAccelerated() { - return this.#view.getUint32(116, LE); - } - set integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(value) { - this.#view.setUint32(116, Number(value), LE); - } - get integerDotProductAccumulatingSaturating8BitSignedAccelerated() { - return this.#view.getUint32(120, LE); - } - set integerDotProductAccumulatingSaturating8BitSignedAccelerated(value) { - this.#view.setUint32(120, Number(value), LE); - } - get integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated() { - return this.#view.getUint32(124, LE); - } - set integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(value) { - this.#view.setUint32(124, Number(value), LE); - } - get integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated() { - return this.#view.getUint32(128, LE); - } - set integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(value) { - this.#view.setUint32(128, Number(value), LE); - } - get integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated() { - return this.#view.getUint32(132, LE); - } - set integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(value) { - this.#view.setUint32(132, Number(value), LE); - } - get integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated() { - return this.#view.getUint32(136, LE); - } - set integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(value) { - this.#view.setUint32(136, Number(value), LE); - } - get integerDotProductAccumulatingSaturating16BitUnsignedAccelerated() { - return this.#view.getUint32(140, LE); - } - set integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(value) { - this.#view.setUint32(140, Number(value), LE); - } - get integerDotProductAccumulatingSaturating16BitSignedAccelerated() { - return this.#view.getUint32(144, LE); - } - set integerDotProductAccumulatingSaturating16BitSignedAccelerated(value) { - this.#view.setUint32(144, Number(value), LE); - } - get integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated() { - return this.#view.getUint32(148, LE); - } - set integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(value) { - this.#view.setUint32(148, Number(value), LE); - } - get integerDotProductAccumulatingSaturating32BitUnsignedAccelerated() { - return this.#view.getUint32(152, LE); - } - set integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(value) { - this.#view.setUint32(152, Number(value), LE); - } - get integerDotProductAccumulatingSaturating32BitSignedAccelerated() { - return this.#view.getUint32(156, LE); - } - set integerDotProductAccumulatingSaturating32BitSignedAccelerated(value) { - this.#view.setUint32(156, Number(value), LE); - } - get integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated() { - return this.#view.getUint32(160, LE); - } - set integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(value) { - this.#view.setUint32(160, Number(value), LE); - } - get integerDotProductAccumulatingSaturating64BitUnsignedAccelerated() { - return this.#view.getUint32(164, LE); - } - set integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(value) { - this.#view.setUint32(164, Number(value), LE); - } - get integerDotProductAccumulatingSaturating64BitSignedAccelerated() { - return this.#view.getUint32(168, LE); - } - set integerDotProductAccumulatingSaturating64BitSignedAccelerated(value) { - this.#view.setUint32(168, Number(value), LE); - } - get integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated() { - return this.#view.getUint32(172, LE); - } - set integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(value) { - this.#view.setUint32(172, Number(value), LE); - } - get storageTexelBufferOffsetAlignmentBytes() { - return this.#view.getBigUint64(176, LE); - } - set storageTexelBufferOffsetAlignmentBytes(value) { - this.#view.setBigUint64(176, BigInt(value), LE); - } - get storageTexelBufferOffsetSingleTexelAlignment() { - return this.#view.getUint32(184, LE); - } - set storageTexelBufferOffsetSingleTexelAlignment(value) { - this.#view.setUint32(184, Number(value), LE); - } - get uniformTexelBufferOffsetAlignmentBytes() { - return this.#view.getBigUint64(192, LE); - } - set uniformTexelBufferOffsetAlignmentBytes(value) { - this.#view.setBigUint64(192, BigInt(value), LE); - } - get uniformTexelBufferOffsetSingleTexelAlignment() { - return this.#view.getUint32(200, LE); - } - set uniformTexelBufferOffsetSingleTexelAlignment(value) { - this.#view.setUint32(200, Number(value), LE); - } - get maxBufferSize() { - return this.#view.getBigUint64(208, LE); - } - set maxBufferSize(value) { - this.#view.setBigUint64(208, BigInt(value), LE); - } -} -export class PipelineCompilerControlCreateInfoAMD { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineCompilerControlCreateInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCompilerControlCreateInfoAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCompilerControlCreateInfoAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineCompilerControlCreateInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.compilerControlFlags && (this.compilerControlFlags = data.compilerControlFlags); - this.sType = StructureType.PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get compilerControlFlags() { - return this.#view.getUint32(16, LE); - } - set compilerControlFlags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceCoherentMemoryFeaturesAMD { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceCoherentMemoryFeaturesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCoherentMemoryFeaturesAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCoherentMemoryFeaturesAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceCoherentMemoryFeaturesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceCoherentMemory && (this.deviceCoherentMemory = data.deviceCoherentMemory); - this.sType = StructureType.PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceCoherentMemory() { - return this.#view.getUint32(16, LE); - } - set deviceCoherentMemory(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceToolProperties { - static size = 1048; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceToolProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceToolProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceToolProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceToolProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.name && (this.name = data.name), void 0 !== data.version && (this.version = data.version), void 0 !== data.purposes && (this.purposes = data.purposes), void 0 !== data.description && (this.description = data.description), void 0 !== data.layer && (this.layer = data.layer); - this.sType = StructureType.PHYSICAL_DEVICE_TOOL_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); - } - set name(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - get version() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 272, 256); - } - set version(value) { - this.#data.set(new Uint8Array(value.buffer), 272); - } - get purposes() { - return this.#view.getUint32(528, LE); - } - set purposes(value) { - this.#view.setUint32(528, Number(value), LE); - } - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 532, 256); - } - set description(value) { - this.#data.set(new Uint8Array(value.buffer), 532); - } - get layer() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 788, 256); - } - set layer(value) { - this.#data.set(new Uint8Array(value.buffer), 788); - } -} -export class SamplerCustomBorderColorCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SamplerCustomBorderColorCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerCustomBorderColorCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerCustomBorderColorCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SamplerCustomBorderColorCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.customBorderColor && (this.customBorderColor = data.customBorderColor), void 0 !== data.format && (this.format = data.format); - this.sType = StructureType.SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get customBorderColor() { - throw new Error('Unknown type: {"union":["f32","i32","u32"]}'); - } - set customBorderColor(value) { - throw new Error('Unknown type: {"union":["f32","i32","u32"]}'); - } - get format() { - return this.#view.getUint32(20, LE); - } - set format(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceCustomBorderColorPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCustomBorderColorPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCustomBorderColorPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxCustomBorderColorSamplers && (this.maxCustomBorderColorSamplers = data.maxCustomBorderColorSamplers); - this.sType = StructureType.PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxCustomBorderColorSamplers() { - return this.#view.getUint32(16, LE); - } - set maxCustomBorderColorSamplers(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceCustomBorderColorFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCustomBorderColorFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCustomBorderColorFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.customBorderColors && (this.customBorderColors = data.customBorderColors), void 0 !== data.customBorderColorWithoutFormat && (this.customBorderColorWithoutFormat = data.customBorderColorWithoutFormat); - this.sType = StructureType.PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get customBorderColors() { - return this.#view.getUint32(16, LE); - } - set customBorderColors(value) { - this.#view.setUint32(16, Number(value), LE); - } - get customBorderColorWithoutFormat() { - return this.#view.getUint32(20, LE); - } - set customBorderColorWithoutFormat(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class SamplerBorderColorComponentMappingCreateInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SamplerBorderColorComponentMappingCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerBorderColorComponentMappingCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerBorderColorComponentMappingCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SamplerBorderColorComponentMappingCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.components && (this.components = data.components), void 0 !== data.srgb && (this.srgb = data.srgb); - this.sType = StructureType.SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get components() { - return new ComponentMapping(this.#data.subarray(16, 16 + ComponentMapping.size)); - } - set components(value) { - if (value[BUFFER].byteLength < ComponentMapping.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get srgb() { - return this.#view.getUint32(32, LE); - } - set srgb(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class PhysicalDeviceBorderColorSwizzleFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceBorderColorSwizzleFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBorderColorSwizzleFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBorderColorSwizzleFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceBorderColorSwizzleFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.borderColorSwizzle && (this.borderColorSwizzle = data.borderColorSwizzle), void 0 !== data.borderColorSwizzleFromImage && (this.borderColorSwizzleFromImage = data.borderColorSwizzleFromImage); - this.sType = StructureType.PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get borderColorSwizzle() { - return this.#view.getUint32(16, LE); - } - set borderColorSwizzle(value) { - this.#view.setUint32(16, Number(value), LE); - } - get borderColorSwizzleFromImage() { - return this.#view.getUint32(20, LE); - } - set borderColorSwizzleFromImage(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class AccelerationStructureGeometryTrianglesDataKHR { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureGeometryTrianglesDataKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryTrianglesDataKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryTrianglesDataKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureGeometryTrianglesDataKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.vertexFormat && (this.vertexFormat = data.vertexFormat), void 0 !== data.vertexData && (this.vertexData = data.vertexData), void 0 !== data.vertexStride && (this.vertexStride = data.vertexStride), void 0 !== data.maxVertex && (this.maxVertex = data.maxVertex), void 0 !== data.indexType && (this.indexType = data.indexType), void 0 !== data.indexData && (this.indexData = data.indexData), void 0 !== data.transformData && (this.transformData = data.transformData); - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get vertexFormat() { - return this.#view.getUint32(16, LE); - } - set vertexFormat(value) { - this.#view.setUint32(16, Number(value), LE); - } - get vertexData() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set vertexData(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get vertexStride() { - return this.#view.getBigUint64(32, LE); - } - set vertexStride(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get maxVertex() { - return this.#view.getUint32(40, LE); - } - set maxVertex(value) { - this.#view.setUint32(40, Number(value), LE); - } - get indexType() { - return this.#view.getUint32(44, LE); - } - set indexType(value) { - this.#view.setUint32(44, Number(value), LE); - } - get indexData() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set indexData(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get transformData() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set transformData(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } -} -export class AccelerationStructureGeometryAabbsDataKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureGeometryAabbsDataKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryAabbsDataKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryAabbsDataKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureGeometryAabbsDataKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.data && (this.data = data.data), void 0 !== data.stride && (this.stride = data.stride); - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get data() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set data(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get stride() { - return this.#view.getBigUint64(24, LE); - } - set stride(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class AccelerationStructureGeometryInstancesDataKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureGeometryInstancesDataKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryInstancesDataKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryInstancesDataKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureGeometryInstancesDataKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.arrayOfPointers && (this.arrayOfPointers = data.arrayOfPointers), void 0 !== data.data && (this.data = data.data); - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get arrayOfPointers() { - return this.#view.getUint32(16, LE); - } - set arrayOfPointers(value) { - this.#view.setUint32(16, Number(value), LE); - } - get data() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set data(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } -} -export class AccelerationStructureGeometryKHR { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureGeometryKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureGeometryKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.geometryType && (this.geometryType = data.geometryType), void 0 !== data.geometry && (this.geometry = data.geometry), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get geometryType() { - return this.#view.getUint32(16, LE); - } - set geometryType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get geometry() { - throw new Error('Unknown type: {"union":[{"struct":["u32","buffer","u32",{"union":["u64","buffer"]},"u64","u32","u32",{"union":["u64","buffer"]},{"union":["u64","buffer"]}]},{"struct":["u32","buffer",{"union":["u64","buffer"]},"u64"]},{"struct":["u32","buffer","u32",{"union":["u64","buffer"]}]}]}'); - } - set geometry(value) { - throw new Error('Unknown type: {"union":[{"struct":["u32","buffer","u32",{"union":["u64","buffer"]},"u64","u32","u32",{"union":["u64","buffer"]},{"union":["u64","buffer"]}]},{"struct":["u32","buffer",{"union":["u64","buffer"]},"u64"]},{"struct":["u32","buffer","u32",{"union":["u64","buffer"]}]}]}'); - } - get flags() { - return this.#view.getUint32(84, LE); - } - set flags(value) { - this.#view.setUint32(84, Number(value), LE); - } -} -export class AccelerationStructureBuildGeometryInfoKHR { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureBuildGeometryInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureBuildGeometryInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureBuildGeometryInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureBuildGeometryInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.type && (this.type = data.type), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.mode && (this.mode = data.mode), void 0 !== data.srcAccelerationStructure && (this.srcAccelerationStructure = data.srcAccelerationStructure), void 0 !== data.dstAccelerationStructure && (this.dstAccelerationStructure = data.dstAccelerationStructure), void 0 !== data.geometryCount && (this.geometryCount = data.geometryCount), void 0 !== data.pGeometries && (this.pGeometries = data.pGeometries), void 0 !== data.ppGeometries && (this.ppGeometries = data.ppGeometries), void 0 !== data.scratchData && (this.scratchData = data.scratchData); - this.sType = StructureType.ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get type() { - return this.#view.getUint32(16, LE); - } - set type(value) { - this.#view.setUint32(16, Number(value), LE); - } - get flags() { - return this.#view.getUint32(20, LE); - } - set flags(value) { - this.#view.setUint32(20, Number(value), LE); - } - get mode() { - return this.#view.getUint32(24, LE); - } - set mode(value) { - this.#view.setUint32(24, Number(value), LE); - } - get srcAccelerationStructure() { - return this.#view.getBigUint64(32, LE); - } - set srcAccelerationStructure(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get dstAccelerationStructure() { - return this.#view.getBigUint64(40, LE); - } - set dstAccelerationStructure(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get geometryCount() { - return this.#view.getUint32(48, LE); - } - set geometryCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pGeometries() { - return this.#view.getBigUint64(56, LE); - } - set pGeometries(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get ppGeometries() { - return this.#view.getBigUint64(64, LE); - } - set ppGeometries(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - get scratchData() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set scratchData(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } -} -export class AccelerationStructureBuildRangeInfoKHR { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureBuildRangeInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureBuildRangeInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureBuildRangeInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureBuildRangeInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.primitiveCount && (this.primitiveCount = data.primitiveCount), void 0 !== data.primitiveOffset && (this.primitiveOffset = data.primitiveOffset), void 0 !== data.firstVertex && (this.firstVertex = data.firstVertex), void 0 !== data.transformOffset && (this.transformOffset = data.transformOffset); - } - get primitiveCount() { - return this.#view.getUint32(0, LE); - } - set primitiveCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get primitiveOffset() { - return this.#view.getUint32(4, LE); - } - set primitiveOffset(value) { - this.#view.setUint32(4, Number(value), LE); - } - get firstVertex() { - return this.#view.getUint32(8, LE); - } - set firstVertex(value) { - this.#view.setUint32(8, Number(value), LE); - } - get transformOffset() { - return this.#view.getUint32(12, LE); - } - set transformOffset(value) { - this.#view.setUint32(12, Number(value), LE); - } -} -export class AccelerationStructureCreateInfoKHR { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.createFlags && (this.createFlags = data.createFlags), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.size && (this.size = data.size), void 0 !== data.type && (this.type = data.type), void 0 !== data.deviceAddress && (this.deviceAddress = data.deviceAddress); - this.sType = StructureType.ACCELERATION_STRUCTURE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get createFlags() { - return this.#view.getUint32(16, LE); - } - set createFlags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get buffer() { - return this.#view.getBigUint64(24, LE); - } - set buffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get offset() { - return this.#view.getBigUint64(32, LE); - } - set offset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(40, LE); - } - set size(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get type() { - return this.#view.getUint32(48, LE); - } - set type(value) { - this.#view.setUint32(48, Number(value), LE); - } - get deviceAddress() { - return this.#view.getBigUint64(56, LE); - } - set deviceAddress(value) { - this.#view.setBigUint64(56, BigInt(value), LE); - } -} -export class AabbPositionsKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AabbPositionsKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AabbPositionsKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AabbPositionsKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AabbPositionsKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.minX && (this.minX = data.minX), void 0 !== data.minY && (this.minY = data.minY), void 0 !== data.minZ && (this.minZ = data.minZ), void 0 !== data.maxX && (this.maxX = data.maxX), void 0 !== data.maxY && (this.maxY = data.maxY), void 0 !== data.maxZ && (this.maxZ = data.maxZ); - } - get minX() { - return this.#view.getFloat32(0, LE); - } - set minX(value) { - this.#view.setFloat32(0, Number(value), LE); - } - get minY() { - return this.#view.getFloat32(4, LE); - } - set minY(value) { - this.#view.setFloat32(4, Number(value), LE); - } - get minZ() { - return this.#view.getFloat32(8, LE); - } - set minZ(value) { - this.#view.setFloat32(8, Number(value), LE); - } - get maxX() { - return this.#view.getFloat32(12, LE); - } - set maxX(value) { - this.#view.setFloat32(12, Number(value), LE); - } - get maxY() { - return this.#view.getFloat32(16, LE); - } - set maxY(value) { - this.#view.setFloat32(16, Number(value), LE); - } - get maxZ() { - return this.#view.getFloat32(20, LE); - } - set maxZ(value) { - this.#view.setFloat32(20, Number(value), LE); - } -} -export class TransformMatrixKHR { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(TransformMatrixKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TransformMatrixKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < TransformMatrixKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(TransformMatrixKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.matrix && (this.matrix = data.matrix); - } - get matrix() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 0, 3); - } - set matrix(value) { - this.#data.set(new Uint8Array(value.buffer), 0); - } -} -export class AccelerationStructureInstanceKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureInstanceKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureInstanceKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureInstanceKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureInstanceKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.transform && (this.transform = data.transform), void 0 !== data.instanceCustomIndex && (this.instanceCustomIndex = data.instanceCustomIndex), void 0 !== data.mask && (this.mask = data.mask), void 0 !== data.instanceShaderBindingTableRecordOffset && (this.instanceShaderBindingTableRecordOffset = data.instanceShaderBindingTableRecordOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.accelerationStructureReference && (this.accelerationStructureReference = data.accelerationStructureReference); - } - get transform() { - return new TransformMatrixKHR(this.#data.subarray(0, 0 + TransformMatrixKHR.size)); - } - set transform(value) { - if (value[BUFFER].byteLength < TransformMatrixKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get instanceCustomIndex() { - return this.#view.getUint32(4, LE); - } - set instanceCustomIndex(value) { - this.#view.setUint32(4, Number(value), LE); - } - get mask() { - return this.#view.getUint32(8, LE); - } - set mask(value) { - this.#view.setUint32(8, Number(value), LE); - } - get instanceShaderBindingTableRecordOffset() { - return this.#view.getUint32(12, LE); - } - set instanceShaderBindingTableRecordOffset(value) { - this.#view.setUint32(12, Number(value), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get accelerationStructureReference() { - return this.#view.getBigUint64(24, LE); - } - set accelerationStructureReference(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class AccelerationStructureDeviceAddressInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureDeviceAddressInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureDeviceAddressInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureDeviceAddressInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureDeviceAddressInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.accelerationStructure && (this.accelerationStructure = data.accelerationStructure); - this.sType = StructureType.ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get accelerationStructure() { - return this.#view.getBigUint64(16, LE); - } - set accelerationStructure(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class AccelerationStructureVersionInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureVersionInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureVersionInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureVersionInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureVersionInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pVersionData && (this.pVersionData = data.pVersionData); - this.sType = StructureType.ACCELERATION_STRUCTURE_VERSION_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pVersionData() { - return this.#view.getBigUint64(16, LE); - } - set pVersionData(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class CopyAccelerationStructureInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyAccelerationStructureInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyAccelerationStructureInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyAccelerationStructureInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyAccelerationStructureInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.src && (this.src = data.src), void 0 !== data.dst && (this.dst = data.dst), void 0 !== data.mode && (this.mode = data.mode); - this.sType = StructureType.COPY_ACCELERATION_STRUCTURE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get src() { - return this.#view.getBigUint64(16, LE); - } - set src(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dst() { - return this.#view.getBigUint64(24, LE); - } - set dst(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get mode() { - return this.#view.getUint32(32, LE); - } - set mode(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class CopyAccelerationStructureToMemoryInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyAccelerationStructureToMemoryInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyAccelerationStructureToMemoryInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyAccelerationStructureToMemoryInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyAccelerationStructureToMemoryInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.src && (this.src = data.src), void 0 !== data.dst && (this.dst = data.dst), void 0 !== data.mode && (this.mode = data.mode); - this.sType = StructureType.COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get src() { - return this.#view.getBigUint64(16, LE); - } - set src(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dst() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set dst(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get mode() { - return this.#view.getUint32(32, LE); - } - set mode(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class CopyMemoryToAccelerationStructureInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyMemoryToAccelerationStructureInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryToAccelerationStructureInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMemoryToAccelerationStructureInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyMemoryToAccelerationStructureInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.src && (this.src = data.src), void 0 !== data.dst && (this.dst = data.dst), void 0 !== data.mode && (this.mode = data.mode); - this.sType = StructureType.COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get src() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set src(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get dst() { - return this.#view.getBigUint64(24, LE); - } - set dst(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get mode() { - return this.#view.getUint32(32, LE); - } - set mode(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class RayTracingPipelineInterfaceCreateInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RayTracingPipelineInterfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingPipelineInterfaceCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingPipelineInterfaceCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RayTracingPipelineInterfaceCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxPipelineRayPayloadSize && (this.maxPipelineRayPayloadSize = data.maxPipelineRayPayloadSize), void 0 !== data.maxPipelineRayHitAttributeSize && (this.maxPipelineRayHitAttributeSize = data.maxPipelineRayHitAttributeSize); - this.sType = StructureType.RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxPipelineRayPayloadSize() { - return this.#view.getUint32(16, LE); - } - set maxPipelineRayPayloadSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxPipelineRayHitAttributeSize() { - return this.#view.getUint32(20, LE); - } - set maxPipelineRayHitAttributeSize(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PipelineLibraryCreateInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineLibraryCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineLibraryCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineLibraryCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineLibraryCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.libraryCount && (this.libraryCount = data.libraryCount), void 0 !== data.pLibraries && (this.pLibraries = data.pLibraries); - this.sType = StructureType.PIPELINE_LIBRARY_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get libraryCount() { - return this.#view.getUint32(16, LE); - } - set libraryCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pLibraries() { - return this.#view.getBigUint64(24, LE); - } - set pLibraries(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceExtendedDynamicStateFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicStateFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicStateFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExtendedDynamicStateFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicStateFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.extendedDynamicState && (this.extendedDynamicState = data.extendedDynamicState); - this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get extendedDynamicState() { - return this.#view.getUint32(16, LE); - } - set extendedDynamicState(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceExtendedDynamicState2FeaturesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState2FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicState2FeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExtendedDynamicState2FeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState2FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.extendedDynamicState2 && (this.extendedDynamicState2 = data.extendedDynamicState2), void 0 !== data.extendedDynamicState2LogicOp && (this.extendedDynamicState2LogicOp = data.extendedDynamicState2LogicOp), void 0 !== data.extendedDynamicState2PatchControlPoints && (this.extendedDynamicState2PatchControlPoints = data.extendedDynamicState2PatchControlPoints); - this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get extendedDynamicState2() { - return this.#view.getUint32(16, LE); - } - set extendedDynamicState2(value) { - this.#view.setUint32(16, Number(value), LE); - } - get extendedDynamicState2LogicOp() { - return this.#view.getUint32(20, LE); - } - set extendedDynamicState2LogicOp(value) { - this.#view.setUint32(20, Number(value), LE); - } - get extendedDynamicState2PatchControlPoints() { - return this.#view.getUint32(24, LE); - } - set extendedDynamicState2PatchControlPoints(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceExtendedDynamicState3FeaturesEXT { - static size = 144; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicState3FeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExtendedDynamicState3FeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.extendedDynamicState3TessellationDomainOrigin && (this.extendedDynamicState3TessellationDomainOrigin = data.extendedDynamicState3TessellationDomainOrigin), void 0 !== data.extendedDynamicState3DepthClampEnable && (this.extendedDynamicState3DepthClampEnable = data.extendedDynamicState3DepthClampEnable), void 0 !== data.extendedDynamicState3PolygonMode && (this.extendedDynamicState3PolygonMode = data.extendedDynamicState3PolygonMode), void 0 !== data.extendedDynamicState3RasterizationSamples && (this.extendedDynamicState3RasterizationSamples = data.extendedDynamicState3RasterizationSamples), void 0 !== data.extendedDynamicState3SampleMask && (this.extendedDynamicState3SampleMask = data.extendedDynamicState3SampleMask), void 0 !== data.extendedDynamicState3AlphaToCoverageEnable && (this.extendedDynamicState3AlphaToCoverageEnable = data.extendedDynamicState3AlphaToCoverageEnable), void 0 !== data.extendedDynamicState3AlphaToOneEnable && (this.extendedDynamicState3AlphaToOneEnable = data.extendedDynamicState3AlphaToOneEnable), void 0 !== data.extendedDynamicState3LogicOpEnable && (this.extendedDynamicState3LogicOpEnable = data.extendedDynamicState3LogicOpEnable), void 0 !== data.extendedDynamicState3ColorBlendEnable && (this.extendedDynamicState3ColorBlendEnable = data.extendedDynamicState3ColorBlendEnable), void 0 !== data.extendedDynamicState3ColorBlendEquation && (this.extendedDynamicState3ColorBlendEquation = data.extendedDynamicState3ColorBlendEquation), void 0 !== data.extendedDynamicState3ColorWriteMask && (this.extendedDynamicState3ColorWriteMask = data.extendedDynamicState3ColorWriteMask), void 0 !== data.extendedDynamicState3RasterizationStream && (this.extendedDynamicState3RasterizationStream = data.extendedDynamicState3RasterizationStream), void 0 !== data.extendedDynamicState3ConservativeRasterizationMode && (this.extendedDynamicState3ConservativeRasterizationMode = data.extendedDynamicState3ConservativeRasterizationMode), void 0 !== data.extendedDynamicState3ExtraPrimitiveOverestimationSize && (this.extendedDynamicState3ExtraPrimitiveOverestimationSize = data.extendedDynamicState3ExtraPrimitiveOverestimationSize), void 0 !== data.extendedDynamicState3DepthClipEnable && (this.extendedDynamicState3DepthClipEnable = data.extendedDynamicState3DepthClipEnable), void 0 !== data.extendedDynamicState3SampleLocationsEnable && (this.extendedDynamicState3SampleLocationsEnable = data.extendedDynamicState3SampleLocationsEnable), void 0 !== data.extendedDynamicState3ColorBlendAdvanced && (this.extendedDynamicState3ColorBlendAdvanced = data.extendedDynamicState3ColorBlendAdvanced), void 0 !== data.extendedDynamicState3ProvokingVertexMode && (this.extendedDynamicState3ProvokingVertexMode = data.extendedDynamicState3ProvokingVertexMode), void 0 !== data.extendedDynamicState3LineRasterizationMode && (this.extendedDynamicState3LineRasterizationMode = data.extendedDynamicState3LineRasterizationMode), void 0 !== data.extendedDynamicState3LineStippleEnable && (this.extendedDynamicState3LineStippleEnable = data.extendedDynamicState3LineStippleEnable), void 0 !== data.extendedDynamicState3DepthClipNegativeOneToOne && (this.extendedDynamicState3DepthClipNegativeOneToOne = data.extendedDynamicState3DepthClipNegativeOneToOne), void 0 !== data.extendedDynamicState3ViewportWScalingEnable && (this.extendedDynamicState3ViewportWScalingEnable = data.extendedDynamicState3ViewportWScalingEnable), void 0 !== data.extendedDynamicState3ViewportSwizzle && (this.extendedDynamicState3ViewportSwizzle = data.extendedDynamicState3ViewportSwizzle), void 0 !== data.extendedDynamicState3CoverageToColorEnable && (this.extendedDynamicState3CoverageToColorEnable = data.extendedDynamicState3CoverageToColorEnable), void 0 !== data.extendedDynamicState3CoverageToColorLocation && (this.extendedDynamicState3CoverageToColorLocation = data.extendedDynamicState3CoverageToColorLocation), void 0 !== data.extendedDynamicState3CoverageModulationMode && (this.extendedDynamicState3CoverageModulationMode = data.extendedDynamicState3CoverageModulationMode), void 0 !== data.extendedDynamicState3CoverageModulationTableEnable && (this.extendedDynamicState3CoverageModulationTableEnable = data.extendedDynamicState3CoverageModulationTableEnable), void 0 !== data.extendedDynamicState3CoverageModulationTable && (this.extendedDynamicState3CoverageModulationTable = data.extendedDynamicState3CoverageModulationTable), void 0 !== data.extendedDynamicState3CoverageReductionMode && (this.extendedDynamicState3CoverageReductionMode = data.extendedDynamicState3CoverageReductionMode), void 0 !== data.extendedDynamicState3RepresentativeFragmentTestEnable && (this.extendedDynamicState3RepresentativeFragmentTestEnable = data.extendedDynamicState3RepresentativeFragmentTestEnable), void 0 !== data.extendedDynamicState3ShadingRateImageEnable && (this.extendedDynamicState3ShadingRateImageEnable = data.extendedDynamicState3ShadingRateImageEnable); - this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get extendedDynamicState3TessellationDomainOrigin() { - return this.#view.getUint32(16, LE); - } - set extendedDynamicState3TessellationDomainOrigin(value) { - this.#view.setUint32(16, Number(value), LE); - } - get extendedDynamicState3DepthClampEnable() { - return this.#view.getUint32(20, LE); - } - set extendedDynamicState3DepthClampEnable(value) { - this.#view.setUint32(20, Number(value), LE); - } - get extendedDynamicState3PolygonMode() { - return this.#view.getUint32(24, LE); - } - set extendedDynamicState3PolygonMode(value) { - this.#view.setUint32(24, Number(value), LE); - } - get extendedDynamicState3RasterizationSamples() { - return this.#view.getUint32(28, LE); - } - set extendedDynamicState3RasterizationSamples(value) { - this.#view.setUint32(28, Number(value), LE); - } - get extendedDynamicState3SampleMask() { - return this.#view.getUint32(32, LE); - } - set extendedDynamicState3SampleMask(value) { - this.#view.setUint32(32, Number(value), LE); - } - get extendedDynamicState3AlphaToCoverageEnable() { - return this.#view.getUint32(36, LE); - } - set extendedDynamicState3AlphaToCoverageEnable(value) { - this.#view.setUint32(36, Number(value), LE); - } - get extendedDynamicState3AlphaToOneEnable() { - return this.#view.getUint32(40, LE); - } - set extendedDynamicState3AlphaToOneEnable(value) { - this.#view.setUint32(40, Number(value), LE); - } - get extendedDynamicState3LogicOpEnable() { - return this.#view.getUint32(44, LE); - } - set extendedDynamicState3LogicOpEnable(value) { - this.#view.setUint32(44, Number(value), LE); - } - get extendedDynamicState3ColorBlendEnable() { - return this.#view.getUint32(48, LE); - } - set extendedDynamicState3ColorBlendEnable(value) { - this.#view.setUint32(48, Number(value), LE); - } - get extendedDynamicState3ColorBlendEquation() { - return this.#view.getUint32(52, LE); - } - set extendedDynamicState3ColorBlendEquation(value) { - this.#view.setUint32(52, Number(value), LE); - } - get extendedDynamicState3ColorWriteMask() { - return this.#view.getUint32(56, LE); - } - set extendedDynamicState3ColorWriteMask(value) { - this.#view.setUint32(56, Number(value), LE); - } - get extendedDynamicState3RasterizationStream() { - return this.#view.getUint32(60, LE); - } - set extendedDynamicState3RasterizationStream(value) { - this.#view.setUint32(60, Number(value), LE); - } - get extendedDynamicState3ConservativeRasterizationMode() { - return this.#view.getUint32(64, LE); - } - set extendedDynamicState3ConservativeRasterizationMode(value) { - this.#view.setUint32(64, Number(value), LE); - } - get extendedDynamicState3ExtraPrimitiveOverestimationSize() { - return this.#view.getUint32(68, LE); - } - set extendedDynamicState3ExtraPrimitiveOverestimationSize(value) { - this.#view.setUint32(68, Number(value), LE); - } - get extendedDynamicState3DepthClipEnable() { - return this.#view.getUint32(72, LE); - } - set extendedDynamicState3DepthClipEnable(value) { - this.#view.setUint32(72, Number(value), LE); - } - get extendedDynamicState3SampleLocationsEnable() { - return this.#view.getUint32(76, LE); - } - set extendedDynamicState3SampleLocationsEnable(value) { - this.#view.setUint32(76, Number(value), LE); - } - get extendedDynamicState3ColorBlendAdvanced() { - return this.#view.getUint32(80, LE); - } - set extendedDynamicState3ColorBlendAdvanced(value) { - this.#view.setUint32(80, Number(value), LE); - } - get extendedDynamicState3ProvokingVertexMode() { - return this.#view.getUint32(84, LE); - } - set extendedDynamicState3ProvokingVertexMode(value) { - this.#view.setUint32(84, Number(value), LE); - } - get extendedDynamicState3LineRasterizationMode() { - return this.#view.getUint32(88, LE); - } - set extendedDynamicState3LineRasterizationMode(value) { - this.#view.setUint32(88, Number(value), LE); - } - get extendedDynamicState3LineStippleEnable() { - return this.#view.getUint32(92, LE); - } - set extendedDynamicState3LineStippleEnable(value) { - this.#view.setUint32(92, Number(value), LE); - } - get extendedDynamicState3DepthClipNegativeOneToOne() { - return this.#view.getUint32(96, LE); - } - set extendedDynamicState3DepthClipNegativeOneToOne(value) { - this.#view.setUint32(96, Number(value), LE); - } - get extendedDynamicState3ViewportWScalingEnable() { - return this.#view.getUint32(100, LE); - } - set extendedDynamicState3ViewportWScalingEnable(value) { - this.#view.setUint32(100, Number(value), LE); - } - get extendedDynamicState3ViewportSwizzle() { - return this.#view.getUint32(104, LE); - } - set extendedDynamicState3ViewportSwizzle(value) { - this.#view.setUint32(104, Number(value), LE); - } - get extendedDynamicState3CoverageToColorEnable() { - return this.#view.getUint32(108, LE); - } - set extendedDynamicState3CoverageToColorEnable(value) { - this.#view.setUint32(108, Number(value), LE); - } - get extendedDynamicState3CoverageToColorLocation() { - return this.#view.getUint32(112, LE); - } - set extendedDynamicState3CoverageToColorLocation(value) { - this.#view.setUint32(112, Number(value), LE); - } - get extendedDynamicState3CoverageModulationMode() { - return this.#view.getUint32(116, LE); - } - set extendedDynamicState3CoverageModulationMode(value) { - this.#view.setUint32(116, Number(value), LE); - } - get extendedDynamicState3CoverageModulationTableEnable() { - return this.#view.getUint32(120, LE); - } - set extendedDynamicState3CoverageModulationTableEnable(value) { - this.#view.setUint32(120, Number(value), LE); - } - get extendedDynamicState3CoverageModulationTable() { - return this.#view.getUint32(124, LE); - } - set extendedDynamicState3CoverageModulationTable(value) { - this.#view.setUint32(124, Number(value), LE); - } - get extendedDynamicState3CoverageReductionMode() { - return this.#view.getUint32(128, LE); - } - set extendedDynamicState3CoverageReductionMode(value) { - this.#view.setUint32(128, Number(value), LE); - } - get extendedDynamicState3RepresentativeFragmentTestEnable() { - return this.#view.getUint32(132, LE); - } - set extendedDynamicState3RepresentativeFragmentTestEnable(value) { - this.#view.setUint32(132, Number(value), LE); - } - get extendedDynamicState3ShadingRateImageEnable() { - return this.#view.getUint32(136, LE); - } - set extendedDynamicState3ShadingRateImageEnable(value) { - this.#view.setUint32(136, Number(value), LE); - } -} -export class PhysicalDeviceExtendedDynamicState3PropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3PropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicState3PropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExtendedDynamicState3PropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3PropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.dynamicPrimitiveTopologyUnrestricted && (this.dynamicPrimitiveTopologyUnrestricted = data.dynamicPrimitiveTopologyUnrestricted); - this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dynamicPrimitiveTopologyUnrestricted() { - return this.#view.getUint32(16, LE); - } - set dynamicPrimitiveTopologyUnrestricted(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ColorBlendEquationEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ColorBlendEquationEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ColorBlendEquationEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ColorBlendEquationEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ColorBlendEquationEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.srcColorBlendFactor && (this.srcColorBlendFactor = data.srcColorBlendFactor), void 0 !== data.dstColorBlendFactor && (this.dstColorBlendFactor = data.dstColorBlendFactor), void 0 !== data.colorBlendOp && (this.colorBlendOp = data.colorBlendOp), void 0 !== data.srcAlphaBlendFactor && (this.srcAlphaBlendFactor = data.srcAlphaBlendFactor), void 0 !== data.dstAlphaBlendFactor && (this.dstAlphaBlendFactor = data.dstAlphaBlendFactor), void 0 !== data.alphaBlendOp && (this.alphaBlendOp = data.alphaBlendOp); - } - get srcColorBlendFactor() { - return this.#view.getUint32(0, LE); - } - set srcColorBlendFactor(value) { - this.#view.setUint32(0, Number(value), LE); - } - get dstColorBlendFactor() { - return this.#view.getUint32(4, LE); - } - set dstColorBlendFactor(value) { - this.#view.setUint32(4, Number(value), LE); - } - get colorBlendOp() { - return this.#view.getUint32(8, LE); - } - set colorBlendOp(value) { - this.#view.setUint32(8, Number(value), LE); - } - get srcAlphaBlendFactor() { - return this.#view.getUint32(12, LE); - } - set srcAlphaBlendFactor(value) { - this.#view.setUint32(12, Number(value), LE); - } - get dstAlphaBlendFactor() { - return this.#view.getUint32(16, LE); - } - set dstAlphaBlendFactor(value) { - this.#view.setUint32(16, Number(value), LE); - } - get alphaBlendOp() { - return this.#view.getUint32(20, LE); - } - set alphaBlendOp(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class ColorBlendAdvancedEXT { - static size = 20; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ColorBlendAdvancedEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ColorBlendAdvancedEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ColorBlendAdvancedEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ColorBlendAdvancedEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.advancedBlendOp && (this.advancedBlendOp = data.advancedBlendOp), void 0 !== data.srcPremultiplied && (this.srcPremultiplied = data.srcPremultiplied), void 0 !== data.dstPremultiplied && (this.dstPremultiplied = data.dstPremultiplied), void 0 !== data.blendOverlap && (this.blendOverlap = data.blendOverlap), void 0 !== data.clampResults && (this.clampResults = data.clampResults); - } - get advancedBlendOp() { - return this.#view.getUint32(0, LE); - } - set advancedBlendOp(value) { - this.#view.setUint32(0, Number(value), LE); - } - get srcPremultiplied() { - return this.#view.getUint32(4, LE); - } - set srcPremultiplied(value) { - this.#view.setUint32(4, Number(value), LE); - } - get dstPremultiplied() { - return this.#view.getUint32(8, LE); - } - set dstPremultiplied(value) { - this.#view.setUint32(8, Number(value), LE); - } - get blendOverlap() { - return this.#view.getUint32(12, LE); - } - set blendOverlap(value) { - this.#view.setUint32(12, Number(value), LE); - } - get clampResults() { - return this.#view.getUint32(16, LE); - } - set clampResults(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class RenderPassTransformBeginInfoQCOM { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassTransformBeginInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassTransformBeginInfoQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassTransformBeginInfoQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassTransformBeginInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.transform && (this.transform = data.transform); - this.sType = StructureType.RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get transform() { - return this.#view.getUint32(16, LE); - } - set transform(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class CopyCommandTransformInfoQCOM { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyCommandTransformInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyCommandTransformInfoQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyCommandTransformInfoQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyCommandTransformInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.transform && (this.transform = data.transform); - this.sType = StructureType.COPY_COMMAND_TRANSFORM_INFO_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get transform() { - return this.#view.getUint32(16, LE); - } - set transform(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class CommandBufferInheritanceRenderPassTransformInfoQCOM { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CommandBufferInheritanceRenderPassTransformInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceRenderPassTransformInfoQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceRenderPassTransformInfoQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CommandBufferInheritanceRenderPassTransformInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.transform && (this.transform = data.transform), void 0 !== data.renderArea && (this.renderArea = data.renderArea); - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get transform() { - return this.#view.getUint32(16, LE); - } - set transform(value) { - this.#view.setUint32(16, Number(value), LE); - } - get renderArea() { - return new Rect2D(this.#data.subarray(20, 20 + Rect2D.size)); - } - set renderArea(value) { - if (value[BUFFER].byteLength < Rect2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } -} -export class PhysicalDeviceDiagnosticsConfigFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDiagnosticsConfigFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDiagnosticsConfigFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDiagnosticsConfigFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDiagnosticsConfigFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.diagnosticsConfig && (this.diagnosticsConfig = data.diagnosticsConfig); - this.sType = StructureType.PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get diagnosticsConfig() { - return this.#view.getUint32(16, LE); - } - set diagnosticsConfig(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DeviceDiagnosticsConfigCreateInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceDiagnosticsConfigCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceDiagnosticsConfigCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceDiagnosticsConfigCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceDiagnosticsConfigCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderZeroInitializeWorkgroupMemory && (this.shaderZeroInitializeWorkgroupMemory = data.shaderZeroInitializeWorkgroupMemory); - this.sType = StructureType.PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderZeroInitializeWorkgroupMemory() { - return this.#view.getUint32(16, LE); - } - set shaderZeroInitializeWorkgroupMemory(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderSubgroupUniformControlFlow && (this.shaderSubgroupUniformControlFlow = data.shaderSubgroupUniformControlFlow); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderSubgroupUniformControlFlow() { - return this.#view.getUint32(16, LE); - } - set shaderSubgroupUniformControlFlow(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceRobustness2FeaturesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRobustness2FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRobustness2FeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRobustness2FeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRobustness2FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.robustBufferAccess2 && (this.robustBufferAccess2 = data.robustBufferAccess2), void 0 !== data.robustImageAccess2 && (this.robustImageAccess2 = data.robustImageAccess2), void 0 !== data.nullDescriptor && (this.nullDescriptor = data.nullDescriptor); - this.sType = StructureType.PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get robustBufferAccess2() { - return this.#view.getUint32(16, LE); - } - set robustBufferAccess2(value) { - this.#view.setUint32(16, Number(value), LE); - } - get robustImageAccess2() { - return this.#view.getUint32(20, LE); - } - set robustImageAccess2(value) { - this.#view.setUint32(20, Number(value), LE); - } - get nullDescriptor() { - return this.#view.getUint32(24, LE); - } - set nullDescriptor(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceRobustness2PropertiesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRobustness2PropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRobustness2PropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRobustness2PropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRobustness2PropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.robustStorageBufferAccessSizeAlignment && (this.robustStorageBufferAccessSizeAlignment = data.robustStorageBufferAccessSizeAlignment), void 0 !== data.robustUniformBufferAccessSizeAlignment && (this.robustUniformBufferAccessSizeAlignment = data.robustUniformBufferAccessSizeAlignment); - this.sType = StructureType.PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get robustStorageBufferAccessSizeAlignment() { - return this.#view.getBigUint64(16, LE); - } - set robustStorageBufferAccessSizeAlignment(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get robustUniformBufferAccessSizeAlignment() { - return this.#view.getBigUint64(24, LE); - } - set robustUniformBufferAccessSizeAlignment(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class PhysicalDeviceImageRobustnessFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImageRobustnessFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageRobustnessFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageRobustnessFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImageRobustnessFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.robustImageAccess && (this.robustImageAccess = data.robustImageAccess); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get robustImageAccess() { - return this.#view.getUint32(16, LE); - } - set robustImageAccess(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.workgroupMemoryExplicitLayout && (this.workgroupMemoryExplicitLayout = data.workgroupMemoryExplicitLayout), void 0 !== data.workgroupMemoryExplicitLayoutScalarBlockLayout && (this.workgroupMemoryExplicitLayoutScalarBlockLayout = data.workgroupMemoryExplicitLayoutScalarBlockLayout), void 0 !== data.workgroupMemoryExplicitLayout8BitAccess && (this.workgroupMemoryExplicitLayout8BitAccess = data.workgroupMemoryExplicitLayout8BitAccess), void 0 !== data.workgroupMemoryExplicitLayout16BitAccess && (this.workgroupMemoryExplicitLayout16BitAccess = data.workgroupMemoryExplicitLayout16BitAccess); - this.sType = StructureType.PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get workgroupMemoryExplicitLayout() { - return this.#view.getUint32(16, LE); - } - set workgroupMemoryExplicitLayout(value) { - this.#view.setUint32(16, Number(value), LE); - } - get workgroupMemoryExplicitLayoutScalarBlockLayout() { - return this.#view.getUint32(20, LE); - } - set workgroupMemoryExplicitLayoutScalarBlockLayout(value) { - this.#view.setUint32(20, Number(value), LE); - } - get workgroupMemoryExplicitLayout8BitAccess() { - return this.#view.getUint32(24, LE); - } - set workgroupMemoryExplicitLayout8BitAccess(value) { - this.#view.setUint32(24, Number(value), LE); - } - get workgroupMemoryExplicitLayout16BitAccess() { - return this.#view.getUint32(28, LE); - } - set workgroupMemoryExplicitLayout16BitAccess(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDevicePortabilitySubsetFeaturesKHR { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePortabilitySubsetFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePortabilitySubsetFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.constantAlphaColorBlendFactors && (this.constantAlphaColorBlendFactors = data.constantAlphaColorBlendFactors), void 0 !== data.events && (this.events = data.events), void 0 !== data.imageViewFormatReinterpretation && (this.imageViewFormatReinterpretation = data.imageViewFormatReinterpretation), void 0 !== data.imageViewFormatSwizzle && (this.imageViewFormatSwizzle = data.imageViewFormatSwizzle), void 0 !== data.imageView2DOn3DImage && (this.imageView2DOn3DImage = data.imageView2DOn3DImage), void 0 !== data.multisampleArrayImage && (this.multisampleArrayImage = data.multisampleArrayImage), void 0 !== data.mutableComparisonSamplers && (this.mutableComparisonSamplers = data.mutableComparisonSamplers), void 0 !== data.pointPolygons && (this.pointPolygons = data.pointPolygons), void 0 !== data.samplerMipLodBias && (this.samplerMipLodBias = data.samplerMipLodBias), void 0 !== data.separateStencilMaskRef && (this.separateStencilMaskRef = data.separateStencilMaskRef), void 0 !== data.shaderSampleRateInterpolationFunctions && (this.shaderSampleRateInterpolationFunctions = data.shaderSampleRateInterpolationFunctions), void 0 !== data.tessellationIsolines && (this.tessellationIsolines = data.tessellationIsolines), void 0 !== data.tessellationPointMode && (this.tessellationPointMode = data.tessellationPointMode), void 0 !== data.triangleFans && (this.triangleFans = data.triangleFans), void 0 !== data.vertexAttributeAccessBeyondStride && (this.vertexAttributeAccessBeyondStride = data.vertexAttributeAccessBeyondStride); - this.sType = StructureType.PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get constantAlphaColorBlendFactors() { - return this.#view.getUint32(16, LE); - } - set constantAlphaColorBlendFactors(value) { - this.#view.setUint32(16, Number(value), LE); - } - get events() { - return this.#view.getUint32(20, LE); - } - set events(value) { - this.#view.setUint32(20, Number(value), LE); - } - get imageViewFormatReinterpretation() { - return this.#view.getUint32(24, LE); - } - set imageViewFormatReinterpretation(value) { - this.#view.setUint32(24, Number(value), LE); - } - get imageViewFormatSwizzle() { - return this.#view.getUint32(28, LE); - } - set imageViewFormatSwizzle(value) { - this.#view.setUint32(28, Number(value), LE); - } - get imageView2DOn3DImage() { - return this.#view.getUint32(32, LE); - } - set imageView2DOn3DImage(value) { - this.#view.setUint32(32, Number(value), LE); - } - get multisampleArrayImage() { - return this.#view.getUint32(36, LE); - } - set multisampleArrayImage(value) { - this.#view.setUint32(36, Number(value), LE); - } - get mutableComparisonSamplers() { - return this.#view.getUint32(40, LE); - } - set mutableComparisonSamplers(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pointPolygons() { - return this.#view.getUint32(44, LE); - } - set pointPolygons(value) { - this.#view.setUint32(44, Number(value), LE); - } - get samplerMipLodBias() { - return this.#view.getUint32(48, LE); - } - set samplerMipLodBias(value) { - this.#view.setUint32(48, Number(value), LE); - } - get separateStencilMaskRef() { - return this.#view.getUint32(52, LE); - } - set separateStencilMaskRef(value) { - this.#view.setUint32(52, Number(value), LE); - } - get shaderSampleRateInterpolationFunctions() { - return this.#view.getUint32(56, LE); - } - set shaderSampleRateInterpolationFunctions(value) { - this.#view.setUint32(56, Number(value), LE); - } - get tessellationIsolines() { - return this.#view.getUint32(60, LE); - } - set tessellationIsolines(value) { - this.#view.setUint32(60, Number(value), LE); - } - get tessellationPointMode() { - return this.#view.getUint32(64, LE); - } - set tessellationPointMode(value) { - this.#view.setUint32(64, Number(value), LE); - } - get triangleFans() { - return this.#view.getUint32(68, LE); - } - set triangleFans(value) { - this.#view.setUint32(68, Number(value), LE); - } - get vertexAttributeAccessBeyondStride() { - return this.#view.getUint32(72, LE); - } - set vertexAttributeAccessBeyondStride(value) { - this.#view.setUint32(72, Number(value), LE); - } -} -export class PhysicalDevicePortabilitySubsetPropertiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePortabilitySubsetPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePortabilitySubsetPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minVertexInputBindingStrideAlignment && (this.minVertexInputBindingStrideAlignment = data.minVertexInputBindingStrideAlignment); - this.sType = StructureType.PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minVertexInputBindingStrideAlignment() { - return this.#view.getUint32(16, LE); - } - set minVertexInputBindingStrideAlignment(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevice4444FormatsFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevice4444FormatsFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevice4444FormatsFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevice4444FormatsFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevice4444FormatsFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.formatA4R4G4B4 && (this.formatA4R4G4B4 = data.formatA4R4G4B4), void 0 !== data.formatA4B4G4R4 && (this.formatA4B4G4R4 = data.formatA4B4G4R4); - this.sType = StructureType.PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get formatA4R4G4B4() { - return this.#view.getUint32(16, LE); - } - set formatA4R4G4B4(value) { - this.#view.setUint32(16, Number(value), LE); - } - get formatA4B4G4R4() { - return this.#view.getUint32(20, LE); - } - set formatA4B4G4R4(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceSubpassShadingFeaturesHUAWEI { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSubpassShadingFeaturesHUAWEI.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubpassShadingFeaturesHUAWEI.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubpassShadingFeaturesHUAWEI.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSubpassShadingFeaturesHUAWEI.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.subpassShading && (this.subpassShading = data.subpassShading); - this.sType = StructureType.PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get subpassShading() { - return this.#view.getUint32(16, LE); - } - set subpassShading(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class BufferCopy2 { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferCopy2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCopy2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCopy2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferCopy2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcOffset && (this.srcOffset = data.srcOffset), void 0 !== data.dstOffset && (this.dstOffset = data.dstOffset), void 0 !== data.size && (this.size = data.size); - this.sType = StructureType.BUFFER_COPY_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcOffset() { - return this.#view.getBigUint64(16, LE); - } - set srcOffset(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get dstOffset() { - return this.#view.getBigUint64(24, LE); - } - set dstOffset(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(32, LE); - } - set size(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class ImageCopy2 { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageCopy2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCopy2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCopy2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageCopy2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcSubresource && (this.srcSubresource = data.srcSubresource), void 0 !== data.srcOffset && (this.srcOffset = data.srcOffset), void 0 !== data.dstSubresource && (this.dstSubresource = data.dstSubresource), void 0 !== data.dstOffset && (this.dstOffset = data.dstOffset), void 0 !== data.extent && (this.extent = data.extent); - this.sType = StructureType.IMAGE_COPY_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - set srcSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get srcOffset() { - return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); - } - set srcOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(44, 44 + ImageSubresourceLayers.size)); - } - set dstSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 44); - } - get dstOffset() { - return new Offset3D(this.#data.subarray(60, 60 + Offset3D.size)); - } - set dstOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 60); - } - get extent() { - return new Extent3D(this.#data.subarray(72, 72 + Extent3D.size)); - } - set extent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 72); - } -} -export class ImageBlit2 { - static size = 96; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageBlit2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageBlit2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageBlit2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageBlit2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcSubresource && (this.srcSubresource = data.srcSubresource), void 0 !== data.srcOffsets && (this.srcOffsets = data.srcOffsets), void 0 !== data.dstSubresource && (this.dstSubresource = data.dstSubresource), void 0 !== data.dstOffsets && (this.dstOffsets = data.dstOffsets); - this.sType = StructureType.IMAGE_BLIT_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - set srcSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get srcOffsets() { - let result = []; - for(let i = 0; i < 2; i++)result.push(new Offset3D(this.#data.subarray(32 + 12 * i, 32 + 12 * i + Offset3D.size))); - return result; - } - set srcOffsets(value) { - for(let i = 0; i < value.length; i++){ - if (value[i][BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[i][BUFFER], 32 + 12 * i); - } - } - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(56, 56 + ImageSubresourceLayers.size)); - } - set dstSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 56); - } - get dstOffsets() { - let result = []; - for(let i = 0; i < 2; i++)result.push(new Offset3D(this.#data.subarray(72 + 12 * i, 72 + 12 * i + Offset3D.size))); - return result; - } - set dstOffsets(value) { - for(let i = 0; i < value.length; i++){ - if (value[i][BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[i][BUFFER], 72 + 12 * i); - } - } -} -export class BufferImageCopy2 { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferImageCopy2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferImageCopy2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferImageCopy2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferImageCopy2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.bufferOffset && (this.bufferOffset = data.bufferOffset), void 0 !== data.bufferRowLength && (this.bufferRowLength = data.bufferRowLength), void 0 !== data.bufferImageHeight && (this.bufferImageHeight = data.bufferImageHeight), void 0 !== data.imageSubresource && (this.imageSubresource = data.imageSubresource), void 0 !== data.imageOffset && (this.imageOffset = data.imageOffset), void 0 !== data.imageExtent && (this.imageExtent = data.imageExtent); - this.sType = StructureType.BUFFER_IMAGE_COPY_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get bufferOffset() { - return this.#view.getBigUint64(16, LE); - } - set bufferOffset(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get bufferRowLength() { - return this.#view.getUint32(24, LE); - } - set bufferRowLength(value) { - this.#view.setUint32(24, Number(value), LE); - } - get bufferImageHeight() { - return this.#view.getUint32(28, LE); - } - set bufferImageHeight(value) { - this.#view.setUint32(28, Number(value), LE); - } - get imageSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(32, 32 + ImageSubresourceLayers.size)); - } - set imageSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get imageOffset() { - return new Offset3D(this.#data.subarray(48, 48 + Offset3D.size)); - } - set imageOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 48); - } - get imageExtent() { - return new Extent3D(this.#data.subarray(60, 60 + Extent3D.size)); - } - set imageExtent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 60); - } -} -export class ImageResolve2 { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageResolve2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageResolve2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageResolve2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageResolve2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcSubresource && (this.srcSubresource = data.srcSubresource), void 0 !== data.srcOffset && (this.srcOffset = data.srcOffset), void 0 !== data.dstSubresource && (this.dstSubresource = data.dstSubresource), void 0 !== data.dstOffset && (this.dstOffset = data.dstOffset), void 0 !== data.extent && (this.extent = data.extent); - this.sType = StructureType.IMAGE_RESOLVE_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - set srcSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get srcOffset() { - return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); - } - set srcOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(44, 44 + ImageSubresourceLayers.size)); - } - set dstSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 44); - } - get dstOffset() { - return new Offset3D(this.#data.subarray(60, 60 + Offset3D.size)); - } - set dstOffset(value) { - if (value[BUFFER].byteLength < Offset3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 60); - } - get extent() { - return new Extent3D(this.#data.subarray(72, 72 + Extent3D.size)); - } - set extent(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 72); - } -} -export class CopyBufferInfo2 { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyBufferInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyBufferInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyBufferInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyBufferInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcBuffer && (this.srcBuffer = data.srcBuffer), void 0 !== data.dstBuffer && (this.dstBuffer = data.dstBuffer), void 0 !== data.regionCount && (this.regionCount = data.regionCount), void 0 !== data.pRegions && (this.pRegions = data.pRegions); - this.sType = StructureType.COPY_BUFFER_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcBuffer() { - return this.#view.getBigUint64(16, LE); - } - set srcBuffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dstBuffer() { - return this.#view.getBigUint64(24, LE); - } - set dstBuffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get regionCount() { - return this.#view.getUint32(32, LE); - } - set regionCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pRegions() { - return this.#view.getBigUint64(40, LE); - } - set pRegions(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class CopyImageInfo2 { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyImageInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyImageInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyImageInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyImageInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcImage && (this.srcImage = data.srcImage), void 0 !== data.srcImageLayout && (this.srcImageLayout = data.srcImageLayout), void 0 !== data.dstImage && (this.dstImage = data.dstImage), void 0 !== data.dstImageLayout && (this.dstImageLayout = data.dstImageLayout), void 0 !== data.regionCount && (this.regionCount = data.regionCount), void 0 !== data.pRegions && (this.pRegions = data.pRegions); - this.sType = StructureType.COPY_IMAGE_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcImage() { - return this.#view.getBigUint64(16, LE); - } - set srcImage(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get srcImageLayout() { - return this.#view.getUint32(24, LE); - } - set srcImageLayout(value) { - this.#view.setUint32(24, Number(value), LE); - } - get dstImage() { - return this.#view.getBigUint64(32, LE); - } - set dstImage(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get dstImageLayout() { - return this.#view.getUint32(40, LE); - } - set dstImageLayout(value) { - this.#view.setUint32(40, Number(value), LE); - } - get regionCount() { - return this.#view.getUint32(44, LE); - } - set regionCount(value) { - this.#view.setUint32(44, Number(value), LE); - } - get pRegions() { - return this.#view.getBigUint64(48, LE); - } - set pRegions(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class BlitImageInfo2 { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BlitImageInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BlitImageInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BlitImageInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BlitImageInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcImage && (this.srcImage = data.srcImage), void 0 !== data.srcImageLayout && (this.srcImageLayout = data.srcImageLayout), void 0 !== data.dstImage && (this.dstImage = data.dstImage), void 0 !== data.dstImageLayout && (this.dstImageLayout = data.dstImageLayout), void 0 !== data.regionCount && (this.regionCount = data.regionCount), void 0 !== data.pRegions && (this.pRegions = data.pRegions), void 0 !== data.filter && (this.filter = data.filter); - this.sType = StructureType.BLIT_IMAGE_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcImage() { - return this.#view.getBigUint64(16, LE); - } - set srcImage(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get srcImageLayout() { - return this.#view.getUint32(24, LE); - } - set srcImageLayout(value) { - this.#view.setUint32(24, Number(value), LE); - } - get dstImage() { - return this.#view.getBigUint64(32, LE); - } - set dstImage(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get dstImageLayout() { - return this.#view.getUint32(40, LE); - } - set dstImageLayout(value) { - this.#view.setUint32(40, Number(value), LE); - } - get regionCount() { - return this.#view.getUint32(44, LE); - } - set regionCount(value) { - this.#view.setUint32(44, Number(value), LE); - } - get pRegions() { - return this.#view.getBigUint64(48, LE); - } - set pRegions(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get filter() { - return this.#view.getUint32(56, LE); - } - set filter(value) { - this.#view.setUint32(56, Number(value), LE); - } -} -export class CopyBufferToImageInfo2 { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyBufferToImageInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyBufferToImageInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyBufferToImageInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyBufferToImageInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcBuffer && (this.srcBuffer = data.srcBuffer), void 0 !== data.dstImage && (this.dstImage = data.dstImage), void 0 !== data.dstImageLayout && (this.dstImageLayout = data.dstImageLayout), void 0 !== data.regionCount && (this.regionCount = data.regionCount), void 0 !== data.pRegions && (this.pRegions = data.pRegions); - this.sType = StructureType.COPY_BUFFER_TO_IMAGE_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcBuffer() { - return this.#view.getBigUint64(16, LE); - } - set srcBuffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dstImage() { - return this.#view.getBigUint64(24, LE); - } - set dstImage(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get dstImageLayout() { - return this.#view.getUint32(32, LE); - } - set dstImageLayout(value) { - this.#view.setUint32(32, Number(value), LE); - } - get regionCount() { - return this.#view.getUint32(36, LE); - } - set regionCount(value) { - this.#view.setUint32(36, Number(value), LE); - } - get pRegions() { - return this.#view.getBigUint64(40, LE); - } - set pRegions(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class CopyImageToBufferInfo2 { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyImageToBufferInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyImageToBufferInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyImageToBufferInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyImageToBufferInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcImage && (this.srcImage = data.srcImage), void 0 !== data.srcImageLayout && (this.srcImageLayout = data.srcImageLayout), void 0 !== data.dstBuffer && (this.dstBuffer = data.dstBuffer), void 0 !== data.regionCount && (this.regionCount = data.regionCount), void 0 !== data.pRegions && (this.pRegions = data.pRegions); - this.sType = StructureType.COPY_IMAGE_TO_BUFFER_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcImage() { - return this.#view.getBigUint64(16, LE); - } - set srcImage(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get srcImageLayout() { - return this.#view.getUint32(24, LE); - } - set srcImageLayout(value) { - this.#view.setUint32(24, Number(value), LE); - } - get dstBuffer() { - return this.#view.getBigUint64(32, LE); - } - set dstBuffer(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get regionCount() { - return this.#view.getUint32(40, LE); - } - set regionCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pRegions() { - return this.#view.getBigUint64(48, LE); - } - set pRegions(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class ResolveImageInfo2 { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ResolveImageInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ResolveImageInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ResolveImageInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ResolveImageInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcImage && (this.srcImage = data.srcImage), void 0 !== data.srcImageLayout && (this.srcImageLayout = data.srcImageLayout), void 0 !== data.dstImage && (this.dstImage = data.dstImage), void 0 !== data.dstImageLayout && (this.dstImageLayout = data.dstImageLayout), void 0 !== data.regionCount && (this.regionCount = data.regionCount), void 0 !== data.pRegions && (this.pRegions = data.pRegions); - this.sType = StructureType.RESOLVE_IMAGE_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcImage() { - return this.#view.getBigUint64(16, LE); - } - set srcImage(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get srcImageLayout() { - return this.#view.getUint32(24, LE); - } - set srcImageLayout(value) { - this.#view.setUint32(24, Number(value), LE); - } - get dstImage() { - return this.#view.getBigUint64(32, LE); - } - set dstImage(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get dstImageLayout() { - return this.#view.getUint32(40, LE); - } - set dstImageLayout(value) { - this.#view.setUint32(40, Number(value), LE); - } - get regionCount() { - return this.#view.getUint32(44, LE); - } - set regionCount(value) { - this.#view.setUint32(44, Number(value), LE); - } - get pRegions() { - return this.#view.getBigUint64(48, LE); - } - set pRegions(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceShaderImageAtomicInt64FeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderImageInt64Atomics && (this.shaderImageInt64Atomics = data.shaderImageInt64Atomics), void 0 !== data.sparseImageInt64Atomics && (this.sparseImageInt64Atomics = data.sparseImageInt64Atomics); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderImageInt64Atomics() { - return this.#view.getUint32(16, LE); - } - set shaderImageInt64Atomics(value) { - this.#view.setUint32(16, Number(value), LE); - } - get sparseImageInt64Atomics() { - return this.#view.getUint32(20, LE); - } - set sparseImageInt64Atomics(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class FragmentShadingRateAttachmentInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FragmentShadingRateAttachmentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FragmentShadingRateAttachmentInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FragmentShadingRateAttachmentInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FragmentShadingRateAttachmentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pFragmentShadingRateAttachment && (this.pFragmentShadingRateAttachment = data.pFragmentShadingRateAttachment), void 0 !== data.shadingRateAttachmentTexelSize && (this.shadingRateAttachmentTexelSize = data.shadingRateAttachmentTexelSize); - this.sType = StructureType.FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pFragmentShadingRateAttachment() { - return this.#view.getBigUint64(16, LE); - } - set pFragmentShadingRateAttachment(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get shadingRateAttachmentTexelSize() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - set shadingRateAttachmentTexelSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } -} -export class PipelineFragmentShadingRateStateCreateInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineFragmentShadingRateStateCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineFragmentShadingRateStateCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineFragmentShadingRateStateCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineFragmentShadingRateStateCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentSize && (this.fragmentSize = data.fragmentSize), void 0 !== data.combinerOps && (this.combinerOps = data.combinerOps); - this.sType = StructureType.PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - set fragmentSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get combinerOps() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 24, 2); - } - set combinerOps(value) { - this.#data.set(new Uint8Array(value.buffer), 24); - } -} -export class PhysicalDeviceFragmentShadingRateFeaturesKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRateFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipelineFragmentShadingRate && (this.pipelineFragmentShadingRate = data.pipelineFragmentShadingRate), void 0 !== data.primitiveFragmentShadingRate && (this.primitiveFragmentShadingRate = data.primitiveFragmentShadingRate), void 0 !== data.attachmentFragmentShadingRate && (this.attachmentFragmentShadingRate = data.attachmentFragmentShadingRate); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipelineFragmentShadingRate() { - return this.#view.getUint32(16, LE); - } - set pipelineFragmentShadingRate(value) { - this.#view.setUint32(16, Number(value), LE); - } - get primitiveFragmentShadingRate() { - return this.#view.getUint32(20, LE); - } - set primitiveFragmentShadingRate(value) { - this.#view.setUint32(20, Number(value), LE); - } - get attachmentFragmentShadingRate() { - return this.#view.getUint32(24, LE); - } - set attachmentFragmentShadingRate(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceFragmentShadingRatePropertiesKHR { - static size = 96; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRatePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRatePropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRatePropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRatePropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minFragmentShadingRateAttachmentTexelSize && (this.minFragmentShadingRateAttachmentTexelSize = data.minFragmentShadingRateAttachmentTexelSize), void 0 !== data.maxFragmentShadingRateAttachmentTexelSize && (this.maxFragmentShadingRateAttachmentTexelSize = data.maxFragmentShadingRateAttachmentTexelSize), void 0 !== data.maxFragmentShadingRateAttachmentTexelSizeAspectRatio && (this.maxFragmentShadingRateAttachmentTexelSizeAspectRatio = data.maxFragmentShadingRateAttachmentTexelSizeAspectRatio), void 0 !== data.primitiveFragmentShadingRateWithMultipleViewports && (this.primitiveFragmentShadingRateWithMultipleViewports = data.primitiveFragmentShadingRateWithMultipleViewports), void 0 !== data.layeredShadingRateAttachments && (this.layeredShadingRateAttachments = data.layeredShadingRateAttachments), void 0 !== data.fragmentShadingRateNonTrivialCombinerOps && (this.fragmentShadingRateNonTrivialCombinerOps = data.fragmentShadingRateNonTrivialCombinerOps), void 0 !== data.maxFragmentSize && (this.maxFragmentSize = data.maxFragmentSize), void 0 !== data.maxFragmentSizeAspectRatio && (this.maxFragmentSizeAspectRatio = data.maxFragmentSizeAspectRatio), void 0 !== data.maxFragmentShadingRateCoverageSamples && (this.maxFragmentShadingRateCoverageSamples = data.maxFragmentShadingRateCoverageSamples), void 0 !== data.maxFragmentShadingRateRasterizationSamples && (this.maxFragmentShadingRateRasterizationSamples = data.maxFragmentShadingRateRasterizationSamples), void 0 !== data.fragmentShadingRateWithShaderDepthStencilWrites && (this.fragmentShadingRateWithShaderDepthStencilWrites = data.fragmentShadingRateWithShaderDepthStencilWrites), void 0 !== data.fragmentShadingRateWithSampleMask && (this.fragmentShadingRateWithSampleMask = data.fragmentShadingRateWithSampleMask), void 0 !== data.fragmentShadingRateWithShaderSampleMask && (this.fragmentShadingRateWithShaderSampleMask = data.fragmentShadingRateWithShaderSampleMask), void 0 !== data.fragmentShadingRateWithConservativeRasterization && (this.fragmentShadingRateWithConservativeRasterization = data.fragmentShadingRateWithConservativeRasterization), void 0 !== data.fragmentShadingRateWithFragmentShaderInterlock && (this.fragmentShadingRateWithFragmentShaderInterlock = data.fragmentShadingRateWithFragmentShaderInterlock), void 0 !== data.fragmentShadingRateWithCustomSampleLocations && (this.fragmentShadingRateWithCustomSampleLocations = data.fragmentShadingRateWithCustomSampleLocations), void 0 !== data.fragmentShadingRateStrictMultiplyCombiner && (this.fragmentShadingRateStrictMultiplyCombiner = data.fragmentShadingRateStrictMultiplyCombiner); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minFragmentShadingRateAttachmentTexelSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - set minFragmentShadingRateAttachmentTexelSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get maxFragmentShadingRateAttachmentTexelSize() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - set maxFragmentShadingRateAttachmentTexelSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get maxFragmentShadingRateAttachmentTexelSizeAspectRatio() { - return this.#view.getUint32(32, LE); - } - set maxFragmentShadingRateAttachmentTexelSizeAspectRatio(value) { - this.#view.setUint32(32, Number(value), LE); - } - get primitiveFragmentShadingRateWithMultipleViewports() { - return this.#view.getUint32(36, LE); - } - set primitiveFragmentShadingRateWithMultipleViewports(value) { - this.#view.setUint32(36, Number(value), LE); - } - get layeredShadingRateAttachments() { - return this.#view.getUint32(40, LE); - } - set layeredShadingRateAttachments(value) { - this.#view.setUint32(40, Number(value), LE); - } - get fragmentShadingRateNonTrivialCombinerOps() { - return this.#view.getUint32(44, LE); - } - set fragmentShadingRateNonTrivialCombinerOps(value) { - this.#view.setUint32(44, Number(value), LE); - } - get maxFragmentSize() { - return new Extent2D(this.#data.subarray(48, 48 + Extent2D.size)); - } - set maxFragmentSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 48); - } - get maxFragmentSizeAspectRatio() { - return this.#view.getUint32(56, LE); - } - set maxFragmentSizeAspectRatio(value) { - this.#view.setUint32(56, Number(value), LE); - } - get maxFragmentShadingRateCoverageSamples() { - return this.#view.getUint32(60, LE); - } - set maxFragmentShadingRateCoverageSamples(value) { - this.#view.setUint32(60, Number(value), LE); - } - get maxFragmentShadingRateRasterizationSamples() { - return this.#view.getUint32(64, LE); - } - set maxFragmentShadingRateRasterizationSamples(value) { - this.#view.setUint32(64, Number(value), LE); - } - get fragmentShadingRateWithShaderDepthStencilWrites() { - return this.#view.getUint32(68, LE); - } - set fragmentShadingRateWithShaderDepthStencilWrites(value) { - this.#view.setUint32(68, Number(value), LE); - } - get fragmentShadingRateWithSampleMask() { - return this.#view.getUint32(72, LE); - } - set fragmentShadingRateWithSampleMask(value) { - this.#view.setUint32(72, Number(value), LE); - } - get fragmentShadingRateWithShaderSampleMask() { - return this.#view.getUint32(76, LE); - } - set fragmentShadingRateWithShaderSampleMask(value) { - this.#view.setUint32(76, Number(value), LE); - } - get fragmentShadingRateWithConservativeRasterization() { - return this.#view.getUint32(80, LE); - } - set fragmentShadingRateWithConservativeRasterization(value) { - this.#view.setUint32(80, Number(value), LE); - } - get fragmentShadingRateWithFragmentShaderInterlock() { - return this.#view.getUint32(84, LE); - } - set fragmentShadingRateWithFragmentShaderInterlock(value) { - this.#view.setUint32(84, Number(value), LE); - } - get fragmentShadingRateWithCustomSampleLocations() { - return this.#view.getUint32(88, LE); - } - set fragmentShadingRateWithCustomSampleLocations(value) { - this.#view.setUint32(88, Number(value), LE); - } - get fragmentShadingRateStrictMultiplyCombiner() { - return this.#view.getUint32(92, LE); - } - set fragmentShadingRateStrictMultiplyCombiner(value) { - this.#view.setUint32(92, Number(value), LE); - } -} -export class PhysicalDeviceFragmentShadingRateKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRateKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.sampleCounts && (this.sampleCounts = data.sampleCounts), void 0 !== data.fragmentSize && (this.fragmentSize = data.fragmentSize); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get sampleCounts() { - return this.#view.getUint32(16, LE); - } - set sampleCounts(value) { - this.#view.setUint32(16, Number(value), LE); - } - get fragmentSize() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - set fragmentSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } -} -export class PhysicalDeviceShaderTerminateInvocationFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderTerminateInvocationFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderTerminateInvocationFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderTerminateInvocationFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderTerminateInvocationFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderTerminateInvocation && (this.shaderTerminateInvocation = data.shaderTerminateInvocation); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderTerminateInvocation() { - return this.#view.getUint32(16, LE); - } - set shaderTerminateInvocation(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceFragmentShadingRateEnumsFeaturesNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentShadingRateEnums && (this.fragmentShadingRateEnums = data.fragmentShadingRateEnums), void 0 !== data.supersampleFragmentShadingRates && (this.supersampleFragmentShadingRates = data.supersampleFragmentShadingRates), void 0 !== data.noInvocationFragmentShadingRates && (this.noInvocationFragmentShadingRates = data.noInvocationFragmentShadingRates); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentShadingRateEnums() { - return this.#view.getUint32(16, LE); - } - set fragmentShadingRateEnums(value) { - this.#view.setUint32(16, Number(value), LE); - } - get supersampleFragmentShadingRates() { - return this.#view.getUint32(20, LE); - } - set supersampleFragmentShadingRates(value) { - this.#view.setUint32(20, Number(value), LE); - } - get noInvocationFragmentShadingRates() { - return this.#view.getUint32(24, LE); - } - set noInvocationFragmentShadingRates(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceFragmentShadingRateEnumsPropertiesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxFragmentShadingRateInvocationCount && (this.maxFragmentShadingRateInvocationCount = data.maxFragmentShadingRateInvocationCount); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxFragmentShadingRateInvocationCount() { - return this.#view.getUint32(16, LE); - } - set maxFragmentShadingRateInvocationCount(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineFragmentShadingRateEnumStateCreateInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineFragmentShadingRateEnumStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineFragmentShadingRateEnumStateCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineFragmentShadingRateEnumStateCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineFragmentShadingRateEnumStateCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shadingRateType && (this.shadingRateType = data.shadingRateType), void 0 !== data.shadingRate && (this.shadingRate = data.shadingRate), void 0 !== data.combinerOps && (this.combinerOps = data.combinerOps); - this.sType = StructureType.PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shadingRateType() { - return this.#view.getUint32(16, LE); - } - set shadingRateType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get shadingRate() { - return this.#view.getUint32(20, LE); - } - set shadingRate(value) { - this.#view.setUint32(20, Number(value), LE); - } - get combinerOps() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 24, 2); - } - set combinerOps(value) { - this.#data.set(new Uint8Array(value.buffer), 24); - } -} -export class AccelerationStructureBuildSizesInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureBuildSizesInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureBuildSizesInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureBuildSizesInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureBuildSizesInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.accelerationStructureSize && (this.accelerationStructureSize = data.accelerationStructureSize), void 0 !== data.updateScratchSize && (this.updateScratchSize = data.updateScratchSize), void 0 !== data.buildScratchSize && (this.buildScratchSize = data.buildScratchSize); - this.sType = StructureType.ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get accelerationStructureSize() { - return this.#view.getBigUint64(16, LE); - } - set accelerationStructureSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get updateScratchSize() { - return this.#view.getBigUint64(24, LE); - } - set updateScratchSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get buildScratchSize() { - return this.#view.getBigUint64(32, LE); - } - set buildScratchSize(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class PhysicalDeviceImage2DViewOf3DFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImage2DViewOf3DFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImage2DViewOf3DFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImage2DViewOf3DFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImage2DViewOf3DFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.image2DViewOf3D && (this.image2DViewOf3D = data.image2DViewOf3D), void 0 !== data.sampler2DViewOf3D && (this.sampler2DViewOf3D = data.sampler2DViewOf3D); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get image2DViewOf3D() { - return this.#view.getUint32(16, LE); - } - set image2DViewOf3D(value) { - this.#view.setUint32(16, Number(value), LE); - } - get sampler2DViewOf3D() { - return this.#view.getUint32(20, LE); - } - set sampler2DViewOf3D(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceMutableDescriptorTypeFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.mutableDescriptorType && (this.mutableDescriptorType = data.mutableDescriptorType); - this.sType = StructureType.PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get mutableDescriptorType() { - return this.#view.getUint32(16, LE); - } - set mutableDescriptorType(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MutableDescriptorTypeListEXT { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MutableDescriptorTypeListEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MutableDescriptorTypeListEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MutableDescriptorTypeListEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MutableDescriptorTypeListEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.descriptorTypeCount && (this.descriptorTypeCount = data.descriptorTypeCount), void 0 !== data.pDescriptorTypes && (this.pDescriptorTypes = data.pDescriptorTypes); - } - get descriptorTypeCount() { - return this.#view.getUint32(0, LE); - } - set descriptorTypeCount(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pDescriptorTypes() { - return this.#view.getBigUint64(8, LE); - } - set pDescriptorTypes(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} -export class MutableDescriptorTypeCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MutableDescriptorTypeCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MutableDescriptorTypeCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MutableDescriptorTypeCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MutableDescriptorTypeCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.mutableDescriptorTypeListCount && (this.mutableDescriptorTypeListCount = data.mutableDescriptorTypeListCount), void 0 !== data.pMutableDescriptorTypeLists && (this.pMutableDescriptorTypeLists = data.pMutableDescriptorTypeLists); - this.sType = StructureType.MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get mutableDescriptorTypeListCount() { - return this.#view.getUint32(16, LE); - } - set mutableDescriptorTypeListCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pMutableDescriptorTypeLists() { - return this.#view.getBigUint64(24, LE); - } - set pMutableDescriptorTypeLists(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceDepthClipControlFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDepthClipControlFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthClipControlFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDepthClipControlFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDepthClipControlFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.depthClipControl && (this.depthClipControl = data.depthClipControl); - this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get depthClipControl() { - return this.#view.getUint32(16, LE); - } - set depthClipControl(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineViewportDepthClipControlCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineViewportDepthClipControlCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportDepthClipControlCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportDepthClipControlCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineViewportDepthClipControlCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.negativeOneToOne && (this.negativeOneToOne = data.negativeOneToOne); - this.sType = StructureType.PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get negativeOneToOne() { - return this.#view.getUint32(16, LE); - } - set negativeOneToOne(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceVertexInputDynamicStateFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.vertexInputDynamicState && (this.vertexInputDynamicState = data.vertexInputDynamicState); - this.sType = StructureType.PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get vertexInputDynamicState() { - return this.#view.getUint32(16, LE); - } - set vertexInputDynamicState(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceExternalMemoryRDMAFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceExternalMemoryRDMAFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalMemoryRDMAFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalMemoryRDMAFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceExternalMemoryRDMAFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.externalMemoryRDMA && (this.externalMemoryRDMA = data.externalMemoryRDMA); - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get externalMemoryRDMA() { - return this.#view.getUint32(16, LE); - } - set externalMemoryRDMA(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VertexInputBindingDescription2EXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VertexInputBindingDescription2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputBindingDescription2EXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputBindingDescription2EXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VertexInputBindingDescription2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.binding && (this.binding = data.binding), void 0 !== data.stride && (this.stride = data.stride), void 0 !== data.inputRate && (this.inputRate = data.inputRate), void 0 !== data.divisor && (this.divisor = data.divisor); - this.sType = StructureType.VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get binding() { - return this.#view.getUint32(16, LE); - } - set binding(value) { - this.#view.setUint32(16, Number(value), LE); - } - get stride() { - return this.#view.getUint32(20, LE); - } - set stride(value) { - this.#view.setUint32(20, Number(value), LE); - } - get inputRate() { - return this.#view.getUint32(24, LE); - } - set inputRate(value) { - this.#view.setUint32(24, Number(value), LE); - } - get divisor() { - return this.#view.getUint32(28, LE); - } - set divisor(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class VertexInputAttributeDescription2EXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VertexInputAttributeDescription2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputAttributeDescription2EXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputAttributeDescription2EXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VertexInputAttributeDescription2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.location && (this.location = data.location), void 0 !== data.binding && (this.binding = data.binding), void 0 !== data.format && (this.format = data.format), void 0 !== data.offset && (this.offset = data.offset); - this.sType = StructureType.VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get location() { - return this.#view.getUint32(16, LE); - } - set location(value) { - this.#view.setUint32(16, Number(value), LE); - } - get binding() { - return this.#view.getUint32(20, LE); - } - set binding(value) { - this.#view.setUint32(20, Number(value), LE); - } - get format() { - return this.#view.getUint32(24, LE); - } - set format(value) { - this.#view.setUint32(24, Number(value), LE); - } - get offset() { - return this.#view.getUint32(28, LE); - } - set offset(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDeviceColorWriteEnableFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceColorWriteEnableFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceColorWriteEnableFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceColorWriteEnableFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceColorWriteEnableFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.colorWriteEnable && (this.colorWriteEnable = data.colorWriteEnable); - this.sType = StructureType.PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get colorWriteEnable() { - return this.#view.getUint32(16, LE); - } - set colorWriteEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineColorWriteCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineColorWriteCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorWriteCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineColorWriteCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineColorWriteCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.attachmentCount && (this.attachmentCount = data.attachmentCount), void 0 !== data.pColorWriteEnables && (this.pColorWriteEnables = data.pColorWriteEnables); - this.sType = StructureType.PIPELINE_COLOR_WRITE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get attachmentCount() { - return this.#view.getUint32(16, LE); - } - set attachmentCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pColorWriteEnables() { - return this.#view.getBigUint64(24, LE); - } - set pColorWriteEnables(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class MemoryBarrier2 { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryBarrier2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryBarrier2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryBarrier2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryBarrier2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcStageMask && (this.srcStageMask = data.srcStageMask), void 0 !== data.srcAccessMask && (this.srcAccessMask = data.srcAccessMask), void 0 !== data.dstStageMask && (this.dstStageMask = data.dstStageMask), void 0 !== data.dstAccessMask && (this.dstAccessMask = data.dstAccessMask); - this.sType = StructureType.MEMORY_BARRIER_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcStageMask() { - return this.#view.getBigUint64(16, LE); - } - set srcStageMask(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get srcAccessMask() { - return this.#view.getBigUint64(24, LE); - } - set srcAccessMask(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get dstStageMask() { - return this.#view.getBigUint64(32, LE); - } - set dstStageMask(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get dstAccessMask() { - return this.#view.getBigUint64(40, LE); - } - set dstAccessMask(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } -} -export class ImageMemoryBarrier2 { - static size = 96; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageMemoryBarrier2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageMemoryBarrier2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageMemoryBarrier2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageMemoryBarrier2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcStageMask && (this.srcStageMask = data.srcStageMask), void 0 !== data.srcAccessMask && (this.srcAccessMask = data.srcAccessMask), void 0 !== data.dstStageMask && (this.dstStageMask = data.dstStageMask), void 0 !== data.dstAccessMask && (this.dstAccessMask = data.dstAccessMask), void 0 !== data.oldLayout && (this.oldLayout = data.oldLayout), void 0 !== data.newLayout && (this.newLayout = data.newLayout), void 0 !== data.srcQueueFamilyIndex && (this.srcQueueFamilyIndex = data.srcQueueFamilyIndex), void 0 !== data.dstQueueFamilyIndex && (this.dstQueueFamilyIndex = data.dstQueueFamilyIndex), void 0 !== data.image && (this.image = data.image), void 0 !== data.subresourceRange && (this.subresourceRange = data.subresourceRange); - this.sType = StructureType.IMAGE_MEMORY_BARRIER_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcStageMask() { - return this.#view.getBigUint64(16, LE); - } - set srcStageMask(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get srcAccessMask() { - return this.#view.getBigUint64(24, LE); - } - set srcAccessMask(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get dstStageMask() { - return this.#view.getBigUint64(32, LE); - } - set dstStageMask(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get dstAccessMask() { - return this.#view.getBigUint64(40, LE); - } - set dstAccessMask(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get oldLayout() { - return this.#view.getUint32(48, LE); - } - set oldLayout(value) { - this.#view.setUint32(48, Number(value), LE); - } - get newLayout() { - return this.#view.getUint32(52, LE); - } - set newLayout(value) { - this.#view.setUint32(52, Number(value), LE); - } - get srcQueueFamilyIndex() { - return this.#view.getUint32(56, LE); - } - set srcQueueFamilyIndex(value) { - this.#view.setUint32(56, Number(value), LE); - } - get dstQueueFamilyIndex() { - return this.#view.getUint32(60, LE); - } - set dstQueueFamilyIndex(value) { - this.#view.setUint32(60, Number(value), LE); - } - get image() { - return this.#view.getBigUint64(64, LE); - } - set image(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - get subresourceRange() { - return new ImageSubresourceRange(this.#data.subarray(72, 72 + ImageSubresourceRange.size)); - } - set subresourceRange(value) { - if (value[BUFFER].byteLength < ImageSubresourceRange.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 72); - } -} -export class BufferMemoryBarrier2 { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferMemoryBarrier2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferMemoryBarrier2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferMemoryBarrier2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferMemoryBarrier2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.srcStageMask && (this.srcStageMask = data.srcStageMask), void 0 !== data.srcAccessMask && (this.srcAccessMask = data.srcAccessMask), void 0 !== data.dstStageMask && (this.dstStageMask = data.dstStageMask), void 0 !== data.dstAccessMask && (this.dstAccessMask = data.dstAccessMask), void 0 !== data.srcQueueFamilyIndex && (this.srcQueueFamilyIndex = data.srcQueueFamilyIndex), void 0 !== data.dstQueueFamilyIndex && (this.dstQueueFamilyIndex = data.dstQueueFamilyIndex), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.size && (this.size = data.size); - this.sType = StructureType.BUFFER_MEMORY_BARRIER_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get srcStageMask() { - return this.#view.getBigUint64(16, LE); - } - set srcStageMask(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get srcAccessMask() { - return this.#view.getBigUint64(24, LE); - } - set srcAccessMask(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get dstStageMask() { - return this.#view.getBigUint64(32, LE); - } - set dstStageMask(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get dstAccessMask() { - return this.#view.getBigUint64(40, LE); - } - set dstAccessMask(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get srcQueueFamilyIndex() { - return this.#view.getUint32(48, LE); - } - set srcQueueFamilyIndex(value) { - this.#view.setUint32(48, Number(value), LE); - } - get dstQueueFamilyIndex() { - return this.#view.getUint32(52, LE); - } - set dstQueueFamilyIndex(value) { - this.#view.setUint32(52, Number(value), LE); - } - get buffer() { - return this.#view.getBigUint64(56, LE); - } - set buffer(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get offset() { - return this.#view.getBigUint64(64, LE); - } - set offset(value) { - this.#view.setBigUint64(64, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(72, LE); - } - set size(value) { - this.#view.setBigUint64(72, BigInt(value), LE); - } -} -export class DependencyInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DependencyInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DependencyInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DependencyInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DependencyInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.dependencyFlags && (this.dependencyFlags = data.dependencyFlags), void 0 !== data.memoryBarrierCount && (this.memoryBarrierCount = data.memoryBarrierCount), void 0 !== data.pMemoryBarriers && (this.pMemoryBarriers = data.pMemoryBarriers), void 0 !== data.bufferMemoryBarrierCount && (this.bufferMemoryBarrierCount = data.bufferMemoryBarrierCount), void 0 !== data.pBufferMemoryBarriers && (this.pBufferMemoryBarriers = data.pBufferMemoryBarriers), void 0 !== data.imageMemoryBarrierCount && (this.imageMemoryBarrierCount = data.imageMemoryBarrierCount), void 0 !== data.pImageMemoryBarriers && (this.pImageMemoryBarriers = data.pImageMemoryBarriers); - this.sType = StructureType.DEPENDENCY_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dependencyFlags() { - return this.#view.getUint32(16, LE); - } - set dependencyFlags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get memoryBarrierCount() { - return this.#view.getUint32(20, LE); - } - set memoryBarrierCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pMemoryBarriers() { - return this.#view.getBigUint64(24, LE); - } - set pMemoryBarriers(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get bufferMemoryBarrierCount() { - return this.#view.getUint32(32, LE); - } - set bufferMemoryBarrierCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pBufferMemoryBarriers() { - return this.#view.getBigUint64(40, LE); - } - set pBufferMemoryBarriers(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get imageMemoryBarrierCount() { - return this.#view.getUint32(48, LE); - } - set imageMemoryBarrierCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pImageMemoryBarriers() { - return this.#view.getBigUint64(56, LE); - } - set pImageMemoryBarriers(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class SemaphoreSubmitInfo { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SemaphoreSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreSubmitInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreSubmitInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SemaphoreSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.value && (this.value = data.value), void 0 !== data.stageMask && (this.stageMask = data.stageMask), void 0 !== data.deviceIndex && (this.deviceIndex = data.deviceIndex); - this.sType = StructureType.SEMAPHORE_SUBMIT_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - set semaphore(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get value() { - return this.#view.getBigUint64(24, LE); - } - set value(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get stageMask() { - return this.#view.getBigUint64(32, LE); - } - set stageMask(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get deviceIndex() { - return this.#view.getUint32(40, LE); - } - set deviceIndex(value) { - this.#view.setUint32(40, Number(value), LE); - } -} -export class CommandBufferSubmitInfo { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CommandBufferSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferSubmitInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferSubmitInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CommandBufferSubmitInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.commandBuffer && (this.commandBuffer = data.commandBuffer), void 0 !== data.deviceMask && (this.deviceMask = data.deviceMask); - this.sType = StructureType.COMMAND_BUFFER_SUBMIT_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get commandBuffer() { - return this.#view.getBigUint64(16, LE); - } - set commandBuffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get deviceMask() { - return this.#view.getUint32(24, LE); - } - set deviceMask(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class SubmitInfo2 { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubmitInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubmitInfo2.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubmitInfo2.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubmitInfo2.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.waitSemaphoreInfoCount && (this.waitSemaphoreInfoCount = data.waitSemaphoreInfoCount), void 0 !== data.pWaitSemaphoreInfos && (this.pWaitSemaphoreInfos = data.pWaitSemaphoreInfos), void 0 !== data.commandBufferInfoCount && (this.commandBufferInfoCount = data.commandBufferInfoCount), void 0 !== data.pCommandBufferInfos && (this.pCommandBufferInfos = data.pCommandBufferInfos), void 0 !== data.signalSemaphoreInfoCount && (this.signalSemaphoreInfoCount = data.signalSemaphoreInfoCount), void 0 !== data.pSignalSemaphoreInfos && (this.pSignalSemaphoreInfos = data.pSignalSemaphoreInfos); - this.sType = StructureType.SUBMIT_INFO_2; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get waitSemaphoreInfoCount() { - return this.#view.getUint32(20, LE); - } - set waitSemaphoreInfoCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pWaitSemaphoreInfos() { - return this.#view.getBigUint64(24, LE); - } - set pWaitSemaphoreInfos(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get commandBufferInfoCount() { - return this.#view.getUint32(32, LE); - } - set commandBufferInfoCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pCommandBufferInfos() { - return this.#view.getBigUint64(40, LE); - } - set pCommandBufferInfos(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get signalSemaphoreInfoCount() { - return this.#view.getUint32(48, LE); - } - set signalSemaphoreInfoCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pSignalSemaphoreInfos() { - return this.#view.getBigUint64(56, LE); - } - set pSignalSemaphoreInfos(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class QueueFamilyCheckpointProperties2NV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueueFamilyCheckpointProperties2NV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyCheckpointProperties2NV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyCheckpointProperties2NV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueueFamilyCheckpointProperties2NV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.checkpointExecutionStageMask && (this.checkpointExecutionStageMask = data.checkpointExecutionStageMask); - this.sType = StructureType.QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get checkpointExecutionStageMask() { - return this.#view.getBigUint64(16, LE); - } - set checkpointExecutionStageMask(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class CheckpointData2NV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CheckpointData2NV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CheckpointData2NV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CheckpointData2NV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CheckpointData2NV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stage && (this.stage = data.stage), void 0 !== data.pCheckpointMarker && (this.pCheckpointMarker = data.pCheckpointMarker); - this.sType = StructureType.CHECKPOINT_DATA_2_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stage() { - return this.#view.getBigUint64(16, LE); - } - set stage(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get pCheckpointMarker() { - return this.#view.getBigUint64(24, LE); - } - set pCheckpointMarker(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceSynchronization2Features { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSynchronization2Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSynchronization2Features.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSynchronization2Features.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSynchronization2Features.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.synchronization2 && (this.synchronization2 = data.synchronization2); - this.sType = StructureType.PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get synchronization2() { - return this.#view.getUint32(16, LE); - } - set synchronization2(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.primitivesGeneratedQuery && (this.primitivesGeneratedQuery = data.primitivesGeneratedQuery), void 0 !== data.primitivesGeneratedQueryWithRasterizerDiscard && (this.primitivesGeneratedQueryWithRasterizerDiscard = data.primitivesGeneratedQueryWithRasterizerDiscard), void 0 !== data.primitivesGeneratedQueryWithNonZeroStreams && (this.primitivesGeneratedQueryWithNonZeroStreams = data.primitivesGeneratedQueryWithNonZeroStreams); - this.sType = StructureType.PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get primitivesGeneratedQuery() { - return this.#view.getUint32(16, LE); - } - set primitivesGeneratedQuery(value) { - this.#view.setUint32(16, Number(value), LE); - } - get primitivesGeneratedQueryWithRasterizerDiscard() { - return this.#view.getUint32(20, LE); - } - set primitivesGeneratedQueryWithRasterizerDiscard(value) { - this.#view.setUint32(20, Number(value), LE); - } - get primitivesGeneratedQueryWithNonZeroStreams() { - return this.#view.getUint32(24, LE); - } - set primitivesGeneratedQueryWithNonZeroStreams(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceLegacyDitheringFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceLegacyDitheringFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLegacyDitheringFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLegacyDitheringFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceLegacyDitheringFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.legacyDithering && (this.legacyDithering = data.legacyDithering); - this.sType = StructureType.PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get legacyDithering() { - return this.#view.getUint32(16, LE); - } - set legacyDithering(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.multisampledRenderToSingleSampled && (this.multisampledRenderToSingleSampled = data.multisampledRenderToSingleSampled); - this.sType = StructureType.PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get multisampledRenderToSingleSampled() { - return this.#view.getUint32(16, LE); - } - set multisampledRenderToSingleSampled(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class SubpassResolvePerformanceQueryEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubpassResolvePerformanceQueryEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassResolvePerformanceQueryEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassResolvePerformanceQueryEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubpassResolvePerformanceQueryEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.optimal && (this.optimal = data.optimal); - this.sType = StructureType.SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get optimal() { - return this.#view.getUint32(16, LE); - } - set optimal(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MultisampledRenderToSingleSampledInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MultisampledRenderToSingleSampledInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultisampledRenderToSingleSampledInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MultisampledRenderToSingleSampledInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MultisampledRenderToSingleSampledInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.multisampledRenderToSingleSampledEnable && (this.multisampledRenderToSingleSampledEnable = data.multisampledRenderToSingleSampledEnable), void 0 !== data.rasterizationSamples && (this.rasterizationSamples = data.rasterizationSamples); - this.sType = StructureType.MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get multisampledRenderToSingleSampledEnable() { - return this.#view.getUint32(16, LE); - } - set multisampledRenderToSingleSampledEnable(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rasterizationSamples() { - return this.#view.getUint32(20, LE); - } - set rasterizationSamples(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDevicePipelineProtectedAccessFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePipelineProtectedAccessFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineProtectedAccessFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineProtectedAccessFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePipelineProtectedAccessFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipelineProtectedAccess && (this.pipelineProtectedAccess = data.pipelineProtectedAccess); - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipelineProtectedAccess() { - return this.#view.getUint32(16, LE); - } - set pipelineProtectedAccess(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class QueueFamilyVideoPropertiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueueFamilyVideoPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyVideoPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyVideoPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueueFamilyVideoPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.videoCodecOperations && (this.videoCodecOperations = data.videoCodecOperations); - this.sType = StructureType.QUEUE_FAMILY_VIDEO_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get videoCodecOperations() { - return this.#view.getUint32(16, LE); - } - set videoCodecOperations(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class QueueFamilyQueryResultStatusPropertiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(QueueFamilyQueryResultStatusPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyQueryResultStatusPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyQueryResultStatusPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(QueueFamilyQueryResultStatusPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.queryResultStatusSupport && (this.queryResultStatusSupport = data.queryResultStatusSupport); - this.sType = StructureType.QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get queryResultStatusSupport() { - return this.#view.getUint32(16, LE); - } - set queryResultStatusSupport(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoProfileListInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoProfileListInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoProfileListInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoProfileListInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoProfileListInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.profileCount && (this.profileCount = data.profileCount), void 0 !== data.pProfiles && (this.pProfiles = data.pProfiles); - this.sType = StructureType.VIDEO_PROFILE_LIST_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get profileCount() { - return this.#view.getUint32(16, LE); - } - set profileCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pProfiles() { - return this.#view.getBigUint64(24, LE); - } - set pProfiles(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceVideoFormatInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceVideoFormatInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVideoFormatInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVideoFormatInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceVideoFormatInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageUsage && (this.imageUsage = data.imageUsage); - this.sType = StructureType.PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageUsage() { - return this.#view.getUint32(16, LE); - } - set imageUsage(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoFormatPropertiesKHR { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoFormatPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoFormatPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoFormatPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoFormatPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.format && (this.format = data.format), void 0 !== data.componentMapping && (this.componentMapping = data.componentMapping), void 0 !== data.imageCreateFlags && (this.imageCreateFlags = data.imageCreateFlags), void 0 !== data.imageType && (this.imageType = data.imageType), void 0 !== data.imageTiling && (this.imageTiling = data.imageTiling), void 0 !== data.imageUsageFlags && (this.imageUsageFlags = data.imageUsageFlags); - this.sType = StructureType.VIDEO_FORMAT_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get format() { - return this.#view.getUint32(16, LE); - } - set format(value) { - this.#view.setUint32(16, Number(value), LE); - } - get componentMapping() { - return new ComponentMapping(this.#data.subarray(20, 20 + ComponentMapping.size)); - } - set componentMapping(value) { - if (value[BUFFER].byteLength < ComponentMapping.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } - get imageCreateFlags() { - return this.#view.getUint32(36, LE); - } - set imageCreateFlags(value) { - this.#view.setUint32(36, Number(value), LE); - } - get imageType() { - return this.#view.getUint32(40, LE); - } - set imageType(value) { - this.#view.setUint32(40, Number(value), LE); - } - get imageTiling() { - return this.#view.getUint32(44, LE); - } - set imageTiling(value) { - this.#view.setUint32(44, Number(value), LE); - } - get imageUsageFlags() { - return this.#view.getUint32(48, LE); - } - set imageUsageFlags(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class VideoProfileInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoProfileInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoProfileInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoProfileInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoProfileInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.videoCodecOperation && (this.videoCodecOperation = data.videoCodecOperation), void 0 !== data.chromaSubsampling && (this.chromaSubsampling = data.chromaSubsampling), void 0 !== data.lumaBitDepth && (this.lumaBitDepth = data.lumaBitDepth), void 0 !== data.chromaBitDepth && (this.chromaBitDepth = data.chromaBitDepth); - this.sType = StructureType.VIDEO_PROFILE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get videoCodecOperation() { - return this.#view.getUint32(16, LE); - } - set videoCodecOperation(value) { - this.#view.setUint32(16, Number(value), LE); - } - get chromaSubsampling() { - return this.#view.getUint32(20, LE); - } - set chromaSubsampling(value) { - this.#view.setUint32(20, Number(value), LE); - } - get lumaBitDepth() { - return this.#view.getUint32(24, LE); - } - set lumaBitDepth(value) { - this.#view.setUint32(24, Number(value), LE); - } - get chromaBitDepth() { - return this.#view.getUint32(28, LE); - } - set chromaBitDepth(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class VideoCapabilitiesKHR { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoCapabilitiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.minBitstreamBufferOffsetAlignment && (this.minBitstreamBufferOffsetAlignment = data.minBitstreamBufferOffsetAlignment), void 0 !== data.minBitstreamBufferSizeAlignment && (this.minBitstreamBufferSizeAlignment = data.minBitstreamBufferSizeAlignment), void 0 !== data.pictureAccessGranularity && (this.pictureAccessGranularity = data.pictureAccessGranularity), void 0 !== data.minCodedExtent && (this.minCodedExtent = data.minCodedExtent), void 0 !== data.maxCodedExtent && (this.maxCodedExtent = data.maxCodedExtent), void 0 !== data.maxDpbSlots && (this.maxDpbSlots = data.maxDpbSlots), void 0 !== data.maxActiveReferencePictures && (this.maxActiveReferencePictures = data.maxActiveReferencePictures), void 0 !== data.stdHeaderVersion && (this.stdHeaderVersion = data.stdHeaderVersion); - this.sType = StructureType.VIDEO_CAPABILITIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get minBitstreamBufferOffsetAlignment() { - return this.#view.getBigUint64(24, LE); - } - set minBitstreamBufferOffsetAlignment(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get minBitstreamBufferSizeAlignment() { - return this.#view.getBigUint64(32, LE); - } - set minBitstreamBufferSizeAlignment(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get pictureAccessGranularity() { - return new Extent2D(this.#data.subarray(40, 40 + Extent2D.size)); - } - set pictureAccessGranularity(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } - get minCodedExtent() { - return new Extent2D(this.#data.subarray(48, 48 + Extent2D.size)); - } - set minCodedExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 48); - } - get maxCodedExtent() { - return new Extent2D(this.#data.subarray(56, 56 + Extent2D.size)); - } - set maxCodedExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 56); - } - get maxDpbSlots() { - return this.#view.getUint32(64, LE); - } - set maxDpbSlots(value) { - this.#view.setUint32(64, Number(value), LE); - } - get maxActiveReferencePictures() { - return this.#view.getUint32(68, LE); - } - set maxActiveReferencePictures(value) { - this.#view.setUint32(68, Number(value), LE); - } - get stdHeaderVersion() { - return new ExtensionProperties(this.#data.subarray(72, 72 + ExtensionProperties.size)); - } - set stdHeaderVersion(value) { - if (value[BUFFER].byteLength < ExtensionProperties.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 72); - } -} -export class VideoSessionMemoryRequirementsKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoSessionMemoryRequirementsKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionMemoryRequirementsKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoSessionMemoryRequirementsKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoSessionMemoryRequirementsKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryBindIndex && (this.memoryBindIndex = data.memoryBindIndex), void 0 !== data.memoryRequirements && (this.memoryRequirements = data.memoryRequirements); - this.sType = StructureType.VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryBindIndex() { - return this.#view.getUint32(16, LE); - } - set memoryBindIndex(value) { - this.#view.setUint32(16, Number(value), LE); - } - get memoryRequirements() { - return new MemoryRequirements(this.#data.subarray(24, 24 + MemoryRequirements.size)); - } - set memoryRequirements(value) { - if (value[BUFFER].byteLength < MemoryRequirements.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } -} -export class BindVideoSessionMemoryInfoKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BindVideoSessionMemoryInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindVideoSessionMemoryInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BindVideoSessionMemoryInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BindVideoSessionMemoryInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryBindIndex && (this.memoryBindIndex = data.memoryBindIndex), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.memoryOffset && (this.memoryOffset = data.memoryOffset), void 0 !== data.memorySize && (this.memorySize = data.memorySize); - this.sType = StructureType.BIND_VIDEO_SESSION_MEMORY_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryBindIndex() { - return this.#view.getUint32(16, LE); - } - set memoryBindIndex(value) { - this.#view.setUint32(16, Number(value), LE); - } - get memory() { - return this.#view.getBigUint64(24, LE); - } - set memory(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get memoryOffset() { - return this.#view.getBigUint64(32, LE); - } - set memoryOffset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get memorySize() { - return this.#view.getBigUint64(40, LE); - } - set memorySize(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } -} -export class VideoPictureResourceInfoKHR { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoPictureResourceInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoPictureResourceInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoPictureResourceInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoPictureResourceInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.codedOffset && (this.codedOffset = data.codedOffset), void 0 !== data.codedExtent && (this.codedExtent = data.codedExtent), void 0 !== data.baseArrayLayer && (this.baseArrayLayer = data.baseArrayLayer), void 0 !== data.imageViewBinding && (this.imageViewBinding = data.imageViewBinding); - this.sType = StructureType.VIDEO_PICTURE_RESOURCE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get codedOffset() { - return new Offset2D(this.#data.subarray(16, 16 + Offset2D.size)); - } - set codedOffset(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get codedExtent() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - set codedExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get baseArrayLayer() { - return this.#view.getUint32(32, LE); - } - set baseArrayLayer(value) { - this.#view.setUint32(32, Number(value), LE); - } - get imageViewBinding() { - return this.#view.getBigUint64(40, LE); - } - set imageViewBinding(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class VideoReferenceSlotInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoReferenceSlotInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoReferenceSlotInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoReferenceSlotInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoReferenceSlotInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.slotIndex && (this.slotIndex = data.slotIndex), void 0 !== data.pPictureResource && (this.pPictureResource = data.pPictureResource); - this.sType = StructureType.VIDEO_REFERENCE_SLOT_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get slotIndex() { - return this.#view.getInt32(16, LE); - } - set slotIndex(value) { - this.#view.setInt32(16, Number(value), LE); - } - get pPictureResource() { - return this.#view.getBigUint64(24, LE); - } - set pPictureResource(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class VideoDecodeCapabilitiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeCapabilitiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.VIDEO_DECODE_CAPABILITIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoDecodeUsageInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeUsageInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeUsageInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeUsageInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeUsageInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.videoUsageHints && (this.videoUsageHints = data.videoUsageHints); - this.sType = StructureType.VIDEO_DECODE_USAGE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get videoUsageHints() { - return this.#view.getUint32(16, LE); - } - set videoUsageHints(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoDecodeInfoKHR { - static size = 120; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.srcBuffer && (this.srcBuffer = data.srcBuffer), void 0 !== data.srcBufferOffset && (this.srcBufferOffset = data.srcBufferOffset), void 0 !== data.srcBufferRange && (this.srcBufferRange = data.srcBufferRange), void 0 !== data.dstPictureResource && (this.dstPictureResource = data.dstPictureResource), void 0 !== data.pSetupReferenceSlot && (this.pSetupReferenceSlot = data.pSetupReferenceSlot), void 0 !== data.referenceSlotCount && (this.referenceSlotCount = data.referenceSlotCount), void 0 !== data.pReferenceSlots && (this.pReferenceSlots = data.pReferenceSlots); - this.sType = StructureType.VIDEO_DECODE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get srcBuffer() { - return this.#view.getBigUint64(24, LE); - } - set srcBuffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get srcBufferOffset() { - return this.#view.getBigUint64(32, LE); - } - set srcBufferOffset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get srcBufferRange() { - return this.#view.getBigUint64(40, LE); - } - set srcBufferRange(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get dstPictureResource() { - return new VideoPictureResourceInfoKHR(this.#data.subarray(48, 48 + VideoPictureResourceInfoKHR.size)); - } - set dstPictureResource(value) { - if (value[BUFFER].byteLength < VideoPictureResourceInfoKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 48); - } - get pSetupReferenceSlot() { - return this.#view.getBigUint64(96, LE); - } - set pSetupReferenceSlot(value) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } - get referenceSlotCount() { - return this.#view.getUint32(104, LE); - } - set referenceSlotCount(value) { - this.#view.setUint32(104, Number(value), LE); - } - get pReferenceSlots() { - return this.#view.getBigUint64(112, LE); - } - set pReferenceSlots(value) { - this.#view.setBigUint64(112, BigInt(anyPointer(value)), LE); - } -} -export class VideoDecodeH264ProfileInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH264ProfileInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264ProfileInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264ProfileInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH264ProfileInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stdProfileIdc && (this.stdProfileIdc = data.stdProfileIdc), void 0 !== data.pictureLayout && (this.pictureLayout = data.pictureLayout); - this.sType = StructureType.VIDEO_DECODE_H264_PROFILE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stdProfileIdc() { - return this.#view.getUint32(16, LE); - } - set stdProfileIdc(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pictureLayout() { - return this.#view.getUint32(20, LE); - } - set pictureLayout(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class VideoDecodeH264CapabilitiesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH264CapabilitiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264CapabilitiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264CapabilitiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH264CapabilitiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxLevelIdc && (this.maxLevelIdc = data.maxLevelIdc), void 0 !== data.fieldOffsetGranularity && (this.fieldOffsetGranularity = data.fieldOffsetGranularity); - this.sType = StructureType.VIDEO_DECODE_H264_CAPABILITIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxLevelIdc() { - return this.#view.getUint32(16, LE); - } - set maxLevelIdc(value) { - this.#view.setUint32(16, Number(value), LE); - } - get fieldOffsetGranularity() { - return new Offset2D(this.#data.subarray(20, 20 + Offset2D.size)); - } - set fieldOffsetGranularity(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } -} -export class VideoDecodeH264SessionParametersAddInfoEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH264SessionParametersAddInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264SessionParametersAddInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264SessionParametersAddInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH264SessionParametersAddInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stdSPSCount && (this.stdSPSCount = data.stdSPSCount), void 0 !== data.pStdSPSs && (this.pStdSPSs = data.pStdSPSs), void 0 !== data.stdPPSCount && (this.stdPPSCount = data.stdPPSCount), void 0 !== data.pStdPPSs && (this.pStdPPSs = data.pStdPPSs); - this.sType = StructureType.VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stdSPSCount() { - return this.#view.getUint32(16, LE); - } - set stdSPSCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pStdSPSs() { - return this.#view.getBigUint64(24, LE); - } - set pStdSPSs(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get stdPPSCount() { - return this.#view.getUint32(32, LE); - } - set stdPPSCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pStdPPSs() { - return this.#view.getBigUint64(40, LE); - } - set pStdPPSs(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class VideoDecodeH264SessionParametersCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH264SessionParametersCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264SessionParametersCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264SessionParametersCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH264SessionParametersCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxStdSPSCount && (this.maxStdSPSCount = data.maxStdSPSCount), void 0 !== data.maxStdPPSCount && (this.maxStdPPSCount = data.maxStdPPSCount), void 0 !== data.pParametersAddInfo && (this.pParametersAddInfo = data.pParametersAddInfo); - this.sType = StructureType.VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxStdSPSCount() { - return this.#view.getUint32(16, LE); - } - set maxStdSPSCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxStdPPSCount() { - return this.#view.getUint32(20, LE); - } - set maxStdPPSCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pParametersAddInfo() { - return this.#view.getBigUint64(24, LE); - } - set pParametersAddInfo(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class VideoDecodeH264PictureInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH264PictureInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264PictureInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264PictureInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH264PictureInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pStdPictureInfo && (this.pStdPictureInfo = data.pStdPictureInfo), void 0 !== data.sliceCount && (this.sliceCount = data.sliceCount), void 0 !== data.pSliceOffsets && (this.pSliceOffsets = data.pSliceOffsets); - this.sType = StructureType.VIDEO_DECODE_H264_PICTURE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pStdPictureInfo() { - return this.#view.getBigUint64(16, LE); - } - set pStdPictureInfo(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get sliceCount() { - return this.#view.getUint32(24, LE); - } - set sliceCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pSliceOffsets() { - return this.#view.getBigUint64(32, LE); - } - set pSliceOffsets(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoDecodeH264DpbSlotInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH264DpbSlotInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264DpbSlotInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264DpbSlotInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH264DpbSlotInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pStdReferenceInfo && (this.pStdReferenceInfo = data.pStdReferenceInfo); - this.sType = StructureType.VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pStdReferenceInfo() { - return this.#view.getBigUint64(16, LE); - } - set pStdReferenceInfo(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class VideoDecodeH265ProfileInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH265ProfileInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265ProfileInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265ProfileInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH265ProfileInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stdProfileIdc && (this.stdProfileIdc = data.stdProfileIdc); - this.sType = StructureType.VIDEO_DECODE_H265_PROFILE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stdProfileIdc() { - return this.#view.getUint32(16, LE); - } - set stdProfileIdc(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoDecodeH265CapabilitiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH265CapabilitiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265CapabilitiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265CapabilitiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH265CapabilitiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxLevelIdc && (this.maxLevelIdc = data.maxLevelIdc); - this.sType = StructureType.VIDEO_DECODE_H265_CAPABILITIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxLevelIdc() { - return this.#view.getUint32(16, LE); - } - set maxLevelIdc(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoDecodeH265SessionParametersAddInfoEXT { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH265SessionParametersAddInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265SessionParametersAddInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265SessionParametersAddInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH265SessionParametersAddInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stdVPSCount && (this.stdVPSCount = data.stdVPSCount), void 0 !== data.pStdVPSs && (this.pStdVPSs = data.pStdVPSs), void 0 !== data.stdSPSCount && (this.stdSPSCount = data.stdSPSCount), void 0 !== data.pStdSPSs && (this.pStdSPSs = data.pStdSPSs), void 0 !== data.stdPPSCount && (this.stdPPSCount = data.stdPPSCount), void 0 !== data.pStdPPSs && (this.pStdPPSs = data.pStdPPSs); - this.sType = StructureType.VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stdVPSCount() { - return this.#view.getUint32(16, LE); - } - set stdVPSCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pStdVPSs() { - return this.#view.getBigUint64(24, LE); - } - set pStdVPSs(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get stdSPSCount() { - return this.#view.getUint32(32, LE); - } - set stdSPSCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pStdSPSs() { - return this.#view.getBigUint64(40, LE); - } - set pStdSPSs(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get stdPPSCount() { - return this.#view.getUint32(48, LE); - } - set stdPPSCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pStdPPSs() { - return this.#view.getBigUint64(56, LE); - } - set pStdPPSs(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class VideoDecodeH265SessionParametersCreateInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH265SessionParametersCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265SessionParametersCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265SessionParametersCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH265SessionParametersCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxStdVPSCount && (this.maxStdVPSCount = data.maxStdVPSCount), void 0 !== data.maxStdSPSCount && (this.maxStdSPSCount = data.maxStdSPSCount), void 0 !== data.maxStdPPSCount && (this.maxStdPPSCount = data.maxStdPPSCount), void 0 !== data.pParametersAddInfo && (this.pParametersAddInfo = data.pParametersAddInfo); - this.sType = StructureType.VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxStdVPSCount() { - return this.#view.getUint32(16, LE); - } - set maxStdVPSCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxStdSPSCount() { - return this.#view.getUint32(20, LE); - } - set maxStdSPSCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxStdPPSCount() { - return this.#view.getUint32(24, LE); - } - set maxStdPPSCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pParametersAddInfo() { - return this.#view.getBigUint64(32, LE); - } - set pParametersAddInfo(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoDecodeH265PictureInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH265PictureInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265PictureInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265PictureInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH265PictureInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pStdPictureInfo && (this.pStdPictureInfo = data.pStdPictureInfo), void 0 !== data.sliceCount && (this.sliceCount = data.sliceCount), void 0 !== data.pSliceOffsets && (this.pSliceOffsets = data.pSliceOffsets); - this.sType = StructureType.VIDEO_DECODE_H265_PICTURE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pStdPictureInfo() { - return this.#view.getBigUint64(16, LE); - } - set pStdPictureInfo(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get sliceCount() { - return this.#view.getUint32(24, LE); - } - set sliceCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pSliceOffsets() { - return this.#view.getBigUint64(32, LE); - } - set pSliceOffsets(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoDecodeH265DpbSlotInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoDecodeH265DpbSlotInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265DpbSlotInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265DpbSlotInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoDecodeH265DpbSlotInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pStdReferenceInfo && (this.pStdReferenceInfo = data.pStdReferenceInfo); - this.sType = StructureType.VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pStdReferenceInfo() { - return this.#view.getBigUint64(16, LE); - } - set pStdReferenceInfo(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class VideoSessionCreateInfoKHR { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoSessionCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoSessionCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoSessionCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.queueFamilyIndex && (this.queueFamilyIndex = data.queueFamilyIndex), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.pVideoProfile && (this.pVideoProfile = data.pVideoProfile), void 0 !== data.pictureFormat && (this.pictureFormat = data.pictureFormat), void 0 !== data.maxCodedExtent && (this.maxCodedExtent = data.maxCodedExtent), void 0 !== data.referencePictureFormat && (this.referencePictureFormat = data.referencePictureFormat), void 0 !== data.maxDpbSlots && (this.maxDpbSlots = data.maxDpbSlots), void 0 !== data.maxActiveReferencePictures && (this.maxActiveReferencePictures = data.maxActiveReferencePictures), void 0 !== data.pStdHeaderVersion && (this.pStdHeaderVersion = data.pStdHeaderVersion); - this.sType = StructureType.VIDEO_SESSION_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get queueFamilyIndex() { - return this.#view.getUint32(16, LE); - } - set queueFamilyIndex(value) { - this.#view.setUint32(16, Number(value), LE); - } - get flags() { - return this.#view.getUint32(20, LE); - } - set flags(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pVideoProfile() { - return this.#view.getBigUint64(24, LE); - } - set pVideoProfile(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pictureFormat() { - return this.#view.getUint32(32, LE); - } - set pictureFormat(value) { - this.#view.setUint32(32, Number(value), LE); - } - get maxCodedExtent() { - return new Extent2D(this.#data.subarray(36, 36 + Extent2D.size)); - } - set maxCodedExtent(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 36); - } - get referencePictureFormat() { - return this.#view.getUint32(44, LE); - } - set referencePictureFormat(value) { - this.#view.setUint32(44, Number(value), LE); - } - get maxDpbSlots() { - return this.#view.getUint32(48, LE); - } - set maxDpbSlots(value) { - this.#view.setUint32(48, Number(value), LE); - } - get maxActiveReferencePictures() { - return this.#view.getUint32(52, LE); - } - set maxActiveReferencePictures(value) { - this.#view.setUint32(52, Number(value), LE); - } - get pStdHeaderVersion() { - return this.#view.getBigUint64(56, LE); - } - set pStdHeaderVersion(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class VideoSessionParametersCreateInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoSessionParametersCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionParametersCreateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoSessionParametersCreateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoSessionParametersCreateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.videoSessionParametersTemplate && (this.videoSessionParametersTemplate = data.videoSessionParametersTemplate), void 0 !== data.videoSession && (this.videoSession = data.videoSession); - this.sType = StructureType.VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get videoSessionParametersTemplate() { - return this.#view.getBigUint64(24, LE); - } - set videoSessionParametersTemplate(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get videoSession() { - return this.#view.getBigUint64(32, LE); - } - set videoSession(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoSessionParametersUpdateInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoSessionParametersUpdateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionParametersUpdateInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoSessionParametersUpdateInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoSessionParametersUpdateInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.updateSequenceCount && (this.updateSequenceCount = data.updateSequenceCount); - this.sType = StructureType.VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get updateSequenceCount() { - return this.#view.getUint32(16, LE); - } - set updateSequenceCount(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoBeginCodingInfoKHR { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoBeginCodingInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoBeginCodingInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoBeginCodingInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoBeginCodingInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.videoSession && (this.videoSession = data.videoSession), void 0 !== data.videoSessionParameters && (this.videoSessionParameters = data.videoSessionParameters), void 0 !== data.referenceSlotCount && (this.referenceSlotCount = data.referenceSlotCount), void 0 !== data.pReferenceSlots && (this.pReferenceSlots = data.pReferenceSlots); - this.sType = StructureType.VIDEO_BEGIN_CODING_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get videoSession() { - return this.#view.getBigUint64(24, LE); - } - set videoSession(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get videoSessionParameters() { - return this.#view.getBigUint64(32, LE); - } - set videoSessionParameters(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get referenceSlotCount() { - return this.#view.getUint32(40, LE); - } - set referenceSlotCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pReferenceSlots() { - return this.#view.getBigUint64(48, LE); - } - set pReferenceSlots(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class VideoEndCodingInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEndCodingInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEndCodingInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEndCodingInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEndCodingInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.VIDEO_END_CODING_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoCodingControlInfoKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoCodingControlInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoCodingControlInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoCodingControlInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoCodingControlInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.VIDEO_CODING_CONTROL_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoEncodeUsageInfoKHR { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeUsageInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeUsageInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeUsageInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeUsageInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.videoUsageHints && (this.videoUsageHints = data.videoUsageHints), void 0 !== data.videoContentHints && (this.videoContentHints = data.videoContentHints), void 0 !== data.tuningMode && (this.tuningMode = data.tuningMode); - this.sType = StructureType.VIDEO_ENCODE_USAGE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get videoUsageHints() { - return this.#view.getUint32(16, LE); - } - set videoUsageHints(value) { - this.#view.setUint32(16, Number(value), LE); - } - get videoContentHints() { - return this.#view.getUint32(20, LE); - } - set videoContentHints(value) { - this.#view.setUint32(20, Number(value), LE); - } - get tuningMode() { - return this.#view.getUint32(24, LE); - } - set tuningMode(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class VideoEncodeInfoKHR { - static size = 128; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.qualityLevel && (this.qualityLevel = data.qualityLevel), void 0 !== data.dstBitstreamBuffer && (this.dstBitstreamBuffer = data.dstBitstreamBuffer), void 0 !== data.dstBitstreamBufferOffset && (this.dstBitstreamBufferOffset = data.dstBitstreamBufferOffset), void 0 !== data.dstBitstreamBufferMaxRange && (this.dstBitstreamBufferMaxRange = data.dstBitstreamBufferMaxRange), void 0 !== data.srcPictureResource && (this.srcPictureResource = data.srcPictureResource), void 0 !== data.pSetupReferenceSlot && (this.pSetupReferenceSlot = data.pSetupReferenceSlot), void 0 !== data.referenceSlotCount && (this.referenceSlotCount = data.referenceSlotCount), void 0 !== data.pReferenceSlots && (this.pReferenceSlots = data.pReferenceSlots), void 0 !== data.precedingExternallyEncodedBytes && (this.precedingExternallyEncodedBytes = data.precedingExternallyEncodedBytes); - this.sType = StructureType.VIDEO_ENCODE_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get qualityLevel() { - return this.#view.getUint32(20, LE); - } - set qualityLevel(value) { - this.#view.setUint32(20, Number(value), LE); - } - get dstBitstreamBuffer() { - return this.#view.getBigUint64(24, LE); - } - set dstBitstreamBuffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get dstBitstreamBufferOffset() { - return this.#view.getBigUint64(32, LE); - } - set dstBitstreamBufferOffset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get dstBitstreamBufferMaxRange() { - return this.#view.getBigUint64(40, LE); - } - set dstBitstreamBufferMaxRange(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get srcPictureResource() { - return new VideoPictureResourceInfoKHR(this.#data.subarray(48, 48 + VideoPictureResourceInfoKHR.size)); - } - set srcPictureResource(value) { - if (value[BUFFER].byteLength < VideoPictureResourceInfoKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 48); - } - get pSetupReferenceSlot() { - return this.#view.getBigUint64(96, LE); - } - set pSetupReferenceSlot(value) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } - get referenceSlotCount() { - return this.#view.getUint32(104, LE); - } - set referenceSlotCount(value) { - this.#view.setUint32(104, Number(value), LE); - } - get pReferenceSlots() { - return this.#view.getBigUint64(112, LE); - } - set pReferenceSlots(value) { - this.#view.setBigUint64(112, BigInt(anyPointer(value)), LE); - } - get precedingExternallyEncodedBytes() { - return this.#view.getUint32(120, LE); - } - set precedingExternallyEncodedBytes(value) { - this.#view.setUint32(120, Number(value), LE); - } -} -export class VideoEncodeRateControlInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeRateControlInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeRateControlInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeRateControlInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeRateControlInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.rateControlMode && (this.rateControlMode = data.rateControlMode), void 0 !== data.layerCount && (this.layerCount = data.layerCount), void 0 !== data.pLayerConfigs && (this.pLayerConfigs = data.pLayerConfigs); - this.sType = StructureType.VIDEO_ENCODE_RATE_CONTROL_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rateControlMode() { - return this.#view.getUint32(20, LE); - } - set rateControlMode(value) { - this.#view.setUint32(20, Number(value), LE); - } - get layerCount() { - return this.#view.getUint8(24); - } - set layerCount(value) { - this.#view.setUint8(24, Number(value)); - } - get pLayerConfigs() { - return this.#view.getBigUint64(32, LE); - } - set pLayerConfigs(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeRateControlLayerInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeRateControlLayerInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeRateControlLayerInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeRateControlLayerInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeRateControlLayerInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.averageBitrate && (this.averageBitrate = data.averageBitrate), void 0 !== data.maxBitrate && (this.maxBitrate = data.maxBitrate), void 0 !== data.frameRateNumerator && (this.frameRateNumerator = data.frameRateNumerator), void 0 !== data.frameRateDenominator && (this.frameRateDenominator = data.frameRateDenominator), void 0 !== data.virtualBufferSizeInMs && (this.virtualBufferSizeInMs = data.virtualBufferSizeInMs), void 0 !== data.initialVirtualBufferSizeInMs && (this.initialVirtualBufferSizeInMs = data.initialVirtualBufferSizeInMs); - this.sType = StructureType.VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get averageBitrate() { - return this.#view.getUint32(16, LE); - } - set averageBitrate(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxBitrate() { - return this.#view.getUint32(20, LE); - } - set maxBitrate(value) { - this.#view.setUint32(20, Number(value), LE); - } - get frameRateNumerator() { - return this.#view.getUint32(24, LE); - } - set frameRateNumerator(value) { - this.#view.setUint32(24, Number(value), LE); - } - get frameRateDenominator() { - return this.#view.getUint32(28, LE); - } - set frameRateDenominator(value) { - this.#view.setUint32(28, Number(value), LE); - } - get virtualBufferSizeInMs() { - return this.#view.getUint32(32, LE); - } - set virtualBufferSizeInMs(value) { - this.#view.setUint32(32, Number(value), LE); - } - get initialVirtualBufferSizeInMs() { - return this.#view.getUint32(36, LE); - } - set initialVirtualBufferSizeInMs(value) { - this.#view.setUint32(36, Number(value), LE); - } -} -export class VideoEncodeCapabilitiesKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeCapabilitiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeCapabilitiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeCapabilitiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.rateControlModes && (this.rateControlModes = data.rateControlModes), void 0 !== data.rateControlLayerCount && (this.rateControlLayerCount = data.rateControlLayerCount), void 0 !== data.qualityLevelCount && (this.qualityLevelCount = data.qualityLevelCount), void 0 !== data.inputImageDataFillAlignment && (this.inputImageDataFillAlignment = data.inputImageDataFillAlignment); - this.sType = StructureType.VIDEO_ENCODE_CAPABILITIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rateControlModes() { - return this.#view.getUint32(20, LE); - } - set rateControlModes(value) { - this.#view.setUint32(20, Number(value), LE); - } - get rateControlLayerCount() { - return this.#view.getUint8(24); - } - set rateControlLayerCount(value) { - this.#view.setUint8(24, Number(value)); - } - get qualityLevelCount() { - return this.#view.getUint8(25); - } - set qualityLevelCount(value) { - this.#view.setUint8(25, Number(value)); - } - get inputImageDataFillAlignment() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - set inputImageDataFillAlignment(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 28); - } -} -export class VideoEncodeH264CapabilitiesEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264CapabilitiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264CapabilitiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264CapabilitiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264CapabilitiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.inputModeFlags && (this.inputModeFlags = data.inputModeFlags), void 0 !== data.outputModeFlags && (this.outputModeFlags = data.outputModeFlags), void 0 !== data.maxPPictureL0ReferenceCount && (this.maxPPictureL0ReferenceCount = data.maxPPictureL0ReferenceCount), void 0 !== data.maxBPictureL0ReferenceCount && (this.maxBPictureL0ReferenceCount = data.maxBPictureL0ReferenceCount), void 0 !== data.maxL1ReferenceCount && (this.maxL1ReferenceCount = data.maxL1ReferenceCount), void 0 !== data.motionVectorsOverPicBoundariesFlag && (this.motionVectorsOverPicBoundariesFlag = data.motionVectorsOverPicBoundariesFlag), void 0 !== data.maxBytesPerPicDenom && (this.maxBytesPerPicDenom = data.maxBytesPerPicDenom), void 0 !== data.maxBitsPerMbDenom && (this.maxBitsPerMbDenom = data.maxBitsPerMbDenom), void 0 !== data.log2MaxMvLengthHorizontal && (this.log2MaxMvLengthHorizontal = data.log2MaxMvLengthHorizontal), void 0 !== data.log2MaxMvLengthVertical && (this.log2MaxMvLengthVertical = data.log2MaxMvLengthVertical); - this.sType = StructureType.VIDEO_ENCODE_H264_CAPABILITIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get inputModeFlags() { - return this.#view.getUint32(20, LE); - } - set inputModeFlags(value) { - this.#view.setUint32(20, Number(value), LE); - } - get outputModeFlags() { - return this.#view.getUint32(24, LE); - } - set outputModeFlags(value) { - this.#view.setUint32(24, Number(value), LE); - } - get maxPPictureL0ReferenceCount() { - return this.#view.getUint8(28); - } - set maxPPictureL0ReferenceCount(value) { - this.#view.setUint8(28, Number(value)); - } - get maxBPictureL0ReferenceCount() { - return this.#view.getUint8(29); - } - set maxBPictureL0ReferenceCount(value) { - this.#view.setUint8(29, Number(value)); - } - get maxL1ReferenceCount() { - return this.#view.getUint8(30); - } - set maxL1ReferenceCount(value) { - this.#view.setUint8(30, Number(value)); - } - get motionVectorsOverPicBoundariesFlag() { - return this.#view.getUint32(32, LE); - } - set motionVectorsOverPicBoundariesFlag(value) { - this.#view.setUint32(32, Number(value), LE); - } - get maxBytesPerPicDenom() { - return this.#view.getUint32(36, LE); - } - set maxBytesPerPicDenom(value) { - this.#view.setUint32(36, Number(value), LE); - } - get maxBitsPerMbDenom() { - return this.#view.getUint32(40, LE); - } - set maxBitsPerMbDenom(value) { - this.#view.setUint32(40, Number(value), LE); - } - get log2MaxMvLengthHorizontal() { - return this.#view.getUint32(44, LE); - } - set log2MaxMvLengthHorizontal(value) { - this.#view.setUint32(44, Number(value), LE); - } - get log2MaxMvLengthVertical() { - return this.#view.getUint32(48, LE); - } - set log2MaxMvLengthVertical(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class VideoEncodeH264SessionParametersAddInfoEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264SessionParametersAddInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264SessionParametersAddInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264SessionParametersAddInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264SessionParametersAddInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stdSPSCount && (this.stdSPSCount = data.stdSPSCount), void 0 !== data.pStdSPSs && (this.pStdSPSs = data.pStdSPSs), void 0 !== data.stdPPSCount && (this.stdPPSCount = data.stdPPSCount), void 0 !== data.pStdPPSs && (this.pStdPPSs = data.pStdPPSs); - this.sType = StructureType.VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stdSPSCount() { - return this.#view.getUint32(16, LE); - } - set stdSPSCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pStdSPSs() { - return this.#view.getBigUint64(24, LE); - } - set pStdSPSs(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get stdPPSCount() { - return this.#view.getUint32(32, LE); - } - set stdPPSCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pStdPPSs() { - return this.#view.getBigUint64(40, LE); - } - set pStdPPSs(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH264SessionParametersCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264SessionParametersCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264SessionParametersCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264SessionParametersCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264SessionParametersCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxStdSPSCount && (this.maxStdSPSCount = data.maxStdSPSCount), void 0 !== data.maxStdPPSCount && (this.maxStdPPSCount = data.maxStdPPSCount), void 0 !== data.pParametersAddInfo && (this.pParametersAddInfo = data.pParametersAddInfo); - this.sType = StructureType.VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxStdSPSCount() { - return this.#view.getUint32(16, LE); - } - set maxStdSPSCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxStdPPSCount() { - return this.#view.getUint32(20, LE); - } - set maxStdPPSCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pParametersAddInfo() { - return this.#view.getBigUint64(24, LE); - } - set pParametersAddInfo(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH264DpbSlotInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264DpbSlotInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264DpbSlotInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264DpbSlotInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264DpbSlotInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.slotIndex && (this.slotIndex = data.slotIndex), void 0 !== data.pStdReferenceInfo && (this.pStdReferenceInfo = data.pStdReferenceInfo); - this.sType = StructureType.VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get slotIndex() { - return this.#view.getInt8(16); - } - set slotIndex(value) { - this.#view.setInt8(16, Number(value)); - } - get pStdReferenceInfo() { - return this.#view.getBigUint64(24, LE); - } - set pStdReferenceInfo(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH264VclFrameInfoEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264VclFrameInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264VclFrameInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264VclFrameInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264VclFrameInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pReferenceFinalLists && (this.pReferenceFinalLists = data.pReferenceFinalLists), void 0 !== data.naluSliceEntryCount && (this.naluSliceEntryCount = data.naluSliceEntryCount), void 0 !== data.pNaluSliceEntries && (this.pNaluSliceEntries = data.pNaluSliceEntries), void 0 !== data.pCurrentPictureInfo && (this.pCurrentPictureInfo = data.pCurrentPictureInfo); - this.sType = StructureType.VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pReferenceFinalLists() { - return this.#view.getBigUint64(16, LE); - } - set pReferenceFinalLists(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get naluSliceEntryCount() { - return this.#view.getUint32(24, LE); - } - set naluSliceEntryCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pNaluSliceEntries() { - return this.#view.getBigUint64(32, LE); - } - set pNaluSliceEntries(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get pCurrentPictureInfo() { - return this.#view.getBigUint64(40, LE); - } - set pCurrentPictureInfo(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH264ReferenceListsInfoEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264ReferenceListsInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264ReferenceListsInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264ReferenceListsInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264ReferenceListsInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.referenceList0EntryCount && (this.referenceList0EntryCount = data.referenceList0EntryCount), void 0 !== data.pReferenceList0Entries && (this.pReferenceList0Entries = data.pReferenceList0Entries), void 0 !== data.referenceList1EntryCount && (this.referenceList1EntryCount = data.referenceList1EntryCount), void 0 !== data.pReferenceList1Entries && (this.pReferenceList1Entries = data.pReferenceList1Entries), void 0 !== data.pMemMgmtCtrlOperations && (this.pMemMgmtCtrlOperations = data.pMemMgmtCtrlOperations); - this.sType = StructureType.VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get referenceList0EntryCount() { - return this.#view.getUint8(16); - } - set referenceList0EntryCount(value) { - this.#view.setUint8(16, Number(value)); - } - get pReferenceList0Entries() { - return this.#view.getBigUint64(24, LE); - } - set pReferenceList0Entries(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get referenceList1EntryCount() { - return this.#view.getUint8(32); - } - set referenceList1EntryCount(value) { - this.#view.setUint8(32, Number(value)); - } - get pReferenceList1Entries() { - return this.#view.getBigUint64(40, LE); - } - set pReferenceList1Entries(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get pMemMgmtCtrlOperations() { - return this.#view.getBigUint64(48, LE); - } - set pMemMgmtCtrlOperations(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH264EmitPictureParametersInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264EmitPictureParametersInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264EmitPictureParametersInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264EmitPictureParametersInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264EmitPictureParametersInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.spsId && (this.spsId = data.spsId), void 0 !== data.emitSpsEnable && (this.emitSpsEnable = data.emitSpsEnable), void 0 !== data.ppsIdEntryCount && (this.ppsIdEntryCount = data.ppsIdEntryCount), void 0 !== data.ppsIdEntries && (this.ppsIdEntries = data.ppsIdEntries); - this.sType = StructureType.VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get spsId() { - return this.#view.getUint8(16); - } - set spsId(value) { - this.#view.setUint8(16, Number(value)); - } - get emitSpsEnable() { - return this.#view.getUint32(20, LE); - } - set emitSpsEnable(value) { - this.#view.setUint32(20, Number(value), LE); - } - get ppsIdEntryCount() { - return this.#view.getUint32(24, LE); - } - set ppsIdEntryCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get ppsIdEntries() { - return this.#view.getBigUint64(32, LE); - } - set ppsIdEntries(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH264ProfileInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264ProfileInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264ProfileInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264ProfileInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264ProfileInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stdProfileIdc && (this.stdProfileIdc = data.stdProfileIdc); - this.sType = StructureType.VIDEO_ENCODE_H264_PROFILE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stdProfileIdc() { - return this.#view.getUint32(16, LE); - } - set stdProfileIdc(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoEncodeH264NaluSliceInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264NaluSliceInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264NaluSliceInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264NaluSliceInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264NaluSliceInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.mbCount && (this.mbCount = data.mbCount), void 0 !== data.pReferenceFinalLists && (this.pReferenceFinalLists = data.pReferenceFinalLists), void 0 !== data.pSliceHeaderStd && (this.pSliceHeaderStd = data.pSliceHeaderStd); - this.sType = StructureType.VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get mbCount() { - return this.#view.getUint32(16, LE); - } - set mbCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pReferenceFinalLists() { - return this.#view.getBigUint64(24, LE); - } - set pReferenceFinalLists(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pSliceHeaderStd() { - return this.#view.getBigUint64(32, LE); - } - set pSliceHeaderStd(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH264RateControlInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264RateControlInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264RateControlInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264RateControlInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264RateControlInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.gopFrameCount && (this.gopFrameCount = data.gopFrameCount), void 0 !== data.idrPeriod && (this.idrPeriod = data.idrPeriod), void 0 !== data.consecutiveBFrameCount && (this.consecutiveBFrameCount = data.consecutiveBFrameCount), void 0 !== data.rateControlStructure && (this.rateControlStructure = data.rateControlStructure), void 0 !== data.temporalLayerCount && (this.temporalLayerCount = data.temporalLayerCount); - this.sType = StructureType.VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get gopFrameCount() { - return this.#view.getUint32(16, LE); - } - set gopFrameCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get idrPeriod() { - return this.#view.getUint32(20, LE); - } - set idrPeriod(value) { - this.#view.setUint32(20, Number(value), LE); - } - get consecutiveBFrameCount() { - return this.#view.getUint32(24, LE); - } - set consecutiveBFrameCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get rateControlStructure() { - return this.#view.getUint32(28, LE); - } - set rateControlStructure(value) { - this.#view.setUint32(28, Number(value), LE); - } - get temporalLayerCount() { - return this.#view.getUint8(32); - } - set temporalLayerCount(value) { - this.#view.setUint8(32, Number(value)); - } -} -export class VideoEncodeH264QpEXT { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264QpEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264QpEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264QpEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264QpEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.qpI && (this.qpI = data.qpI), void 0 !== data.qpP && (this.qpP = data.qpP), void 0 !== data.qpB && (this.qpB = data.qpB); - } - get qpI() { - return this.#view.getInt32(0, LE); - } - set qpI(value) { - this.#view.setInt32(0, Number(value), LE); - } - get qpP() { - return this.#view.getInt32(4, LE); - } - set qpP(value) { - this.#view.setInt32(4, Number(value), LE); - } - get qpB() { - return this.#view.getInt32(8, LE); - } - set qpB(value) { - this.#view.setInt32(8, Number(value), LE); - } -} -export class VideoEncodeH264FrameSizeEXT { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264FrameSizeEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264FrameSizeEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264FrameSizeEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264FrameSizeEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.frameISize && (this.frameISize = data.frameISize), void 0 !== data.framePSize && (this.framePSize = data.framePSize), void 0 !== data.frameBSize && (this.frameBSize = data.frameBSize); - } - get frameISize() { - return this.#view.getUint32(0, LE); - } - set frameISize(value) { - this.#view.setUint32(0, Number(value), LE); - } - get framePSize() { - return this.#view.getUint32(4, LE); - } - set framePSize(value) { - this.#view.setUint32(4, Number(value), LE); - } - get frameBSize() { - return this.#view.getUint32(8, LE); - } - set frameBSize(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class VideoEncodeH264RateControlLayerInfoEXT { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH264RateControlLayerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264RateControlLayerInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264RateControlLayerInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH264RateControlLayerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.temporalLayerId && (this.temporalLayerId = data.temporalLayerId), void 0 !== data.useInitialRcQp && (this.useInitialRcQp = data.useInitialRcQp), void 0 !== data.initialRcQp && (this.initialRcQp = data.initialRcQp), void 0 !== data.useMinQp && (this.useMinQp = data.useMinQp), void 0 !== data.minQp && (this.minQp = data.minQp), void 0 !== data.useMaxQp && (this.useMaxQp = data.useMaxQp), void 0 !== data.maxQp && (this.maxQp = data.maxQp), void 0 !== data.useMaxFrameSize && (this.useMaxFrameSize = data.useMaxFrameSize), void 0 !== data.maxFrameSize && (this.maxFrameSize = data.maxFrameSize); - this.sType = StructureType.VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get temporalLayerId() { - return this.#view.getUint8(16); - } - set temporalLayerId(value) { - this.#view.setUint8(16, Number(value)); - } - get useInitialRcQp() { - return this.#view.getUint32(20, LE); - } - set useInitialRcQp(value) { - this.#view.setUint32(20, Number(value), LE); - } - get initialRcQp() { - return new VideoEncodeH264QpEXT(this.#data.subarray(24, 24 + VideoEncodeH264QpEXT.size)); - } - set initialRcQp(value) { - if (value[BUFFER].byteLength < VideoEncodeH264QpEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get useMinQp() { - return this.#view.getUint32(36, LE); - } - set useMinQp(value) { - this.#view.setUint32(36, Number(value), LE); - } - get minQp() { - return new VideoEncodeH264QpEXT(this.#data.subarray(40, 40 + VideoEncodeH264QpEXT.size)); - } - set minQp(value) { - if (value[BUFFER].byteLength < VideoEncodeH264QpEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } - get useMaxQp() { - return this.#view.getUint32(52, LE); - } - set useMaxQp(value) { - this.#view.setUint32(52, Number(value), LE); - } - get maxQp() { - return new VideoEncodeH264QpEXT(this.#data.subarray(56, 56 + VideoEncodeH264QpEXT.size)); - } - set maxQp(value) { - if (value[BUFFER].byteLength < VideoEncodeH264QpEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 56); - } - get useMaxFrameSize() { - return this.#view.getUint32(68, LE); - } - set useMaxFrameSize(value) { - this.#view.setUint32(68, Number(value), LE); - } - get maxFrameSize() { - return new VideoEncodeH264FrameSizeEXT(this.#data.subarray(72, 72 + VideoEncodeH264FrameSizeEXT.size)); - } - set maxFrameSize(value) { - if (value[BUFFER].byteLength < VideoEncodeH264FrameSizeEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 72); - } -} -export class VideoEncodeH265CapabilitiesEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265CapabilitiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265CapabilitiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265CapabilitiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265CapabilitiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.inputModeFlags && (this.inputModeFlags = data.inputModeFlags), void 0 !== data.outputModeFlags && (this.outputModeFlags = data.outputModeFlags), void 0 !== data.ctbSizes && (this.ctbSizes = data.ctbSizes), void 0 !== data.transformBlockSizes && (this.transformBlockSizes = data.transformBlockSizes), void 0 !== data.maxPPictureL0ReferenceCount && (this.maxPPictureL0ReferenceCount = data.maxPPictureL0ReferenceCount), void 0 !== data.maxBPictureL0ReferenceCount && (this.maxBPictureL0ReferenceCount = data.maxBPictureL0ReferenceCount), void 0 !== data.maxL1ReferenceCount && (this.maxL1ReferenceCount = data.maxL1ReferenceCount), void 0 !== data.maxSubLayersCount && (this.maxSubLayersCount = data.maxSubLayersCount), void 0 !== data.minLog2MinLumaCodingBlockSizeMinus3 && (this.minLog2MinLumaCodingBlockSizeMinus3 = data.minLog2MinLumaCodingBlockSizeMinus3), void 0 !== data.maxLog2MinLumaCodingBlockSizeMinus3 && (this.maxLog2MinLumaCodingBlockSizeMinus3 = data.maxLog2MinLumaCodingBlockSizeMinus3), void 0 !== data.minLog2MinLumaTransformBlockSizeMinus2 && (this.minLog2MinLumaTransformBlockSizeMinus2 = data.minLog2MinLumaTransformBlockSizeMinus2), void 0 !== data.maxLog2MinLumaTransformBlockSizeMinus2 && (this.maxLog2MinLumaTransformBlockSizeMinus2 = data.maxLog2MinLumaTransformBlockSizeMinus2), void 0 !== data.minMaxTransformHierarchyDepthInter && (this.minMaxTransformHierarchyDepthInter = data.minMaxTransformHierarchyDepthInter), void 0 !== data.maxMaxTransformHierarchyDepthInter && (this.maxMaxTransformHierarchyDepthInter = data.maxMaxTransformHierarchyDepthInter), void 0 !== data.minMaxTransformHierarchyDepthIntra && (this.minMaxTransformHierarchyDepthIntra = data.minMaxTransformHierarchyDepthIntra), void 0 !== data.maxMaxTransformHierarchyDepthIntra && (this.maxMaxTransformHierarchyDepthIntra = data.maxMaxTransformHierarchyDepthIntra), void 0 !== data.maxDiffCuQpDeltaDepth && (this.maxDiffCuQpDeltaDepth = data.maxDiffCuQpDeltaDepth), void 0 !== data.minMaxNumMergeCand && (this.minMaxNumMergeCand = data.minMaxNumMergeCand), void 0 !== data.maxMaxNumMergeCand && (this.maxMaxNumMergeCand = data.maxMaxNumMergeCand); - this.sType = StructureType.VIDEO_ENCODE_H265_CAPABILITIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get inputModeFlags() { - return this.#view.getUint32(20, LE); - } - set inputModeFlags(value) { - this.#view.setUint32(20, Number(value), LE); - } - get outputModeFlags() { - return this.#view.getUint32(24, LE); - } - set outputModeFlags(value) { - this.#view.setUint32(24, Number(value), LE); - } - get ctbSizes() { - return this.#view.getUint32(28, LE); - } - set ctbSizes(value) { - this.#view.setUint32(28, Number(value), LE); - } - get transformBlockSizes() { - return this.#view.getUint32(32, LE); - } - set transformBlockSizes(value) { - this.#view.setUint32(32, Number(value), LE); - } - get maxPPictureL0ReferenceCount() { - return this.#view.getUint8(36); - } - set maxPPictureL0ReferenceCount(value) { - this.#view.setUint8(36, Number(value)); - } - get maxBPictureL0ReferenceCount() { - return this.#view.getUint8(37); - } - set maxBPictureL0ReferenceCount(value) { - this.#view.setUint8(37, Number(value)); - } - get maxL1ReferenceCount() { - return this.#view.getUint8(38); - } - set maxL1ReferenceCount(value) { - this.#view.setUint8(38, Number(value)); - } - get maxSubLayersCount() { - return this.#view.getUint8(39); - } - set maxSubLayersCount(value) { - this.#view.setUint8(39, Number(value)); - } - get minLog2MinLumaCodingBlockSizeMinus3() { - return this.#view.getUint8(40); - } - set minLog2MinLumaCodingBlockSizeMinus3(value) { - this.#view.setUint8(40, Number(value)); - } - get maxLog2MinLumaCodingBlockSizeMinus3() { - return this.#view.getUint8(41); - } - set maxLog2MinLumaCodingBlockSizeMinus3(value) { - this.#view.setUint8(41, Number(value)); - } - get minLog2MinLumaTransformBlockSizeMinus2() { - return this.#view.getUint8(42); - } - set minLog2MinLumaTransformBlockSizeMinus2(value) { - this.#view.setUint8(42, Number(value)); - } - get maxLog2MinLumaTransformBlockSizeMinus2() { - return this.#view.getUint8(43); - } - set maxLog2MinLumaTransformBlockSizeMinus2(value) { - this.#view.setUint8(43, Number(value)); - } - get minMaxTransformHierarchyDepthInter() { - return this.#view.getUint8(44); - } - set minMaxTransformHierarchyDepthInter(value) { - this.#view.setUint8(44, Number(value)); - } - get maxMaxTransformHierarchyDepthInter() { - return this.#view.getUint8(45); - } - set maxMaxTransformHierarchyDepthInter(value) { - this.#view.setUint8(45, Number(value)); - } - get minMaxTransformHierarchyDepthIntra() { - return this.#view.getUint8(46); - } - set minMaxTransformHierarchyDepthIntra(value) { - this.#view.setUint8(46, Number(value)); - } - get maxMaxTransformHierarchyDepthIntra() { - return this.#view.getUint8(47); - } - set maxMaxTransformHierarchyDepthIntra(value) { - this.#view.setUint8(47, Number(value)); - } - get maxDiffCuQpDeltaDepth() { - return this.#view.getUint8(48); - } - set maxDiffCuQpDeltaDepth(value) { - this.#view.setUint8(48, Number(value)); - } - get minMaxNumMergeCand() { - return this.#view.getUint8(49); - } - set minMaxNumMergeCand(value) { - this.#view.setUint8(49, Number(value)); - } - get maxMaxNumMergeCand() { - return this.#view.getUint8(50); - } - set maxMaxNumMergeCand(value) { - this.#view.setUint8(50, Number(value)); - } -} -export class VideoEncodeH265SessionParametersAddInfoEXT { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265SessionParametersAddInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265SessionParametersAddInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265SessionParametersAddInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265SessionParametersAddInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stdVPSCount && (this.stdVPSCount = data.stdVPSCount), void 0 !== data.pStdVPSs && (this.pStdVPSs = data.pStdVPSs), void 0 !== data.stdSPSCount && (this.stdSPSCount = data.stdSPSCount), void 0 !== data.pStdSPSs && (this.pStdSPSs = data.pStdSPSs), void 0 !== data.stdPPSCount && (this.stdPPSCount = data.stdPPSCount), void 0 !== data.pStdPPSs && (this.pStdPPSs = data.pStdPPSs); - this.sType = StructureType.VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stdVPSCount() { - return this.#view.getUint32(16, LE); - } - set stdVPSCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pStdVPSs() { - return this.#view.getBigUint64(24, LE); - } - set pStdVPSs(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get stdSPSCount() { - return this.#view.getUint32(32, LE); - } - set stdSPSCount(value) { - this.#view.setUint32(32, Number(value), LE); - } - get pStdSPSs() { - return this.#view.getBigUint64(40, LE); - } - set pStdSPSs(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get stdPPSCount() { - return this.#view.getUint32(48, LE); - } - set stdPPSCount(value) { - this.#view.setUint32(48, Number(value), LE); - } - get pStdPPSs() { - return this.#view.getBigUint64(56, LE); - } - set pStdPPSs(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH265SessionParametersCreateInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265SessionParametersCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265SessionParametersCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265SessionParametersCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265SessionParametersCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxStdVPSCount && (this.maxStdVPSCount = data.maxStdVPSCount), void 0 !== data.maxStdSPSCount && (this.maxStdSPSCount = data.maxStdSPSCount), void 0 !== data.maxStdPPSCount && (this.maxStdPPSCount = data.maxStdPPSCount), void 0 !== data.pParametersAddInfo && (this.pParametersAddInfo = data.pParametersAddInfo); - this.sType = StructureType.VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxStdVPSCount() { - return this.#view.getUint32(16, LE); - } - set maxStdVPSCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxStdSPSCount() { - return this.#view.getUint32(20, LE); - } - set maxStdSPSCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get maxStdPPSCount() { - return this.#view.getUint32(24, LE); - } - set maxStdPPSCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pParametersAddInfo() { - return this.#view.getBigUint64(32, LE); - } - set pParametersAddInfo(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH265VclFrameInfoEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265VclFrameInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265VclFrameInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265VclFrameInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265VclFrameInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pReferenceFinalLists && (this.pReferenceFinalLists = data.pReferenceFinalLists), void 0 !== data.naluSliceSegmentEntryCount && (this.naluSliceSegmentEntryCount = data.naluSliceSegmentEntryCount), void 0 !== data.pNaluSliceSegmentEntries && (this.pNaluSliceSegmentEntries = data.pNaluSliceSegmentEntries), void 0 !== data.pCurrentPictureInfo && (this.pCurrentPictureInfo = data.pCurrentPictureInfo); - this.sType = StructureType.VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pReferenceFinalLists() { - return this.#view.getBigUint64(16, LE); - } - set pReferenceFinalLists(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get naluSliceSegmentEntryCount() { - return this.#view.getUint32(24, LE); - } - set naluSliceSegmentEntryCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pNaluSliceSegmentEntries() { - return this.#view.getBigUint64(32, LE); - } - set pNaluSliceSegmentEntries(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get pCurrentPictureInfo() { - return this.#view.getBigUint64(40, LE); - } - set pCurrentPictureInfo(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH265EmitPictureParametersInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265EmitPictureParametersInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265EmitPictureParametersInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265EmitPictureParametersInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265EmitPictureParametersInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.vpsId && (this.vpsId = data.vpsId), void 0 !== data.spsId && (this.spsId = data.spsId), void 0 !== data.emitVpsEnable && (this.emitVpsEnable = data.emitVpsEnable), void 0 !== data.emitSpsEnable && (this.emitSpsEnable = data.emitSpsEnable), void 0 !== data.ppsIdEntryCount && (this.ppsIdEntryCount = data.ppsIdEntryCount), void 0 !== data.ppsIdEntries && (this.ppsIdEntries = data.ppsIdEntries); - this.sType = StructureType.VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get vpsId() { - return this.#view.getUint8(16); - } - set vpsId(value) { - this.#view.setUint8(16, Number(value)); - } - get spsId() { - return this.#view.getUint8(17); - } - set spsId(value) { - this.#view.setUint8(17, Number(value)); - } - get emitVpsEnable() { - return this.#view.getUint32(20, LE); - } - set emitVpsEnable(value) { - this.#view.setUint32(20, Number(value), LE); - } - get emitSpsEnable() { - return this.#view.getUint32(24, LE); - } - set emitSpsEnable(value) { - this.#view.setUint32(24, Number(value), LE); - } - get ppsIdEntryCount() { - return this.#view.getUint32(28, LE); - } - set ppsIdEntryCount(value) { - this.#view.setUint32(28, Number(value), LE); - } - get ppsIdEntries() { - return this.#view.getBigUint64(32, LE); - } - set ppsIdEntries(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH265NaluSliceSegmentInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265NaluSliceSegmentInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265NaluSliceSegmentInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265NaluSliceSegmentInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265NaluSliceSegmentInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.ctbCount && (this.ctbCount = data.ctbCount), void 0 !== data.pReferenceFinalLists && (this.pReferenceFinalLists = data.pReferenceFinalLists), void 0 !== data.pSliceSegmentHeaderStd && (this.pSliceSegmentHeaderStd = data.pSliceSegmentHeaderStd); - this.sType = StructureType.VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get ctbCount() { - return this.#view.getUint32(16, LE); - } - set ctbCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pReferenceFinalLists() { - return this.#view.getBigUint64(24, LE); - } - set pReferenceFinalLists(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get pSliceSegmentHeaderStd() { - return this.#view.getBigUint64(32, LE); - } - set pSliceSegmentHeaderStd(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH265RateControlInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265RateControlInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265RateControlInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265RateControlInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265RateControlInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.gopFrameCount && (this.gopFrameCount = data.gopFrameCount), void 0 !== data.idrPeriod && (this.idrPeriod = data.idrPeriod), void 0 !== data.consecutiveBFrameCount && (this.consecutiveBFrameCount = data.consecutiveBFrameCount), void 0 !== data.rateControlStructure && (this.rateControlStructure = data.rateControlStructure), void 0 !== data.subLayerCount && (this.subLayerCount = data.subLayerCount); - this.sType = StructureType.VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get gopFrameCount() { - return this.#view.getUint32(16, LE); - } - set gopFrameCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get idrPeriod() { - return this.#view.getUint32(20, LE); - } - set idrPeriod(value) { - this.#view.setUint32(20, Number(value), LE); - } - get consecutiveBFrameCount() { - return this.#view.getUint32(24, LE); - } - set consecutiveBFrameCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get rateControlStructure() { - return this.#view.getUint32(28, LE); - } - set rateControlStructure(value) { - this.#view.setUint32(28, Number(value), LE); - } - get subLayerCount() { - return this.#view.getUint8(32); - } - set subLayerCount(value) { - this.#view.setUint8(32, Number(value)); - } -} -export class VideoEncodeH265QpEXT { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265QpEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265QpEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265QpEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265QpEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.qpI && (this.qpI = data.qpI), void 0 !== data.qpP && (this.qpP = data.qpP), void 0 !== data.qpB && (this.qpB = data.qpB); - } - get qpI() { - return this.#view.getInt32(0, LE); - } - set qpI(value) { - this.#view.setInt32(0, Number(value), LE); - } - get qpP() { - return this.#view.getInt32(4, LE); - } - set qpP(value) { - this.#view.setInt32(4, Number(value), LE); - } - get qpB() { - return this.#view.getInt32(8, LE); - } - set qpB(value) { - this.#view.setInt32(8, Number(value), LE); - } -} -export class VideoEncodeH265FrameSizeEXT { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265FrameSizeEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265FrameSizeEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265FrameSizeEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265FrameSizeEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.frameISize && (this.frameISize = data.frameISize), void 0 !== data.framePSize && (this.framePSize = data.framePSize), void 0 !== data.frameBSize && (this.frameBSize = data.frameBSize); - } - get frameISize() { - return this.#view.getUint32(0, LE); - } - set frameISize(value) { - this.#view.setUint32(0, Number(value), LE); - } - get framePSize() { - return this.#view.getUint32(4, LE); - } - set framePSize(value) { - this.#view.setUint32(4, Number(value), LE); - } - get frameBSize() { - return this.#view.getUint32(8, LE); - } - set frameBSize(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class VideoEncodeH265RateControlLayerInfoEXT { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265RateControlLayerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265RateControlLayerInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265RateControlLayerInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265RateControlLayerInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.temporalId && (this.temporalId = data.temporalId), void 0 !== data.useInitialRcQp && (this.useInitialRcQp = data.useInitialRcQp), void 0 !== data.initialRcQp && (this.initialRcQp = data.initialRcQp), void 0 !== data.useMinQp && (this.useMinQp = data.useMinQp), void 0 !== data.minQp && (this.minQp = data.minQp), void 0 !== data.useMaxQp && (this.useMaxQp = data.useMaxQp), void 0 !== data.maxQp && (this.maxQp = data.maxQp), void 0 !== data.useMaxFrameSize && (this.useMaxFrameSize = data.useMaxFrameSize), void 0 !== data.maxFrameSize && (this.maxFrameSize = data.maxFrameSize); - this.sType = StructureType.VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get temporalId() { - return this.#view.getUint8(16); - } - set temporalId(value) { - this.#view.setUint8(16, Number(value)); - } - get useInitialRcQp() { - return this.#view.getUint32(20, LE); - } - set useInitialRcQp(value) { - this.#view.setUint32(20, Number(value), LE); - } - get initialRcQp() { - return new VideoEncodeH265QpEXT(this.#data.subarray(24, 24 + VideoEncodeH265QpEXT.size)); - } - set initialRcQp(value) { - if (value[BUFFER].byteLength < VideoEncodeH265QpEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get useMinQp() { - return this.#view.getUint32(36, LE); - } - set useMinQp(value) { - this.#view.setUint32(36, Number(value), LE); - } - get minQp() { - return new VideoEncodeH265QpEXT(this.#data.subarray(40, 40 + VideoEncodeH265QpEXT.size)); - } - set minQp(value) { - if (value[BUFFER].byteLength < VideoEncodeH265QpEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } - get useMaxQp() { - return this.#view.getUint32(52, LE); - } - set useMaxQp(value) { - this.#view.setUint32(52, Number(value), LE); - } - get maxQp() { - return new VideoEncodeH265QpEXT(this.#data.subarray(56, 56 + VideoEncodeH265QpEXT.size)); - } - set maxQp(value) { - if (value[BUFFER].byteLength < VideoEncodeH265QpEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 56); - } - get useMaxFrameSize() { - return this.#view.getUint32(68, LE); - } - set useMaxFrameSize(value) { - this.#view.setUint32(68, Number(value), LE); - } - get maxFrameSize() { - return new VideoEncodeH265FrameSizeEXT(this.#data.subarray(72, 72 + VideoEncodeH265FrameSizeEXT.size)); - } - set maxFrameSize(value) { - if (value[BUFFER].byteLength < VideoEncodeH265FrameSizeEXT.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 72); - } -} -export class VideoEncodeH265ProfileInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265ProfileInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265ProfileInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265ProfileInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265ProfileInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.stdProfileIdc && (this.stdProfileIdc = data.stdProfileIdc); - this.sType = StructureType.VIDEO_ENCODE_H265_PROFILE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get stdProfileIdc() { - return this.#view.getUint32(16, LE); - } - set stdProfileIdc(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class VideoEncodeH265DpbSlotInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265DpbSlotInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265DpbSlotInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265DpbSlotInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265DpbSlotInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.slotIndex && (this.slotIndex = data.slotIndex), void 0 !== data.pStdReferenceInfo && (this.pStdReferenceInfo = data.pStdReferenceInfo); - this.sType = StructureType.VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get slotIndex() { - return this.#view.getInt8(16); - } - set slotIndex(value) { - this.#view.setInt8(16, Number(value)); - } - get pStdReferenceInfo() { - return this.#view.getBigUint64(24, LE); - } - set pStdReferenceInfo(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class VideoEncodeH265ReferenceListsInfoEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(VideoEncodeH265ReferenceListsInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265ReferenceListsInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265ReferenceListsInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(VideoEncodeH265ReferenceListsInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.referenceList0EntryCount && (this.referenceList0EntryCount = data.referenceList0EntryCount), void 0 !== data.pReferenceList0Entries && (this.pReferenceList0Entries = data.pReferenceList0Entries), void 0 !== data.referenceList1EntryCount && (this.referenceList1EntryCount = data.referenceList1EntryCount), void 0 !== data.pReferenceList1Entries && (this.pReferenceList1Entries = data.pReferenceList1Entries), void 0 !== data.pReferenceModifications && (this.pReferenceModifications = data.pReferenceModifications); - this.sType = StructureType.VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get referenceList0EntryCount() { - return this.#view.getUint8(16); - } - set referenceList0EntryCount(value) { - this.#view.setUint8(16, Number(value)); - } - get pReferenceList0Entries() { - return this.#view.getBigUint64(24, LE); - } - set pReferenceList0Entries(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get referenceList1EntryCount() { - return this.#view.getUint8(32); - } - set referenceList1EntryCount(value) { - this.#view.setUint8(32, Number(value)); - } - get pReferenceList1Entries() { - return this.#view.getBigUint64(40, LE); - } - set pReferenceList1Entries(value) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - get pReferenceModifications() { - return this.#view.getBigUint64(48, LE); - } - set pReferenceModifications(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceInheritedViewportScissorFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceInheritedViewportScissorFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInheritedViewportScissorFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceInheritedViewportScissorFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceInheritedViewportScissorFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.inheritedViewportScissor2D && (this.inheritedViewportScissor2D = data.inheritedViewportScissor2D); - this.sType = StructureType.PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get inheritedViewportScissor2D() { - return this.#view.getUint32(16, LE); - } - set inheritedViewportScissor2D(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class CommandBufferInheritanceViewportScissorInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CommandBufferInheritanceViewportScissorInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceViewportScissorInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceViewportScissorInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CommandBufferInheritanceViewportScissorInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.viewportScissor2D && (this.viewportScissor2D = data.viewportScissor2D), void 0 !== data.viewportDepthCount && (this.viewportDepthCount = data.viewportDepthCount), void 0 !== data.pViewportDepths && (this.pViewportDepths = data.pViewportDepths); - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get viewportScissor2D() { - return this.#view.getUint32(16, LE); - } - set viewportScissor2D(value) { - this.#view.setUint32(16, Number(value), LE); - } - get viewportDepthCount() { - return this.#view.getUint32(20, LE); - } - set viewportDepthCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pViewportDepths() { - return this.#view.getBigUint64(24, LE); - } - set pViewportDepths(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.ycbcr2plane444Formats && (this.ycbcr2plane444Formats = data.ycbcr2plane444Formats); - this.sType = StructureType.PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get ycbcr2plane444Formats() { - return this.#view.getUint32(16, LE); - } - set ycbcr2plane444Formats(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceProvokingVertexFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceProvokingVertexFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProvokingVertexFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProvokingVertexFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceProvokingVertexFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.provokingVertexLast && (this.provokingVertexLast = data.provokingVertexLast), void 0 !== data.transformFeedbackPreservesProvokingVertex && (this.transformFeedbackPreservesProvokingVertex = data.transformFeedbackPreservesProvokingVertex); - this.sType = StructureType.PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get provokingVertexLast() { - return this.#view.getUint32(16, LE); - } - set provokingVertexLast(value) { - this.#view.setUint32(16, Number(value), LE); - } - get transformFeedbackPreservesProvokingVertex() { - return this.#view.getUint32(20, LE); - } - set transformFeedbackPreservesProvokingVertex(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceProvokingVertexPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceProvokingVertexPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProvokingVertexPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProvokingVertexPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceProvokingVertexPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.provokingVertexModePerPipeline && (this.provokingVertexModePerPipeline = data.provokingVertexModePerPipeline), void 0 !== data.transformFeedbackPreservesTriangleFanProvokingVertex && (this.transformFeedbackPreservesTriangleFanProvokingVertex = data.transformFeedbackPreservesTriangleFanProvokingVertex); - this.sType = StructureType.PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get provokingVertexModePerPipeline() { - return this.#view.getUint32(16, LE); - } - set provokingVertexModePerPipeline(value) { - this.#view.setUint32(16, Number(value), LE); - } - get transformFeedbackPreservesTriangleFanProvokingVertex() { - return this.#view.getUint32(20, LE); - } - set transformFeedbackPreservesTriangleFanProvokingVertex(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PipelineRasterizationProvokingVertexStateCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRasterizationProvokingVertexStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationProvokingVertexStateCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationProvokingVertexStateCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRasterizationProvokingVertexStateCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.provokingVertexMode && (this.provokingVertexMode = data.provokingVertexMode); - this.sType = StructureType.PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get provokingVertexMode() { - return this.#view.getUint32(16, LE); - } - set provokingVertexMode(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class CuModuleCreateInfoNVX { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CuModuleCreateInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CuModuleCreateInfoNVX.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CuModuleCreateInfoNVX.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CuModuleCreateInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.dataSize && (this.dataSize = data.dataSize), void 0 !== data.pData && (this.pData = data.pData); - this.sType = StructureType.CU_MODULE_CREATE_INFO_NVX; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dataSize() { - return this.#view.getBigUint64(16, LE); - } - set dataSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get pData() { - return this.#view.getBigUint64(24, LE); - } - set pData(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class CuFunctionCreateInfoNVX { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CuFunctionCreateInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CuFunctionCreateInfoNVX.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CuFunctionCreateInfoNVX.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CuFunctionCreateInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.module && (this.module = data.module), void 0 !== data.pName && (this.pName = data.pName); - this.sType = StructureType.CU_FUNCTION_CREATE_INFO_NVX; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get module() { - return this.#view.getBigUint64(16, LE); - } - set module(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get pName() { - return this.#view.getBigUint64(24, LE); - } - set pName(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class CuLaunchInfoNVX { - static size = 88; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CuLaunchInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CuLaunchInfoNVX.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CuLaunchInfoNVX.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CuLaunchInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.vk_function && (this.vk_function = data.vk_function), void 0 !== data.gridDimX && (this.gridDimX = data.gridDimX), void 0 !== data.gridDimY && (this.gridDimY = data.gridDimY), void 0 !== data.gridDimZ && (this.gridDimZ = data.gridDimZ), void 0 !== data.blockDimX && (this.blockDimX = data.blockDimX), void 0 !== data.blockDimY && (this.blockDimY = data.blockDimY), void 0 !== data.blockDimZ && (this.blockDimZ = data.blockDimZ), void 0 !== data.sharedMemBytes && (this.sharedMemBytes = data.sharedMemBytes), void 0 !== data.paramCount && (this.paramCount = data.paramCount), void 0 !== data.pParams && (this.pParams = data.pParams), void 0 !== data.extraCount && (this.extraCount = data.extraCount), void 0 !== data.pExtras && (this.pExtras = data.pExtras); - this.sType = StructureType.CU_LAUNCH_INFO_NVX; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get vk_function() { - return this.#view.getBigUint64(16, LE); - } - set vk_function(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get gridDimX() { - return this.#view.getUint32(24, LE); - } - set gridDimX(value) { - this.#view.setUint32(24, Number(value), LE); - } - get gridDimY() { - return this.#view.getUint32(28, LE); - } - set gridDimY(value) { - this.#view.setUint32(28, Number(value), LE); - } - get gridDimZ() { - return this.#view.getUint32(32, LE); - } - set gridDimZ(value) { - this.#view.setUint32(32, Number(value), LE); - } - get blockDimX() { - return this.#view.getUint32(36, LE); - } - set blockDimX(value) { - this.#view.setUint32(36, Number(value), LE); - } - get blockDimY() { - return this.#view.getUint32(40, LE); - } - set blockDimY(value) { - this.#view.setUint32(40, Number(value), LE); - } - get blockDimZ() { - return this.#view.getUint32(44, LE); - } - set blockDimZ(value) { - this.#view.setUint32(44, Number(value), LE); - } - get sharedMemBytes() { - return this.#view.getUint32(48, LE); - } - set sharedMemBytes(value) { - this.#view.setUint32(48, Number(value), LE); - } - get paramCount() { - return this.#view.getBigUint64(56, LE); - } - set paramCount(value) { - this.#view.setBigUint64(56, BigInt(value), LE); - } - get pParams() { - return this.#view.getBigUint64(64, LE); - } - set pParams(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - get extraCount() { - return this.#view.getBigUint64(72, LE); - } - set extraCount(value) { - this.#view.setBigUint64(72, BigInt(value), LE); - } - get pExtras() { - return this.#view.getBigUint64(80, LE); - } - set pExtras(value) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceDescriptorBufferFeaturesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorBufferFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorBufferFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.descriptorBuffer && (this.descriptorBuffer = data.descriptorBuffer), void 0 !== data.descriptorBufferCaptureReplay && (this.descriptorBufferCaptureReplay = data.descriptorBufferCaptureReplay), void 0 !== data.descriptorBufferImageLayoutIgnored && (this.descriptorBufferImageLayoutIgnored = data.descriptorBufferImageLayoutIgnored), void 0 !== data.descriptorBufferPushDescriptors && (this.descriptorBufferPushDescriptors = data.descriptorBufferPushDescriptors); - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get descriptorBuffer() { - return this.#view.getUint32(16, LE); - } - set descriptorBuffer(value) { - this.#view.setUint32(16, Number(value), LE); - } - get descriptorBufferCaptureReplay() { - return this.#view.getUint32(20, LE); - } - set descriptorBufferCaptureReplay(value) { - this.#view.setUint32(20, Number(value), LE); - } - get descriptorBufferImageLayoutIgnored() { - return this.#view.getUint32(24, LE); - } - set descriptorBufferImageLayoutIgnored(value) { - this.#view.setUint32(24, Number(value), LE); - } - get descriptorBufferPushDescriptors() { - return this.#view.getUint32(28, LE); - } - set descriptorBufferPushDescriptors(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDeviceDescriptorBufferPropertiesEXT { - static size = 256; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorBufferPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorBufferPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.combinedImageSamplerDescriptorSingleArray && (this.combinedImageSamplerDescriptorSingleArray = data.combinedImageSamplerDescriptorSingleArray), void 0 !== data.bufferlessPushDescriptors && (this.bufferlessPushDescriptors = data.bufferlessPushDescriptors), void 0 !== data.allowSamplerImageViewPostSubmitCreation && (this.allowSamplerImageViewPostSubmitCreation = data.allowSamplerImageViewPostSubmitCreation), void 0 !== data.descriptorBufferOffsetAlignment && (this.descriptorBufferOffsetAlignment = data.descriptorBufferOffsetAlignment), void 0 !== data.maxDescriptorBufferBindings && (this.maxDescriptorBufferBindings = data.maxDescriptorBufferBindings), void 0 !== data.maxResourceDescriptorBufferBindings && (this.maxResourceDescriptorBufferBindings = data.maxResourceDescriptorBufferBindings), void 0 !== data.maxSamplerDescriptorBufferBindings && (this.maxSamplerDescriptorBufferBindings = data.maxSamplerDescriptorBufferBindings), void 0 !== data.maxEmbeddedImmutableSamplerBindings && (this.maxEmbeddedImmutableSamplerBindings = data.maxEmbeddedImmutableSamplerBindings), void 0 !== data.maxEmbeddedImmutableSamplers && (this.maxEmbeddedImmutableSamplers = data.maxEmbeddedImmutableSamplers), void 0 !== data.bufferCaptureReplayDescriptorDataSize && (this.bufferCaptureReplayDescriptorDataSize = data.bufferCaptureReplayDescriptorDataSize), void 0 !== data.imageCaptureReplayDescriptorDataSize && (this.imageCaptureReplayDescriptorDataSize = data.imageCaptureReplayDescriptorDataSize), void 0 !== data.imageViewCaptureReplayDescriptorDataSize && (this.imageViewCaptureReplayDescriptorDataSize = data.imageViewCaptureReplayDescriptorDataSize), void 0 !== data.samplerCaptureReplayDescriptorDataSize && (this.samplerCaptureReplayDescriptorDataSize = data.samplerCaptureReplayDescriptorDataSize), void 0 !== data.accelerationStructureCaptureReplayDescriptorDataSize && (this.accelerationStructureCaptureReplayDescriptorDataSize = data.accelerationStructureCaptureReplayDescriptorDataSize), void 0 !== data.samplerDescriptorSize && (this.samplerDescriptorSize = data.samplerDescriptorSize), void 0 !== data.combinedImageSamplerDescriptorSize && (this.combinedImageSamplerDescriptorSize = data.combinedImageSamplerDescriptorSize), void 0 !== data.sampledImageDescriptorSize && (this.sampledImageDescriptorSize = data.sampledImageDescriptorSize), void 0 !== data.storageImageDescriptorSize && (this.storageImageDescriptorSize = data.storageImageDescriptorSize), void 0 !== data.uniformTexelBufferDescriptorSize && (this.uniformTexelBufferDescriptorSize = data.uniformTexelBufferDescriptorSize), void 0 !== data.robustUniformTexelBufferDescriptorSize && (this.robustUniformTexelBufferDescriptorSize = data.robustUniformTexelBufferDescriptorSize), void 0 !== data.storageTexelBufferDescriptorSize && (this.storageTexelBufferDescriptorSize = data.storageTexelBufferDescriptorSize), void 0 !== data.robustStorageTexelBufferDescriptorSize && (this.robustStorageTexelBufferDescriptorSize = data.robustStorageTexelBufferDescriptorSize), void 0 !== data.uniformBufferDescriptorSize && (this.uniformBufferDescriptorSize = data.uniformBufferDescriptorSize), void 0 !== data.robustUniformBufferDescriptorSize && (this.robustUniformBufferDescriptorSize = data.robustUniformBufferDescriptorSize), void 0 !== data.storageBufferDescriptorSize && (this.storageBufferDescriptorSize = data.storageBufferDescriptorSize), void 0 !== data.robustStorageBufferDescriptorSize && (this.robustStorageBufferDescriptorSize = data.robustStorageBufferDescriptorSize), void 0 !== data.inputAttachmentDescriptorSize && (this.inputAttachmentDescriptorSize = data.inputAttachmentDescriptorSize), void 0 !== data.accelerationStructureDescriptorSize && (this.accelerationStructureDescriptorSize = data.accelerationStructureDescriptorSize), void 0 !== data.maxSamplerDescriptorBufferRange && (this.maxSamplerDescriptorBufferRange = data.maxSamplerDescriptorBufferRange), void 0 !== data.maxResourceDescriptorBufferRange && (this.maxResourceDescriptorBufferRange = data.maxResourceDescriptorBufferRange), void 0 !== data.samplerDescriptorBufferAddressSpaceSize && (this.samplerDescriptorBufferAddressSpaceSize = data.samplerDescriptorBufferAddressSpaceSize), void 0 !== data.resourceDescriptorBufferAddressSpaceSize && (this.resourceDescriptorBufferAddressSpaceSize = data.resourceDescriptorBufferAddressSpaceSize), void 0 !== data.descriptorBufferAddressSpaceSize && (this.descriptorBufferAddressSpaceSize = data.descriptorBufferAddressSpaceSize); - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get combinedImageSamplerDescriptorSingleArray() { - return this.#view.getUint32(16, LE); - } - set combinedImageSamplerDescriptorSingleArray(value) { - this.#view.setUint32(16, Number(value), LE); - } - get bufferlessPushDescriptors() { - return this.#view.getUint32(20, LE); - } - set bufferlessPushDescriptors(value) { - this.#view.setUint32(20, Number(value), LE); - } - get allowSamplerImageViewPostSubmitCreation() { - return this.#view.getUint32(24, LE); - } - set allowSamplerImageViewPostSubmitCreation(value) { - this.#view.setUint32(24, Number(value), LE); - } - get descriptorBufferOffsetAlignment() { - return this.#view.getBigUint64(32, LE); - } - set descriptorBufferOffsetAlignment(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get maxDescriptorBufferBindings() { - return this.#view.getUint32(40, LE); - } - set maxDescriptorBufferBindings(value) { - this.#view.setUint32(40, Number(value), LE); - } - get maxResourceDescriptorBufferBindings() { - return this.#view.getUint32(44, LE); - } - set maxResourceDescriptorBufferBindings(value) { - this.#view.setUint32(44, Number(value), LE); - } - get maxSamplerDescriptorBufferBindings() { - return this.#view.getUint32(48, LE); - } - set maxSamplerDescriptorBufferBindings(value) { - this.#view.setUint32(48, Number(value), LE); - } - get maxEmbeddedImmutableSamplerBindings() { - return this.#view.getUint32(52, LE); - } - set maxEmbeddedImmutableSamplerBindings(value) { - this.#view.setUint32(52, Number(value), LE); - } - get maxEmbeddedImmutableSamplers() { - return this.#view.getUint32(56, LE); - } - set maxEmbeddedImmutableSamplers(value) { - this.#view.setUint32(56, Number(value), LE); - } - get bufferCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(64, LE); - } - set bufferCaptureReplayDescriptorDataSize(value) { - this.#view.setBigUint64(64, BigInt(value), LE); - } - get imageCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(72, LE); - } - set imageCaptureReplayDescriptorDataSize(value) { - this.#view.setBigUint64(72, BigInt(value), LE); - } - get imageViewCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(80, LE); - } - set imageViewCaptureReplayDescriptorDataSize(value) { - this.#view.setBigUint64(80, BigInt(value), LE); - } - get samplerCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(88, LE); - } - set samplerCaptureReplayDescriptorDataSize(value) { - this.#view.setBigUint64(88, BigInt(value), LE); - } - get accelerationStructureCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(96, LE); - } - set accelerationStructureCaptureReplayDescriptorDataSize(value) { - this.#view.setBigUint64(96, BigInt(value), LE); - } - get samplerDescriptorSize() { - return this.#view.getBigUint64(104, LE); - } - set samplerDescriptorSize(value) { - this.#view.setBigUint64(104, BigInt(value), LE); - } - get combinedImageSamplerDescriptorSize() { - return this.#view.getBigUint64(112, LE); - } - set combinedImageSamplerDescriptorSize(value) { - this.#view.setBigUint64(112, BigInt(value), LE); - } - get sampledImageDescriptorSize() { - return this.#view.getBigUint64(120, LE); - } - set sampledImageDescriptorSize(value) { - this.#view.setBigUint64(120, BigInt(value), LE); - } - get storageImageDescriptorSize() { - return this.#view.getBigUint64(128, LE); - } - set storageImageDescriptorSize(value) { - this.#view.setBigUint64(128, BigInt(value), LE); - } - get uniformTexelBufferDescriptorSize() { - return this.#view.getBigUint64(136, LE); - } - set uniformTexelBufferDescriptorSize(value) { - this.#view.setBigUint64(136, BigInt(value), LE); - } - get robustUniformTexelBufferDescriptorSize() { - return this.#view.getBigUint64(144, LE); - } - set robustUniformTexelBufferDescriptorSize(value) { - this.#view.setBigUint64(144, BigInt(value), LE); - } - get storageTexelBufferDescriptorSize() { - return this.#view.getBigUint64(152, LE); - } - set storageTexelBufferDescriptorSize(value) { - this.#view.setBigUint64(152, BigInt(value), LE); - } - get robustStorageTexelBufferDescriptorSize() { - return this.#view.getBigUint64(160, LE); - } - set robustStorageTexelBufferDescriptorSize(value) { - this.#view.setBigUint64(160, BigInt(value), LE); - } - get uniformBufferDescriptorSize() { - return this.#view.getBigUint64(168, LE); - } - set uniformBufferDescriptorSize(value) { - this.#view.setBigUint64(168, BigInt(value), LE); - } - get robustUniformBufferDescriptorSize() { - return this.#view.getBigUint64(176, LE); - } - set robustUniformBufferDescriptorSize(value) { - this.#view.setBigUint64(176, BigInt(value), LE); - } - get storageBufferDescriptorSize() { - return this.#view.getBigUint64(184, LE); - } - set storageBufferDescriptorSize(value) { - this.#view.setBigUint64(184, BigInt(value), LE); - } - get robustStorageBufferDescriptorSize() { - return this.#view.getBigUint64(192, LE); - } - set robustStorageBufferDescriptorSize(value) { - this.#view.setBigUint64(192, BigInt(value), LE); - } - get inputAttachmentDescriptorSize() { - return this.#view.getBigUint64(200, LE); - } - set inputAttachmentDescriptorSize(value) { - this.#view.setBigUint64(200, BigInt(value), LE); - } - get accelerationStructureDescriptorSize() { - return this.#view.getBigUint64(208, LE); - } - set accelerationStructureDescriptorSize(value) { - this.#view.setBigUint64(208, BigInt(value), LE); - } - get maxSamplerDescriptorBufferRange() { - return this.#view.getBigUint64(216, LE); - } - set maxSamplerDescriptorBufferRange(value) { - this.#view.setBigUint64(216, BigInt(value), LE); - } - get maxResourceDescriptorBufferRange() { - return this.#view.getBigUint64(224, LE); - } - set maxResourceDescriptorBufferRange(value) { - this.#view.setBigUint64(224, BigInt(value), LE); - } - get samplerDescriptorBufferAddressSpaceSize() { - return this.#view.getBigUint64(232, LE); - } - set samplerDescriptorBufferAddressSpaceSize(value) { - this.#view.setBigUint64(232, BigInt(value), LE); - } - get resourceDescriptorBufferAddressSpaceSize() { - return this.#view.getBigUint64(240, LE); - } - set resourceDescriptorBufferAddressSpaceSize(value) { - this.#view.setBigUint64(240, BigInt(value), LE); - } - get descriptorBufferAddressSpaceSize() { - return this.#view.getBigUint64(248, LE); - } - set descriptorBufferAddressSpaceSize(value) { - this.#view.setBigUint64(248, BigInt(value), LE); - } -} -export class PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.combinedImageSamplerDensityMapDescriptorSize && (this.combinedImageSamplerDensityMapDescriptorSize = data.combinedImageSamplerDensityMapDescriptorSize); - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get combinedImageSamplerDensityMapDescriptorSize() { - return this.#view.getBigUint64(16, LE); - } - set combinedImageSamplerDensityMapDescriptorSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class DescriptorAddressInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorAddressInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorAddressInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorAddressInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorAddressInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.address && (this.address = data.address), void 0 !== data.range && (this.range = data.range), void 0 !== data.format && (this.format = data.format); - this.sType = StructureType.DESCRIPTOR_ADDRESS_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get address() { - return this.#view.getBigUint64(16, LE); - } - set address(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get range() { - return this.#view.getBigUint64(24, LE); - } - set range(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get format() { - return this.#view.getUint32(32, LE); - } - set format(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class DescriptorBufferBindingInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorBufferBindingInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorBufferBindingInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorBufferBindingInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorBufferBindingInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.address && (this.address = data.address), void 0 !== data.usage && (this.usage = data.usage); - this.sType = StructureType.DESCRIPTOR_BUFFER_BINDING_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get address() { - return this.#view.getBigUint64(16, LE); - } - set address(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get usage() { - return this.#view.getUint32(24, LE); - } - set usage(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class DescriptorBufferBindingPushDescriptorBufferHandleEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorBufferBindingPushDescriptorBufferHandleEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorBufferBindingPushDescriptorBufferHandleEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorBufferBindingPushDescriptorBufferHandleEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorBufferBindingPushDescriptorBufferHandleEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.buffer && (this.buffer = data.buffer); - this.sType = StructureType.DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get buffer() { - return this.#view.getBigUint64(16, LE); - } - set buffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class DescriptorGetInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorGetInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorGetInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorGetInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorGetInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.type && (this.type = data.type), void 0 !== data.data && (this.data = data.data); - this.sType = StructureType.DESCRIPTOR_GET_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get type() { - return this.#view.getUint32(16, LE); - } - set type(value) { - this.#view.setUint32(16, Number(value), LE); - } - get data() { - throw new Error('Unknown type: {"union":["buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","u64"]}'); - } - set data(value) { - throw new Error('Unknown type: {"union":["buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","u64"]}'); - } -} -export class BufferCaptureDescriptorDataInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCaptureDescriptorDataInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCaptureDescriptorDataInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.buffer && (this.buffer = data.buffer); - this.sType = StructureType.BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get buffer() { - return this.#view.getBigUint64(16, LE); - } - set buffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class ImageCaptureDescriptorDataInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCaptureDescriptorDataInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCaptureDescriptorDataInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.image && (this.image = data.image); - this.sType = StructureType.IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get image() { - return this.#view.getBigUint64(16, LE); - } - set image(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class ImageViewCaptureDescriptorDataInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageViewCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewCaptureDescriptorDataInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewCaptureDescriptorDataInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageViewCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageView && (this.imageView = data.imageView); - this.sType = StructureType.IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageView() { - return this.#view.getBigUint64(16, LE); - } - set imageView(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class SamplerCaptureDescriptorDataInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SamplerCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerCaptureDescriptorDataInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerCaptureDescriptorDataInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SamplerCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.sampler && (this.sampler = data.sampler); - this.sType = StructureType.SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get sampler() { - return this.#view.getBigUint64(16, LE); - } - set sampler(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class AccelerationStructureCaptureDescriptorDataInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureCaptureDescriptorDataInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureCaptureDescriptorDataInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureCaptureDescriptorDataInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.accelerationStructure && (this.accelerationStructure = data.accelerationStructure), void 0 !== data.accelerationStructureNV && (this.accelerationStructureNV = data.accelerationStructureNV); - this.sType = StructureType.ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get accelerationStructure() { - return this.#view.getBigUint64(16, LE); - } - set accelerationStructure(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get accelerationStructureNV() { - return this.#view.getBigUint64(24, LE); - } - set accelerationStructureNV(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class OpaqueCaptureDescriptorDataCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(OpaqueCaptureDescriptorDataCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpaqueCaptureDescriptorDataCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < OpaqueCaptureDescriptorDataCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(OpaqueCaptureDescriptorDataCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.opaqueCaptureDescriptorData && (this.opaqueCaptureDescriptorData = data.opaqueCaptureDescriptorData); - this.sType = StructureType.OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get opaqueCaptureDescriptorData() { - return this.#view.getBigUint64(16, LE); - } - set opaqueCaptureDescriptorData(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceShaderIntegerDotProductFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderIntegerDotProductFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderIntegerDotProductFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderIntegerDotProduct && (this.shaderIntegerDotProduct = data.shaderIntegerDotProduct); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderIntegerDotProduct() { - return this.#view.getUint32(16, LE); - } - set shaderIntegerDotProduct(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceShaderIntegerDotProductProperties { - static size = 136; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderIntegerDotProductProperties.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderIntegerDotProductProperties.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductProperties.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.integerDotProduct8BitUnsignedAccelerated && (this.integerDotProduct8BitUnsignedAccelerated = data.integerDotProduct8BitUnsignedAccelerated), void 0 !== data.integerDotProduct8BitSignedAccelerated && (this.integerDotProduct8BitSignedAccelerated = data.integerDotProduct8BitSignedAccelerated), void 0 !== data.integerDotProduct8BitMixedSignednessAccelerated && (this.integerDotProduct8BitMixedSignednessAccelerated = data.integerDotProduct8BitMixedSignednessAccelerated), void 0 !== data.integerDotProduct4x8BitPackedUnsignedAccelerated && (this.integerDotProduct4x8BitPackedUnsignedAccelerated = data.integerDotProduct4x8BitPackedUnsignedAccelerated), void 0 !== data.integerDotProduct4x8BitPackedSignedAccelerated && (this.integerDotProduct4x8BitPackedSignedAccelerated = data.integerDotProduct4x8BitPackedSignedAccelerated), void 0 !== data.integerDotProduct4x8BitPackedMixedSignednessAccelerated && (this.integerDotProduct4x8BitPackedMixedSignednessAccelerated = data.integerDotProduct4x8BitPackedMixedSignednessAccelerated), void 0 !== data.integerDotProduct16BitUnsignedAccelerated && (this.integerDotProduct16BitUnsignedAccelerated = data.integerDotProduct16BitUnsignedAccelerated), void 0 !== data.integerDotProduct16BitSignedAccelerated && (this.integerDotProduct16BitSignedAccelerated = data.integerDotProduct16BitSignedAccelerated), void 0 !== data.integerDotProduct16BitMixedSignednessAccelerated && (this.integerDotProduct16BitMixedSignednessAccelerated = data.integerDotProduct16BitMixedSignednessAccelerated), void 0 !== data.integerDotProduct32BitUnsignedAccelerated && (this.integerDotProduct32BitUnsignedAccelerated = data.integerDotProduct32BitUnsignedAccelerated), void 0 !== data.integerDotProduct32BitSignedAccelerated && (this.integerDotProduct32BitSignedAccelerated = data.integerDotProduct32BitSignedAccelerated), void 0 !== data.integerDotProduct32BitMixedSignednessAccelerated && (this.integerDotProduct32BitMixedSignednessAccelerated = data.integerDotProduct32BitMixedSignednessAccelerated), void 0 !== data.integerDotProduct64BitUnsignedAccelerated && (this.integerDotProduct64BitUnsignedAccelerated = data.integerDotProduct64BitUnsignedAccelerated), void 0 !== data.integerDotProduct64BitSignedAccelerated && (this.integerDotProduct64BitSignedAccelerated = data.integerDotProduct64BitSignedAccelerated), void 0 !== data.integerDotProduct64BitMixedSignednessAccelerated && (this.integerDotProduct64BitMixedSignednessAccelerated = data.integerDotProduct64BitMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating8BitSignedAccelerated && (this.integerDotProductAccumulatingSaturating8BitSignedAccelerated = data.integerDotProductAccumulatingSaturating8BitSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated && (this.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating16BitSignedAccelerated && (this.integerDotProductAccumulatingSaturating16BitSignedAccelerated = data.integerDotProductAccumulatingSaturating16BitSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating32BitSignedAccelerated && (this.integerDotProductAccumulatingSaturating32BitSignedAccelerated = data.integerDotProductAccumulatingSaturating32BitSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated && (this.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating64BitSignedAccelerated && (this.integerDotProductAccumulatingSaturating64BitSignedAccelerated = data.integerDotProductAccumulatingSaturating64BitSignedAccelerated), void 0 !== data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated && (this.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get integerDotProduct8BitUnsignedAccelerated() { - return this.#view.getUint32(16, LE); - } - set integerDotProduct8BitUnsignedAccelerated(value) { - this.#view.setUint32(16, Number(value), LE); - } - get integerDotProduct8BitSignedAccelerated() { - return this.#view.getUint32(20, LE); - } - set integerDotProduct8BitSignedAccelerated(value) { - this.#view.setUint32(20, Number(value), LE); - } - get integerDotProduct8BitMixedSignednessAccelerated() { - return this.#view.getUint32(24, LE); - } - set integerDotProduct8BitMixedSignednessAccelerated(value) { - this.#view.setUint32(24, Number(value), LE); - } - get integerDotProduct4x8BitPackedUnsignedAccelerated() { - return this.#view.getUint32(28, LE); - } - set integerDotProduct4x8BitPackedUnsignedAccelerated(value) { - this.#view.setUint32(28, Number(value), LE); - } - get integerDotProduct4x8BitPackedSignedAccelerated() { - return this.#view.getUint32(32, LE); - } - set integerDotProduct4x8BitPackedSignedAccelerated(value) { - this.#view.setUint32(32, Number(value), LE); - } - get integerDotProduct4x8BitPackedMixedSignednessAccelerated() { - return this.#view.getUint32(36, LE); - } - set integerDotProduct4x8BitPackedMixedSignednessAccelerated(value) { - this.#view.setUint32(36, Number(value), LE); - } - get integerDotProduct16BitUnsignedAccelerated() { - return this.#view.getUint32(40, LE); - } - set integerDotProduct16BitUnsignedAccelerated(value) { - this.#view.setUint32(40, Number(value), LE); - } - get integerDotProduct16BitSignedAccelerated() { - return this.#view.getUint32(44, LE); - } - set integerDotProduct16BitSignedAccelerated(value) { - this.#view.setUint32(44, Number(value), LE); - } - get integerDotProduct16BitMixedSignednessAccelerated() { - return this.#view.getUint32(48, LE); - } - set integerDotProduct16BitMixedSignednessAccelerated(value) { - this.#view.setUint32(48, Number(value), LE); - } - get integerDotProduct32BitUnsignedAccelerated() { - return this.#view.getUint32(52, LE); - } - set integerDotProduct32BitUnsignedAccelerated(value) { - this.#view.setUint32(52, Number(value), LE); - } - get integerDotProduct32BitSignedAccelerated() { - return this.#view.getUint32(56, LE); - } - set integerDotProduct32BitSignedAccelerated(value) { - this.#view.setUint32(56, Number(value), LE); - } - get integerDotProduct32BitMixedSignednessAccelerated() { - return this.#view.getUint32(60, LE); - } - set integerDotProduct32BitMixedSignednessAccelerated(value) { - this.#view.setUint32(60, Number(value), LE); - } - get integerDotProduct64BitUnsignedAccelerated() { - return this.#view.getUint32(64, LE); - } - set integerDotProduct64BitUnsignedAccelerated(value) { - this.#view.setUint32(64, Number(value), LE); - } - get integerDotProduct64BitSignedAccelerated() { - return this.#view.getUint32(68, LE); - } - set integerDotProduct64BitSignedAccelerated(value) { - this.#view.setUint32(68, Number(value), LE); - } - get integerDotProduct64BitMixedSignednessAccelerated() { - return this.#view.getUint32(72, LE); - } - set integerDotProduct64BitMixedSignednessAccelerated(value) { - this.#view.setUint32(72, Number(value), LE); - } - get integerDotProductAccumulatingSaturating8BitUnsignedAccelerated() { - return this.#view.getUint32(76, LE); - } - set integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(value) { - this.#view.setUint32(76, Number(value), LE); - } - get integerDotProductAccumulatingSaturating8BitSignedAccelerated() { - return this.#view.getUint32(80, LE); - } - set integerDotProductAccumulatingSaturating8BitSignedAccelerated(value) { - this.#view.setUint32(80, Number(value), LE); - } - get integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated() { - return this.#view.getUint32(84, LE); - } - set integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(value) { - this.#view.setUint32(84, Number(value), LE); - } - get integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated() { - return this.#view.getUint32(88, LE); - } - set integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(value) { - this.#view.setUint32(88, Number(value), LE); - } - get integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated() { - return this.#view.getUint32(92, LE); - } - set integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(value) { - this.#view.setUint32(92, Number(value), LE); - } - get integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated() { - return this.#view.getUint32(96, LE); - } - set integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(value) { - this.#view.setUint32(96, Number(value), LE); - } - get integerDotProductAccumulatingSaturating16BitUnsignedAccelerated() { - return this.#view.getUint32(100, LE); - } - set integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(value) { - this.#view.setUint32(100, Number(value), LE); - } - get integerDotProductAccumulatingSaturating16BitSignedAccelerated() { - return this.#view.getUint32(104, LE); - } - set integerDotProductAccumulatingSaturating16BitSignedAccelerated(value) { - this.#view.setUint32(104, Number(value), LE); - } - get integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated() { - return this.#view.getUint32(108, LE); - } - set integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(value) { - this.#view.setUint32(108, Number(value), LE); - } - get integerDotProductAccumulatingSaturating32BitUnsignedAccelerated() { - return this.#view.getUint32(112, LE); - } - set integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(value) { - this.#view.setUint32(112, Number(value), LE); - } - get integerDotProductAccumulatingSaturating32BitSignedAccelerated() { - return this.#view.getUint32(116, LE); - } - set integerDotProductAccumulatingSaturating32BitSignedAccelerated(value) { - this.#view.setUint32(116, Number(value), LE); - } - get integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated() { - return this.#view.getUint32(120, LE); - } - set integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(value) { - this.#view.setUint32(120, Number(value), LE); - } - get integerDotProductAccumulatingSaturating64BitUnsignedAccelerated() { - return this.#view.getUint32(124, LE); - } - set integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(value) { - this.#view.setUint32(124, Number(value), LE); - } - get integerDotProductAccumulatingSaturating64BitSignedAccelerated() { - return this.#view.getUint32(128, LE); - } - set integerDotProductAccumulatingSaturating64BitSignedAccelerated(value) { - this.#view.setUint32(128, Number(value), LE); - } - get integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated() { - return this.#view.getUint32(132, LE); - } - set integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(value) { - this.#view.setUint32(132, Number(value), LE); - } -} -export class PhysicalDeviceDrmPropertiesEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDrmPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDrmPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDrmPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDrmPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.hasPrimary && (this.hasPrimary = data.hasPrimary), void 0 !== data.hasRender && (this.hasRender = data.hasRender), void 0 !== data.primaryMajor && (this.primaryMajor = data.primaryMajor), void 0 !== data.primaryMinor && (this.primaryMinor = data.primaryMinor), void 0 !== data.renderMajor && (this.renderMajor = data.renderMajor), void 0 !== data.renderMinor && (this.renderMinor = data.renderMinor); - this.sType = StructureType.PHYSICAL_DEVICE_DRM_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get hasPrimary() { - return this.#view.getUint32(16, LE); - } - set hasPrimary(value) { - this.#view.setUint32(16, Number(value), LE); - } - get hasRender() { - return this.#view.getUint32(20, LE); - } - set hasRender(value) { - this.#view.setUint32(20, Number(value), LE); - } - get primaryMajor() { - return this.#view.getBigInt64(24, LE); - } - set primaryMajor(value) { - this.#view.setBigInt64(24, BigInt(value), LE); - } - get primaryMinor() { - return this.#view.getBigInt64(32, LE); - } - set primaryMinor(value) { - this.#view.setBigInt64(32, BigInt(value), LE); - } - get renderMajor() { - return this.#view.getBigInt64(40, LE); - } - set renderMajor(value) { - this.#view.setBigInt64(40, BigInt(value), LE); - } - get renderMinor() { - return this.#view.getBigInt64(48, LE); - } - set renderMinor(value) { - this.#view.setBigInt64(48, BigInt(value), LE); - } -} -export class PhysicalDeviceFragmentShaderBarycentricFeaturesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.fragmentShaderBarycentric && (this.fragmentShaderBarycentric = data.fragmentShaderBarycentric); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get fragmentShaderBarycentric() { - return this.#view.getUint32(16, LE); - } - set fragmentShaderBarycentric(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceFragmentShaderBarycentricPropertiesKHR { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.triStripVertexOrderIndependentOfProvokingVertex && (this.triStripVertexOrderIndependentOfProvokingVertex = data.triStripVertexOrderIndependentOfProvokingVertex); - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get triStripVertexOrderIndependentOfProvokingVertex() { - return this.#view.getUint32(16, LE); - } - set triStripVertexOrderIndependentOfProvokingVertex(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceRayTracingMotionBlurFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRayTracingMotionBlurFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingMotionBlurFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingMotionBlurFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRayTracingMotionBlurFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.rayTracingMotionBlur && (this.rayTracingMotionBlur = data.rayTracingMotionBlur), void 0 !== data.rayTracingMotionBlurPipelineTraceRaysIndirect && (this.rayTracingMotionBlurPipelineTraceRaysIndirect = data.rayTracingMotionBlurPipelineTraceRaysIndirect); - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get rayTracingMotionBlur() { - return this.#view.getUint32(16, LE); - } - set rayTracingMotionBlur(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rayTracingMotionBlurPipelineTraceRaysIndirect() { - return this.#view.getUint32(20, LE); - } - set rayTracingMotionBlurPipelineTraceRaysIndirect(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class AccelerationStructureGeometryMotionTrianglesDataNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureGeometryMotionTrianglesDataNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryMotionTrianglesDataNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryMotionTrianglesDataNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureGeometryMotionTrianglesDataNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.vertexData && (this.vertexData = data.vertexData); - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get vertexData() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set vertexData(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } -} -export class AccelerationStructureMotionInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureMotionInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMotionInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureMotionInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureMotionInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxInstances && (this.maxInstances = data.maxInstances), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.ACCELERATION_STRUCTURE_MOTION_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxInstances() { - return this.#view.getUint32(16, LE); - } - set maxInstances(value) { - this.#view.setUint32(16, Number(value), LE); - } - get flags() { - return this.#view.getUint32(20, LE); - } - set flags(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class SRTDataNV { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SRTDataNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SRTDataNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SRTDataNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SRTDataNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.sx && (this.sx = data.sx), void 0 !== data.a && (this.a = data.a), void 0 !== data.b && (this.b = data.b), void 0 !== data.pvx && (this.pvx = data.pvx), void 0 !== data.sy && (this.sy = data.sy), void 0 !== data.c && (this.c = data.c), void 0 !== data.pvy && (this.pvy = data.pvy), void 0 !== data.sz && (this.sz = data.sz), void 0 !== data.pvz && (this.pvz = data.pvz), void 0 !== data.qx && (this.qx = data.qx), void 0 !== data.qy && (this.qy = data.qy), void 0 !== data.qz && (this.qz = data.qz), void 0 !== data.qw && (this.qw = data.qw), void 0 !== data.tx && (this.tx = data.tx), void 0 !== data.ty && (this.ty = data.ty), void 0 !== data.tz && (this.tz = data.tz); - } - get sx() { - return this.#view.getFloat32(0, LE); - } - set sx(value) { - this.#view.setFloat32(0, Number(value), LE); - } - get a() { - return this.#view.getFloat32(4, LE); - } - set a(value) { - this.#view.setFloat32(4, Number(value), LE); - } - get b() { - return this.#view.getFloat32(8, LE); - } - set b(value) { - this.#view.setFloat32(8, Number(value), LE); - } - get pvx() { - return this.#view.getFloat32(12, LE); - } - set pvx(value) { - this.#view.setFloat32(12, Number(value), LE); - } - get sy() { - return this.#view.getFloat32(16, LE); - } - set sy(value) { - this.#view.setFloat32(16, Number(value), LE); - } - get c() { - return this.#view.getFloat32(20, LE); - } - set c(value) { - this.#view.setFloat32(20, Number(value), LE); - } - get pvy() { - return this.#view.getFloat32(24, LE); - } - set pvy(value) { - this.#view.setFloat32(24, Number(value), LE); - } - get sz() { - return this.#view.getFloat32(28, LE); - } - set sz(value) { - this.#view.setFloat32(28, Number(value), LE); - } - get pvz() { - return this.#view.getFloat32(32, LE); - } - set pvz(value) { - this.#view.setFloat32(32, Number(value), LE); - } - get qx() { - return this.#view.getFloat32(36, LE); - } - set qx(value) { - this.#view.setFloat32(36, Number(value), LE); - } - get qy() { - return this.#view.getFloat32(40, LE); - } - set qy(value) { - this.#view.setFloat32(40, Number(value), LE); - } - get qz() { - return this.#view.getFloat32(44, LE); - } - set qz(value) { - this.#view.setFloat32(44, Number(value), LE); - } - get qw() { - return this.#view.getFloat32(48, LE); - } - set qw(value) { - this.#view.setFloat32(48, Number(value), LE); - } - get tx() { - return this.#view.getFloat32(52, LE); - } - set tx(value) { - this.#view.setFloat32(52, Number(value), LE); - } - get ty() { - return this.#view.getFloat32(56, LE); - } - set ty(value) { - this.#view.setFloat32(56, Number(value), LE); - } - get tz() { - return this.#view.getFloat32(60, LE); - } - set tz(value) { - this.#view.setFloat32(60, Number(value), LE); - } -} -export class AccelerationStructureSRTMotionInstanceNV { - static size = 152; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureSRTMotionInstanceNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureSRTMotionInstanceNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureSRTMotionInstanceNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureSRTMotionInstanceNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.transformT0 && (this.transformT0 = data.transformT0), void 0 !== data.transformT1 && (this.transformT1 = data.transformT1), void 0 !== data.instanceCustomIndex && (this.instanceCustomIndex = data.instanceCustomIndex), void 0 !== data.mask && (this.mask = data.mask), void 0 !== data.instanceShaderBindingTableRecordOffset && (this.instanceShaderBindingTableRecordOffset = data.instanceShaderBindingTableRecordOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.accelerationStructureReference && (this.accelerationStructureReference = data.accelerationStructureReference); - } - get transformT0() { - return new SRTDataNV(this.#data.subarray(0, 0 + SRTDataNV.size)); - } - set transformT0(value) { - if (value[BUFFER].byteLength < SRTDataNV.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get transformT1() { - return new SRTDataNV(this.#data.subarray(64, 64 + SRTDataNV.size)); - } - set transformT1(value) { - if (value[BUFFER].byteLength < SRTDataNV.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 64); - } - get instanceCustomIndex() { - return this.#view.getUint32(128, LE); - } - set instanceCustomIndex(value) { - this.#view.setUint32(128, Number(value), LE); - } - get mask() { - return this.#view.getUint32(132, LE); - } - set mask(value) { - this.#view.setUint32(132, Number(value), LE); - } - get instanceShaderBindingTableRecordOffset() { - return this.#view.getUint32(136, LE); - } - set instanceShaderBindingTableRecordOffset(value) { - this.#view.setUint32(136, Number(value), LE); - } - get flags() { - return this.#view.getUint32(140, LE); - } - set flags(value) { - this.#view.setUint32(140, Number(value), LE); - } - get accelerationStructureReference() { - return this.#view.getBigUint64(144, LE); - } - set accelerationStructureReference(value) { - this.#view.setBigUint64(144, BigInt(value), LE); - } -} -export class AccelerationStructureMatrixMotionInstanceNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureMatrixMotionInstanceNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMatrixMotionInstanceNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureMatrixMotionInstanceNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureMatrixMotionInstanceNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.transformT0 && (this.transformT0 = data.transformT0), void 0 !== data.transformT1 && (this.transformT1 = data.transformT1), void 0 !== data.instanceCustomIndex && (this.instanceCustomIndex = data.instanceCustomIndex), void 0 !== data.mask && (this.mask = data.mask), void 0 !== data.instanceShaderBindingTableRecordOffset && (this.instanceShaderBindingTableRecordOffset = data.instanceShaderBindingTableRecordOffset), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.accelerationStructureReference && (this.accelerationStructureReference = data.accelerationStructureReference); - } - get transformT0() { - return new TransformMatrixKHR(this.#data.subarray(0, 0 + TransformMatrixKHR.size)); - } - set transformT0(value) { - if (value[BUFFER].byteLength < TransformMatrixKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 0); - } - get transformT1() { - return new TransformMatrixKHR(this.#data.subarray(4, 4 + TransformMatrixKHR.size)); - } - set transformT1(value) { - if (value[BUFFER].byteLength < TransformMatrixKHR.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 4); - } - get instanceCustomIndex() { - return this.#view.getUint32(8, LE); - } - set instanceCustomIndex(value) { - this.#view.setUint32(8, Number(value), LE); - } - get mask() { - return this.#view.getUint32(12, LE); - } - set mask(value) { - this.#view.setUint32(12, Number(value), LE); - } - get instanceShaderBindingTableRecordOffset() { - return this.#view.getUint32(16, LE); - } - set instanceShaderBindingTableRecordOffset(value) { - this.#view.setUint32(16, Number(value), LE); - } - get flags() { - return this.#view.getUint32(20, LE); - } - set flags(value) { - this.#view.setUint32(20, Number(value), LE); - } - get accelerationStructureReference() { - return this.#view.getBigUint64(24, LE); - } - set accelerationStructureReference(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class AccelerationStructureMotionInstanceNV { - static size = 160; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureMotionInstanceNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMotionInstanceNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureMotionInstanceNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureMotionInstanceNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.type && (this.type = data.type), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.data && (this.data = data.data); - } - get type() { - return this.#view.getUint32(0, LE); - } - set type(value) { - this.#view.setUint32(0, Number(value), LE); - } - get flags() { - return this.#view.getUint32(4, LE); - } - set flags(value) { - this.#view.setUint32(4, Number(value), LE); - } - get data() { - throw new Error('Unknown type: {"union":[{"struct":[{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32"]},{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},"u32","u32","u32","u32","u64"]}]}'); - } - set data(value) { - throw new Error('Unknown type: {"union":[{"struct":[{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32"]},{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},"u32","u32","u32","u32","u64"]}]}'); - } -} -export class MemoryGetRemoteAddressInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MemoryGetRemoteAddressInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetRemoteAddressInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetRemoteAddressInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MemoryGetRemoteAddressInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.handleType && (this.handleType = data.handleType); - this.sType = StructureType.MEMORY_GET_REMOTE_ADDRESS_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(16, LE); - } - set memory(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get handleType() { - return this.#view.getUint32(24, LE); - } - set handleType(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class ImportMemoryBufferCollectionFUCHSIA { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMemoryBufferCollectionFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryBufferCollectionFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryBufferCollectionFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMemoryBufferCollectionFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.collection && (this.collection = data.collection), void 0 !== data.index && (this.index = data.index); - this.sType = StructureType.IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get collection() { - return this.#view.getBigUint64(16, LE); - } - set collection(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get index() { - return this.#view.getUint32(24, LE); - } - set index(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class BufferCollectionImageCreateInfoFUCHSIA { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferCollectionImageCreateInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionImageCreateInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionImageCreateInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferCollectionImageCreateInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.collection && (this.collection = data.collection), void 0 !== data.index && (this.index = data.index); - this.sType = StructureType.BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get collection() { - return this.#view.getBigUint64(16, LE); - } - set collection(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get index() { - return this.#view.getUint32(24, LE); - } - set index(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class BufferCollectionBufferCreateInfoFUCHSIA { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferCollectionBufferCreateInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionBufferCreateInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionBufferCreateInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferCollectionBufferCreateInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.collection && (this.collection = data.collection), void 0 !== data.index && (this.index = data.index); - this.sType = StructureType.BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get collection() { - return this.#view.getBigUint64(16, LE); - } - set collection(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get index() { - return this.#view.getUint32(24, LE); - } - set index(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class BufferCollectionCreateInfoFUCHSIA { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferCollectionCreateInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionCreateInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionCreateInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferCollectionCreateInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.collectionToken && (this.collectionToken = data.collectionToken); - this.sType = StructureType.BUFFER_COLLECTION_CREATE_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get collectionToken() { - return this.#view.getBigUint64(16, LE); - } - set collectionToken(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class BufferCollectionPropertiesFUCHSIA { - static size = 104; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferCollectionPropertiesFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionPropertiesFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionPropertiesFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferCollectionPropertiesFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memoryTypeBits && (this.memoryTypeBits = data.memoryTypeBits), void 0 !== data.bufferCount && (this.bufferCount = data.bufferCount), void 0 !== data.createInfoIndex && (this.createInfoIndex = data.createInfoIndex), void 0 !== data.sysmemPixelFormat && (this.sysmemPixelFormat = data.sysmemPixelFormat), void 0 !== data.formatFeatures && (this.formatFeatures = data.formatFeatures), void 0 !== data.sysmemColorSpaceIndex && (this.sysmemColorSpaceIndex = data.sysmemColorSpaceIndex), void 0 !== data.samplerYcbcrConversionComponents && (this.samplerYcbcrConversionComponents = data.samplerYcbcrConversionComponents), void 0 !== data.suggestedYcbcrModel && (this.suggestedYcbcrModel = data.suggestedYcbcrModel), void 0 !== data.suggestedYcbcrRange && (this.suggestedYcbcrRange = data.suggestedYcbcrRange), void 0 !== data.suggestedXChromaOffset && (this.suggestedXChromaOffset = data.suggestedXChromaOffset), void 0 !== data.suggestedYChromaOffset && (this.suggestedYChromaOffset = data.suggestedYChromaOffset); - this.sType = StructureType.BUFFER_COLLECTION_PROPERTIES_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - set memoryTypeBits(value) { - this.#view.setUint32(16, Number(value), LE); - } - get bufferCount() { - return this.#view.getUint32(20, LE); - } - set bufferCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get createInfoIndex() { - return this.#view.getUint32(24, LE); - } - set createInfoIndex(value) { - this.#view.setUint32(24, Number(value), LE); - } - get sysmemPixelFormat() { - return this.#view.getBigUint64(32, LE); - } - set sysmemPixelFormat(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get formatFeatures() { - return this.#view.getUint32(40, LE); - } - set formatFeatures(value) { - this.#view.setUint32(40, Number(value), LE); - } - get sysmemColorSpaceIndex() { - return new SysmemColorSpaceFUCHSIA(this.#data.subarray(44, 44 + SysmemColorSpaceFUCHSIA.size)); - } - set sysmemColorSpaceIndex(value) { - if (value[BUFFER].byteLength < SysmemColorSpaceFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 44); - } - get samplerYcbcrConversionComponents() { - return new ComponentMapping(this.#data.subarray(68, 68 + ComponentMapping.size)); - } - set samplerYcbcrConversionComponents(value) { - if (value[BUFFER].byteLength < ComponentMapping.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 68); - } - get suggestedYcbcrModel() { - return this.#view.getUint32(84, LE); - } - set suggestedYcbcrModel(value) { - this.#view.setUint32(84, Number(value), LE); - } - get suggestedYcbcrRange() { - return this.#view.getUint32(88, LE); - } - set suggestedYcbcrRange(value) { - this.#view.setUint32(88, Number(value), LE); - } - get suggestedXChromaOffset() { - return this.#view.getUint32(92, LE); - } - set suggestedXChromaOffset(value) { - this.#view.setUint32(92, Number(value), LE); - } - get suggestedYChromaOffset() { - return this.#view.getUint32(96, LE); - } - set suggestedYChromaOffset(value) { - this.#view.setUint32(96, Number(value), LE); - } -} -export class BufferConstraintsInfoFUCHSIA { - static size = 120; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferConstraintsInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferConstraintsInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferConstraintsInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferConstraintsInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.createInfo && (this.createInfo = data.createInfo), void 0 !== data.requiredFormatFeatures && (this.requiredFormatFeatures = data.requiredFormatFeatures), void 0 !== data.bufferCollectionConstraints && (this.bufferCollectionConstraints = data.bufferCollectionConstraints); - this.sType = StructureType.BUFFER_CONSTRAINTS_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get createInfo() { - return new BufferCreateInfo(this.#data.subarray(16, 16 + BufferCreateInfo.size)); - } - set createInfo(value) { - if (value[BUFFER].byteLength < BufferCreateInfo.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get requiredFormatFeatures() { - return this.#view.getUint32(72, LE); - } - set requiredFormatFeatures(value) { - this.#view.setUint32(72, Number(value), LE); - } - get bufferCollectionConstraints() { - return new BufferCollectionConstraintsInfoFUCHSIA(this.#data.subarray(76, 76 + BufferCollectionConstraintsInfoFUCHSIA.size)); - } - set bufferCollectionConstraints(value) { - if (value[BUFFER].byteLength < BufferCollectionConstraintsInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 76); - } -} -export class SysmemColorSpaceFUCHSIA { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SysmemColorSpaceFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SysmemColorSpaceFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SysmemColorSpaceFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SysmemColorSpaceFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.colorSpace && (this.colorSpace = data.colorSpace); - this.sType = StructureType.SYSMEM_COLOR_SPACE_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get colorSpace() { - return this.#view.getUint32(16, LE); - } - set colorSpace(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImageFormatConstraintsInfoFUCHSIA { - static size = 136; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageFormatConstraintsInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatConstraintsInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageFormatConstraintsInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageFormatConstraintsInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageCreateInfo && (this.imageCreateInfo = data.imageCreateInfo), void 0 !== data.requiredFormatFeatures && (this.requiredFormatFeatures = data.requiredFormatFeatures), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.sysmemPixelFormat && (this.sysmemPixelFormat = data.sysmemPixelFormat), void 0 !== data.colorSpaceCount && (this.colorSpaceCount = data.colorSpaceCount), void 0 !== data.pColorSpaces && (this.pColorSpaces = data.pColorSpaces); - this.sType = StructureType.IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageCreateInfo() { - return new ImageCreateInfo(this.#data.subarray(16, 16 + ImageCreateInfo.size)); - } - set imageCreateInfo(value) { - if (value[BUFFER].byteLength < ImageCreateInfo.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get requiredFormatFeatures() { - return this.#view.getUint32(104, LE); - } - set requiredFormatFeatures(value) { - this.#view.setUint32(104, Number(value), LE); - } - get flags() { - return this.#view.getUint32(108, LE); - } - set flags(value) { - this.#view.setUint32(108, Number(value), LE); - } - get sysmemPixelFormat() { - return this.#view.getBigUint64(112, LE); - } - set sysmemPixelFormat(value) { - this.#view.setBigUint64(112, BigInt(value), LE); - } - get colorSpaceCount() { - return this.#view.getUint32(120, LE); - } - set colorSpaceCount(value) { - this.#view.setUint32(120, Number(value), LE); - } - get pColorSpaces() { - return this.#view.getBigUint64(128, LE); - } - set pColorSpaces(value) { - this.#view.setBigUint64(128, BigInt(anyPointer(value)), LE); - } -} -export class ImageConstraintsInfoFUCHSIA { - static size = 80; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageConstraintsInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageConstraintsInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageConstraintsInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageConstraintsInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.formatConstraintsCount && (this.formatConstraintsCount = data.formatConstraintsCount), void 0 !== data.pFormatConstraints && (this.pFormatConstraints = data.pFormatConstraints), void 0 !== data.bufferCollectionConstraints && (this.bufferCollectionConstraints = data.bufferCollectionConstraints), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.IMAGE_CONSTRAINTS_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get formatConstraintsCount() { - return this.#view.getUint32(16, LE); - } - set formatConstraintsCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pFormatConstraints() { - return this.#view.getBigUint64(24, LE); - } - set pFormatConstraints(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get bufferCollectionConstraints() { - return new BufferCollectionConstraintsInfoFUCHSIA(this.#data.subarray(32, 32 + BufferCollectionConstraintsInfoFUCHSIA.size)); - } - set bufferCollectionConstraints(value) { - if (value[BUFFER].byteLength < BufferCollectionConstraintsInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 32); - } - get flags() { - return this.#view.getUint32(72, LE); - } - set flags(value) { - this.#view.setUint32(72, Number(value), LE); - } -} -export class BufferCollectionConstraintsInfoFUCHSIA { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(BufferCollectionConstraintsInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionConstraintsInfoFUCHSIA.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionConstraintsInfoFUCHSIA.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(BufferCollectionConstraintsInfoFUCHSIA.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minBufferCount && (this.minBufferCount = data.minBufferCount), void 0 !== data.maxBufferCount && (this.maxBufferCount = data.maxBufferCount), void 0 !== data.minBufferCountForCamping && (this.minBufferCountForCamping = data.minBufferCountForCamping), void 0 !== data.minBufferCountForDedicatedSlack && (this.minBufferCountForDedicatedSlack = data.minBufferCountForDedicatedSlack), void 0 !== data.minBufferCountForSharedSlack && (this.minBufferCountForSharedSlack = data.minBufferCountForSharedSlack); - this.sType = StructureType.BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minBufferCount() { - return this.#view.getUint32(16, LE); - } - set minBufferCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxBufferCount() { - return this.#view.getUint32(20, LE); - } - set maxBufferCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get minBufferCountForCamping() { - return this.#view.getUint32(24, LE); - } - set minBufferCountForCamping(value) { - this.#view.setUint32(24, Number(value), LE); - } - get minBufferCountForDedicatedSlack() { - return this.#view.getUint32(28, LE); - } - set minBufferCountForDedicatedSlack(value) { - this.#view.setUint32(28, Number(value), LE); - } - get minBufferCountForSharedSlack() { - return this.#view.getUint32(32, LE); - } - set minBufferCountForSharedSlack(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class PhysicalDeviceRGBA10X6FormatsFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.formatRgba10x6WithoutYCbCrSampler && (this.formatRgba10x6WithoutYCbCrSampler = data.formatRgba10x6WithoutYCbCrSampler); - this.sType = StructureType.PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get formatRgba10x6WithoutYCbCrSampler() { - return this.#view.getUint32(16, LE); - } - set formatRgba10x6WithoutYCbCrSampler(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class FormatProperties3 { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(FormatProperties3.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FormatProperties3.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < FormatProperties3.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(FormatProperties3.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.linearTilingFeatures && (this.linearTilingFeatures = data.linearTilingFeatures), void 0 !== data.optimalTilingFeatures && (this.optimalTilingFeatures = data.optimalTilingFeatures), void 0 !== data.bufferFeatures && (this.bufferFeatures = data.bufferFeatures); - this.sType = StructureType.FORMAT_PROPERTIES_3; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get linearTilingFeatures() { - return this.#view.getBigUint64(16, LE); - } - set linearTilingFeatures(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get optimalTilingFeatures() { - return this.#view.getBigUint64(24, LE); - } - set optimalTilingFeatures(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get bufferFeatures() { - return this.#view.getBigUint64(32, LE); - } - set bufferFeatures(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class DrmFormatModifierPropertiesList2EXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DrmFormatModifierPropertiesList2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierPropertiesList2EXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DrmFormatModifierPropertiesList2EXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DrmFormatModifierPropertiesList2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.drmFormatModifierCount && (this.drmFormatModifierCount = data.drmFormatModifierCount), void 0 !== data.pDrmFormatModifierProperties && (this.pDrmFormatModifierProperties = data.pDrmFormatModifierProperties); - this.sType = StructureType.DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get drmFormatModifierCount() { - return this.#view.getUint32(16, LE); - } - set drmFormatModifierCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pDrmFormatModifierProperties() { - return this.#view.getBigUint64(24, LE); - } - set pDrmFormatModifierProperties(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class DrmFormatModifierProperties2EXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DrmFormatModifierProperties2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierProperties2EXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DrmFormatModifierProperties2EXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DrmFormatModifierProperties2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.drmFormatModifier && (this.drmFormatModifier = data.drmFormatModifier), void 0 !== data.drmFormatModifierPlaneCount && (this.drmFormatModifierPlaneCount = data.drmFormatModifierPlaneCount), void 0 !== data.drmFormatModifierTilingFeatures && (this.drmFormatModifierTilingFeatures = data.drmFormatModifierTilingFeatures); - } - get drmFormatModifier() { - return this.#view.getBigUint64(0, LE); - } - set drmFormatModifier(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get drmFormatModifierPlaneCount() { - return this.#view.getUint32(8, LE); - } - set drmFormatModifierPlaneCount(value) { - this.#view.setUint32(8, Number(value), LE); - } - get drmFormatModifierTilingFeatures() { - return this.#view.getBigUint64(16, LE); - } - set drmFormatModifierTilingFeatures(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class AndroidHardwareBufferFormatProperties2ANDROID { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AndroidHardwareBufferFormatProperties2ANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferFormatProperties2ANDROID.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidHardwareBufferFormatProperties2ANDROID.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AndroidHardwareBufferFormatProperties2ANDROID.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.format && (this.format = data.format), void 0 !== data.externalFormat && (this.externalFormat = data.externalFormat), void 0 !== data.formatFeatures && (this.formatFeatures = data.formatFeatures), void 0 !== data.samplerYcbcrConversionComponents && (this.samplerYcbcrConversionComponents = data.samplerYcbcrConversionComponents), void 0 !== data.suggestedYcbcrModel && (this.suggestedYcbcrModel = data.suggestedYcbcrModel), void 0 !== data.suggestedYcbcrRange && (this.suggestedYcbcrRange = data.suggestedYcbcrRange), void 0 !== data.suggestedXChromaOffset && (this.suggestedXChromaOffset = data.suggestedXChromaOffset), void 0 !== data.suggestedYChromaOffset && (this.suggestedYChromaOffset = data.suggestedYChromaOffset); - this.sType = StructureType.ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get format() { - return this.#view.getUint32(16, LE); - } - set format(value) { - this.#view.setUint32(16, Number(value), LE); - } - get externalFormat() { - return this.#view.getBigUint64(24, LE); - } - set externalFormat(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get formatFeatures() { - return this.#view.getBigUint64(32, LE); - } - set formatFeatures(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get samplerYcbcrConversionComponents() { - return new ComponentMapping(this.#data.subarray(40, 40 + ComponentMapping.size)); - } - set samplerYcbcrConversionComponents(value) { - if (value[BUFFER].byteLength < ComponentMapping.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 40); - } - get suggestedYcbcrModel() { - return this.#view.getUint32(56, LE); - } - set suggestedYcbcrModel(value) { - this.#view.setUint32(56, Number(value), LE); - } - get suggestedYcbcrRange() { - return this.#view.getUint32(60, LE); - } - set suggestedYcbcrRange(value) { - this.#view.setUint32(60, Number(value), LE); - } - get suggestedXChromaOffset() { - return this.#view.getUint32(64, LE); - } - set suggestedXChromaOffset(value) { - this.#view.setUint32(64, Number(value), LE); - } - get suggestedYChromaOffset() { - return this.#view.getUint32(68, LE); - } - set suggestedYChromaOffset(value) { - this.#view.setUint32(68, Number(value), LE); - } -} -export class PipelineRenderingCreateInfo { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRenderingCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRenderingCreateInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRenderingCreateInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRenderingCreateInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.viewMask && (this.viewMask = data.viewMask), void 0 !== data.colorAttachmentCount && (this.colorAttachmentCount = data.colorAttachmentCount), void 0 !== data.pColorAttachmentFormats && (this.pColorAttachmentFormats = data.pColorAttachmentFormats), void 0 !== data.depthAttachmentFormat && (this.depthAttachmentFormat = data.depthAttachmentFormat), void 0 !== data.stencilAttachmentFormat && (this.stencilAttachmentFormat = data.stencilAttachmentFormat); - this.sType = StructureType.PIPELINE_RENDERING_CREATE_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get viewMask() { - return this.#view.getUint32(16, LE); - } - set viewMask(value) { - this.#view.setUint32(16, Number(value), LE); - } - get colorAttachmentCount() { - return this.#view.getUint32(20, LE); - } - set colorAttachmentCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pColorAttachmentFormats() { - return this.#view.getBigUint64(24, LE); - } - set pColorAttachmentFormats(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get depthAttachmentFormat() { - return this.#view.getUint32(32, LE); - } - set depthAttachmentFormat(value) { - this.#view.setUint32(32, Number(value), LE); - } - get stencilAttachmentFormat() { - return this.#view.getUint32(36, LE); - } - set stencilAttachmentFormat(value) { - this.#view.setUint32(36, Number(value), LE); - } -} -export class RenderingInfo { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderingInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderingInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderingInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.renderArea && (this.renderArea = data.renderArea), void 0 !== data.layerCount && (this.layerCount = data.layerCount), void 0 !== data.viewMask && (this.viewMask = data.viewMask), void 0 !== data.colorAttachmentCount && (this.colorAttachmentCount = data.colorAttachmentCount), void 0 !== data.pColorAttachments && (this.pColorAttachments = data.pColorAttachments), void 0 !== data.pDepthAttachment && (this.pDepthAttachment = data.pDepthAttachment), void 0 !== data.pStencilAttachment && (this.pStencilAttachment = data.pStencilAttachment); - this.sType = StructureType.RENDERING_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get renderArea() { - return new Rect2D(this.#data.subarray(20, 20 + Rect2D.size)); - } - set renderArea(value) { - if (value[BUFFER].byteLength < Rect2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } - get layerCount() { - return this.#view.getUint32(36, LE); - } - set layerCount(value) { - this.#view.setUint32(36, Number(value), LE); - } - get viewMask() { - return this.#view.getUint32(40, LE); - } - set viewMask(value) { - this.#view.setUint32(40, Number(value), LE); - } - get colorAttachmentCount() { - return this.#view.getUint32(44, LE); - } - set colorAttachmentCount(value) { - this.#view.setUint32(44, Number(value), LE); - } - get pColorAttachments() { - return this.#view.getBigUint64(48, LE); - } - set pColorAttachments(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get pDepthAttachment() { - return this.#view.getBigUint64(56, LE); - } - set pDepthAttachment(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get pStencilAttachment() { - return this.#view.getBigUint64(64, LE); - } - set pStencilAttachment(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} -export class RenderingAttachmentInfo { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderingAttachmentInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingAttachmentInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderingAttachmentInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderingAttachmentInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageView && (this.imageView = data.imageView), void 0 !== data.imageLayout && (this.imageLayout = data.imageLayout), void 0 !== data.resolveMode && (this.resolveMode = data.resolveMode), void 0 !== data.resolveImageView && (this.resolveImageView = data.resolveImageView), void 0 !== data.resolveImageLayout && (this.resolveImageLayout = data.resolveImageLayout), void 0 !== data.loadOp && (this.loadOp = data.loadOp), void 0 !== data.storeOp && (this.storeOp = data.storeOp), void 0 !== data.clearValue && (this.clearValue = data.clearValue); - this.sType = StructureType.RENDERING_ATTACHMENT_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageView() { - return this.#view.getBigUint64(16, LE); - } - set imageView(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get imageLayout() { - return this.#view.getUint32(24, LE); - } - set imageLayout(value) { - this.#view.setUint32(24, Number(value), LE); - } - get resolveMode() { - return this.#view.getUint32(28, LE); - } - set resolveMode(value) { - this.#view.setUint32(28, Number(value), LE); - } - get resolveImageView() { - return this.#view.getBigUint64(32, LE); - } - set resolveImageView(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get resolveImageLayout() { - return this.#view.getUint32(40, LE); - } - set resolveImageLayout(value) { - this.#view.setUint32(40, Number(value), LE); - } - get loadOp() { - return this.#view.getUint32(44, LE); - } - set loadOp(value) { - this.#view.setUint32(44, Number(value), LE); - } - get storeOp() { - return this.#view.getUint32(48, LE); - } - set storeOp(value) { - this.#view.setUint32(48, Number(value), LE); - } - get clearValue() { - throw new Error('Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}'); - } - set clearValue(value) { - throw new Error('Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}'); - } -} -export class RenderingFragmentShadingRateAttachmentInfoKHR { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderingFragmentShadingRateAttachmentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingFragmentShadingRateAttachmentInfoKHR.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderingFragmentShadingRateAttachmentInfoKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderingFragmentShadingRateAttachmentInfoKHR.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageView && (this.imageView = data.imageView), void 0 !== data.imageLayout && (this.imageLayout = data.imageLayout), void 0 !== data.shadingRateAttachmentTexelSize && (this.shadingRateAttachmentTexelSize = data.shadingRateAttachmentTexelSize); - this.sType = StructureType.RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageView() { - return this.#view.getBigUint64(16, LE); - } - set imageView(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get imageLayout() { - return this.#view.getUint32(24, LE); - } - set imageLayout(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shadingRateAttachmentTexelSize() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - set shadingRateAttachmentTexelSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 28); - } -} -export class RenderingFragmentDensityMapAttachmentInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderingFragmentDensityMapAttachmentInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingFragmentDensityMapAttachmentInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderingFragmentDensityMapAttachmentInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderingFragmentDensityMapAttachmentInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageView && (this.imageView = data.imageView), void 0 !== data.imageLayout && (this.imageLayout = data.imageLayout); - this.sType = StructureType.RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageView() { - return this.#view.getBigUint64(16, LE); - } - set imageView(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get imageLayout() { - return this.#view.getUint32(24, LE); - } - set imageLayout(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceDynamicRenderingFeatures { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDynamicRenderingFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDynamicRenderingFeatures.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDynamicRenderingFeatures.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDynamicRenderingFeatures.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.dynamicRendering && (this.dynamicRendering = data.dynamicRendering); - this.sType = StructureType.PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get dynamicRendering() { - return this.#view.getUint32(16, LE); - } - set dynamicRendering(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class CommandBufferInheritanceRenderingInfo { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CommandBufferInheritanceRenderingInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceRenderingInfo.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceRenderingInfo.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CommandBufferInheritanceRenderingInfo.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.viewMask && (this.viewMask = data.viewMask), void 0 !== data.colorAttachmentCount && (this.colorAttachmentCount = data.colorAttachmentCount), void 0 !== data.pColorAttachmentFormats && (this.pColorAttachmentFormats = data.pColorAttachmentFormats), void 0 !== data.depthAttachmentFormat && (this.depthAttachmentFormat = data.depthAttachmentFormat), void 0 !== data.stencilAttachmentFormat && (this.stencilAttachmentFormat = data.stencilAttachmentFormat), void 0 !== data.rasterizationSamples && (this.rasterizationSamples = data.rasterizationSamples); - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_RENDERING_INFO; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get viewMask() { - return this.#view.getUint32(20, LE); - } - set viewMask(value) { - this.#view.setUint32(20, Number(value), LE); - } - get colorAttachmentCount() { - return this.#view.getUint32(24, LE); - } - set colorAttachmentCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get pColorAttachmentFormats() { - return this.#view.getBigUint64(32, LE); - } - set pColorAttachmentFormats(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get depthAttachmentFormat() { - return this.#view.getUint32(40, LE); - } - set depthAttachmentFormat(value) { - this.#view.setUint32(40, Number(value), LE); - } - get stencilAttachmentFormat() { - return this.#view.getUint32(44, LE); - } - set stencilAttachmentFormat(value) { - this.#view.setUint32(44, Number(value), LE); - } - get rasterizationSamples() { - return this.#view.getUint32(48, LE); - } - set rasterizationSamples(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class AttachmentSampleCountInfoAMD { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AttachmentSampleCountInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentSampleCountInfoAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentSampleCountInfoAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AttachmentSampleCountInfoAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.colorAttachmentCount && (this.colorAttachmentCount = data.colorAttachmentCount), void 0 !== data.pColorAttachmentSamples && (this.pColorAttachmentSamples = data.pColorAttachmentSamples), void 0 !== data.depthStencilAttachmentSamples && (this.depthStencilAttachmentSamples = data.depthStencilAttachmentSamples); - this.sType = StructureType.ATTACHMENT_SAMPLE_COUNT_INFO_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get colorAttachmentCount() { - return this.#view.getUint32(16, LE); - } - set colorAttachmentCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pColorAttachmentSamples() { - return this.#view.getBigUint64(24, LE); - } - set pColorAttachmentSamples(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get depthStencilAttachmentSamples() { - return this.#view.getUint32(32, LE); - } - set depthStencilAttachmentSamples(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class MultiviewPerViewAttributesInfoNVX { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MultiviewPerViewAttributesInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultiviewPerViewAttributesInfoNVX.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MultiviewPerViewAttributesInfoNVX.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MultiviewPerViewAttributesInfoNVX.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.perViewAttributes && (this.perViewAttributes = data.perViewAttributes), void 0 !== data.perViewAttributesPositionXOnly && (this.perViewAttributesPositionXOnly = data.perViewAttributesPositionXOnly); - this.sType = StructureType.MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get perViewAttributes() { - return this.#view.getUint32(16, LE); - } - set perViewAttributes(value) { - this.#view.setUint32(16, Number(value), LE); - } - get perViewAttributesPositionXOnly() { - return this.#view.getUint32(20, LE); - } - set perViewAttributesPositionXOnly(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceImageViewMinLodFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImageViewMinLodFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageViewMinLodFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageViewMinLodFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImageViewMinLodFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minLod && (this.minLod = data.minLod); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minLod() { - return this.#view.getUint32(16, LE); - } - set minLod(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImageViewMinLodCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageViewMinLodCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewMinLodCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewMinLodCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageViewMinLodCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.minLod && (this.minLod = data.minLod); - this.sType = StructureType.IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get minLod() { - return this.#view.getFloat32(16, LE); - } - set minLod(value) { - this.#view.setFloat32(16, Number(value), LE); - } -} -export class PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.rasterizationOrderColorAttachmentAccess && (this.rasterizationOrderColorAttachmentAccess = data.rasterizationOrderColorAttachmentAccess), void 0 !== data.rasterizationOrderDepthAttachmentAccess && (this.rasterizationOrderDepthAttachmentAccess = data.rasterizationOrderDepthAttachmentAccess), void 0 !== data.rasterizationOrderStencilAttachmentAccess && (this.rasterizationOrderStencilAttachmentAccess = data.rasterizationOrderStencilAttachmentAccess); - this.sType = StructureType.PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get rasterizationOrderColorAttachmentAccess() { - return this.#view.getUint32(16, LE); - } - set rasterizationOrderColorAttachmentAccess(value) { - this.#view.setUint32(16, Number(value), LE); - } - get rasterizationOrderDepthAttachmentAccess() { - return this.#view.getUint32(20, LE); - } - set rasterizationOrderDepthAttachmentAccess(value) { - this.#view.setUint32(20, Number(value), LE); - } - get rasterizationOrderStencilAttachmentAccess() { - return this.#view.getUint32(24, LE); - } - set rasterizationOrderStencilAttachmentAccess(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceLinearColorAttachmentFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceLinearColorAttachmentFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLinearColorAttachmentFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLinearColorAttachmentFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceLinearColorAttachmentFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.linearColorAttachment && (this.linearColorAttachment = data.linearColorAttachment); - this.sType = StructureType.PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get linearColorAttachment() { - return this.#view.getUint32(16, LE); - } - set linearColorAttachment(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.graphicsPipelineLibrary && (this.graphicsPipelineLibrary = data.graphicsPipelineLibrary); - this.sType = StructureType.PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get graphicsPipelineLibrary() { - return this.#view.getUint32(16, LE); - } - set graphicsPipelineLibrary(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.graphicsPipelineLibraryFastLinking && (this.graphicsPipelineLibraryFastLinking = data.graphicsPipelineLibraryFastLinking), void 0 !== data.graphicsPipelineLibraryIndependentInterpolationDecoration && (this.graphicsPipelineLibraryIndependentInterpolationDecoration = data.graphicsPipelineLibraryIndependentInterpolationDecoration); - this.sType = StructureType.PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get graphicsPipelineLibraryFastLinking() { - return this.#view.getUint32(16, LE); - } - set graphicsPipelineLibraryFastLinking(value) { - this.#view.setUint32(16, Number(value), LE); - } - get graphicsPipelineLibraryIndependentInterpolationDecoration() { - return this.#view.getUint32(20, LE); - } - set graphicsPipelineLibraryIndependentInterpolationDecoration(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class GraphicsPipelineLibraryCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(GraphicsPipelineLibraryCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsPipelineLibraryCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < GraphicsPipelineLibraryCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(GraphicsPipelineLibraryCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.descriptorSetHostMapping && (this.descriptorSetHostMapping = data.descriptorSetHostMapping); - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get descriptorSetHostMapping() { - return this.#view.getUint32(16, LE); - } - set descriptorSetHostMapping(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DescriptorSetBindingReferenceVALVE { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorSetBindingReferenceVALVE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetBindingReferenceVALVE.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetBindingReferenceVALVE.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorSetBindingReferenceVALVE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.descriptorSetLayout && (this.descriptorSetLayout = data.descriptorSetLayout), void 0 !== data.binding && (this.binding = data.binding); - this.sType = StructureType.DESCRIPTOR_SET_BINDING_REFERENCE_VALVE; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get descriptorSetLayout() { - return this.#view.getBigUint64(16, LE); - } - set descriptorSetLayout(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get binding() { - return this.#view.getUint32(24, LE); - } - set binding(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class DescriptorSetLayoutHostMappingInfoVALVE { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DescriptorSetLayoutHostMappingInfoVALVE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutHostMappingInfoVALVE.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutHostMappingInfoVALVE.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DescriptorSetLayoutHostMappingInfoVALVE.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.descriptorOffset && (this.descriptorOffset = data.descriptorOffset), void 0 !== data.descriptorSize && (this.descriptorSize = data.descriptorSize); - this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get descriptorOffset() { - return this.#view.getBigUint64(16, LE); - } - set descriptorOffset(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get descriptorSize() { - return this.#view.getUint32(24, LE); - } - set descriptorSize(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceShaderModuleIdentifierFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderModuleIdentifier && (this.shaderModuleIdentifier = data.shaderModuleIdentifier); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderModuleIdentifier() { - return this.#view.getUint32(16, LE); - } - set shaderModuleIdentifier(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceShaderModuleIdentifierPropertiesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderModuleIdentifierAlgorithmUUID && (this.shaderModuleIdentifierAlgorithmUUID = data.shaderModuleIdentifierAlgorithmUUID); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderModuleIdentifierAlgorithmUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - set shaderModuleIdentifierAlgorithmUUID(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } -} -export class PipelineShaderStageModuleIdentifierCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineShaderStageModuleIdentifierCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineShaderStageModuleIdentifierCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineShaderStageModuleIdentifierCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineShaderStageModuleIdentifierCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.identifierSize && (this.identifierSize = data.identifierSize), void 0 !== data.pIdentifier && (this.pIdentifier = data.pIdentifier); - this.sType = StructureType.PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get identifierSize() { - return this.#view.getUint32(16, LE); - } - set identifierSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pIdentifier() { - return this.#view.getBigUint64(24, LE); - } - set pIdentifier(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ShaderModuleIdentifierEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ShaderModuleIdentifierEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderModuleIdentifierEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderModuleIdentifierEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ShaderModuleIdentifierEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.identifierSize && (this.identifierSize = data.identifierSize), void 0 !== data.identifier && (this.identifier = data.identifier); - this.sType = StructureType.SHADER_MODULE_IDENTIFIER_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get identifierSize() { - return this.#view.getUint32(16, LE); - } - set identifierSize(value) { - this.#view.setUint32(16, Number(value), LE); - } - get identifier() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 32); - } - set identifier(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } -} -export class ImageCompressionControlEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageCompressionControlEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCompressionControlEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCompressionControlEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageCompressionControlEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.compressionControlPlaneCount && (this.compressionControlPlaneCount = data.compressionControlPlaneCount), void 0 !== data.pFixedRateFlags && (this.pFixedRateFlags = data.pFixedRateFlags); - this.sType = StructureType.IMAGE_COMPRESSION_CONTROL_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get compressionControlPlaneCount() { - return this.#view.getUint32(20, LE); - } - set compressionControlPlaneCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pFixedRateFlags() { - return this.#view.getBigUint64(24, LE); - } - set pFixedRateFlags(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceImageCompressionControlFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageCompressionControlFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageCompressionControlFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageCompressionControl && (this.imageCompressionControl = data.imageCompressionControl); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageCompressionControl() { - return this.#view.getUint32(16, LE); - } - set imageCompressionControl(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImageCompressionPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageCompressionPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCompressionPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCompressionPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageCompressionPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageCompressionFlags && (this.imageCompressionFlags = data.imageCompressionFlags), void 0 !== data.imageCompressionFixedRateFlags && (this.imageCompressionFixedRateFlags = data.imageCompressionFixedRateFlags); - this.sType = StructureType.IMAGE_COMPRESSION_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageCompressionFlags() { - return this.#view.getUint32(16, LE); - } - set imageCompressionFlags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get imageCompressionFixedRateFlags() { - return this.#view.getUint32(20, LE); - } - set imageCompressionFixedRateFlags(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageCompressionControlSwapchain && (this.imageCompressionControlSwapchain = data.imageCompressionControlSwapchain); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageCompressionControlSwapchain() { - return this.#view.getUint32(16, LE); - } - set imageCompressionControlSwapchain(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ImageSubresource2EXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageSubresource2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresource2EXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSubresource2EXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageSubresource2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.imageSubresource && (this.imageSubresource = data.imageSubresource); - this.sType = StructureType.IMAGE_SUBRESOURCE_2_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get imageSubresource() { - return new ImageSubresource(this.#data.subarray(16, 16 + ImageSubresource.size)); - } - set imageSubresource(value) { - if (value[BUFFER].byteLength < ImageSubresource.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class SubresourceLayout2EXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(SubresourceLayout2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubresourceLayout2EXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < SubresourceLayout2EXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(SubresourceLayout2EXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.subresourceLayout && (this.subresourceLayout = data.subresourceLayout); - this.sType = StructureType.SUBRESOURCE_LAYOUT_2_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get subresourceLayout() { - return new SubresourceLayout(this.#data.subarray(16, 16 + SubresourceLayout.size)); - } - set subresourceLayout(value) { - if (value[BUFFER].byteLength < SubresourceLayout.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } -} -export class RenderPassCreationControlEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassCreationControlEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreationControlEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreationControlEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassCreationControlEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.disallowMerging && (this.disallowMerging = data.disallowMerging); - this.sType = StructureType.RENDER_PASS_CREATION_CONTROL_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get disallowMerging() { - return this.#view.getUint32(16, LE); - } - set disallowMerging(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class RenderPassCreationFeedbackInfoEXT { - static size = 4; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassCreationFeedbackInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreationFeedbackInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreationFeedbackInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassCreationFeedbackInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.postMergeSubpassCount && (this.postMergeSubpassCount = data.postMergeSubpassCount); - } - get postMergeSubpassCount() { - return this.#view.getUint32(0, LE); - } - set postMergeSubpassCount(value) { - this.#view.setUint32(0, Number(value), LE); - } -} -export class RenderPassCreationFeedbackCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassCreationFeedbackCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreationFeedbackCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreationFeedbackCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassCreationFeedbackCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pRenderPassFeedback && (this.pRenderPassFeedback = data.pRenderPassFeedback); - this.sType = StructureType.RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pRenderPassFeedback() { - return this.#view.getBigUint64(16, LE); - } - set pRenderPassFeedback(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class RenderPassSubpassFeedbackInfoEXT { - static size = 264; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassSubpassFeedbackInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassSubpassFeedbackInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassSubpassFeedbackInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassSubpassFeedbackInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.subpassMergeStatus && (this.subpassMergeStatus = data.subpassMergeStatus), void 0 !== data.description && (this.description = data.description), void 0 !== data.postMergeIndex && (this.postMergeIndex = data.postMergeIndex); - } - get subpassMergeStatus() { - return this.#view.getUint32(0, LE); - } - set subpassMergeStatus(value) { - this.#view.setUint32(0, Number(value), LE); - } - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 4, 256); - } - set description(value) { - this.#data.set(new Uint8Array(value.buffer), 4); - } - get postMergeIndex() { - return this.#view.getUint32(260, LE); - } - set postMergeIndex(value) { - this.#view.setUint32(260, Number(value), LE); - } -} -export class RenderPassSubpassFeedbackCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(RenderPassSubpassFeedbackCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassSubpassFeedbackCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassSubpassFeedbackCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(RenderPassSubpassFeedbackCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pSubpassFeedback && (this.pSubpassFeedback = data.pSubpassFeedback); - this.sType = StructureType.RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pSubpassFeedback() { - return this.#view.getBigUint64(16, LE); - } - set pSubpassFeedback(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceSubpassMergeFeedbackFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.subpassMergeFeedback && (this.subpassMergeFeedback = data.subpassMergeFeedback); - this.sType = StructureType.PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get subpassMergeFeedback() { - return this.#view.getUint32(16, LE); - } - set subpassMergeFeedback(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class MicromapBuildInfoEXT { - static size = 96; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MicromapBuildInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapBuildInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapBuildInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MicromapBuildInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.type && (this.type = data.type), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.mode && (this.mode = data.mode), void 0 !== data.dstMicromap && (this.dstMicromap = data.dstMicromap), void 0 !== data.usageCountsCount && (this.usageCountsCount = data.usageCountsCount), void 0 !== data.pUsageCounts && (this.pUsageCounts = data.pUsageCounts), void 0 !== data.ppUsageCounts && (this.ppUsageCounts = data.ppUsageCounts), void 0 !== data.data && (this.data = data.data), void 0 !== data.scratchData && (this.scratchData = data.scratchData), void 0 !== data.triangleArray && (this.triangleArray = data.triangleArray), void 0 !== data.triangleArrayStride && (this.triangleArrayStride = data.triangleArrayStride); - this.sType = StructureType.MICROMAP_BUILD_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get type() { - return this.#view.getUint32(16, LE); - } - set type(value) { - this.#view.setUint32(16, Number(value), LE); - } - get flags() { - return this.#view.getUint32(20, LE); - } - set flags(value) { - this.#view.setUint32(20, Number(value), LE); - } - get mode() { - return this.#view.getUint32(24, LE); - } - set mode(value) { - this.#view.setUint32(24, Number(value), LE); - } - get dstMicromap() { - return this.#view.getBigUint64(32, LE); - } - set dstMicromap(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get usageCountsCount() { - return this.#view.getUint32(40, LE); - } - set usageCountsCount(value) { - this.#view.setUint32(40, Number(value), LE); - } - get pUsageCounts() { - return this.#view.getBigUint64(48, LE); - } - set pUsageCounts(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get ppUsageCounts() { - return this.#view.getBigUint64(56, LE); - } - set ppUsageCounts(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get data() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set data(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get scratchData() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set scratchData(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get triangleArray() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set triangleArray(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get triangleArrayStride() { - return this.#view.getBigUint64(88, LE); - } - set triangleArrayStride(value) { - this.#view.setBigUint64(88, BigInt(value), LE); - } -} -export class MicromapCreateInfoEXT { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MicromapCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MicromapCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.createFlags && (this.createFlags = data.createFlags), void 0 !== data.buffer && (this.buffer = data.buffer), void 0 !== data.offset && (this.offset = data.offset), void 0 !== data.size && (this.size = data.size), void 0 !== data.type && (this.type = data.type), void 0 !== data.deviceAddress && (this.deviceAddress = data.deviceAddress); - this.sType = StructureType.MICROMAP_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get createFlags() { - return this.#view.getUint32(16, LE); - } - set createFlags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get buffer() { - return this.#view.getBigUint64(24, LE); - } - set buffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get offset() { - return this.#view.getBigUint64(32, LE); - } - set offset(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(40, LE); - } - set size(value) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - get type() { - return this.#view.getUint32(48, LE); - } - set type(value) { - this.#view.setUint32(48, Number(value), LE); - } - get deviceAddress() { - return this.#view.getBigUint64(56, LE); - } - set deviceAddress(value) { - this.#view.setBigUint64(56, BigInt(value), LE); - } -} -export class MicromapVersionInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MicromapVersionInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapVersionInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapVersionInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MicromapVersionInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pVersionData && (this.pVersionData = data.pVersionData); - this.sType = StructureType.MICROMAP_VERSION_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pVersionData() { - return this.#view.getBigUint64(16, LE); - } - set pVersionData(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class CopyMicromapInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyMicromapInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMicromapInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMicromapInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyMicromapInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.src && (this.src = data.src), void 0 !== data.dst && (this.dst = data.dst), void 0 !== data.mode && (this.mode = data.mode); - this.sType = StructureType.COPY_MICROMAP_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get src() { - return this.#view.getBigUint64(16, LE); - } - set src(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dst() { - return this.#view.getBigUint64(24, LE); - } - set dst(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get mode() { - return this.#view.getUint32(32, LE); - } - set mode(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class CopyMicromapToMemoryInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyMicromapToMemoryInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMicromapToMemoryInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMicromapToMemoryInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyMicromapToMemoryInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.src && (this.src = data.src), void 0 !== data.dst && (this.dst = data.dst), void 0 !== data.mode && (this.mode = data.mode); - this.sType = StructureType.COPY_MICROMAP_TO_MEMORY_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get src() { - return this.#view.getBigUint64(16, LE); - } - set src(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get dst() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set dst(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get mode() { - return this.#view.getUint32(32, LE); - } - set mode(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class CopyMemoryToMicromapInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(CopyMemoryToMicromapInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryToMicromapInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMemoryToMicromapInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(CopyMemoryToMicromapInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.src && (this.src = data.src), void 0 !== data.dst && (this.dst = data.dst), void 0 !== data.mode && (this.mode = data.mode); - this.sType = StructureType.COPY_MEMORY_TO_MICROMAP_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get src() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set src(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get dst() { - return this.#view.getBigUint64(24, LE); - } - set dst(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get mode() { - return this.#view.getUint32(32, LE); - } - set mode(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class MicromapBuildSizesInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MicromapBuildSizesInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapBuildSizesInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapBuildSizesInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MicromapBuildSizesInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.micromapSize && (this.micromapSize = data.micromapSize), void 0 !== data.buildScratchSize && (this.buildScratchSize = data.buildScratchSize), void 0 !== data.discardable && (this.discardable = data.discardable); - this.sType = StructureType.MICROMAP_BUILD_SIZES_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get micromapSize() { - return this.#view.getBigUint64(16, LE); - } - set micromapSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get buildScratchSize() { - return this.#view.getBigUint64(24, LE); - } - set buildScratchSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get discardable() { - return this.#view.getUint32(32, LE); - } - set discardable(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class MicromapUsageEXT { - static size = 12; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MicromapUsageEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapUsageEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapUsageEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MicromapUsageEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.count && (this.count = data.count), void 0 !== data.subdivisionLevel && (this.subdivisionLevel = data.subdivisionLevel), void 0 !== data.format && (this.format = data.format); - } - get count() { - return this.#view.getUint32(0, LE); - } - set count(value) { - this.#view.setUint32(0, Number(value), LE); - } - get subdivisionLevel() { - return this.#view.getUint32(4, LE); - } - set subdivisionLevel(value) { - this.#view.setUint32(4, Number(value), LE); - } - get format() { - return this.#view.getUint32(8, LE); - } - set format(value) { - this.#view.setUint32(8, Number(value), LE); - } -} -export class MicromapTriangleEXT { - static size = 8; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(MicromapTriangleEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapTriangleEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapTriangleEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(MicromapTriangleEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.dataOffset && (this.dataOffset = data.dataOffset), void 0 !== data.subdivisionLevel && (this.subdivisionLevel = data.subdivisionLevel), void 0 !== data.format && (this.format = data.format); - } - get dataOffset() { - return this.#view.getUint32(0, LE); - } - set dataOffset(value) { - this.#view.setUint32(0, Number(value), LE); - } - get subdivisionLevel() { - return this.#view.getUint16(4, LE); - } - set subdivisionLevel(value) { - this.#view.setUint16(4, Number(value), LE); - } - get format() { - return this.#view.getUint16(6, LE); - } - set format(value) { - this.#view.setUint16(6, Number(value), LE); - } -} -export class PhysicalDeviceOpacityMicromapFeaturesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpacityMicromapFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceOpacityMicromapFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.micromap && (this.micromap = data.micromap), void 0 !== data.micromapCaptureReplay && (this.micromapCaptureReplay = data.micromapCaptureReplay), void 0 !== data.micromapHostCommands && (this.micromapHostCommands = data.micromapHostCommands); - this.sType = StructureType.PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get micromap() { - return this.#view.getUint32(16, LE); - } - set micromap(value) { - this.#view.setUint32(16, Number(value), LE); - } - get micromapCaptureReplay() { - return this.#view.getUint32(20, LE); - } - set micromapCaptureReplay(value) { - this.#view.setUint32(20, Number(value), LE); - } - get micromapHostCommands() { - return this.#view.getUint32(24, LE); - } - set micromapHostCommands(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceOpacityMicromapPropertiesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpacityMicromapPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceOpacityMicromapPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxOpacity2StateSubdivisionLevel && (this.maxOpacity2StateSubdivisionLevel = data.maxOpacity2StateSubdivisionLevel), void 0 !== data.maxOpacity4StateSubdivisionLevel && (this.maxOpacity4StateSubdivisionLevel = data.maxOpacity4StateSubdivisionLevel); - this.sType = StructureType.PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxOpacity2StateSubdivisionLevel() { - return this.#view.getUint32(16, LE); - } - set maxOpacity2StateSubdivisionLevel(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxOpacity4StateSubdivisionLevel() { - return this.#view.getUint32(20, LE); - } - set maxOpacity4StateSubdivisionLevel(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class AccelerationStructureTrianglesOpacityMicromapEXT { - static size = 72; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AccelerationStructureTrianglesOpacityMicromapEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureTrianglesOpacityMicromapEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureTrianglesOpacityMicromapEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AccelerationStructureTrianglesOpacityMicromapEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.indexType && (this.indexType = data.indexType), void 0 !== data.indexBuffer && (this.indexBuffer = data.indexBuffer), void 0 !== data.indexStride && (this.indexStride = data.indexStride), void 0 !== data.baseTriangle && (this.baseTriangle = data.baseTriangle), void 0 !== data.usageCountsCount && (this.usageCountsCount = data.usageCountsCount), void 0 !== data.pUsageCounts && (this.pUsageCounts = data.pUsageCounts), void 0 !== data.ppUsageCounts && (this.ppUsageCounts = data.ppUsageCounts), void 0 !== data.micromap && (this.micromap = data.micromap); - this.sType = StructureType.ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get indexType() { - return this.#view.getUint32(16, LE); - } - set indexType(value) { - this.#view.setUint32(16, Number(value), LE); - } - get indexBuffer() { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - set indexBuffer(value) { - throw new Error('Unknown type: {"union":["u64","buffer"]}'); - } - get indexStride() { - return this.#view.getBigUint64(32, LE); - } - set indexStride(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get baseTriangle() { - return this.#view.getUint32(40, LE); - } - set baseTriangle(value) { - this.#view.setUint32(40, Number(value), LE); - } - get usageCountsCount() { - return this.#view.getUint32(44, LE); - } - set usageCountsCount(value) { - this.#view.setUint32(44, Number(value), LE); - } - get pUsageCounts() { - return this.#view.getBigUint64(48, LE); - } - set pUsageCounts(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - get ppUsageCounts() { - return this.#view.getBigUint64(56, LE); - } - set ppUsageCounts(value) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - get micromap() { - return this.#view.getBigUint64(64, LE); - } - set micromap(value) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} -export class PipelinePropertiesIdentifierEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelinePropertiesIdentifierEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelinePropertiesIdentifierEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelinePropertiesIdentifierEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelinePropertiesIdentifierEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipelineIdentifier && (this.pipelineIdentifier = data.pipelineIdentifier); - this.sType = StructureType.PIPELINE_PROPERTIES_IDENTIFIER_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipelineIdentifier() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - set pipelineIdentifier(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } -} -export class PhysicalDevicePipelinePropertiesFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePipelinePropertiesFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelinePropertiesFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelinePropertiesFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePipelinePropertiesFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipelinePropertiesIdentifier && (this.pipelinePropertiesIdentifier = data.pipelinePropertiesIdentifier); - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipelinePropertiesIdentifier() { - return this.#view.getUint32(16, LE); - } - set pipelinePropertiesIdentifier(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderEarlyAndLateFragmentTests && (this.shaderEarlyAndLateFragmentTests = data.shaderEarlyAndLateFragmentTests); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderEarlyAndLateFragmentTests() { - return this.#view.getUint32(16, LE); - } - set shaderEarlyAndLateFragmentTests(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ExportMetalObjectCreateInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMetalObjectCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalObjectCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalObjectCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMetalObjectCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.exportObjectType && (this.exportObjectType = data.exportObjectType); - this.sType = StructureType.EXPORT_METAL_OBJECT_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get exportObjectType() { - return this.#view.getUint32(16, LE); - } - set exportObjectType(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ExportMetalObjectsInfoEXT { - static size = 16; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMetalObjectsInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalObjectsInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalObjectsInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMetalObjectsInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext); - this.sType = StructureType.EXPORT_METAL_OBJECTS_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} -export class ExportMetalDeviceInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMetalDeviceInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalDeviceInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalDeviceInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMetalDeviceInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.mtlDevice && (this.mtlDevice = data.mtlDevice); - this.sType = StructureType.EXPORT_METAL_DEVICE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get mtlDevice() { - return this.#view.getBigUint64(16, LE); - } - set mtlDevice(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class ExportMetalCommandQueueInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMetalCommandQueueInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalCommandQueueInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalCommandQueueInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMetalCommandQueueInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.queue && (this.queue = data.queue), void 0 !== data.mtlCommandQueue && (this.mtlCommandQueue = data.mtlCommandQueue); - this.sType = StructureType.EXPORT_METAL_COMMAND_QUEUE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get queue() { - return this.#view.getBigUint64(16, LE); - } - set queue(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get mtlCommandQueue() { - return this.#view.getBigUint64(24, LE); - } - set mtlCommandQueue(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ExportMetalBufferInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMetalBufferInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalBufferInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalBufferInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMetalBufferInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.memory && (this.memory = data.memory), void 0 !== data.mtlBuffer && (this.mtlBuffer = data.mtlBuffer); - this.sType = StructureType.EXPORT_METAL_BUFFER_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get memory() { - return this.#view.getBigUint64(16, LE); - } - set memory(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get mtlBuffer() { - return this.#view.getBigUint64(24, LE); - } - set mtlBuffer(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ImportMetalBufferInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMetalBufferInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalBufferInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMetalBufferInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMetalBufferInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.mtlBuffer && (this.mtlBuffer = data.mtlBuffer); - this.sType = StructureType.IMPORT_METAL_BUFFER_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get mtlBuffer() { - return this.#view.getBigUint64(16, LE); - } - set mtlBuffer(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class ExportMetalTextureInfoEXT { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMetalTextureInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalTextureInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalTextureInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMetalTextureInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.image && (this.image = data.image), void 0 !== data.imageView && (this.imageView = data.imageView), void 0 !== data.bufferView && (this.bufferView = data.bufferView), void 0 !== data.plane && (this.plane = data.plane), void 0 !== data.mtlTexture && (this.mtlTexture = data.mtlTexture); - this.sType = StructureType.EXPORT_METAL_TEXTURE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get image() { - return this.#view.getBigUint64(16, LE); - } - set image(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get imageView() { - return this.#view.getBigUint64(24, LE); - } - set imageView(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get bufferView() { - return this.#view.getBigUint64(32, LE); - } - set bufferView(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - get plane() { - return this.#view.getUint32(40, LE); - } - set plane(value) { - this.#view.setUint32(40, Number(value), LE); - } - get mtlTexture() { - return this.#view.getBigUint64(48, LE); - } - set mtlTexture(value) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} -export class ImportMetalTextureInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMetalTextureInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalTextureInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMetalTextureInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMetalTextureInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.plane && (this.plane = data.plane), void 0 !== data.mtlTexture && (this.mtlTexture = data.mtlTexture); - this.sType = StructureType.IMPORT_METAL_TEXTURE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get plane() { - return this.#view.getUint32(16, LE); - } - set plane(value) { - this.#view.setUint32(16, Number(value), LE); - } - get mtlTexture() { - return this.#view.getBigUint64(24, LE); - } - set mtlTexture(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ExportMetalIOSurfaceInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMetalIOSurfaceInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalIOSurfaceInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalIOSurfaceInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMetalIOSurfaceInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.image && (this.image = data.image), void 0 !== data.ioSurface && (this.ioSurface = data.ioSurface); - this.sType = StructureType.EXPORT_METAL_IO_SURFACE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get image() { - return this.#view.getBigUint64(16, LE); - } - set image(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get ioSurface() { - return this.#view.getBigUint64(24, LE); - } - set ioSurface(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class ImportMetalIOSurfaceInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMetalIOSurfaceInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalIOSurfaceInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMetalIOSurfaceInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMetalIOSurfaceInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.ioSurface && (this.ioSurface = data.ioSurface); - this.sType = StructureType.IMPORT_METAL_IO_SURFACE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get ioSurface() { - return this.#view.getBigUint64(16, LE); - } - set ioSurface(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class ExportMetalSharedEventInfoEXT { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ExportMetalSharedEventInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalSharedEventInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalSharedEventInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ExportMetalSharedEventInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.semaphore && (this.semaphore = data.semaphore), void 0 !== data.event && (this.event = data.event), void 0 !== data.mtlSharedEvent && (this.mtlSharedEvent = data.mtlSharedEvent); - this.sType = StructureType.EXPORT_METAL_SHARED_EVENT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - set semaphore(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - get event() { - return this.#view.getBigUint64(24, LE); - } - set event(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - get mtlSharedEvent() { - return this.#view.getBigUint64(32, LE); - } - set mtlSharedEvent(value) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} -export class ImportMetalSharedEventInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImportMetalSharedEventInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalSharedEventInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMetalSharedEventInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImportMetalSharedEventInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.mtlSharedEvent && (this.mtlSharedEvent = data.mtlSharedEvent); - this.sType = StructureType.IMPORT_METAL_SHARED_EVENT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get mtlSharedEvent() { - return this.#view.getBigUint64(16, LE); - } - set mtlSharedEvent(value) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceNonSeamlessCubeMapFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.nonSeamlessCubeMap && (this.nonSeamlessCubeMap = data.nonSeamlessCubeMap); - this.sType = StructureType.PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get nonSeamlessCubeMap() { - return this.#view.getUint32(16, LE); - } - set nonSeamlessCubeMap(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDevicePipelineRobustnessFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineRobustnessFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineRobustnessFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.pipelineRobustness && (this.pipelineRobustness = data.pipelineRobustness); - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get pipelineRobustness() { - return this.#view.getUint32(16, LE); - } - set pipelineRobustness(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PipelineRobustnessCreateInfoEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PipelineRobustnessCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRobustnessCreateInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRobustnessCreateInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PipelineRobustnessCreateInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.storageBuffers && (this.storageBuffers = data.storageBuffers), void 0 !== data.uniformBuffers && (this.uniformBuffers = data.uniformBuffers), void 0 !== data.vertexInputs && (this.vertexInputs = data.vertexInputs), void 0 !== data.images && (this.images = data.images); - this.sType = StructureType.PIPELINE_ROBUSTNESS_CREATE_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get storageBuffers() { - return this.#view.getUint32(16, LE); - } - set storageBuffers(value) { - this.#view.setUint32(16, Number(value), LE); - } - get uniformBuffers() { - return this.#view.getUint32(20, LE); - } - set uniformBuffers(value) { - this.#view.setUint32(20, Number(value), LE); - } - get vertexInputs() { - return this.#view.getUint32(24, LE); - } - set vertexInputs(value) { - this.#view.setUint32(24, Number(value), LE); - } - get images() { - return this.#view.getUint32(28, LE); - } - set images(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDevicePipelineRobustnessPropertiesEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineRobustnessPropertiesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineRobustnessPropertiesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessPropertiesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.defaultRobustnessStorageBuffers && (this.defaultRobustnessStorageBuffers = data.defaultRobustnessStorageBuffers), void 0 !== data.defaultRobustnessUniformBuffers && (this.defaultRobustnessUniformBuffers = data.defaultRobustnessUniformBuffers), void 0 !== data.defaultRobustnessVertexInputs && (this.defaultRobustnessVertexInputs = data.defaultRobustnessVertexInputs), void 0 !== data.defaultRobustnessImages && (this.defaultRobustnessImages = data.defaultRobustnessImages); - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get defaultRobustnessStorageBuffers() { - return this.#view.getUint32(16, LE); - } - set defaultRobustnessStorageBuffers(value) { - this.#view.setUint32(16, Number(value), LE); - } - get defaultRobustnessUniformBuffers() { - return this.#view.getUint32(20, LE); - } - set defaultRobustnessUniformBuffers(value) { - this.#view.setUint32(20, Number(value), LE); - } - get defaultRobustnessVertexInputs() { - return this.#view.getUint32(24, LE); - } - set defaultRobustnessVertexInputs(value) { - this.#view.setUint32(24, Number(value), LE); - } - get defaultRobustnessImages() { - return this.#view.getUint32(28, LE); - } - set defaultRobustnessImages(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class ImageViewSampleWeightCreateInfoQCOM { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(ImageViewSampleWeightCreateInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewSampleWeightCreateInfoQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewSampleWeightCreateInfoQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(ImageViewSampleWeightCreateInfoQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.filterCenter && (this.filterCenter = data.filterCenter), void 0 !== data.filterSize && (this.filterSize = data.filterSize), void 0 !== data.numPhases && (this.numPhases = data.numPhases); - this.sType = StructureType.IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get filterCenter() { - return new Offset2D(this.#data.subarray(16, 16 + Offset2D.size)); - } - set filterCenter(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get filterSize() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - set filterSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 24); - } - get numPhases() { - return this.#view.getUint32(32, LE); - } - set numPhases(value) { - this.#view.setUint32(32, Number(value), LE); - } -} -export class PhysicalDeviceImageProcessingFeaturesQCOM { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImageProcessingFeaturesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageProcessingFeaturesQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageProcessingFeaturesQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImageProcessingFeaturesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.textureSampleWeighted && (this.textureSampleWeighted = data.textureSampleWeighted), void 0 !== data.textureBoxFilter && (this.textureBoxFilter = data.textureBoxFilter), void 0 !== data.textureBlockMatch && (this.textureBlockMatch = data.textureBlockMatch); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get textureSampleWeighted() { - return this.#view.getUint32(16, LE); - } - set textureSampleWeighted(value) { - this.#view.setUint32(16, Number(value), LE); - } - get textureBoxFilter() { - return this.#view.getUint32(20, LE); - } - set textureBoxFilter(value) { - this.#view.setUint32(20, Number(value), LE); - } - get textureBlockMatch() { - return this.#view.getUint32(24, LE); - } - set textureBlockMatch(value) { - this.#view.setUint32(24, Number(value), LE); - } -} -export class PhysicalDeviceImageProcessingPropertiesQCOM { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceImageProcessingPropertiesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageProcessingPropertiesQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageProcessingPropertiesQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceImageProcessingPropertiesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.maxWeightFilterPhases && (this.maxWeightFilterPhases = data.maxWeightFilterPhases), void 0 !== data.maxWeightFilterDimension && (this.maxWeightFilterDimension = data.maxWeightFilterDimension), void 0 !== data.maxBlockMatchRegion && (this.maxBlockMatchRegion = data.maxBlockMatchRegion), void 0 !== data.maxBoxFilterBlockSize && (this.maxBoxFilterBlockSize = data.maxBoxFilterBlockSize); - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get maxWeightFilterPhases() { - return this.#view.getUint32(16, LE); - } - set maxWeightFilterPhases(value) { - this.#view.setUint32(16, Number(value), LE); - } - get maxWeightFilterDimension() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - set maxWeightFilterDimension(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 20); - } - get maxBlockMatchRegion() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - set maxBlockMatchRegion(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 28); - } - get maxBoxFilterBlockSize() { - return new Extent2D(this.#data.subarray(36, 36 + Extent2D.size)); - } - set maxBoxFilterBlockSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 36); - } -} -export class PhysicalDeviceTilePropertiesFeaturesQCOM { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceTilePropertiesFeaturesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTilePropertiesFeaturesQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTilePropertiesFeaturesQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceTilePropertiesFeaturesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.tileProperties && (this.tileProperties = data.tileProperties); - this.sType = StructureType.PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get tileProperties() { - return this.#view.getUint32(16, LE); - } - set tileProperties(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class TilePropertiesQCOM { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(TilePropertiesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TilePropertiesQCOM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < TilePropertiesQCOM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(TilePropertiesQCOM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.tileSize && (this.tileSize = data.tileSize), void 0 !== data.apronSize && (this.apronSize = data.apronSize), void 0 !== data.origin && (this.origin = data.origin); - this.sType = StructureType.TILE_PROPERTIES_QCOM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get tileSize() { - return new Extent3D(this.#data.subarray(16, 16 + Extent3D.size)); - } - set tileSize(value) { - if (value[BUFFER].byteLength < Extent3D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 16); - } - get apronSize() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - set apronSize(value) { - if (value[BUFFER].byteLength < Extent2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 28); - } - get origin() { - return new Offset2D(this.#data.subarray(36, 36 + Offset2D.size)); - } - set origin(value) { - if (value[BUFFER].byteLength < Offset2D.size) throw new Error("Data buffer too small"); - this.#data.set(value[BUFFER], 36); - } -} -export class PhysicalDeviceAmigoProfilingFeaturesSEC { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceAmigoProfilingFeaturesSEC.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAmigoProfilingFeaturesSEC.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAmigoProfilingFeaturesSEC.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceAmigoProfilingFeaturesSEC.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.amigoProfiling && (this.amigoProfiling = data.amigoProfiling); - this.sType = StructureType.PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get amigoProfiling() { - return this.#view.getUint32(16, LE); - } - set amigoProfiling(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class AmigoProfilingSubmitInfoSEC { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(AmigoProfilingSubmitInfoSEC.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AmigoProfilingSubmitInfoSEC.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < AmigoProfilingSubmitInfoSEC.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(AmigoProfilingSubmitInfoSEC.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.firstDrawTimestamp && (this.firstDrawTimestamp = data.firstDrawTimestamp), void 0 !== data.swapBufferTimestamp && (this.swapBufferTimestamp = data.swapBufferTimestamp); - this.sType = StructureType.AMIGO_PROFILING_SUBMIT_INFO_SEC; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get firstDrawTimestamp() { - return this.#view.getBigUint64(16, LE); - } - set firstDrawTimestamp(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get swapBufferTimestamp() { - return this.#view.getBigUint64(24, LE); - } - set swapBufferTimestamp(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.attachmentFeedbackLoopLayout && (this.attachmentFeedbackLoopLayout = data.attachmentFeedbackLoopLayout); - this.sType = StructureType.PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get attachmentFeedbackLoopLayout() { - return this.#view.getUint32(16, LE); - } - set attachmentFeedbackLoopLayout(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceDepthClampZeroOneFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceDepthClampZeroOneFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthClampZeroOneFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDepthClampZeroOneFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceDepthClampZeroOneFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.depthClampZeroOne && (this.depthClampZeroOne = data.depthClampZeroOne); - this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get depthClampZeroOne() { - return this.#view.getUint32(16, LE); - } - set depthClampZeroOne(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceAddressBindingReportFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceAddressBindingReportFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAddressBindingReportFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAddressBindingReportFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceAddressBindingReportFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.reportAddressBinding && (this.reportAddressBinding = data.reportAddressBinding); - this.sType = StructureType.PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get reportAddressBinding() { - return this.#view.getUint32(16, LE); - } - set reportAddressBinding(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class DeviceAddressBindingCallbackDataEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceAddressBindingCallbackDataEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceAddressBindingCallbackDataEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceAddressBindingCallbackDataEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceAddressBindingCallbackDataEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.baseAddress && (this.baseAddress = data.baseAddress), void 0 !== data.size && (this.size = data.size), void 0 !== data.bindingType && (this.bindingType = data.bindingType); - this.sType = StructureType.DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get baseAddress() { - return this.#view.getBigUint64(24, LE); - } - set baseAddress(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get size() { - return this.#view.getBigUint64(32, LE); - } - set size(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - get bindingType() { - return this.#view.getUint32(40, LE); - } - set bindingType(value) { - this.#view.setUint32(40, Number(value), LE); - } -} -export class PhysicalDeviceOpticalFlowFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceOpticalFlowFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpticalFlowFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceOpticalFlowFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceOpticalFlowFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.opticalFlow && (this.opticalFlow = data.opticalFlow); - this.sType = StructureType.PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get opticalFlow() { - return this.#view.getUint32(16, LE); - } - set opticalFlow(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceOpticalFlowPropertiesNV { - static size = 64; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceOpticalFlowPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpticalFlowPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceOpticalFlowPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceOpticalFlowPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.supportedOutputGridSizes && (this.supportedOutputGridSizes = data.supportedOutputGridSizes), void 0 !== data.supportedHintGridSizes && (this.supportedHintGridSizes = data.supportedHintGridSizes), void 0 !== data.hintSupported && (this.hintSupported = data.hintSupported), void 0 !== data.costSupported && (this.costSupported = data.costSupported), void 0 !== data.bidirectionalFlowSupported && (this.bidirectionalFlowSupported = data.bidirectionalFlowSupported), void 0 !== data.globalFlowSupported && (this.globalFlowSupported = data.globalFlowSupported), void 0 !== data.minWidth && (this.minWidth = data.minWidth), void 0 !== data.minHeight && (this.minHeight = data.minHeight), void 0 !== data.maxWidth && (this.maxWidth = data.maxWidth), void 0 !== data.maxHeight && (this.maxHeight = data.maxHeight), void 0 !== data.maxNumRegionsOfInterest && (this.maxNumRegionsOfInterest = data.maxNumRegionsOfInterest); - this.sType = StructureType.PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get supportedOutputGridSizes() { - return this.#view.getUint32(16, LE); - } - set supportedOutputGridSizes(value) { - this.#view.setUint32(16, Number(value), LE); - } - get supportedHintGridSizes() { - return this.#view.getUint32(20, LE); - } - set supportedHintGridSizes(value) { - this.#view.setUint32(20, Number(value), LE); - } - get hintSupported() { - return this.#view.getUint32(24, LE); - } - set hintSupported(value) { - this.#view.setUint32(24, Number(value), LE); - } - get costSupported() { - return this.#view.getUint32(28, LE); - } - set costSupported(value) { - this.#view.setUint32(28, Number(value), LE); - } - get bidirectionalFlowSupported() { - return this.#view.getUint32(32, LE); - } - set bidirectionalFlowSupported(value) { - this.#view.setUint32(32, Number(value), LE); - } - get globalFlowSupported() { - return this.#view.getUint32(36, LE); - } - set globalFlowSupported(value) { - this.#view.setUint32(36, Number(value), LE); - } - get minWidth() { - return this.#view.getUint32(40, LE); - } - set minWidth(value) { - this.#view.setUint32(40, Number(value), LE); - } - get minHeight() { - return this.#view.getUint32(44, LE); - } - set minHeight(value) { - this.#view.setUint32(44, Number(value), LE); - } - get maxWidth() { - return this.#view.getUint32(48, LE); - } - set maxWidth(value) { - this.#view.setUint32(48, Number(value), LE); - } - get maxHeight() { - return this.#view.getUint32(52, LE); - } - set maxHeight(value) { - this.#view.setUint32(52, Number(value), LE); - } - get maxNumRegionsOfInterest() { - return this.#view.getUint32(56, LE); - } - set maxNumRegionsOfInterest(value) { - this.#view.setUint32(56, Number(value), LE); - } -} -export class OpticalFlowImageFormatInfoNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(OpticalFlowImageFormatInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowImageFormatInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowImageFormatInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(OpticalFlowImageFormatInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.usage && (this.usage = data.usage); - this.sType = StructureType.OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get usage() { - return this.#view.getUint32(16, LE); - } - set usage(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class OpticalFlowImageFormatPropertiesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(OpticalFlowImageFormatPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowImageFormatPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowImageFormatPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(OpticalFlowImageFormatPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.format && (this.format = data.format); - this.sType = StructureType.OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get format() { - return this.#view.getUint32(16, LE); - } - set format(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class OpticalFlowSessionCreateInfoNV { - static size = 56; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(OpticalFlowSessionCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowSessionCreateInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowSessionCreateInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(OpticalFlowSessionCreateInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.width && (this.width = data.width), void 0 !== data.height && (this.height = data.height), void 0 !== data.imageFormat && (this.imageFormat = data.imageFormat), void 0 !== data.flowVectorFormat && (this.flowVectorFormat = data.flowVectorFormat), void 0 !== data.costFormat && (this.costFormat = data.costFormat), void 0 !== data.outputGridSize && (this.outputGridSize = data.outputGridSize), void 0 !== data.hintGridSize && (this.hintGridSize = data.hintGridSize), void 0 !== data.performanceLevel && (this.performanceLevel = data.performanceLevel), void 0 !== data.flags && (this.flags = data.flags); - this.sType = StructureType.OPTICAL_FLOW_SESSION_CREATE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get width() { - return this.#view.getUint32(16, LE); - } - set width(value) { - this.#view.setUint32(16, Number(value), LE); - } - get height() { - return this.#view.getUint32(20, LE); - } - set height(value) { - this.#view.setUint32(20, Number(value), LE); - } - get imageFormat() { - return this.#view.getUint32(24, LE); - } - set imageFormat(value) { - this.#view.setUint32(24, Number(value), LE); - } - get flowVectorFormat() { - return this.#view.getUint32(28, LE); - } - set flowVectorFormat(value) { - this.#view.setUint32(28, Number(value), LE); - } - get costFormat() { - return this.#view.getUint32(32, LE); - } - set costFormat(value) { - this.#view.setUint32(32, Number(value), LE); - } - get outputGridSize() { - return this.#view.getUint32(36, LE); - } - set outputGridSize(value) { - this.#view.setUint32(36, Number(value), LE); - } - get hintGridSize() { - return this.#view.getUint32(40, LE); - } - set hintGridSize(value) { - this.#view.setUint32(40, Number(value), LE); - } - get performanceLevel() { - return this.#view.getUint32(44, LE); - } - set performanceLevel(value) { - this.#view.setUint32(44, Number(value), LE); - } - get flags() { - return this.#view.getUint32(48, LE); - } - set flags(value) { - this.#view.setUint32(48, Number(value), LE); - } -} -export class OpticalFlowSessionCreatePrivateDataInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(OpticalFlowSessionCreatePrivateDataInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowSessionCreatePrivateDataInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowSessionCreatePrivateDataInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(OpticalFlowSessionCreatePrivateDataInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.id && (this.id = data.id), void 0 !== data.size && (this.size = data.size), void 0 !== data.pPrivateData && (this.pPrivateData = data.pPrivateData); - this.sType = StructureType.OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get id() { - return this.#view.getUint32(16, LE); - } - set id(value) { - this.#view.setUint32(16, Number(value), LE); - } - get size() { - return this.#view.getUint32(20, LE); - } - set size(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pPrivateData() { - return this.#view.getBigUint64(24, LE); - } - set pPrivateData(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class OpticalFlowExecuteInfoNV { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(OpticalFlowExecuteInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowExecuteInfoNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowExecuteInfoNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(OpticalFlowExecuteInfoNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.flags && (this.flags = data.flags), void 0 !== data.regionCount && (this.regionCount = data.regionCount), void 0 !== data.pRegions && (this.pRegions = data.pRegions); - this.sType = StructureType.OPTICAL_FLOW_EXECUTE_INFO_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get flags() { - return this.#view.getUint32(16, LE); - } - set flags(value) { - this.#view.setUint32(16, Number(value), LE); - } - get regionCount() { - return this.#view.getUint32(20, LE); - } - set regionCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get pRegions() { - return this.#view.getBigUint64(24, LE); - } - set pRegions(value) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} -export class PhysicalDeviceFaultFeaturesEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceFaultFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFaultFeaturesEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFaultFeaturesEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceFaultFeaturesEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.deviceFault && (this.deviceFault = data.deviceFault), void 0 !== data.deviceFaultVendorBinary && (this.deviceFaultVendorBinary = data.deviceFaultVendorBinary); - this.sType = StructureType.PHYSICAL_DEVICE_FAULT_FEATURES_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get deviceFault() { - return this.#view.getUint32(16, LE); - } - set deviceFault(value) { - this.#view.setUint32(16, Number(value), LE); - } - get deviceFaultVendorBinary() { - return this.#view.getUint32(20, LE); - } - set deviceFaultVendorBinary(value) { - this.#view.setUint32(20, Number(value), LE); - } -} -export class DeviceFaultAddressInfoEXT { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceFaultAddressInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultAddressInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultAddressInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceFaultAddressInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.addressType && (this.addressType = data.addressType), void 0 !== data.reportedAddress && (this.reportedAddress = data.reportedAddress), void 0 !== data.addressPrecision && (this.addressPrecision = data.addressPrecision); - } - get addressType() { - return this.#view.getUint32(0, LE); - } - set addressType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get reportedAddress() { - return this.#view.getBigUint64(8, LE); - } - set reportedAddress(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get addressPrecision() { - return this.#view.getBigUint64(16, LE); - } - set addressPrecision(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} -export class DeviceFaultVendorInfoEXT { - static size = 272; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceFaultVendorInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultVendorInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultVendorInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceFaultVendorInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.description && (this.description = data.description), void 0 !== data.vendorFaultCode && (this.vendorFaultCode = data.vendorFaultCode), void 0 !== data.vendorFaultData && (this.vendorFaultData = data.vendorFaultData); - } - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 256); - } - set description(value) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - get vendorFaultCode() { - return this.#view.getBigUint64(256, LE); - } - set vendorFaultCode(value) { - this.#view.setBigUint64(256, BigInt(value), LE); - } - get vendorFaultData() { - return this.#view.getBigUint64(264, LE); - } - set vendorFaultData(value) { - this.#view.setBigUint64(264, BigInt(value), LE); - } -} -export class DeviceFaultCountsEXT { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceFaultCountsEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultCountsEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultCountsEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceFaultCountsEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.addressInfoCount && (this.addressInfoCount = data.addressInfoCount), void 0 !== data.vendorInfoCount && (this.vendorInfoCount = data.vendorInfoCount), void 0 !== data.vendorBinarySize && (this.vendorBinarySize = data.vendorBinarySize); - this.sType = StructureType.DEVICE_FAULT_COUNTS_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get addressInfoCount() { - return this.#view.getUint32(16, LE); - } - set addressInfoCount(value) { - this.#view.setUint32(16, Number(value), LE); - } - get vendorInfoCount() { - return this.#view.getUint32(20, LE); - } - set vendorInfoCount(value) { - this.#view.setUint32(20, Number(value), LE); - } - get vendorBinarySize() { - return this.#view.getBigUint64(24, LE); - } - set vendorBinarySize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} -export class DeviceFaultInfoEXT { - static size = 296; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceFaultInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultInfoEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultInfoEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceFaultInfoEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.description && (this.description = data.description), void 0 !== data.pAddressInfos && (this.pAddressInfos = data.pAddressInfos), void 0 !== data.pVendorInfos && (this.pVendorInfos = data.pVendorInfos), void 0 !== data.pVendorBinaryData && (this.pVendorBinaryData = data.pVendorBinaryData); - this.sType = StructureType.DEVICE_FAULT_INFO_EXT; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); - } - set description(value) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - get pAddressInfos() { - return this.#view.getBigUint64(272, LE); - } - set pAddressInfos(value) { - this.#view.setBigUint64(272, BigInt(anyPointer(value)), LE); - } - get pVendorInfos() { - return this.#view.getBigUint64(280, LE); - } - set pVendorInfos(value) { - this.#view.setBigUint64(280, BigInt(anyPointer(value)), LE); - } - get pVendorBinaryData() { - return this.#view.getBigUint64(288, LE); - } - set pVendorBinaryData(value) { - this.#view.setBigUint64(288, BigInt(anyPointer(value)), LE); - } -} -export class DeviceFaultVendorBinaryHeaderVersionOneEXT { - static size = 48; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DeviceFaultVendorBinaryHeaderVersionOneEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultVendorBinaryHeaderVersionOneEXT.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultVendorBinaryHeaderVersionOneEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DeviceFaultVendorBinaryHeaderVersionOneEXT.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.headerSize && (this.headerSize = data.headerSize), void 0 !== data.headerVersion && (this.headerVersion = data.headerVersion), void 0 !== data.vendorID && (this.vendorID = data.vendorID), void 0 !== data.deviceID && (this.deviceID = data.deviceID), void 0 !== data.driverVersion && (this.driverVersion = data.driverVersion), void 0 !== data.pipelineCacheUUID && (this.pipelineCacheUUID = data.pipelineCacheUUID), void 0 !== data.applicationNameOffset && (this.applicationNameOffset = data.applicationNameOffset), void 0 !== data.applicationVersion && (this.applicationVersion = data.applicationVersion), void 0 !== data.engineNameOffset && (this.engineNameOffset = data.engineNameOffset); - } - get headerSize() { - return this.#view.getUint32(0, LE); - } - set headerSize(value) { - this.#view.setUint32(0, Number(value), LE); - } - get headerVersion() { - return this.#view.getUint32(4, LE); - } - set headerVersion(value) { - this.#view.setUint32(4, Number(value), LE); - } - get vendorID() { - return this.#view.getUint32(8, LE); - } - set vendorID(value) { - this.#view.setUint32(8, Number(value), LE); - } - get deviceID() { - return this.#view.getUint32(12, LE); - } - set deviceID(value) { - this.#view.setUint32(12, Number(value), LE); - } - get driverVersion() { - return this.#view.getUint32(16, LE); - } - set driverVersion(value) { - this.#view.setUint32(16, Number(value), LE); - } - get pipelineCacheUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 16); - } - set pipelineCacheUUID(value) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - get applicationNameOffset() { - return this.#view.getUint32(36, LE); - } - set applicationNameOffset(value) { - this.#view.setUint32(36, Number(value), LE); - } - get applicationVersion() { - return this.#view.getUint32(40, LE); - } - set applicationVersion(value) { - this.#view.setUint32(40, Number(value), LE); - } - get engineNameOffset() { - return this.#view.getUint32(44, LE); - } - set engineNameOffset(value) { - this.#view.setUint32(44, Number(value), LE); - } -} -export class DecompressMemoryRegionNV { - static size = 40; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(DecompressMemoryRegionNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DecompressMemoryRegionNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < DecompressMemoryRegionNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(DecompressMemoryRegionNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.srcAddress && (this.srcAddress = data.srcAddress), void 0 !== data.dstAddress && (this.dstAddress = data.dstAddress), void 0 !== data.compressedSize && (this.compressedSize = data.compressedSize), void 0 !== data.decompressedSize && (this.decompressedSize = data.decompressedSize), void 0 !== data.decompressionMethod && (this.decompressionMethod = data.decompressionMethod); - } - get srcAddress() { - return this.#view.getBigUint64(0, LE); - } - set srcAddress(value) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - get dstAddress() { - return this.#view.getBigUint64(8, LE); - } - set dstAddress(value) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - get compressedSize() { - return this.#view.getBigUint64(16, LE); - } - set compressedSize(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get decompressedSize() { - return this.#view.getBigUint64(24, LE); - } - set decompressedSize(value) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - get decompressionMethod() { - return this.#view.getBigUint64(32, LE); - } - set decompressionMethod(value) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} -export class PhysicalDeviceShaderCoreBuiltinsPropertiesARM { - static size = 32; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderCoreMask && (this.shaderCoreMask = data.shaderCoreMask), void 0 !== data.shaderCoreCount && (this.shaderCoreCount = data.shaderCoreCount), void 0 !== data.shaderWarpsPerCore && (this.shaderWarpsPerCore = data.shaderWarpsPerCore); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderCoreMask() { - return this.#view.getBigUint64(16, LE); - } - set shaderCoreMask(value) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - get shaderCoreCount() { - return this.#view.getUint32(24, LE); - } - set shaderCoreCount(value) { - this.#view.setUint32(24, Number(value), LE); - } - get shaderWarpsPerCore() { - return this.#view.getUint32(28, LE); - } - set shaderWarpsPerCore(value) { - this.#view.setUint32(28, Number(value), LE); - } -} -export class PhysicalDeviceShaderCoreBuiltinsFeaturesARM { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.shaderCoreBuiltins && (this.shaderCoreBuiltins = data.shaderCoreBuiltins); - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get shaderCoreBuiltins() { - return this.#view.getUint32(16, LE); - } - set shaderCoreBuiltins(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceRayTracingInvocationReorderFeaturesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.rayTracingInvocationReorder && (this.rayTracingInvocationReorder = data.rayTracingInvocationReorder); - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get rayTracingInvocationReorder() { - return this.#view.getUint32(16, LE); - } - set rayTracingInvocationReorder(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class PhysicalDeviceRayTracingInvocationReorderPropertiesNV { - static size = 24; - #data; - #view; - get [BUFFER]() { - return this.#data; - } - get [DATAVIEW]() { - return this.#view; - } - constructor(data){ - if (void 0 === data) this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if ("number" == typeof data || "bigint" == typeof data) this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size)), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer, data.byteOffset); - } else this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size), this.#view = new DataView(this.#data.buffer, this.#data.byteOffset), void 0 !== data.pNext && (this.pNext = data.pNext), void 0 !== data.rayTracingInvocationReorderReorderingHint && (this.rayTracingInvocationReorderReorderingHint = data.rayTracingInvocationReorderReorderingHint); - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV; - } - get sType() { - return this.#view.getUint32(0, LE); - } - set sType(value) { - this.#view.setUint32(0, Number(value), LE); - } - get pNext() { - return this.#view.getBigUint64(8, LE); - } - set pNext(value) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - get rayTracingInvocationReorderReorderingHint() { - return this.#view.getUint32(16, LE); - } - set rayTracingInvocationReorderReorderingHint(value) { - this.#view.setUint32(16, Number(value), LE); - } -} -export class ClearColorValue { - static size = 4; - #data; - #view; - constructor(data){ - if (data.byteLength < ClearColorValue.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -export class ClearValue { - static size = 8; - #data; - #view; - constructor(data){ - if (data.byteLength < ClearValue.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -export class PerformanceCounterResultKHR { - static size = 8; - #data; - #view; - constructor(data){ - if (data.byteLength < PerformanceCounterResultKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -export class PerformanceValueDataINTEL { - static size = 8; - #data; - #view; - constructor(data){ - if (data.byteLength < PerformanceValueDataINTEL.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -export class PipelineExecutableStatisticValueKHR { - static size = 8; - #data; - #view; - constructor(data){ - if (data.byteLength < PipelineExecutableStatisticValueKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -export class DeviceOrHostAddressKHR { - static size = 8; - #data; - #view; - constructor(data){ - if (data.byteLength < DeviceOrHostAddressKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -export class DeviceOrHostAddressConstKHR { - static size = 8; - #data; - #view; - constructor(data){ - if (data.byteLength < DeviceOrHostAddressConstKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -export class AccelerationStructureGeometryDataKHR { - static size = 64; - #data; - #view; - constructor(data){ - if (data.byteLength < AccelerationStructureGeometryDataKHR.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -export class DescriptorDataEXT { - static size = 8; - #data; - #view; - constructor(data){ - if (data.byteLength < DescriptorDataEXT.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -export class AccelerationStructureMotionInstanceDataNV { - static size = 152; - #data; - #view; - constructor(data){ - if (data.byteLength < AccelerationStructureMotionInstanceDataNV.size) throw new Error("Data buffer too small"); - this.#data = data, this.#view = new DataView(data.buffer); - } -} -let lib = Deno.dlopen("windows" === Deno.build.os ? "vulkan-1" : "darwin" === Deno.build.os ? "libvulkan.dylib.1" : "libvulkan.so.1", { - vkCreateInstance: { - parameters: [ - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyInstance: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkEnumeratePhysicalDevices: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkGetDeviceProcAddr: { - parameters: [ - "pointer", - "buffer" - ], - result: "function" - }, - vkGetInstanceProcAddr: { - parameters: [ - "pointer", - "buffer" - ], - result: "function" - }, - vkGetPhysicalDeviceProperties: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceQueueFamilyProperties: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceMemoryProperties: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceFeatures: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceFormatProperties: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceImageFormatProperties: { - parameters: [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "u32", - "buffer" - ], - result: "u32" - }, - vkCreateDevice: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyDevice: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkEnumerateInstanceVersion: { - parameters: [ - "buffer" - ], - result: "u32" - }, - vkEnumerateInstanceLayerProperties: { - parameters: [ - "buffer", - "buffer" - ], - result: "u32" - }, - vkEnumerateInstanceExtensionProperties: { - parameters: [ - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkEnumerateDeviceLayerProperties: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkEnumerateDeviceExtensionProperties: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkGetDeviceQueue: { - parameters: [ - "pointer", - "u32", - "u32", - "buffer" - ], - result: "void" - }, - vkQueueSubmit: { - parameters: [ - "pointer", - "u32", - "buffer", - "pointer" - ], - result: "u32" - }, - vkQueueWaitIdle: { - parameters: [ - "pointer" - ], - result: "u32" - }, - vkDeviceWaitIdle: { - parameters: [ - "pointer" - ], - result: "u32" - }, - vkAllocateMemory: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkFreeMemory: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkMapMemory: { - parameters: [ - "pointer", - "pointer", - "u64", - "u64", - "u32", - "buffer" - ], - result: "u32" - }, - vkUnmapMemory: { - parameters: [ - "pointer", - "pointer" - ], - result: "void" - }, - vkFlushMappedMemoryRanges: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "u32" - }, - vkInvalidateMappedMemoryRanges: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "u32" - }, - vkGetDeviceMemoryCommitment: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetBufferMemoryRequirements: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkBindBufferMemory: { - parameters: [ - "pointer", - "pointer", - "pointer", - "u64" - ], - result: "u32" - }, - vkGetImageMemoryRequirements: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkBindImageMemory: { - parameters: [ - "pointer", - "pointer", - "pointer", - "u64" - ], - result: "u32" - }, - vkGetImageSparseMemoryRequirements: { - parameters: [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceSparseImageFormatProperties: { - parameters: [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "u32", - "buffer", - "buffer" - ], - result: "void" - }, - vkQueueBindSparse: { - parameters: [ - "pointer", - "u32", - "buffer", - "pointer" - ], - result: "u32" - }, - vkCreateFence: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyFence: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkResetFences: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "u32" - }, - vkGetFenceStatus: { - parameters: [ - "pointer", - "pointer" - ], - result: "u32" - }, - vkWaitForFences: { - parameters: [ - "pointer", - "u32", - "buffer", - "u32", - "u64" - ], - result: "u32" - }, - vkCreateSemaphore: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroySemaphore: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreateEvent: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyEvent: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetEventStatus: { - parameters: [ - "pointer", - "pointer" - ], - result: "u32" - }, - vkSetEvent: { - parameters: [ - "pointer", - "pointer" - ], - result: "u32" - }, - vkResetEvent: { - parameters: [ - "pointer", - "pointer" - ], - result: "u32" - }, - vkCreateQueryPool: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyQueryPool: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetQueryPoolResults: { - parameters: [ - "pointer", - "pointer", - "u32", - "u32", - "usize", - "buffer", - "u64", - "u32" - ], - result: "u32" - }, - vkResetQueryPool: { - parameters: [ - "pointer", - "pointer", - "u32", - "u32" - ], - result: "void" - }, - vkCreateBuffer: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyBuffer: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreateBufferView: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyBufferView: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreateImage: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyImage: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetImageSubresourceLayout: { - parameters: [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkCreateImageView: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyImageView: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreateShaderModule: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyShaderModule: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreatePipelineCache: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyPipelineCache: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetPipelineCacheData: { - parameters: [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkMergePipelineCaches: { - parameters: [ - "pointer", - "pointer", - "u32", - "buffer" - ], - result: "u32" - }, - vkCreateGraphicsPipelines: { - parameters: [ - "pointer", - "pointer", - "u32", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkCreateComputePipelines: { - parameters: [ - "pointer", - "pointer", - "u32", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyPipeline: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreatePipelineLayout: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyPipelineLayout: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreateSampler: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroySampler: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreateDescriptorSetLayout: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyDescriptorSetLayout: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreateDescriptorPool: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyDescriptorPool: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkResetDescriptorPool: { - parameters: [ - "pointer", - "pointer", - "u32" - ], - result: "u32" - }, - vkAllocateDescriptorSets: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkFreeDescriptorSets: { - parameters: [ - "pointer", - "pointer", - "u32", - "buffer" - ], - result: "u32" - }, - vkUpdateDescriptorSets: { - parameters: [ - "pointer", - "u32", - "buffer", - "u32", - "buffer" - ], - result: "void" - }, - vkCreateFramebuffer: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyFramebuffer: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreateRenderPass: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyRenderPass: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetRenderAreaGranularity: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCreateCommandPool: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyCommandPool: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkResetCommandPool: { - parameters: [ - "pointer", - "pointer", - "u32" - ], - result: "u32" - }, - vkAllocateCommandBuffers: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkFreeCommandBuffers: { - parameters: [ - "pointer", - "pointer", - "u32", - "buffer" - ], - result: "void" - }, - vkBeginCommandBuffer: { - parameters: [ - "pointer", - "buffer" - ], - result: "u32" - }, - vkEndCommandBuffer: { - parameters: [ - "pointer" - ], - result: "u32" - }, - vkResetCommandBuffer: { - parameters: [ - "pointer", - "u32" - ], - result: "u32" - }, - vkCmdBindPipeline: { - parameters: [ - "pointer", - "u32", - "pointer" - ], - result: "void" - }, - vkCmdSetViewport: { - parameters: [ - "pointer", - "u32", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdSetScissor: { - parameters: [ - "pointer", - "u32", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdSetLineWidth: { - parameters: [ - "pointer", - "f32" - ], - result: "void" - }, - vkCmdSetDepthBias: { - parameters: [ - "pointer", - "f32", - "f32", - "f32" - ], - result: "void" - }, - vkCmdSetBlendConstants: { - parameters: [ - "pointer", - "f32" - ], - result: "void" - }, - vkCmdSetDepthBounds: { - parameters: [ - "pointer", - "f32", - "f32" - ], - result: "void" - }, - vkCmdSetStencilCompareMask: { - parameters: [ - "pointer", - "u32", - "u32" - ], - result: "void" - }, - vkCmdSetStencilWriteMask: { - parameters: [ - "pointer", - "u32", - "u32" - ], - result: "void" - }, - vkCmdSetStencilReference: { - parameters: [ - "pointer", - "u32", - "u32" - ], - result: "void" - }, - vkCmdBindDescriptorSets: { - parameters: [ - "pointer", - "u32", - "pointer", - "u32", - "u32", - "buffer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdBindIndexBuffer: { - parameters: [ - "pointer", - "pointer", - "u64", - "u32" - ], - result: "void" - }, - vkCmdBindVertexBuffers: { - parameters: [ - "pointer", - "u32", - "u32", - "buffer", - "buffer" - ], - result: "void" - }, - vkCmdDraw: { - parameters: [ - "pointer", - "u32", - "u32", - "u32", - "u32" - ], - result: "void" - }, - vkCmdDrawIndexed: { - parameters: [ - "pointer", - "u32", - "u32", - "u32", - "i32", - "u32" - ], - result: "void" - }, - vkCmdDrawIndirect: { - parameters: [ - "pointer", - "pointer", - "u64", - "u32", - "u32" - ], - result: "void" - }, - vkCmdDrawIndexedIndirect: { - parameters: [ - "pointer", - "pointer", - "u64", - "u32", - "u32" - ], - result: "void" - }, - vkCmdDispatch: { - parameters: [ - "pointer", - "u32", - "u32", - "u32" - ], - result: "void" - }, - vkCmdDispatchIndirect: { - parameters: [ - "pointer", - "pointer", - "u64" - ], - result: "void" - }, - vkCmdCopyBuffer: { - parameters: [ - "pointer", - "pointer", - "pointer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdCopyImage: { - parameters: [ - "pointer", - "pointer", - "u32", - "pointer", - "u32", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdBlitImage: { - parameters: [ - "pointer", - "pointer", - "u32", - "pointer", - "u32", - "u32", - "buffer", - "u32" - ], - result: "void" - }, - vkCmdCopyBufferToImage: { - parameters: [ - "pointer", - "pointer", - "pointer", - "u32", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdCopyImageToBuffer: { - parameters: [ - "pointer", - "pointer", - "u32", - "pointer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdUpdateBuffer: { - parameters: [ - "pointer", - "pointer", - "u64", - "u64", - "buffer" - ], - result: "void" - }, - vkCmdFillBuffer: { - parameters: [ - "pointer", - "pointer", - "u64", - "u64", - "u32" - ], - result: "void" - }, - vkCmdClearColorImage: { - parameters: [ - "pointer", - "pointer", - "u32", - "buffer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdClearDepthStencilImage: { - parameters: [ - "pointer", - "pointer", - "u32", - "buffer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdClearAttachments: { - parameters: [ - "pointer", - "u32", - "buffer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdResolveImage: { - parameters: [ - "pointer", - "pointer", - "u32", - "pointer", - "u32", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdSetEvent: { - parameters: [ - "pointer", - "pointer", - "u32" - ], - result: "void" - }, - vkCmdResetEvent: { - parameters: [ - "pointer", - "pointer", - "u32" - ], - result: "void" - }, - vkCmdWaitEvents: { - parameters: [ - "pointer", - "u32", - "buffer", - "u32", - "u32", - "u32", - "buffer", - "u32", - "buffer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdPipelineBarrier: { - parameters: [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "buffer", - "u32", - "buffer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdBeginQuery: { - parameters: [ - "pointer", - "pointer", - "u32", - "u32" - ], - result: "void" - }, - vkCmdEndQuery: { - parameters: [ - "pointer", - "pointer", - "u32" - ], - result: "void" - }, - vkCmdResetQueryPool: { - parameters: [ - "pointer", - "pointer", - "u32", - "u32" - ], - result: "void" - }, - vkCmdWriteTimestamp: { - parameters: [ - "pointer", - "u32", - "pointer", - "u32" - ], - result: "void" - }, - vkCmdCopyQueryPoolResults: { - parameters: [ - "pointer", - "pointer", - "u32", - "u32", - "pointer", - "u64", - "u64", - "u32" - ], - result: "void" - }, - vkCmdPushConstants: { - parameters: [ - "pointer", - "pointer", - "u32", - "u32", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdBeginRenderPass: { - parameters: [ - "pointer", - "buffer", - "u32" - ], - result: "void" - }, - vkCmdNextSubpass: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdEndRenderPass: { - parameters: [ - "pointer" - ], - result: "void" - }, - vkCmdExecuteCommands: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "void" - }, - vkDestroySurfaceKHR: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceSurfaceSupportKHR: { - parameters: [ - "pointer", - "u32", - "pointer", - "buffer" - ], - result: "u32" - }, - vkGetPhysicalDeviceSurfaceCapabilitiesKHR: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "u32" - }, - vkGetPhysicalDeviceSurfaceFormatsKHR: { - parameters: [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkGetPhysicalDeviceSurfacePresentModesKHR: { - parameters: [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkCreateSwapchainKHR: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroySwapchainKHR: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetSwapchainImagesKHR: { - parameters: [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkAcquireNextImageKHR: { - parameters: [ - "pointer", - "pointer", - "u64", - "pointer", - "pointer", - "buffer" - ], - result: "u32" - }, - vkQueuePresentKHR: { - parameters: [ - "pointer", - "buffer" - ], - result: "u32" - }, - vkGetPhysicalDeviceFeatures2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceProperties2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceFormatProperties2: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceImageFormatProperties2: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkGetPhysicalDeviceQueueFamilyProperties2: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceMemoryProperties2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceSparseImageFormatProperties2: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "void" - }, - vkTrimCommandPool: { - parameters: [ - "pointer", - "pointer", - "u32" - ], - result: "void" - }, - vkGetPhysicalDeviceExternalBufferProperties: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceExternalSemaphoreProperties: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetPhysicalDeviceExternalFenceProperties: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkEnumeratePhysicalDeviceGroups: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkGetDeviceGroupPeerMemoryFeatures: { - parameters: [ - "pointer", - "u32", - "u32", - "u32", - "buffer" - ], - result: "void" - }, - vkBindBufferMemory2: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "u32" - }, - vkBindImageMemory2: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "u32" - }, - vkCmdSetDeviceMask: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdDispatchBase: { - parameters: [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "u32", - "u32" - ], - result: "void" - }, - vkCreateDescriptorUpdateTemplate: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyDescriptorUpdateTemplate: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkUpdateDescriptorSetWithTemplate: { - parameters: [ - "pointer", - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetBufferMemoryRequirements2: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetImageMemoryRequirements2: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetImageSparseMemoryRequirements2: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetDeviceBufferMemoryRequirements: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetDeviceImageMemoryRequirements: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetDeviceImageSparseMemoryRequirements: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "void" - }, - vkCreateSamplerYcbcrConversion: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroySamplerYcbcrConversion: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkGetDeviceQueue2: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkGetDescriptorSetLayoutSupport: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkCreateRenderPass2: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkCmdBeginRenderPass2: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkCmdNextSubpass2: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "void" - }, - vkCmdEndRenderPass2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkGetSemaphoreCounterValue: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "u32" - }, - vkWaitSemaphores: { - parameters: [ - "pointer", - "buffer", - "u64" - ], - result: "u32" - }, - vkSignalSemaphore: { - parameters: [ - "pointer", - "buffer" - ], - result: "u32" - }, - vkCmdDrawIndirectCount: { - parameters: [ - "pointer", - "pointer", - "u64", - "pointer", - "u64", - "u32", - "u32" - ], - result: "void" - }, - vkCmdDrawIndexedIndirectCount: { - parameters: [ - "pointer", - "pointer", - "u64", - "pointer", - "u64", - "u32", - "u32" - ], - result: "void" - }, - vkGetBufferOpaqueCaptureAddress: { - parameters: [ - "pointer", - "buffer" - ], - result: "u64" - }, - vkGetBufferDeviceAddress: { - parameters: [ - "pointer", - "buffer" - ], - result: "u64" - }, - vkGetDeviceMemoryOpaqueCaptureAddress: { - parameters: [ - "pointer", - "buffer" - ], - result: "u64" - }, - vkGetPhysicalDeviceToolProperties: { - parameters: [ - "pointer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkCmdSetCullMode: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetFrontFace: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetPrimitiveTopology: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetViewportWithCount: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdSetScissorWithCount: { - parameters: [ - "pointer", - "u32", - "buffer" - ], - result: "void" - }, - vkCmdBindVertexBuffers2: { - parameters: [ - "pointer", - "u32", - "u32", - "buffer", - "buffer", - "buffer", - "buffer" - ], - result: "void" - }, - vkCmdSetDepthTestEnable: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetDepthWriteEnable: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetDepthCompareOp: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetDepthBoundsTestEnable: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetStencilTestEnable: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetStencilOp: { - parameters: [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "u32" - ], - result: "void" - }, - vkCmdSetRasterizerDiscardEnable: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetDepthBiasEnable: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCmdSetPrimitiveRestartEnable: { - parameters: [ - "pointer", - "u32" - ], - result: "void" - }, - vkCreatePrivateDataSlot: { - parameters: [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - result: "u32" - }, - vkDestroyPrivateDataSlot: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkSetPrivateData: { - parameters: [ - "pointer", - "u32", - "u64", - "pointer", - "u64" - ], - result: "u32" - }, - vkGetPrivateData: { - parameters: [ - "pointer", - "u32", - "u64", - "pointer", - "buffer" - ], - result: "void" - }, - vkCmdCopyBuffer2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkCmdCopyImage2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkCmdBlitImage2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkCmdCopyBufferToImage2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkCmdCopyImageToBuffer2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkCmdResolveImage2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkCmdSetEvent2: { - parameters: [ - "pointer", - "pointer", - "buffer" - ], - result: "void" - }, - vkCmdResetEvent2: { - parameters: [ - "pointer", - "pointer", - "u64" - ], - result: "void" - }, - vkCmdWaitEvents2: { - parameters: [ - "pointer", - "u32", - "buffer", - "buffer" - ], - result: "void" - }, - vkCmdPipelineBarrier2: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkQueueSubmit2: { - parameters: [ - "pointer", - "u32", - "buffer", - "pointer" - ], - result: "u32" - }, - vkCmdWriteTimestamp2: { - parameters: [ - "pointer", - "u64", - "pointer", - "u32" - ], - result: "void" - }, - vkCmdBeginRendering: { - parameters: [ - "pointer", - "buffer" - ], - result: "void" - }, - vkCmdEndRendering: { - parameters: [ - "pointer" - ], - result: "void" - } -}).symbols; -export class VulkanError extends Error { - constructor(code){ - super(`Vulkan error: ${code} (${Result[code]})`), this.code = code; - } -} -export function CreateInstance(pCreateInfo, pAllocator, pInstance) { - let ret = lib.vkCreateInstance(anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pInstance)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyInstance(instance, pAllocator) { - lib.vkDestroyInstance(instance, anyBuffer(pAllocator)); -} -export function EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices) { - let ret = lib.vkEnumeratePhysicalDevices(instance, anyBuffer(pPhysicalDeviceCount), anyBuffer(pPhysicalDevices)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function GetDeviceProcAddr(device, pName) { - let ret = lib.vkGetDeviceProcAddr(device, anyBuffer(pName)); - return ret; -} -export function GetInstanceProcAddr(instance, pName) { - let ret = lib.vkGetInstanceProcAddr(instance, anyBuffer(pName)); - return ret; -} -export function GetPhysicalDeviceProperties(physicalDevice, pProperties) { - lib.vkGetPhysicalDeviceProperties(physicalDevice, anyBuffer(pProperties)); -} -export function GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties) { - lib.vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, anyBuffer(pQueueFamilyPropertyCount), anyBuffer(pQueueFamilyProperties)); -} -export function GetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties) { - lib.vkGetPhysicalDeviceMemoryProperties(physicalDevice, anyBuffer(pMemoryProperties)); -} -export function GetPhysicalDeviceFeatures(physicalDevice, pFeatures) { - lib.vkGetPhysicalDeviceFeatures(physicalDevice, anyBuffer(pFeatures)); -} -export function GetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties) { - lib.vkGetPhysicalDeviceFormatProperties(physicalDevice, format, anyBuffer(pFormatProperties)); -} -export function GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties) { - let ret = lib.vkGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, anyBuffer(pImageFormatProperties)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function CreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice) { - let ret = lib.vkCreateDevice(physicalDevice, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pDevice)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyDevice(device, pAllocator) { - lib.vkDestroyDevice(device, anyBuffer(pAllocator)); -} -export function EnumerateInstanceVersion(pApiVersion) { - let ret = lib.vkEnumerateInstanceVersion(anyBuffer(pApiVersion)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function EnumerateInstanceLayerProperties(pPropertyCount, pProperties) { - let ret = lib.vkEnumerateInstanceLayerProperties(anyBuffer(pPropertyCount), anyBuffer(pProperties)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function EnumerateInstanceExtensionProperties(pLayerName, pPropertyCount, pProperties) { - let ret = lib.vkEnumerateInstanceExtensionProperties(anyBuffer(pLayerName), anyBuffer(pPropertyCount), anyBuffer(pProperties)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function EnumerateDeviceLayerProperties(physicalDevice, pPropertyCount, pProperties) { - let ret = lib.vkEnumerateDeviceLayerProperties(physicalDevice, anyBuffer(pPropertyCount), anyBuffer(pProperties)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pPropertyCount, pProperties) { - let ret = lib.vkEnumerateDeviceExtensionProperties(physicalDevice, anyBuffer(pLayerName), anyBuffer(pPropertyCount), anyBuffer(pProperties)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function GetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue) { - lib.vkGetDeviceQueue(device, queueFamilyIndex, queueIndex, anyBuffer(pQueue)); -} -export function QueueSubmit(queue, submitCount, pSubmits, fence) { - let ret = lib.vkQueueSubmit(queue, submitCount, anyBuffer(pSubmits), fence); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function QueueWaitIdle(queue) { - let ret = lib.vkQueueWaitIdle(queue); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DeviceWaitIdle(device) { - let ret = lib.vkDeviceWaitIdle(device); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function AllocateMemory(device, pAllocateInfo, pAllocator, pMemory) { - let ret = lib.vkAllocateMemory(device, anyBuffer(pAllocateInfo), anyBuffer(pAllocator), anyBuffer(pMemory)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function FreeMemory(device, memory, pAllocator) { - lib.vkFreeMemory(device, memory, anyBuffer(pAllocator)); -} -export function MapMemory(device, memory, offset, size, flags, ppData) { - let ret = lib.vkMapMemory(device, memory, offset, size, flags, anyBuffer(ppData)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function UnmapMemory(device, memory) { - lib.vkUnmapMemory(device, memory); -} -export function FlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges) { - let ret = lib.vkFlushMappedMemoryRanges(device, memoryRangeCount, anyBuffer(pMemoryRanges)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function InvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges) { - let ret = lib.vkInvalidateMappedMemoryRanges(device, memoryRangeCount, anyBuffer(pMemoryRanges)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes) { - lib.vkGetDeviceMemoryCommitment(device, memory, anyBuffer(pCommittedMemoryInBytes)); -} -export function GetBufferMemoryRequirements(device, buffer, pMemoryRequirements) { - lib.vkGetBufferMemoryRequirements(device, buffer, anyBuffer(pMemoryRequirements)); -} -export function BindBufferMemory(device, buffer, memory, memoryOffset) { - let ret = lib.vkBindBufferMemory(device, buffer, memory, memoryOffset); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function GetImageMemoryRequirements(device, image, pMemoryRequirements) { - lib.vkGetImageMemoryRequirements(device, image, anyBuffer(pMemoryRequirements)); -} -export function BindImageMemory(device, image, memory, memoryOffset) { - let ret = lib.vkBindImageMemory(device, image, memory, memoryOffset); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements) { - lib.vkGetImageSparseMemoryRequirements(device, image, anyBuffer(pSparseMemoryRequirementCount), anyBuffer(pSparseMemoryRequirements)); -} -export function GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties) { - lib.vkGetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, anyBuffer(pPropertyCount), anyBuffer(pProperties)); -} -export function QueueBindSparse(queue, bindInfoCount, pBindInfo, fence) { - let ret = lib.vkQueueBindSparse(queue, bindInfoCount, anyBuffer(pBindInfo), fence); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function CreateFence(device, pCreateInfo, pAllocator, pFence) { - let ret = lib.vkCreateFence(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pFence)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyFence(device, fence, pAllocator) { - lib.vkDestroyFence(device, fence, anyBuffer(pAllocator)); -} -export function ResetFences(device, fenceCount, pFences) { - let ret = lib.vkResetFences(device, fenceCount, anyBuffer(pFences)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function GetFenceStatus(device, fence) { - let ret = lib.vkGetFenceStatus(device, fence); - if (ret === Result.SUCCESS || ret === Result.NOT_READY) return ret; - throw new VulkanError(ret); -} -export function WaitForFences(device, fenceCount, pFences, waitAll, timeout) { - let ret = lib.vkWaitForFences(device, fenceCount, anyBuffer(pFences), waitAll, timeout); - if (ret === Result.SUCCESS || ret === Result.TIMEOUT) return ret; - throw new VulkanError(ret); -} -export function CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore) { - let ret = lib.vkCreateSemaphore(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pSemaphore)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroySemaphore(device, semaphore, pAllocator) { - lib.vkDestroySemaphore(device, semaphore, anyBuffer(pAllocator)); -} -export function CreateEvent(device, pCreateInfo, pAllocator, pEvent) { - let ret = lib.vkCreateEvent(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pEvent)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyEvent(device, event, pAllocator) { - lib.vkDestroyEvent(device, event, anyBuffer(pAllocator)); -} -export function GetEventStatus(device, event) { - let ret = lib.vkGetEventStatus(device, event); - if (ret === Result.EVENT_SET || ret === Result.EVENT_RESET) return ret; - throw new VulkanError(ret); -} -export function SetEvent(device, event) { - let ret = lib.vkSetEvent(device, event); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function ResetEvent(device, event) { - let ret = lib.vkResetEvent(device, event); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool) { - let ret = lib.vkCreateQueryPool(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pQueryPool)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyQueryPool(device, queryPool, pAllocator) { - lib.vkDestroyQueryPool(device, queryPool, anyBuffer(pAllocator)); -} -export function GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags) { - let ret = lib.vkGetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, anyBuffer(pData), stride, flags); - if (ret === Result.SUCCESS || ret === Result.NOT_READY) return ret; - throw new VulkanError(ret); -} -export function ResetQueryPool(device, queryPool, firstQuery, queryCount) { - lib.vkResetQueryPool(device, queryPool, firstQuery, queryCount); -} -export function CreateBuffer(device, pCreateInfo, pAllocator, pBuffer) { - let ret = lib.vkCreateBuffer(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pBuffer)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyBuffer(device, buffer, pAllocator) { - lib.vkDestroyBuffer(device, buffer, anyBuffer(pAllocator)); -} -export function CreateBufferView(device, pCreateInfo, pAllocator, pView) { - let ret = lib.vkCreateBufferView(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pView)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyBufferView(device, bufferView, pAllocator) { - lib.vkDestroyBufferView(device, bufferView, anyBuffer(pAllocator)); -} -export function CreateImage(device, pCreateInfo, pAllocator, pImage) { - let ret = lib.vkCreateImage(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pImage)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyImage(device, image, pAllocator) { - lib.vkDestroyImage(device, image, anyBuffer(pAllocator)); -} -export function GetImageSubresourceLayout(device, image, pSubresource, pLayout) { - lib.vkGetImageSubresourceLayout(device, image, anyBuffer(pSubresource), anyBuffer(pLayout)); -} -export function CreateImageView(device, pCreateInfo, pAllocator, pView) { - let ret = lib.vkCreateImageView(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pView)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyImageView(device, imageView, pAllocator) { - lib.vkDestroyImageView(device, imageView, anyBuffer(pAllocator)); -} -export function CreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule) { - let ret = lib.vkCreateShaderModule(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pShaderModule)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyShaderModule(device, shaderModule, pAllocator) { - lib.vkDestroyShaderModule(device, shaderModule, anyBuffer(pAllocator)); -} -export function CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache) { - let ret = lib.vkCreatePipelineCache(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pPipelineCache)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyPipelineCache(device, pipelineCache, pAllocator) { - lib.vkDestroyPipelineCache(device, pipelineCache, anyBuffer(pAllocator)); -} -export function GetPipelineCacheData(device, pipelineCache, pDataSize, pData) { - let ret = lib.vkGetPipelineCacheData(device, pipelineCache, anyBuffer(pDataSize), anyBuffer(pData)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function MergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches) { - let ret = lib.vkMergePipelineCaches(device, dstCache, srcCacheCount, anyBuffer(pSrcCaches)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function CreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines) { - let ret = lib.vkCreateGraphicsPipelines(device, pipelineCache, createInfoCount, anyBuffer(pCreateInfos), anyBuffer(pAllocator), anyBuffer(pPipelines)); - if (ret === Result.SUCCESS || ret === Result.PIPELINE_COMPILE_REQUIRED_EXT) return ret; - throw new VulkanError(ret); -} -export function CreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines) { - let ret = lib.vkCreateComputePipelines(device, pipelineCache, createInfoCount, anyBuffer(pCreateInfos), anyBuffer(pAllocator), anyBuffer(pPipelines)); - if (ret === Result.SUCCESS || ret === Result.PIPELINE_COMPILE_REQUIRED_EXT) return ret; - throw new VulkanError(ret); -} -export function DestroyPipeline(device, pipeline, pAllocator) { - lib.vkDestroyPipeline(device, pipeline, anyBuffer(pAllocator)); -} -export function CreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout) { - let ret = lib.vkCreatePipelineLayout(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pPipelineLayout)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyPipelineLayout(device, pipelineLayout, pAllocator) { - lib.vkDestroyPipelineLayout(device, pipelineLayout, anyBuffer(pAllocator)); -} -export function CreateSampler(device, pCreateInfo, pAllocator, pSampler) { - let ret = lib.vkCreateSampler(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pSampler)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroySampler(device, sampler, pAllocator) { - lib.vkDestroySampler(device, sampler, anyBuffer(pAllocator)); -} -export function CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout) { - let ret = lib.vkCreateDescriptorSetLayout(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pSetLayout)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator) { - lib.vkDestroyDescriptorSetLayout(device, descriptorSetLayout, anyBuffer(pAllocator)); -} -export function CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool) { - let ret = lib.vkCreateDescriptorPool(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pDescriptorPool)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyDescriptorPool(device, descriptorPool, pAllocator) { - lib.vkDestroyDescriptorPool(device, descriptorPool, anyBuffer(pAllocator)); -} -export function ResetDescriptorPool(device, descriptorPool, flags) { - let ret = lib.vkResetDescriptorPool(device, descriptorPool, flags); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function AllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets) { - let ret = lib.vkAllocateDescriptorSets(device, anyBuffer(pAllocateInfo), anyBuffer(pDescriptorSets)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function FreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets) { - let ret = lib.vkFreeDescriptorSets(device, descriptorPool, descriptorSetCount, anyBuffer(pDescriptorSets)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies) { - lib.vkUpdateDescriptorSets(device, descriptorWriteCount, anyBuffer(pDescriptorWrites), descriptorCopyCount, anyBuffer(pDescriptorCopies)); -} -export function CreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer) { - let ret = lib.vkCreateFramebuffer(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pFramebuffer)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyFramebuffer(device, framebuffer, pAllocator) { - lib.vkDestroyFramebuffer(device, framebuffer, anyBuffer(pAllocator)); -} -export function CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass) { - let ret = lib.vkCreateRenderPass(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pRenderPass)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyRenderPass(device, renderPass, pAllocator) { - lib.vkDestroyRenderPass(device, renderPass, anyBuffer(pAllocator)); -} -export function GetRenderAreaGranularity(device, renderPass, pGranularity) { - lib.vkGetRenderAreaGranularity(device, renderPass, anyBuffer(pGranularity)); -} -export function CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool) { - let ret = lib.vkCreateCommandPool(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pCommandPool)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyCommandPool(device, commandPool, pAllocator) { - lib.vkDestroyCommandPool(device, commandPool, anyBuffer(pAllocator)); -} -export function ResetCommandPool(device, commandPool, flags) { - let ret = lib.vkResetCommandPool(device, commandPool, flags); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function AllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers) { - let ret = lib.vkAllocateCommandBuffers(device, anyBuffer(pAllocateInfo), anyBuffer(pCommandBuffers)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers) { - lib.vkFreeCommandBuffers(device, commandPool, commandBufferCount, anyBuffer(pCommandBuffers)); -} -export function BeginCommandBuffer(commandBuffer, pBeginInfo) { - let ret = lib.vkBeginCommandBuffer(commandBuffer, anyBuffer(pBeginInfo)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function EndCommandBuffer(commandBuffer) { - let ret = lib.vkEndCommandBuffer(commandBuffer); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function ResetCommandBuffer(commandBuffer, flags) { - let ret = lib.vkResetCommandBuffer(commandBuffer, flags); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline) { - lib.vkCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); -} -export function CmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports) { - lib.vkCmdSetViewport(commandBuffer, firstViewport, viewportCount, anyBuffer(pViewports)); -} -export function CmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors) { - lib.vkCmdSetScissor(commandBuffer, firstScissor, scissorCount, anyBuffer(pScissors)); -} -export function CmdSetLineWidth(commandBuffer, lineWidth) { - lib.vkCmdSetLineWidth(commandBuffer, lineWidth); -} -export function CmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor) { - lib.vkCmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); -} -export function CmdSetBlendConstants(commandBuffer, blendConstants) { - lib.vkCmdSetBlendConstants(commandBuffer, blendConstants); -} -export function CmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds) { - lib.vkCmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); -} -export function CmdSetStencilCompareMask(commandBuffer, faceMask, compareMask) { - lib.vkCmdSetStencilCompareMask(commandBuffer, faceMask, compareMask); -} -export function CmdSetStencilWriteMask(commandBuffer, faceMask, writeMask) { - lib.vkCmdSetStencilWriteMask(commandBuffer, faceMask, writeMask); -} -export function CmdSetStencilReference(commandBuffer, faceMask, reference) { - lib.vkCmdSetStencilReference(commandBuffer, faceMask, reference); -} -export function CmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets) { - lib.vkCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, anyBuffer(pDescriptorSets), dynamicOffsetCount, anyBuffer(pDynamicOffsets)); -} -export function CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType) { - lib.vkCmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); -} -export function CmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets) { - lib.vkCmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, anyBuffer(pBuffers), anyBuffer(pOffsets)); -} -export function CmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance) { - lib.vkCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); -} -export function CmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance) { - lib.vkCmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); -} -export function CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride) { - lib.vkCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); -} -export function CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride) { - lib.vkCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); -} -export function CmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ) { - lib.vkCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ); -} -export function CmdDispatchIndirect(commandBuffer, buffer, offset) { - lib.vkCmdDispatchIndirect(commandBuffer, buffer, offset); -} -export function CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions) { - lib.vkCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, anyBuffer(pRegions)); -} -export function CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions) { - lib.vkCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, anyBuffer(pRegions)); -} -export function CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter) { - lib.vkCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, anyBuffer(pRegions), filter); -} -export function CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions) { - lib.vkCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, anyBuffer(pRegions)); -} -export function CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions) { - lib.vkCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, anyBuffer(pRegions)); -} -export function CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData) { - lib.vkCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, anyBuffer(pData)); -} -export function CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data) { - lib.vkCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); -} -export function CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges) { - lib.vkCmdClearColorImage(commandBuffer, image, imageLayout, anyBuffer(pColor), rangeCount, anyBuffer(pRanges)); -} -export function CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges) { - lib.vkCmdClearDepthStencilImage(commandBuffer, image, imageLayout, anyBuffer(pDepthStencil), rangeCount, anyBuffer(pRanges)); -} -export function CmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects) { - lib.vkCmdClearAttachments(commandBuffer, attachmentCount, anyBuffer(pAttachments), rectCount, anyBuffer(pRects)); -} -export function CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions) { - lib.vkCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, anyBuffer(pRegions)); -} -export function CmdSetEvent(commandBuffer, event, stageMask) { - lib.vkCmdSetEvent(commandBuffer, event, stageMask); -} -export function CmdResetEvent(commandBuffer, event, stageMask) { - lib.vkCmdResetEvent(commandBuffer, event, stageMask); -} -export function CmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers) { - lib.vkCmdWaitEvents(commandBuffer, eventCount, anyBuffer(pEvents), srcStageMask, dstStageMask, memoryBarrierCount, anyBuffer(pMemoryBarriers), bufferMemoryBarrierCount, anyBuffer(pBufferMemoryBarriers), imageMemoryBarrierCount, anyBuffer(pImageMemoryBarriers)); -} -export function CmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers) { - lib.vkCmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, anyBuffer(pMemoryBarriers), bufferMemoryBarrierCount, anyBuffer(pBufferMemoryBarriers), imageMemoryBarrierCount, anyBuffer(pImageMemoryBarriers)); -} -export function CmdBeginQuery(commandBuffer, queryPool, query, flags) { - lib.vkCmdBeginQuery(commandBuffer, queryPool, query, flags); -} -export function CmdEndQuery(commandBuffer, queryPool, query) { - lib.vkCmdEndQuery(commandBuffer, queryPool, query); -} -export function CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount) { - lib.vkCmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); -} -export function CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query) { - lib.vkCmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); -} -export function CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags) { - lib.vkCmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); -} -export function CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues) { - lib.vkCmdPushConstants(commandBuffer, layout, stageFlags, offset, size, anyBuffer(pValues)); -} -export function CmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents) { - lib.vkCmdBeginRenderPass(commandBuffer, anyBuffer(pRenderPassBegin), contents); -} -export function CmdNextSubpass(commandBuffer, contents) { - lib.vkCmdNextSubpass(commandBuffer, contents); -} -export function CmdEndRenderPass(commandBuffer) { - lib.vkCmdEndRenderPass(commandBuffer); -} -export function CmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers) { - lib.vkCmdExecuteCommands(commandBuffer, commandBufferCount, anyBuffer(pCommandBuffers)); -} -export function DestroySurfaceKHR(instance, surface, pAllocator) { - lib.vkDestroySurfaceKHR(instance, surface, anyBuffer(pAllocator)); -} -export function GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported) { - let ret = lib.vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, anyBuffer(pSupported)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities) { - let ret = lib.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, anyBuffer(pSurfaceCapabilities)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats) { - let ret = lib.vkGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, anyBuffer(pSurfaceFormatCount), anyBuffer(pSurfaceFormats)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes) { - let ret = lib.vkGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, anyBuffer(pPresentModeCount), anyBuffer(pPresentModes)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain) { - let ret = lib.vkCreateSwapchainKHR(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pSwapchain)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroySwapchainKHR(device, swapchain, pAllocator) { - lib.vkDestroySwapchainKHR(device, swapchain, anyBuffer(pAllocator)); -} -export function GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages) { - let ret = lib.vkGetSwapchainImagesKHR(device, swapchain, anyBuffer(pSwapchainImageCount), anyBuffer(pSwapchainImages)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex) { - let ret = lib.vkAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, anyBuffer(pImageIndex)); - if (ret === Result.SUCCESS || ret === Result.TIMEOUT || ret === Result.NOT_READY || ret === Result.SUBOPTIMAL_KHR) return ret; - throw new VulkanError(ret); -} -export function QueuePresentKHR(queue, pPresentInfo) { - let ret = lib.vkQueuePresentKHR(queue, anyBuffer(pPresentInfo)); - if (ret === Result.SUCCESS || ret === Result.SUBOPTIMAL_KHR) return ret; - throw new VulkanError(ret); -} -export function GetPhysicalDeviceFeatures2(physicalDevice, pFeatures) { - lib.vkGetPhysicalDeviceFeatures2(physicalDevice, anyBuffer(pFeatures)); -} -export function GetPhysicalDeviceProperties2(physicalDevice, pProperties) { - lib.vkGetPhysicalDeviceProperties2(physicalDevice, anyBuffer(pProperties)); -} -export function GetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties) { - lib.vkGetPhysicalDeviceFormatProperties2(physicalDevice, format, anyBuffer(pFormatProperties)); -} -export function GetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties) { - let ret = lib.vkGetPhysicalDeviceImageFormatProperties2(physicalDevice, anyBuffer(pImageFormatInfo), anyBuffer(pImageFormatProperties)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties) { - lib.vkGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, anyBuffer(pQueueFamilyPropertyCount), anyBuffer(pQueueFamilyProperties)); -} -export function GetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties) { - lib.vkGetPhysicalDeviceMemoryProperties2(physicalDevice, anyBuffer(pMemoryProperties)); -} -export function GetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties) { - lib.vkGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, anyBuffer(pFormatInfo), anyBuffer(pPropertyCount), anyBuffer(pProperties)); -} -export function TrimCommandPool(device, commandPool, flags) { - lib.vkTrimCommandPool(device, commandPool, flags); -} -export function GetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, pExternalBufferProperties) { - lib.vkGetPhysicalDeviceExternalBufferProperties(physicalDevice, anyBuffer(pExternalBufferInfo), anyBuffer(pExternalBufferProperties)); -} -export function GetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties) { - lib.vkGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, anyBuffer(pExternalSemaphoreInfo), anyBuffer(pExternalSemaphoreProperties)); -} -export function GetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties) { - lib.vkGetPhysicalDeviceExternalFenceProperties(physicalDevice, anyBuffer(pExternalFenceInfo), anyBuffer(pExternalFenceProperties)); -} -export function EnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties) { - let ret = lib.vkEnumeratePhysicalDeviceGroups(instance, anyBuffer(pPhysicalDeviceGroupCount), anyBuffer(pPhysicalDeviceGroupProperties)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function GetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures) { - lib.vkGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, anyBuffer(pPeerMemoryFeatures)); -} -export function BindBufferMemory2(device, bindInfoCount, pBindInfos) { - let ret = lib.vkBindBufferMemory2(device, bindInfoCount, anyBuffer(pBindInfos)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function BindImageMemory2(device, bindInfoCount, pBindInfos) { - let ret = lib.vkBindImageMemory2(device, bindInfoCount, anyBuffer(pBindInfos)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function CmdSetDeviceMask(commandBuffer, deviceMask) { - lib.vkCmdSetDeviceMask(commandBuffer, deviceMask); -} -export function CmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ) { - lib.vkCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); -} -export function CreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate) { - let ret = lib.vkCreateDescriptorUpdateTemplate(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pDescriptorUpdateTemplate)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator) { - lib.vkDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, anyBuffer(pAllocator)); -} -export function UpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData) { - lib.vkUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, anyBuffer(pData)); -} -export function GetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements) { - lib.vkGetBufferMemoryRequirements2(device, anyBuffer(pInfo), anyBuffer(pMemoryRequirements)); -} -export function GetImageMemoryRequirements2(device, pInfo, pMemoryRequirements) { - lib.vkGetImageMemoryRequirements2(device, anyBuffer(pInfo), anyBuffer(pMemoryRequirements)); -} -export function GetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements) { - lib.vkGetImageSparseMemoryRequirements2(device, anyBuffer(pInfo), anyBuffer(pSparseMemoryRequirementCount), anyBuffer(pSparseMemoryRequirements)); -} -export function GetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements) { - lib.vkGetDeviceBufferMemoryRequirements(device, anyBuffer(pInfo), anyBuffer(pMemoryRequirements)); -} -export function GetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements) { - lib.vkGetDeviceImageMemoryRequirements(device, anyBuffer(pInfo), anyBuffer(pMemoryRequirements)); -} -export function GetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements) { - lib.vkGetDeviceImageSparseMemoryRequirements(device, anyBuffer(pInfo), anyBuffer(pSparseMemoryRequirementCount), anyBuffer(pSparseMemoryRequirements)); -} -export function CreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion) { - let ret = lib.vkCreateSamplerYcbcrConversion(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pYcbcrConversion)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator) { - lib.vkDestroySamplerYcbcrConversion(device, ycbcrConversion, anyBuffer(pAllocator)); -} -export function GetDeviceQueue2(device, pQueueInfo, pQueue) { - lib.vkGetDeviceQueue2(device, anyBuffer(pQueueInfo), anyBuffer(pQueue)); -} -export function GetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport) { - lib.vkGetDescriptorSetLayoutSupport(device, anyBuffer(pCreateInfo), anyBuffer(pSupport)); -} -export function CreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass) { - let ret = lib.vkCreateRenderPass2(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pRenderPass)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function CmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo) { - lib.vkCmdBeginRenderPass2(commandBuffer, anyBuffer(pRenderPassBegin), anyBuffer(pSubpassBeginInfo)); -} -export function CmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo) { - lib.vkCmdNextSubpass2(commandBuffer, anyBuffer(pSubpassBeginInfo), anyBuffer(pSubpassEndInfo)); -} -export function CmdEndRenderPass2(commandBuffer, pSubpassEndInfo) { - lib.vkCmdEndRenderPass2(commandBuffer, anyBuffer(pSubpassEndInfo)); -} -export function GetSemaphoreCounterValue(device, semaphore, pValue) { - let ret = lib.vkGetSemaphoreCounterValue(device, semaphore, anyBuffer(pValue)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function WaitSemaphores(device, pWaitInfo, timeout) { - let ret = lib.vkWaitSemaphores(device, anyBuffer(pWaitInfo), timeout); - if (ret === Result.SUCCESS || ret === Result.TIMEOUT) return ret; - throw new VulkanError(ret); -} -export function SignalSemaphore(device, pSignalInfo) { - let ret = lib.vkSignalSemaphore(device, anyBuffer(pSignalInfo)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function CmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride) { - lib.vkCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); -} -export function CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride) { - lib.vkCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); -} -export function GetBufferOpaqueCaptureAddress(device, pInfo) { - let ret = lib.vkGetBufferOpaqueCaptureAddress(device, anyBuffer(pInfo)); - return ret; -} -export function GetBufferDeviceAddress(device, pInfo) { - let ret = lib.vkGetBufferDeviceAddress(device, anyBuffer(pInfo)); - return ret; -} -export function GetDeviceMemoryOpaqueCaptureAddress(device, pInfo) { - let ret = lib.vkGetDeviceMemoryOpaqueCaptureAddress(device, anyBuffer(pInfo)); - return ret; -} -export function GetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties) { - let ret = lib.vkGetPhysicalDeviceToolProperties(physicalDevice, anyBuffer(pToolCount), anyBuffer(pToolProperties)); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) return ret; - throw new VulkanError(ret); -} -export function CmdSetCullMode(commandBuffer, cullMode) { - lib.vkCmdSetCullMode(commandBuffer, cullMode); -} -export function CmdSetFrontFace(commandBuffer, frontFace) { - lib.vkCmdSetFrontFace(commandBuffer, frontFace); -} -export function CmdSetPrimitiveTopology(commandBuffer, primitiveTopology) { - lib.vkCmdSetPrimitiveTopology(commandBuffer, primitiveTopology); -} -export function CmdSetViewportWithCount(commandBuffer, viewportCount, pViewports) { - lib.vkCmdSetViewportWithCount(commandBuffer, viewportCount, anyBuffer(pViewports)); -} -export function CmdSetScissorWithCount(commandBuffer, scissorCount, pScissors) { - lib.vkCmdSetScissorWithCount(commandBuffer, scissorCount, anyBuffer(pScissors)); -} -export function CmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides) { - lib.vkCmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, anyBuffer(pBuffers), anyBuffer(pOffsets), anyBuffer(pSizes), anyBuffer(pStrides)); -} -export function CmdSetDepthTestEnable(commandBuffer, depthTestEnable) { - lib.vkCmdSetDepthTestEnable(commandBuffer, depthTestEnable); -} -export function CmdSetDepthWriteEnable(commandBuffer, depthWriteEnable) { - lib.vkCmdSetDepthWriteEnable(commandBuffer, depthWriteEnable); -} -export function CmdSetDepthCompareOp(commandBuffer, depthCompareOp) { - lib.vkCmdSetDepthCompareOp(commandBuffer, depthCompareOp); -} -export function CmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable) { - lib.vkCmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable); -} -export function CmdSetStencilTestEnable(commandBuffer, stencilTestEnable) { - lib.vkCmdSetStencilTestEnable(commandBuffer, stencilTestEnable); -} -export function CmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp) { - lib.vkCmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); -} -export function CmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable) { - lib.vkCmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable); -} -export function CmdSetDepthBiasEnable(commandBuffer, depthBiasEnable) { - lib.vkCmdSetDepthBiasEnable(commandBuffer, depthBiasEnable); -} -export function CmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable) { - lib.vkCmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable); -} -export function CreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot) { - let ret = lib.vkCreatePrivateDataSlot(device, anyBuffer(pCreateInfo), anyBuffer(pAllocator), anyBuffer(pPrivateDataSlot)); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function DestroyPrivateDataSlot(device, privateDataSlot, pAllocator) { - lib.vkDestroyPrivateDataSlot(device, privateDataSlot, anyBuffer(pAllocator)); -} -export function SetPrivateData(device, objectType, objectHandle, privateDataSlot, data) { - let ret = lib.vkSetPrivateData(device, objectType, objectHandle, privateDataSlot, data); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function GetPrivateData(device, objectType, objectHandle, privateDataSlot, pData) { - lib.vkGetPrivateData(device, objectType, objectHandle, privateDataSlot, anyBuffer(pData)); -} -export function CmdCopyBuffer2(commandBuffer, pCopyBufferInfo) { - lib.vkCmdCopyBuffer2(commandBuffer, anyBuffer(pCopyBufferInfo)); -} -export function CmdCopyImage2(commandBuffer, pCopyImageInfo) { - lib.vkCmdCopyImage2(commandBuffer, anyBuffer(pCopyImageInfo)); -} -export function CmdBlitImage2(commandBuffer, pBlitImageInfo) { - lib.vkCmdBlitImage2(commandBuffer, anyBuffer(pBlitImageInfo)); -} -export function CmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo) { - lib.vkCmdCopyBufferToImage2(commandBuffer, anyBuffer(pCopyBufferToImageInfo)); -} -export function CmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo) { - lib.vkCmdCopyImageToBuffer2(commandBuffer, anyBuffer(pCopyImageToBufferInfo)); -} -export function CmdResolveImage2(commandBuffer, pResolveImageInfo) { - lib.vkCmdResolveImage2(commandBuffer, anyBuffer(pResolveImageInfo)); -} -export function CmdSetEvent2(commandBuffer, event, pDependencyInfo) { - lib.vkCmdSetEvent2(commandBuffer, event, anyBuffer(pDependencyInfo)); -} -export function CmdResetEvent2(commandBuffer, event, stageMask) { - lib.vkCmdResetEvent2(commandBuffer, event, stageMask); -} -export function CmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos) { - lib.vkCmdWaitEvents2(commandBuffer, eventCount, anyBuffer(pEvents), anyBuffer(pDependencyInfos)); -} -export function CmdPipelineBarrier2(commandBuffer, pDependencyInfo) { - lib.vkCmdPipelineBarrier2(commandBuffer, anyBuffer(pDependencyInfo)); -} -export function QueueSubmit2(queue, submitCount, pSubmits, fence) { - let ret = lib.vkQueueSubmit2(queue, submitCount, anyBuffer(pSubmits), fence); - if (ret === Result.SUCCESS) return ret; - throw new VulkanError(ret); -} -export function CmdWriteTimestamp2(commandBuffer, stage, queryPool, query) { - lib.vkCmdWriteTimestamp2(commandBuffer, stage, queryPool, query); -} -export function CmdBeginRendering(commandBuffer, pRenderingInfo) { - lib.vkCmdBeginRendering(commandBuffer, anyBuffer(pRenderingInfo)); -} -export function CmdEndRendering(commandBuffer) { - lib.vkCmdEndRendering(commandBuffer); -} -export * from "./util.ts"; diff --git a/api/vk.ts b/api/vk.ts deleted file mode 100644 index bd8dccc..0000000 --- a/api/vk.ts +++ /dev/null @@ -1,98642 +0,0 @@ -/// This file is auto-generated. Do not edit. - -import { AnyBuffer, AnyPointer, anyBuffer, anyPointer, BUFFER, DATAVIEW, LE, BaseStruct } from "./util.ts"; - -/// Type definitions - -export type MTLDevice_id = Deno.PointerValue; - -export type MTLCommandQueue_id = Deno.PointerValue; - -export type MTLBuffer_id = Deno.PointerValue; - -export type MTLTexture_id = Deno.PointerValue; - -export type MTLSharedEvent_id = Deno.PointerValue; - -export type IOSurfaceRef = Deno.PointerValue; - -export type SampleMask = number; - -export type Bool32 = number; - -export type Flags = number; - -export type Flags64 = Deno.PointerValue; - -export type DeviceSize = Deno.PointerValue; - -export type DeviceAddress = Deno.PointerValue; - -export type FramebufferCreateFlags = Flags; - -export type QueryPoolCreateFlags = Flags; - -export type RenderPassCreateFlags = Flags; - -export type SamplerCreateFlags = Flags; - -export type PipelineLayoutCreateFlags = Flags; - -export type PipelineCacheCreateFlags = Flags; - -export type PipelineDepthStencilStateCreateFlags = Flags; - -export type PipelineDynamicStateCreateFlags = Flags; - -export type PipelineColorBlendStateCreateFlags = Flags; - -export type PipelineMultisampleStateCreateFlags = Flags; - -export type PipelineRasterizationStateCreateFlags = Flags; - -export type PipelineViewportStateCreateFlags = Flags; - -export type PipelineTessellationStateCreateFlags = Flags; - -export type PipelineInputAssemblyStateCreateFlags = Flags; - -export type PipelineVertexInputStateCreateFlags = Flags; - -export type PipelineShaderStageCreateFlags = Flags; - -export type DescriptorSetLayoutCreateFlags = Flags; - -export type BufferViewCreateFlags = Flags; - -export type InstanceCreateFlags = Flags; - -export type DeviceCreateFlags = Flags; - -export type DeviceQueueCreateFlags = Flags; - -export type QueueFlags = Flags; - -export type MemoryPropertyFlags = Flags; - -export type MemoryHeapFlags = Flags; - -export type AccessFlags = Flags; - -export type BufferUsageFlags = Flags; - -export type BufferCreateFlags = Flags; - -export type ShaderStageFlags = Flags; - -export type ImageUsageFlags = Flags; - -export type ImageCreateFlags = Flags; - -export type ImageViewCreateFlags = Flags; - -export type PipelineCreateFlags = Flags; - -export type ColorComponentFlags = Flags; - -export type FenceCreateFlags = Flags; - -export type SemaphoreCreateFlags = Flags; - -export type FormatFeatureFlags = Flags; - -export type QueryControlFlags = Flags; - -export type QueryResultFlags = Flags; - -export type ShaderModuleCreateFlags = Flags; - -export type EventCreateFlags = Flags; - -export type CommandPoolCreateFlags = Flags; - -export type CommandPoolResetFlags = Flags; - -export type CommandBufferResetFlags = Flags; - -export type CommandBufferUsageFlags = Flags; - -export type QueryPipelineStatisticFlags = Flags; - -export type MemoryMapFlags = Flags; - -export type ImageAspectFlags = Flags; - -export type SparseMemoryBindFlags = Flags; - -export type SparseImageFormatFlags = Flags; - -export type SubpassDescriptionFlags = Flags; - -export type PipelineStageFlags = Flags; - -export type SampleCountFlags = Flags; - -export type AttachmentDescriptionFlags = Flags; - -export type StencilFaceFlags = Flags; - -export type CullModeFlags = Flags; - -export type DescriptorPoolCreateFlags = Flags; - -export type DescriptorPoolResetFlags = Flags; - -export type DependencyFlags = Flags; - -export type SubgroupFeatureFlags = Flags; - -export type IndirectCommandsLayoutUsageFlagsNV = Flags; - -export type IndirectStateFlagsNV = Flags; - -export type GeometryFlagsKHR = Flags; - -export type GeometryFlagsNV = GeometryFlagsKHR; - -export type GeometryInstanceFlagsKHR = Flags; - -export type GeometryInstanceFlagsNV = GeometryInstanceFlagsKHR; - -export type BuildAccelerationStructureFlagsKHR = Flags; - -export type BuildAccelerationStructureFlagsNV = BuildAccelerationStructureFlagsKHR; - -export type PrivateDataSlotCreateFlags = Flags; - -export type PrivateDataSlotCreateFlagsEXT = PrivateDataSlotCreateFlags; - -export type AccelerationStructureCreateFlagsKHR = Flags; - -export type DescriptorUpdateTemplateCreateFlags = Flags; - -export type DescriptorUpdateTemplateCreateFlagsKHR = DescriptorUpdateTemplateCreateFlags; - -export type PipelineCreationFeedbackFlags = Flags; - -export type PipelineCreationFeedbackFlagsEXT = PipelineCreationFeedbackFlags; - -export type PerformanceCounterDescriptionFlagsKHR = Flags; - -export type AcquireProfilingLockFlagsKHR = Flags; - -export type SemaphoreWaitFlags = Flags; - -export type SemaphoreWaitFlagsKHR = SemaphoreWaitFlags; - -export type PipelineCompilerControlFlagsAMD = Flags; - -export type ShaderCorePropertiesFlagsAMD = Flags; - -export type DeviceDiagnosticsConfigFlagsNV = Flags; - -export type AccessFlags2 = Flags64; - -export type AccessFlags2KHR = AccessFlags2; - -export type PipelineStageFlags2 = Flags64; - -export type PipelineStageFlags2KHR = PipelineStageFlags2; - -export type AccelerationStructureMotionInfoFlagsNV = Flags; - -export type AccelerationStructureMotionInstanceFlagsNV = Flags; - -export type FormatFeatureFlags2 = Flags64; - -export type FormatFeatureFlags2KHR = FormatFeatureFlags2; - -export type RenderingFlags = Flags; - -export type MemoryDecompressionMethodFlagsNV = Flags64; - -export type RenderingFlagsKHR = RenderingFlags; - -export type BuildMicromapFlagsEXT = Flags; - -export type MicromapCreateFlagsEXT = Flags; - -export type CompositeAlphaFlagsKHR = Flags; - -export type DisplayPlaneAlphaFlagsKHR = Flags; - -export type SurfaceTransformFlagsKHR = Flags; - -export type SwapchainCreateFlagsKHR = Flags; - -export type DisplayModeCreateFlagsKHR = Flags; - -export type DisplaySurfaceCreateFlagsKHR = Flags; - -export type AndroidSurfaceCreateFlagsKHR = Flags; - -export type ViSurfaceCreateFlagsNN = Flags; - -export type WaylandSurfaceCreateFlagsKHR = Flags; - -export type Win32SurfaceCreateFlagsKHR = Flags; - -export type XlibSurfaceCreateFlagsKHR = Flags; - -export type XcbSurfaceCreateFlagsKHR = Flags; - -export type DirectFBSurfaceCreateFlagsEXT = Flags; - -export type IOSSurfaceCreateFlagsMVK = Flags; - -export type MacOSSurfaceCreateFlagsMVK = Flags; - -export type MetalSurfaceCreateFlagsEXT = Flags; - -export type ImagePipeSurfaceCreateFlagsFUCHSIA = Flags; - -export type StreamDescriptorSurfaceCreateFlagsGGP = Flags; - -export type HeadlessSurfaceCreateFlagsEXT = Flags; - -export type ScreenSurfaceCreateFlagsQNX = Flags; - -export type PeerMemoryFeatureFlags = Flags; - -export type PeerMemoryFeatureFlagsKHR = PeerMemoryFeatureFlags; - -export type MemoryAllocateFlags = Flags; - -export type MemoryAllocateFlagsKHR = MemoryAllocateFlags; - -export type DeviceGroupPresentModeFlagsKHR = Flags; - -export type DebugReportFlagsEXT = Flags; - -export type CommandPoolTrimFlags = Flags; - -export type CommandPoolTrimFlagsKHR = CommandPoolTrimFlags; - -export type ExternalMemoryHandleTypeFlagsNV = Flags; - -export type ExternalMemoryFeatureFlagsNV = Flags; - -export type ExternalMemoryHandleTypeFlags = Flags; - -export type ExternalMemoryHandleTypeFlagsKHR = ExternalMemoryHandleTypeFlags; - -export type ExternalMemoryFeatureFlags = Flags; - -export type ExternalMemoryFeatureFlagsKHR = ExternalMemoryFeatureFlags; - -export type ExternalSemaphoreHandleTypeFlags = Flags; - -export type ExternalSemaphoreHandleTypeFlagsKHR = ExternalSemaphoreHandleTypeFlags; - -export type ExternalSemaphoreFeatureFlags = Flags; - -export type ExternalSemaphoreFeatureFlagsKHR = ExternalSemaphoreFeatureFlags; - -export type SemaphoreImportFlags = Flags; - -export type SemaphoreImportFlagsKHR = SemaphoreImportFlags; - -export type ExternalFenceHandleTypeFlags = Flags; - -export type ExternalFenceHandleTypeFlagsKHR = ExternalFenceHandleTypeFlags; - -export type ExternalFenceFeatureFlags = Flags; - -export type ExternalFenceFeatureFlagsKHR = ExternalFenceFeatureFlags; - -export type FenceImportFlags = Flags; - -export type FenceImportFlagsKHR = FenceImportFlags; - -export type SurfaceCounterFlagsEXT = Flags; - -export type PipelineViewportSwizzleStateCreateFlagsNV = Flags; - -export type PipelineDiscardRectangleStateCreateFlagsEXT = Flags; - -export type PipelineCoverageToColorStateCreateFlagsNV = Flags; - -export type PipelineCoverageModulationStateCreateFlagsNV = Flags; - -export type PipelineCoverageReductionStateCreateFlagsNV = Flags; - -export type ValidationCacheCreateFlagsEXT = Flags; - -export type DebugUtilsMessageSeverityFlagsEXT = Flags; - -export type DebugUtilsMessageTypeFlagsEXT = Flags; - -export type DebugUtilsMessengerCreateFlagsEXT = Flags; - -export type DebugUtilsMessengerCallbackDataFlagsEXT = Flags; - -export type DeviceMemoryReportFlagsEXT = Flags; - -export type PipelineRasterizationConservativeStateCreateFlagsEXT = Flags; - -export type DescriptorBindingFlags = Flags; - -export type DescriptorBindingFlagsEXT = DescriptorBindingFlags; - -export type ConditionalRenderingFlagsEXT = Flags; - -export type ResolveModeFlags = Flags; - -export type ResolveModeFlagsKHR = ResolveModeFlags; - -export type PipelineRasterizationStateStreamCreateFlagsEXT = Flags; - -export type PipelineRasterizationDepthClipStateCreateFlagsEXT = Flags; - -export type SwapchainImageUsageFlagsANDROID = Flags; - -export type ToolPurposeFlags = Flags; - -export type ToolPurposeFlagsEXT = ToolPurposeFlags; - -export type SubmitFlags = Flags; - -export type SubmitFlagsKHR = SubmitFlags; - -export type ImageFormatConstraintsFlagsFUCHSIA = Flags; - -export type ImageConstraintsInfoFlagsFUCHSIA = Flags; - -export type GraphicsPipelineLibraryFlagsEXT = Flags; - -export type ImageCompressionFlagsEXT = Flags; - -export type ImageCompressionFixedRateFlagsEXT = Flags; - -export type ExportMetalObjectTypeFlagsEXT = Flags; - -export type DeviceAddressBindingFlagsEXT = Flags; - -export type OpticalFlowGridSizeFlagsNV = Flags; - -export type OpticalFlowUsageFlagsNV = Flags; - -export type OpticalFlowSessionCreateFlagsNV = Flags; - -export type OpticalFlowExecuteFlagsNV = Flags; - -export type VideoCodecOperationFlagsKHR = Flags; - -export type VideoCapabilityFlagsKHR = Flags; - -export type VideoSessionCreateFlagsKHR = Flags; - -export type VideoSessionParametersCreateFlagsKHR = Flags; - -export type VideoBeginCodingFlagsKHR = Flags; - -export type VideoEndCodingFlagsKHR = Flags; - -export type VideoCodingControlFlagsKHR = Flags; - -export type VideoDecodeUsageFlagsKHR = Flags; - -export type VideoDecodeCapabilityFlagsKHR = Flags; - -export type VideoDecodeFlagsKHR = Flags; - -export type VideoDecodeH264PictureLayoutFlagsEXT = Flags; - -export type VideoEncodeFlagsKHR = Flags; - -export type VideoEncodeUsageFlagsKHR = Flags; - -export type VideoEncodeContentFlagsKHR = Flags; - -export type VideoEncodeCapabilityFlagsKHR = Flags; - -export type VideoEncodeRateControlFlagsKHR = Flags; - -export type VideoEncodeRateControlModeFlagsKHR = Flags; - -export type VideoChromaSubsamplingFlagsKHR = Flags; - -export type VideoComponentBitDepthFlagsKHR = Flags; - -export type VideoEncodeH264CapabilityFlagsEXT = Flags; - -export type VideoEncodeH264InputModeFlagsEXT = Flags; - -export type VideoEncodeH264OutputModeFlagsEXT = Flags; - -export type VideoEncodeH265CapabilityFlagsEXT = Flags; - -export type VideoEncodeH265InputModeFlagsEXT = Flags; - -export type VideoEncodeH265OutputModeFlagsEXT = Flags; - -export type VideoEncodeH265CtbSizeFlagsEXT = Flags; - -export type VideoEncodeH265TransformBlockSizeFlagsEXT = Flags; - -export type Instance = Deno.PointerValue; - -export type PhysicalDevice = Deno.PointerValue; - -export type Device = Deno.PointerValue; - -export type Queue = Deno.PointerValue; - -export type CommandBuffer = Deno.PointerValue; - -export type DeviceMemory = Deno.PointerValue; - -export type CommandPool = Deno.PointerValue; - -export type Buffer = Deno.PointerValue; - -export type BufferView = Deno.PointerValue; - -export type Image = Deno.PointerValue; - -export type ImageView = Deno.PointerValue; - -export type ShaderModule = Deno.PointerValue; - -export type Pipeline = Deno.PointerValue; - -export type PipelineLayout = Deno.PointerValue; - -export type Sampler = Deno.PointerValue; - -export type DescriptorSet = Deno.PointerValue; - -export type DescriptorSetLayout = Deno.PointerValue; - -export type DescriptorPool = Deno.PointerValue; - -export type Fence = Deno.PointerValue; - -export type Semaphore = Deno.PointerValue; - -export type Event = Deno.PointerValue; - -export type QueryPool = Deno.PointerValue; - -export type Framebuffer = Deno.PointerValue; - -export type RenderPass = Deno.PointerValue; - -export type PipelineCache = Deno.PointerValue; - -export type IndirectCommandsLayoutNV = Deno.PointerValue; - -export type DescriptorUpdateTemplate = Deno.PointerValue; - -export type DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate; - -export type SamplerYcbcrConversion = Deno.PointerValue; - -export type SamplerYcbcrConversionKHR = SamplerYcbcrConversion; - -export type ValidationCacheEXT = Deno.PointerValue; - -export type AccelerationStructureKHR = Deno.PointerValue; - -export type AccelerationStructureNV = Deno.PointerValue; - -export type PerformanceConfigurationINTEL = Deno.PointerValue; - -export type BufferCollectionFUCHSIA = Deno.PointerValue; - -export type DeferredOperationKHR = Deno.PointerValue; - -export type PrivateDataSlot = Deno.PointerValue; - -export type PrivateDataSlotEXT = PrivateDataSlot; - -export type CuModuleNVX = Deno.PointerValue; - -export type CuFunctionNVX = Deno.PointerValue; - -export type OpticalFlowSessionNV = Deno.PointerValue; - -export type MicromapEXT = Deno.PointerValue; - -export type DisplayKHR = Deno.PointerValue; - -export type DisplayModeKHR = Deno.PointerValue; - -export type SurfaceKHR = Deno.PointerValue; - -export type SwapchainKHR = Deno.PointerValue; - -export type DebugReportCallbackEXT = Deno.PointerValue; - -export type DebugUtilsMessengerEXT = Deno.PointerValue; - -export type VideoSessionKHR = Deno.PointerValue; - -export type VideoSessionParametersKHR = Deno.PointerValue; - -export type PrivateDataSlotCreateFlagBitsEXT = PrivateDataSlotCreateFlagBits; - -export type DescriptorUpdateTemplateTypeKHR = DescriptorUpdateTemplateType; - -export type PointClippingBehaviorKHR = PointClippingBehavior; - -export type QueueGlobalPriorityEXT = QueueGlobalPriorityKHR; - -export type ResolveModeFlagBitsKHR = ResolveModeFlagBits; - -export type DescriptorBindingFlagBitsEXT = DescriptorBindingFlagBits; - -export type SemaphoreTypeKHR = SemaphoreType; - -export type GeometryFlagBitsNV = GeometryFlagBitsKHR; - -export type GeometryInstanceFlagBitsNV = GeometryInstanceFlagBitsKHR; - -export type BuildAccelerationStructureFlagBitsNV = BuildAccelerationStructureFlagBitsKHR; - -export type CopyAccelerationStructureModeNV = CopyAccelerationStructureModeKHR; - -export type AccelerationStructureTypeNV = AccelerationStructureTypeKHR; - -export type GeometryTypeNV = GeometryTypeKHR; - -export type RayTracingShaderGroupTypeNV = RayTracingShaderGroupTypeKHR; - -export type PipelineCreationFeedbackFlagBitsEXT = PipelineCreationFeedbackFlagBits; - -export type SemaphoreWaitFlagBitsKHR = SemaphoreWaitFlagBits; - -export type ToolPurposeFlagBitsEXT = ToolPurposeFlagBits; - -export type AccessFlagBits2KHR = AccessFlagBits2; - -export type PipelineStageFlagBits2KHR = PipelineStageFlagBits2; - -export type FormatFeatureFlagBits2KHR = FormatFeatureFlagBits2; - -export type RenderingFlagBitsKHR = RenderingFlagBits; - -export type ExternalMemoryHandleTypeFlagBitsKHR = ExternalMemoryHandleTypeFlagBits; - -export type ExternalMemoryFeatureFlagBitsKHR = ExternalMemoryFeatureFlagBits; - -export type ExternalSemaphoreHandleTypeFlagBitsKHR = ExternalSemaphoreHandleTypeFlagBits; - -export type ExternalSemaphoreFeatureFlagBitsKHR = ExternalSemaphoreFeatureFlagBits; - -export type SemaphoreImportFlagBitsKHR = SemaphoreImportFlagBits; - -export type ExternalFenceHandleTypeFlagBitsKHR = ExternalFenceHandleTypeFlagBits; - -export type ExternalFenceFeatureFlagBitsKHR = ExternalFenceFeatureFlagBits; - -export type FenceImportFlagBitsKHR = FenceImportFlagBits; - -export type PeerMemoryFeatureFlagBitsKHR = PeerMemoryFeatureFlagBits; - -export type MemoryAllocateFlagBitsKHR = MemoryAllocateFlagBits; - -export type TessellationDomainOriginKHR = TessellationDomainOrigin; - -export type SamplerYcbcrModelConversionKHR = SamplerYcbcrModelConversion; - -export type SamplerYcbcrRangeKHR = SamplerYcbcrRange; - -export type ChromaLocationKHR = ChromaLocation; - -export type SamplerReductionModeEXT = SamplerReductionMode; - -export type ShaderFloatControlsIndependenceKHR = ShaderFloatControlsIndependence; - -export type SubmitFlagBitsKHR = SubmitFlagBits; - -export type DriverIdKHR = DriverId; - -export type DevicePrivateDataCreateInfoEXT = DevicePrivateDataCreateInfo; - -export type PrivateDataSlotCreateInfoEXT = PrivateDataSlotCreateInfo; - -export type PhysicalDevicePrivateDataFeaturesEXT = PhysicalDevicePrivateDataFeatures; - -export type PhysicalDeviceFeatures2KHR = PhysicalDeviceFeatures2; - -export type PhysicalDeviceProperties2KHR = PhysicalDeviceProperties2; - -export type FormatProperties2KHR = FormatProperties2; - -export type ImageFormatProperties2KHR = ImageFormatProperties2; - -export type PhysicalDeviceImageFormatInfo2KHR = PhysicalDeviceImageFormatInfo2; - -export type QueueFamilyProperties2KHR = QueueFamilyProperties2; - -export type PhysicalDeviceMemoryProperties2KHR = PhysicalDeviceMemoryProperties2; - -export type SparseImageFormatProperties2KHR = SparseImageFormatProperties2; - -export type PhysicalDeviceSparseImageFormatInfo2KHR = PhysicalDeviceSparseImageFormatInfo2; - -export type ConformanceVersionKHR = ConformanceVersion; - -export type PhysicalDeviceDriverPropertiesKHR = PhysicalDeviceDriverProperties; - -export type PhysicalDeviceVariablePointersFeaturesKHR = PhysicalDeviceVariablePointersFeatures; - -export type PhysicalDeviceVariablePointerFeaturesKHR = PhysicalDeviceVariablePointersFeatures; - -export type PhysicalDeviceVariablePointerFeatures = PhysicalDeviceVariablePointersFeatures; - -export type ExternalMemoryPropertiesKHR = ExternalMemoryProperties; - -export type PhysicalDeviceExternalImageFormatInfoKHR = PhysicalDeviceExternalImageFormatInfo; - -export type ExternalImageFormatPropertiesKHR = ExternalImageFormatProperties; - -export type PhysicalDeviceExternalBufferInfoKHR = PhysicalDeviceExternalBufferInfo; - -export type ExternalBufferPropertiesKHR = ExternalBufferProperties; - -export type PhysicalDeviceIDPropertiesKHR = PhysicalDeviceIDProperties; - -export type ExternalMemoryImageCreateInfoKHR = ExternalMemoryImageCreateInfo; - -export type ExternalMemoryBufferCreateInfoKHR = ExternalMemoryBufferCreateInfo; - -export type ExportMemoryAllocateInfoKHR = ExportMemoryAllocateInfo; - -export type PhysicalDeviceExternalSemaphoreInfoKHR = PhysicalDeviceExternalSemaphoreInfo; - -export type ExternalSemaphorePropertiesKHR = ExternalSemaphoreProperties; - -export type ExportSemaphoreCreateInfoKHR = ExportSemaphoreCreateInfo; - -export type PhysicalDeviceExternalFenceInfoKHR = PhysicalDeviceExternalFenceInfo; - -export type ExternalFencePropertiesKHR = ExternalFenceProperties; - -export type ExportFenceCreateInfoKHR = ExportFenceCreateInfo; - -export type PhysicalDeviceMultiviewFeaturesKHR = PhysicalDeviceMultiviewFeatures; - -export type PhysicalDeviceMultiviewPropertiesKHR = PhysicalDeviceMultiviewProperties; - -export type RenderPassMultiviewCreateInfoKHR = RenderPassMultiviewCreateInfo; - -export type PhysicalDeviceGroupPropertiesKHR = PhysicalDeviceGroupProperties; - -export type MemoryAllocateFlagsInfoKHR = MemoryAllocateFlagsInfo; - -export type BindBufferMemoryInfoKHR = BindBufferMemoryInfo; - -export type BindBufferMemoryDeviceGroupInfoKHR = BindBufferMemoryDeviceGroupInfo; - -export type BindImageMemoryInfoKHR = BindImageMemoryInfo; - -export type BindImageMemoryDeviceGroupInfoKHR = BindImageMemoryDeviceGroupInfo; - -export type DeviceGroupRenderPassBeginInfoKHR = DeviceGroupRenderPassBeginInfo; - -export type DeviceGroupCommandBufferBeginInfoKHR = DeviceGroupCommandBufferBeginInfo; - -export type DeviceGroupSubmitInfoKHR = DeviceGroupSubmitInfo; - -export type DeviceGroupBindSparseInfoKHR = DeviceGroupBindSparseInfo; - -export type DeviceGroupDeviceCreateInfoKHR = DeviceGroupDeviceCreateInfo; - -export type DescriptorUpdateTemplateEntryKHR = DescriptorUpdateTemplateEntry; - -export type DescriptorUpdateTemplateCreateInfoKHR = DescriptorUpdateTemplateCreateInfo; - -export type InputAttachmentAspectReferenceKHR = InputAttachmentAspectReference; - -export type RenderPassInputAttachmentAspectCreateInfoKHR = RenderPassInputAttachmentAspectCreateInfo; - -export type PhysicalDevice16BitStorageFeaturesKHR = PhysicalDevice16BitStorageFeatures; - -export type PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR = PhysicalDeviceShaderSubgroupExtendedTypesFeatures; - -export type BufferMemoryRequirementsInfo2KHR = BufferMemoryRequirementsInfo2; - -export type DeviceBufferMemoryRequirementsKHR = DeviceBufferMemoryRequirements; - -export type ImageMemoryRequirementsInfo2KHR = ImageMemoryRequirementsInfo2; - -export type ImageSparseMemoryRequirementsInfo2KHR = ImageSparseMemoryRequirementsInfo2; - -export type DeviceImageMemoryRequirementsKHR = DeviceImageMemoryRequirements; - -export type MemoryRequirements2KHR = MemoryRequirements2; - -export type SparseImageMemoryRequirements2KHR = SparseImageMemoryRequirements2; - -export type PhysicalDevicePointClippingPropertiesKHR = PhysicalDevicePointClippingProperties; - -export type MemoryDedicatedRequirementsKHR = MemoryDedicatedRequirements; - -export type MemoryDedicatedAllocateInfoKHR = MemoryDedicatedAllocateInfo; - -export type ImageViewUsageCreateInfoKHR = ImageViewUsageCreateInfo; - -export type PipelineTessellationDomainOriginStateCreateInfoKHR = PipelineTessellationDomainOriginStateCreateInfo; - -export type SamplerYcbcrConversionInfoKHR = SamplerYcbcrConversionInfo; - -export type SamplerYcbcrConversionCreateInfoKHR = SamplerYcbcrConversionCreateInfo; - -export type BindImagePlaneMemoryInfoKHR = BindImagePlaneMemoryInfo; - -export type ImagePlaneMemoryRequirementsInfoKHR = ImagePlaneMemoryRequirementsInfo; - -export type PhysicalDeviceSamplerYcbcrConversionFeaturesKHR = PhysicalDeviceSamplerYcbcrConversionFeatures; - -export type SamplerYcbcrConversionImageFormatPropertiesKHR = SamplerYcbcrConversionImageFormatProperties; - -export type PhysicalDeviceSamplerFilterMinmaxPropertiesEXT = PhysicalDeviceSamplerFilterMinmaxProperties; - -export type SamplerReductionModeCreateInfoEXT = SamplerReductionModeCreateInfo; - -export type PhysicalDeviceInlineUniformBlockFeaturesEXT = PhysicalDeviceInlineUniformBlockFeatures; - -export type PhysicalDeviceInlineUniformBlockPropertiesEXT = PhysicalDeviceInlineUniformBlockProperties; - -export type WriteDescriptorSetInlineUniformBlockEXT = WriteDescriptorSetInlineUniformBlock; - -export type DescriptorPoolInlineUniformBlockCreateInfoEXT = DescriptorPoolInlineUniformBlockCreateInfo; - -export type ImageFormatListCreateInfoKHR = ImageFormatListCreateInfo; - -export type PhysicalDeviceMaintenance3PropertiesKHR = PhysicalDeviceMaintenance3Properties; - -export type PhysicalDeviceMaintenance4FeaturesKHR = PhysicalDeviceMaintenance4Features; - -export type PhysicalDeviceMaintenance4PropertiesKHR = PhysicalDeviceMaintenance4Properties; - -export type DescriptorSetLayoutSupportKHR = DescriptorSetLayoutSupport; - -export type PhysicalDeviceShaderDrawParameterFeatures = PhysicalDeviceShaderDrawParametersFeatures; - -export type PhysicalDeviceShaderFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; - -export type PhysicalDeviceFloat16Int8FeaturesKHR = PhysicalDeviceShaderFloat16Int8Features; - -export type PhysicalDeviceFloatControlsPropertiesKHR = PhysicalDeviceFloatControlsProperties; - -export type PhysicalDeviceHostQueryResetFeaturesEXT = PhysicalDeviceHostQueryResetFeatures; - -export type DeviceQueueGlobalPriorityCreateInfoEXT = DeviceQueueGlobalPriorityCreateInfoKHR; - -export type PhysicalDeviceGlobalPriorityQueryFeaturesEXT = PhysicalDeviceGlobalPriorityQueryFeaturesKHR; - -export type QueueFamilyGlobalPriorityPropertiesEXT = QueueFamilyGlobalPriorityPropertiesKHR; - -export type PhysicalDeviceDescriptorIndexingFeaturesEXT = PhysicalDeviceDescriptorIndexingFeatures; - -export type PhysicalDeviceDescriptorIndexingPropertiesEXT = PhysicalDeviceDescriptorIndexingProperties; - -export type DescriptorSetLayoutBindingFlagsCreateInfoEXT = DescriptorSetLayoutBindingFlagsCreateInfo; - -export type DescriptorSetVariableDescriptorCountAllocateInfoEXT = DescriptorSetVariableDescriptorCountAllocateInfo; - -export type DescriptorSetVariableDescriptorCountLayoutSupportEXT = DescriptorSetVariableDescriptorCountLayoutSupport; - -export type AttachmentDescription2KHR = AttachmentDescription2; - -export type AttachmentReference2KHR = AttachmentReference2; - -export type SubpassDescription2KHR = SubpassDescription2; - -export type SubpassDependency2KHR = SubpassDependency2; - -export type RenderPassCreateInfo2KHR = RenderPassCreateInfo2; - -export type SubpassBeginInfoKHR = SubpassBeginInfo; - -export type SubpassEndInfoKHR = SubpassEndInfo; - -export type PhysicalDeviceTimelineSemaphoreFeaturesKHR = PhysicalDeviceTimelineSemaphoreFeatures; - -export type PhysicalDeviceTimelineSemaphorePropertiesKHR = PhysicalDeviceTimelineSemaphoreProperties; - -export type SemaphoreTypeCreateInfoKHR = SemaphoreTypeCreateInfo; - -export type TimelineSemaphoreSubmitInfoKHR = TimelineSemaphoreSubmitInfo; - -export type SemaphoreWaitInfoKHR = SemaphoreWaitInfo; - -export type SemaphoreSignalInfoKHR = SemaphoreSignalInfo; - -export type PhysicalDevice8BitStorageFeaturesKHR = PhysicalDevice8BitStorageFeatures; - -export type PhysicalDeviceVulkanMemoryModelFeaturesKHR = PhysicalDeviceVulkanMemoryModelFeatures; - -export type PhysicalDeviceShaderAtomicInt64FeaturesKHR = PhysicalDeviceShaderAtomicInt64Features; - -export type PhysicalDeviceDepthStencilResolvePropertiesKHR = PhysicalDeviceDepthStencilResolveProperties; - -export type SubpassDescriptionDepthStencilResolveKHR = SubpassDescriptionDepthStencilResolve; - -export type PhysicalDeviceFragmentShaderBarycentricFeaturesNV = PhysicalDeviceFragmentShaderBarycentricFeaturesKHR; - -export type ImageStencilUsageCreateInfoEXT = ImageStencilUsageCreateInfo; - -export type PhysicalDeviceScalarBlockLayoutFeaturesEXT = PhysicalDeviceScalarBlockLayoutFeatures; - -export type PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR = PhysicalDeviceUniformBufferStandardLayoutFeatures; - -export type PhysicalDeviceBufferDeviceAddressFeaturesKHR = PhysicalDeviceBufferDeviceAddressFeatures; - -export type PhysicalDeviceBufferAddressFeaturesEXT = PhysicalDeviceBufferDeviceAddressFeaturesEXT; - -export type BufferDeviceAddressInfoKHR = BufferDeviceAddressInfo; - -export type BufferDeviceAddressInfoEXT = BufferDeviceAddressInfo; - -export type BufferOpaqueCaptureAddressCreateInfoKHR = BufferOpaqueCaptureAddressCreateInfo; - -export type PhysicalDeviceImagelessFramebufferFeaturesKHR = PhysicalDeviceImagelessFramebufferFeatures; - -export type FramebufferAttachmentsCreateInfoKHR = FramebufferAttachmentsCreateInfo; - -export type FramebufferAttachmentImageInfoKHR = FramebufferAttachmentImageInfo; - -export type RenderPassAttachmentBeginInfoKHR = RenderPassAttachmentBeginInfo; - -export type PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT = PhysicalDeviceTextureCompressionASTCHDRFeatures; - -export type PipelineCreationFeedbackEXT = PipelineCreationFeedback; - -export type PipelineCreationFeedbackCreateInfoEXT = PipelineCreationFeedbackCreateInfo; - -export type QueryPoolCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL; - -export type PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR = PhysicalDeviceSeparateDepthStencilLayoutsFeatures; - -export type AttachmentReferenceStencilLayoutKHR = AttachmentReferenceStencilLayout; - -export type AttachmentDescriptionStencilLayoutKHR = AttachmentDescriptionStencilLayout; - -export type PipelineInfoEXT = PipelineInfoKHR; - -export type PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT = PhysicalDeviceShaderDemoteToHelperInvocationFeatures; - -export type PhysicalDeviceTexelBufferAlignmentPropertiesEXT = PhysicalDeviceTexelBufferAlignmentProperties; - -export type PhysicalDeviceSubgroupSizeControlFeaturesEXT = PhysicalDeviceSubgroupSizeControlFeatures; - -export type PhysicalDeviceSubgroupSizeControlPropertiesEXT = PhysicalDeviceSubgroupSizeControlProperties; - -export type PipelineShaderStageRequiredSubgroupSizeCreateInfoEXT = PipelineShaderStageRequiredSubgroupSizeCreateInfo; - -export type MemoryOpaqueCaptureAddressAllocateInfoKHR = MemoryOpaqueCaptureAddressAllocateInfo; - -export type DeviceMemoryOpaqueCaptureAddressInfoKHR = DeviceMemoryOpaqueCaptureAddressInfo; - -export type PhysicalDevicePipelineCreationCacheControlFeaturesEXT = PhysicalDevicePipelineCreationCacheControlFeatures; - -export type PhysicalDeviceToolPropertiesEXT = PhysicalDeviceToolProperties; - -export type AabbPositionsNV = AabbPositionsKHR; - -export type TransformMatrixNV = TransformMatrixKHR; - -export type AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR; - -export type PhysicalDeviceZeroInitializeWorkgroupMemoryFeaturesKHR = PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures; - -export type PhysicalDeviceImageRobustnessFeaturesEXT = PhysicalDeviceImageRobustnessFeatures; - -export type BufferCopy2KHR = BufferCopy2; - -export type ImageCopy2KHR = ImageCopy2; - -export type ImageBlit2KHR = ImageBlit2; - -export type BufferImageCopy2KHR = BufferImageCopy2; - -export type ImageResolve2KHR = ImageResolve2; - -export type CopyBufferInfo2KHR = CopyBufferInfo2; - -export type CopyImageInfo2KHR = CopyImageInfo2; - -export type BlitImageInfo2KHR = BlitImageInfo2; - -export type CopyBufferToImageInfo2KHR = CopyBufferToImageInfo2; - -export type CopyImageToBufferInfo2KHR = CopyImageToBufferInfo2; - -export type ResolveImageInfo2KHR = ResolveImageInfo2; - -export type PhysicalDeviceShaderTerminateInvocationFeaturesKHR = PhysicalDeviceShaderTerminateInvocationFeatures; - -export type PhysicalDeviceMutableDescriptorTypeFeaturesVALVE = PhysicalDeviceMutableDescriptorTypeFeaturesEXT; - -export type MutableDescriptorTypeListVALVE = MutableDescriptorTypeListEXT; - -export type MutableDescriptorTypeCreateInfoVALVE = MutableDescriptorTypeCreateInfoEXT; - -export type MemoryBarrier2KHR = MemoryBarrier2; - -export type ImageMemoryBarrier2KHR = ImageMemoryBarrier2; - -export type BufferMemoryBarrier2KHR = BufferMemoryBarrier2; - -export type DependencyInfoKHR = DependencyInfo; - -export type SemaphoreSubmitInfoKHR = SemaphoreSubmitInfo; - -export type CommandBufferSubmitInfoKHR = CommandBufferSubmitInfo; - -export type SubmitInfo2KHR = SubmitInfo2; - -export type PhysicalDeviceSynchronization2FeaturesKHR = PhysicalDeviceSynchronization2Features; - -export type PhysicalDeviceShaderIntegerDotProductFeaturesKHR = PhysicalDeviceShaderIntegerDotProductFeatures; - -export type PhysicalDeviceShaderIntegerDotProductPropertiesKHR = PhysicalDeviceShaderIntegerDotProductProperties; - -export type FormatProperties3KHR = FormatProperties3; - -export type PipelineRenderingCreateInfoKHR = PipelineRenderingCreateInfo; - -export type RenderingInfoKHR = RenderingInfo; - -export type RenderingAttachmentInfoKHR = RenderingAttachmentInfo; - -export type PhysicalDeviceDynamicRenderingFeaturesKHR = PhysicalDeviceDynamicRenderingFeatures; - -export type CommandBufferInheritanceRenderingInfoKHR = CommandBufferInheritanceRenderingInfo; - -export type AttachmentSampleCountInfoNV = AttachmentSampleCountInfoAMD; - -export type PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesARM = PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT; - -/// Constants - -/// API Constants -/// Vulkan hardcoded constants - not an enumerated type, part of the header boilerplate - -export const MAX_PHYSICAL_DEVICE_NAME_SIZE = 256; -export const UUID_SIZE = 16; -export const LUID_SIZE = 8; -export const LUID_SIZE_KHR = undefined; -export const MAX_EXTENSION_NAME_SIZE = 256; -export const MAX_DESCRIPTION_SIZE = 256; -export const MAX_MEMORY_TYPES = 32; -/** The maximum number of unique memory heaps, each of which supporting 1 or more memory types */ -export const MAX_MEMORY_HEAPS = 16; -export const LOD_CLAMP_NONE = 1000.0; -export const REMAINING_MIP_LEVELS = (~0); -export const REMAINING_ARRAY_LAYERS = (~0); -export const WHOLE_SIZE = (~0n); -export const ATTACHMENT_UNUSED = (~0); -export const TRUE = 1; -export const FALSE = 0; -export const QUEUE_FAMILY_IGNORED = (~0); -export const QUEUE_FAMILY_EXTERNAL = (~1); -export const QUEUE_FAMILY_EXTERNAL_KHR = undefined; -export const QUEUE_FAMILY_FOREIGN_EXT = (~2); -export const SUBPASS_EXTERNAL = (~0); -export const MAX_DEVICE_GROUP_SIZE = 32; -export const MAX_DEVICE_GROUP_SIZE_KHR = undefined; -export const MAX_DRIVER_NAME_SIZE = 256; -export const MAX_DRIVER_NAME_SIZE_KHR = undefined; -export const MAX_DRIVER_INFO_SIZE = 256; -export const MAX_DRIVER_INFO_SIZE_KHR = undefined; -export const SHADER_UNUSED_KHR = (~0); -export const SHADER_UNUSED_NV = undefined; -export const MAX_GLOBAL_PRIORITY_SIZE_KHR = 16; -export const MAX_GLOBAL_PRIORITY_SIZE_EXT = undefined; -export const MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT = 32; - -/// vulkan_video_codec_h264std - -export const STD_VIDEO_H264_CPB_CNT_LIST_SIZE = 32; -export const STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS = 6; -export const STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS = 16; -export const STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS = 6; -export const STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS = 64; -export const STD_VIDEO_H264_MAX_NUM_LIST_REF = 32; -export const STD_VIDEO_H264_MAX_CHROMA_PLANES = 2; - -/// vulkan_video_codec_h264std_decode - -export const STD_VULKAN_VIDEO_CODEC_H264_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_decode"; -export const STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE = 2; - -/// vulkan_video_codec_h264std_encode - -export const STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h264_encode"; - -/// vulkan_video_codec_h265std - -export const STD_VIDEO_H265_CPB_CNT_LIST_SIZE = 32; -export const STD_VIDEO_H265_SUBLAYERS_LIST_SIZE = 7; -export const STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS = 6; -export const STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS = 16; -export const STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS = 6; -export const STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS = 64; -export const STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS = 6; -export const STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS = 64; -export const STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS = 2; -export const STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS = 64; -export const STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE = 6; -export const STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE = 19; -export const STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE = 21; -export const STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE = 3; -export const STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE = 128; -export const STD_VIDEO_H265_MAX_NUM_LIST_REF = 15; -export const STD_VIDEO_H265_MAX_CHROMA_PLANES = 2; -export const STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS = 64; -export const STD_VIDEO_H265_MAX_DPB_SIZE = 16; -export const STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS = 32; -export const STD_VIDEO_H265_MAX_LONG_TERM_PICS = 16; -export const STD_VIDEO_H265_MAX_DELTA_POC = 48; - -/// vulkan_video_codec_h265std_decode - -export const STD_VULKAN_VIDEO_CODEC_H265_DECODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_decode"; -export const STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE = 8; - -/// vulkan_video_codec_h265std_encode - -export const STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME = "VK_STD_vulkan_video_codec_h265_encode"; - -/// VK_KHR_surface - -export const KHR_SURFACE_EXTENSION_NAME = "VK_KHR_surface"; - -/// VK_KHR_swapchain - -export const KHR_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_swapchain"; - -/// VK_KHR_display - -export const KHR_DISPLAY_EXTENSION_NAME = "VK_KHR_display"; - -/// VK_KHR_display_swapchain - -export const KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME = "VK_KHR_display_swapchain"; - -/// VK_KHR_xlib_surface - -export const KHR_XLIB_SURFACE_EXTENSION_NAME = "VK_KHR_xlib_surface"; - -/// VK_KHR_xcb_surface - -export const KHR_XCB_SURFACE_EXTENSION_NAME = "VK_KHR_xcb_surface"; - -/// VK_KHR_wayland_surface - -export const KHR_WAYLAND_SURFACE_EXTENSION_NAME = "VK_KHR_wayland_surface"; - -/// VK_KHR_mir_surface - -export const KHR_MIR_SURFACE_EXTENSION_NAME = "VK_KHR_mir_surface"; - -/// VK_KHR_android_surface - -export const KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"; - -/// VK_KHR_win32_surface - -export const KHR_WIN32_SURFACE_EXTENSION_NAME = "VK_KHR_win32_surface"; - -/// VK_ANDROID_native_buffer - -export const ANDROID_NATIVE_BUFFER_NUMBER = 11; -export const ANDROID_NATIVE_BUFFER_EXTENSION_NAME = "VK_ANDROID_native_buffer"; - -/// VK_EXT_debug_report - -export const EXT_DEBUG_REPORT_EXTENSION_NAME = "VK_EXT_debug_report"; - -/// VK_NV_glsl_shader - -export const NV_GLSL_SHADER_EXTENSION_NAME = "VK_NV_glsl_shader"; - -/// VK_EXT_depth_range_unrestricted - -export const EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME = "VK_EXT_depth_range_unrestricted"; - -/// VK_KHR_sampler_mirror_clamp_to_edge - -export const KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME = "VK_KHR_sampler_mirror_clamp_to_edge"; - -/// VK_IMG_filter_cubic - -export const IMG_FILTER_CUBIC_EXTENSION_NAME = "VK_IMG_filter_cubic"; - -/// VK_AMD_extension_17 - -export const AMD_EXTENSION_17_EXTENSION_NAME = "VK_AMD_extension_17"; - -/// VK_AMD_extension_18 - -export const AMD_EXTENSION_18_EXTENSION_NAME = "VK_AMD_extension_18"; - -/// VK_AMD_rasterization_order - -export const AMD_RASTERIZATION_ORDER_EXTENSION_NAME = "VK_AMD_rasterization_order"; - -/// VK_AMD_extension_20 - -export const AMD_EXTENSION_20_EXTENSION_NAME = "VK_AMD_extension_20"; - -/// VK_AMD_shader_trinary_minmax - -export const AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME = "VK_AMD_shader_trinary_minmax"; - -/// VK_AMD_shader_explicit_vertex_parameter - -export const AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME = "VK_AMD_shader_explicit_vertex_parameter"; - -/// VK_EXT_debug_marker - -export const EXT_DEBUG_MARKER_EXTENSION_NAME = "VK_EXT_debug_marker"; - -/// VK_KHR_video_queue - -export const KHR_VIDEO_QUEUE_EXTENSION_NAME = "VK_KHR_video_queue"; - -/// VK_KHR_video_decode_queue - -export const KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_decode_queue"; - -/// VK_AMD_gcn_shader - -export const AMD_GCN_SHADER_EXTENSION_NAME = "VK_AMD_gcn_shader"; - -/// VK_NV_dedicated_allocation - -export const NV_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_NV_dedicated_allocation"; - -/// VK_EXT_extension_28 - -export const EXT_EXTENSION_28_EXTENSION_NAME = "VK_EXT_extension_28"; - -/// VK_EXT_transform_feedback - -export const EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME = "VK_EXT_transform_feedback"; - -/// VK_NVX_binary_import - -export const NVX_BINARY_IMPORT_EXTENSION_NAME = "VK_NVX_binary_import"; - -/// VK_NVX_image_view_handle - -export const NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME = "VK_NVX_image_view_handle"; - -/// VK_AMD_extension_32 - -export const AMD_EXTENSION_32_EXTENSION_NAME = "VK_AMD_extension_32"; - -/// VK_AMD_extension_33 - -export const AMD_EXTENSION_33_EXTENSION_NAME = "VK_AMD_extension_33"; - -/// VK_AMD_draw_indirect_count - -export const AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_AMD_draw_indirect_count"; - -/// VK_AMD_extension_35 - -export const AMD_EXTENSION_35_EXTENSION_NAME = "VK_AMD_extension_35"; - -/// VK_AMD_negative_viewport_height - -export const AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME = "VK_AMD_negative_viewport_height"; - -/// VK_AMD_gpu_shader_half_float - -export const AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME = "VK_AMD_gpu_shader_half_float"; - -/// VK_AMD_shader_ballot - -export const AMD_SHADER_BALLOT_EXTENSION_NAME = "VK_AMD_shader_ballot"; - -/// VK_EXT_video_encode_h264 - -export const EXT_VIDEO_ENCODE_H264_EXTENSION_NAME = "VK_EXT_video_encode_h264"; - -/// VK_EXT_video_encode_h265 - -export const EXT_VIDEO_ENCODE_H265_EXTENSION_NAME = "VK_EXT_video_encode_h265"; - -/// VK_EXT_video_decode_h264 - -export const EXT_VIDEO_DECODE_H264_EXTENSION_NAME = "VK_EXT_video_decode_h264"; - -/// VK_AMD_texture_gather_bias_lod - -export const AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME = "VK_AMD_texture_gather_bias_lod"; - -/// VK_AMD_shader_info - -export const AMD_SHADER_INFO_EXTENSION_NAME = "VK_AMD_shader_info"; - -/// VK_AMD_extension_44 - -export const AMD_EXTENSION_44_EXTENSION_NAME = "VK_AMD_extension_44"; - -/// VK_KHR_dynamic_rendering - -export const KHR_DYNAMIC_RENDERING_EXTENSION_NAME = "VK_KHR_dynamic_rendering"; - -/// VK_AMD_extension_46 - -export const AMD_EXTENSION_46_EXTENSION_NAME = "VK_AMD_extension_46"; - -/// VK_AMD_shader_image_load_store_lod - -export const AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME = "VK_AMD_shader_image_load_store_lod"; - -/// VK_NVX_extension_48 - -export const NVX_EXTENSION_48_EXTENSION_NAME = "VK_NVX_extension_48"; - -/// VK_GOOGLE_extension_49 - -export const GOOGLE_EXTENSION_49_EXTENSION_NAME = "VK_GOOGLE_extension_49"; - -/// VK_GGP_stream_descriptor_surface - -export const GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME = "VK_GGP_stream_descriptor_surface"; - -/// VK_NV_corner_sampled_image - -export const NV_CORNER_SAMPLED_IMAGE_EXTENSION_NAME = "VK_NV_corner_sampled_image"; - -/// VK_NV_extension_52 - -export const NV_EXTENSION_52_EXTENSION_NAME = "VK_NV_extension_52"; - -/// VK_NV_extension_53 - -export const NV_EXTENSION_53_EXTENSION_NAME = "VK_NV_extension_53"; - -/// VK_KHR_multiview - -export const KHR_MULTIVIEW_EXTENSION_NAME = "VK_KHR_multiview"; - -/// VK_IMG_format_pvrtc - -export const IMG_FORMAT_PVRTC_EXTENSION_NAME = "VK_IMG_format_pvrtc"; - -/// VK_NV_external_memory_capabilities - -export const NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_NV_external_memory_capabilities"; - -/// VK_NV_external_memory - -export const NV_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_NV_external_memory"; - -/// VK_NV_external_memory_win32 - -export const NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_NV_external_memory_win32"; - -/// VK_NV_win32_keyed_mutex - -export const NV_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_NV_win32_keyed_mutex"; - -/// VK_KHR_get_physical_device_properties2 - -export const KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_physical_device_properties2"; - -/// VK_KHR_device_group - -export const KHR_DEVICE_GROUP_EXTENSION_NAME = "VK_KHR_device_group"; - -/// VK_EXT_validation_flags - -export const EXT_VALIDATION_FLAGS_EXTENSION_NAME = "VK_EXT_validation_flags"; - -/// VK_NN_vi_surface - -export const NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"; - -/// VK_KHR_shader_draw_parameters - -export const KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME = "VK_KHR_shader_draw_parameters"; - -/// VK_EXT_shader_subgroup_ballot - -export const EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME = "VK_EXT_shader_subgroup_ballot"; - -/// VK_EXT_shader_subgroup_vote - -export const EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME = "VK_EXT_shader_subgroup_vote"; - -/// VK_EXT_texture_compression_astc_hdr - -export const EXT_TEXTURE_COMPRESSION_ASTC_HDR_EXTENSION_NAME = "VK_EXT_texture_compression_astc_hdr"; - -/// VK_EXT_astc_decode_mode - -export const EXT_ASTC_DECODE_MODE_EXTENSION_NAME = "VK_EXT_astc_decode_mode"; - -/// VK_EXT_pipeline_robustness - -export const EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_pipeline_robustness"; - -/// VK_KHR_maintenance1 - -export const KHR_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_maintenance1"; - -/// VK_KHR_device_group_creation - -export const KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME = "VK_KHR_device_group_creation"; - -/// VK_KHR_external_memory_capabilities - -export const KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_memory_capabilities"; - -/// VK_KHR_external_memory - -export const KHR_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_KHR_external_memory"; - -/// VK_KHR_external_memory_win32 - -export const KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32"; - -/// VK_KHR_external_memory_fd - -export const KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME = "VK_KHR_external_memory_fd"; - -/// VK_KHR_win32_keyed_mutex - -export const KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_KHR_win32_keyed_mutex"; - -/// VK_KHR_external_semaphore_capabilities - -export const KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_semaphore_capabilities"; - -/// VK_KHR_external_semaphore - -export const KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_KHR_external_semaphore"; - -/// VK_KHR_external_semaphore_win32 - -export const KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME = "VK_KHR_external_semaphore_win32"; - -/// VK_KHR_external_semaphore_fd - -export const KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME = "VK_KHR_external_semaphore_fd"; - -/// VK_KHR_push_descriptor - -export const KHR_PUSH_DESCRIPTOR_EXTENSION_NAME = "VK_KHR_push_descriptor"; - -/// VK_EXT_conditional_rendering - -export const EXT_CONDITIONAL_RENDERING_EXTENSION_NAME = "VK_EXT_conditional_rendering"; - -/// VK_KHR_shader_float16_int8 - -export const KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME = "VK_KHR_shader_float16_int8"; - -/// VK_KHR_16bit_storage - -export const KHR_16BIT_STORAGE_EXTENSION_NAME = "VK_KHR_16bit_storage"; - -/// VK_KHR_incremental_present - -export const KHR_INCREMENTAL_PRESENT_EXTENSION_NAME = "VK_KHR_incremental_present"; - -/// VK_KHR_descriptor_update_template - -export const KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME = "VK_KHR_descriptor_update_template"; - -/// VK_NVX_device_generated_commands - -export const NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NVX_device_generated_commands"; - -/// VK_NV_clip_space_w_scaling - -export const NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME = "VK_NV_clip_space_w_scaling"; - -/// VK_EXT_direct_mode_display - -export const EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME = "VK_EXT_direct_mode_display"; - -/// VK_EXT_acquire_xlib_display - -export const EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_xlib_display"; - -/// VK_EXT_display_surface_counter - -export const EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME = "VK_EXT_display_surface_counter"; - -/// VK_EXT_display_control - -export const EXT_DISPLAY_CONTROL_EXTENSION_NAME = "VK_EXT_display_control"; - -/// VK_GOOGLE_display_timing - -export const GOOGLE_DISPLAY_TIMING_EXTENSION_NAME = "VK_GOOGLE_display_timing"; - -/// VK_RESERVED_do_not_use_94 - -export const RESERVED_DO_NOT_USE_94_EXTENSION_NAME = "VK_RESERVED_do_not_use_94"; - -/// VK_NV_sample_mask_override_coverage - -export const NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME = "VK_NV_sample_mask_override_coverage"; - -/// VK_NV_geometry_shader_passthrough - -export const NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME = "VK_NV_geometry_shader_passthrough"; - -/// VK_NV_viewport_array2 - -export const NV_VIEWPORT_ARRAY_2_EXTENSION_NAME = "VK_NV_viewport_array2"; - -/// VK_NVX_multiview_per_view_attributes - -export const NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME = "VK_NVX_multiview_per_view_attributes"; - -/// VK_NV_viewport_swizzle - -export const NV_VIEWPORT_SWIZZLE_EXTENSION_NAME = "VK_NV_viewport_swizzle"; - -/// VK_EXT_discard_rectangles - -export const EXT_DISCARD_RECTANGLES_EXTENSION_NAME = "VK_EXT_discard_rectangles"; - -/// VK_NV_extension_101 - -export const NV_EXTENSION_101_EXTENSION_NAME = "VK_NV_extension_101"; - -/// VK_EXT_conservative_rasterization - -export const EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_conservative_rasterization"; - -/// VK_EXT_depth_clip_enable - -export const EXT_DEPTH_CLIP_ENABLE_EXTENSION_NAME = "VK_EXT_depth_clip_enable"; - -/// VK_NV_extension_104 - -export const NV_EXTENSION_104_EXTENSION_NAME = "VK_NV_extension_104"; - -/// VK_EXT_swapchain_colorspace - -export const EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME = "VK_EXT_swapchain_colorspace"; - -/// VK_EXT_hdr_metadata - -export const EXT_HDR_METADATA_EXTENSION_NAME = "VK_EXT_hdr_metadata"; - -/// VK_IMG_extension_107 - -export const IMG_EXTENSION_107_EXTENSION_NAME = "VK_IMG_extension_107"; - -/// VK_IMG_extension_108 - -export const IMG_EXTENSION_108_EXTENSION_NAME = "VK_IMG_extension_108"; - -/// VK_KHR_imageless_framebuffer - -export const KHR_IMAGELESS_FRAMEBUFFER_EXTENSION_NAME = "VK_KHR_imageless_framebuffer"; - -/// VK_KHR_create_renderpass2 - -export const KHR_CREATE_RENDERPASS_2_EXTENSION_NAME = "VK_KHR_create_renderpass2"; - -/// VK_IMG_extension_111 - -export const IMG_EXTENSION_111_EXTENSION_NAME = "VK_IMG_extension_111"; - -/// VK_KHR_shared_presentable_image - -export const KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME = "VK_KHR_shared_presentable_image"; - -/// VK_KHR_external_fence_capabilities - -export const KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME = "VK_KHR_external_fence_capabilities"; - -/// VK_KHR_external_fence - -export const KHR_EXTERNAL_FENCE_EXTENSION_NAME = "VK_KHR_external_fence"; - -/// VK_KHR_external_fence_win32 - -export const KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32"; - -/// VK_KHR_external_fence_fd - -export const KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME = "VK_KHR_external_fence_fd"; - -/// VK_KHR_performance_query - -export const KHR_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_KHR_performance_query"; - -/// VK_KHR_maintenance2 - -export const KHR_MAINTENANCE_2_EXTENSION_NAME = "VK_KHR_maintenance2"; - -/// VK_KHR_extension_119 - -export const KHR_EXTENSION_119_EXTENSION_NAME = "VK_KHR_extension_119"; - -/// VK_KHR_get_surface_capabilities2 - -export const KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME = "VK_KHR_get_surface_capabilities2"; - -/// VK_KHR_variable_pointers - -export const KHR_VARIABLE_POINTERS_EXTENSION_NAME = "VK_KHR_variable_pointers"; - -/// VK_KHR_get_display_properties2 - -export const KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME = "VK_KHR_get_display_properties2"; - -/// VK_MVK_ios_surface - -export const MVK_IOS_SURFACE_EXTENSION_NAME = "VK_MVK_ios_surface"; - -/// VK_MVK_macos_surface - -export const MVK_MACOS_SURFACE_EXTENSION_NAME = "VK_MVK_macos_surface"; - -/// VK_MVK_moltenvk - -export const MVK_MOLTENVK_EXTENSION_NAME = "VK_MVK_moltenvk"; - -/// VK_EXT_external_memory_dma_buf - -export const EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME = "VK_EXT_external_memory_dma_buf"; - -/// VK_EXT_queue_family_foreign - -export const EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME = "VK_EXT_queue_family_foreign"; - -/// VK_KHR_dedicated_allocation - -export const KHR_DEDICATED_ALLOCATION_EXTENSION_NAME = "VK_KHR_dedicated_allocation"; - -/// VK_EXT_debug_utils - -export const EXT_DEBUG_UTILS_EXTENSION_NAME = "VK_EXT_debug_utils"; - -/// VK_ANDROID_external_memory_android_hardware_buffer - -export const ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = "VK_ANDROID_external_memory_android_hardware_buffer"; - -/// VK_EXT_sampler_filter_minmax - -export const EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME = "VK_EXT_sampler_filter_minmax"; - -/// VK_KHR_storage_buffer_storage_class - -export const KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME = "VK_KHR_storage_buffer_storage_class"; - -/// VK_AMD_gpu_shader_int16 - -export const AMD_GPU_SHADER_INT16_EXTENSION_NAME = "VK_AMD_gpu_shader_int16"; - -/// VK_AMD_extension_134 - -export const AMD_EXTENSION_134_EXTENSION_NAME = "VK_AMD_extension_134"; - -/// VK_AMD_extension_135 - -export const AMD_EXTENSION_135_EXTENSION_NAME = "VK_AMD_extension_135"; - -/// VK_AMD_extension_136 - -export const AMD_EXTENSION_136_EXTENSION_NAME = "VK_AMD_extension_136"; - -/// VK_AMD_mixed_attachment_samples - -export const AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME = "VK_AMD_mixed_attachment_samples"; - -/// VK_AMD_shader_fragment_mask - -export const AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME = "VK_AMD_shader_fragment_mask"; - -/// VK_EXT_inline_uniform_block - -export const EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME = "VK_EXT_inline_uniform_block"; - -/// VK_AMD_extension_140 - -export const AMD_EXTENSION_140_EXTENSION_NAME = "VK_AMD_extension_140"; - -/// VK_EXT_shader_stencil_export - -export const EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME = "VK_EXT_shader_stencil_export"; - -/// VK_AMD_extension_142 - -export const AMD_EXTENSION_142_EXTENSION_NAME = "VK_AMD_extension_142"; - -/// VK_AMD_extension_143 - -export const AMD_EXTENSION_143_EXTENSION_NAME = "VK_AMD_extension_143"; - -/// VK_EXT_sample_locations - -export const EXT_SAMPLE_LOCATIONS_EXTENSION_NAME = "VK_EXT_sample_locations"; - -/// VK_KHR_relaxed_block_layout - -export const KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME = "VK_KHR_relaxed_block_layout"; - -/// VK_RESERVED_do_not_use_146 - -export const RESERVED_DO_NOT_USE_146_EXTENSION_NAME = "VK_RESERVED_do_not_use_146"; - -/// VK_KHR_get_memory_requirements2 - -export const KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME = "VK_KHR_get_memory_requirements2"; - -/// VK_KHR_image_format_list - -export const KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME = "VK_KHR_image_format_list"; - -/// VK_EXT_blend_operation_advanced - -export const EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME = "VK_EXT_blend_operation_advanced"; - -/// VK_NV_fragment_coverage_to_color - -export const NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME = "VK_NV_fragment_coverage_to_color"; - -/// VK_KHR_acceleration_structure - -export const KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME = "VK_KHR_acceleration_structure"; - -/// VK_KHR_ray_tracing_pipeline - -export const KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline"; - -/// VK_KHR_ray_query - -export const KHR_RAY_QUERY_EXTENSION_NAME = "VK_KHR_ray_query"; - -/// VK_NV_extension_152 - -export const NV_EXTENSION_152_EXTENSION_NAME = "VK_NV_extension_152"; - -/// VK_NV_framebuffer_mixed_samples - -export const NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME = "VK_NV_framebuffer_mixed_samples"; - -/// VK_NV_fill_rectangle - -export const NV_FILL_RECTANGLE_EXTENSION_NAME = "VK_NV_fill_rectangle"; - -/// VK_NV_shader_sm_builtins - -export const NV_SHADER_SM_BUILTINS_EXTENSION_NAME = "VK_NV_shader_sm_builtins"; - -/// VK_EXT_post_depth_coverage - -export const EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME = "VK_EXT_post_depth_coverage"; - -/// VK_KHR_sampler_ycbcr_conversion - -export const KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME = "VK_KHR_sampler_ycbcr_conversion"; - -/// VK_KHR_bind_memory2 - -export const KHR_BIND_MEMORY_2_EXTENSION_NAME = "VK_KHR_bind_memory2"; - -/// VK_EXT_image_drm_format_modifier - -export const EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME = "VK_EXT_image_drm_format_modifier"; - -/// VK_EXT_extension_160 - -export const EXT_EXTENSION_160_EXTENSION_NAME = "VK_EXT_extension_160"; - -/// VK_EXT_validation_cache - -export const EXT_VALIDATION_CACHE_EXTENSION_NAME = "VK_EXT_validation_cache"; - -/// VK_EXT_descriptor_indexing - -export const EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME = "VK_EXT_descriptor_indexing"; - -/// VK_EXT_shader_viewport_index_layer - -export const EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME = "VK_EXT_shader_viewport_index_layer"; - -/// VK_KHR_portability_subset - -export const KHR_PORTABILITY_SUBSET_EXTENSION_NAME = "VK_KHR_portability_subset"; - -/// VK_NV_shading_rate_image - -export const NV_SHADING_RATE_IMAGE_EXTENSION_NAME = "VK_NV_shading_rate_image"; - -/// VK_NV_ray_tracing - -export const NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"; - -/// VK_NV_representative_fragment_test - -export const NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME = "VK_NV_representative_fragment_test"; - -/// VK_NV_extension_168 - -export const NV_EXTENSION_168_EXTENSION_NAME = "VK_NV_extension_168"; - -/// VK_KHR_maintenance3 - -export const KHR_MAINTENANCE_3_EXTENSION_NAME = "VK_KHR_maintenance3"; - -/// VK_KHR_draw_indirect_count - -export const KHR_DRAW_INDIRECT_COUNT_EXTENSION_NAME = "VK_KHR_draw_indirect_count"; - -/// VK_EXT_filter_cubic - -export const EXT_FILTER_CUBIC_EXTENSION_NAME = "VK_EXT_filter_cubic"; - -/// VK_QCOM_render_pass_shader_resolve - -export const QCOM_RENDER_PASS_SHADER_RESOLVE_EXTENSION_NAME = "VK_QCOM_render_pass_shader_resolve"; - -/// VK_QCOM_extension_173 - -export const QCOM_EXTENSION_173_EXTENSION_NAME = "VK_QCOM_extension_173"; - -/// VK_QCOM_extension_174 - -export const QCOM_EXTENSION_174_EXTENSION_NAME = "VK_QCOM_extension_174"; - -/// VK_EXT_global_priority - -export const EXT_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_EXT_global_priority"; - -/// VK_KHR_shader_subgroup_extended_types - -export const KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME = "VK_KHR_shader_subgroup_extended_types"; - -/// VK_EXT_extension_177 - -export const EXT_EXTENSION_177_EXTENSION_NAME = "VK_EXT_extension_177"; - -/// VK_KHR_8bit_storage - -export const KHR_8BIT_STORAGE_EXTENSION_NAME = "VK_KHR_8bit_storage"; - -/// VK_EXT_external_memory_host - -export const EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME = "VK_EXT_external_memory_host"; - -/// VK_AMD_buffer_marker - -export const AMD_BUFFER_MARKER_EXTENSION_NAME = "VK_AMD_buffer_marker"; - -/// VK_KHR_shader_atomic_int64 - -export const KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME = "VK_KHR_shader_atomic_int64"; - -/// VK_KHR_shader_clock - -export const KHR_SHADER_CLOCK_EXTENSION_NAME = "VK_KHR_shader_clock"; - -/// VK_AMD_extension_183 - -export const AMD_EXTENSION_183_EXTENSION_NAME = "VK_AMD_extension_183"; - -/// VK_AMD_pipeline_compiler_control - -export const AMD_PIPELINE_COMPILER_CONTROL_EXTENSION_NAME = "VK_AMD_pipeline_compiler_control"; - -/// VK_EXT_calibrated_timestamps - -export const EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME = "VK_EXT_calibrated_timestamps"; - -/// VK_AMD_shader_core_properties - -export const AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME = "VK_AMD_shader_core_properties"; - -/// VK_AMD_extension_187 - -export const AMD_EXTENSION_187_EXTENSION_NAME = "VK_AMD_extension_187"; - -/// VK_EXT_video_decode_h265 - -export const EXT_VIDEO_DECODE_H265_EXTENSION_NAME = "VK_EXT_video_decode_h265"; - -/// VK_KHR_global_priority - -export const KHR_GLOBAL_PRIORITY_EXTENSION_NAME = "VK_KHR_global_priority"; - -/// VK_AMD_memory_overallocation_behavior - -export const AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME = "VK_AMD_memory_overallocation_behavior"; - -/// VK_EXT_vertex_attribute_divisor - -export const EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME = "VK_EXT_vertex_attribute_divisor"; - -/// VK_GGP_frame_token - -export const GGP_FRAME_TOKEN_EXTENSION_NAME = "VK_GGP_frame_token"; - -/// VK_EXT_pipeline_creation_feedback - -export const EXT_PIPELINE_CREATION_FEEDBACK_EXTENSION_NAME = "VK_EXT_pipeline_creation_feedback"; - -/// VK_GOOGLE_extension_194 - -export const GOOGLE_EXTENSION_194_EXTENSION_NAME = "VK_GOOGLE_extension_194"; - -/// VK_GOOGLE_extension_195 - -export const GOOGLE_EXTENSION_195_EXTENSION_NAME = "VK_GOOGLE_extension_195"; - -/// VK_GOOGLE_extension_196 - -export const GOOGLE_EXTENSION_196_EXTENSION_NAME = "VK_GOOGLE_extension_196"; - -/// VK_KHR_driver_properties - -export const KHR_DRIVER_PROPERTIES_EXTENSION_NAME = "VK_KHR_driver_properties"; - -/// VK_KHR_shader_float_controls - -export const KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME = "VK_KHR_shader_float_controls"; - -/// VK_NV_shader_subgroup_partitioned - -export const NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME = "VK_NV_shader_subgroup_partitioned"; - -/// VK_KHR_depth_stencil_resolve - -export const KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME = "VK_KHR_depth_stencil_resolve"; - -/// VK_KHR_swapchain_mutable_format - -export const KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME = "VK_KHR_swapchain_mutable_format"; - -/// VK_NV_compute_shader_derivatives - -export const NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME = "VK_NV_compute_shader_derivatives"; - -/// VK_NV_mesh_shader - -export const NV_MESH_SHADER_EXTENSION_NAME = "VK_NV_mesh_shader"; - -/// VK_NV_fragment_shader_barycentric - -export const NV_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_NV_fragment_shader_barycentric"; - -/// VK_NV_shader_image_footprint - -export const NV_SHADER_IMAGE_FOOTPRINT_EXTENSION_NAME = "VK_NV_shader_image_footprint"; - -/// VK_NV_scissor_exclusive - -export const NV_SCISSOR_EXCLUSIVE_EXTENSION_NAME = "VK_NV_scissor_exclusive"; - -/// VK_NV_device_diagnostic_checkpoints - -export const NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME = "VK_NV_device_diagnostic_checkpoints"; - -/// VK_KHR_timeline_semaphore - -export const KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME = "VK_KHR_timeline_semaphore"; - -/// VK_KHR_extension_209 - -export const KHR_EXTENSION_209_EXTENSION_NAME = "VK_KHR_extension_209"; - -/// VK_INTEL_shader_integer_functions2 - -export const INTEL_SHADER_INTEGER_FUNCTIONS_2_EXTENSION_NAME = "VK_INTEL_shader_integer_functions2"; - -/// VK_INTEL_performance_query - -export const INTEL_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_INTEL_performance_query"; - -/// VK_KHR_vulkan_memory_model - -export const KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME = "VK_KHR_vulkan_memory_model"; - -/// VK_EXT_pci_bus_info - -export const EXT_PCI_BUS_INFO_EXTENSION_NAME = "VK_EXT_pci_bus_info"; - -/// VK_AMD_display_native_hdr - -export const AMD_DISPLAY_NATIVE_HDR_EXTENSION_NAME = "VK_AMD_display_native_hdr"; - -/// VK_FUCHSIA_imagepipe_surface - -export const FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME = "VK_FUCHSIA_imagepipe_surface"; - -/// VK_KHR_shader_terminate_invocation - -export const KHR_SHADER_TERMINATE_INVOCATION_EXTENSION_NAME = "VK_KHR_shader_terminate_invocation"; - -/// VK_GOOGLE_extension_217 - -export const GOOGLE_EXTENSION_217_EXTENSION_NAME = "VK_GOOGLE_extension_217"; - -/// VK_EXT_metal_surface - -export const EXT_METAL_SURFACE_EXTENSION_NAME = "VK_EXT_metal_surface"; - -/// VK_EXT_fragment_density_map - -export const EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME = "VK_EXT_fragment_density_map"; - -/// VK_EXT_extension_220 - -export const EXT_EXTENSION_220_EXTENSION_NAME = "VK_EXT_extension_220"; - -/// VK_KHR_extension_221 - -export const KHR_EXTENSION_221_EXTENSION_NAME = "VK_KHR_extension_221"; - -/// VK_EXT_scalar_block_layout - -export const EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME = "VK_EXT_scalar_block_layout"; - -/// VK_EXT_extension_223 - -export const EXT_EXTENSION_223_EXTENSION_NAME = "VK_EXT_extension_223"; - -/// VK_GOOGLE_hlsl_functionality1 - -export const GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME = "VK_GOOGLE_hlsl_functionality1"; - -/// VK_GOOGLE_decorate_string - -export const GOOGLE_DECORATE_STRING_EXTENSION_NAME = "VK_GOOGLE_decorate_string"; - -/// VK_EXT_subgroup_size_control - -export const EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME = "VK_EXT_subgroup_size_control"; - -/// VK_KHR_fragment_shading_rate - -export const KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME = "VK_KHR_fragment_shading_rate"; - -/// VK_AMD_shader_core_properties2 - -export const AMD_SHADER_CORE_PROPERTIES_2_EXTENSION_NAME = "VK_AMD_shader_core_properties2"; - -/// VK_AMD_extension_229 - -export const AMD_EXTENSION_229_EXTENSION_NAME = "VK_AMD_extension_229"; - -/// VK_AMD_device_coherent_memory - -export const AMD_DEVICE_COHERENT_MEMORY_EXTENSION_NAME = "VK_AMD_device_coherent_memory"; - -/// VK_AMD_extension_231 - -export const AMD_EXTENSION_231_EXTENSION_NAME = "VK_AMD_extension_231"; - -/// VK_AMD_extension_232 - -export const AMD_EXTENSION_232_EXTENSION_NAME = "VK_AMD_extension_232"; - -/// VK_AMD_extension_233 - -export const AMD_EXTENSION_233_EXTENSION_NAME = "VK_AMD_extension_233"; - -/// VK_AMD_extension_234 - -export const AMD_EXTENSION_234_EXTENSION_NAME = "VK_AMD_extension_234"; - -/// VK_EXT_shader_image_atomic_int64 - -export const EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME = "VK_EXT_shader_image_atomic_int64"; - -/// VK_AMD_extension_236 - -export const AMD_EXTENSION_236_EXTENSION_NAME = "VK_AMD_extension_236"; - -/// VK_KHR_spirv_1_4 - -export const KHR_SPIRV_1_4_EXTENSION_NAME = "VK_KHR_spirv_1_4"; - -/// VK_EXT_memory_budget - -export const EXT_MEMORY_BUDGET_EXTENSION_NAME = "VK_EXT_memory_budget"; - -/// VK_EXT_memory_priority - -export const EXT_MEMORY_PRIORITY_EXTENSION_NAME = "VK_EXT_memory_priority"; - -/// VK_KHR_surface_protected_capabilities - -export const KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME = "VK_KHR_surface_protected_capabilities"; - -/// VK_NV_dedicated_allocation_image_aliasing - -export const NV_DEDICATED_ALLOCATION_IMAGE_ALIASING_EXTENSION_NAME = "VK_NV_dedicated_allocation_image_aliasing"; - -/// VK_KHR_separate_depth_stencil_layouts - -export const KHR_SEPARATE_DEPTH_STENCIL_LAYOUTS_EXTENSION_NAME = "VK_KHR_separate_depth_stencil_layouts"; - -/// VK_INTEL_extension_243 - -export const INTEL_EXTENSION_243_EXTENSION_NAME = "VK_INTEL_extension_243"; - -/// VK_MESA_extension_244 - -export const MESA_EXTENSION_244_EXTENSION_NAME = "VK_MESA_extension_244"; - -/// VK_EXT_buffer_device_address - -export const EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_EXT_buffer_device_address"; - -/// VK_EXT_tooling_info - -export const EXT_TOOLING_INFO_EXTENSION_NAME = "VK_EXT_tooling_info"; - -/// VK_EXT_separate_stencil_usage - -export const EXT_SEPARATE_STENCIL_USAGE_EXTENSION_NAME = "VK_EXT_separate_stencil_usage"; - -/// VK_EXT_validation_features - -export const EXT_VALIDATION_FEATURES_EXTENSION_NAME = "VK_EXT_validation_features"; - -/// VK_KHR_present_wait - -export const KHR_PRESENT_WAIT_EXTENSION_NAME = "VK_KHR_present_wait"; - -/// VK_NV_cooperative_matrix - -export const NV_COOPERATIVE_MATRIX_EXTENSION_NAME = "VK_NV_cooperative_matrix"; - -/// VK_NV_coverage_reduction_mode - -export const NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME = "VK_NV_coverage_reduction_mode"; - -/// VK_EXT_fragment_shader_interlock - -export const EXT_FRAGMENT_SHADER_INTERLOCK_EXTENSION_NAME = "VK_EXT_fragment_shader_interlock"; - -/// VK_EXT_ycbcr_image_arrays - -export const EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME = "VK_EXT_ycbcr_image_arrays"; - -/// VK_KHR_uniform_buffer_standard_layout - -export const KHR_UNIFORM_BUFFER_STANDARD_LAYOUT_EXTENSION_NAME = "VK_KHR_uniform_buffer_standard_layout"; - -/// VK_EXT_provoking_vertex - -export const EXT_PROVOKING_VERTEX_EXTENSION_NAME = "VK_EXT_provoking_vertex"; - -/// VK_EXT_full_screen_exclusive - -export const EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME = "VK_EXT_full_screen_exclusive"; - -/// VK_EXT_headless_surface - -export const EXT_HEADLESS_SURFACE_EXTENSION_NAME = "VK_EXT_headless_surface"; - -/// VK_KHR_buffer_device_address - -export const KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME = "VK_KHR_buffer_device_address"; - -/// VK_EXT_extension_259 - -export const EXT_EXTENSION_259_EXTENSION_NAME = "VK_EXT_extension_259"; - -/// VK_EXT_line_rasterization - -export const EXT_LINE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_line_rasterization"; - -/// VK_EXT_shader_atomic_float - -export const EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME = "VK_EXT_shader_atomic_float"; - -/// VK_EXT_host_query_reset - -export const EXT_HOST_QUERY_RESET_EXTENSION_NAME = "VK_EXT_host_query_reset"; - -/// VK_GGP_extension_263 - -export const GGP_EXTENSION_263_EXTENSION_NAME = "VK_GGP_extension_263"; - -/// VK_BRCM_extension_264 - -export const BRCM_EXTENSION_264_EXTENSION_NAME = "VK_BRCM_extension_264"; - -/// VK_BRCM_extension_265 - -export const BRCM_EXTENSION_265_EXTENSION_NAME = "VK_BRCM_extension_265"; - -/// VK_EXT_index_type_uint8 - -export const EXT_INDEX_TYPE_UINT8_EXTENSION_NAME = "VK_EXT_index_type_uint8"; - -/// VK_EXT_extension_267 - -export const EXT_EXTENSION_267_EXTENSION_NAME = "VK_EXT_extension_267"; - -/// VK_EXT_extended_dynamic_state - -export const EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_extended_dynamic_state"; - -/// VK_KHR_deferred_host_operations - -export const KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME = "VK_KHR_deferred_host_operations"; - -/// VK_KHR_pipeline_executable_properties - -export const KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME = "VK_KHR_pipeline_executable_properties"; - -/// VK_INTEL_extension_271 - -export const INTEL_EXTENSION_271_EXTENSION_NAME = "VK_INTEL_extension_271"; - -/// VK_INTEL_extension_272 - -export const INTEL_EXTENSION_272_EXTENSION_NAME = "VK_INTEL_extension_272"; - -/// VK_INTEL_extension_273 - -export const INTEL_EXTENSION_273_EXTENSION_NAME = "VK_INTEL_extension_273"; - -/// VK_EXT_shader_atomic_float2 - -export const EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME = "VK_EXT_shader_atomic_float2"; - -/// VK_KHR_extension_275 - -export const KHR_EXTENSION_275_EXTENSION_NAME = "VK_KHR_extension_275"; - -/// VK_KHR_extension_276 - -export const KHR_EXTENSION_276_EXTENSION_NAME = "VK_KHR_extension_276"; - -/// VK_EXT_shader_demote_to_helper_invocation - -export const EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME = "VK_EXT_shader_demote_to_helper_invocation"; - -/// VK_NV_device_generated_commands - -export const NV_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME = "VK_NV_device_generated_commands"; - -/// VK_NV_inherited_viewport_scissor - -export const NV_INHERITED_VIEWPORT_SCISSOR_EXTENSION_NAME = "VK_NV_inherited_viewport_scissor"; - -/// VK_KHR_extension_280 - -export const KHR_EXTENSION_280_EXTENSION_NAME = "VK_KHR_extension_280"; - -/// VK_KHR_shader_integer_dot_product - -export const KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME = "VK_KHR_shader_integer_dot_product"; - -/// VK_EXT_texel_buffer_alignment - -export const EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME = "VK_EXT_texel_buffer_alignment"; - -/// VK_QCOM_render_pass_transform - -export const QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME = "VK_QCOM_render_pass_transform"; - -/// VK_EXT_extension_284 - -export const EXT_EXTENSION_284_EXTENSION_NAME = "VK_EXT_extension_284"; - -/// VK_EXT_device_memory_report - -export const EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME = "VK_EXT_device_memory_report"; - -/// VK_EXT_acquire_drm_display - -export const EXT_ACQUIRE_DRM_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_drm_display"; - -/// VK_EXT_robustness2 - -export const EXT_ROBUSTNESS_2_EXTENSION_NAME = "VK_EXT_robustness2"; - -/// VK_EXT_custom_border_color - -export const EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME = "VK_EXT_custom_border_color"; - -/// VK_EXT_extension_289 - -export const EXT_EXTENSION_289_EXTENSION_NAME = "VK_EXT_extension_289"; - -/// VK_GOOGLE_user_type - -export const GOOGLE_USER_TYPE_EXTENSION_NAME = "VK_GOOGLE_user_type"; - -/// VK_KHR_pipeline_library - -export const KHR_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_KHR_pipeline_library"; - -/// VK_NV_extension_292 - -export const NV_EXTENSION_292_EXTENSION_NAME = "VK_NV_extension_292"; - -/// VK_NV_present_barrier - -export const NV_PRESENT_BARRIER_EXTENSION_NAME = "VK_NV_present_barrier"; - -/// VK_KHR_shader_non_semantic_info - -export const KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME = "VK_KHR_shader_non_semantic_info"; - -/// VK_KHR_present_id - -export const KHR_PRESENT_ID_EXTENSION_NAME = "VK_KHR_present_id"; - -/// VK_EXT_private_data - -export const EXT_PRIVATE_DATA_EXTENSION_NAME = "VK_EXT_private_data"; - -/// VK_KHR_extension_297 - -export const KHR_EXTENSION_297_EXTENSION_NAME = "VK_KHR_extension_297"; - -/// VK_EXT_pipeline_creation_cache_control - -export const EXT_PIPELINE_CREATION_CACHE_CONTROL_EXTENSION_NAME = "VK_EXT_pipeline_creation_cache_control"; - -/// VK_KHR_extension_299 - -export const KHR_EXTENSION_299_EXTENSION_NAME = "VK_KHR_extension_299"; - -/// VK_KHR_video_encode_queue - -export const KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_encode_queue"; - -/// VK_NV_device_diagnostics_config - -export const NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME = "VK_NV_device_diagnostics_config"; - -/// VK_QCOM_render_pass_store_ops - -export const QCOM_RENDER_PASS_STORE_OPS_EXTENSION_NAME = "VK_QCOM_render_pass_store_ops"; - -/// VK_QCOM_extension_303 - -export const QCOM_EXTENSION_303_EXTENSION_NAME = "VK_QCOM_extension_303"; - -/// VK_QCOM_extension_304 - -export const QCOM_EXTENSION_304_EXTENSION_NAME = "VK_QCOM_extension_304"; - -/// VK_QCOM_extension_305 - -export const QCOM_EXTENSION_305_EXTENSION_NAME = "VK_QCOM_extension_305"; - -/// VK_QCOM_extension_306 - -export const QCOM_EXTENSION_306_EXTENSION_NAME = "VK_QCOM_extension_306"; - -/// VK_QCOM_extension_307 - -export const QCOM_EXTENSION_307_EXTENSION_NAME = "VK_QCOM_extension_307"; - -/// VK_NV_extension_308 - -export const NV_EXTENSION_308_EXTENSION_NAME = "VK_NV_extension_308"; - -/// VK_KHR_extension_309 - -export const KHR_EXTENSION_309_EXTENSION_NAME = "VK_KHR_extension_309"; - -/// VK_QCOM_extension_310 - -export const QCOM_EXTENSION_310_EXTENSION_NAME = "VK_QCOM_extension_310"; - -/// VK_NV_extension_311 - -export const NV_EXTENSION_311_EXTENSION_NAME = "VK_NV_extension_311"; - -/// VK_EXT_metal_objects - -export const EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects"; - -/// VK_EXT_extension_313 - -export const EXT_EXTENSION_313_EXTENSION_NAME = "VK_EXT_extension_313"; - -/// VK_AMD_extension_314 - -export const AMD_EXTENSION_314_EXTENSION_NAME = "VK_AMD_extension_314"; - -/// VK_KHR_synchronization2 - -export const KHR_SYNCHRONIZATION_2_EXTENSION_NAME = "VK_KHR_synchronization2"; - -/// VK_AMD_extension_316 - -export const AMD_EXTENSION_316_EXTENSION_NAME = "VK_AMD_extension_316"; - -/// VK_EXT_descriptor_buffer - -export const EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME = "VK_EXT_descriptor_buffer"; - -/// VK_AMD_extension_318 - -export const AMD_EXTENSION_318_EXTENSION_NAME = "VK_AMD_extension_318"; - -/// VK_AMD_extension_319 - -export const AMD_EXTENSION_319_EXTENSION_NAME = "VK_AMD_extension_319"; - -/// VK_AMD_extension_320 - -export const AMD_EXTENSION_320_EXTENSION_NAME = "VK_AMD_extension_320"; - -/// VK_EXT_graphics_pipeline_library - -export const EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME = "VK_EXT_graphics_pipeline_library"; - -/// VK_AMD_shader_early_and_late_fragment_tests - -export const AMD_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_EXTENSION_NAME = "VK_AMD_shader_early_and_late_fragment_tests"; - -/// VK_KHR_fragment_shader_barycentric - -export const KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME = "VK_KHR_fragment_shader_barycentric"; - -/// VK_KHR_shader_subgroup_uniform_control_flow - -export const KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_EXTENSION_NAME = "VK_KHR_shader_subgroup_uniform_control_flow"; - -/// VK_KHR_extension_325 - -export const KHR_EXTENSION_325_EXTENSION_NAME = "VK_KHR_extension_325"; - -/// VK_KHR_zero_initialize_workgroup_memory - -export const KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME = "VK_KHR_zero_initialize_workgroup_memory"; - -/// VK_NV_fragment_shading_rate_enums - -export const NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME = "VK_NV_fragment_shading_rate_enums"; - -/// VK_NV_ray_tracing_motion_blur - -export const NV_RAY_TRACING_MOTION_BLUR_EXTENSION_NAME = "VK_NV_ray_tracing_motion_blur"; - -/// VK_EXT_mesh_shader - -export const EXT_MESH_SHADER_EXTENSION_NAME = "VK_EXT_mesh_shader"; - -/// VK_NV_extension_330 - -export const NV_EXTENSION_330_EXTENSION_NAME = "VK_NV_extension_330"; - -/// VK_EXT_ycbcr_2plane_444_formats - -export const EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION_NAME = "VK_EXT_ycbcr_2plane_444_formats"; - -/// VK_NV_extension_332 - -export const NV_EXTENSION_332_EXTENSION_NAME = "VK_NV_extension_332"; - -/// VK_EXT_fragment_density_map2 - -export const EXT_FRAGMENT_DENSITY_MAP_2_EXTENSION_NAME = "VK_EXT_fragment_density_map2"; - -/// VK_QCOM_rotated_copy_commands - -export const QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME = "VK_QCOM_rotated_copy_commands"; - -/// VK_KHR_extension_335 - -export const KHR_EXTENSION_335_EXTENSION_NAME = "VK_KHR_extension_335"; - -/// VK_EXT_image_robustness - -export const EXT_IMAGE_ROBUSTNESS_EXTENSION_NAME = "VK_EXT_image_robustness"; - -/// VK_KHR_workgroup_memory_explicit_layout - -export const KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME = "VK_KHR_workgroup_memory_explicit_layout"; - -/// VK_KHR_copy_commands2 - -export const KHR_COPY_COMMANDS_2_EXTENSION_NAME = "VK_KHR_copy_commands2"; - -/// VK_EXT_image_compression_control - -export const EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME = "VK_EXT_image_compression_control"; - -/// VK_EXT_attachment_feedback_loop_layout - -export const EXT_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_EXTENSION_NAME = "VK_EXT_attachment_feedback_loop_layout"; - -/// VK_EXT_4444_formats - -export const EXT_4444_FORMATS_EXTENSION_NAME = "VK_EXT_4444_formats"; - -/// VK_EXT_device_fault - -export const EXT_DEVICE_FAULT_EXTENSION_NAME = "VK_EXT_device_fault"; - -/// VK_ARM_rasterization_order_attachment_access - -export const ARM_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_ARM_rasterization_order_attachment_access"; - -/// VK_ARM_extension_344 - -export const ARM_EXTENSION_344_EXTENSION_NAME = "VK_ARM_extension_344"; - -/// VK_EXT_rgba10x6_formats - -export const EXT_RGBA10X6_FORMATS_EXTENSION_NAME = "VK_EXT_rgba10x6_formats"; - -/// VK_NV_acquire_winrt_display - -export const NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME = "VK_NV_acquire_winrt_display"; - -/// VK_EXT_directfb_surface - -export const EXT_DIRECTFB_SURFACE_EXTENSION_NAME = "VK_EXT_directfb_surface"; - -/// VK_KHR_extension_350 - -export const KHR_EXTENSION_350_EXTENSION_NAME = "VK_KHR_extension_350"; - -/// VK_NV_extension_351 - -export const NV_EXTENSION_351_EXTENSION_NAME = "VK_NV_extension_351"; - -/// VK_VALVE_mutable_descriptor_type - -export const VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_VALVE_mutable_descriptor_type"; - -/// VK_EXT_vertex_input_dynamic_state - -export const EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME = "VK_EXT_vertex_input_dynamic_state"; - -/// VK_EXT_physical_device_drm - -export const EXT_PHYSICAL_DEVICE_DRM_EXTENSION_NAME = "VK_EXT_physical_device_drm"; - -/// VK_EXT_device_address_binding_report - -export const EXT_DEVICE_ADDRESS_BINDING_REPORT_EXTENSION_NAME = "VK_EXT_device_address_binding_report"; - -/// VK_EXT_depth_clip_control - -export const EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME = "VK_EXT_depth_clip_control"; - -/// VK_EXT_primitive_topology_list_restart - -export const EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME = "VK_EXT_primitive_topology_list_restart"; - -/// VK_KHR_extension_358 - -export const KHR_EXTENSION_358_EXTENSION_NAME = "VK_KHR_extension_358"; - -/// VK_EXT_extension_359 - -export const EXT_EXTENSION_359_EXTENSION_NAME = "VK_EXT_extension_359"; - -/// VK_EXT_extension_360 - -export const EXT_EXTENSION_360_EXTENSION_NAME = "VK_EXT_extension_360"; - -/// VK_KHR_format_feature_flags2 - -export const KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME = "VK_KHR_format_feature_flags2"; - -/// VK_EXT_extension_362 - -export const EXT_EXTENSION_362_EXTENSION_NAME = "VK_EXT_extension_362"; - -/// VK_EXT_extension_363 - -export const EXT_EXTENSION_363_EXTENSION_NAME = "VK_EXT_extension_363"; - -/// VK_FUCHSIA_extension_364 - -export const FUCHSIA_EXTENSION_364_EXTENSION_NAME = "VK_FUCHSIA_extension_364"; - -/// VK_FUCHSIA_external_memory - -export const FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_FUCHSIA_external_memory"; - -/// VK_FUCHSIA_external_semaphore - -export const FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore"; - -/// VK_FUCHSIA_buffer_collection - -export const FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME = "VK_FUCHSIA_buffer_collection"; - -/// VK_FUCHSIA_extension_368 - -export const FUCHSIA_EXTENSION_368_EXTENSION_NAME = "VK_FUCHSIA_extension_368"; - -/// VK_QCOM_extension_369 - -export const QCOM_EXTENSION_369_EXTENSION_NAME = "VK_QCOM_extension_369"; - -/// VK_HUAWEI_subpass_shading - -export const HUAWEI_SUBPASS_SHADING_EXTENSION_NAME = "VK_HUAWEI_subpass_shading"; - -/// VK_HUAWEI_invocation_mask - -export const HUAWEI_INVOCATION_MASK_EXTENSION_NAME = "VK_HUAWEI_invocation_mask"; - -/// VK_NV_external_memory_rdma - -export const NV_EXTERNAL_MEMORY_RDMA_EXTENSION_NAME = "VK_NV_external_memory_rdma"; - -/// VK_EXT_pipeline_properties - -export const EXT_PIPELINE_PROPERTIES_EXTENSION_NAME = "VK_EXT_pipeline_properties"; - -/// VK_NV_extension_374 - -export const NV_EXTENSION_374_EXTENSION_NAME = "VK_NV_extension_374"; - -/// VK_NV_extension_375 - -export const NV_EXTENSION_375_EXTENSION_NAME = "VK_NV_extension_375"; - -/// VK_EXT_extension_376 - -export const EXT_EXTENSION_376_EXTENSION_NAME = "VK_EXT_extension_376"; - -/// VK_EXT_multisampled_render_to_single_sampled - -export const EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME = "VK_EXT_multisampled_render_to_single_sampled"; - -/// VK_EXT_extended_dynamic_state2 - -export const EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME = "VK_EXT_extended_dynamic_state2"; - -/// VK_QNX_screen_surface - -export const QNX_SCREEN_SURFACE_EXTENSION_NAME = "VK_QNX_screen_surface"; - -/// VK_KHR_extension_380 - -export const KHR_EXTENSION_380_EXTENSION_NAME = "VK_KHR_extension_380"; - -/// VK_KHR_extension_381 - -export const KHR_EXTENSION_381_EXTENSION_NAME = "VK_KHR_extension_381"; - -/// VK_EXT_color_write_enable - -export const EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME = "VK_EXT_color_write_enable"; - -/// VK_EXT_primitives_generated_query - -export const EXT_PRIMITIVES_GENERATED_QUERY_EXTENSION_NAME = "VK_EXT_primitives_generated_query"; - -/// VK_EXT_extension_384 - -export const EXT_EXTENSION_384_EXTENSION_NAME = "VK_EXT_extension_384"; - -/// VK_MESA_extension_385 - -export const MESA_EXTENSION_385_EXTENSION_NAME = "VK_MESA_extension_385"; - -/// VK_GOOGLE_extension_386 - -export const GOOGLE_EXTENSION_386_EXTENSION_NAME = "VK_GOOGLE_extension_386"; - -/// VK_KHR_ray_tracing_maintenance1 - -export const KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME = "VK_KHR_ray_tracing_maintenance1"; - -/// VK_EXT_extension_388 - -export const EXT_EXTENSION_388_EXTENSION_NAME = "VK_EXT_extension_388"; - -/// VK_EXT_global_priority_query - -export const EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME = "VK_EXT_global_priority_query"; - -/// VK_EXT_extension_390 - -export const EXT_EXTENSION_390_EXTENSION_NAME = "VK_EXT_extension_390"; - -/// VK_EXT_extension_391 - -export const EXT_EXTENSION_391_EXTENSION_NAME = "VK_EXT_extension_391"; - -/// VK_EXT_image_view_min_lod - -export const EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME = "VK_EXT_image_view_min_lod"; - -/// VK_EXT_multi_draw - -export const EXT_MULTI_DRAW_EXTENSION_NAME = "VK_EXT_multi_draw"; - -/// VK_EXT_image_2d_view_of_3d - -export const EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME = "VK_EXT_image_2d_view_of_3d"; - -/// VK_KHR_portability_enumeration - -export const KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME = "VK_KHR_portability_enumeration"; - -/// VK_KHR_extension_396 - -export const KHR_EXTENSION_396_EXTENSION_NAME = "VK_KHR_extension_396"; - -/// VK_EXT_opacity_micromap - -export const EXT_OPACITY_MICROMAP_EXTENSION_NAME = "VK_EXT_opacity_micromap"; - -/// VK_NV_extension_398 - -export const NV_EXTENSION_398_EXTENSION_NAME = "VK_NV_extension_398"; - -/// VK_JUICE_extension_399 - -export const JUICE_EXTENSION_399_EXTENSION_NAME = "VK_JUICE_extension_399"; - -/// VK_JUICE_extension_400 - -export const JUICE_EXTENSION_400_EXTENSION_NAME = "VK_JUICE_extension_400"; - -/// VK_EXT_load_store_op_none - -export const EXT_LOAD_STORE_OP_NONE_EXTENSION_NAME = "VK_EXT_load_store_op_none"; - -/// VK_FB_extension_402 - -export const FB_EXTENSION_402_EXTENSION_NAME = "VK_FB_extension_402"; - -/// VK_FB_extension_403 - -export const FB_EXTENSION_403_EXTENSION_NAME = "VK_FB_extension_403"; - -/// VK_FB_extension_404 - -export const FB_EXTENSION_404_EXTENSION_NAME = "VK_FB_extension_404"; - -/// VK_HUAWEI_extension_405 - -export const HUAWEI_EXTENSION_405_EXTENSION_NAME = "VK_HUAWEI_extension_405"; - -/// VK_HUAWEI_extension_406 - -export const HUAWEI_EXTENSION_406_EXTENSION_NAME = "VK_HUAWEI_extension_406"; - -/// VK_GGP_extension_407 - -export const GGP_EXTENSION_407_EXTENSION_NAME = "VK_GGP_extension_407"; - -/// VK_GGP_extension_408 - -export const GGP_EXTENSION_408_EXTENSION_NAME = "VK_GGP_extension_408"; - -/// VK_GGP_extension_409 - -export const GGP_EXTENSION_409_EXTENSION_NAME = "VK_GGP_extension_409"; - -/// VK_GGP_extension_410 - -export const GGP_EXTENSION_410_EXTENSION_NAME = "VK_GGP_extension_410"; - -/// VK_GGP_extension_411 - -export const GGP_EXTENSION_411_EXTENSION_NAME = "VK_GGP_extension_411"; - -/// VK_EXT_border_color_swizzle - -export const EXT_BORDER_COLOR_SWIZZLE_EXTENSION_NAME = "VK_EXT_border_color_swizzle"; - -/// VK_EXT_pageable_device_local_memory - -export const EXT_PAGEABLE_DEVICE_LOCAL_MEMORY_EXTENSION_NAME = "VK_EXT_pageable_device_local_memory"; - -/// VK_KHR_maintenance4 - -export const KHR_MAINTENANCE_4_EXTENSION_NAME = "VK_KHR_maintenance4"; - -/// VK_HUAWEI_extension_415 - -export const HUAWEI_EXTENSION_415_EXTENSION_NAME = "VK_HUAWEI_extension_415"; - -/// VK_ARM_extension_416 - -export const ARM_EXTENSION_416_EXTENSION_NAME = "VK_ARM_extension_416"; - -/// VK_KHR_extension_417 - -export const KHR_EXTENSION_417_EXTENSION_NAME = "VK_KHR_extension_417"; - -/// VK_ARM_extension_418 - -export const ARM_EXTENSION_418_EXTENSION_NAME = "VK_ARM_extension_418"; - -/// VK_EXT_extension_419 - -export const EXT_EXTENSION_419_EXTENSION_NAME = "VK_EXT_extension_419"; - -/// VK_EXT_extension_420 - -export const EXT_EXTENSION_420_EXTENSION_NAME = "VK_EXT_extension_420"; - -/// VK_VALVE_descriptor_set_host_mapping - -export const VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME = "VK_VALVE_descriptor_set_host_mapping"; - -/// VK_EXT_depth_clamp_zero_one - -export const EXT_DEPTH_CLAMP_ZERO_ONE_EXTENSION_NAME = "VK_EXT_depth_clamp_zero_one"; - -/// VK_EXT_non_seamless_cube_map - -export const EXT_NON_SEAMLESS_CUBE_MAP_EXTENSION_NAME = "VK_EXT_non_seamless_cube_map"; - -/// VK_ARM_extension_424 - -export const ARM_EXTENSION_424_EXTENSION_NAME = "VK_ARM_extension_424"; - -/// VK_ARM_extension_425 - -export const ARM_EXTENSION_425_EXTENSION_NAME = "VK_ARM_extension_425"; - -/// VK_QCOM_fragment_density_map_offset - -export const QCOM_FRAGMENT_DENSITY_MAP_OFFSET_EXTENSION_NAME = "VK_QCOM_fragment_density_map_offset"; - -/// VK_NV_copy_memory_indirect - -export const NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_NV_copy_memory_indirect"; - -/// VK_NV_memory_decompression - -export const NV_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_NV_memory_decompression"; - -/// VK_NV_extension_429 - -export const NV_EXTENSION_429_EXTENSION_NAME = "VK_NV_extension_429"; - -/// VK_NV_extension_430 - -export const NV_EXTENSION_430_EXTENSION_NAME = "VK_NV_extension_430"; - -/// VK_NV_linear_color_attachment - -export const NV_LINEAR_COLOR_ATTACHMENT_EXTENSION_NAME = "VK_NV_linear_color_attachment"; - -/// VK_NV_extension_432 - -export const NV_EXTENSION_432_EXTENSION_NAME = "VK_NV_extension_432"; - -/// VK_NV_extension_433 - -export const NV_EXTENSION_433_EXTENSION_NAME = "VK_NV_extension_433"; - -/// VK_GOOGLE_surfaceless_query - -export const GOOGLE_SURFACELESS_QUERY_EXTENSION_NAME = "VK_GOOGLE_surfaceless_query"; - -/// VK_KHR_extension_435 - -export const KHR_EXTENSION_435_EXTENSION_NAME = "VK_KHR_extension_435"; - -/// VK_NV_extension_436 - -export const NV_EXTENSION_436_EXTENSION_NAME = "VK_NV_extension_436"; - -/// VK_EXT_extension_437 - -export const EXT_EXTENSION_437_EXTENSION_NAME = "VK_EXT_extension_437"; - -/// VK_EXT_image_compression_control_swapchain - -export const EXT_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_EXTENSION_NAME = "VK_EXT_image_compression_control_swapchain"; - -/// VK_SEC_extension_439 - -export const SEC_EXTENSION_439_EXTENSION_NAME = "VK_SEC_extension_439"; - -/// VK_QCOM_extension_440 - -export const QCOM_EXTENSION_440_EXTENSION_NAME = "VK_QCOM_extension_440"; - -/// VK_QCOM_image_processing - -export const QCOM_IMAGE_PROCESSING_EXTENSION_NAME = "VK_QCOM_image_processing"; - -/// VK_COREAVI_extension_442 - -export const COREAVI_EXTENSION_442_EXTENSION_NAME = "VK_COREAVI_extension_442"; - -/// VK_COREAVI_extension_443 - -export const COREAVI_EXTENSION_443_EXTENSION_NAME = "VK_COREAVI_extension_443"; - -/// VK_COREAVI_extension_444 - -export const COREAVI_EXTENSION_444_EXTENSION_NAME = "VK_COREAVI_extension_444"; - -/// VK_COREAVI_extension_445 - -export const COREAVI_EXTENSION_445_EXTENSION_NAME = "VK_COREAVI_extension_445"; - -/// VK_COREAVI_extension_446 - -export const COREAVI_EXTENSION_446_EXTENSION_NAME = "VK_COREAVI_extension_446"; - -/// VK_COREAVI_extension_447 - -export const COREAVI_EXTENSION_447_EXTENSION_NAME = "VK_COREAVI_extension_447"; - -/// VK_SEC_extension_448 - -export const SEC_EXTENSION_448_EXTENSION_NAME = "VK_SEC_extension_448"; - -/// VK_SEC_extension_449 - -export const SEC_EXTENSION_449_EXTENSION_NAME = "VK_SEC_extension_449"; - -/// VK_SEC_extension_450 - -export const SEC_EXTENSION_450_EXTENSION_NAME = "VK_SEC_extension_450"; - -/// VK_SEC_extension_451 - -export const SEC_EXTENSION_451_EXTENSION_NAME = "VK_SEC_extension_451"; - -/// VK_NV_extension_452 - -export const NV_EXTENSION_452_EXTENSION_NAME = "VK_NV_extension_452"; - -/// VK_ARM_extension_453 - -export const ARM_EXTENSION_453_EXTENSION_NAME = "VK_ARM_extension_453"; - -/// VK_GOOGLE_extension_454 - -export const GOOGLE_EXTENSION_454_EXTENSION_NAME = "VK_GOOGLE_extension_454"; - -/// VK_GOOGLE_extension_455 - -export const GOOGLE_EXTENSION_455_EXTENSION_NAME = "VK_GOOGLE_extension_455"; - -/// VK_EXT_extended_dynamic_state3 - -export const EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME = "VK_EXT_extended_dynamic_state3"; - -/// VK_EXT_extension_457 - -export const EXT_EXTENSION_457_EXTENSION_NAME = "VK_EXT_extension_457"; - -/// VK_EXT_extension_458 - -export const EXT_EXTENSION_458_EXTENSION_NAME = "VK_EXT_extension_458"; - -/// VK_EXT_subpass_merge_feedback - -export const EXT_SUBPASS_MERGE_FEEDBACK_EXTENSION_NAME = "VK_EXT_subpass_merge_feedback"; - -/// VK_EXT_extension_460 - -export const EXT_EXTENSION_460_EXTENSION_NAME = "VK_EXT_extension_460"; - -/// VK_EXT_extension_461 - -export const EXT_EXTENSION_461_EXTENSION_NAME = "VK_EXT_extension_461"; - -/// VK_EXT_extension_462 - -export const EXT_EXTENSION_462_EXTENSION_NAME = "VK_EXT_extension_462"; - -/// VK_EXT_shader_module_identifier - -export const EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME = "VK_EXT_shader_module_identifier"; - -/// VK_EXT_rasterization_order_attachment_access - -export const EXT_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_EXTENSION_NAME = "VK_EXT_rasterization_order_attachment_access"; - -/// VK_NV_optical_flow - -export const NV_OPTICAL_FLOW_EXTENSION_NAME = "VK_NV_optical_flow"; - -/// VK_EXT_legacy_dithering - -export const EXT_LEGACY_DITHERING_EXTENSION_NAME = "VK_EXT_legacy_dithering"; - -/// VK_EXT_pipeline_protected_access - -export const EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME = "VK_EXT_pipeline_protected_access"; - -/// VK_EXT_extension_468 - -export const EXT_EXTENSION_468_EXTENSION_NAME = "VK_EXT_extension_468"; - -/// VK_ANDROID_extension_469 - -export const ANDROID_EXTENSION_469_EXTENSION_NAME = "VK_ANDROID_extension_469"; - -/// VK_AMD_extension_470 - -export const AMD_EXTENSION_470_EXTENSION_NAME = "VK_AMD_extension_470"; - -/// VK_AMD_extension_471 - -export const AMD_EXTENSION_471_EXTENSION_NAME = "VK_AMD_extension_471"; - -/// VK_AMD_extension_472 - -export const AMD_EXTENSION_472_EXTENSION_NAME = "VK_AMD_extension_472"; - -/// VK_AMD_extension_473 - -export const AMD_EXTENSION_473_EXTENSION_NAME = "VK_AMD_extension_473"; - -/// VK_AMD_extension_474 - -export const AMD_EXTENSION_474_EXTENSION_NAME = "VK_AMD_extension_474"; - -/// VK_AMD_extension_475 - -export const AMD_EXTENSION_475_EXTENSION_NAME = "VK_AMD_extension_475"; - -/// VK_AMD_extension_476 - -export const AMD_EXTENSION_476_EXTENSION_NAME = "VK_AMD_extension_476"; - -/// VK_AMD_extension_477 - -export const AMD_EXTENSION_477_EXTENSION_NAME = "VK_AMD_extension_477"; - -/// VK_AMD_extension_478 - -export const AMD_EXTENSION_478_EXTENSION_NAME = "VK_AMD_extension_478"; - -/// VK_AMD_extension_479 - -export const AMD_EXTENSION_479_EXTENSION_NAME = "VK_AMD_extension_479"; - -/// VK_EXT_extension_480 - -export const EXT_EXTENSION_480_EXTENSION_NAME = "VK_EXT_extension_480"; - -/// VK_EXT_extension_481 - -export const EXT_EXTENSION_481_EXTENSION_NAME = "VK_EXT_extension_481"; - -/// VK_EXT_extension_482 - -export const EXT_EXTENSION_482_EXTENSION_NAME = "VK_EXT_extension_482"; - -/// VK_EXT_extension_483 - -export const EXT_EXTENSION_483_EXTENSION_NAME = "VK_EXT_extension_483"; - -/// VK_EXT_extension_484 - -export const EXT_EXTENSION_484_EXTENSION_NAME = "VK_EXT_extension_484"; - -/// VK_QCOM_tile_properties - -export const QCOM_TILE_PROPERTIES_EXTENSION_NAME = "VK_QCOM_tile_properties"; - -/// VK_SEC_amigo_profiling - -export const SEC_AMIGO_PROFILING_EXTENSION_NAME = "VK_SEC_amigo_profiling"; - -/// VK_EXT_extension_487 - -export const EXT_EXTENSION_487_EXTENSION_NAME = "VK_EXT_extension_487"; - -/// VK_EXT_extension_488 - -export const EXT_EXTENSION_488_EXTENSION_NAME = "VK_EXT_extension_488"; - -/// VK_QCOM_extension_489 - -export const QCOM_EXTENSION_489_EXTENSION_NAME = "VK_QCOM_extension_489"; - -/// VK_NV_extension_490 - -export const NV_EXTENSION_490_EXTENSION_NAME = "VK_NV_extension_490"; - -/// VK_NV_ray_tracing_invocation_reorder - -export const NV_RAY_TRACING_INVOCATION_REORDER_EXTENSION_NAME = "VK_NV_ray_tracing_invocation_reorder"; - -/// VK_NV_extension_492 - -export const NV_EXTENSION_492_EXTENSION_NAME = "VK_NV_extension_492"; - -/// VK_NV_extension_493 - -export const NV_EXTENSION_493_EXTENSION_NAME = "VK_NV_extension_493"; - -/// VK_NV_extension_494 - -export const NV_EXTENSION_494_EXTENSION_NAME = "VK_NV_extension_494"; - -/// VK_EXT_mutable_descriptor_type - -export const EXT_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME = "VK_EXT_mutable_descriptor_type"; - -/// VK_EXT_extension_496 - -export const EXT_EXTENSION_496_EXTENSION_NAME = "VK_EXT_extension_496"; - -/// VK_EXT_extension_497 - -export const EXT_EXTENSION_497_EXTENSION_NAME = "VK_EXT_extension_497"; - -/// VK_ARM_shader_core_builtins - -export const ARM_SHADER_CORE_BUILTINS_EXTENSION_NAME = "VK_ARM_shader_core_builtins"; - -/// VK_EXT_extension_499 - -export const EXT_EXTENSION_499_EXTENSION_NAME = "VK_EXT_extension_499"; - -/// VK_EXT_extension_500 - -export const EXT_EXTENSION_500_EXTENSION_NAME = "VK_EXT_extension_500"; - -/// VK_EXT_extension_501 - -export const EXT_EXTENSION_501_EXTENSION_NAME = "VK_EXT_extension_501"; - -/// VK_EXT_extension_502 - -export const EXT_EXTENSION_502_EXTENSION_NAME = "VK_EXT_extension_502"; - -/// VK_EXT_extension_503 - -export const EXT_EXTENSION_503_EXTENSION_NAME = "VK_EXT_extension_503"; - -/// VK_NV_extension_504 - -export const NV_EXTENSION_504_EXTENSION_NAME = "VK_NV_extension_504"; - -/// Enums - -export enum StdVideoH264ChromaFormatIdc { - MONOCHROME = 0, - VK_420 = 1, - VK_422 = 2, - VK_444 = 3, - INVALID = 2147483647, -} - -export enum StdVideoH264ProfileIdc { - /** Only constrained baseline is supported */ - BASELINE = 66, - MAIN = 77, - HIGH = 100, - HIGH_444_PREDICTIVE = 244, - INVALID = 2147483647, -} - -export enum StdVideoH264LevelIdc { - VK_1_0 = 0, - VK_1_1 = 1, - VK_1_2 = 2, - VK_1_3 = 3, - VK_2_0 = 4, - VK_2_1 = 5, - VK_2_2 = 6, - VK_3_0 = 7, - VK_3_1 = 8, - VK_3_2 = 9, - VK_4_0 = 10, - VK_4_1 = 11, - VK_4_2 = 12, - VK_5_0 = 13, - VK_5_1 = 14, - VK_5_2 = 15, - VK_6_0 = 16, - VK_6_1 = 17, - VK_6_2 = 18, - INVALID = 2147483647, -} - -export enum StdVideoH264PocType { - VK_0 = 0, - VK_1 = 1, - VK_2 = 2, - INVALID = 2147483647, -} - -export enum StdVideoH264AspectRatioIdc { - UNSPECIFIED = 0, - SQUARE = 1, - VK_12_11 = 2, - VK_10_11 = 3, - VK_16_11 = 4, - VK_40_33 = 5, - VK_24_11 = 6, - VK_20_11 = 7, - VK_32_11 = 8, - VK_80_33 = 9, - VK_18_11 = 10, - VK_15_11 = 11, - VK_64_33 = 12, - VK_160_99 = 13, - VK_4_3 = 14, - VK_3_2 = 15, - VK_2_1 = 16, - EXTENDED_SAR = 255, - INVALID = 2147483647, -} - -export enum StdVideoH264WeightedBipredIdc { - DEFAULT = 0, - EXPLICIT = 1, - IMPLICIT = 2, - INVALID = 2147483647, -} - -export enum StdVideoH264ModificationOfPicNumsIdc { - SHORT_TERM_SUBTRACT = 0, - SHORT_TERM_ADD = 1, - LONG_TERM = 2, - END = 3, - INVALID = 2147483647, -} - -export enum StdVideoH264MemMgmtControlOp { - END = 0, - UNMARK_SHORT_TERM = 1, - UNMARK_LONG_TERM = 2, - MARK_LONG_TERM = 3, - SET_MAX_LONG_TERM_INDEX = 4, - UNMARK_ALL = 5, - MARK_CURRENT_AS_LONG_TERM = 6, - INVALID = 2147483647, -} - -export enum StdVideoH264CabacInitIdc { - VK_0 = 0, - VK_1 = 1, - VK_2 = 2, - INVALID = 2147483647, -} - -export enum StdVideoH264DisableDeblockingFilterIdc { - DISABLED = 0, - ENABLED = 1, - PARTIAL = 2, - INVALID = 2147483647, -} - -export enum StdVideoH264SliceType { - P = 0, - B = 1, - I = 2, - INVALID = 2147483647, -} - -export enum StdVideoH264PictureType { - P = 0, - B = 1, - I = 2, - IDR = 5, - INVALID = 2147483647, -} - -export enum StdVideoH264NonVclNaluType { - SPS = 0, - PPS = 1, - AUD = 2, - PREFIX = 3, - END_OF_SEQUENCE = 4, - END_OF_STREAM = 5, - PRECODED = 6, - INVALID = 2147483647, -} - -export enum StdVideoDecodeH264FieldOrderCount { - TOP = 0, - BOTTOM = 1, - INVALID = 2147483647, -} - -export enum StdVideoH265ChromaFormatIdc { - MONOCHROME = 0, - VK_420 = 1, - VK_422 = 2, - VK_444 = 3, - INVALID = 2147483647, -} - -export enum StdVideoH265ProfileIdc { - MAIN = 1, - MAIN_10 = 2, - MAIN_STILL_PICTURE = 3, - FORMAT_RANGE_EXTENSIONS = 4, - SCC_EXTENSIONS = 9, - INVALID = 2147483647, -} - -export enum StdVideoH265LevelIdc { - VK_1_0 = 0, - VK_2_0 = 1, - VK_2_1 = 2, - VK_3_0 = 3, - VK_3_1 = 4, - VK_4_0 = 5, - VK_4_1 = 6, - VK_5_0 = 7, - VK_5_1 = 8, - VK_5_2 = 9, - VK_6_0 = 10, - VK_6_1 = 11, - VK_6_2 = 12, - INVALID = 2147483647, -} - -export enum StdVideoH265SliceType { - B = 0, - P = 1, - I = 2, - INVALID = 2147483647, -} - -export enum StdVideoH265PictureType { - P = 0, - B = 1, - I = 2, - IDR = 3, - INVALID = 2147483647, -} - -export enum StdVideoH265AspectRatioIdc { - UNSPECIFIED = 0, - SQUARE = 1, - VK_12_11 = 2, - VK_10_11 = 3, - VK_16_11 = 4, - VK_40_33 = 5, - VK_24_11 = 6, - VK_20_11 = 7, - VK_32_11 = 8, - VK_80_33 = 9, - VK_18_11 = 10, - VK_15_11 = 11, - VK_64_33 = 12, - VK_160_99 = 13, - VK_4_3 = 14, - VK_3_2 = 15, - VK_2_1 = 16, - EXTENDED_SAR = 255, - INVALID = 2147483647, -} - -export enum ImageLayout { - /** Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) */ - UNDEFINED = 0, - /** General layout when image can be used for any kind of access */ - GENERAL = 1, - /** Optimal layout when image is only used for color attachment read/write */ - COLOR_ATTACHMENT_OPTIMAL = 2, - /** Optimal layout when image is only used for depth/stencil attachment read/write */ - DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, - /** Optimal layout when image is used for read only depth/stencil attachment and shader access */ - DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, - /** Optimal layout when image is used for read only shader access */ - SHADER_READ_ONLY_OPTIMAL = 5, - /** Optimal layout when image is used only as source of transfer operations */ - TRANSFER_SRC_OPTIMAL = 6, - /** Optimal layout when image is used only as destination of transfer operations */ - TRANSFER_DST_OPTIMAL = 7, - /** Initial layout used when the data is populated by the CPU */ - PREINITIALIZED = 8, - DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000, - DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001, - DEPTH_ATTACHMENT_OPTIMAL = 1000241000, - DEPTH_READ_ONLY_OPTIMAL = 1000241001, - STENCIL_ATTACHMENT_OPTIMAL = 1000241002, - STENCIL_READ_ONLY_OPTIMAL = 1000241003, - READ_ONLY_OPTIMAL = 1000314000, - ATTACHMENT_OPTIMAL = 1000314001, - PRESENT_SRC_KHR = 1000001002, - VIDEO_DECODE_DST_KHR = 1000024000, - VIDEO_DECODE_SRC_KHR = 1000024001, - VIDEO_DECODE_DPB_KHR = 1000024002, - SHARED_PRESENT_KHR = 1000111000, - DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000117000, - DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = 1000117001, - SHADING_RATE_OPTIMAL_NV = 1000164003, - FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000, - FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003, - DEPTH_ATTACHMENT_OPTIMAL_KHR = 1000241000, - DEPTH_READ_ONLY_OPTIMAL_KHR = 1000241001, - STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000241002, - STENCIL_READ_ONLY_OPTIMAL_KHR = 1000241003, - VIDEO_ENCODE_DST_KHR = 1000299000, - VIDEO_ENCODE_SRC_KHR = 1000299001, - VIDEO_ENCODE_DPB_KHR = 1000299002, - READ_ONLY_OPTIMAL_KHR = 1000314000, - ATTACHMENT_OPTIMAL_KHR = 1000314001, - ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000, -} - -export enum AttachmentLoadOp { - LOAD = 0, - CLEAR = 1, - DONT_CARE = 2, - NONE_EXT = 1000400000, -} - -export enum AttachmentStoreOp { - STORE = 0, - DONT_CARE = 1, - NONE = 1000301000, - NONE_KHR = 1000301000, - NONE_QCOM = 1000301000, - NONE_EXT = 1000301000, -} - -export enum ImageType { - VK_1D = 0, - VK_2D = 1, - VK_3D = 2, -} - -export enum ImageTiling { - OPTIMAL = 0, - LINEAR = 1, - DRM_FORMAT_MODIFIER_EXT = 1000158000, -} - -export enum ImageViewType { - VK_1D = 0, - VK_2D = 1, - VK_3D = 2, - CUBE = 3, - VK_1D_ARRAY = 4, - VK_2D_ARRAY = 5, - CUBE_ARRAY = 6, -} - -export enum CommandBufferLevel { - PRIMARY = 0, - SECONDARY = 1, -} - -export enum ComponentSwizzle { - IDENTITY = 0, - ZERO = 1, - ONE = 2, - R = 3, - G = 4, - B = 5, - A = 6, -} - -export enum DescriptorType { - SAMPLER = 0, - COMBINED_IMAGE_SAMPLER = 1, - SAMPLED_IMAGE = 2, - STORAGE_IMAGE = 3, - UNIFORM_TEXEL_BUFFER = 4, - STORAGE_TEXEL_BUFFER = 5, - UNIFORM_BUFFER = 6, - STORAGE_BUFFER = 7, - UNIFORM_BUFFER_DYNAMIC = 8, - STORAGE_BUFFER_DYNAMIC = 9, - INPUT_ATTACHMENT = 10, - INLINE_UNIFORM_BLOCK = 1000138000, - INLINE_UNIFORM_BLOCK_EXT = 1000138000, - ACCELERATION_STRUCTURE_KHR = 1000150000, - ACCELERATION_STRUCTURE_NV = 1000165000, - MUTABLE_VALVE = 1000351000, - SAMPLE_WEIGHT_IMAGE_QCOM = 1000440000, - BLOCK_MATCH_IMAGE_QCOM = 1000440001, - MUTABLE_EXT = 1000351000, -} - -export enum QueryType { - OCCLUSION = 0, - /** Optional */ - PIPELINE_STATISTICS = 1, - TIMESTAMP = 2, - RESULT_STATUS_ONLY_KHR = 1000023000, - TRANSFORM_FEEDBACK_STREAM_EXT = 1000028004, - PERFORMANCE_QUERY_KHR = 1000116000, - ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR = 1000150000, - ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001, - ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000, - PERFORMANCE_QUERY_INTEL = 1000210000, - VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR = 1000299000, - MESH_PRIMITIVES_GENERATED_EXT = 1000328000, - PRIMITIVES_GENERATED_EXT = 1000382000, - ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR = 1000386000, - ACCELERATION_STRUCTURE_SIZE_KHR = 1000386001, - MICROMAP_SERIALIZATION_SIZE_EXT = 1000396000, - MICROMAP_COMPACTED_SIZE_EXT = 1000396001, -} - -export enum BorderColor { - FLOAT_TRANSPARENT_BLACK = 0, - INT_TRANSPARENT_BLACK = 1, - FLOAT_OPAQUE_BLACK = 2, - INT_OPAQUE_BLACK = 3, - FLOAT_OPAQUE_WHITE = 4, - INT_OPAQUE_WHITE = 5, - FLOAT_CUSTOM_EXT = 1000287003, - INT_CUSTOM_EXT = 1000287004, -} - -export enum PipelineBindPoint { - GRAPHICS = 0, - COMPUTE = 1, - RAY_TRACING_KHR = 1000165000, - RAY_TRACING_NV = 1000165000, - SUBPASS_SHADING_HUAWEI = 1000369003, -} - -export enum PipelineCacheHeaderVersion { - ONE = 1, -} - -export enum PipelineCacheCreateFlagBits { - EXTERNALLY_SYNCHRONIZED = 1 << 0, - RESERVED_1_BIT_EXT = 1 << 1, - EXTERNALLY_SYNCHRONIZED_BIT_EXT = 1 << 0, - RESERVED_1_BIT_KHR = 1 << 1, - RESERVED_2_BIT_KHR = 1 << 2, -} - -export enum PrimitiveTopology { - POINT_LIST = 0, - LINE_LIST = 1, - LINE_STRIP = 2, - TRIANGLE_LIST = 3, - TRIANGLE_STRIP = 4, - TRIANGLE_FAN = 5, - LINE_LIST_WITH_ADJACENCY = 6, - LINE_STRIP_WITH_ADJACENCY = 7, - TRIANGLE_LIST_WITH_ADJACENCY = 8, - TRIANGLE_STRIP_WITH_ADJACENCY = 9, - PATCH_LIST = 10, -} - -export enum SharingMode { - EXCLUSIVE = 0, - CONCURRENT = 1, -} - -export enum IndexType { - UINT16 = 0, - UINT32 = 1, - NONE_KHR = 1000165000, - NONE_NV = 1000165000, - UINT8_EXT = 1000265000, -} - -export enum Filter { - NEAREST = 0, - LINEAR = 1, - CUBIC_IMG = 1000015000, - CUBIC_EXT = 1000015000, -} - -export enum SamplerMipmapMode { - /** Choose nearest mip level */ - NEAREST = 0, - /** Linear filter between mip levels */ - LINEAR = 1, -} - -export enum SamplerAddressMode { - REPEAT = 0, - MIRRORED_REPEAT = 1, - CLAMP_TO_EDGE = 2, - CLAMP_TO_BORDER = 3, - /** No need to add an extnumber attribute, since this uses a core enum value */ - MIRROR_CLAMP_TO_EDGE = 4, - /** Alias introduced for consistency with extension suffixing rules */ - MIRROR_CLAMP_TO_EDGE_KHR = 4, -} - -export enum CompareOp { - NEVER = 0, - LESS = 1, - EQUAL = 2, - LESS_OR_EQUAL = 3, - GREATER = 4, - NOT_EQUAL = 5, - GREATER_OR_EQUAL = 6, - ALWAYS = 7, -} - -export enum PolygonMode { - FILL = 0, - LINE = 1, - POINT = 2, - FILL_RECTANGLE_NV = 1000153000, -} - -export enum FrontFace { - COUNTER_CLOCKWISE = 0, - CLOCKWISE = 1, -} - -export enum BlendFactor { - ZERO = 0, - ONE = 1, - SRC_COLOR = 2, - ONE_MINUS_SRC_COLOR = 3, - DST_COLOR = 4, - ONE_MINUS_DST_COLOR = 5, - SRC_ALPHA = 6, - ONE_MINUS_SRC_ALPHA = 7, - DST_ALPHA = 8, - ONE_MINUS_DST_ALPHA = 9, - CONSTANT_COLOR = 10, - ONE_MINUS_CONSTANT_COLOR = 11, - CONSTANT_ALPHA = 12, - ONE_MINUS_CONSTANT_ALPHA = 13, - SRC_ALPHA_SATURATE = 14, - SRC1_COLOR = 15, - ONE_MINUS_SRC1_COLOR = 16, - SRC1_ALPHA = 17, - ONE_MINUS_SRC1_ALPHA = 18, -} - -export enum BlendOp { - ADD = 0, - SUBTRACT = 1, - REVERSE_SUBTRACT = 2, - MIN = 3, - MAX = 4, - ZERO_EXT = 1000148000, - SRC_EXT = 1000148001, - DST_EXT = 1000148002, - SRC_OVER_EXT = 1000148003, - DST_OVER_EXT = 1000148004, - SRC_IN_EXT = 1000148005, - DST_IN_EXT = 1000148006, - SRC_OUT_EXT = 1000148007, - DST_OUT_EXT = 1000148008, - SRC_ATOP_EXT = 1000148009, - DST_ATOP_EXT = 1000148010, - XOR_EXT = 1000148011, - MULTIPLY_EXT = 1000148012, - SCREEN_EXT = 1000148013, - OVERLAY_EXT = 1000148014, - DARKEN_EXT = 1000148015, - LIGHTEN_EXT = 1000148016, - COLORDODGE_EXT = 1000148017, - COLORBURN_EXT = 1000148018, - HARDLIGHT_EXT = 1000148019, - SOFTLIGHT_EXT = 1000148020, - DIFFERENCE_EXT = 1000148021, - EXCLUSION_EXT = 1000148022, - INVERT_EXT = 1000148023, - INVERT_RGB_EXT = 1000148024, - LINEARDODGE_EXT = 1000148025, - LINEARBURN_EXT = 1000148026, - VIVIDLIGHT_EXT = 1000148027, - LINEARLIGHT_EXT = 1000148028, - PINLIGHT_EXT = 1000148029, - HARDMIX_EXT = 1000148030, - HSL_HUE_EXT = 1000148031, - HSL_SATURATION_EXT = 1000148032, - HSL_COLOR_EXT = 1000148033, - HSL_LUMINOSITY_EXT = 1000148034, - PLUS_EXT = 1000148035, - PLUS_CLAMPED_EXT = 1000148036, - PLUS_CLAMPED_ALPHA_EXT = 1000148037, - PLUS_DARKER_EXT = 1000148038, - MINUS_EXT = 1000148039, - MINUS_CLAMPED_EXT = 1000148040, - CONTRAST_EXT = 1000148041, - INVERT_OVG_EXT = 1000148042, - RED_EXT = 1000148043, - GREEN_EXT = 1000148044, - BLUE_EXT = 1000148045, -} - -export enum StencilOp { - KEEP = 0, - ZERO = 1, - REPLACE = 2, - INCREMENT_AND_CLAMP = 3, - DECREMENT_AND_CLAMP = 4, - INVERT = 5, - INCREMENT_AND_WRAP = 6, - DECREMENT_AND_WRAP = 7, -} - -export enum LogicOp { - CLEAR = 0, - AND = 1, - AND_REVERSE = 2, - COPY = 3, - AND_INVERTED = 4, - NO_OP = 5, - XOR = 6, - OR = 7, - NOR = 8, - EQUIVALENT = 9, - INVERT = 10, - OR_REVERSE = 11, - COPY_INVERTED = 12, - OR_INVERTED = 13, - NAND = 14, - SET = 15, -} - -export enum InternalAllocationType { - EXECUTABLE = 0, -} - -export enum SystemAllocationScope { - COMMAND = 0, - OBJECT = 1, - CACHE = 2, - DEVICE = 3, - INSTANCE = 4, -} - -export enum PhysicalDeviceType { - OTHER = 0, - INTEGRATED_GPU = 1, - DISCRETE_GPU = 2, - VIRTUAL_GPU = 3, - CPU = 4, -} - -export enum VertexInputRate { - VERTEX = 0, - INSTANCE = 1, -} - -/** Vulkan format definitions */ -export enum Format { - UNDEFINED = 0, - R4G4_UNORM_PACK8 = 1, - R4G4B4A4_UNORM_PACK16 = 2, - B4G4R4A4_UNORM_PACK16 = 3, - R5G6B5_UNORM_PACK16 = 4, - B5G6R5_UNORM_PACK16 = 5, - R5G5B5A1_UNORM_PACK16 = 6, - B5G5R5A1_UNORM_PACK16 = 7, - A1R5G5B5_UNORM_PACK16 = 8, - R8_UNORM = 9, - R8_SNORM = 10, - R8_USCALED = 11, - R8_SSCALED = 12, - R8_UINT = 13, - R8_SINT = 14, - R8_SRGB = 15, - R8G8_UNORM = 16, - R8G8_SNORM = 17, - R8G8_USCALED = 18, - R8G8_SSCALED = 19, - R8G8_UINT = 20, - R8G8_SINT = 21, - R8G8_SRGB = 22, - R8G8B8_UNORM = 23, - R8G8B8_SNORM = 24, - R8G8B8_USCALED = 25, - R8G8B8_SSCALED = 26, - R8G8B8_UINT = 27, - R8G8B8_SINT = 28, - R8G8B8_SRGB = 29, - B8G8R8_UNORM = 30, - B8G8R8_SNORM = 31, - B8G8R8_USCALED = 32, - B8G8R8_SSCALED = 33, - B8G8R8_UINT = 34, - B8G8R8_SINT = 35, - B8G8R8_SRGB = 36, - R8G8B8A8_UNORM = 37, - R8G8B8A8_SNORM = 38, - R8G8B8A8_USCALED = 39, - R8G8B8A8_SSCALED = 40, - R8G8B8A8_UINT = 41, - R8G8B8A8_SINT = 42, - R8G8B8A8_SRGB = 43, - B8G8R8A8_UNORM = 44, - B8G8R8A8_SNORM = 45, - B8G8R8A8_USCALED = 46, - B8G8R8A8_SSCALED = 47, - B8G8R8A8_UINT = 48, - B8G8R8A8_SINT = 49, - B8G8R8A8_SRGB = 50, - A8B8G8R8_UNORM_PACK32 = 51, - A8B8G8R8_SNORM_PACK32 = 52, - A8B8G8R8_USCALED_PACK32 = 53, - A8B8G8R8_SSCALED_PACK32 = 54, - A8B8G8R8_UINT_PACK32 = 55, - A8B8G8R8_SINT_PACK32 = 56, - A8B8G8R8_SRGB_PACK32 = 57, - A2R10G10B10_UNORM_PACK32 = 58, - A2R10G10B10_SNORM_PACK32 = 59, - A2R10G10B10_USCALED_PACK32 = 60, - A2R10G10B10_SSCALED_PACK32 = 61, - A2R10G10B10_UINT_PACK32 = 62, - A2R10G10B10_SINT_PACK32 = 63, - A2B10G10R10_UNORM_PACK32 = 64, - A2B10G10R10_SNORM_PACK32 = 65, - A2B10G10R10_USCALED_PACK32 = 66, - A2B10G10R10_SSCALED_PACK32 = 67, - A2B10G10R10_UINT_PACK32 = 68, - A2B10G10R10_SINT_PACK32 = 69, - R16_UNORM = 70, - R16_SNORM = 71, - R16_USCALED = 72, - R16_SSCALED = 73, - R16_UINT = 74, - R16_SINT = 75, - R16_SFLOAT = 76, - R16G16_UNORM = 77, - R16G16_SNORM = 78, - R16G16_USCALED = 79, - R16G16_SSCALED = 80, - R16G16_UINT = 81, - R16G16_SINT = 82, - R16G16_SFLOAT = 83, - R16G16B16_UNORM = 84, - R16G16B16_SNORM = 85, - R16G16B16_USCALED = 86, - R16G16B16_SSCALED = 87, - R16G16B16_UINT = 88, - R16G16B16_SINT = 89, - R16G16B16_SFLOAT = 90, - R16G16B16A16_UNORM = 91, - R16G16B16A16_SNORM = 92, - R16G16B16A16_USCALED = 93, - R16G16B16A16_SSCALED = 94, - R16G16B16A16_UINT = 95, - R16G16B16A16_SINT = 96, - R16G16B16A16_SFLOAT = 97, - R32_UINT = 98, - R32_SINT = 99, - R32_SFLOAT = 100, - R32G32_UINT = 101, - R32G32_SINT = 102, - R32G32_SFLOAT = 103, - R32G32B32_UINT = 104, - R32G32B32_SINT = 105, - R32G32B32_SFLOAT = 106, - R32G32B32A32_UINT = 107, - R32G32B32A32_SINT = 108, - R32G32B32A32_SFLOAT = 109, - R64_UINT = 110, - R64_SINT = 111, - R64_SFLOAT = 112, - R64G64_UINT = 113, - R64G64_SINT = 114, - R64G64_SFLOAT = 115, - R64G64B64_UINT = 116, - R64G64B64_SINT = 117, - R64G64B64_SFLOAT = 118, - R64G64B64A64_UINT = 119, - R64G64B64A64_SINT = 120, - R64G64B64A64_SFLOAT = 121, - B10G11R11_UFLOAT_PACK32 = 122, - E5B9G9R9_UFLOAT_PACK32 = 123, - D16_UNORM = 124, - X8_D24_UNORM_PACK32 = 125, - D32_SFLOAT = 126, - S8_UINT = 127, - D16_UNORM_S8_UINT = 128, - D24_UNORM_S8_UINT = 129, - D32_SFLOAT_S8_UINT = 130, - BC1_RGB_UNORM_BLOCK = 131, - BC1_RGB_SRGB_BLOCK = 132, - BC1_RGBA_UNORM_BLOCK = 133, - BC1_RGBA_SRGB_BLOCK = 134, - BC2_UNORM_BLOCK = 135, - BC2_SRGB_BLOCK = 136, - BC3_UNORM_BLOCK = 137, - BC3_SRGB_BLOCK = 138, - BC4_UNORM_BLOCK = 139, - BC4_SNORM_BLOCK = 140, - BC5_UNORM_BLOCK = 141, - BC5_SNORM_BLOCK = 142, - BC6H_UFLOAT_BLOCK = 143, - BC6H_SFLOAT_BLOCK = 144, - BC7_UNORM_BLOCK = 145, - BC7_SRGB_BLOCK = 146, - ETC2_R8G8B8_UNORM_BLOCK = 147, - ETC2_R8G8B8_SRGB_BLOCK = 148, - ETC2_R8G8B8A1_UNORM_BLOCK = 149, - ETC2_R8G8B8A1_SRGB_BLOCK = 150, - ETC2_R8G8B8A8_UNORM_BLOCK = 151, - ETC2_R8G8B8A8_SRGB_BLOCK = 152, - EAC_R11_UNORM_BLOCK = 153, - EAC_R11_SNORM_BLOCK = 154, - EAC_R11G11_UNORM_BLOCK = 155, - EAC_R11G11_SNORM_BLOCK = 156, - ASTC_4x4_UNORM_BLOCK = 157, - ASTC_4x4_SRGB_BLOCK = 158, - ASTC_5x4_UNORM_BLOCK = 159, - ASTC_5x4_SRGB_BLOCK = 160, - ASTC_5x5_UNORM_BLOCK = 161, - ASTC_5x5_SRGB_BLOCK = 162, - ASTC_6x5_UNORM_BLOCK = 163, - ASTC_6x5_SRGB_BLOCK = 164, - ASTC_6x6_UNORM_BLOCK = 165, - ASTC_6x6_SRGB_BLOCK = 166, - ASTC_8x5_UNORM_BLOCK = 167, - ASTC_8x5_SRGB_BLOCK = 168, - ASTC_8x6_UNORM_BLOCK = 169, - ASTC_8x6_SRGB_BLOCK = 170, - ASTC_8x8_UNORM_BLOCK = 171, - ASTC_8x8_SRGB_BLOCK = 172, - ASTC_10x5_UNORM_BLOCK = 173, - ASTC_10x5_SRGB_BLOCK = 174, - ASTC_10x6_UNORM_BLOCK = 175, - ASTC_10x6_SRGB_BLOCK = 176, - ASTC_10x8_UNORM_BLOCK = 177, - ASTC_10x8_SRGB_BLOCK = 178, - ASTC_10x10_UNORM_BLOCK = 179, - ASTC_10x10_SRGB_BLOCK = 180, - ASTC_12x10_UNORM_BLOCK = 181, - ASTC_12x10_SRGB_BLOCK = 182, - ASTC_12x12_UNORM_BLOCK = 183, - ASTC_12x12_SRGB_BLOCK = 184, - G8B8G8R8_422_UNORM = 1000156000, - B8G8R8G8_422_UNORM = 1000156001, - G8_B8_R8_3PLANE_420_UNORM = 1000156002, - G8_B8R8_2PLANE_420_UNORM = 1000156003, - G8_B8_R8_3PLANE_422_UNORM = 1000156004, - G8_B8R8_2PLANE_422_UNORM = 1000156005, - G8_B8_R8_3PLANE_444_UNORM = 1000156006, - R10X6_UNORM_PACK16 = 1000156007, - R10X6G10X6_UNORM_2PACK16 = 1000156008, - R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009, - G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010, - B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011, - G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012, - G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013, - G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014, - G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015, - G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016, - R12X4_UNORM_PACK16 = 1000156017, - R12X4G12X4_UNORM_2PACK16 = 1000156018, - R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019, - G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020, - B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021, - G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022, - G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023, - G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024, - G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025, - G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026, - G16B16G16R16_422_UNORM = 1000156027, - B16G16R16G16_422_UNORM = 1000156028, - G16_B16_R16_3PLANE_420_UNORM = 1000156029, - G16_B16R16_2PLANE_420_UNORM = 1000156030, - G16_B16_R16_3PLANE_422_UNORM = 1000156031, - G16_B16R16_2PLANE_422_UNORM = 1000156032, - G16_B16_R16_3PLANE_444_UNORM = 1000156033, - G8_B8R8_2PLANE_444_UNORM = 1000330000, - G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16 = 1000330001, - G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16 = 1000330002, - G16_B16R16_2PLANE_444_UNORM = 1000330003, - A4R4G4B4_UNORM_PACK16 = 1000340000, - A4B4G4R4_UNORM_PACK16 = 1000340001, - ASTC_4x4_SFLOAT_BLOCK = 1000066000, - ASTC_5x4_SFLOAT_BLOCK = 1000066001, - ASTC_5x5_SFLOAT_BLOCK = 1000066002, - ASTC_6x5_SFLOAT_BLOCK = 1000066003, - ASTC_6x6_SFLOAT_BLOCK = 1000066004, - ASTC_8x5_SFLOAT_BLOCK = 1000066005, - ASTC_8x6_SFLOAT_BLOCK = 1000066006, - ASTC_8x8_SFLOAT_BLOCK = 1000066007, - ASTC_10x5_SFLOAT_BLOCK = 1000066008, - ASTC_10x6_SFLOAT_BLOCK = 1000066009, - ASTC_10x8_SFLOAT_BLOCK = 1000066010, - ASTC_10x10_SFLOAT_BLOCK = 1000066011, - ASTC_12x10_SFLOAT_BLOCK = 1000066012, - ASTC_12x12_SFLOAT_BLOCK = 1000066013, - PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, - PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, - PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, - PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, - PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, - PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, - PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, - PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, - ASTC_4x4_SFLOAT_BLOCK_EXT = 1000066000, - ASTC_5x4_SFLOAT_BLOCK_EXT = 1000066001, - ASTC_5x5_SFLOAT_BLOCK_EXT = 1000066002, - ASTC_6x5_SFLOAT_BLOCK_EXT = 1000066003, - ASTC_6x6_SFLOAT_BLOCK_EXT = 1000066004, - ASTC_8x5_SFLOAT_BLOCK_EXT = 1000066005, - ASTC_8x6_SFLOAT_BLOCK_EXT = 1000066006, - ASTC_8x8_SFLOAT_BLOCK_EXT = 1000066007, - ASTC_10x5_SFLOAT_BLOCK_EXT = 1000066008, - ASTC_10x6_SFLOAT_BLOCK_EXT = 1000066009, - ASTC_10x8_SFLOAT_BLOCK_EXT = 1000066010, - ASTC_10x10_SFLOAT_BLOCK_EXT = 1000066011, - ASTC_12x10_SFLOAT_BLOCK_EXT = 1000066012, - ASTC_12x12_SFLOAT_BLOCK_EXT = 1000066013, - G8B8G8R8_422_UNORM_KHR = 1000156000, - B8G8R8G8_422_UNORM_KHR = 1000156001, - G8_B8_R8_3PLANE_420_UNORM_KHR = 1000156002, - G8_B8R8_2PLANE_420_UNORM_KHR = 1000156003, - G8_B8_R8_3PLANE_422_UNORM_KHR = 1000156004, - G8_B8R8_2PLANE_422_UNORM_KHR = 1000156005, - G8_B8_R8_3PLANE_444_UNORM_KHR = 1000156006, - R10X6_UNORM_PACK16_KHR = 1000156007, - R10X6G10X6_UNORM_2PACK16_KHR = 1000156008, - R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = 1000156009, - G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = 1000156010, - B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = 1000156011, - G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = 1000156012, - G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = 1000156013, - G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = 1000156014, - G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = 1000156015, - G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = 1000156016, - R12X4_UNORM_PACK16_KHR = 1000156017, - R12X4G12X4_UNORM_2PACK16_KHR = 1000156018, - R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = 1000156019, - G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = 1000156020, - B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = 1000156021, - G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = 1000156022, - G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = 1000156023, - G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = 1000156024, - G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = 1000156025, - G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = 1000156026, - G16B16G16R16_422_UNORM_KHR = 1000156027, - B16G16R16G16_422_UNORM_KHR = 1000156028, - G16_B16_R16_3PLANE_420_UNORM_KHR = 1000156029, - G16_B16R16_2PLANE_420_UNORM_KHR = 1000156030, - G16_B16_R16_3PLANE_422_UNORM_KHR = 1000156031, - G16_B16R16_2PLANE_422_UNORM_KHR = 1000156032, - G16_B16_R16_3PLANE_444_UNORM_KHR = 1000156033, - ASTC_3x3x3_UNORM_BLOCK_EXT = 1000288000, - ASTC_3x3x3_SRGB_BLOCK_EXT = 1000288001, - ASTC_3x3x3_SFLOAT_BLOCK_EXT = 1000288002, - ASTC_4x3x3_UNORM_BLOCK_EXT = 1000288003, - ASTC_4x3x3_SRGB_BLOCK_EXT = 1000288004, - ASTC_4x3x3_SFLOAT_BLOCK_EXT = 1000288005, - ASTC_4x4x3_UNORM_BLOCK_EXT = 1000288006, - ASTC_4x4x3_SRGB_BLOCK_EXT = 1000288007, - ASTC_4x4x3_SFLOAT_BLOCK_EXT = 1000288008, - ASTC_4x4x4_UNORM_BLOCK_EXT = 1000288009, - ASTC_4x4x4_SRGB_BLOCK_EXT = 1000288010, - ASTC_4x4x4_SFLOAT_BLOCK_EXT = 1000288011, - ASTC_5x4x4_UNORM_BLOCK_EXT = 1000288012, - ASTC_5x4x4_SRGB_BLOCK_EXT = 1000288013, - ASTC_5x4x4_SFLOAT_BLOCK_EXT = 1000288014, - ASTC_5x5x4_UNORM_BLOCK_EXT = 1000288015, - ASTC_5x5x4_SRGB_BLOCK_EXT = 1000288016, - ASTC_5x5x4_SFLOAT_BLOCK_EXT = 1000288017, - ASTC_5x5x5_UNORM_BLOCK_EXT = 1000288018, - ASTC_5x5x5_SRGB_BLOCK_EXT = 1000288019, - ASTC_5x5x5_SFLOAT_BLOCK_EXT = 1000288020, - ASTC_6x5x5_UNORM_BLOCK_EXT = 1000288021, - ASTC_6x5x5_SRGB_BLOCK_EXT = 1000288022, - ASTC_6x5x5_SFLOAT_BLOCK_EXT = 1000288023, - ASTC_6x6x5_UNORM_BLOCK_EXT = 1000288024, - ASTC_6x6x5_SRGB_BLOCK_EXT = 1000288025, - ASTC_6x6x5_SFLOAT_BLOCK_EXT = 1000288026, - ASTC_6x6x6_UNORM_BLOCK_EXT = 1000288027, - ASTC_6x6x6_SRGB_BLOCK_EXT = 1000288028, - ASTC_6x6x6_SFLOAT_BLOCK_EXT = 1000288029, - G8_B8R8_2PLANE_444_UNORM_EXT = 1000330000, - G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16_EXT = 1000330001, - G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16_EXT = 1000330002, - G16_B16R16_2PLANE_444_UNORM_EXT = 1000330003, - A4R4G4B4_UNORM_PACK16_EXT = 1000340000, - A4B4G4R4_UNORM_PACK16_EXT = 1000340001, - R16G16_S10_5_NV = 1000464000, -} - -/** Structure type enumerant */ -export enum StructureType { - APPLICATION_INFO = 0, - INSTANCE_CREATE_INFO = 1, - DEVICE_QUEUE_CREATE_INFO = 2, - DEVICE_CREATE_INFO = 3, - SUBMIT_INFO = 4, - MEMORY_ALLOCATE_INFO = 5, - MAPPED_MEMORY_RANGE = 6, - BIND_SPARSE_INFO = 7, - FENCE_CREATE_INFO = 8, - SEMAPHORE_CREATE_INFO = 9, - EVENT_CREATE_INFO = 10, - QUERY_POOL_CREATE_INFO = 11, - BUFFER_CREATE_INFO = 12, - BUFFER_VIEW_CREATE_INFO = 13, - IMAGE_CREATE_INFO = 14, - IMAGE_VIEW_CREATE_INFO = 15, - SHADER_MODULE_CREATE_INFO = 16, - PIPELINE_CACHE_CREATE_INFO = 17, - PIPELINE_SHADER_STAGE_CREATE_INFO = 18, - PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, - PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, - PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, - PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, - PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, - PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, - PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, - PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, - PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, - GRAPHICS_PIPELINE_CREATE_INFO = 28, - COMPUTE_PIPELINE_CREATE_INFO = 29, - PIPELINE_LAYOUT_CREATE_INFO = 30, - SAMPLER_CREATE_INFO = 31, - DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, - DESCRIPTOR_POOL_CREATE_INFO = 33, - DESCRIPTOR_SET_ALLOCATE_INFO = 34, - WRITE_DESCRIPTOR_SET = 35, - COPY_DESCRIPTOR_SET = 36, - FRAMEBUFFER_CREATE_INFO = 37, - RENDER_PASS_CREATE_INFO = 38, - COMMAND_POOL_CREATE_INFO = 39, - COMMAND_BUFFER_ALLOCATE_INFO = 40, - COMMAND_BUFFER_INHERITANCE_INFO = 41, - COMMAND_BUFFER_BEGIN_INFO = 42, - RENDER_PASS_BEGIN_INFO = 43, - BUFFER_MEMORY_BARRIER = 44, - IMAGE_MEMORY_BARRIER = 45, - MEMORY_BARRIER = 46, - /** Reserved for internal use by the loader, layers, and ICDs */ - LOADER_INSTANCE_CREATE_INFO = 47, - /** Reserved for internal use by the loader, layers, and ICDs */ - LOADER_DEVICE_CREATE_INFO = 48, - PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000, - BIND_BUFFER_MEMORY_INFO = 1000157000, - BIND_IMAGE_MEMORY_INFO = 1000157001, - PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000, - MEMORY_DEDICATED_REQUIREMENTS = 1000127000, - MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001, - MEMORY_ALLOCATE_FLAGS_INFO = 1000060000, - DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003, - DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004, - DEVICE_GROUP_SUBMIT_INFO = 1000060005, - DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006, - BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013, - BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014, - PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000, - DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001, - BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000, - IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001, - IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002, - MEMORY_REQUIREMENTS_2 = 1000146003, - SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004, - PHYSICAL_DEVICE_FEATURES_2 = 1000059000, - PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001, - FORMAT_PROPERTIES_2 = 1000059002, - IMAGE_FORMAT_PROPERTIES_2 = 1000059003, - PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004, - QUEUE_FAMILY_PROPERTIES_2 = 1000059005, - PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006, - SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007, - PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008, - PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000, - RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001, - IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002, - PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003, - RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000, - PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001, - PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002, - PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000, - PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = 1000120000, - PROTECTED_SUBMIT_INFO = 1000145000, - PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001, - PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002, - DEVICE_QUEUE_INFO_2 = 1000145003, - SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000, - SAMPLER_YCBCR_CONVERSION_INFO = 1000156001, - BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002, - IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003, - PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004, - SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005, - DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000, - PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000, - EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001, - PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002, - EXTERNAL_BUFFER_PROPERTIES = 1000071003, - PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004, - EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000, - EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001, - EXPORT_MEMORY_ALLOCATE_INFO = 1000072002, - PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000, - EXTERNAL_FENCE_PROPERTIES = 1000112001, - EXPORT_FENCE_CREATE_INFO = 1000113000, - EXPORT_SEMAPHORE_CREATE_INFO = 1000077000, - PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000, - EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001, - PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000, - DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001, - PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES = 1000063000, - PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = 1000063000, - PHYSICAL_DEVICE_VULKAN_1_1_FEATURES = 49, - PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES = 50, - PHYSICAL_DEVICE_VULKAN_1_2_FEATURES = 51, - PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES = 52, - IMAGE_FORMAT_LIST_CREATE_INFO = 1000147000, - ATTACHMENT_DESCRIPTION_2 = 1000109000, - ATTACHMENT_REFERENCE_2 = 1000109001, - SUBPASS_DESCRIPTION_2 = 1000109002, - SUBPASS_DEPENDENCY_2 = 1000109003, - RENDER_PASS_CREATE_INFO_2 = 1000109004, - SUBPASS_BEGIN_INFO = 1000109005, - SUBPASS_END_INFO = 1000109006, - PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES = 1000177000, - PHYSICAL_DEVICE_DRIVER_PROPERTIES = 1000196000, - PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES = 1000180000, - PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES = 1000082000, - PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES = 1000197000, - DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO = 1000161000, - PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES = 1000161001, - PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES = 1000161002, - DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO = 1000161003, - DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT = 1000161004, - PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES = 1000199000, - SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE = 1000199001, - PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES = 1000221000, - IMAGE_STENCIL_USAGE_CREATE_INFO = 1000246000, - PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES = 1000130000, - SAMPLER_REDUCTION_MODE_CREATE_INFO = 1000130001, - PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES = 1000211000, - PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES = 1000108000, - FRAMEBUFFER_ATTACHMENTS_CREATE_INFO = 1000108001, - FRAMEBUFFER_ATTACHMENT_IMAGE_INFO = 1000108002, - RENDER_PASS_ATTACHMENT_BEGIN_INFO = 1000108003, - PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES = 1000253000, - PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES = 1000175000, - PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES = 1000241000, - ATTACHMENT_REFERENCE_STENCIL_LAYOUT = 1000241001, - ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT = 1000241002, - PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES = 1000261000, - PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES = 1000207000, - PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES = 1000207001, - SEMAPHORE_TYPE_CREATE_INFO = 1000207002, - TIMELINE_SEMAPHORE_SUBMIT_INFO = 1000207003, - SEMAPHORE_WAIT_INFO = 1000207004, - SEMAPHORE_SIGNAL_INFO = 1000207005, - PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES = 1000257000, - BUFFER_DEVICE_ADDRESS_INFO = 1000244001, - BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO = 1000257002, - MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO = 1000257003, - DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO = 1000257004, - PHYSICAL_DEVICE_VULKAN_1_3_FEATURES = 53, - PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES = 54, - PIPELINE_CREATION_FEEDBACK_CREATE_INFO = 1000192000, - PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES = 1000215000, - PHYSICAL_DEVICE_TOOL_PROPERTIES = 1000245000, - PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES = 1000276000, - PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES = 1000295000, - DEVICE_PRIVATE_DATA_CREATE_INFO = 1000295001, - PRIVATE_DATA_SLOT_CREATE_INFO = 1000295002, - PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES = 1000297000, - MEMORY_BARRIER_2 = 1000314000, - BUFFER_MEMORY_BARRIER_2 = 1000314001, - IMAGE_MEMORY_BARRIER_2 = 1000314002, - DEPENDENCY_INFO = 1000314003, - SUBMIT_INFO_2 = 1000314004, - SEMAPHORE_SUBMIT_INFO = 1000314005, - COMMAND_BUFFER_SUBMIT_INFO = 1000314006, - PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES = 1000314007, - PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES = 1000325000, - PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES = 1000335000, - COPY_BUFFER_INFO_2 = 1000337000, - COPY_IMAGE_INFO_2 = 1000337001, - COPY_BUFFER_TO_IMAGE_INFO_2 = 1000337002, - COPY_IMAGE_TO_BUFFER_INFO_2 = 1000337003, - BLIT_IMAGE_INFO_2 = 1000337004, - RESOLVE_IMAGE_INFO_2 = 1000337005, - BUFFER_COPY_2 = 1000337006, - IMAGE_COPY_2 = 1000337007, - IMAGE_BLIT_2 = 1000337008, - BUFFER_IMAGE_COPY_2 = 1000337009, - IMAGE_RESOLVE_2 = 1000337010, - PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES = 1000225000, - PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO = 1000225001, - PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES = 1000225002, - PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES = 1000138000, - PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES = 1000138001, - WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK = 1000138002, - DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO = 1000138003, - PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES = 1000066000, - RENDERING_INFO = 1000044000, - RENDERING_ATTACHMENT_INFO = 1000044001, - PIPELINE_RENDERING_CREATE_INFO = 1000044002, - PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES = 1000044003, - COMMAND_BUFFER_INHERITANCE_RENDERING_INFO = 1000044004, - PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES = 1000280000, - PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES = 1000280001, - PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES = 1000281001, - FORMAT_PROPERTIES_3 = 1000360000, - PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES = 1000413000, - PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES = 1000413001, - DEVICE_BUFFER_MEMORY_REQUIREMENTS = 1000413002, - DEVICE_IMAGE_MEMORY_REQUIREMENTS = 1000413003, - SWAPCHAIN_CREATE_INFO_KHR = 1000001000, - PRESENT_INFO_KHR = 1000001001, - DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007, - IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008, - BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009, - ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010, - DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011, - DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012, - DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, - DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, - DISPLAY_PRESENT_INFO_KHR = 1000003000, - XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, - XCB_SURFACE_CREATE_INFO_KHR = 1000005000, - WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, - ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, - WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, - NATIVE_BUFFER_ANDROID = 1000010000, - SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID = 1000010001, - PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID = 1000010002, - DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, - /** Backwards-compatible alias containing a typo */ - DEBUG_REPORT_CREATE_INFO_EXT = 1000011000, - PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, - DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, - DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, - DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, - VIDEO_PROFILE_INFO_KHR = 1000023000, - VIDEO_CAPABILITIES_KHR = 1000023001, - VIDEO_PICTURE_RESOURCE_INFO_KHR = 1000023002, - VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR = 1000023003, - BIND_VIDEO_SESSION_MEMORY_INFO_KHR = 1000023004, - VIDEO_SESSION_CREATE_INFO_KHR = 1000023005, - VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000023006, - VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR = 1000023007, - VIDEO_BEGIN_CODING_INFO_KHR = 1000023008, - VIDEO_END_CODING_INFO_KHR = 1000023009, - VIDEO_CODING_CONTROL_INFO_KHR = 1000023010, - VIDEO_REFERENCE_SLOT_INFO_KHR = 1000023011, - QUEUE_FAMILY_VIDEO_PROPERTIES_KHR = 1000023012, - VIDEO_PROFILE_LIST_INFO_KHR = 1000023013, - PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR = 1000023014, - VIDEO_FORMAT_PROPERTIES_KHR = 1000023015, - QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR = 1000023016, - VIDEO_DECODE_INFO_KHR = 1000024000, - VIDEO_DECODE_CAPABILITIES_KHR = 1000024001, - VIDEO_DECODE_USAGE_INFO_KHR = 1000024002, - DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, - DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, - DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, - PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT = 1000028000, - PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001, - PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002, - CU_MODULE_CREATE_INFO_NVX = 1000029000, - CU_FUNCTION_CREATE_INFO_NVX = 1000029001, - CU_LAUNCH_INFO_NVX = 1000029002, - IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000, - IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001, - VIDEO_ENCODE_H264_CAPABILITIES_EXT = 1000038000, - VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000038001, - VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT = 1000038002, - VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT = 1000038003, - VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT = 1000038004, - VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT = 1000038005, - VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT = 1000038006, - VIDEO_ENCODE_H264_PROFILE_INFO_EXT = 1000038007, - VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT = 1000038008, - VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT = 1000038009, - VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT = 1000038010, - VIDEO_ENCODE_H265_CAPABILITIES_EXT = 1000039000, - VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000039001, - VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT = 1000039002, - VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT = 1000039003, - VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT = 1000039004, - VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT = 1000039005, - VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT = 1000039006, - VIDEO_ENCODE_H265_PROFILE_INFO_EXT = 1000039007, - VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT = 1000039008, - VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT = 1000039009, - VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT = 1000039010, - VIDEO_DECODE_H264_CAPABILITIES_EXT = 1000040000, - VIDEO_DECODE_H264_PICTURE_INFO_EXT = 1000040001, - VIDEO_DECODE_H264_PROFILE_INFO_EXT = 1000040003, - VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000040004, - VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT = 1000040005, - VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT = 1000040006, - TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000, - RENDERING_INFO_KHR = 1000044000, - RENDERING_ATTACHMENT_INFO_KHR = 1000044001, - PIPELINE_RENDERING_CREATE_INFO_KHR = 1000044002, - PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES_KHR = 1000044003, - COMMAND_BUFFER_INHERITANCE_RENDERING_INFO_KHR = 1000044004, - RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000044006, - RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT = 1000044007, - ATTACHMENT_SAMPLE_COUNT_INFO_AMD = 1000044008, - ATTACHMENT_SAMPLE_COUNT_INFO_NV = 1000044008, - MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX = 1000044009, - STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP = 1000049000, - PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000, - RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = 1000053000, - PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = 1000053001, - PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = 1000053002, - EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, - EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, - IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, - EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, - WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, - PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, - PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, - FORMAT_PROPERTIES_2_KHR = 1000059002, - IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, - PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, - QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, - PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, - SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, - PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, - MEMORY_ALLOCATE_FLAGS_INFO_KHR = 1000060000, - DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = 1000060003, - DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = 1000060004, - DEVICE_GROUP_SUBMIT_INFO_KHR = 1000060005, - DEVICE_GROUP_BIND_SPARSE_INFO_KHR = 1000060006, - BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060013, - BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = 1000060014, - VALIDATION_FLAGS_EXT = 1000061000, - VI_SURFACE_CREATE_INFO_NN = 1000062000, - PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT = 1000066000, - IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000, - PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001, - PIPELINE_ROBUSTNESS_CREATE_INFO_EXT = 1000068000, - PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT = 1000068001, - PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT = 1000068002, - PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = 1000070000, - DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = 1000070001, - PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = 1000071000, - EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = 1000071001, - PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = 1000071002, - EXTERNAL_BUFFER_PROPERTIES_KHR = 1000071003, - PHYSICAL_DEVICE_ID_PROPERTIES_KHR = 1000071004, - EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = 1000072000, - EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = 1000072001, - EXPORT_MEMORY_ALLOCATE_INFO_KHR = 1000072002, - IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000, - EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001, - MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002, - MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003, - IMPORT_MEMORY_FD_INFO_KHR = 1000074000, - MEMORY_FD_PROPERTIES_KHR = 1000074001, - MEMORY_GET_FD_INFO_KHR = 1000074002, - WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000, - PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = 1000076000, - EXTERNAL_SEMAPHORE_PROPERTIES_KHR = 1000076001, - EXPORT_SEMAPHORE_CREATE_INFO_KHR = 1000077000, - IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000, - EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001, - D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002, - SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003, - IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000, - SEMAPHORE_GET_FD_INFO_KHR = 1000079001, - PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, - COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000, - PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001, - CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002, - PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR = 1000082000, - PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = 1000082000, - PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = 1000083000, - PRESENT_REGIONS_KHR = 1000084000, - DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000, - PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, - SURFACE_CAPABILITIES_2_EXT = 1000090000, - /** Backwards-compatible alias containing a typo */ - SURFACE_CAPABILITIES2_EXT = 1000090000, - DISPLAY_POWER_INFO_EXT = 1000091000, - DEVICE_EVENT_INFO_EXT = 1000091001, - DISPLAY_EVENT_INFO_EXT = 1000091002, - SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, - PRESENT_TIMES_INFO_GOOGLE = 1000092000, - PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, - PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, - PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, - PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, - PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000, - PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001, - PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT = 1000102000, - PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT = 1000102001, - HDR_METADATA_EXT = 1000105000, - PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES_KHR = 1000108000, - FRAMEBUFFER_ATTACHMENTS_CREATE_INFO_KHR = 1000108001, - FRAMEBUFFER_ATTACHMENT_IMAGE_INFO_KHR = 1000108002, - RENDER_PASS_ATTACHMENT_BEGIN_INFO_KHR = 1000108003, - ATTACHMENT_DESCRIPTION_2_KHR = 1000109000, - ATTACHMENT_REFERENCE_2_KHR = 1000109001, - SUBPASS_DESCRIPTION_2_KHR = 1000109002, - SUBPASS_DEPENDENCY_2_KHR = 1000109003, - RENDER_PASS_CREATE_INFO_2_KHR = 1000109004, - SUBPASS_BEGIN_INFO_KHR = 1000109005, - SUBPASS_END_INFO_KHR = 1000109006, - SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000, - PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000, - EXTERNAL_FENCE_PROPERTIES_KHR = 1000112001, - EXPORT_FENCE_CREATE_INFO_KHR = 1000113000, - IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000, - EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001, - FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002, - IMPORT_FENCE_FD_INFO_KHR = 1000115000, - FENCE_GET_FD_INFO_KHR = 1000115001, - PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR = 1000116000, - PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR = 1000116001, - QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR = 1000116002, - PERFORMANCE_QUERY_SUBMIT_INFO_KHR = 1000116003, - ACQUIRE_PROFILING_LOCK_INFO_KHR = 1000116004, - PERFORMANCE_COUNTER_KHR = 1000116005, - PERFORMANCE_COUNTER_DESCRIPTION_KHR = 1000116006, - PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = 1000117000, - RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = 1000117001, - IMAGE_VIEW_USAGE_CREATE_INFO_KHR = 1000117002, - PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = 1000117003, - PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000, - SURFACE_CAPABILITIES_2_KHR = 1000119001, - SURFACE_FORMAT_2_KHR = 1000119002, - PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES_KHR = 1000120000, - PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, - DISPLAY_PROPERTIES_2_KHR = 1000121000, - DISPLAY_PLANE_PROPERTIES_2_KHR = 1000121001, - DISPLAY_MODE_PROPERTIES_2_KHR = 1000121002, - DISPLAY_PLANE_INFO_2_KHR = 1000121003, - DISPLAY_PLANE_CAPABILITIES_2_KHR = 1000121004, - IOS_SURFACE_CREATE_INFO_MVK = 1000122000, - MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, - MEMORY_DEDICATED_REQUIREMENTS_KHR = 1000127000, - MEMORY_DEDICATED_ALLOCATE_INFO_KHR = 1000127001, - DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000, - DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001, - DEBUG_UTILS_LABEL_EXT = 1000128002, - DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003, - DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004, - ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000, - ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001, - ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002, - IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003, - MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004, - EXTERNAL_FORMAT_ANDROID = 1000129005, - ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006, - PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000, - SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001, - PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = 1000138000, - PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = 1000138001, - WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = 1000138002, - DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT = 1000138003, - SAMPLE_LOCATIONS_INFO_EXT = 1000143000, - RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001, - PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002, - PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003, - MULTISAMPLE_PROPERTIES_EXT = 1000143004, - BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000, - IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001, - IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002, - MEMORY_REQUIREMENTS_2_KHR = 1000146003, - SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = 1000146004, - IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000, - PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000, - PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001, - PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002, - PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000, - WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR = 1000150007, - ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR = 1000150000, - ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR = 1000150002, - ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR = 1000150003, - ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR = 1000150004, - ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR = 1000150005, - ACCELERATION_STRUCTURE_GEOMETRY_KHR = 1000150006, - ACCELERATION_STRUCTURE_VERSION_INFO_KHR = 1000150009, - COPY_ACCELERATION_STRUCTURE_INFO_KHR = 1000150010, - COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR = 1000150011, - COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR = 1000150012, - PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR = 1000150013, - PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR = 1000150014, - ACCELERATION_STRUCTURE_CREATE_INFO_KHR = 1000150017, - ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR = 1000150020, - PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR = 1000347000, - PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR = 1000347001, - RAY_TRACING_PIPELINE_CREATE_INFO_KHR = 1000150015, - RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR = 1000150016, - RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR = 1000150018, - PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR = 1000348013, - PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000, - PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV = 1000154000, - PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV = 1000154001, - SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = 1000156000, - SAMPLER_YCBCR_CONVERSION_INFO_KHR = 1000156001, - BIND_IMAGE_PLANE_MEMORY_INFO_KHR = 1000156002, - IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = 1000156003, - PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = 1000156004, - SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = 1000156005, - BIND_BUFFER_MEMORY_INFO_KHR = 1000157000, - BIND_IMAGE_MEMORY_INFO_KHR = 1000157001, - DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT = 1000158000, - PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT = 1000158002, - IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003, - IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004, - IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005, - DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT = 1000158006, - VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000, - SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001, - DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = 1000161000, - PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = 1000161001, - PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = 1000161002, - DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = 1000161003, - DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = 1000161004, - PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR = 1000163000, - PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR = 1000163001, - PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV = 1000164000, - PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV = 1000164001, - PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV = 1000164002, - PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV = 1000164005, - RAY_TRACING_PIPELINE_CREATE_INFO_NV = 1000165000, - ACCELERATION_STRUCTURE_CREATE_INFO_NV = 1000165001, - GEOMETRY_NV = 1000165003, - GEOMETRY_TRIANGLES_NV = 1000165004, - GEOMETRY_AABB_NV = 1000165005, - BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV = 1000165006, - WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV = 1000165007, - ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV = 1000165008, - PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV = 1000165009, - RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV = 1000165011, - ACCELERATION_STRUCTURE_INFO_NV = 1000165012, - PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV = 1000166000, - PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV = 1000166001, - PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = 1000168000, - DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = 1000168001, - PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT = 1000170000, - FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001, - DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000, - PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = 1000175000, - PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000, - IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000, - MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, - PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, - PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000, - PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000, - PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000, - CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000, - PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000, - VIDEO_DECODE_H265_CAPABILITIES_EXT = 1000187000, - VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000187001, - VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT = 1000187002, - VIDEO_DECODE_H265_PROFILE_INFO_EXT = 1000187003, - VIDEO_DECODE_H265_PICTURE_INFO_EXT = 1000187004, - VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT = 1000187005, - DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR = 1000174000, - PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR = 1000388000, - QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = 1000388001, - DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000, - PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, - PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001, - PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002, - PRESENT_FRAME_TOKEN_GGP = 1000191000, - PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000192000, - PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = 1000196000, - PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = 1000197000, - PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000, - SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR = 1000199001, - PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV = 1000201000, - PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV = 1000202000, - PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV = 1000202001, - PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV = 1000203000, - PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV = 1000204000, - PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV = 1000205000, - PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002, - CHECKPOINT_DATA_NV = 1000206000, - QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001, - PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = 1000207000, - PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = 1000207001, - SEMAPHORE_TYPE_CREATE_INFO_KHR = 1000207002, - TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = 1000207003, - SEMAPHORE_WAIT_INFO_KHR = 1000207004, - SEMAPHORE_SIGNAL_INFO_KHR = 1000207005, - PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL = 1000209000, - QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL = 1000210000, - /** Backwards-compatible alias containing a typo */ - QUERY_POOL_CREATE_INFO_INTEL = 1000210000, - INITIALIZE_PERFORMANCE_API_INFO_INTEL = 1000210001, - PERFORMANCE_MARKER_INFO_INTEL = 1000210002, - PERFORMANCE_STREAM_MARKER_INFO_INTEL = 1000210003, - PERFORMANCE_OVERRIDE_INFO_INTEL = 1000210004, - PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL = 1000210005, - PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR = 1000211000, - PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT = 1000212000, - DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD = 1000213000, - SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD = 1000213001, - IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA = 1000214000, - PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR = 1000215000, - METAL_SURFACE_CREATE_INFO_EXT = 1000217000, - PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT = 1000218000, - PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT = 1000218001, - RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT = 1000218002, - PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT = 1000221000, - PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT = 1000225000, - PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = 1000225001, - PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT = 1000225002, - FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000226000, - PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR = 1000226001, - PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR = 1000226002, - PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR = 1000226003, - PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004, - PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000, - PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000, - PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000, - PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000, - PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000, - MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001, - SURFACE_PROTECTED_CAPABILITIES_KHR = 1000239000, - PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV = 1000240000, - PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR = 1000241000, - ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = 1000241001, - ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = 1000241002, - PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT = 1000244000, - PHYSICAL_DEVICE_BUFFER_ADDRESS_FEATURES_EXT = 1000244000, - BUFFER_DEVICE_ADDRESS_INFO_EXT = 1000244001, - BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT = 1000244002, - PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT = 1000245000, - IMAGE_STENCIL_USAGE_CREATE_INFO_EXT = 1000246000, - VALIDATION_FEATURES_EXT = 1000247000, - PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR = 1000248000, - PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV = 1000249000, - COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249001, - PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV = 1000249002, - PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV = 1000250000, - PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV = 1000250001, - FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV = 1000250002, - PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT = 1000251000, - PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT = 1000252000, - PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR = 1000253000, - PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT = 1000254000, - PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT = 1000254001, - PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT = 1000254002, - SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT = 1000255000, - SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002, - SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001, - HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000, - PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR = 1000257000, - BUFFER_DEVICE_ADDRESS_INFO_KHR = 1000244001, - BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = 1000257002, - MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = 1000257003, - DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = 1000257004, - PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = 1000259000, - PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = 1000259001, - PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002, - PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000, - PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = 1000261000, - PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = 1000265000, - /** Not promoted to 1.3 */ - PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000, - PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000, - PIPELINE_INFO_KHR = 1000269001, - PIPELINE_EXECUTABLE_PROPERTIES_KHR = 1000269002, - PIPELINE_EXECUTABLE_INFO_KHR = 1000269003, - PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004, - PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005, - PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT = 1000273000, - PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = 1000276000, - PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV = 1000277000, - GRAPHICS_SHADER_GROUP_CREATE_INFO_NV = 1000277001, - GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV = 1000277002, - INDIRECT_COMMANDS_LAYOUT_TOKEN_NV = 1000277003, - INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV = 1000277004, - GENERATED_COMMANDS_INFO_NV = 1000277005, - GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV = 1000277006, - PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV = 1000277007, - PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV = 1000278000, - COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV = 1000278001, - PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = 1000280000, - PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = 1000280001, - /** Not promoted to 1.3 */ - PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT = 1000281000, - PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT = 1000281001, - COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM = 1000282000, - RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM = 1000282001, - PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT = 1000284000, - DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT = 1000284001, - DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT = 1000284002, - PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT = 1000286000, - PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT = 1000286001, - SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT = 1000287000, - PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT = 1000287001, - PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT = 1000287002, - PIPELINE_LIBRARY_CREATE_INFO_KHR = 1000290000, - PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV = 1000292000, - SURFACE_CAPABILITIES_PRESENT_BARRIER_NV = 1000292001, - SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV = 1000292002, - PRESENT_ID_KHR = 1000294000, - PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001, - PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT = 1000295000, - DEVICE_PRIVATE_DATA_CREATE_INFO_EXT = 1000295001, - PRIVATE_DATA_SLOT_CREATE_INFO_EXT = 1000295002, - PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES_EXT = 1000297000, - VIDEO_ENCODE_INFO_KHR = 1000299000, - VIDEO_ENCODE_RATE_CONTROL_INFO_KHR = 1000299001, - VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR = 1000299002, - VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003, - VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004, - PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000, - DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001, - RESERVED_QCOM = 1000309000, - EXPORT_METAL_OBJECT_CREATE_INFO_EXT = 1000311000, - EXPORT_METAL_OBJECTS_INFO_EXT = 1000311001, - EXPORT_METAL_DEVICE_INFO_EXT = 1000311002, - EXPORT_METAL_COMMAND_QUEUE_INFO_EXT = 1000311003, - EXPORT_METAL_BUFFER_INFO_EXT = 1000311004, - IMPORT_METAL_BUFFER_INFO_EXT = 1000311005, - EXPORT_METAL_TEXTURE_INFO_EXT = 1000311006, - IMPORT_METAL_TEXTURE_INFO_EXT = 1000311007, - EXPORT_METAL_IO_SURFACE_INFO_EXT = 1000311008, - IMPORT_METAL_IO_SURFACE_INFO_EXT = 1000311009, - EXPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311010, - IMPORT_METAL_SHARED_EVENT_INFO_EXT = 1000311011, - MEMORY_BARRIER_2_KHR = 1000314000, - BUFFER_MEMORY_BARRIER_2_KHR = 1000314001, - IMAGE_MEMORY_BARRIER_2_KHR = 1000314002, - DEPENDENCY_INFO_KHR = 1000314003, - SUBMIT_INFO_2_KHR = 1000314004, - SEMAPHORE_SUBMIT_INFO_KHR = 1000314005, - COMMAND_BUFFER_SUBMIT_INFO_KHR = 1000314006, - PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR = 1000314007, - QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV = 1000314008, - CHECKPOINT_DATA_2_NV = 1000314009, - PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT = 1000316000, - PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT = 1000316001, - PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT = 1000316002, - DESCRIPTOR_ADDRESS_INFO_EXT = 1000316003, - DESCRIPTOR_GET_INFO_EXT = 1000316004, - BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316005, - IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316006, - IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316007, - SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316008, - OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT = 1000316010, - DESCRIPTOR_BUFFER_BINDING_INFO_EXT = 1000316011, - DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT = 1000316012, - ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT = 1000316009, - PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT = 1000320000, - PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT = 1000320001, - GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT = 1000320002, - PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD = 1000321000, - PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR = 1000203000, - PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR = 1000322000, - PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR = 1000323000, - PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES_KHR = 1000325000, - PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV = 1000326000, - PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV = 1000326001, - PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV = 1000326002, - ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV = 1000327000, - PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV = 1000327001, - ACCELERATION_STRUCTURE_MOTION_INFO_NV = 1000327002, - PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT = 1000328000, - PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT = 1000328001, - PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT = 1000330000, - PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT = 1000332000, - PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT = 1000332001, - COPY_COMMAND_TRANSFORM_INFO_QCOM = 1000333000, - PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES_EXT = 1000335000, - PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR = 1000336000, - COPY_BUFFER_INFO_2_KHR = 1000337000, - COPY_IMAGE_INFO_2_KHR = 1000337001, - COPY_BUFFER_TO_IMAGE_INFO_2_KHR = 1000337002, - COPY_IMAGE_TO_BUFFER_INFO_2_KHR = 1000337003, - BLIT_IMAGE_INFO_2_KHR = 1000337004, - RESOLVE_IMAGE_INFO_2_KHR = 1000337005, - BUFFER_COPY_2_KHR = 1000337006, - IMAGE_COPY_2_KHR = 1000337007, - IMAGE_BLIT_2_KHR = 1000337008, - BUFFER_IMAGE_COPY_2_KHR = 1000337009, - IMAGE_RESOLVE_2_KHR = 1000337010, - PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT = 1000338000, - IMAGE_COMPRESSION_CONTROL_EXT = 1000338001, - SUBRESOURCE_LAYOUT_2_EXT = 1000338002, - IMAGE_SUBRESOURCE_2_EXT = 1000338003, - IMAGE_COMPRESSION_PROPERTIES_EXT = 1000338004, - PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT = 1000339000, - PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000, - PHYSICAL_DEVICE_FAULT_FEATURES_EXT = 1000341000, - DEVICE_FAULT_COUNTS_EXT = 1000341001, - DEVICE_FAULT_INFO_EXT = 1000341002, - PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = 1000342000, - PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT = 1000344000, - DIRECTFB_SURFACE_CREATE_INFO_EXT = 1000346000, - PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = 1000351000, - MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = 1000351002, - PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT = 1000352000, - VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT = 1000352001, - VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002, - PHYSICAL_DEVICE_DRM_PROPERTIES_EXT = 1000353000, - PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT = 1000354000, - DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT = 1000354001, - PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT = 1000355000, - PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT = 1000355001, - PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT = 1000356000, - FORMAT_PROPERTIES_3_KHR = 1000360000, - IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364000, - MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = 1000364001, - MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364002, - IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365000, - SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365001, - BUFFER_COLLECTION_CREATE_INFO_FUCHSIA = 1000366000, - IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA = 1000366001, - BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA = 1000366002, - BUFFER_COLLECTION_PROPERTIES_FUCHSIA = 1000366003, - BUFFER_CONSTRAINTS_INFO_FUCHSIA = 1000366004, - BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA = 1000366005, - IMAGE_CONSTRAINTS_INFO_FUCHSIA = 1000366006, - IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA = 1000366007, - SYSMEM_COLOR_SPACE_FUCHSIA = 1000366008, - BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA = 1000366009, - SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000, - PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI = 1000369001, - PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI = 1000369002, - PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI = 1000370000, - MEMORY_GET_REMOTE_ADDRESS_INFO_NV = 1000371000, - PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV = 1000371001, - PIPELINE_PROPERTIES_IDENTIFIER_EXT = 1000372000, - PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT = 1000372001, - PIPELINE_INFO_EXT = 1000269001, - PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT = 1000376000, - SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT = 1000376001, - MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT = 1000376002, - /** Not promoted to 1.3 */ - PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT = 1000377000, - SCREEN_SURFACE_CREATE_INFO_QNX = 1000378000, - PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT = 1000381000, - PIPELINE_COLOR_WRITE_CREATE_INFO_EXT = 1000381001, - PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT = 1000382000, - PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR = 1000386000, - PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT = 1000388000, - QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT = 1000388001, - PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT = 1000391000, - IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT = 1000391001, - PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT = 1000392000, - PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT = 1000392001, - PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT = 1000393000, - MICROMAP_BUILD_INFO_EXT = 1000396000, - MICROMAP_VERSION_INFO_EXT = 1000396001, - COPY_MICROMAP_INFO_EXT = 1000396002, - COPY_MICROMAP_TO_MEMORY_INFO_EXT = 1000396003, - COPY_MEMORY_TO_MICROMAP_INFO_EXT = 1000396004, - PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT = 1000396005, - PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT = 1000396006, - MICROMAP_CREATE_INFO_EXT = 1000396007, - MICROMAP_BUILD_SIZES_INFO_EXT = 1000396008, - ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT = 1000396009, - PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000, - SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001, - PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000, - PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR = 1000413000, - PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = 1000413001, - DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = 1000413002, - DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = 1000413003, - PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE = 1000420000, - DESCRIPTOR_SET_BINDING_REFERENCE_VALVE = 1000420001, - DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE = 1000420002, - PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT = 1000421000, - PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT = 1000422000, - PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM = 1000425000, - PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM = 1000425001, - SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM = 1000425002, - PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV = 1000426000, - PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV = 1000426001, - PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV = 1000427000, - PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV = 1000427001, - PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000, - PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000, - PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000, - PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001, - IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM = 1000440002, - PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT = 1000455000, - PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT = 1000455001, - PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT = 1000458000, - RENDER_PASS_CREATION_CONTROL_EXT = 1000458001, - RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT = 1000458002, - RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT = 1000458003, - PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT = 1000462000, - PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT = 1000462001, - PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT = 1000462002, - SHADER_MODULE_IDENTIFIER_EXT = 1000462003, - PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT = 1000342000, - PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV = 1000464000, - PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV = 1000464001, - OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV = 1000464002, - OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV = 1000464003, - OPTICAL_FLOW_SESSION_CREATE_INFO_NV = 1000464004, - OPTICAL_FLOW_EXECUTE_INFO_NV = 1000464005, - OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010, - PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000, - PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = 1000466000, - PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM = 1000484000, - TILE_PROPERTIES_QCOM = 1000484001, - PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC = 1000485000, - AMIGO_PROFILING_SUBMIT_INFO_SEC = 1000485001, - PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV = 1000490000, - PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV = 1000490001, - PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT = 1000351000, - MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT = 1000351002, - PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM = 1000497000, - PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM = 1000497001, -} - -export enum SubpassContents { - INLINE = 0, - SECONDARY_COMMAND_BUFFERS = 1, -} - -/** API result codes */ -export enum Result { - /** Command completed successfully */ - SUCCESS = 0, - /** A fence or query has not yet completed */ - NOT_READY = 1, - /** A wait operation has not completed in the specified time */ - TIMEOUT = 2, - /** An event is signaled */ - EVENT_SET = 3, - /** An event is unsignaled */ - EVENT_RESET = 4, - /** A return array was too small for the result */ - INCOMPLETE = 5, - /** A host memory allocation has failed */ - ERROR_OUT_OF_HOST_MEMORY = -1, - /** A device memory allocation has failed */ - ERROR_OUT_OF_DEVICE_MEMORY = -2, - /** Initialization of an object has failed */ - ERROR_INITIALIZATION_FAILED = -3, - /** The logical device has been lost. See <> */ - ERROR_DEVICE_LOST = -4, - /** Mapping of a memory object has failed */ - ERROR_MEMORY_MAP_FAILED = -5, - /** Layer specified does not exist */ - ERROR_LAYER_NOT_PRESENT = -6, - /** Extension specified does not exist */ - ERROR_EXTENSION_NOT_PRESENT = -7, - /** Requested feature is not available on this device */ - ERROR_FEATURE_NOT_PRESENT = -8, - /** Unable to find a Vulkan driver */ - ERROR_INCOMPATIBLE_DRIVER = -9, - /** Too many objects of the type have already been created */ - ERROR_TOO_MANY_OBJECTS = -10, - /** Requested format is not supported on this device */ - ERROR_FORMAT_NOT_SUPPORTED = -11, - /** A requested pool allocation has failed due to fragmentation of the pool's memory */ - ERROR_FRAGMENTED_POOL = -12, - /** An unknown error has occurred, due to an implementation or application bug */ - ERROR_UNKNOWN = -13, - ERROR_OUT_OF_POOL_MEMORY = 1000069000, - ERROR_INVALID_EXTERNAL_HANDLE = 1000072003, - ERROR_FRAGMENTATION = 1000161000, - ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS = 1000257000, - PIPELINE_COMPILE_REQUIRED = 1000297000, - ERROR_SURFACE_LOST_KHR = 1000000000, - ERROR_NATIVE_WINDOW_IN_USE_KHR = 1000000001, - SUBOPTIMAL_KHR = 1000001003, - ERROR_OUT_OF_DATE_KHR = 1000001004, - ERROR_INCOMPATIBLE_DISPLAY_KHR = 1000003001, - ERROR_VALIDATION_FAILED_EXT = 1000011001, - ERROR_INVALID_SHADER_NV = 1000012000, - ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR = 1000023000, - ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR = 1000023001, - ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR = 1000023002, - ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR = 1000023003, - ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR = 1000023004, - ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR = 1000023005, - ERROR_OUT_OF_POOL_MEMORY_KHR = 1000069000, - ERROR_INVALID_EXTERNAL_HANDLE_KHR = 1000072003, - ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = 1000158000, - ERROR_FRAGMENTATION_EXT = 1000161000, - ERROR_NOT_PERMITTED_EXT = 1000174001, - ERROR_NOT_PERMITTED_KHR = 1000174001, - ERROR_INVALID_DEVICE_ADDRESS_EXT = 1000257000, - ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = 1000255000, - ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = 1000257000, - THREAD_IDLE_KHR = 1000268000, - THREAD_DONE_KHR = 1000268001, - OPERATION_DEFERRED_KHR = 1000268002, - OPERATION_NOT_DEFERRED_KHR = 1000268003, - PIPELINE_COMPILE_REQUIRED_EXT = 1000297000, - ERROR_PIPELINE_COMPILE_REQUIRED_EXT = 1000297000, - ERROR_COMPRESSION_EXHAUSTED_EXT = 1000338000, -} - -export enum DynamicState { - VIEWPORT = 0, - SCISSOR = 1, - LINE_WIDTH = 2, - DEPTH_BIAS = 3, - BLEND_CONSTANTS = 4, - DEPTH_BOUNDS = 5, - STENCIL_COMPARE_MASK = 6, - STENCIL_WRITE_MASK = 7, - STENCIL_REFERENCE = 8, - CULL_MODE = 1000267000, - FRONT_FACE = 1000267001, - PRIMITIVE_TOPOLOGY = 1000267002, - VIEWPORT_WITH_COUNT = 1000267003, - SCISSOR_WITH_COUNT = 1000267004, - VERTEX_INPUT_BINDING_STRIDE = 1000267005, - DEPTH_TEST_ENABLE = 1000267006, - DEPTH_WRITE_ENABLE = 1000267007, - DEPTH_COMPARE_OP = 1000267008, - DEPTH_BOUNDS_TEST_ENABLE = 1000267009, - STENCIL_TEST_ENABLE = 1000267010, - STENCIL_OP = 1000267011, - RASTERIZER_DISCARD_ENABLE = 1000377001, - DEPTH_BIAS_ENABLE = 1000377002, - PRIMITIVE_RESTART_ENABLE = 1000377004, - VIEWPORT_W_SCALING_NV = 1000087000, - DISCARD_RECTANGLE_EXT = 1000099000, - SAMPLE_LOCATIONS_EXT = 1000143000, - RAY_TRACING_PIPELINE_STACK_SIZE_KHR = 1000347000, - VIEWPORT_SHADING_RATE_PALETTE_NV = 1000164004, - VIEWPORT_COARSE_SAMPLE_ORDER_NV = 1000164006, - EXCLUSIVE_SCISSOR_NV = 1000205001, - FRAGMENT_SHADING_RATE_KHR = 1000226000, - LINE_STIPPLE_EXT = 1000259000, - CULL_MODE_EXT = 1000267000, - FRONT_FACE_EXT = 1000267001, - PRIMITIVE_TOPOLOGY_EXT = 1000267002, - VIEWPORT_WITH_COUNT_EXT = 1000267003, - SCISSOR_WITH_COUNT_EXT = 1000267004, - VERTEX_INPUT_BINDING_STRIDE_EXT = 1000267005, - DEPTH_TEST_ENABLE_EXT = 1000267006, - DEPTH_WRITE_ENABLE_EXT = 1000267007, - DEPTH_COMPARE_OP_EXT = 1000267008, - DEPTH_BOUNDS_TEST_ENABLE_EXT = 1000267009, - STENCIL_TEST_ENABLE_EXT = 1000267010, - STENCIL_OP_EXT = 1000267011, - VERTEX_INPUT_EXT = 1000352000, - /** Not promoted to 1.3 */ - PATCH_CONTROL_POINTS_EXT = 1000377000, - RASTERIZER_DISCARD_ENABLE_EXT = 1000377001, - DEPTH_BIAS_ENABLE_EXT = 1000377002, - /** Not promoted to 1.3 */ - LOGIC_OP_EXT = 1000377003, - PRIMITIVE_RESTART_ENABLE_EXT = 1000377004, - COLOR_WRITE_ENABLE_EXT = 1000381000, - TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002, - DEPTH_CLAMP_ENABLE_EXT = 1000455003, - POLYGON_MODE_EXT = 1000455004, - RASTERIZATION_SAMPLES_EXT = 1000455005, - SAMPLE_MASK_EXT = 1000455006, - ALPHA_TO_COVERAGE_ENABLE_EXT = 1000455007, - ALPHA_TO_ONE_ENABLE_EXT = 1000455008, - LOGIC_OP_ENABLE_EXT = 1000455009, - COLOR_BLEND_ENABLE_EXT = 1000455010, - COLOR_BLEND_EQUATION_EXT = 1000455011, - COLOR_WRITE_MASK_EXT = 1000455012, - RASTERIZATION_STREAM_EXT = 1000455013, - CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014, - EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015, - DEPTH_CLIP_ENABLE_EXT = 1000455016, - SAMPLE_LOCATIONS_ENABLE_EXT = 1000455017, - COLOR_BLEND_ADVANCED_EXT = 1000455018, - PROVOKING_VERTEX_MODE_EXT = 1000455019, - LINE_RASTERIZATION_MODE_EXT = 1000455020, - LINE_STIPPLE_ENABLE_EXT = 1000455021, - DEPTH_CLIP_NEGATIVE_ONE_TO_ONE_EXT = 1000455022, - VIEWPORT_W_SCALING_ENABLE_NV = 1000455023, - VIEWPORT_SWIZZLE_NV = 1000455024, - COVERAGE_TO_COLOR_ENABLE_NV = 1000455025, - COVERAGE_TO_COLOR_LOCATION_NV = 1000455026, - COVERAGE_MODULATION_MODE_NV = 1000455027, - COVERAGE_MODULATION_TABLE_ENABLE_NV = 1000455028, - COVERAGE_MODULATION_TABLE_NV = 1000455029, - SHADING_RATE_IMAGE_ENABLE_NV = 1000455030, - REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031, - COVERAGE_REDUCTION_MODE_NV = 1000455032, -} - -export enum DescriptorUpdateTemplateType { - /** Create descriptor update template for descriptor set updates */ - DESCRIPTOR_SET = 0, - /** Create descriptor update template for pushed descriptor updates */ - PUSH_DESCRIPTORS_KHR = 1, - DESCRIPTOR_SET_KHR = 0, -} - -/** Enums to track objects of various types - also see objtypeenum attributes on type tags */ -export enum ObjectType { - UNKNOWN = 0, - INSTANCE = 1, - PHYSICAL_DEVICE = 2, - DEVICE = 3, - QUEUE = 4, - SEMAPHORE = 5, - COMMAND_BUFFER = 6, - FENCE = 7, - DEVICE_MEMORY = 8, - BUFFER = 9, - IMAGE = 10, - EVENT = 11, - QUERY_POOL = 12, - BUFFER_VIEW = 13, - IMAGE_VIEW = 14, - SHADER_MODULE = 15, - PIPELINE_CACHE = 16, - PIPELINE_LAYOUT = 17, - RENDER_PASS = 18, - PIPELINE = 19, - DESCRIPTOR_SET_LAYOUT = 20, - SAMPLER = 21, - DESCRIPTOR_POOL = 22, - DESCRIPTOR_SET = 23, - FRAMEBUFFER = 24, - COMMAND_POOL = 25, - SAMPLER_YCBCR_CONVERSION = 1000156000, - DESCRIPTOR_UPDATE_TEMPLATE = 1000085000, - PRIVATE_DATA_SLOT = 1000295000, - SURFACE_KHR = 1000000000, - SWAPCHAIN_KHR = 1000001000, - DISPLAY_KHR = 1000002000, - DISPLAY_MODE_KHR = 1000002001, - DEBUG_REPORT_CALLBACK_EXT = 1000011000, - /** VkVideoSessionKHR */ - VIDEO_SESSION_KHR = 1000023000, - /** VkVideoSessionParametersKHR */ - VIDEO_SESSION_PARAMETERS_KHR = 1000023001, - CU_MODULE_NVX = 1000029000, - CU_FUNCTION_NVX = 1000029001, - DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000, - DEBUG_UTILS_MESSENGER_EXT = 1000128000, - ACCELERATION_STRUCTURE_KHR = 1000150000, - SAMPLER_YCBCR_CONVERSION_KHR = 1000156000, - VALIDATION_CACHE_EXT = 1000160000, - ACCELERATION_STRUCTURE_NV = 1000165000, - PERFORMANCE_CONFIGURATION_INTEL = 1000210000, - DEFERRED_OPERATION_KHR = 1000268000, - INDIRECT_COMMANDS_LAYOUT_NV = 1000277000, - PRIVATE_DATA_SLOT_EXT = 1000295000, - /** VkBufferCollectionFUCHSIA */ - BUFFER_COLLECTION_FUCHSIA = 1000366000, - MICROMAP_EXT = 1000396000, - OPTICAL_FLOW_SESSION_NV = 1000464000, -} - -export enum RayTracingInvocationReorderModeNV { - RAY_TRACING_INVOCATION_REORDER_MODE_NONE_NV = 0, - RAY_TRACING_INVOCATION_REORDER_MODE_REORDER_NV = 1, -} - -export enum QueueFlagBits { - /** Queue supports graphics operations */ - GRAPHICS = 1 << 0, - /** Queue supports compute operations */ - COMPUTE = 1 << 1, - /** Queue supports transfer operations */ - TRANSFER = 1 << 2, - /** Queue supports sparse resource memory management operations */ - SPARSE_BINDING = 1 << 3, - /** Queues may support protected operations */ - PROTECTED = 1 << 4, - VIDEO_DECODE_BIT_KHR = 1 << 5, - RESERVED_9_BIT_EXT = 1 << 9, - VIDEO_ENCODE_BIT_KHR = 1 << 6, - RESERVED_7_BIT_QCOM = 1 << 7, - OPTICAL_FLOW_BIT_NV = 1 << 8, -} - -export enum CullModeFlagBits { - NONE = 0, - FRONT = 1 << 0, - BACK = 1 << 1, - FRONT_AND_BACK = 3, -} - -export enum RenderPassCreateFlagBits { - RESERVED_0_BIT_KHR = 1 << 0, - TRANSFORM_BIT_QCOM = 1 << 1, -} - -export enum DeviceQueueCreateFlagBits { - /** Queue is a protected-capable device queue */ - PROTECTED = 1 << 0, - RESERVED_1_BIT_QCOM = 1 << 1, -} - -export enum MemoryPropertyFlagBits { - /** If otherwise stated, then allocate memory on device */ - DEVICE_LOCAL = 1 << 0, - /** Memory is mappable by host */ - HOST_VISIBLE = 1 << 1, - /** Memory will have i/o coherency. If not set, application may need to use vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges to flush/invalidate host cache */ - HOST_COHERENT = 1 << 2, - /** Memory will be cached by the host */ - HOST_CACHED = 1 << 3, - /** Memory may be allocated by the driver when it is required */ - LAZILY_ALLOCATED = 1 << 4, - /** Memory is protected */ - PROTECTED = 1 << 5, - DEVICE_COHERENT_BIT_AMD = 1 << 6, - DEVICE_UNCACHED_BIT_AMD = 1 << 7, - RDMA_CAPABLE_BIT_NV = 1 << 8, -} - -export enum MemoryHeapFlagBits { - /** If set, heap represents device memory */ - DEVICE_LOCAL = 1 << 0, - /** If set, heap allocations allocate multiple instances by default */ - MULTI_INSTANCE = 1 << 1, - MULTI_INSTANCE_BIT_KHR = 1 << 1, - RESERVED_2_BIT_KHR = 1 << 2, -} - -export enum AccessFlagBits { - /** Controls coherency of indirect command reads */ - INDIRECT_COMMAND_READ = 1 << 0, - /** Controls coherency of index reads */ - INDEX_READ = 1 << 1, - /** Controls coherency of vertex attribute reads */ - VERTEX_ATTRIBUTE_READ = 1 << 2, - /** Controls coherency of uniform buffer reads */ - UNIFORM_READ = 1 << 3, - /** Controls coherency of input attachment reads */ - INPUT_ATTACHMENT_READ = 1 << 4, - /** Controls coherency of shader reads */ - SHADER_READ = 1 << 5, - /** Controls coherency of shader writes */ - SHADER_WRITE = 1 << 6, - /** Controls coherency of color attachment reads */ - COLOR_ATTACHMENT_READ = 1 << 7, - /** Controls coherency of color attachment writes */ - COLOR_ATTACHMENT_WRITE = 1 << 8, - /** Controls coherency of depth/stencil attachment reads */ - DEPTH_STENCIL_ATTACHMENT_READ = 1 << 9, - /** Controls coherency of depth/stencil attachment writes */ - DEPTH_STENCIL_ATTACHMENT_WRITE = 1 << 10, - /** Controls coherency of transfer reads */ - TRANSFER_READ = 1 << 11, - /** Controls coherency of transfer writes */ - TRANSFER_WRITE = 1 << 12, - /** Controls coherency of host reads */ - HOST_READ = 1 << 13, - /** Controls coherency of host writes */ - HOST_WRITE = 1 << 14, - /** Controls coherency of memory reads */ - MEMORY_READ = 1 << 15, - /** Controls coherency of memory writes */ - MEMORY_WRITE = 1 << 16, - NONE = 0, - TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 1 << 25, - TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 1 << 26, - TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 1 << 27, - /** read access flag for reading conditional rendering predicate */ - CONDITIONAL_RENDERING_READ_BIT_EXT = 1 << 20, - COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 1 << 19, - ACCELERATION_STRUCTURE_READ_BIT_KHR = 1 << 21, - ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 1 << 22, - SHADING_RATE_IMAGE_READ_BIT_NV = 1 << 23, - ACCELERATION_STRUCTURE_READ_BIT_NV = 1 << 21, - ACCELERATION_STRUCTURE_WRITE_BIT_NV = 1 << 22, - FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 1 << 24, - FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 1 << 23, - COMMAND_PREPROCESS_READ_BIT_NV = 1 << 17, - COMMAND_PREPROCESS_WRITE_BIT_NV = 1 << 18, - NONE_KHR = 0, -} - -export enum BufferUsageFlagBits { - /** Can be used as a source of transfer operations */ - TRANSFER_SRC = 1 << 0, - /** Can be used as a destination of transfer operations */ - TRANSFER_DST = 1 << 1, - /** Can be used as TBO */ - UNIFORM_TEXEL_BUFFER = 1 << 2, - /** Can be used as IBO */ - STORAGE_TEXEL_BUFFER = 1 << 3, - /** Can be used as UBO */ - UNIFORM_BUFFER = 1 << 4, - /** Can be used as SSBO */ - STORAGE_BUFFER = 1 << 5, - /** Can be used as source of fixed-function index fetch (index buffer) */ - INDEX_BUFFER = 1 << 6, - /** Can be used as source of fixed-function vertex fetch (VBO) */ - VERTEX_BUFFER = 1 << 7, - /** Can be the source of indirect parameters (e.g. indirect buffer, parameter buffer) */ - INDIRECT_BUFFER = 1 << 8, - SHADER_DEVICE_ADDRESS = 1 << 17, - VIDEO_DECODE_SRC_BIT_KHR = 1 << 13, - VIDEO_DECODE_DST_BIT_KHR = 1 << 14, - TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 1 << 11, - TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 1 << 12, - /** Specifies the buffer can be used as predicate in conditional rendering */ - CONDITIONAL_RENDERING_BIT_EXT = 1 << 9, - RESERVED_25_BIT_AMD = 1 << 25, - ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 1 << 19, - ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 1 << 20, - SHADER_BINDING_TABLE_BIT_KHR = 1 << 10, - RAY_TRACING_BIT_NV = 1 << 10, - RESERVED_18_BIT_QCOM = 1 << 18, - SHADER_DEVICE_ADDRESS_BIT_EXT = 1 << 17, - SHADER_DEVICE_ADDRESS_BIT_KHR = 1 << 17, - VIDEO_ENCODE_DST_BIT_KHR = 1 << 15, - VIDEO_ENCODE_SRC_BIT_KHR = 1 << 16, - SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 1 << 21, - RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 1 << 22, - PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 1 << 26, - MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 1 << 23, - MICROMAP_STORAGE_BIT_EXT = 1 << 24, -} - -export enum BufferCreateFlagBits { - /** Buffer should support sparse backing */ - SPARSE_BINDING = 1 << 0, - /** Buffer should support sparse backing with partial residency */ - SPARSE_RESIDENCY = 1 << 1, - /** Buffer should support constant data access to physical memory ranges mapped into multiple locations of sparse buffers */ - SPARSE_ALIASED = 1 << 2, - /** Buffer requires protected memory */ - PROTECTED = 1 << 3, - DEVICE_ADDRESS_CAPTURE_REPLAY = 1 << 4, - DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 1 << 4, - DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 1 << 4, - DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 5, -} - -export enum ShaderStageFlagBits { - VERTEX = 1 << 0, - TESSELLATION_CONTROL = 1 << 1, - TESSELLATION_EVALUATION = 1 << 2, - GEOMETRY = 1 << 3, - FRAGMENT = 1 << 4, - COMPUTE = 1 << 5, - ALL_GRAPHICS = 31, - ALL = 2147483647, - RAYGEN_BIT_KHR = 1 << 8, - ANY_HIT_BIT_KHR = 1 << 9, - CLOSEST_HIT_BIT_KHR = 1 << 10, - MISS_BIT_KHR = 1 << 11, - INTERSECTION_BIT_KHR = 1 << 12, - CALLABLE_BIT_KHR = 1 << 13, - RAYGEN_BIT_NV = 1 << 8, - ANY_HIT_BIT_NV = 1 << 9, - CLOSEST_HIT_BIT_NV = 1 << 10, - MISS_BIT_NV = 1 << 11, - INTERSECTION_BIT_NV = 1 << 12, - CALLABLE_BIT_NV = 1 << 13, - TASK_BIT_NV = 1 << 6, - MESH_BIT_NV = 1 << 7, - TASK_BIT_EXT = 1 << 6, - MESH_BIT_EXT = 1 << 7, - SUBPASS_SHADING_BIT_HUAWEI = 1 << 14, - RESERVED_19_BIT_HUAWEI = 1 << 19, - EXT_483_RESERVE_15 = 1 << 15, - EXT_483_RESERVE_16 = 1 << 16, - EXT_483_RESERVE_17 = 1 << 17, -} - -export enum ImageUsageFlagBits { - /** Can be used as a source of transfer operations */ - TRANSFER_SRC = 1 << 0, - /** Can be used as a destination of transfer operations */ - TRANSFER_DST = 1 << 1, - /** Can be sampled from (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) */ - SAMPLED = 1 << 2, - /** Can be used as storage image (STORAGE_IMAGE descriptor type) */ - STORAGE = 1 << 3, - /** Can be used as framebuffer color attachment */ - COLOR_ATTACHMENT = 1 << 4, - /** Can be used as framebuffer depth/stencil attachment */ - DEPTH_STENCIL_ATTACHMENT = 1 << 5, - /** Image data not needed outside of rendering */ - TRANSIENT_ATTACHMENT = 1 << 6, - /** Can be used as framebuffer input attachment */ - INPUT_ATTACHMENT = 1 << 7, - VIDEO_DECODE_DST_BIT_KHR = 1 << 10, - VIDEO_DECODE_SRC_BIT_KHR = 1 << 11, - VIDEO_DECODE_DPB_BIT_KHR = 1 << 12, - SHADING_RATE_IMAGE_BIT_NV = 1 << 8, - RESERVED_16_BIT_QCOM = 1 << 16, - RESERVED_17_BIT_QCOM = 1 << 17, - FRAGMENT_DENSITY_MAP_BIT_EXT = 1 << 9, - FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 8, - RESERVED_22_BIT_EXT = 1 << 22, - VIDEO_ENCODE_DST_BIT_KHR = 1 << 13, - VIDEO_ENCODE_SRC_BIT_KHR = 1 << 14, - VIDEO_ENCODE_DPB_BIT_KHR = 1 << 15, - ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 1 << 19, - INVOCATION_MASK_BIT_HUAWEI = 1 << 18, - SAMPLE_WEIGHT_BIT_QCOM = 1 << 20, - SAMPLE_BLOCK_MATCH_BIT_QCOM = 1 << 21, -} - -export enum ImageCreateFlagBits { - /** Image should support sparse backing */ - SPARSE_BINDING = 1 << 0, - /** Image should support sparse backing with partial residency */ - SPARSE_RESIDENCY = 1 << 1, - /** Image should support constant data access to physical memory ranges mapped into multiple locations of sparse images */ - SPARSE_ALIASED = 1 << 2, - /** Allows image views to have different format than the base image */ - MUTABLE_FORMAT = 1 << 3, - /** Allows creating image views with cube type from the created image */ - CUBE_COMPATIBLE = 1 << 4, - ALIAS = 1 << 10, - /** Allows using VkBindImageMemoryDeviceGroupInfo::pSplitInstanceBindRegions when binding memory to the image */ - SPLIT_INSTANCE_BIND_REGIONS = 1 << 6, - /** The 3D image can be viewed as a 2D or 2D array image */ - VK_2D_ARRAY_COMPATIBLE = 1 << 5, - BLOCK_TEXEL_VIEW_COMPATIBLE = 1 << 7, - EXTENDED_USAGE = 1 << 8, - /** Image requires protected memory */ - PROTECTED = 1 << 11, - DISJOINT = 1 << 9, - CORNER_SAMPLED_BIT_NV = 1 << 13, - SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 1 << 6, - VK_2D_ARRAY_COMPATIBLE_BIT_KHR = 1 << 5, - BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = 1 << 7, - EXTENDED_USAGE_BIT_KHR = 1 << 8, - SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 1 << 12, - DISJOINT_BIT_KHR = 1 << 9, - ALIAS_BIT_KHR = 1 << 10, - SUBSAMPLED_BIT_EXT = 1 << 14, - RESERVED_19_BIT_EXT = 1 << 19, - DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 16, - MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 1 << 18, - /** Image is created with a layout where individual slices are capable of being used as 2D images */ - VK_2D_VIEW_COMPATIBLE_BIT_EXT = 1 << 17, - FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = 1 << 15, -} - -export enum ImageViewCreateFlagBits { - FRAGMENT_DENSITY_MAP_DYNAMIC_BIT_EXT = 1 << 0, - DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 2, - FRAGMENT_DENSITY_MAP_DEFERRED_BIT_EXT = 1 << 1, - RESERVED_3_BIT_EXT = 1 << 3, -} - -export enum SamplerCreateFlagBits { - SUBSAMPLED_BIT_EXT = 1 << 0, - SUBSAMPLED_COARSE_RECONSTRUCTION_BIT_EXT = 1 << 1, - DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 3, - NON_SEAMLESS_CUBE_MAP_BIT_EXT = 1 << 2, - IMAGE_PROCESSING_BIT_QCOM = 1 << 4, -} - -/** Note that the gap at bitpos 10 is unused, and can be reserved */ -export enum PipelineCreateFlagBits { - DISABLE_OPTIMIZATION = 1 << 0, - ALLOW_DERIVATIVES = 1 << 1, - DERIVATIVE = 1 << 2, - VIEW_INDEX_FROM_DEVICE_INDEX = 1 << 3, - DISPATCH_BASE = 1 << 4, - FAIL_ON_PIPELINE_COMPILE_REQUIRED = 1 << 8, - EARLY_RETURN_ON_FAILURE = 1 << 9, - RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 21, - /** Backwards-compatible alias containing a typo */ - PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 21, - RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 1 << 22, - /** Backwards-compatible alias containing a typo */ - PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 1 << 22, - VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 1 << 3, - DISPATCH_BASE_KHR = DISPATCH_BASE, - RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 1 << 14, - RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 1 << 15, - RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 1 << 16, - RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 1 << 17, - RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 1 << 12, - RAY_TRACING_SKIP_AABBS_BIT_KHR = 1 << 13, - RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 1 << 19, - DEFER_COMPILE_BIT_NV = 1 << 5, - CAPTURE_STATISTICS_BIT_KHR = 1 << 6, - CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 1 << 7, - INDIRECT_BINDABLE_BIT_NV = 1 << 18, - LIBRARY_BIT_KHR = 1 << 11, - FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT = 1 << 8, - EARLY_RETURN_ON_FAILURE_BIT_EXT = 1 << 9, - DESCRIPTOR_BUFFER_BIT_EXT = 1 << 29, - RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 1 << 23, - LINK_TIME_OPTIMIZATION_BIT_EXT = 1 << 10, - RAY_TRACING_ALLOW_MOTION_BIT_NV = 1 << 20, - COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 1 << 25, - DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 1 << 26, - RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 1 << 24, - RESERVED_BIT_28_NV = 1 << 28, - NO_PROTECTED_ACCESS_BIT_EXT = 1 << 27, - PROTECTED_ACCESS_ONLY_BIT_EXT = 1 << 30, -} - -export enum PipelineShaderStageCreateFlagBits { - ALLOW_VARYING_SUBGROUP_SIZE = 1 << 0, - REQUIRE_FULL_SUBGROUPS = 1 << 1, - ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT = 1 << 0, - REQUIRE_FULL_SUBGROUPS_BIT_EXT = 1 << 1, - RESERVED_3_BIT_KHR = 1 << 3, -} - -export enum ColorComponentFlagBits { - R = 1 << 0, - G = 1 << 1, - B = 1 << 2, - A = 1 << 3, -} - -export enum FenceCreateFlagBits { - SIGNALED = 1 << 0, -} - -export enum SemaphoreCreateFlagBits { -} - -export enum FormatFeatureFlagBits { - /** Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) */ - SAMPLED_IMAGE = 1 << 0, - /** Format can be used for storage images (STORAGE_IMAGE descriptor type) */ - STORAGE_IMAGE = 1 << 1, - /** Format supports atomic operations in case it is used for storage images */ - STORAGE_IMAGE_ATOMIC = 1 << 2, - /** Format can be used for uniform texel buffers (TBOs) */ - UNIFORM_TEXEL_BUFFER = 1 << 3, - /** Format can be used for storage texel buffers (IBOs) */ - STORAGE_TEXEL_BUFFER = 1 << 4, - /** Format supports atomic operations in case it is used for storage texel buffers */ - STORAGE_TEXEL_BUFFER_ATOMIC = 1 << 5, - /** Format can be used for vertex buffers (VBOs) */ - VERTEX_BUFFER = 1 << 6, - /** Format can be used for color attachment images */ - COLOR_ATTACHMENT = 1 << 7, - /** Format supports blending in case it is used for color attachment images */ - COLOR_ATTACHMENT_BLEND = 1 << 8, - /** Format can be used for depth/stencil attachment images */ - DEPTH_STENCIL_ATTACHMENT = 1 << 9, - /** Format can be used as the source image of blits with vkCmdBlitImage */ - BLIT_SRC = 1 << 10, - /** Format can be used as the destination image of blits with vkCmdBlitImage */ - BLIT_DST = 1 << 11, - /** Format can be filtered with VK_FILTER_LINEAR when being sampled */ - SAMPLED_IMAGE_FILTER_LINEAR = 1 << 12, - /** Format can be used as the source image of image transfer commands */ - TRANSFER_SRC = 1 << 14, - /** Format can be used as the destination image of image transfer commands */ - TRANSFER_DST = 1 << 15, - /** Format can have midpoint rather than cosited chroma samples */ - MIDPOINT_CHROMA_SAMPLES = 1 << 17, - /** Format can be used with linear filtering whilst color conversion is enabled */ - SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER = 1 << 18, - /** Format can have different chroma, min and mag filters */ - SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER = 1 << 19, - SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT = 1 << 20, - SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE = 1 << 21, - /** Format supports disjoint planes */ - DISJOINT = 1 << 22, - /** Format can have cosited rather than midpoint chroma samples */ - COSITED_CHROMA_SAMPLES = 1 << 23, - /** Format can be used with min/max reduction filtering */ - SAMPLED_IMAGE_FILTER_MINMAX = 1 << 16, - /** Format can be filtered with VK_FILTER_CUBIC_IMG when being sampled */ - SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 1 << 13, - VIDEO_DECODE_OUTPUT_BIT_KHR = 1 << 25, - VIDEO_DECODE_DPB_BIT_KHR = 1 << 26, - TRANSFER_SRC_BIT_KHR = 1 << 14, - TRANSFER_DST_BIT_KHR = 1 << 15, - SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 1 << 16, - ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 1 << 29, - MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 1 << 17, - SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 1 << 18, - SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 1 << 19, - SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 1 << 20, - SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 1 << 21, - DISJOINT_BIT_KHR = 1 << 22, - COSITED_CHROMA_SAMPLES_BIT_KHR = 1 << 23, - SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 1 << 13, - FRAGMENT_DENSITY_MAP_BIT_EXT = 1 << 24, - FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 30, - VIDEO_ENCODE_INPUT_BIT_KHR = 1 << 27, - VIDEO_ENCODE_DPB_BIT_KHR = 1 << 28, -} - -export enum QueryControlFlagBits { - /** Require precise results to be collected by the query */ - PRECISE = 1 << 0, -} - -export enum QueryResultFlagBits { - /** Results of the queries are written to the destination buffer as 64-bit values */ - VK_64 = 1 << 0, - /** Results of the queries are waited on before proceeding with the result copy */ - WAIT = 1 << 1, - /** Besides the results of the query, the availability of the results is also written */ - WITH_AVAILABILITY = 1 << 2, - /** Copy the partial results of the query even if the final results are not available */ - PARTIAL = 1 << 3, - WITH_STATUS_BIT_KHR = 1 << 4, -} - -export enum CommandBufferUsageFlagBits { - ONE_TIME_SUBMIT = 1 << 0, - RENDER_PASS_CONTINUE = 1 << 1, - /** Command buffer may be submitted/executed more than once simultaneously */ - SIMULTANEOUS_USE = 1 << 2, -} - -export enum QueryPipelineStatisticFlagBits { - /** Optional */ - INPUT_ASSEMBLY_VERTICES = 1 << 0, - /** Optional */ - INPUT_ASSEMBLY_PRIMITIVES = 1 << 1, - /** Optional */ - VERTEX_SHADER_INVOCATIONS = 1 << 2, - /** Optional */ - GEOMETRY_SHADER_INVOCATIONS = 1 << 3, - /** Optional */ - GEOMETRY_SHADER_PRIMITIVES = 1 << 4, - /** Optional */ - CLIPPING_INVOCATIONS = 1 << 5, - /** Optional */ - CLIPPING_PRIMITIVES = 1 << 6, - /** Optional */ - FRAGMENT_SHADER_INVOCATIONS = 1 << 7, - /** Optional */ - TESSELLATION_CONTROL_SHADER_PATCHES = 1 << 8, - /** Optional */ - TESSELLATION_EVALUATION_SHADER_INVOCATIONS = 1 << 9, - /** Optional */ - COMPUTE_SHADER_INVOCATIONS = 1 << 10, - TASK_SHADER_INVOCATIONS_BIT_EXT = 1 << 11, - MESH_SHADER_INVOCATIONS_BIT_EXT = 1 << 12, -} - -export enum ImageAspectFlagBits { - COLOR = 1 << 0, - DEPTH = 1 << 1, - STENCIL = 1 << 2, - METADATA = 1 << 3, - PLANE_0 = 1 << 4, - PLANE_1 = 1 << 5, - PLANE_2 = 1 << 6, - NONE = 0, - PLANE_0_BIT_KHR = 1 << 4, - PLANE_1_BIT_KHR = 1 << 5, - PLANE_2_BIT_KHR = 1 << 6, - MEMORY_PLANE_0_BIT_EXT = 1 << 7, - MEMORY_PLANE_1_BIT_EXT = 1 << 8, - MEMORY_PLANE_2_BIT_EXT = 1 << 9, - MEMORY_PLANE_3_BIT_EXT = 1 << 10, - NONE_KHR = 0, -} - -export enum SparseImageFormatFlagBits { - /** Image uses a single mip tail region for all array layers */ - SINGLE_MIPTAIL = 1 << 0, - /** Image requires mip level dimensions to be an integer multiple of the sparse image block dimensions for non-tail mip levels. */ - ALIGNED_MIP_SIZE = 1 << 1, - /** Image uses a non-standard sparse image block dimensions */ - NONSTANDARD_BLOCK_SIZE = 1 << 2, -} - -export enum SparseMemoryBindFlagBits { - /** Operation binds resource metadata to memory */ - METADATA = 1 << 0, -} - -export enum PipelineStageFlagBits { - /** Before subsequent commands are processed */ - TOP_OF_PIPE = 1 << 0, - /** Draw/DispatchIndirect command fetch */ - DRAW_INDIRECT = 1 << 1, - /** Vertex/index fetch */ - VERTEX_INPUT = 1 << 2, - /** Vertex shading */ - VERTEX_SHADER = 1 << 3, - /** Tessellation control shading */ - TESSELLATION_CONTROL_SHADER = 1 << 4, - /** Tessellation evaluation shading */ - TESSELLATION_EVALUATION_SHADER = 1 << 5, - /** Geometry shading */ - GEOMETRY_SHADER = 1 << 6, - /** Fragment shading */ - FRAGMENT_SHADER = 1 << 7, - /** Early fragment (depth and stencil) tests */ - EARLY_FRAGMENT_TESTS = 1 << 8, - /** Late fragment (depth and stencil) tests */ - LATE_FRAGMENT_TESTS = 1 << 9, - /** Color attachment writes */ - COLOR_ATTACHMENT_OUTPUT = 1 << 10, - /** Compute shading */ - COMPUTE_SHADER = 1 << 11, - /** Transfer/copy operations */ - TRANSFER = 1 << 12, - /** After previous commands have completed */ - BOTTOM_OF_PIPE = 1 << 13, - /** Indicates host (CPU) is a source/sink of the dependency */ - HOST = 1 << 14, - /** All stages of the graphics pipeline */ - ALL_GRAPHICS = 1 << 15, - /** All stages supported on the queue */ - ALL_COMMANDS = 1 << 16, - NONE = 0, - TRANSFORM_FEEDBACK_BIT_EXT = 1 << 24, - /** A pipeline stage for conditional rendering predicate fetch */ - CONDITIONAL_RENDERING_BIT_EXT = 1 << 18, - ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 1 << 25, - RAY_TRACING_SHADER_BIT_KHR = 1 << 21, - SHADING_RATE_IMAGE_BIT_NV = 1 << 22, - RAY_TRACING_SHADER_BIT_NV = 1 << 21, - ACCELERATION_STRUCTURE_BUILD_BIT_NV = 1 << 25, - TASK_SHADER_BIT_NV = 1 << 19, - MESH_SHADER_BIT_NV = 1 << 20, - FRAGMENT_DENSITY_PROCESS_BIT_EXT = 1 << 23, - FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 22, - COMMAND_PREPROCESS_BIT_NV = 1 << 17, - NONE_KHR = 0, - TASK_SHADER_BIT_EXT = 1 << 19, - MESH_SHADER_BIT_EXT = 1 << 20, -} - -export enum CommandPoolCreateFlagBits { - /** Command buffers have a short lifetime */ - TRANSIENT = 1 << 0, - /** Command buffers may release their memory individually */ - RESET_COMMAND_BUFFER = 1 << 1, - /** Command buffers allocated from pool are protected command buffers */ - PROTECTED = 1 << 2, -} - -export enum CommandPoolResetFlagBits { - /** Release resources owned by the pool */ - RELEASE_RESOURCES = 1 << 0, - RESERVED_1_BIT_COREAVI = 1 << 1, -} - -export enum CommandBufferResetFlagBits { - /** Release resources owned by the buffer */ - RELEASE_RESOURCES = 1 << 0, -} - -export enum SampleCountFlagBits { - /** Sample count 1 supported */ - VK_1 = 1 << 0, - /** Sample count 2 supported */ - VK_2 = 1 << 1, - /** Sample count 4 supported */ - VK_4 = 1 << 2, - /** Sample count 8 supported */ - VK_8 = 1 << 3, - /** Sample count 16 supported */ - VK_16 = 1 << 4, - /** Sample count 32 supported */ - VK_32 = 1 << 5, - /** Sample count 64 supported */ - VK_64 = 1 << 6, -} - -export enum AttachmentDescriptionFlagBits { - /** The attachment may alias physical memory of another attachment in the same render pass */ - MAY_ALIAS = 1 << 0, -} - -export enum StencilFaceFlagBits { - /** Front face */ - FRONT = 1 << 0, - /** Back face */ - BACK = 1 << 1, - /** Front and back faces */ - FRONT_AND_BACK = 3, - /** Backwards-compatible alias containing a typo */ - STENCIL_FRONT_AND_BACK = 3, -} - -export enum DescriptorPoolCreateFlagBits { - /** Descriptor sets may be freed individually */ - FREE_DESCRIPTOR_SET = 1 << 0, - UPDATE_AFTER_BIND = 1 << 1, - UPDATE_AFTER_BIND_BIT_EXT = 1 << 1, - HOST_ONLY_BIT_VALVE = 1 << 2, - HOST_ONLY_BIT_EXT = 1 << 2, -} - -export enum DependencyFlagBits { - /** Dependency is per pixel region */ - BY_REGION = 1 << 0, - /** Dependency is across devices */ - DEVICE_GROUP = 1 << 2, - VIEW_LOCAL = 1 << 1, - VIEW_LOCAL_BIT_KHR = 1 << 1, - DEVICE_GROUP_BIT_KHR = 1 << 2, - /** Dependency may be a feedback loop */ - FEEDBACK_LOOP_BIT_EXT = 1 << 3, -} - -export enum SemaphoreType { - BINARY = 0, - TIMELINE = 1, - BINARY_KHR = 0, - TIMELINE_KHR = 1, -} - -export enum SemaphoreWaitFlagBits { - ANY = 1 << 0, - ANY_BIT_KHR = 1 << 0, -} - -export enum PresentModeKHR { - PRESENT_MODE_IMMEDIATE_KHR = 0, - PRESENT_MODE_MAILBOX_KHR = 1, - PRESENT_MODE_FIFO_KHR = 2, - PRESENT_MODE_FIFO_RELAXED_KHR = 3, - PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, - PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, -} - -export enum ColorSpaceKHR { - COLOR_SPACE_SRGB_NONLINEAR_KHR = 0, - /** Backwards-compatible alias containing a typo */ - COLORSPACE_SRGB_NONLINEAR_KHR = 0, - COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, - COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002, - COLOR_SPACE_DISPLAY_P3_LINEAR_EXT = 1000104003, - COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004, - COLOR_SPACE_BT709_LINEAR_EXT = 1000104005, - COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006, - COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007, - COLOR_SPACE_HDR10_ST2084_EXT = 1000104008, - COLOR_SPACE_DOLBYVISION_EXT = 1000104009, - COLOR_SPACE_HDR10_HLG_EXT = 1000104010, - COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, - COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, - COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, - COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014, - /** Backwards-compatible alias containing a typo */ - COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003, - COLOR_SPACE_DISPLAY_NATIVE_AMD = 1000213000, -} - -export enum DisplayPlaneAlphaFlagBitsKHR { - DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 1 << 0, - DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 1 << 1, - DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 1 << 2, - DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 1 << 3, -} - -export enum CompositeAlphaFlagBitsKHR { - COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 1 << 0, - COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 1 << 1, - COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 1 << 2, - COMPOSITE_ALPHA_INHERIT_BIT_KHR = 1 << 3, -} - -export enum SurfaceTransformFlagBitsKHR { - SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 1 << 0, - SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 1 << 1, - SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 1 << 2, - SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 1 << 3, - SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 1 << 4, - SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 1 << 5, - SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 1 << 6, - SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 1 << 7, - SURFACE_TRANSFORM_INHERIT_BIT_KHR = 1 << 8, -} - -export enum SwapchainImageUsageFlagBitsANDROID { - SWAPCHAIN_IMAGE_USAGE_SHARED_BIT_ANDROID = 1 << 0, -} - -export enum TimeDomainEXT { - TIME_DOMAIN_DEVICE_EXT = 0, - TIME_DOMAIN_CLOCK_MONOTONIC_EXT = 1, - TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT = 2, - TIME_DOMAIN_QUERY_PERFORMANCE_COUNTER_EXT = 3, -} - -export enum DebugReportFlagBitsEXT { - DEBUG_REPORT_INFORMATION_BIT_EXT = 1 << 0, - DEBUG_REPORT_WARNING_BIT_EXT = 1 << 1, - DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 1 << 2, - DEBUG_REPORT_ERROR_BIT_EXT = 1 << 3, - DEBUG_REPORT_DEBUG_BIT_EXT = 1 << 4, -} - -export enum DebugReportObjectTypeEXT { - DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, - DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, - DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, - DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, - DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, - DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, - DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, - DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, - DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, - DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, - DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, - DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, - DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, - DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, - DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, - DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, - DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, - DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, - DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, - DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, - DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, - DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, - DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, - DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, - DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, - DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, - DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, - DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, - DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28, - /** Backwards-compatible alias containing a typo */ - DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, - DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, - DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, - DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33, - /** Backwards-compatible alias containing a typo */ - DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = 33, - DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000, - DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000, - DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT = 1000029000, - DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT = 1000029001, - DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000, - DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT = 1000150000, - DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = 1000156000, - DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = 1000165000, - DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT = 1000366000, -} - -export enum DeviceMemoryReportEventTypeEXT { - DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATE_EXT = 0, - DEVICE_MEMORY_REPORT_EVENT_TYPE_FREE_EXT = 1, - DEVICE_MEMORY_REPORT_EVENT_TYPE_IMPORT_EXT = 2, - DEVICE_MEMORY_REPORT_EVENT_TYPE_UNIMPORT_EXT = 3, - DEVICE_MEMORY_REPORT_EVENT_TYPE_ALLOCATION_FAILED_EXT = 4, -} - -export enum RasterizationOrderAMD { - RASTERIZATION_ORDER_STRICT_AMD = 0, - RASTERIZATION_ORDER_RELAXED_AMD = 1, -} - -export enum ExternalMemoryHandleTypeFlagBitsNV { - EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 1 << 0, - EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 1 << 1, - EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 1 << 2, - EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 1 << 3, -} - -export enum ExternalMemoryFeatureFlagBitsNV { - EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 1 << 0, - EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 1 << 1, - EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 1 << 2, -} - -export enum ValidationCheckEXT { - VALIDATION_CHECK_ALL_EXT = 0, - VALIDATION_CHECK_SHADERS_EXT = 1, -} - -export enum ValidationFeatureEnableEXT { - VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT = 0, - VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT = 1, - VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT = 2, - VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT = 3, - VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT = 4, -} - -export enum ValidationFeatureDisableEXT { - VALIDATION_FEATURE_DISABLE_ALL_EXT = 0, - VALIDATION_FEATURE_DISABLE_SHADERS_EXT = 1, - VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT = 2, - VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT = 3, - VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT = 4, - VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT = 5, - VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT = 6, - VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT = 7, -} - -export enum SubgroupFeatureFlagBits { - /** Basic subgroup operations */ - BASIC = 1 << 0, - /** Vote subgroup operations */ - VOTE = 1 << 1, - /** Arithmetic subgroup operations */ - ARITHMETIC = 1 << 2, - /** Ballot subgroup operations */ - BALLOT = 1 << 3, - /** Shuffle subgroup operations */ - SHUFFLE = 1 << 4, - /** Shuffle relative subgroup operations */ - SHUFFLE_RELATIVE = 1 << 5, - /** Clustered subgroup operations */ - CLUSTERED = 1 << 6, - /** Quad subgroup operations */ - QUAD = 1 << 7, - PARTITIONED_BIT_NV = 1 << 8, -} - -export enum IndirectCommandsLayoutUsageFlagBitsNV { - INDIRECT_COMMANDS_LAYOUT_USAGE_EXPLICIT_PREPROCESS_BIT_NV = 1 << 0, - INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV = 1 << 1, - INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV = 1 << 2, -} - -export enum IndirectStateFlagBitsNV { - INDIRECT_STATE_FLAG_FRONTFACE_BIT_NV = 1 << 0, -} - -export enum IndirectCommandsTokenTypeNV { - INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV = 0, - INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV = 1, - INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NV = 2, - INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NV = 3, - INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV = 4, - INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV = 5, - INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV = 6, - INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV = 7, - INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV = 1000328000, -} - -export enum PrivateDataSlotCreateFlagBits { -} - -export enum DescriptorSetLayoutCreateFlagBits { - UPDATE_AFTER_BIND_POOL = 1 << 1, - /** Descriptors are pushed via flink:vkCmdPushDescriptorSetKHR */ - PUSH_DESCRIPTOR_BIT_KHR = 1 << 0, - UPDATE_AFTER_BIND_POOL_BIT_EXT = 1 << 1, - DESCRIPTOR_BUFFER_BIT_EXT = 1 << 4, - EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT = 1 << 5, - RESERVED_3_BIT_AMD = 1 << 3, - HOST_ONLY_POOL_BIT_VALVE = 1 << 2, - HOST_ONLY_POOL_BIT_EXT = 1 << 2, -} - -export enum ExternalMemoryHandleTypeFlagBits { - OPAQUE_FD = 1 << 0, - OPAQUE_WIN32 = 1 << 1, - OPAQUE_WIN32_KMT = 1 << 2, - D3D11_TEXTURE = 1 << 3, - D3D11_TEXTURE_KMT = 1 << 4, - D3D12_HEAP = 1 << 5, - D3D12_RESOURCE = 1 << 6, - OPAQUE_FD_BIT_KHR = 1 << 0, - OPAQUE_WIN32_BIT_KHR = 1 << 1, - OPAQUE_WIN32_KMT_BIT_KHR = 1 << 2, - D3D11_TEXTURE_BIT_KHR = 1 << 3, - D3D11_TEXTURE_KMT_BIT_KHR = 1 << 4, - D3D12_HEAP_BIT_KHR = 1 << 5, - D3D12_RESOURCE_BIT_KHR = 1 << 6, - DMA_BUF_BIT_EXT = 1 << 9, - ANDROID_HARDWARE_BUFFER_BIT_ANDROID = 1 << 10, - HOST_ALLOCATION_BIT_EXT = 1 << 7, - HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 1 << 8, - ZIRCON_VMO_BIT_FUCHSIA = 1 << 11, - RDMA_ADDRESS_BIT_NV = 1 << 12, - RESERVED_13_BIT_NV = 1 << 13, -} - -export enum ExternalMemoryFeatureFlagBits { - DEDICATED_ONLY = 1 << 0, - EXPORTABLE = 1 << 1, - IMPORTABLE = 1 << 2, - DEDICATED_ONLY_BIT_KHR = 1 << 0, - EXPORTABLE_BIT_KHR = 1 << 1, - IMPORTABLE_BIT_KHR = 1 << 2, -} - -export enum ExternalSemaphoreHandleTypeFlagBits { - OPAQUE_FD = 1 << 0, - OPAQUE_WIN32 = 1 << 1, - OPAQUE_WIN32_KMT = 1 << 2, - D3D12_FENCE = 1 << 3, - D3D11_FENCE = 1 << 3, - SYNC_FD = 1 << 4, - OPAQUE_FD_BIT_KHR = 1 << 0, - OPAQUE_WIN32_BIT_KHR = 1 << 1, - OPAQUE_WIN32_KMT_BIT_KHR = 1 << 2, - D3D12_FENCE_BIT_KHR = 1 << 3, - SYNC_FD_BIT_KHR = 1 << 4, - ZIRCON_EVENT_BIT_FUCHSIA = 1 << 7, - RESERVED_5_BIT_NV = 1 << 5, -} - -export enum ExternalSemaphoreFeatureFlagBits { - EXPORTABLE = 1 << 0, - IMPORTABLE = 1 << 1, - EXPORTABLE_BIT_KHR = 1 << 0, - IMPORTABLE_BIT_KHR = 1 << 1, -} - -export enum SemaphoreImportFlagBits { - TEMPORARY = 1 << 0, - TEMPORARY_BIT_KHR = 1 << 0, -} - -export enum ExternalFenceHandleTypeFlagBits { - OPAQUE_FD = 1 << 0, - OPAQUE_WIN32 = 1 << 1, - OPAQUE_WIN32_KMT = 1 << 2, - SYNC_FD = 1 << 3, - OPAQUE_FD_BIT_KHR = 1 << 0, - OPAQUE_WIN32_BIT_KHR = 1 << 1, - OPAQUE_WIN32_KMT_BIT_KHR = 1 << 2, - SYNC_FD_BIT_KHR = 1 << 3, - RESERVED_4_BIT_NV = 1 << 4, - RESERVED_5_BIT_NV = 1 << 5, -} - -export enum ExternalFenceFeatureFlagBits { - EXPORTABLE = 1 << 0, - IMPORTABLE = 1 << 1, - EXPORTABLE_BIT_KHR = 1 << 0, - IMPORTABLE_BIT_KHR = 1 << 1, -} - -export enum FenceImportFlagBits { - TEMPORARY = 1 << 0, - TEMPORARY_BIT_KHR = 1 << 0, -} - -export enum SurfaceCounterFlagBitsEXT { - SURFACE_COUNTER_VBLANK_BIT_EXT = 1 << 0, - /** Backwards-compatible alias containing a typo */ - SURFACE_COUNTER_VBLANK_EXT = 1 << 0, -} - -export enum DisplayPowerStateEXT { - DISPLAY_POWER_STATE_OFF_EXT = 0, - DISPLAY_POWER_STATE_SUSPEND_EXT = 1, - DISPLAY_POWER_STATE_ON_EXT = 2, -} - -export enum DeviceEventTypeEXT { - DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, -} - -export enum DisplayEventTypeEXT { - DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, -} - -export enum PeerMemoryFeatureFlagBits { - /** Can read with vkCmdCopy commands */ - COPY_SRC = 1 << 0, - /** Can write with vkCmdCopy commands */ - COPY_DST = 1 << 1, - /** Can read with any access type/command */ - GENERIC_SRC = 1 << 2, - /** Can write with and access type/command */ - GENERIC_DST = 1 << 3, - COPY_SRC_BIT_KHR = 1 << 0, - COPY_DST_BIT_KHR = 1 << 1, - GENERIC_SRC_BIT_KHR = 1 << 2, - GENERIC_DST_BIT_KHR = 1 << 3, -} - -export enum MemoryAllocateFlagBits { - /** Force allocation on specific devices */ - DEVICE_MASK = 1 << 0, - DEVICE_ADDRESS = 1 << 1, - DEVICE_ADDRESS_CAPTURE_REPLAY = 1 << 2, - DEVICE_MASK_BIT_KHR = 1 << 0, - DEVICE_ADDRESS_BIT_KHR = 1 << 1, - DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 1 << 2, -} - -export enum DeviceGroupPresentModeFlagBitsKHR { - /** Present from local memory */ - DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 1 << 0, - /** Present from remote memory */ - DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 1 << 1, - /** Present sum of local and/or remote memory */ - DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 1 << 2, - /** Each physical device presents from local memory */ - DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 1 << 3, -} - -export enum SwapchainCreateFlagBitsKHR { - /** Allow images with VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT */ - SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 1 << 0, - /** Swapchain is protected */ - SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 1 << 1, - SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR = 1 << 2, - SWAPCHAIN_CREATE_RESERVED_4_BIT_EXT = 1 << 4, - SWAPCHAIN_CREATE_RESERVED_3_BIT_SEC = 1 << 3, -} - -export enum ViewportCoordinateSwizzleNV { - VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, - VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, - VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, - VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, - VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, - VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, - VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, - VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, -} - -export enum DiscardRectangleModeEXT { - DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, - DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, -} - -export enum SubpassDescriptionFlagBits { - PER_VIEW_ATTRIBUTES_BIT_NVX = 1 << 0, - PER_VIEW_POSITION_X_ONLY_BIT_NVX = 1 << 1, - FRAGMENT_REGION_BIT_QCOM = 1 << 2, - SHADER_RESOLVE_BIT_QCOM = 1 << 3, - RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_ARM = 1 << 4, - RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = 1 << 5, - RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = 1 << 6, - RASTERIZATION_ORDER_ATTACHMENT_COLOR_ACCESS_BIT_EXT = 1 << 4, - RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 1 << 5, - RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 1 << 6, - ENABLE_LEGACY_DITHERING_BIT_EXT = 1 << 7, -} - -export enum PointClippingBehavior { - ALL_CLIP_PLANES = 0, - USER_CLIP_PLANES_ONLY = 1, - ALL_CLIP_PLANES_KHR = 0, - USER_CLIP_PLANES_ONLY_KHR = 1, -} - -export enum SamplerReductionMode { - WEIGHTED_AVERAGE = 0, - MIN = 1, - MAX = 2, - WEIGHTED_AVERAGE_EXT = 0, - MIN_EXT = 1, - MAX_EXT = 2, -} - -export enum TessellationDomainOrigin { - UPPER_LEFT = 0, - LOWER_LEFT = 1, - UPPER_LEFT_KHR = 0, - LOWER_LEFT_KHR = 1, -} - -export enum SamplerYcbcrModelConversion { - RGB_IDENTITY = 0, - /** just range expansion */ - YCBCR_IDENTITY = 1, - /** aka HD YUV */ - YCBCR_709 = 2, - /** aka SD YUV */ - YCBCR_601 = 3, - /** aka UHD YUV */ - YCBCR_2020 = 4, - RGB_IDENTITY_KHR = 0, - YCBCR_IDENTITY_KHR = 1, - YCBCR_709_KHR = 2, - YCBCR_601_KHR = 3, - YCBCR_2020_KHR = 4, -} - -export enum SamplerYcbcrRange { - /** Luma 0..1 maps to 0..255, chroma -0.5..0.5 to 1..255 (clamped) */ - ITU_FULL = 0, - /** Luma 0..1 maps to 16..235, chroma -0.5..0.5 to 16..240 */ - ITU_NARROW = 1, - ITU_FULL_KHR = 0, - ITU_NARROW_KHR = 1, -} - -export enum ChromaLocation { - COSITED_EVEN = 0, - MIDPOINT = 1, - COSITED_EVEN_KHR = 0, - MIDPOINT_KHR = 1, -} - -export enum BlendOverlapEXT { - BLEND_OVERLAP_UNCORRELATED_EXT = 0, - BLEND_OVERLAP_DISJOINT_EXT = 1, - BLEND_OVERLAP_CONJOINT_EXT = 2, -} - -export enum CoverageModulationModeNV { - COVERAGE_MODULATION_MODE_NONE_NV = 0, - COVERAGE_MODULATION_MODE_RGB_NV = 1, - COVERAGE_MODULATION_MODE_ALPHA_NV = 2, - COVERAGE_MODULATION_MODE_RGBA_NV = 3, -} - -export enum CoverageReductionModeNV { - COVERAGE_REDUCTION_MODE_MERGE_NV = 0, - COVERAGE_REDUCTION_MODE_TRUNCATE_NV = 1, -} - -export enum ValidationCacheHeaderVersionEXT { - VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1, -} - -export enum ShaderInfoTypeAMD { - SHADER_INFO_TYPE_STATISTICS_AMD = 0, - SHADER_INFO_TYPE_BINARY_AMD = 1, - SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2, -} - -export enum QueueGlobalPriorityKHR { - QUEUE_GLOBAL_PRIORITY_LOW_KHR = 128, - QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = 256, - QUEUE_GLOBAL_PRIORITY_HIGH_KHR = 512, - QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = 1024, - QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128, - QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256, - QUEUE_GLOBAL_PRIORITY_HIGH_EXT = 512, - QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = 1024, -} - -export enum DebugUtilsMessageSeverityFlagBitsEXT { - DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 1 << 0, - DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 1 << 4, - DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 1 << 8, - DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 1 << 12, -} - -export enum DebugUtilsMessageTypeFlagBitsEXT { - DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 1 << 0, - DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 1 << 1, - DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 1 << 2, - DEBUG_UTILS_MESSAGE_TYPE_DEVICE_ADDRESS_BINDING_BIT_EXT = 1 << 3, -} - -export enum ConservativeRasterizationModeEXT { - CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0, - CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1, - CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2, -} - -export enum DescriptorBindingFlagBits { - UPDATE_AFTER_BIND = 1 << 0, - UPDATE_UNUSED_WHILE_PENDING = 1 << 1, - PARTIALLY_BOUND = 1 << 2, - VARIABLE_DESCRIPTOR_COUNT = 1 << 3, - UPDATE_AFTER_BIND_BIT_EXT = 1 << 0, - UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = 1 << 1, - PARTIALLY_BOUND_BIT_EXT = 1 << 2, - VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = 1 << 3, - RESERVED_4_BIT_QCOM = 1 << 4, -} - -export enum VendorId { - /** Vivante vendor ID */ - VIV = 65537, - /** VeriSilicon vendor ID */ - VSI = 65538, - /** Kazan Software Renderer */ - KAZAN = 65539, - /** Codeplay Software Ltd. vendor ID */ - CODEPLAY = 65540, - /** Mesa vendor ID */ - MESA = 65541, - /** PoCL vendor ID */ - POCL = 65542, -} - -export enum DriverId { - /** Advanced Micro Devices, Inc. */ - AMD_PROPRIETARY = 1, - /** Advanced Micro Devices, Inc. */ - AMD_OPEN_SOURCE = 2, - /** Mesa open source project */ - MESA_RADV = 3, - /** NVIDIA Corporation */ - NVIDIA_PROPRIETARY = 4, - /** Intel Corporation */ - INTEL_PROPRIETARY_WINDOWS = 5, - /** Intel Corporation */ - INTEL_OPEN_SOURCE_MESA = 6, - /** Imagination Technologies */ - IMAGINATION_PROPRIETARY = 7, - /** Qualcomm Technologies, Inc. */ - QUALCOMM_PROPRIETARY = 8, - /** Arm Limited */ - ARM_PROPRIETARY = 9, - /** Google LLC */ - GOOGLE_SWIFTSHADER = 10, - /** Google LLC */ - GGP_PROPRIETARY = 11, - /** Broadcom Inc. */ - BROADCOM_PROPRIETARY = 12, - /** Mesa */ - MESA_LLVMPIPE = 13, - /** MoltenVK */ - MOLTENVK = 14, - /** Core Avionics & Industrial Inc. */ - COREAVI_PROPRIETARY = 15, - /** Juice Technologies, Inc. */ - JUICE_PROPRIETARY = 16, - /** Verisilicon, Inc. */ - VERISILICON_PROPRIETARY = 17, - /** Mesa open source project */ - MESA_TURNIP = 18, - /** Mesa open source project */ - MESA_V3DV = 19, - /** Mesa open source project */ - MESA_PANVK = 20, - /** Samsung Electronics Co., Ltd. */ - SAMSUNG_PROPRIETARY = 21, - /** Mesa open source project */ - MESA_VENUS = 22, - /** Mesa open source project */ - MESA_DOZEN = 23, - /** Mesa open source project */ - MESA_NVK = 24, - AMD_PROPRIETARY_KHR = 1, - AMD_OPEN_SOURCE_KHR = 2, - MESA_RADV_KHR = 3, - NVIDIA_PROPRIETARY_KHR = 4, - INTEL_PROPRIETARY_WINDOWS_KHR = 5, - INTEL_OPEN_SOURCE_MESA_KHR = 6, - IMAGINATION_PROPRIETARY_KHR = 7, - QUALCOMM_PROPRIETARY_KHR = 8, - ARM_PROPRIETARY_KHR = 9, - GOOGLE_SWIFTSHADER_KHR = 10, - GGP_PROPRIETARY_KHR = 11, - BROADCOM_PROPRIETARY_KHR = 12, -} - -export enum ConditionalRenderingFlagBitsEXT { - CONDITIONAL_RENDERING_INVERTED_BIT_EXT = 1 << 0, -} - -export enum ResolveModeFlagBits { - NONE = 0, - SAMPLE_ZERO = 1 << 0, - AVERAGE = 1 << 1, - MIN = 1 << 2, - MAX = 1 << 3, - NONE_KHR = 0, - SAMPLE_ZERO_BIT_KHR = 1 << 0, - AVERAGE_BIT_KHR = 1 << 1, - MIN_BIT_KHR = 1 << 2, - MAX_BIT_KHR = 1 << 3, -} - -export enum ShadingRatePaletteEntryNV { - SHADING_RATE_PALETTE_ENTRY_NO_INVOCATIONS_NV = 0, - SHADING_RATE_PALETTE_ENTRY_16_INVOCATIONS_PER_PIXEL_NV = 1, - SHADING_RATE_PALETTE_ENTRY_8_INVOCATIONS_PER_PIXEL_NV = 2, - SHADING_RATE_PALETTE_ENTRY_4_INVOCATIONS_PER_PIXEL_NV = 3, - SHADING_RATE_PALETTE_ENTRY_2_INVOCATIONS_PER_PIXEL_NV = 4, - SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_PIXEL_NV = 5, - SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X1_PIXELS_NV = 6, - SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_1X2_PIXELS_NV = 7, - SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X2_PIXELS_NV = 8, - SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X2_PIXELS_NV = 9, - SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_2X4_PIXELS_NV = 10, - SHADING_RATE_PALETTE_ENTRY_1_INVOCATION_PER_4X4_PIXELS_NV = 11, -} - -export enum CoarseSampleOrderTypeNV { - COARSE_SAMPLE_ORDER_TYPE_DEFAULT_NV = 0, - COARSE_SAMPLE_ORDER_TYPE_CUSTOM_NV = 1, - COARSE_SAMPLE_ORDER_TYPE_PIXEL_MAJOR_NV = 2, - COARSE_SAMPLE_ORDER_TYPE_SAMPLE_MAJOR_NV = 3, -} - -export enum GeometryInstanceFlagBitsKHR { - GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR = 1 << 0, - GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR = 1 << 1, - GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR = 1 << 2, - GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR = 1 << 3, - GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR = 1 << 1, - GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV = 1 << 0, - GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV = GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR, - GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV = 1 << 2, - GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV = 1 << 3, - GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_EXT = 1 << 4, - GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT = 1 << 5, -} - -export enum GeometryFlagBitsKHR { - GEOMETRY_OPAQUE_BIT_KHR = 1 << 0, - GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR = 1 << 1, - GEOMETRY_OPAQUE_BIT_NV = 1 << 0, - GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV = 1 << 1, -} - -export enum BuildAccelerationStructureFlagBitsKHR { - BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 1 << 0, - BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 1 << 1, - BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 1 << 2, - BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 1 << 3, - BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 1 << 4, - BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = 1 << 0, - BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = 1 << 1, - BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = 1 << 2, - BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = 1 << 3, - BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = 1 << 4, - BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 1 << 5, - BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = 1 << 6, - BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = 1 << 7, - BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = 1 << 8, - BUILD_ACCELERATION_STRUCTURE_RESERVED_BIT_9_NV = 1 << 9, - BUILD_ACCELERATION_STRUCTURE_RESERVED_BIT_10_NV = 1 << 10, -} - -export enum AccelerationStructureCreateFlagBitsKHR { - ACCELERATION_STRUCTURE_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = 1 << 0, - ACCELERATION_STRUCTURE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 1 << 3, - ACCELERATION_STRUCTURE_CREATE_MOTION_BIT_NV = 1 << 2, -} - -export enum CopyAccelerationStructureModeKHR { - COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR = 0, - COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR = 1, - COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR = 2, - COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR = 3, - COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV = 0, - COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV = 1, -} - -export enum BuildAccelerationStructureModeKHR { - BUILD_ACCELERATION_STRUCTURE_MODE_BUILD_KHR = 0, - BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR = 1, -} - -export enum AccelerationStructureTypeKHR { - ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR = 0, - ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR = 1, - ACCELERATION_STRUCTURE_TYPE_GENERIC_KHR = 2, - ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV = 0, - ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV = 1, -} - -export enum GeometryTypeKHR { - GEOMETRY_TYPE_TRIANGLES_KHR = 0, - GEOMETRY_TYPE_AABBS_KHR = 1, - GEOMETRY_TYPE_INSTANCES_KHR = 2, - GEOMETRY_TYPE_TRIANGLES_NV = 0, - GEOMETRY_TYPE_AABBS_NV = 1, -} - -export enum AccelerationStructureMemoryRequirementsTypeNV { - ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV = 0, - ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV = 1, - ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV = 2, -} - -export enum AccelerationStructureBuildTypeKHR { - ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0, - ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1, - ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2, -} - -export enum RayTracingShaderGroupTypeKHR { - RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR = 0, - RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR = 1, - RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR = 2, - RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV = 0, - RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV = 1, - RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV = 2, -} - -export enum AccelerationStructureCompatibilityKHR { - ACCELERATION_STRUCTURE_COMPATIBILITY_COMPATIBLE_KHR = 0, - ACCELERATION_STRUCTURE_COMPATIBILITY_INCOMPATIBLE_KHR = 1, -} - -export enum ShaderGroupShaderKHR { - SHADER_GROUP_SHADER_GENERAL_KHR = 0, - SHADER_GROUP_SHADER_CLOSEST_HIT_KHR = 1, - SHADER_GROUP_SHADER_ANY_HIT_KHR = 2, - SHADER_GROUP_SHADER_INTERSECTION_KHR = 3, -} - -export enum MemoryOverallocationBehaviorAMD { - MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0, - MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1, - MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = 2, -} - -export enum FramebufferCreateFlagBits { - IMAGELESS = 1 << 0, - IMAGELESS_BIT_KHR = 1 << 0, -} - -export enum ScopeNV { - SCOPE_DEVICE_NV = 1, - SCOPE_WORKGROUP_NV = 2, - SCOPE_SUBGROUP_NV = 3, - SCOPE_QUEUE_FAMILY_NV = 5, -} - -export enum ComponentTypeNV { - COMPONENT_TYPE_FLOAT16_NV = 0, - COMPONENT_TYPE_FLOAT32_NV = 1, - COMPONENT_TYPE_FLOAT64_NV = 2, - COMPONENT_TYPE_SINT8_NV = 3, - COMPONENT_TYPE_SINT16_NV = 4, - COMPONENT_TYPE_SINT32_NV = 5, - COMPONENT_TYPE_SINT64_NV = 6, - COMPONENT_TYPE_UINT8_NV = 7, - COMPONENT_TYPE_UINT16_NV = 8, - COMPONENT_TYPE_UINT32_NV = 9, - COMPONENT_TYPE_UINT64_NV = 10, -} - -export enum DeviceDiagnosticsConfigFlagBitsNV { - DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV = 1 << 0, - DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV = 1 << 1, - DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV = 1 << 2, - DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV = 1 << 3, -} - -export enum PipelineCreationFeedbackFlagBits { - VALID = 1 << 0, - VALID_BIT_EXT = 1 << 0, - APPLICATION_PIPELINE_CACHE_HIT = 1 << 1, - APPLICATION_PIPELINE_CACHE_HIT_BIT_EXT = 1 << 1, - BASE_PIPELINE_ACCELERATION = 1 << 2, - BASE_PIPELINE_ACCELERATION_BIT_EXT = 1 << 2, -} - -export enum FullScreenExclusiveEXT { - FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0, - FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1, - FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2, - FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3, -} - -export enum PerformanceCounterScopeKHR { - PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0, - PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1, - PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2, - /** Backwards-compatible alias containing a typo */ - QUERY_SCOPE_COMMAND_BUFFER_KHR = 0, - /** Backwards-compatible alias containing a typo */ - QUERY_SCOPE_RENDER_PASS_KHR = 1, - /** Backwards-compatible alias containing a typo */ - QUERY_SCOPE_COMMAND_KHR = 2, -} - -export enum MemoryDecompressionMethodFlagBitsNV { - MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV = 1 << 0, -} - -export enum PerformanceCounterUnitKHR { - PERFORMANCE_COUNTER_UNIT_GENERIC_KHR = 0, - PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR = 1, - PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR = 2, - PERFORMANCE_COUNTER_UNIT_BYTES_KHR = 3, - PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR = 4, - PERFORMANCE_COUNTER_UNIT_KELVIN_KHR = 5, - PERFORMANCE_COUNTER_UNIT_WATTS_KHR = 6, - PERFORMANCE_COUNTER_UNIT_VOLTS_KHR = 7, - PERFORMANCE_COUNTER_UNIT_AMPS_KHR = 8, - PERFORMANCE_COUNTER_UNIT_HERTZ_KHR = 9, - PERFORMANCE_COUNTER_UNIT_CYCLES_KHR = 10, -} - -export enum PerformanceCounterStorageKHR { - PERFORMANCE_COUNTER_STORAGE_INT32_KHR = 0, - PERFORMANCE_COUNTER_STORAGE_INT64_KHR = 1, - PERFORMANCE_COUNTER_STORAGE_UINT32_KHR = 2, - PERFORMANCE_COUNTER_STORAGE_UINT64_KHR = 3, - PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR = 4, - PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR = 5, -} - -export enum PerformanceCounterDescriptionFlagBitsKHR { - PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR = 1 << 0, - /** Backwards-compatible alias containing a typo */ - PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = 1 << 0, - PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR = 1 << 1, - /** Backwards-compatible alias containing a typo */ - PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = 1 << 1, -} - -export enum AcquireProfilingLockFlagBitsKHR { -} - -export enum ShaderCorePropertiesFlagBitsAMD { -} - -export enum PerformanceConfigurationTypeINTEL { - PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL = 0, -} - -export enum QueryPoolSamplingModeINTEL { - QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL = 0, -} - -export enum PerformanceOverrideTypeINTEL { - PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL = 0, - PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL = 1, -} - -export enum PerformanceParameterTypeINTEL { - PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL = 0, - PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL = 1, -} - -export enum PerformanceValueTypeINTEL { - PERFORMANCE_VALUE_TYPE_UINT32_INTEL = 0, - PERFORMANCE_VALUE_TYPE_UINT64_INTEL = 1, - PERFORMANCE_VALUE_TYPE_FLOAT_INTEL = 2, - PERFORMANCE_VALUE_TYPE_BOOL_INTEL = 3, - PERFORMANCE_VALUE_TYPE_STRING_INTEL = 4, -} - -export enum ShaderFloatControlsIndependence { - VK_32_BIT_ONLY = 0, - ALL = 1, - NONE = 2, - VK_32_BIT_ONLY_KHR = 0, - ALL_KHR = 1, - NONE_KHR = 2, -} - -export enum PipelineExecutableStatisticFormatKHR { - PIPELINE_EXECUTABLE_STATISTIC_FORMAT_BOOL32_KHR = 0, - PIPELINE_EXECUTABLE_STATISTIC_FORMAT_INT64_KHR = 1, - PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR = 2, - PIPELINE_EXECUTABLE_STATISTIC_FORMAT_FLOAT64_KHR = 3, -} - -export enum LineRasterizationModeEXT { - LINE_RASTERIZATION_MODE_DEFAULT_EXT = 0, - LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = 1, - LINE_RASTERIZATION_MODE_BRESENHAM_EXT = 2, - LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = 3, -} - -export enum ShaderModuleCreateFlagBits { -} - -export enum PipelineCompilerControlFlagBitsAMD { -} - -export enum ToolPurposeFlagBits { - VALIDATION = 1 << 0, - VALIDATION_BIT_EXT = 1 << 0, - PROFILING = 1 << 1, - PROFILING_BIT_EXT = 1 << 1, - TRACING = 1 << 2, - TRACING_BIT_EXT = 1 << 2, - ADDITIONAL_FEATURES = 1 << 3, - ADDITIONAL_FEATURES_BIT_EXT = 1 << 3, - MODIFYING_FEATURES = 1 << 4, - MODIFYING_FEATURES_BIT_EXT = 1 << 4, - DEBUG_REPORTING_BIT_EXT = 1 << 5, - DEBUG_MARKERS_BIT_EXT = 1 << 6, -} - -export enum FragmentShadingRateCombinerOpKHR { - FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR = 0, - FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR = 1, - FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_KHR = 2, - FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_KHR = 3, - FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_KHR = 4, -} - -export enum FragmentShadingRateNV { - FRAGMENT_SHADING_RATE_1_INVOCATION_PER_PIXEL_NV = 0, - FRAGMENT_SHADING_RATE_1_INVOCATION_PER_1X2_PIXELS_NV = 1, - FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X1_PIXELS_NV = 4, - FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X2_PIXELS_NV = 5, - FRAGMENT_SHADING_RATE_1_INVOCATION_PER_2X4_PIXELS_NV = 6, - FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X2_PIXELS_NV = 9, - FRAGMENT_SHADING_RATE_1_INVOCATION_PER_4X4_PIXELS_NV = 10, - FRAGMENT_SHADING_RATE_2_INVOCATIONS_PER_PIXEL_NV = 11, - FRAGMENT_SHADING_RATE_4_INVOCATIONS_PER_PIXEL_NV = 12, - FRAGMENT_SHADING_RATE_8_INVOCATIONS_PER_PIXEL_NV = 13, - FRAGMENT_SHADING_RATE_16_INVOCATIONS_PER_PIXEL_NV = 14, - FRAGMENT_SHADING_RATE_NO_INVOCATIONS_NV = 15, -} - -export enum FragmentShadingRateTypeNV { - FRAGMENT_SHADING_RATE_TYPE_FRAGMENT_SIZE_NV = 0, - FRAGMENT_SHADING_RATE_TYPE_ENUMS_NV = 1, -} - -export enum SubpassMergeStatusEXT { - SUBPASS_MERGE_STATUS_MERGED_EXT = 0, - SUBPASS_MERGE_STATUS_DISALLOWED_EXT = 1, - SUBPASS_MERGE_STATUS_NOT_MERGED_SIDE_EFFECTS_EXT = 2, - SUBPASS_MERGE_STATUS_NOT_MERGED_SAMPLES_MISMATCH_EXT = 3, - SUBPASS_MERGE_STATUS_NOT_MERGED_VIEWS_MISMATCH_EXT = 4, - SUBPASS_MERGE_STATUS_NOT_MERGED_ALIASING_EXT = 5, - SUBPASS_MERGE_STATUS_NOT_MERGED_DEPENDENCIES_EXT = 6, - SUBPASS_MERGE_STATUS_NOT_MERGED_INCOMPATIBLE_INPUT_ATTACHMENT_EXT = 7, - SUBPASS_MERGE_STATUS_NOT_MERGED_TOO_MANY_ATTACHMENTS_EXT = 8, - SUBPASS_MERGE_STATUS_NOT_MERGED_INSUFFICIENT_STORAGE_EXT = 9, - SUBPASS_MERGE_STATUS_NOT_MERGED_DEPTH_STENCIL_COUNT_EXT = 10, - SUBPASS_MERGE_STATUS_NOT_MERGED_RESOLVE_ATTACHMENT_REUSE_EXT = 11, - SUBPASS_MERGE_STATUS_NOT_MERGED_SINGLE_SUBPASS_EXT = 12, - SUBPASS_MERGE_STATUS_NOT_MERGED_UNSPECIFIED_EXT = 13, -} - -export enum AccessFlagBits2 { - ACCESS_2_NONE = 0, - ACCESS_2_NONE_KHR = 0, - ACCESS_2_INDIRECT_COMMAND_READ_BIT = 1 << 0, - ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 1 << 0, - ACCESS_2_INDEX_READ_BIT = 1 << 1, - ACCESS_2_INDEX_READ_BIT_KHR = 1 << 1, - ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT = 1 << 2, - ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 1 << 2, - ACCESS_2_UNIFORM_READ_BIT = 1 << 3, - ACCESS_2_UNIFORM_READ_BIT_KHR = 1 << 3, - ACCESS_2_INPUT_ATTACHMENT_READ_BIT = 1 << 4, - ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 1 << 4, - ACCESS_2_SHADER_READ_BIT = 1 << 5, - ACCESS_2_SHADER_READ_BIT_KHR = 1 << 5, - ACCESS_2_SHADER_WRITE_BIT = 1 << 6, - ACCESS_2_SHADER_WRITE_BIT_KHR = 1 << 6, - ACCESS_2_COLOR_ATTACHMENT_READ_BIT = 1 << 7, - ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 1 << 7, - ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT = 1 << 8, - ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 1 << 8, - ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 1 << 9, - ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 1 << 9, - ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 1 << 10, - ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 1 << 10, - ACCESS_2_TRANSFER_READ_BIT = 1 << 11, - ACCESS_2_TRANSFER_READ_BIT_KHR = 1 << 11, - ACCESS_2_TRANSFER_WRITE_BIT = 1 << 12, - ACCESS_2_TRANSFER_WRITE_BIT_KHR = 1 << 12, - ACCESS_2_HOST_READ_BIT = 1 << 13, - ACCESS_2_HOST_READ_BIT_KHR = 1 << 13, - ACCESS_2_HOST_WRITE_BIT = 1 << 14, - ACCESS_2_HOST_WRITE_BIT_KHR = 1 << 14, - ACCESS_2_MEMORY_READ_BIT = 1 << 15, - ACCESS_2_MEMORY_READ_BIT_KHR = 1 << 15, - ACCESS_2_MEMORY_WRITE_BIT = 1 << 16, - ACCESS_2_MEMORY_WRITE_BIT_KHR = 1 << 16, - ACCESS_2_SHADER_SAMPLED_READ_BIT = 1 << 32, - ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 1 << 32, - ACCESS_2_SHADER_STORAGE_READ_BIT = 1 << 33, - ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 1 << 33, - ACCESS_2_SHADER_STORAGE_WRITE_BIT = 1 << 34, - ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 1 << 34, - ACCESS_2_VIDEO_DECODE_READ_BIT_KHR = 1 << 35, - ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR = 1 << 36, - ACCESS_2_RESERVED_46_BIT_EXT = 1 << 46, - ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 1 << 37, - ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 1 << 38, - ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 1 << 25, - ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 1 << 26, - ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 1 << 27, - /** read access flag for reading conditional rendering predicate */ - ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 1 << 20, - ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 1 << 17, - ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 1 << 18, - ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 1 << 23, - ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 1 << 23, - ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 1 << 21, - ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 1 << 22, - ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 1 << 21, - ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 1 << 22, - ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 1 << 24, - ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 1 << 19, - ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT = 1 << 41, - ACCESS_2_INVOCATION_MASK_READ_BIT_HUAWEI = 1 << 39, - ACCESS_2_SHADER_BINDING_TABLE_READ_BIT_KHR = 1 << 40, - ACCESS_2_MICROMAP_READ_BIT_EXT = 1 << 44, - ACCESS_2_MICROMAP_WRITE_BIT_EXT = 1 << 45, - ACCESS_2_OPTICAL_FLOW_READ_BIT_NV = 1 << 42, - ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV = 1 << 43, -} - -export enum PipelineStageFlagBits2 { - PIPELINE_STAGE_2_NONE = 0, - PIPELINE_STAGE_2_NONE_KHR = 0, - PIPELINE_STAGE_2_TOP_OF_PIPE_BIT = 1 << 0, - PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 1 << 0, - PIPELINE_STAGE_2_DRAW_INDIRECT_BIT = 1 << 1, - PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 1 << 1, - PIPELINE_STAGE_2_VERTEX_INPUT_BIT = 1 << 2, - PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 1 << 2, - PIPELINE_STAGE_2_VERTEX_SHADER_BIT = 1 << 3, - PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 1 << 3, - PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT = 1 << 4, - PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 1 << 4, - PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT = 1 << 5, - PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 1 << 5, - PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT = 1 << 6, - PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 1 << 6, - PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT = 1 << 7, - PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 1 << 7, - PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT = 1 << 8, - PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 1 << 8, - PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT = 1 << 9, - PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 1 << 9, - PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT = 1 << 10, - PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 1 << 10, - PIPELINE_STAGE_2_COMPUTE_SHADER_BIT = 1 << 11, - PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 1 << 11, - PIPELINE_STAGE_2_ALL_TRANSFER_BIT = 1 << 12, - PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 1 << 12, - PIPELINE_STAGE_2_TRANSFER_BIT = PIPELINE_STAGE_2_ALL_TRANSFER_BIT, - PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 1 << 12, - PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT = 1 << 13, - PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 1 << 13, - PIPELINE_STAGE_2_HOST_BIT = 1 << 14, - PIPELINE_STAGE_2_HOST_BIT_KHR = 1 << 14, - PIPELINE_STAGE_2_ALL_GRAPHICS_BIT = 1 << 15, - PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 1 << 15, - PIPELINE_STAGE_2_ALL_COMMANDS_BIT = 1 << 16, - PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 1 << 16, - PIPELINE_STAGE_2_COPY_BIT = 1 << 32, - PIPELINE_STAGE_2_COPY_BIT_KHR = 1 << 32, - PIPELINE_STAGE_2_RESOLVE_BIT = 1 << 33, - PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 1 << 33, - PIPELINE_STAGE_2_BLIT_BIT = 1 << 34, - PIPELINE_STAGE_2_BLIT_BIT_KHR = 1 << 34, - PIPELINE_STAGE_2_CLEAR_BIT = 1 << 35, - PIPELINE_STAGE_2_CLEAR_BIT_KHR = 1 << 35, - PIPELINE_STAGE_2_INDEX_INPUT_BIT = 1 << 36, - PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 1 << 36, - PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT = 1 << 37, - PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 1 << 37, - PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT = 1 << 38, - PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 1 << 38, - PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR = 1 << 26, - PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 1 << 27, - PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 1 << 24, - /** A pipeline stage for conditional rendering predicate fetch */ - PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 1 << 18, - PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 1 << 17, - PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 22, - PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 1 << 22, - PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 1 << 25, - PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 1 << 21, - PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 1 << 21, - PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 1 << 25, - PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 1 << 23, - PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 1 << 19, - PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 1 << 20, - PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT = 1 << 19, - PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT = 1 << 20, - PIPELINE_STAGE_2_SUBPASS_SHADING_BIT_HUAWEI = 1 << 39, - PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI = 1 << 40, - PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR = 1 << 28, - PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT = 1 << 30, - PIPELINE_STAGE_2_RESEVED_41_BIT_HUAWEI = 1 << 41, - PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV = 1 << 29, -} - -export enum SubmitFlagBits { - PROTECTED = 1 << 0, - PROTECTED_BIT_KHR = 1 << 0, -} - -export enum EventCreateFlagBits { - DEVICE_ONLY = 1 << 0, - DEVICE_ONLY_BIT_KHR = 1 << 0, -} - -export enum PipelineLayoutCreateFlagBits { - RESERVED_0_BIT_AMD = 1 << 0, - INDEPENDENT_SETS_BIT_EXT = 1 << 1, -} - -export enum ProvokingVertexModeEXT { - PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT = 0, - PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT = 1, -} - -export enum AccelerationStructureMotionInstanceTypeNV { - ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_STATIC_NV = 0, - ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_MATRIX_MOTION_NV = 1, - ACCELERATION_STRUCTURE_MOTION_INSTANCE_TYPE_SRT_MOTION_NV = 2, -} - -export enum PipelineColorBlendStateCreateFlagBits { - RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_ARM = 1 << 0, - RASTERIZATION_ORDER_ATTACHMENT_ACCESS_BIT_EXT = 1 << 0, -} - -export enum PipelineDepthStencilStateCreateFlagBits { - RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_ARM = 1 << 0, - RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_ARM = 1 << 1, - RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT = 1 << 0, - RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT = 1 << 1, -} - -export enum GraphicsPipelineLibraryFlagBitsEXT { - GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT = 1 << 0, - GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT = 1 << 1, - GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT = 1 << 2, - GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT = 1 << 3, -} - -export enum DeviceAddressBindingFlagBitsEXT { - DEVICE_ADDRESS_BINDING_INTERNAL_OBJECT_BIT_EXT = 1 << 0, -} - -export enum DeviceAddressBindingTypeEXT { - DEVICE_ADDRESS_BINDING_TYPE_BIND_EXT = 0, - DEVICE_ADDRESS_BINDING_TYPE_UNBIND_EXT = 1, -} - -export enum VideoCodecOperationFlagBitsKHR { - VIDEO_CODEC_OPERATION_NONE_KHR = 0, - VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT = 1 << 16, - VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT = 1 << 17, - VIDEO_CODEC_OPERATION_DECODE_H264_BIT_EXT = 1 << 0, - VIDEO_CODEC_OPERATION_DECODE_H265_BIT_EXT = 1 << 1, -} - -/** Vulkan video chroma subsampling definitions */ -export enum VideoChromaSubsamplingFlagBitsKHR { - VIDEO_CHROMA_SUBSAMPLING_INVALID_KHR = 0, - VIDEO_CHROMA_SUBSAMPLING_MONOCHROME_BIT_KHR = 1 << 0, - VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR = 1 << 1, - VIDEO_CHROMA_SUBSAMPLING_422_BIT_KHR = 1 << 2, - VIDEO_CHROMA_SUBSAMPLING_444_BIT_KHR = 1 << 3, -} - -/** Vulkan video component bit depth definitions */ -export enum VideoComponentBitDepthFlagBitsKHR { - VIDEO_COMPONENT_BIT_DEPTH_INVALID_KHR = 0, - VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR = 1 << 0, - VIDEO_COMPONENT_BIT_DEPTH_10_BIT_KHR = 1 << 2, - VIDEO_COMPONENT_BIT_DEPTH_12_BIT_KHR = 1 << 4, -} - -export enum VideoCapabilityFlagBitsKHR { - VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR = 1 << 0, - VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR = 1 << 1, -} - -export enum VideoSessionCreateFlagBitsKHR { - VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 1 << 0, -} - -export enum VideoDecodeH264PictureLayoutFlagBitsEXT { - VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_EXT = 0, - VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_INTERLEAVED_LINES_BIT_EXT = 1 << 0, - VIDEO_DECODE_H264_PICTURE_LAYOUT_INTERLACED_SEPARATE_PLANES_BIT_EXT = 1 << 1, -} - -export enum VideoCodingControlFlagBitsKHR { - VIDEO_CODING_CONTROL_RESET_BIT_KHR = 1 << 0, - VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 1 << 1, - VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_LAYER_BIT_KHR = 1 << 2, -} - -export enum QueryResultStatusKHR { - QUERY_RESULT_STATUS_ERROR_KHR = -1, - QUERY_RESULT_STATUS_NOT_READY_KHR = 0, - QUERY_RESULT_STATUS_COMPLETE_KHR = 1, -} - -export enum VideoDecodeUsageFlagBitsKHR { - VIDEO_DECODE_USAGE_DEFAULT_KHR = 0, - VIDEO_DECODE_USAGE_TRANSCODING_BIT_KHR = 1 << 0, - VIDEO_DECODE_USAGE_OFFLINE_BIT_KHR = 1 << 1, - VIDEO_DECODE_USAGE_STREAMING_BIT_KHR = 1 << 2, -} - -export enum VideoDecodeCapabilityFlagBitsKHR { - VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_COINCIDE_BIT_KHR = 1 << 0, - VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR = 1 << 1, -} - -export enum VideoEncodeUsageFlagBitsKHR { - VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0, - VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 1 << 0, - VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 1 << 1, - VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 1 << 2, - VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 1 << 3, -} - -export enum VideoEncodeContentFlagBitsKHR { - VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0, - VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 1 << 0, - VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 1 << 1, - VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 1 << 2, -} - -export enum VideoEncodeTuningModeKHR { - VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0, - VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1, - VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2, - VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3, - VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4, -} - -export enum VideoEncodeCapabilityFlagBitsKHR { - VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 1 << 0, -} - -export enum VideoEncodeRateControlModeFlagBitsKHR { - VIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR = 0, - VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 1, - VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 2, -} - -export enum VideoEncodeH264CapabilityFlagBitsEXT { - VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT = 1 << 0, - VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT = 1 << 1, - VIDEO_ENCODE_H264_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 1 << 2, - VIDEO_ENCODE_H264_CAPABILITY_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_BIT_EXT = 1 << 3, - VIDEO_ENCODE_H264_CAPABILITY_SCALING_LISTS_BIT_EXT = 1 << 4, - VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 1 << 5, - VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT = 1 << 6, - VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT = 1 << 7, - VIDEO_ENCODE_H264_CAPABILITY_PIC_INIT_QP_MINUS26_BIT_EXT = 1 << 8, - VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 1 << 9, - VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_EXPLICIT_BIT_EXT = 1 << 10, - VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_IMPLICIT_BIT_EXT = 1 << 11, - VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 1 << 12, - VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT = 1 << 13, - VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT = 1 << 14, - VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT = 1 << 15, - VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT = 1 << 16, - VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT = 1 << 17, - VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT = 1 << 18, - VIDEO_ENCODE_H264_CAPABILITY_DISABLE_DIRECT_SPATIAL_MV_PRED_BIT_EXT = 1 << 19, - VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT = 1 << 20, - VIDEO_ENCODE_H264_CAPABILITY_SLICE_MB_COUNT_BIT_EXT = 1 << 21, - VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT = 1 << 22, - VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 1 << 23, - VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 1 << 24, -} - -export enum VideoEncodeH264InputModeFlagBitsEXT { - VIDEO_ENCODE_H264_INPUT_MODE_FRAME_BIT_EXT = 1 << 0, - VIDEO_ENCODE_H264_INPUT_MODE_SLICE_BIT_EXT = 1 << 1, - VIDEO_ENCODE_H264_INPUT_MODE_NON_VCL_BIT_EXT = 1 << 2, -} - -export enum VideoEncodeH264OutputModeFlagBitsEXT { - VIDEO_ENCODE_H264_OUTPUT_MODE_FRAME_BIT_EXT = 1 << 0, - VIDEO_ENCODE_H264_OUTPUT_MODE_SLICE_BIT_EXT = 1 << 1, - VIDEO_ENCODE_H264_OUTPUT_MODE_NON_VCL_BIT_EXT = 1 << 2, -} - -export enum VideoEncodeH264RateControlStructureEXT { - VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, - VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1, - VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2, -} - -export enum ImageFormatConstraintsFlagBitsFUCHSIA { -} - -export enum ImageConstraintsInfoFlagBitsFUCHSIA { - IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 1 << 0, - IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 1 << 1, - IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 1 << 2, - IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 1 << 3, - IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 1 << 4, -} - -export enum FormatFeatureFlagBits2 { - FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT = 1 << 0, - FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = 1 << 0, - FORMAT_FEATURE_2_STORAGE_IMAGE_BIT = 1 << 1, - FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = 1 << 1, - FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT = 1 << 2, - FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = 1 << 2, - FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT = 1 << 3, - FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 1 << 3, - FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT = 1 << 4, - FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 1 << 4, - FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 1 << 5, - FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR = 1 << 5, - FORMAT_FEATURE_2_VERTEX_BUFFER_BIT = 1 << 6, - FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR = 1 << 6, - FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT = 1 << 7, - FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR = 1 << 7, - FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT = 1 << 8, - FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR = 1 << 8, - FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT = 1 << 9, - FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 1 << 9, - FORMAT_FEATURE_2_BLIT_SRC_BIT = 1 << 10, - FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR = 1 << 10, - FORMAT_FEATURE_2_BLIT_DST_BIT = 1 << 11, - FORMAT_FEATURE_2_BLIT_DST_BIT_KHR = 1 << 11, - FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 1 << 12, - FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR = 1 << 12, - FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT = 1 << 13, - FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 1 << 13, - FORMAT_FEATURE_2_TRANSFER_SRC_BIT = 1 << 14, - FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR = 1 << 14, - FORMAT_FEATURE_2_TRANSFER_DST_BIT = 1 << 15, - FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR = 1 << 15, - FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 1 << 16, - FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR = 1 << 16, - FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT = 1 << 17, - FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 1 << 17, - FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 1 << 18, - FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 1 << 18, - FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 1 << 19, - FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 1 << 19, - FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 1 << 20, - FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 1 << 20, - FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 1 << 21, - FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 1 << 21, - FORMAT_FEATURE_2_DISJOINT_BIT = 1 << 22, - FORMAT_FEATURE_2_DISJOINT_BIT_KHR = 1 << 22, - FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT = 1 << 23, - FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR = 1 << 23, - FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT = 1 << 31, - FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = 1 << 31, - FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT = 1 << 32, - FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = 1 << 32, - FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT = 1 << 33, - FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = 1 << 33, - FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR = 1 << 25, - FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR = 1 << 26, - FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 1 << 29, - FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 1 << 24, - FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 1 << 30, - FORMAT_FEATURE_2_RESERVED_44_BIT_EXT = 1 << 44, - FORMAT_FEATURE_2_RESERVED_45_BIT_EXT = 1 << 45, - FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 1 << 27, - FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 1 << 28, - /** Format support linear image as render target, it cannot be mixed with non linear attachment */ - FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV = 1 << 38, - FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM = 1 << 34, - FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM = 1 << 35, - FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM = 1 << 36, - FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM = 1 << 37, - FORMAT_FEATURE_2_RESERVED_39_BIT_EXT = 1 << 39, - FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV = 1 << 40, - FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV = 1 << 41, - FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV = 1 << 42, -} - -export enum RenderingFlagBits { - CONTENTS_SECONDARY_COMMAND_BUFFERS = 1 << 0, - CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT_KHR = 1 << 0, - SUSPENDING = 1 << 1, - SUSPENDING_BIT_KHR = 1 << 1, - RESUMING = 1 << 2, - RESUMING_BIT_KHR = 1 << 2, - ENABLE_LEGACY_DITHERING_BIT_EXT = 1 << 3, -} - -export enum VideoEncodeH265CapabilityFlagBitsEXT { - VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 1 << 0, - VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT = 1 << 1, - VIDEO_ENCODE_H265_CAPABILITY_SAMPLE_ADAPTIVE_OFFSET_ENABLED_BIT_EXT = 1 << 2, - VIDEO_ENCODE_H265_CAPABILITY_PCM_ENABLE_BIT_EXT = 1 << 3, - VIDEO_ENCODE_H265_CAPABILITY_SPS_TEMPORAL_MVP_ENABLED_BIT_EXT = 1 << 4, - VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 1 << 5, - VIDEO_ENCODE_H265_CAPABILITY_INIT_QP_MINUS26_BIT_EXT = 1 << 6, - VIDEO_ENCODE_H265_CAPABILITY_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT = 1 << 7, - VIDEO_ENCODE_H265_CAPABILITY_SIGN_DATA_HIDING_ENABLED_BIT_EXT = 1 << 8, - VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_ENABLED_BIT_EXT = 1 << 9, - VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_DISABLED_BIT_EXT = 1 << 10, - VIDEO_ENCODE_H265_CAPABILITY_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_BIT_EXT = 1 << 11, - VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 1 << 12, - VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_BIPRED_BIT_EXT = 1 << 13, - VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 1 << 14, - VIDEO_ENCODE_H265_CAPABILITY_TRANSQUANT_BYPASS_ENABLED_BIT_EXT = 1 << 15, - VIDEO_ENCODE_H265_CAPABILITY_ENTROPY_CODING_SYNC_ENABLED_BIT_EXT = 1 << 16, - VIDEO_ENCODE_H265_CAPABILITY_DEBLOCKING_FILTER_OVERRIDE_ENABLED_BIT_EXT = 1 << 17, - VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_FRAME_BIT_EXT = 1 << 18, - VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_PER_TILE_BIT_EXT = 1 << 19, - VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_SLICE_BIT_EXT = 1 << 20, - VIDEO_ENCODE_H265_CAPABILITY_SLICE_SEGMENT_CTB_COUNT_BIT_EXT = 1 << 21, - VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT = 1 << 22, - VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT = 1 << 23, - VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 1 << 24, - VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 1 << 25, -} - -export enum VideoEncodeH265InputModeFlagBitsEXT { - VIDEO_ENCODE_H265_INPUT_MODE_FRAME_BIT_EXT = 1 << 0, - VIDEO_ENCODE_H265_INPUT_MODE_SLICE_SEGMENT_BIT_EXT = 1 << 1, - VIDEO_ENCODE_H265_INPUT_MODE_NON_VCL_BIT_EXT = 1 << 2, -} - -export enum VideoEncodeH265OutputModeFlagBitsEXT { - VIDEO_ENCODE_H265_OUTPUT_MODE_FRAME_BIT_EXT = 1 << 0, - VIDEO_ENCODE_H265_OUTPUT_MODE_SLICE_SEGMENT_BIT_EXT = 1 << 1, - VIDEO_ENCODE_H265_OUTPUT_MODE_NON_VCL_BIT_EXT = 1 << 2, -} - -export enum VideoEncodeH265RateControlStructureEXT { - VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, - VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1, - VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2, -} - -export enum VideoEncodeH265CtbSizeFlagBitsEXT { - VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT = 1 << 0, - VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT = 1 << 1, - VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT = 1 << 2, -} - -export enum VideoEncodeH265TransformBlockSizeFlagBitsEXT { - VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT = 1 << 0, - VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT = 1 << 1, - VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT = 1 << 2, - VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT = 1 << 3, -} - -export enum ExportMetalObjectTypeFlagBitsEXT { - EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 1 << 0, - EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 1 << 1, - EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 1 << 2, - EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 1 << 3, - EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 1 << 4, - EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 1 << 5, -} - -export enum InstanceCreateFlagBits { - ENUMERATE_PORTABILITY_BIT_KHR = 1 << 0, -} - -export enum ImageCompressionFlagBitsEXT { - IMAGE_COMPRESSION_DEFAULT_EXT = 0, - IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT = 1 << 0, - IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT = 1 << 1, - IMAGE_COMPRESSION_DISABLED_EXT = 1 << 2, -} - -export enum ImageCompressionFixedRateFlagBitsEXT { - IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT = 0, - IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT = 1 << 0, - IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT = 1 << 1, - IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT = 1 << 2, - IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT = 1 << 3, - IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT = 1 << 4, - IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT = 1 << 5, - IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT = 1 << 6, - IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT = 1 << 7, - IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT = 1 << 8, - IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT = 1 << 9, - IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT = 1 << 10, - IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT = 1 << 11, - IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT = 1 << 12, - IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT = 1 << 13, - IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT = 1 << 14, - IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT = 1 << 15, - IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT = 1 << 16, - IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT = 1 << 17, - IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT = 1 << 18, - IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT = 1 << 19, - IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT = 1 << 20, - IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT = 1 << 21, - IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT = 1 << 22, - IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT = 1 << 23, -} - -export enum PipelineRobustnessBufferBehaviorEXT { - PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT = 0, - PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT = 1, - PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT = 2, - PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT = 3, -} - -export enum PipelineRobustnessImageBehaviorEXT { - PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT = 0, - PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT = 1, - PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT = 2, - PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT = 3, -} - -export enum OpticalFlowGridSizeFlagBitsNV { - OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV = 0, - OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV = 1 << 0, - OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV = 1 << 1, - OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV = 1 << 2, - OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV = 1 << 3, -} - -export enum OpticalFlowUsageFlagBitsNV { - OPTICAL_FLOW_USAGE_UNKNOWN_NV = 0, - OPTICAL_FLOW_USAGE_INPUT_BIT_NV = 1 << 0, - OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV = 1 << 1, - OPTICAL_FLOW_USAGE_HINT_BIT_NV = 1 << 2, - OPTICAL_FLOW_USAGE_COST_BIT_NV = 1 << 3, - OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV = 1 << 4, -} - -export enum OpticalFlowPerformanceLevelNV { - OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV = 0, - OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV = 1, - OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV = 2, - OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV = 3, -} - -export enum OpticalFlowSessionBindingPointNV { - OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV = 0, - OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV = 1, - OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV = 2, - OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV = 3, - OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV = 4, - OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV = 5, - OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV = 6, - OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV = 7, - OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV = 8, -} - -export enum OpticalFlowSessionCreateFlagBitsNV { - OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV = 1 << 0, - OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV = 1 << 1, - OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV = 1 << 2, - OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV = 1 << 3, - OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV = 1 << 4, -} - -export enum OpticalFlowExecuteFlagBitsNV { - OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV = 1 << 0, -} - -export enum MicromapTypeEXT { - MICROMAP_TYPE_OPACITY_MICROMAP_EXT = 0, -} - -export enum BuildMicromapFlagBitsEXT { - BUILD_MICROMAP_PREFER_FAST_TRACE_BIT_EXT = 1 << 0, - BUILD_MICROMAP_PREFER_FAST_BUILD_BIT_EXT = 1 << 1, - BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT = 1 << 2, -} - -export enum MicromapCreateFlagBitsEXT { - MICROMAP_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = 1 << 0, -} - -export enum CopyMicromapModeEXT { - COPY_MICROMAP_MODE_CLONE_EXT = 0, - COPY_MICROMAP_MODE_SERIALIZE_EXT = 1, - COPY_MICROMAP_MODE_DESERIALIZE_EXT = 2, - COPY_MICROMAP_MODE_COMPACT_EXT = 3, -} - -export enum BuildMicromapModeEXT { - BUILD_MICROMAP_MODE_BUILD_EXT = 0, -} - -export enum OpacityMicromapFormatEXT { - OPACITY_MICROMAP_FORMAT_2_STATE_EXT = 1, - OPACITY_MICROMAP_FORMAT_4_STATE_EXT = 2, -} - -export enum OpacityMicromapSpecialIndexEXT { - OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_TRANSPARENT_EXT = -1, - OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_OPAQUE_EXT = -2, - OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_TRANSPARENT_EXT = -3, - OPACITY_MICROMAP_SPECIAL_INDEX_FULLY_UNKNOWN_OPAQUE_EXT = -4, -} - -export enum DeviceFaultAddressTypeEXT { - /** Currently unused */ - DEVICE_FAULT_ADDRESS_TYPE_NONE_EXT = 0, - DEVICE_FAULT_ADDRESS_TYPE_READ_INVALID_EXT = 1, - DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT = 2, - DEVICE_FAULT_ADDRESS_TYPE_EXECUTE_INVALID_EXT = 3, - DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_UNKNOWN_EXT = 4, - DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_INVALID_EXT = 5, - DEVICE_FAULT_ADDRESS_TYPE_INSTRUCTION_POINTER_FAULT_EXT = 6, -} - -export enum DeviceFaultVendorBinaryHeaderVersionEXT { - DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT = 1, -} - -/// Structs - -export interface InitStdVideoH264SpsVuiFlags { - aspect_ratio_info_present_flag?: number; - overscan_info_present_flag?: number; - overscan_appropriate_flag?: number; - video_signal_type_present_flag?: number; - video_full_range_flag?: number; - color_description_present_flag?: number; - chroma_loc_info_present_flag?: number; - timing_info_present_flag?: number; - fixed_frame_rate_flag?: number; - bitstream_restriction_flag?: number; - nal_hrd_parameters_present_flag?: number; - vcl_hrd_parameters_present_flag?: number; -} - -export class StdVideoH264SpsVuiFlags implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH264SpsVuiFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264SpsVuiFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH264SpsVuiFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SpsVuiFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264SpsVuiFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH264SpsVuiFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.aspect_ratio_info_present_flag !== undefined) this.aspect_ratio_info_present_flag = data.aspect_ratio_info_present_flag; - if (data.overscan_info_present_flag !== undefined) this.overscan_info_present_flag = data.overscan_info_present_flag; - if (data.overscan_appropriate_flag !== undefined) this.overscan_appropriate_flag = data.overscan_appropriate_flag; - if (data.video_signal_type_present_flag !== undefined) this.video_signal_type_present_flag = data.video_signal_type_present_flag; - if (data.video_full_range_flag !== undefined) this.video_full_range_flag = data.video_full_range_flag; - if (data.color_description_present_flag !== undefined) this.color_description_present_flag = data.color_description_present_flag; - if (data.chroma_loc_info_present_flag !== undefined) this.chroma_loc_info_present_flag = data.chroma_loc_info_present_flag; - if (data.timing_info_present_flag !== undefined) this.timing_info_present_flag = data.timing_info_present_flag; - if (data.fixed_frame_rate_flag !== undefined) this.fixed_frame_rate_flag = data.fixed_frame_rate_flag; - if (data.bitstream_restriction_flag !== undefined) this.bitstream_restriction_flag = data.bitstream_restriction_flag; - if (data.nal_hrd_parameters_present_flag !== undefined) this.nal_hrd_parameters_present_flag = data.nal_hrd_parameters_present_flag; - if (data.vcl_hrd_parameters_present_flag !== undefined) this.vcl_hrd_parameters_present_flag = data.vcl_hrd_parameters_present_flag; - } - } - - get aspect_ratio_info_present_flag() { - return this.#view.getUint32(0, LE); - } - - set aspect_ratio_info_present_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get overscan_info_present_flag() { - return this.#view.getUint32(4, LE); - } - - set overscan_info_present_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get overscan_appropriate_flag() { - return this.#view.getUint32(8, LE); - } - - set overscan_appropriate_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get video_signal_type_present_flag() { - return this.#view.getUint32(12, LE); - } - - set video_signal_type_present_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get video_full_range_flag() { - return this.#view.getUint32(16, LE); - } - - set video_full_range_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get color_description_present_flag() { - return this.#view.getUint32(20, LE); - } - - set color_description_present_flag(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get chroma_loc_info_present_flag() { - return this.#view.getUint32(24, LE); - } - - set chroma_loc_info_present_flag(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get timing_info_present_flag() { - return this.#view.getUint32(28, LE); - } - - set timing_info_present_flag(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get fixed_frame_rate_flag() { - return this.#view.getUint32(32, LE); - } - - set fixed_frame_rate_flag(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get bitstream_restriction_flag() { - return this.#view.getUint32(36, LE); - } - - set bitstream_restriction_flag(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get nal_hrd_parameters_present_flag() { - return this.#view.getUint32(40, LE); - } - - set nal_hrd_parameters_present_flag(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get vcl_hrd_parameters_present_flag() { - return this.#view.getUint32(44, LE); - } - - set vcl_hrd_parameters_present_flag(value: number) { - this.#view.setUint32(44, Number(value), LE); - } -} - -export interface InitStdVideoH264HrdParameters { - cpb_cnt_minus1?: number; - bit_rate_scale?: number; - cpb_size_scale?: number; - reserved1?: number; - bit_rate_value_minus1?: Uint32Array; - cpb_size_value_minus1?: Uint32Array; - cbr_flag?: Uint8Array; - initial_cpb_removal_delay_length_minus1?: number; - cpb_removal_delay_length_minus1?: number; - dpb_output_delay_length_minus1?: number; - time_offset_length?: number; -} - -/** hrd_parameters */ -export class StdVideoH264HrdParameters implements BaseStruct { - static size = 308; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH264HrdParameters); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264HrdParameters) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH264HrdParameters.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264HrdParameters.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264HrdParameters.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH264HrdParameters.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.cpb_cnt_minus1 !== undefined) this.cpb_cnt_minus1 = data.cpb_cnt_minus1; - if (data.bit_rate_scale !== undefined) this.bit_rate_scale = data.bit_rate_scale; - if (data.cpb_size_scale !== undefined) this.cpb_size_scale = data.cpb_size_scale; - if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; - if (data.bit_rate_value_minus1 !== undefined) this.bit_rate_value_minus1 = data.bit_rate_value_minus1; - if (data.cpb_size_value_minus1 !== undefined) this.cpb_size_value_minus1 = data.cpb_size_value_minus1; - if (data.cbr_flag !== undefined) this.cbr_flag = data.cbr_flag; - if (data.initial_cpb_removal_delay_length_minus1 !== undefined) this.initial_cpb_removal_delay_length_minus1 = data.initial_cpb_removal_delay_length_minus1; - if (data.cpb_removal_delay_length_minus1 !== undefined) this.cpb_removal_delay_length_minus1 = data.cpb_removal_delay_length_minus1; - if (data.dpb_output_delay_length_minus1 !== undefined) this.dpb_output_delay_length_minus1 = data.dpb_output_delay_length_minus1; - if (data.time_offset_length !== undefined) this.time_offset_length = data.time_offset_length; - } - } - - get cpb_cnt_minus1() { - return this.#view.getUint8(0); - } - - set cpb_cnt_minus1(value: number) { - this.#view.setUint8(0, Number(value)); - } - - get bit_rate_scale() { - return this.#view.getUint8(1); - } - - set bit_rate_scale(value: number) { - this.#view.setUint8(1, Number(value)); - } - - get cpb_size_scale() { - return this.#view.getUint8(2); - } - - set cpb_size_scale(value: number) { - this.#view.setUint8(2, Number(value)); - } - - get reserved1() { - return this.#view.getUint8(3); - } - - set reserved1(value: number) { - this.#view.setUint8(3, Number(value)); - } - - get bit_rate_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 4, 32); - } - - set bit_rate_value_minus1(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 4); - } - - get cpb_size_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 132, 32); - } - - set cpb_size_value_minus1(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 132); - } - - get cbr_flag() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 260, 32); - } - - set cbr_flag(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 260); - } - - get initial_cpb_removal_delay_length_minus1() { - return this.#view.getUint32(292, LE); - } - - set initial_cpb_removal_delay_length_minus1(value: number) { - this.#view.setUint32(292, Number(value), LE); - } - - get cpb_removal_delay_length_minus1() { - return this.#view.getUint32(296, LE); - } - - set cpb_removal_delay_length_minus1(value: number) { - this.#view.setUint32(296, Number(value), LE); - } - - get dpb_output_delay_length_minus1() { - return this.#view.getUint32(300, LE); - } - - set dpb_output_delay_length_minus1(value: number) { - this.#view.setUint32(300, Number(value), LE); - } - - get time_offset_length() { - return this.#view.getUint32(304, LE); - } - - set time_offset_length(value: number) { - this.#view.setUint32(304, Number(value), LE); - } -} - -export interface InitStdVideoH264SequenceParameterSetVui { - flags?: StdVideoH264SpsVuiFlags; - aspect_ratio_idc?: StdVideoH264AspectRatioIdc; - sar_width?: number; - sar_height?: number; - video_format?: number; - colour_primaries?: number; - transfer_characteristics?: number; - matrix_coefficients?: number; - num_units_in_tick?: number; - time_scale?: number; - max_num_reorder_frames?: number; - max_dec_frame_buffering?: number; - chroma_sample_loc_type_top_field?: number; - chroma_sample_loc_type_bottom_field?: number; - reserved1?: number; - pHrdParameters?: AnyPointer; -} - -export class StdVideoH264SequenceParameterSetVui implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH264SequenceParameterSetVui); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264SequenceParameterSetVui) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH264SequenceParameterSetVui.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SequenceParameterSetVui.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264SequenceParameterSetVui.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH264SequenceParameterSetVui.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.aspect_ratio_idc !== undefined) this.aspect_ratio_idc = data.aspect_ratio_idc; - if (data.sar_width !== undefined) this.sar_width = data.sar_width; - if (data.sar_height !== undefined) this.sar_height = data.sar_height; - if (data.video_format !== undefined) this.video_format = data.video_format; - if (data.colour_primaries !== undefined) this.colour_primaries = data.colour_primaries; - if (data.transfer_characteristics !== undefined) this.transfer_characteristics = data.transfer_characteristics; - if (data.matrix_coefficients !== undefined) this.matrix_coefficients = data.matrix_coefficients; - if (data.num_units_in_tick !== undefined) this.num_units_in_tick = data.num_units_in_tick; - if (data.time_scale !== undefined) this.time_scale = data.time_scale; - if (data.max_num_reorder_frames !== undefined) this.max_num_reorder_frames = data.max_num_reorder_frames; - if (data.max_dec_frame_buffering !== undefined) this.max_dec_frame_buffering = data.max_dec_frame_buffering; - if (data.chroma_sample_loc_type_top_field !== undefined) this.chroma_sample_loc_type_top_field = data.chroma_sample_loc_type_top_field; - if (data.chroma_sample_loc_type_bottom_field !== undefined) this.chroma_sample_loc_type_bottom_field = data.chroma_sample_loc_type_bottom_field; - if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; - if (data.pHrdParameters !== undefined) this.pHrdParameters = data.pHrdParameters; - } - } - - get flags() { - return new StdVideoH264SpsVuiFlags(this.#data.subarray(0, 0 + StdVideoH264SpsVuiFlags.size)); - } - - set flags(value: StdVideoH264SpsVuiFlags) { - if (value[BUFFER].byteLength < StdVideoH264SpsVuiFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get aspect_ratio_idc() { - return this.#view.getUint32(48, LE); - } - - set aspect_ratio_idc(value: StdVideoH264AspectRatioIdc) { - this.#view.setUint32(48, Number(value), LE); - } - - get sar_width() { - return this.#view.getUint16(52, LE); - } - - set sar_width(value: number) { - this.#view.setUint16(52, Number(value), LE); - } - - get sar_height() { - return this.#view.getUint16(54, LE); - } - - set sar_height(value: number) { - this.#view.setUint16(54, Number(value), LE); - } - - get video_format() { - return this.#view.getUint8(56); - } - - set video_format(value: number) { - this.#view.setUint8(56, Number(value)); - } - - get colour_primaries() { - return this.#view.getUint8(57); - } - - set colour_primaries(value: number) { - this.#view.setUint8(57, Number(value)); - } - - get transfer_characteristics() { - return this.#view.getUint8(58); - } - - set transfer_characteristics(value: number) { - this.#view.setUint8(58, Number(value)); - } - - get matrix_coefficients() { - return this.#view.getUint8(59); - } - - set matrix_coefficients(value: number) { - this.#view.setUint8(59, Number(value)); - } - - get num_units_in_tick() { - return this.#view.getUint32(60, LE); - } - - set num_units_in_tick(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get time_scale() { - return this.#view.getUint32(64, LE); - } - - set time_scale(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get max_num_reorder_frames() { - return this.#view.getUint8(68); - } - - set max_num_reorder_frames(value: number) { - this.#view.setUint8(68, Number(value)); - } - - get max_dec_frame_buffering() { - return this.#view.getUint8(69); - } - - set max_dec_frame_buffering(value: number) { - this.#view.setUint8(69, Number(value)); - } - - get chroma_sample_loc_type_top_field() { - return this.#view.getUint8(70); - } - - set chroma_sample_loc_type_top_field(value: number) { - this.#view.setUint8(70, Number(value)); - } - - get chroma_sample_loc_type_bottom_field() { - return this.#view.getUint8(71); - } - - set chroma_sample_loc_type_bottom_field(value: number) { - this.#view.setUint8(71, Number(value)); - } - - get reserved1() { - return this.#view.getUint32(72, LE); - } - - set reserved1(value: number) { - this.#view.setUint32(72, Number(value), LE); - } - - get pHrdParameters() { - return this.#view.getBigUint64(80, LE); - } - - set pHrdParameters(value: AnyPointer) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoH264SpsFlags { - constraint_set0_flag?: number; - constraint_set1_flag?: number; - constraint_set2_flag?: number; - constraint_set3_flag?: number; - constraint_set4_flag?: number; - constraint_set5_flag?: number; - direct_8x8_inference_flag?: number; - mb_adaptive_frame_field_flag?: number; - frame_mbs_only_flag?: number; - delta_pic_order_always_zero_flag?: number; - separate_colour_plane_flag?: number; - gaps_in_frame_num_value_allowed_flag?: number; - qpprime_y_zero_transform_bypass_flag?: number; - frame_cropping_flag?: number; - seq_scaling_matrix_present_flag?: number; - vui_parameters_present_flag?: number; -} - -export class StdVideoH264SpsFlags implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH264SpsFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264SpsFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH264SpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SpsFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264SpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH264SpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.constraint_set0_flag !== undefined) this.constraint_set0_flag = data.constraint_set0_flag; - if (data.constraint_set1_flag !== undefined) this.constraint_set1_flag = data.constraint_set1_flag; - if (data.constraint_set2_flag !== undefined) this.constraint_set2_flag = data.constraint_set2_flag; - if (data.constraint_set3_flag !== undefined) this.constraint_set3_flag = data.constraint_set3_flag; - if (data.constraint_set4_flag !== undefined) this.constraint_set4_flag = data.constraint_set4_flag; - if (data.constraint_set5_flag !== undefined) this.constraint_set5_flag = data.constraint_set5_flag; - if (data.direct_8x8_inference_flag !== undefined) this.direct_8x8_inference_flag = data.direct_8x8_inference_flag; - if (data.mb_adaptive_frame_field_flag !== undefined) this.mb_adaptive_frame_field_flag = data.mb_adaptive_frame_field_flag; - if (data.frame_mbs_only_flag !== undefined) this.frame_mbs_only_flag = data.frame_mbs_only_flag; - if (data.delta_pic_order_always_zero_flag !== undefined) this.delta_pic_order_always_zero_flag = data.delta_pic_order_always_zero_flag; - if (data.separate_colour_plane_flag !== undefined) this.separate_colour_plane_flag = data.separate_colour_plane_flag; - if (data.gaps_in_frame_num_value_allowed_flag !== undefined) this.gaps_in_frame_num_value_allowed_flag = data.gaps_in_frame_num_value_allowed_flag; - if (data.qpprime_y_zero_transform_bypass_flag !== undefined) this.qpprime_y_zero_transform_bypass_flag = data.qpprime_y_zero_transform_bypass_flag; - if (data.frame_cropping_flag !== undefined) this.frame_cropping_flag = data.frame_cropping_flag; - if (data.seq_scaling_matrix_present_flag !== undefined) this.seq_scaling_matrix_present_flag = data.seq_scaling_matrix_present_flag; - if (data.vui_parameters_present_flag !== undefined) this.vui_parameters_present_flag = data.vui_parameters_present_flag; - } - } - - get constraint_set0_flag() { - return this.#view.getUint32(0, LE); - } - - set constraint_set0_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get constraint_set1_flag() { - return this.#view.getUint32(4, LE); - } - - set constraint_set1_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get constraint_set2_flag() { - return this.#view.getUint32(8, LE); - } - - set constraint_set2_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get constraint_set3_flag() { - return this.#view.getUint32(12, LE); - } - - set constraint_set3_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get constraint_set4_flag() { - return this.#view.getUint32(16, LE); - } - - set constraint_set4_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get constraint_set5_flag() { - return this.#view.getUint32(20, LE); - } - - set constraint_set5_flag(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get direct_8x8_inference_flag() { - return this.#view.getUint32(24, LE); - } - - set direct_8x8_inference_flag(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get mb_adaptive_frame_field_flag() { - return this.#view.getUint32(28, LE); - } - - set mb_adaptive_frame_field_flag(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get frame_mbs_only_flag() { - return this.#view.getUint32(32, LE); - } - - set frame_mbs_only_flag(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get delta_pic_order_always_zero_flag() { - return this.#view.getUint32(36, LE); - } - - set delta_pic_order_always_zero_flag(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get separate_colour_plane_flag() { - return this.#view.getUint32(40, LE); - } - - set separate_colour_plane_flag(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get gaps_in_frame_num_value_allowed_flag() { - return this.#view.getUint32(44, LE); - } - - set gaps_in_frame_num_value_allowed_flag(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get qpprime_y_zero_transform_bypass_flag() { - return this.#view.getUint32(48, LE); - } - - set qpprime_y_zero_transform_bypass_flag(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get frame_cropping_flag() { - return this.#view.getUint32(52, LE); - } - - set frame_cropping_flag(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get seq_scaling_matrix_present_flag() { - return this.#view.getUint32(56, LE); - } - - set seq_scaling_matrix_present_flag(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get vui_parameters_present_flag() { - return this.#view.getUint32(60, LE); - } - - set vui_parameters_present_flag(value: number) { - this.#view.setUint32(60, Number(value), LE); - } -} - -export interface InitStdVideoH264ScalingLists { - scaling_list_present_mask?: number; - use_default_scaling_matrix_mask?: number; - ScalingList4x4?: Uint8Array; - ScalingList8x8?: Uint8Array; -} - -export class StdVideoH264ScalingLists implements BaseStruct { - static size = 484; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH264ScalingLists); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264ScalingLists) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH264ScalingLists.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264ScalingLists.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264ScalingLists.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH264ScalingLists.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.scaling_list_present_mask !== undefined) this.scaling_list_present_mask = data.scaling_list_present_mask; - if (data.use_default_scaling_matrix_mask !== undefined) this.use_default_scaling_matrix_mask = data.use_default_scaling_matrix_mask; - if (data.ScalingList4x4 !== undefined) this.ScalingList4x4 = data.ScalingList4x4; - if (data.ScalingList8x8 !== undefined) this.ScalingList8x8 = data.ScalingList8x8; - } - } - - get scaling_list_present_mask() { - return this.#view.getUint16(0, LE); - } - - set scaling_list_present_mask(value: number) { - this.#view.setUint16(0, Number(value), LE); - } - - get use_default_scaling_matrix_mask() { - return this.#view.getUint16(2, LE); - } - - set use_default_scaling_matrix_mask(value: number) { - this.#view.setUint16(2, Number(value), LE); - } - - get ScalingList4x4() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 4, 96); - } - - set ScalingList4x4(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 4); - } - - get ScalingList8x8() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 100, 384); - } - - set ScalingList8x8(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 100); - } -} - -export interface InitStdVideoH264SequenceParameterSet { - flags?: StdVideoH264SpsFlags; - profile_idc?: StdVideoH264ProfileIdc; - level_idc?: StdVideoH264LevelIdc; - chroma_format_idc?: StdVideoH264ChromaFormatIdc; - seq_parameter_set_id?: number; - bit_depth_luma_minus8?: number; - bit_depth_chroma_minus8?: number; - log2_max_frame_num_minus4?: number; - pic_order_cnt_type?: StdVideoH264PocType; - offset_for_non_ref_pic?: number; - offset_for_top_to_bottom_field?: number; - log2_max_pic_order_cnt_lsb_minus4?: number; - num_ref_frames_in_pic_order_cnt_cycle?: number; - max_num_ref_frames?: number; - reserved1?: number; - pic_width_in_mbs_minus1?: number; - pic_height_in_map_units_minus1?: number; - frame_crop_left_offset?: number; - frame_crop_right_offset?: number; - frame_crop_top_offset?: number; - frame_crop_bottom_offset?: number; - reserved2?: number; - pOffsetForRefFrame?: AnyPointer; - pScalingLists?: AnyPointer; - pSequenceParameterSetVui?: AnyPointer; -} - -export class StdVideoH264SequenceParameterSet implements BaseStruct { - static size = 152; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH264SequenceParameterSet); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264SequenceParameterSet) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH264SequenceParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264SequenceParameterSet.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264SequenceParameterSet.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH264SequenceParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.profile_idc !== undefined) this.profile_idc = data.profile_idc; - if (data.level_idc !== undefined) this.level_idc = data.level_idc; - if (data.chroma_format_idc !== undefined) this.chroma_format_idc = data.chroma_format_idc; - if (data.seq_parameter_set_id !== undefined) this.seq_parameter_set_id = data.seq_parameter_set_id; - if (data.bit_depth_luma_minus8 !== undefined) this.bit_depth_luma_minus8 = data.bit_depth_luma_minus8; - if (data.bit_depth_chroma_minus8 !== undefined) this.bit_depth_chroma_minus8 = data.bit_depth_chroma_minus8; - if (data.log2_max_frame_num_minus4 !== undefined) this.log2_max_frame_num_minus4 = data.log2_max_frame_num_minus4; - if (data.pic_order_cnt_type !== undefined) this.pic_order_cnt_type = data.pic_order_cnt_type; - if (data.offset_for_non_ref_pic !== undefined) this.offset_for_non_ref_pic = data.offset_for_non_ref_pic; - if (data.offset_for_top_to_bottom_field !== undefined) this.offset_for_top_to_bottom_field = data.offset_for_top_to_bottom_field; - if (data.log2_max_pic_order_cnt_lsb_minus4 !== undefined) this.log2_max_pic_order_cnt_lsb_minus4 = data.log2_max_pic_order_cnt_lsb_minus4; - if (data.num_ref_frames_in_pic_order_cnt_cycle !== undefined) this.num_ref_frames_in_pic_order_cnt_cycle = data.num_ref_frames_in_pic_order_cnt_cycle; - if (data.max_num_ref_frames !== undefined) this.max_num_ref_frames = data.max_num_ref_frames; - if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; - if (data.pic_width_in_mbs_minus1 !== undefined) this.pic_width_in_mbs_minus1 = data.pic_width_in_mbs_minus1; - if (data.pic_height_in_map_units_minus1 !== undefined) this.pic_height_in_map_units_minus1 = data.pic_height_in_map_units_minus1; - if (data.frame_crop_left_offset !== undefined) this.frame_crop_left_offset = data.frame_crop_left_offset; - if (data.frame_crop_right_offset !== undefined) this.frame_crop_right_offset = data.frame_crop_right_offset; - if (data.frame_crop_top_offset !== undefined) this.frame_crop_top_offset = data.frame_crop_top_offset; - if (data.frame_crop_bottom_offset !== undefined) this.frame_crop_bottom_offset = data.frame_crop_bottom_offset; - if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; - if (data.pOffsetForRefFrame !== undefined) this.pOffsetForRefFrame = data.pOffsetForRefFrame; - if (data.pScalingLists !== undefined) this.pScalingLists = data.pScalingLists; - if (data.pSequenceParameterSetVui !== undefined) this.pSequenceParameterSetVui = data.pSequenceParameterSetVui; - } - } - - get flags() { - return new StdVideoH264SpsFlags(this.#data.subarray(0, 0 + StdVideoH264SpsFlags.size)); - } - - set flags(value: StdVideoH264SpsFlags) { - if (value[BUFFER].byteLength < StdVideoH264SpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get profile_idc() { - return this.#view.getUint32(64, LE); - } - - set profile_idc(value: StdVideoH264ProfileIdc) { - this.#view.setUint32(64, Number(value), LE); - } - - get level_idc() { - return this.#view.getUint32(68, LE); - } - - set level_idc(value: StdVideoH264LevelIdc) { - this.#view.setUint32(68, Number(value), LE); - } - - get chroma_format_idc() { - return this.#view.getUint32(72, LE); - } - - set chroma_format_idc(value: StdVideoH264ChromaFormatIdc) { - this.#view.setUint32(72, Number(value), LE); - } - - get seq_parameter_set_id() { - return this.#view.getUint8(76); - } - - set seq_parameter_set_id(value: number) { - this.#view.setUint8(76, Number(value)); - } - - get bit_depth_luma_minus8() { - return this.#view.getUint8(77); - } - - set bit_depth_luma_minus8(value: number) { - this.#view.setUint8(77, Number(value)); - } - - get bit_depth_chroma_minus8() { - return this.#view.getUint8(78); - } - - set bit_depth_chroma_minus8(value: number) { - this.#view.setUint8(78, Number(value)); - } - - get log2_max_frame_num_minus4() { - return this.#view.getUint8(79); - } - - set log2_max_frame_num_minus4(value: number) { - this.#view.setUint8(79, Number(value)); - } - - get pic_order_cnt_type() { - return this.#view.getUint32(80, LE); - } - - set pic_order_cnt_type(value: StdVideoH264PocType) { - this.#view.setUint32(80, Number(value), LE); - } - - get offset_for_non_ref_pic() { - return this.#view.getInt32(84, LE); - } - - set offset_for_non_ref_pic(value: number) { - this.#view.setInt32(84, Number(value), LE); - } - - get offset_for_top_to_bottom_field() { - return this.#view.getInt32(88, LE); - } - - set offset_for_top_to_bottom_field(value: number) { - this.#view.setInt32(88, Number(value), LE); - } - - get log2_max_pic_order_cnt_lsb_minus4() { - return this.#view.getUint8(92); - } - - set log2_max_pic_order_cnt_lsb_minus4(value: number) { - this.#view.setUint8(92, Number(value)); - } - - get num_ref_frames_in_pic_order_cnt_cycle() { - return this.#view.getUint8(93); - } - - set num_ref_frames_in_pic_order_cnt_cycle(value: number) { - this.#view.setUint8(93, Number(value)); - } - - get max_num_ref_frames() { - return this.#view.getUint8(94); - } - - set max_num_ref_frames(value: number) { - this.#view.setUint8(94, Number(value)); - } - - get reserved1() { - return this.#view.getUint8(95); - } - - set reserved1(value: number) { - this.#view.setUint8(95, Number(value)); - } - - get pic_width_in_mbs_minus1() { - return this.#view.getUint32(96, LE); - } - - set pic_width_in_mbs_minus1(value: number) { - this.#view.setUint32(96, Number(value), LE); - } - - get pic_height_in_map_units_minus1() { - return this.#view.getUint32(100, LE); - } - - set pic_height_in_map_units_minus1(value: number) { - this.#view.setUint32(100, Number(value), LE); - } - - get frame_crop_left_offset() { - return this.#view.getUint32(104, LE); - } - - set frame_crop_left_offset(value: number) { - this.#view.setUint32(104, Number(value), LE); - } - - get frame_crop_right_offset() { - return this.#view.getUint32(108, LE); - } - - set frame_crop_right_offset(value: number) { - this.#view.setUint32(108, Number(value), LE); - } - - get frame_crop_top_offset() { - return this.#view.getUint32(112, LE); - } - - set frame_crop_top_offset(value: number) { - this.#view.setUint32(112, Number(value), LE); - } - - get frame_crop_bottom_offset() { - return this.#view.getUint32(116, LE); - } - - set frame_crop_bottom_offset(value: number) { - this.#view.setUint32(116, Number(value), LE); - } - - get reserved2() { - return this.#view.getUint32(120, LE); - } - - set reserved2(value: number) { - this.#view.setUint32(120, Number(value), LE); - } - - get pOffsetForRefFrame() { - return this.#view.getBigUint64(128, LE); - } - - set pOffsetForRefFrame(value: AnyPointer) { - this.#view.setBigUint64(128, BigInt(anyPointer(value)), LE); - } - - get pScalingLists() { - return this.#view.getBigUint64(136, LE); - } - - set pScalingLists(value: AnyPointer) { - this.#view.setBigUint64(136, BigInt(anyPointer(value)), LE); - } - - get pSequenceParameterSetVui() { - return this.#view.getBigUint64(144, LE); - } - - set pSequenceParameterSetVui(value: AnyPointer) { - this.#view.setBigUint64(144, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoH264PpsFlags { - transform_8x8_mode_flag?: number; - redundant_pic_cnt_present_flag?: number; - constrained_intra_pred_flag?: number; - deblocking_filter_control_present_flag?: number; - weighted_pred_flag?: number; - bottom_field_pic_order_in_frame_present_flag?: number; - entropy_coding_mode_flag?: number; - pic_scaling_matrix_present_flag?: number; -} - -export class StdVideoH264PpsFlags implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH264PpsFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264PpsFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH264PpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264PpsFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264PpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH264PpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.transform_8x8_mode_flag !== undefined) this.transform_8x8_mode_flag = data.transform_8x8_mode_flag; - if (data.redundant_pic_cnt_present_flag !== undefined) this.redundant_pic_cnt_present_flag = data.redundant_pic_cnt_present_flag; - if (data.constrained_intra_pred_flag !== undefined) this.constrained_intra_pred_flag = data.constrained_intra_pred_flag; - if (data.deblocking_filter_control_present_flag !== undefined) this.deblocking_filter_control_present_flag = data.deblocking_filter_control_present_flag; - if (data.weighted_pred_flag !== undefined) this.weighted_pred_flag = data.weighted_pred_flag; - if (data.bottom_field_pic_order_in_frame_present_flag !== undefined) this.bottom_field_pic_order_in_frame_present_flag = data.bottom_field_pic_order_in_frame_present_flag; - if (data.entropy_coding_mode_flag !== undefined) this.entropy_coding_mode_flag = data.entropy_coding_mode_flag; - if (data.pic_scaling_matrix_present_flag !== undefined) this.pic_scaling_matrix_present_flag = data.pic_scaling_matrix_present_flag; - } - } - - get transform_8x8_mode_flag() { - return this.#view.getUint32(0, LE); - } - - set transform_8x8_mode_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get redundant_pic_cnt_present_flag() { - return this.#view.getUint32(4, LE); - } - - set redundant_pic_cnt_present_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get constrained_intra_pred_flag() { - return this.#view.getUint32(8, LE); - } - - set constrained_intra_pred_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get deblocking_filter_control_present_flag() { - return this.#view.getUint32(12, LE); - } - - set deblocking_filter_control_present_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get weighted_pred_flag() { - return this.#view.getUint32(16, LE); - } - - set weighted_pred_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get bottom_field_pic_order_in_frame_present_flag() { - return this.#view.getUint32(20, LE); - } - - set bottom_field_pic_order_in_frame_present_flag(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get entropy_coding_mode_flag() { - return this.#view.getUint32(24, LE); - } - - set entropy_coding_mode_flag(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pic_scaling_matrix_present_flag() { - return this.#view.getUint32(28, LE); - } - - set pic_scaling_matrix_present_flag(value: number) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitStdVideoH264PictureParameterSet { - flags?: StdVideoH264PpsFlags; - seq_parameter_set_id?: number; - pic_parameter_set_id?: number; - num_ref_idx_l0_default_active_minus1?: number; - num_ref_idx_l1_default_active_minus1?: number; - weighted_bipred_idc?: StdVideoH264WeightedBipredIdc; - pic_init_qp_minus26?: number; - pic_init_qs_minus26?: number; - chroma_qp_index_offset?: number; - second_chroma_qp_index_offset?: number; - pScalingLists?: AnyPointer; -} - -export class StdVideoH264PictureParameterSet implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH264PictureParameterSet); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH264PictureParameterSet) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH264PictureParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH264PictureParameterSet.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH264PictureParameterSet.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH264PictureParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.seq_parameter_set_id !== undefined) this.seq_parameter_set_id = data.seq_parameter_set_id; - if (data.pic_parameter_set_id !== undefined) this.pic_parameter_set_id = data.pic_parameter_set_id; - if (data.num_ref_idx_l0_default_active_minus1 !== undefined) this.num_ref_idx_l0_default_active_minus1 = data.num_ref_idx_l0_default_active_minus1; - if (data.num_ref_idx_l1_default_active_minus1 !== undefined) this.num_ref_idx_l1_default_active_minus1 = data.num_ref_idx_l1_default_active_minus1; - if (data.weighted_bipred_idc !== undefined) this.weighted_bipred_idc = data.weighted_bipred_idc; - if (data.pic_init_qp_minus26 !== undefined) this.pic_init_qp_minus26 = data.pic_init_qp_minus26; - if (data.pic_init_qs_minus26 !== undefined) this.pic_init_qs_minus26 = data.pic_init_qs_minus26; - if (data.chroma_qp_index_offset !== undefined) this.chroma_qp_index_offset = data.chroma_qp_index_offset; - if (data.second_chroma_qp_index_offset !== undefined) this.second_chroma_qp_index_offset = data.second_chroma_qp_index_offset; - if (data.pScalingLists !== undefined) this.pScalingLists = data.pScalingLists; - } - } - - get flags() { - return new StdVideoH264PpsFlags(this.#data.subarray(0, 0 + StdVideoH264PpsFlags.size)); - } - - set flags(value: StdVideoH264PpsFlags) { - if (value[BUFFER].byteLength < StdVideoH264PpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get seq_parameter_set_id() { - return this.#view.getUint8(32); - } - - set seq_parameter_set_id(value: number) { - this.#view.setUint8(32, Number(value)); - } - - get pic_parameter_set_id() { - return this.#view.getUint8(33); - } - - set pic_parameter_set_id(value: number) { - this.#view.setUint8(33, Number(value)); - } - - get num_ref_idx_l0_default_active_minus1() { - return this.#view.getUint8(34); - } - - set num_ref_idx_l0_default_active_minus1(value: number) { - this.#view.setUint8(34, Number(value)); - } - - get num_ref_idx_l1_default_active_minus1() { - return this.#view.getUint8(35); - } - - set num_ref_idx_l1_default_active_minus1(value: number) { - this.#view.setUint8(35, Number(value)); - } - - get weighted_bipred_idc() { - return this.#view.getUint32(36, LE); - } - - set weighted_bipred_idc(value: StdVideoH264WeightedBipredIdc) { - this.#view.setUint32(36, Number(value), LE); - } - - get pic_init_qp_minus26() { - return this.#view.getInt8(40); - } - - set pic_init_qp_minus26(value: number) { - this.#view.setInt8(40, Number(value)); - } - - get pic_init_qs_minus26() { - return this.#view.getInt8(41); - } - - set pic_init_qs_minus26(value: number) { - this.#view.setInt8(41, Number(value)); - } - - get chroma_qp_index_offset() { - return this.#view.getInt8(42); - } - - set chroma_qp_index_offset(value: number) { - this.#view.setInt8(42, Number(value)); - } - - get second_chroma_qp_index_offset() { - return this.#view.getInt8(43); - } - - set second_chroma_qp_index_offset(value: number) { - this.#view.setInt8(43, Number(value)); - } - - get pScalingLists() { - return this.#view.getBigUint64(48, LE); - } - - set pScalingLists(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoDecodeH264PictureInfoFlags { - field_pic_flag?: number; - is_intra?: number; - IdrPicFlag?: number; - bottom_field_flag?: number; - is_reference?: number; - complementary_field_pair?: number; -} - -export class StdVideoDecodeH264PictureInfoFlags implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoDecodeH264PictureInfoFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH264PictureInfoFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoDecodeH264PictureInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264PictureInfoFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH264PictureInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoDecodeH264PictureInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.field_pic_flag !== undefined) this.field_pic_flag = data.field_pic_flag; - if (data.is_intra !== undefined) this.is_intra = data.is_intra; - if (data.IdrPicFlag !== undefined) this.IdrPicFlag = data.IdrPicFlag; - if (data.bottom_field_flag !== undefined) this.bottom_field_flag = data.bottom_field_flag; - if (data.is_reference !== undefined) this.is_reference = data.is_reference; - if (data.complementary_field_pair !== undefined) this.complementary_field_pair = data.complementary_field_pair; - } - } - - get field_pic_flag() { - return this.#view.getUint32(0, LE); - } - - set field_pic_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get is_intra() { - return this.#view.getUint32(4, LE); - } - - set is_intra(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get IdrPicFlag() { - return this.#view.getUint32(8, LE); - } - - set IdrPicFlag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get bottom_field_flag() { - return this.#view.getUint32(12, LE); - } - - set bottom_field_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get is_reference() { - return this.#view.getUint32(16, LE); - } - - set is_reference(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get complementary_field_pair() { - return this.#view.getUint32(20, LE); - } - - set complementary_field_pair(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitStdVideoDecodeH264PictureInfo { - flags?: StdVideoDecodeH264PictureInfoFlags; - seq_parameter_set_id?: number; - pic_parameter_set_id?: number; - reserved1?: number; - reserved2?: number; - frame_num?: number; - idr_pic_id?: number; - PicOrderCnt?: Int32Array; -} - -/** requires tag is for PicOrderCnt, which needs the enum type */ -export class StdVideoDecodeH264PictureInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoDecodeH264PictureInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH264PictureInfo) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoDecodeH264PictureInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264PictureInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH264PictureInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoDecodeH264PictureInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.seq_parameter_set_id !== undefined) this.seq_parameter_set_id = data.seq_parameter_set_id; - if (data.pic_parameter_set_id !== undefined) this.pic_parameter_set_id = data.pic_parameter_set_id; - if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; - if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; - if (data.frame_num !== undefined) this.frame_num = data.frame_num; - if (data.idr_pic_id !== undefined) this.idr_pic_id = data.idr_pic_id; - if (data.PicOrderCnt !== undefined) this.PicOrderCnt = data.PicOrderCnt; - } - } - - get flags() { - return new StdVideoDecodeH264PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH264PictureInfoFlags.size)); - } - - set flags(value: StdVideoDecodeH264PictureInfoFlags) { - if (value[BUFFER].byteLength < StdVideoDecodeH264PictureInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get seq_parameter_set_id() { - return this.#view.getUint8(24); - } - - set seq_parameter_set_id(value: number) { - this.#view.setUint8(24, Number(value)); - } - - get pic_parameter_set_id() { - return this.#view.getUint8(25); - } - - set pic_parameter_set_id(value: number) { - this.#view.setUint8(25, Number(value)); - } - - get reserved1() { - return this.#view.getUint8(26); - } - - set reserved1(value: number) { - this.#view.setUint8(26, Number(value)); - } - - get reserved2() { - return this.#view.getUint8(27); - } - - set reserved2(value: number) { - this.#view.setUint8(27, Number(value)); - } - - get frame_num() { - return this.#view.getUint16(28, LE); - } - - set frame_num(value: number) { - this.#view.setUint16(28, Number(value), LE); - } - - get idr_pic_id() { - return this.#view.getUint16(30, LE); - } - - set idr_pic_id(value: number) { - this.#view.setUint16(30, Number(value), LE); - } - - get PicOrderCnt() { - return new Int32Array(this.#data.buffer, this.#data.byteOffset + 32, 2); - } - - set PicOrderCnt(value: Int32Array) { - this.#data.set(new Uint8Array(value.buffer), 32); - } -} - -export interface InitStdVideoDecodeH264ReferenceInfoFlags { - top_field_flag?: number; - bottom_field_flag?: number; - used_for_long_term_reference?: number; - is_non_existing?: number; -} - -export class StdVideoDecodeH264ReferenceInfoFlags implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoDecodeH264ReferenceInfoFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH264ReferenceInfoFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264ReferenceInfoFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH264ReferenceInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.top_field_flag !== undefined) this.top_field_flag = data.top_field_flag; - if (data.bottom_field_flag !== undefined) this.bottom_field_flag = data.bottom_field_flag; - if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; - if (data.is_non_existing !== undefined) this.is_non_existing = data.is_non_existing; - } - } - - get top_field_flag() { - return this.#view.getUint32(0, LE); - } - - set top_field_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get bottom_field_flag() { - return this.#view.getUint32(4, LE); - } - - set bottom_field_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get used_for_long_term_reference() { - return this.#view.getUint32(8, LE); - } - - set used_for_long_term_reference(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get is_non_existing() { - return this.#view.getUint32(12, LE); - } - - set is_non_existing(value: number) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitStdVideoDecodeH264ReferenceInfo { - flags?: StdVideoDecodeH264ReferenceInfoFlags; - FrameNum?: number; - reserved?: number; - PicOrderCnt?: Int32Array; -} - -export class StdVideoDecodeH264ReferenceInfo implements BaseStruct { - static size = 28; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoDecodeH264ReferenceInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH264ReferenceInfo) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH264ReferenceInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH264ReferenceInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoDecodeH264ReferenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.FrameNum !== undefined) this.FrameNum = data.FrameNum; - if (data.reserved !== undefined) this.reserved = data.reserved; - if (data.PicOrderCnt !== undefined) this.PicOrderCnt = data.PicOrderCnt; - } - } - - get flags() { - return new StdVideoDecodeH264ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH264ReferenceInfoFlags.size)); - } - - set flags(value: StdVideoDecodeH264ReferenceInfoFlags) { - if (value[BUFFER].byteLength < StdVideoDecodeH264ReferenceInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get FrameNum() { - return this.#view.getUint16(16, LE); - } - - set FrameNum(value: number) { - this.#view.setUint16(16, Number(value), LE); - } - - get reserved() { - return this.#view.getUint16(18, LE); - } - - set reserved(value: number) { - this.#view.setUint16(18, Number(value), LE); - } - - get PicOrderCnt() { - return new Int32Array(this.#data.buffer, this.#data.byteOffset + 20, 2); - } - - set PicOrderCnt(value: Int32Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } -} - -export interface InitStdVideoEncodeH264WeightTableFlags { - luma_weight_l0_flag?: number; - chroma_weight_l0_flag?: number; - luma_weight_l1_flag?: number; - chroma_weight_l1_flag?: number; -} - -export class StdVideoEncodeH264WeightTableFlags implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264WeightTableFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264WeightTableFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264WeightTableFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264WeightTableFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264WeightTableFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264WeightTableFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.luma_weight_l0_flag !== undefined) this.luma_weight_l0_flag = data.luma_weight_l0_flag; - if (data.chroma_weight_l0_flag !== undefined) this.chroma_weight_l0_flag = data.chroma_weight_l0_flag; - if (data.luma_weight_l1_flag !== undefined) this.luma_weight_l1_flag = data.luma_weight_l1_flag; - if (data.chroma_weight_l1_flag !== undefined) this.chroma_weight_l1_flag = data.chroma_weight_l1_flag; - } - } - - get luma_weight_l0_flag() { - return this.#view.getUint32(0, LE); - } - - set luma_weight_l0_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get chroma_weight_l0_flag() { - return this.#view.getUint32(4, LE); - } - - set chroma_weight_l0_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get luma_weight_l1_flag() { - return this.#view.getUint32(8, LE); - } - - set luma_weight_l1_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get chroma_weight_l1_flag() { - return this.#view.getUint32(12, LE); - } - - set chroma_weight_l1_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH264WeightTable { - flags?: StdVideoEncodeH264WeightTableFlags; - luma_log2_weight_denom?: number; - chroma_log2_weight_denom?: number; - luma_weight_l0?: Int8Array; - luma_offset_l0?: Int8Array; - chroma_weight_l0?: Int8Array; - chroma_offset_l0?: Int8Array; - luma_weight_l1?: Int8Array; - luma_offset_l1?: Int8Array; - chroma_weight_l1?: Int8Array; - chroma_offset_l1?: Int8Array; -} - -export class StdVideoEncodeH264WeightTable implements BaseStruct { - static size = 404; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264WeightTable); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264WeightTable) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264WeightTable.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264WeightTable.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264WeightTable.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264WeightTable.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.luma_log2_weight_denom !== undefined) this.luma_log2_weight_denom = data.luma_log2_weight_denom; - if (data.chroma_log2_weight_denom !== undefined) this.chroma_log2_weight_denom = data.chroma_log2_weight_denom; - if (data.luma_weight_l0 !== undefined) this.luma_weight_l0 = data.luma_weight_l0; - if (data.luma_offset_l0 !== undefined) this.luma_offset_l0 = data.luma_offset_l0; - if (data.chroma_weight_l0 !== undefined) this.chroma_weight_l0 = data.chroma_weight_l0; - if (data.chroma_offset_l0 !== undefined) this.chroma_offset_l0 = data.chroma_offset_l0; - if (data.luma_weight_l1 !== undefined) this.luma_weight_l1 = data.luma_weight_l1; - if (data.luma_offset_l1 !== undefined) this.luma_offset_l1 = data.luma_offset_l1; - if (data.chroma_weight_l1 !== undefined) this.chroma_weight_l1 = data.chroma_weight_l1; - if (data.chroma_offset_l1 !== undefined) this.chroma_offset_l1 = data.chroma_offset_l1; - } - } - - get flags() { - return new StdVideoEncodeH264WeightTableFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264WeightTableFlags.size)); - } - - set flags(value: StdVideoEncodeH264WeightTableFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH264WeightTableFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get luma_log2_weight_denom() { - return this.#view.getUint8(16); - } - - set luma_log2_weight_denom(value: number) { - this.#view.setUint8(16, Number(value)); - } - - get chroma_log2_weight_denom() { - return this.#view.getUint8(17); - } - - set chroma_log2_weight_denom(value: number) { - this.#view.setUint8(17, Number(value)); - } - - get luma_weight_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 18, 32); - } - - set luma_weight_l0(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 18); - } - - get luma_offset_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 50, 32); - } - - set luma_offset_l0(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 50); - } - - get chroma_weight_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 82, 64); - } - - set chroma_weight_l0(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 82); - } - - get chroma_offset_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 146, 64); - } - - set chroma_offset_l0(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 146); - } - - get luma_weight_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 210, 32); - } - - set luma_weight_l1(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 210); - } - - get luma_offset_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 242, 32); - } - - set luma_offset_l1(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 242); - } - - get chroma_weight_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 274, 64); - } - - set chroma_weight_l1(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 274); - } - - get chroma_offset_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 338, 64); - } - - set chroma_offset_l1(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 338); - } -} - -export interface InitStdVideoEncodeH264SliceHeaderFlags { - direct_spatial_mv_pred_flag?: number; - num_ref_idx_active_override_flag?: number; - no_output_of_prior_pics_flag?: number; - adaptive_ref_pic_marking_mode_flag?: number; - no_prior_references_available_flag?: number; -} - -export class StdVideoEncodeH264SliceHeaderFlags implements BaseStruct { - static size = 20; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264SliceHeaderFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264SliceHeaderFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264SliceHeaderFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264SliceHeaderFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264SliceHeaderFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264SliceHeaderFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.direct_spatial_mv_pred_flag !== undefined) this.direct_spatial_mv_pred_flag = data.direct_spatial_mv_pred_flag; - if (data.num_ref_idx_active_override_flag !== undefined) this.num_ref_idx_active_override_flag = data.num_ref_idx_active_override_flag; - if (data.no_output_of_prior_pics_flag !== undefined) this.no_output_of_prior_pics_flag = data.no_output_of_prior_pics_flag; - if (data.adaptive_ref_pic_marking_mode_flag !== undefined) this.adaptive_ref_pic_marking_mode_flag = data.adaptive_ref_pic_marking_mode_flag; - if (data.no_prior_references_available_flag !== undefined) this.no_prior_references_available_flag = data.no_prior_references_available_flag; - } - } - - get direct_spatial_mv_pred_flag() { - return this.#view.getUint32(0, LE); - } - - set direct_spatial_mv_pred_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get num_ref_idx_active_override_flag() { - return this.#view.getUint32(4, LE); - } - - set num_ref_idx_active_override_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get no_output_of_prior_pics_flag() { - return this.#view.getUint32(8, LE); - } - - set no_output_of_prior_pics_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get adaptive_ref_pic_marking_mode_flag() { - return this.#view.getUint32(12, LE); - } - - set adaptive_ref_pic_marking_mode_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get no_prior_references_available_flag() { - return this.#view.getUint32(16, LE); - } - - set no_prior_references_available_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH264PictureInfoFlags { - idr_flag?: number; - is_reference_flag?: number; - used_for_long_term_reference?: number; -} - -export class StdVideoEncodeH264PictureInfoFlags implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264PictureInfoFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264PictureInfoFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264PictureInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264PictureInfoFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264PictureInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264PictureInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.idr_flag !== undefined) this.idr_flag = data.idr_flag; - if (data.is_reference_flag !== undefined) this.is_reference_flag = data.is_reference_flag; - if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; - } - } - - get idr_flag() { - return this.#view.getUint32(0, LE); - } - - set idr_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get is_reference_flag() { - return this.#view.getUint32(4, LE); - } - - set is_reference_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get used_for_long_term_reference() { - return this.#view.getUint32(8, LE); - } - - set used_for_long_term_reference(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH264ReferenceInfoFlags { - used_for_long_term_reference?: number; -} - -export class StdVideoEncodeH264ReferenceInfoFlags implements BaseStruct { - static size = 4; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264ReferenceInfoFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264ReferenceInfoFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264ReferenceInfoFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264ReferenceInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; - } - } - - get used_for_long_term_reference() { - return this.#view.getUint32(0, LE); - } - - set used_for_long_term_reference(value: number) { - this.#view.setUint32(0, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH264RefMgmtFlags { - ref_pic_list_modification_l0_flag?: number; - ref_pic_list_modification_l1_flag?: number; -} - -export class StdVideoEncodeH264RefMgmtFlags implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264RefMgmtFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264RefMgmtFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264RefMgmtFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefMgmtFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264RefMgmtFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264RefMgmtFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.ref_pic_list_modification_l0_flag !== undefined) this.ref_pic_list_modification_l0_flag = data.ref_pic_list_modification_l0_flag; - if (data.ref_pic_list_modification_l1_flag !== undefined) this.ref_pic_list_modification_l1_flag = data.ref_pic_list_modification_l1_flag; - } - } - - get ref_pic_list_modification_l0_flag() { - return this.#view.getUint32(0, LE); - } - - set ref_pic_list_modification_l0_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get ref_pic_list_modification_l1_flag() { - return this.#view.getUint32(4, LE); - } - - set ref_pic_list_modification_l1_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH264RefListModEntry { - modification_of_pic_nums_idc?: StdVideoH264ModificationOfPicNumsIdc; - abs_diff_pic_num_minus1?: number; - long_term_pic_num?: number; -} - -export class StdVideoEncodeH264RefListModEntry implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264RefListModEntry); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264RefListModEntry) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264RefListModEntry.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefListModEntry.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264RefListModEntry.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264RefListModEntry.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.modification_of_pic_nums_idc !== undefined) this.modification_of_pic_nums_idc = data.modification_of_pic_nums_idc; - if (data.abs_diff_pic_num_minus1 !== undefined) this.abs_diff_pic_num_minus1 = data.abs_diff_pic_num_minus1; - if (data.long_term_pic_num !== undefined) this.long_term_pic_num = data.long_term_pic_num; - } - } - - get modification_of_pic_nums_idc() { - return this.#view.getUint32(0, LE); - } - - set modification_of_pic_nums_idc(value: StdVideoH264ModificationOfPicNumsIdc) { - this.#view.setUint32(0, Number(value), LE); - } - - get abs_diff_pic_num_minus1() { - return this.#view.getUint16(4, LE); - } - - set abs_diff_pic_num_minus1(value: number) { - this.#view.setUint16(4, Number(value), LE); - } - - get long_term_pic_num() { - return this.#view.getUint16(6, LE); - } - - set long_term_pic_num(value: number) { - this.#view.setUint16(6, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH264RefPicMarkingEntry { - operation?: StdVideoH264MemMgmtControlOp; - difference_of_pic_nums_minus1?: number; - long_term_pic_num?: number; - long_term_frame_idx?: number; - max_long_term_frame_idx_plus1?: number; -} - -export class StdVideoEncodeH264RefPicMarkingEntry implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264RefPicMarkingEntry); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264RefPicMarkingEntry) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264RefPicMarkingEntry.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefPicMarkingEntry.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264RefPicMarkingEntry.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264RefPicMarkingEntry.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.operation !== undefined) this.operation = data.operation; - if (data.difference_of_pic_nums_minus1 !== undefined) this.difference_of_pic_nums_minus1 = data.difference_of_pic_nums_minus1; - if (data.long_term_pic_num !== undefined) this.long_term_pic_num = data.long_term_pic_num; - if (data.long_term_frame_idx !== undefined) this.long_term_frame_idx = data.long_term_frame_idx; - if (data.max_long_term_frame_idx_plus1 !== undefined) this.max_long_term_frame_idx_plus1 = data.max_long_term_frame_idx_plus1; - } - } - - get operation() { - return this.#view.getUint32(0, LE); - } - - set operation(value: StdVideoH264MemMgmtControlOp) { - this.#view.setUint32(0, Number(value), LE); - } - - get difference_of_pic_nums_minus1() { - return this.#view.getUint16(4, LE); - } - - set difference_of_pic_nums_minus1(value: number) { - this.#view.setUint16(4, Number(value), LE); - } - - get long_term_pic_num() { - return this.#view.getUint16(6, LE); - } - - set long_term_pic_num(value: number) { - this.#view.setUint16(6, Number(value), LE); - } - - get long_term_frame_idx() { - return this.#view.getUint16(8, LE); - } - - set long_term_frame_idx(value: number) { - this.#view.setUint16(8, Number(value), LE); - } - - get max_long_term_frame_idx_plus1() { - return this.#view.getUint16(10, LE); - } - - set max_long_term_frame_idx_plus1(value: number) { - this.#view.setUint16(10, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH264RefMemMgmtCtrlOperations { - flags?: StdVideoEncodeH264RefMgmtFlags; - refList0ModOpCount?: number; - pRefList0ModOperations?: AnyPointer; - refList1ModOpCount?: number; - pRefList1ModOperations?: AnyPointer; - refPicMarkingOpCount?: number; - pRefPicMarkingOperations?: AnyPointer; -} - -export class StdVideoEncodeH264RefMemMgmtCtrlOperations implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264RefMemMgmtCtrlOperations); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264RefMemMgmtCtrlOperations) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264RefMemMgmtCtrlOperations.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264RefMemMgmtCtrlOperations.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264RefMemMgmtCtrlOperations.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264RefMemMgmtCtrlOperations.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.refList0ModOpCount !== undefined) this.refList0ModOpCount = data.refList0ModOpCount; - if (data.pRefList0ModOperations !== undefined) this.pRefList0ModOperations = data.pRefList0ModOperations; - if (data.refList1ModOpCount !== undefined) this.refList1ModOpCount = data.refList1ModOpCount; - if (data.pRefList1ModOperations !== undefined) this.pRefList1ModOperations = data.pRefList1ModOperations; - if (data.refPicMarkingOpCount !== undefined) this.refPicMarkingOpCount = data.refPicMarkingOpCount; - if (data.pRefPicMarkingOperations !== undefined) this.pRefPicMarkingOperations = data.pRefPicMarkingOperations; - } - } - - get flags() { - return new StdVideoEncodeH264RefMgmtFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264RefMgmtFlags.size)); - } - - set flags(value: StdVideoEncodeH264RefMgmtFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH264RefMgmtFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get refList0ModOpCount() { - return this.#view.getUint8(8); - } - - set refList0ModOpCount(value: number) { - this.#view.setUint8(8, Number(value)); - } - - get pRefList0ModOperations() { - return this.#view.getBigUint64(16, LE); - } - - set pRefList0ModOperations(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get refList1ModOpCount() { - return this.#view.getUint8(24); - } - - set refList1ModOpCount(value: number) { - this.#view.setUint8(24, Number(value)); - } - - get pRefList1ModOperations() { - return this.#view.getBigUint64(32, LE); - } - - set pRefList1ModOperations(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get refPicMarkingOpCount() { - return this.#view.getUint8(40); - } - - set refPicMarkingOpCount(value: number) { - this.#view.setUint8(40, Number(value)); - } - - get pRefPicMarkingOperations() { - return this.#view.getBigUint64(48, LE); - } - - set pRefPicMarkingOperations(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoEncodeH264PictureInfo { - flags?: StdVideoEncodeH264PictureInfoFlags; - seq_parameter_set_id?: number; - pic_parameter_set_id?: number; - pictureType?: StdVideoH264PictureType; - frame_num?: number; - PicOrderCnt?: number; -} - -export class StdVideoEncodeH264PictureInfo implements BaseStruct { - static size = 28; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264PictureInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264PictureInfo) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264PictureInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264PictureInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264PictureInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264PictureInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.seq_parameter_set_id !== undefined) this.seq_parameter_set_id = data.seq_parameter_set_id; - if (data.pic_parameter_set_id !== undefined) this.pic_parameter_set_id = data.pic_parameter_set_id; - if (data.pictureType !== undefined) this.pictureType = data.pictureType; - if (data.frame_num !== undefined) this.frame_num = data.frame_num; - if (data.PicOrderCnt !== undefined) this.PicOrderCnt = data.PicOrderCnt; - } - } - - get flags() { - return new StdVideoEncodeH264PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264PictureInfoFlags.size)); - } - - set flags(value: StdVideoEncodeH264PictureInfoFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH264PictureInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get seq_parameter_set_id() { - return this.#view.getUint8(12); - } - - set seq_parameter_set_id(value: number) { - this.#view.setUint8(12, Number(value)); - } - - get pic_parameter_set_id() { - return this.#view.getUint8(13); - } - - set pic_parameter_set_id(value: number) { - this.#view.setUint8(13, Number(value)); - } - - get pictureType() { - return this.#view.getUint32(16, LE); - } - - set pictureType(value: StdVideoH264PictureType) { - this.#view.setUint32(16, Number(value), LE); - } - - get frame_num() { - return this.#view.getUint32(20, LE); - } - - set frame_num(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get PicOrderCnt() { - return this.#view.getInt32(24, LE); - } - - set PicOrderCnt(value: number) { - this.#view.setInt32(24, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH264ReferenceInfo { - flags?: StdVideoEncodeH264ReferenceInfoFlags; - FrameNum?: number; - PicOrderCnt?: number; - long_term_pic_num?: number; - long_term_frame_idx?: number; -} - -export class StdVideoEncodeH264ReferenceInfo implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264ReferenceInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264ReferenceInfo) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264ReferenceInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264ReferenceInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264ReferenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.FrameNum !== undefined) this.FrameNum = data.FrameNum; - if (data.PicOrderCnt !== undefined) this.PicOrderCnt = data.PicOrderCnt; - if (data.long_term_pic_num !== undefined) this.long_term_pic_num = data.long_term_pic_num; - if (data.long_term_frame_idx !== undefined) this.long_term_frame_idx = data.long_term_frame_idx; - } - } - - get flags() { - return new StdVideoEncodeH264ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264ReferenceInfoFlags.size)); - } - - set flags(value: StdVideoEncodeH264ReferenceInfoFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH264ReferenceInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get FrameNum() { - return this.#view.getUint32(4, LE); - } - - set FrameNum(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get PicOrderCnt() { - return this.#view.getInt32(8, LE); - } - - set PicOrderCnt(value: number) { - this.#view.setInt32(8, Number(value), LE); - } - - get long_term_pic_num() { - return this.#view.getUint16(12, LE); - } - - set long_term_pic_num(value: number) { - this.#view.setUint16(12, Number(value), LE); - } - - get long_term_frame_idx() { - return this.#view.getUint16(14, LE); - } - - set long_term_frame_idx(value: number) { - this.#view.setUint16(14, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH264SliceHeader { - flags?: StdVideoEncodeH264SliceHeaderFlags; - first_mb_in_slice?: number; - slice_type?: StdVideoH264SliceType; - idr_pic_id?: number; - num_ref_idx_l0_active_minus1?: number; - num_ref_idx_l1_active_minus1?: number; - cabac_init_idc?: StdVideoH264CabacInitIdc; - disable_deblocking_filter_idc?: StdVideoH264DisableDeblockingFilterIdc; - slice_alpha_c0_offset_div2?: number; - slice_beta_offset_div2?: number; - pWeightTable?: AnyPointer; -} - -export class StdVideoEncodeH264SliceHeader implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH264SliceHeader); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH264SliceHeader) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH264SliceHeader.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH264SliceHeader.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH264SliceHeader.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH264SliceHeader.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.first_mb_in_slice !== undefined) this.first_mb_in_slice = data.first_mb_in_slice; - if (data.slice_type !== undefined) this.slice_type = data.slice_type; - if (data.idr_pic_id !== undefined) this.idr_pic_id = data.idr_pic_id; - if (data.num_ref_idx_l0_active_minus1 !== undefined) this.num_ref_idx_l0_active_minus1 = data.num_ref_idx_l0_active_minus1; - if (data.num_ref_idx_l1_active_minus1 !== undefined) this.num_ref_idx_l1_active_minus1 = data.num_ref_idx_l1_active_minus1; - if (data.cabac_init_idc !== undefined) this.cabac_init_idc = data.cabac_init_idc; - if (data.disable_deblocking_filter_idc !== undefined) this.disable_deblocking_filter_idc = data.disable_deblocking_filter_idc; - if (data.slice_alpha_c0_offset_div2 !== undefined) this.slice_alpha_c0_offset_div2 = data.slice_alpha_c0_offset_div2; - if (data.slice_beta_offset_div2 !== undefined) this.slice_beta_offset_div2 = data.slice_beta_offset_div2; - if (data.pWeightTable !== undefined) this.pWeightTable = data.pWeightTable; - } - } - - get flags() { - return new StdVideoEncodeH264SliceHeaderFlags(this.#data.subarray(0, 0 + StdVideoEncodeH264SliceHeaderFlags.size)); - } - - set flags(value: StdVideoEncodeH264SliceHeaderFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH264SliceHeaderFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get first_mb_in_slice() { - return this.#view.getUint32(20, LE); - } - - set first_mb_in_slice(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get slice_type() { - return this.#view.getUint32(24, LE); - } - - set slice_type(value: StdVideoH264SliceType) { - this.#view.setUint32(24, Number(value), LE); - } - - get idr_pic_id() { - return this.#view.getUint16(28, LE); - } - - set idr_pic_id(value: number) { - this.#view.setUint16(28, Number(value), LE); - } - - get num_ref_idx_l0_active_minus1() { - return this.#view.getUint8(30); - } - - set num_ref_idx_l0_active_minus1(value: number) { - this.#view.setUint8(30, Number(value)); - } - - get num_ref_idx_l1_active_minus1() { - return this.#view.getUint8(31); - } - - set num_ref_idx_l1_active_minus1(value: number) { - this.#view.setUint8(31, Number(value)); - } - - get cabac_init_idc() { - return this.#view.getUint32(32, LE); - } - - set cabac_init_idc(value: StdVideoH264CabacInitIdc) { - this.#view.setUint32(32, Number(value), LE); - } - - get disable_deblocking_filter_idc() { - return this.#view.getUint32(36, LE); - } - - set disable_deblocking_filter_idc(value: StdVideoH264DisableDeblockingFilterIdc) { - this.#view.setUint32(36, Number(value), LE); - } - - get slice_alpha_c0_offset_div2() { - return this.#view.getInt8(40); - } - - set slice_alpha_c0_offset_div2(value: number) { - this.#view.setInt8(40, Number(value)); - } - - get slice_beta_offset_div2() { - return this.#view.getInt8(41); - } - - set slice_beta_offset_div2(value: number) { - this.#view.setInt8(41, Number(value)); - } - - get pWeightTable() { - return this.#view.getBigUint64(48, LE); - } - - set pWeightTable(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoH265ProfileTierLevelFlags { - general_tier_flag?: number; - general_progressive_source_flag?: number; - general_interlaced_source_flag?: number; - general_non_packed_constraint_flag?: number; - general_frame_only_constraint_flag?: number; -} - -export class StdVideoH265ProfileTierLevelFlags implements BaseStruct { - static size = 20; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265ProfileTierLevelFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ProfileTierLevelFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265ProfileTierLevelFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ProfileTierLevelFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ProfileTierLevelFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265ProfileTierLevelFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.general_tier_flag !== undefined) this.general_tier_flag = data.general_tier_flag; - if (data.general_progressive_source_flag !== undefined) this.general_progressive_source_flag = data.general_progressive_source_flag; - if (data.general_interlaced_source_flag !== undefined) this.general_interlaced_source_flag = data.general_interlaced_source_flag; - if (data.general_non_packed_constraint_flag !== undefined) this.general_non_packed_constraint_flag = data.general_non_packed_constraint_flag; - if (data.general_frame_only_constraint_flag !== undefined) this.general_frame_only_constraint_flag = data.general_frame_only_constraint_flag; - } - } - - get general_tier_flag() { - return this.#view.getUint32(0, LE); - } - - set general_tier_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get general_progressive_source_flag() { - return this.#view.getUint32(4, LE); - } - - set general_progressive_source_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get general_interlaced_source_flag() { - return this.#view.getUint32(8, LE); - } - - set general_interlaced_source_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get general_non_packed_constraint_flag() { - return this.#view.getUint32(12, LE); - } - - set general_non_packed_constraint_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get general_frame_only_constraint_flag() { - return this.#view.getUint32(16, LE); - } - - set general_frame_only_constraint_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitStdVideoH265ProfileTierLevel { - flags?: StdVideoH265ProfileTierLevelFlags; - general_profile_idc?: StdVideoH265ProfileIdc; - general_level_idc?: StdVideoH265LevelIdc; -} - -/** profile_tier_level */ -export class StdVideoH265ProfileTierLevel implements BaseStruct { - static size = 28; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265ProfileTierLevel); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ProfileTierLevel) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265ProfileTierLevel.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ProfileTierLevel.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ProfileTierLevel.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265ProfileTierLevel.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.general_profile_idc !== undefined) this.general_profile_idc = data.general_profile_idc; - if (data.general_level_idc !== undefined) this.general_level_idc = data.general_level_idc; - } - } - - get flags() { - return new StdVideoH265ProfileTierLevelFlags(this.#data.subarray(0, 0 + StdVideoH265ProfileTierLevelFlags.size)); - } - - set flags(value: StdVideoH265ProfileTierLevelFlags) { - if (value[BUFFER].byteLength < StdVideoH265ProfileTierLevelFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get general_profile_idc() { - return this.#view.getUint32(20, LE); - } - - set general_profile_idc(value: StdVideoH265ProfileIdc) { - this.#view.setUint32(20, Number(value), LE); - } - - get general_level_idc() { - return this.#view.getUint32(24, LE); - } - - set general_level_idc(value: StdVideoH265LevelIdc) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitStdVideoH265DecPicBufMgr { - max_latency_increase_plus1?: Uint32Array; - max_dec_pic_buffering_minus1?: Uint8Array; - max_num_reorder_pics?: Uint8Array; -} - -/** sps_ or vps_ parameters, based on if the StdVideoH265DecPicBufMgr is used within the StdVideoH265SequenceParameterSet or StdVideoH265VideoParameterSet */ -export class StdVideoH265DecPicBufMgr implements BaseStruct { - static size = 44; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265DecPicBufMgr); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265DecPicBufMgr) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265DecPicBufMgr.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265DecPicBufMgr.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265DecPicBufMgr.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265DecPicBufMgr.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.max_latency_increase_plus1 !== undefined) this.max_latency_increase_plus1 = data.max_latency_increase_plus1; - if (data.max_dec_pic_buffering_minus1 !== undefined) this.max_dec_pic_buffering_minus1 = data.max_dec_pic_buffering_minus1; - if (data.max_num_reorder_pics !== undefined) this.max_num_reorder_pics = data.max_num_reorder_pics; - } - } - - get max_latency_increase_plus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 0, 7); - } - - set max_latency_increase_plus1(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - - get max_dec_pic_buffering_minus1() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 28, 7); - } - - set max_dec_pic_buffering_minus1(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 28); - } - - get max_num_reorder_pics() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 35, 7); - } - - set max_num_reorder_pics(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 35); - } -} - -export interface InitStdVideoH265SubLayerHrdParameters { - bit_rate_value_minus1?: Uint32Array; - cpb_size_value_minus1?: Uint32Array; - cpb_size_du_value_minus1?: Uint32Array; - bit_rate_du_value_minus1?: Uint32Array; - cbr_flag?: number; -} - -/** sub_layer_hrd_parameters */ -export class StdVideoH265SubLayerHrdParameters implements BaseStruct { - static size = 516; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265SubLayerHrdParameters); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SubLayerHrdParameters) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265SubLayerHrdParameters.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SubLayerHrdParameters.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SubLayerHrdParameters.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265SubLayerHrdParameters.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.bit_rate_value_minus1 !== undefined) this.bit_rate_value_minus1 = data.bit_rate_value_minus1; - if (data.cpb_size_value_minus1 !== undefined) this.cpb_size_value_minus1 = data.cpb_size_value_minus1; - if (data.cpb_size_du_value_minus1 !== undefined) this.cpb_size_du_value_minus1 = data.cpb_size_du_value_minus1; - if (data.bit_rate_du_value_minus1 !== undefined) this.bit_rate_du_value_minus1 = data.bit_rate_du_value_minus1; - if (data.cbr_flag !== undefined) this.cbr_flag = data.cbr_flag; - } - } - - get bit_rate_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 0, 32); - } - - set bit_rate_value_minus1(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - - get cpb_size_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 128, 32); - } - - set cpb_size_value_minus1(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 128); - } - - get cpb_size_du_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 256, 32); - } - - set cpb_size_du_value_minus1(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 256); - } - - get bit_rate_du_value_minus1() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 384, 32); - } - - set bit_rate_du_value_minus1(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 384); - } - - get cbr_flag() { - return this.#view.getUint32(512, LE); - } - - set cbr_flag(value: number) { - this.#view.setUint32(512, Number(value), LE); - } -} - -export interface InitStdVideoH265HrdFlags { - nal_hrd_parameters_present_flag?: number; - vcl_hrd_parameters_present_flag?: number; - sub_pic_hrd_params_present_flag?: number; - sub_pic_cpb_params_in_pic_timing_sei_flag?: number; - fixed_pic_rate_general_flag?: number; - fixed_pic_rate_within_cvs_flag?: number; - low_delay_hrd_flag?: number; -} - -export class StdVideoH265HrdFlags implements BaseStruct { - static size = 28; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265HrdFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265HrdFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265HrdFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265HrdFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265HrdFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265HrdFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.nal_hrd_parameters_present_flag !== undefined) this.nal_hrd_parameters_present_flag = data.nal_hrd_parameters_present_flag; - if (data.vcl_hrd_parameters_present_flag !== undefined) this.vcl_hrd_parameters_present_flag = data.vcl_hrd_parameters_present_flag; - if (data.sub_pic_hrd_params_present_flag !== undefined) this.sub_pic_hrd_params_present_flag = data.sub_pic_hrd_params_present_flag; - if (data.sub_pic_cpb_params_in_pic_timing_sei_flag !== undefined) this.sub_pic_cpb_params_in_pic_timing_sei_flag = data.sub_pic_cpb_params_in_pic_timing_sei_flag; - if (data.fixed_pic_rate_general_flag !== undefined) this.fixed_pic_rate_general_flag = data.fixed_pic_rate_general_flag; - if (data.fixed_pic_rate_within_cvs_flag !== undefined) this.fixed_pic_rate_within_cvs_flag = data.fixed_pic_rate_within_cvs_flag; - if (data.low_delay_hrd_flag !== undefined) this.low_delay_hrd_flag = data.low_delay_hrd_flag; - } - } - - get nal_hrd_parameters_present_flag() { - return this.#view.getUint32(0, LE); - } - - set nal_hrd_parameters_present_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get vcl_hrd_parameters_present_flag() { - return this.#view.getUint32(4, LE); - } - - set vcl_hrd_parameters_present_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get sub_pic_hrd_params_present_flag() { - return this.#view.getUint32(8, LE); - } - - set sub_pic_hrd_params_present_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get sub_pic_cpb_params_in_pic_timing_sei_flag() { - return this.#view.getUint32(12, LE); - } - - set sub_pic_cpb_params_in_pic_timing_sei_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get fixed_pic_rate_general_flag() { - return this.#view.getUint32(16, LE); - } - - set fixed_pic_rate_general_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get fixed_pic_rate_within_cvs_flag() { - return this.#view.getUint32(20, LE); - } - - set fixed_pic_rate_within_cvs_flag(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get low_delay_hrd_flag() { - return this.#view.getUint32(24, LE); - } - - set low_delay_hrd_flag(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitStdVideoH265HrdParameters { - flags?: StdVideoH265HrdFlags; - tick_divisor_minus2?: number; - du_cpb_removal_delay_increment_length_minus1?: number; - dpb_output_delay_du_length_minus1?: number; - bit_rate_scale?: number; - cpb_size_scale?: number; - cpb_size_du_scale?: number; - initial_cpb_removal_delay_length_minus1?: number; - au_cpb_removal_delay_length_minus1?: number; - dpb_output_delay_length_minus1?: number; - cpb_cnt_minus1?: Uint8Array; - elemental_duration_in_tc_minus1?: Uint16Array; - reserved?: Uint16Array; - pSubLayerHrdParametersNal?: AnyPointer; - pSubLayerHrdParametersVcl?: AnyPointer; -} - -export class StdVideoH265HrdParameters implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265HrdParameters); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265HrdParameters) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265HrdParameters.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265HrdParameters.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265HrdParameters.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265HrdParameters.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.tick_divisor_minus2 !== undefined) this.tick_divisor_minus2 = data.tick_divisor_minus2; - if (data.du_cpb_removal_delay_increment_length_minus1 !== undefined) this.du_cpb_removal_delay_increment_length_minus1 = data.du_cpb_removal_delay_increment_length_minus1; - if (data.dpb_output_delay_du_length_minus1 !== undefined) this.dpb_output_delay_du_length_minus1 = data.dpb_output_delay_du_length_minus1; - if (data.bit_rate_scale !== undefined) this.bit_rate_scale = data.bit_rate_scale; - if (data.cpb_size_scale !== undefined) this.cpb_size_scale = data.cpb_size_scale; - if (data.cpb_size_du_scale !== undefined) this.cpb_size_du_scale = data.cpb_size_du_scale; - if (data.initial_cpb_removal_delay_length_minus1 !== undefined) this.initial_cpb_removal_delay_length_minus1 = data.initial_cpb_removal_delay_length_minus1; - if (data.au_cpb_removal_delay_length_minus1 !== undefined) this.au_cpb_removal_delay_length_minus1 = data.au_cpb_removal_delay_length_minus1; - if (data.dpb_output_delay_length_minus1 !== undefined) this.dpb_output_delay_length_minus1 = data.dpb_output_delay_length_minus1; - if (data.cpb_cnt_minus1 !== undefined) this.cpb_cnt_minus1 = data.cpb_cnt_minus1; - if (data.elemental_duration_in_tc_minus1 !== undefined) this.elemental_duration_in_tc_minus1 = data.elemental_duration_in_tc_minus1; - if (data.reserved !== undefined) this.reserved = data.reserved; - if (data.pSubLayerHrdParametersNal !== undefined) this.pSubLayerHrdParametersNal = data.pSubLayerHrdParametersNal; - if (data.pSubLayerHrdParametersVcl !== undefined) this.pSubLayerHrdParametersVcl = data.pSubLayerHrdParametersVcl; - } - } - - get flags() { - return new StdVideoH265HrdFlags(this.#data.subarray(0, 0 + StdVideoH265HrdFlags.size)); - } - - set flags(value: StdVideoH265HrdFlags) { - if (value[BUFFER].byteLength < StdVideoH265HrdFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get tick_divisor_minus2() { - return this.#view.getUint8(28); - } - - set tick_divisor_minus2(value: number) { - this.#view.setUint8(28, Number(value)); - } - - get du_cpb_removal_delay_increment_length_minus1() { - return this.#view.getUint8(29); - } - - set du_cpb_removal_delay_increment_length_minus1(value: number) { - this.#view.setUint8(29, Number(value)); - } - - get dpb_output_delay_du_length_minus1() { - return this.#view.getUint8(30); - } - - set dpb_output_delay_du_length_minus1(value: number) { - this.#view.setUint8(30, Number(value)); - } - - get bit_rate_scale() { - return this.#view.getUint8(31); - } - - set bit_rate_scale(value: number) { - this.#view.setUint8(31, Number(value)); - } - - get cpb_size_scale() { - return this.#view.getUint8(32); - } - - set cpb_size_scale(value: number) { - this.#view.setUint8(32, Number(value)); - } - - get cpb_size_du_scale() { - return this.#view.getUint8(33); - } - - set cpb_size_du_scale(value: number) { - this.#view.setUint8(33, Number(value)); - } - - get initial_cpb_removal_delay_length_minus1() { - return this.#view.getUint8(34); - } - - set initial_cpb_removal_delay_length_minus1(value: number) { - this.#view.setUint8(34, Number(value)); - } - - get au_cpb_removal_delay_length_minus1() { - return this.#view.getUint8(35); - } - - set au_cpb_removal_delay_length_minus1(value: number) { - this.#view.setUint8(35, Number(value)); - } - - get dpb_output_delay_length_minus1() { - return this.#view.getUint8(36); - } - - set dpb_output_delay_length_minus1(value: number) { - this.#view.setUint8(36, Number(value)); - } - - get cpb_cnt_minus1() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 37, 7); - } - - set cpb_cnt_minus1(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 37); - } - - get elemental_duration_in_tc_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 44, 7); - } - - set elemental_duration_in_tc_minus1(value: Uint16Array) { - this.#data.set(new Uint8Array(value.buffer), 44); - } - - get reserved() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 58, 3); - } - - set reserved(value: Uint16Array) { - this.#data.set(new Uint8Array(value.buffer), 58); - } - - get pSubLayerHrdParametersNal() { - return this.#view.getBigUint64(64, LE); - } - - set pSubLayerHrdParametersNal(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - - get pSubLayerHrdParametersVcl() { - return this.#view.getBigUint64(72, LE); - } - - set pSubLayerHrdParametersVcl(value: AnyPointer) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoH265VpsFlags { - vps_temporal_id_nesting_flag?: number; - vps_sub_layer_ordering_info_present_flag?: number; - vps_timing_info_present_flag?: number; - vps_poc_proportional_to_timing_flag?: number; -} - -export class StdVideoH265VpsFlags implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265VpsFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265VpsFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265VpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265VpsFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265VpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265VpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.vps_temporal_id_nesting_flag !== undefined) this.vps_temporal_id_nesting_flag = data.vps_temporal_id_nesting_flag; - if (data.vps_sub_layer_ordering_info_present_flag !== undefined) this.vps_sub_layer_ordering_info_present_flag = data.vps_sub_layer_ordering_info_present_flag; - if (data.vps_timing_info_present_flag !== undefined) this.vps_timing_info_present_flag = data.vps_timing_info_present_flag; - if (data.vps_poc_proportional_to_timing_flag !== undefined) this.vps_poc_proportional_to_timing_flag = data.vps_poc_proportional_to_timing_flag; - } - } - - get vps_temporal_id_nesting_flag() { - return this.#view.getUint32(0, LE); - } - - set vps_temporal_id_nesting_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get vps_sub_layer_ordering_info_present_flag() { - return this.#view.getUint32(4, LE); - } - - set vps_sub_layer_ordering_info_present_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get vps_timing_info_present_flag() { - return this.#view.getUint32(8, LE); - } - - set vps_timing_info_present_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get vps_poc_proportional_to_timing_flag() { - return this.#view.getUint32(12, LE); - } - - set vps_poc_proportional_to_timing_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitStdVideoH265VideoParameterSet { - flags?: StdVideoH265VpsFlags; - vps_video_parameter_set_id?: number; - vps_max_sub_layers_minus1?: number; - reserved1?: number; - reserved2?: number; - vps_num_units_in_tick?: number; - vps_time_scale?: number; - vps_num_ticks_poc_diff_one_minus1?: number; - reserved3?: number; - pDecPicBufMgr?: AnyPointer; - pHrdParameters?: AnyPointer; - pProfileTierLevel?: AnyPointer; -} - -export class StdVideoH265VideoParameterSet implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265VideoParameterSet); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265VideoParameterSet) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265VideoParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265VideoParameterSet.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265VideoParameterSet.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265VideoParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.vps_video_parameter_set_id !== undefined) this.vps_video_parameter_set_id = data.vps_video_parameter_set_id; - if (data.vps_max_sub_layers_minus1 !== undefined) this.vps_max_sub_layers_minus1 = data.vps_max_sub_layers_minus1; - if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; - if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; - if (data.vps_num_units_in_tick !== undefined) this.vps_num_units_in_tick = data.vps_num_units_in_tick; - if (data.vps_time_scale !== undefined) this.vps_time_scale = data.vps_time_scale; - if (data.vps_num_ticks_poc_diff_one_minus1 !== undefined) this.vps_num_ticks_poc_diff_one_minus1 = data.vps_num_ticks_poc_diff_one_minus1; - if (data.reserved3 !== undefined) this.reserved3 = data.reserved3; - if (data.pDecPicBufMgr !== undefined) this.pDecPicBufMgr = data.pDecPicBufMgr; - if (data.pHrdParameters !== undefined) this.pHrdParameters = data.pHrdParameters; - if (data.pProfileTierLevel !== undefined) this.pProfileTierLevel = data.pProfileTierLevel; - } - } - - get flags() { - return new StdVideoH265VpsFlags(this.#data.subarray(0, 0 + StdVideoH265VpsFlags.size)); - } - - set flags(value: StdVideoH265VpsFlags) { - if (value[BUFFER].byteLength < StdVideoH265VpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get vps_video_parameter_set_id() { - return this.#view.getUint8(16); - } - - set vps_video_parameter_set_id(value: number) { - this.#view.setUint8(16, Number(value)); - } - - get vps_max_sub_layers_minus1() { - return this.#view.getUint8(17); - } - - set vps_max_sub_layers_minus1(value: number) { - this.#view.setUint8(17, Number(value)); - } - - get reserved1() { - return this.#view.getUint8(18); - } - - set reserved1(value: number) { - this.#view.setUint8(18, Number(value)); - } - - get reserved2() { - return this.#view.getUint8(19); - } - - set reserved2(value: number) { - this.#view.setUint8(19, Number(value)); - } - - get vps_num_units_in_tick() { - return this.#view.getUint32(20, LE); - } - - set vps_num_units_in_tick(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get vps_time_scale() { - return this.#view.getUint32(24, LE); - } - - set vps_time_scale(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get vps_num_ticks_poc_diff_one_minus1() { - return this.#view.getUint32(28, LE); - } - - set vps_num_ticks_poc_diff_one_minus1(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get reserved3() { - return this.#view.getUint32(32, LE); - } - - set reserved3(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pDecPicBufMgr() { - return this.#view.getBigUint64(40, LE); - } - - set pDecPicBufMgr(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get pHrdParameters() { - return this.#view.getBigUint64(48, LE); - } - - set pHrdParameters(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get pProfileTierLevel() { - return this.#view.getBigUint64(56, LE); - } - - set pProfileTierLevel(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoH265ScalingLists { - ScalingList4x4?: Uint8Array; - ScalingList8x8?: Uint8Array; - ScalingList16x16?: Uint8Array; - ScalingList32x32?: Uint8Array; - ScalingListDCCoef16x16?: Uint8Array; - ScalingListDCCoef32x32?: Uint8Array; -} - -export class StdVideoH265ScalingLists implements BaseStruct { - static size = 1000; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265ScalingLists); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ScalingLists) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265ScalingLists.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ScalingLists.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ScalingLists.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265ScalingLists.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.ScalingList4x4 !== undefined) this.ScalingList4x4 = data.ScalingList4x4; - if (data.ScalingList8x8 !== undefined) this.ScalingList8x8 = data.ScalingList8x8; - if (data.ScalingList16x16 !== undefined) this.ScalingList16x16 = data.ScalingList16x16; - if (data.ScalingList32x32 !== undefined) this.ScalingList32x32 = data.ScalingList32x32; - if (data.ScalingListDCCoef16x16 !== undefined) this.ScalingListDCCoef16x16 = data.ScalingListDCCoef16x16; - if (data.ScalingListDCCoef32x32 !== undefined) this.ScalingListDCCoef32x32 = data.ScalingListDCCoef32x32; - } - } - - get ScalingList4x4() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 96); - } - - set ScalingList4x4(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - - get ScalingList8x8() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 96, 384); - } - - set ScalingList8x8(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 96); - } - - get ScalingList16x16() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 480, 384); - } - - set ScalingList16x16(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 480); - } - - get ScalingList32x32() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 864, 128); - } - - set ScalingList32x32(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 864); - } - - get ScalingListDCCoef16x16() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 992, 6); - } - - set ScalingListDCCoef16x16(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 992); - } - - get ScalingListDCCoef32x32() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 998, 2); - } - - set ScalingListDCCoef32x32(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 998); - } -} - -export interface InitStdVideoH265ShortTermRefPicSetFlags { - inter_ref_pic_set_prediction_flag?: number; - delta_rps_sign?: number; -} - -export class StdVideoH265ShortTermRefPicSetFlags implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265ShortTermRefPicSetFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ShortTermRefPicSetFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSetFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ShortTermRefPicSetFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ShortTermRefPicSetFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSetFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.inter_ref_pic_set_prediction_flag !== undefined) this.inter_ref_pic_set_prediction_flag = data.inter_ref_pic_set_prediction_flag; - if (data.delta_rps_sign !== undefined) this.delta_rps_sign = data.delta_rps_sign; - } - } - - get inter_ref_pic_set_prediction_flag() { - return this.#view.getUint32(0, LE); - } - - set inter_ref_pic_set_prediction_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get delta_rps_sign() { - return this.#view.getUint32(4, LE); - } - - set delta_rps_sign(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitStdVideoH265ShortTermRefPicSet { - flags?: StdVideoH265ShortTermRefPicSetFlags; - delta_idx_minus1?: number; - use_delta_flag?: number; - abs_delta_rps_minus1?: number; - used_by_curr_pic_flag?: number; - used_by_curr_pic_s0_flag?: number; - used_by_curr_pic_s1_flag?: number; - reserved1?: number; - reserved2?: number; - reserved3?: number; - num_negative_pics?: number; - num_positive_pics?: number; - delta_poc_s0_minus1?: Uint16Array; - delta_poc_s1_minus1?: Uint16Array; -} - -export class StdVideoH265ShortTermRefPicSet implements BaseStruct { - static size = 92; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265ShortTermRefPicSet); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265ShortTermRefPicSet) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265ShortTermRefPicSet.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265ShortTermRefPicSet.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265ShortTermRefPicSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.delta_idx_minus1 !== undefined) this.delta_idx_minus1 = data.delta_idx_minus1; - if (data.use_delta_flag !== undefined) this.use_delta_flag = data.use_delta_flag; - if (data.abs_delta_rps_minus1 !== undefined) this.abs_delta_rps_minus1 = data.abs_delta_rps_minus1; - if (data.used_by_curr_pic_flag !== undefined) this.used_by_curr_pic_flag = data.used_by_curr_pic_flag; - if (data.used_by_curr_pic_s0_flag !== undefined) this.used_by_curr_pic_s0_flag = data.used_by_curr_pic_s0_flag; - if (data.used_by_curr_pic_s1_flag !== undefined) this.used_by_curr_pic_s1_flag = data.used_by_curr_pic_s1_flag; - if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; - if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; - if (data.reserved3 !== undefined) this.reserved3 = data.reserved3; - if (data.num_negative_pics !== undefined) this.num_negative_pics = data.num_negative_pics; - if (data.num_positive_pics !== undefined) this.num_positive_pics = data.num_positive_pics; - if (data.delta_poc_s0_minus1 !== undefined) this.delta_poc_s0_minus1 = data.delta_poc_s0_minus1; - if (data.delta_poc_s1_minus1 !== undefined) this.delta_poc_s1_minus1 = data.delta_poc_s1_minus1; - } - } - - get flags() { - return new StdVideoH265ShortTermRefPicSetFlags(this.#data.subarray(0, 0 + StdVideoH265ShortTermRefPicSetFlags.size)); - } - - set flags(value: StdVideoH265ShortTermRefPicSetFlags) { - if (value[BUFFER].byteLength < StdVideoH265ShortTermRefPicSetFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get delta_idx_minus1() { - return this.#view.getUint32(8, LE); - } - - set delta_idx_minus1(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get use_delta_flag() { - return this.#view.getUint16(12, LE); - } - - set use_delta_flag(value: number) { - this.#view.setUint16(12, Number(value), LE); - } - - get abs_delta_rps_minus1() { - return this.#view.getUint16(14, LE); - } - - set abs_delta_rps_minus1(value: number) { - this.#view.setUint16(14, Number(value), LE); - } - - get used_by_curr_pic_flag() { - return this.#view.getUint16(16, LE); - } - - set used_by_curr_pic_flag(value: number) { - this.#view.setUint16(16, Number(value), LE); - } - - get used_by_curr_pic_s0_flag() { - return this.#view.getUint16(18, LE); - } - - set used_by_curr_pic_s0_flag(value: number) { - this.#view.setUint16(18, Number(value), LE); - } - - get used_by_curr_pic_s1_flag() { - return this.#view.getUint16(20, LE); - } - - set used_by_curr_pic_s1_flag(value: number) { - this.#view.setUint16(20, Number(value), LE); - } - - get reserved1() { - return this.#view.getUint16(22, LE); - } - - set reserved1(value: number) { - this.#view.setUint16(22, Number(value), LE); - } - - get reserved2() { - return this.#view.getUint8(24); - } - - set reserved2(value: number) { - this.#view.setUint8(24, Number(value)); - } - - get reserved3() { - return this.#view.getUint8(25); - } - - set reserved3(value: number) { - this.#view.setUint8(25, Number(value)); - } - - get num_negative_pics() { - return this.#view.getUint8(26); - } - - set num_negative_pics(value: number) { - this.#view.setUint8(26, Number(value)); - } - - get num_positive_pics() { - return this.#view.getUint8(27); - } - - set num_positive_pics(value: number) { - this.#view.setUint8(27, Number(value)); - } - - get delta_poc_s0_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 28, 16); - } - - set delta_poc_s0_minus1(value: Uint16Array) { - this.#data.set(new Uint8Array(value.buffer), 28); - } - - get delta_poc_s1_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 60, 16); - } - - set delta_poc_s1_minus1(value: Uint16Array) { - this.#data.set(new Uint8Array(value.buffer), 60); - } -} - -export interface InitStdVideoH265LongTermRefPicsSps { - used_by_curr_pic_lt_sps_flag?: number; - lt_ref_pic_poc_lsb_sps?: Uint32Array; -} - -export class StdVideoH265LongTermRefPicsSps implements BaseStruct { - static size = 132; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265LongTermRefPicsSps); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265LongTermRefPicsSps) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265LongTermRefPicsSps.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265LongTermRefPicsSps.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265LongTermRefPicsSps.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265LongTermRefPicsSps.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.used_by_curr_pic_lt_sps_flag !== undefined) this.used_by_curr_pic_lt_sps_flag = data.used_by_curr_pic_lt_sps_flag; - if (data.lt_ref_pic_poc_lsb_sps !== undefined) this.lt_ref_pic_poc_lsb_sps = data.lt_ref_pic_poc_lsb_sps; - } - } - - get used_by_curr_pic_lt_sps_flag() { - return this.#view.getUint32(0, LE); - } - - set used_by_curr_pic_lt_sps_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get lt_ref_pic_poc_lsb_sps() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 4, 32); - } - - set lt_ref_pic_poc_lsb_sps(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 4); - } -} - -export interface InitStdVideoH265SpsVuiFlags { - aspect_ratio_info_present_flag?: number; - overscan_info_present_flag?: number; - overscan_appropriate_flag?: number; - video_signal_type_present_flag?: number; - video_full_range_flag?: number; - colour_description_present_flag?: number; - chroma_loc_info_present_flag?: number; - neutral_chroma_indication_flag?: number; - field_seq_flag?: number; - frame_field_info_present_flag?: number; - default_display_window_flag?: number; - vui_timing_info_present_flag?: number; - vui_poc_proportional_to_timing_flag?: number; - vui_hrd_parameters_present_flag?: number; - bitstream_restriction_flag?: number; - tiles_fixed_structure_flag?: number; - motion_vectors_over_pic_boundaries_flag?: number; - restricted_ref_pic_lists_flag?: number; -} - -export class StdVideoH265SpsVuiFlags implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265SpsVuiFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SpsVuiFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265SpsVuiFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SpsVuiFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SpsVuiFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265SpsVuiFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.aspect_ratio_info_present_flag !== undefined) this.aspect_ratio_info_present_flag = data.aspect_ratio_info_present_flag; - if (data.overscan_info_present_flag !== undefined) this.overscan_info_present_flag = data.overscan_info_present_flag; - if (data.overscan_appropriate_flag !== undefined) this.overscan_appropriate_flag = data.overscan_appropriate_flag; - if (data.video_signal_type_present_flag !== undefined) this.video_signal_type_present_flag = data.video_signal_type_present_flag; - if (data.video_full_range_flag !== undefined) this.video_full_range_flag = data.video_full_range_flag; - if (data.colour_description_present_flag !== undefined) this.colour_description_present_flag = data.colour_description_present_flag; - if (data.chroma_loc_info_present_flag !== undefined) this.chroma_loc_info_present_flag = data.chroma_loc_info_present_flag; - if (data.neutral_chroma_indication_flag !== undefined) this.neutral_chroma_indication_flag = data.neutral_chroma_indication_flag; - if (data.field_seq_flag !== undefined) this.field_seq_flag = data.field_seq_flag; - if (data.frame_field_info_present_flag !== undefined) this.frame_field_info_present_flag = data.frame_field_info_present_flag; - if (data.default_display_window_flag !== undefined) this.default_display_window_flag = data.default_display_window_flag; - if (data.vui_timing_info_present_flag !== undefined) this.vui_timing_info_present_flag = data.vui_timing_info_present_flag; - if (data.vui_poc_proportional_to_timing_flag !== undefined) this.vui_poc_proportional_to_timing_flag = data.vui_poc_proportional_to_timing_flag; - if (data.vui_hrd_parameters_present_flag !== undefined) this.vui_hrd_parameters_present_flag = data.vui_hrd_parameters_present_flag; - if (data.bitstream_restriction_flag !== undefined) this.bitstream_restriction_flag = data.bitstream_restriction_flag; - if (data.tiles_fixed_structure_flag !== undefined) this.tiles_fixed_structure_flag = data.tiles_fixed_structure_flag; - if (data.motion_vectors_over_pic_boundaries_flag !== undefined) this.motion_vectors_over_pic_boundaries_flag = data.motion_vectors_over_pic_boundaries_flag; - if (data.restricted_ref_pic_lists_flag !== undefined) this.restricted_ref_pic_lists_flag = data.restricted_ref_pic_lists_flag; - } - } - - get aspect_ratio_info_present_flag() { - return this.#view.getUint32(0, LE); - } - - set aspect_ratio_info_present_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get overscan_info_present_flag() { - return this.#view.getUint32(4, LE); - } - - set overscan_info_present_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get overscan_appropriate_flag() { - return this.#view.getUint32(8, LE); - } - - set overscan_appropriate_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get video_signal_type_present_flag() { - return this.#view.getUint32(12, LE); - } - - set video_signal_type_present_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get video_full_range_flag() { - return this.#view.getUint32(16, LE); - } - - set video_full_range_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get colour_description_present_flag() { - return this.#view.getUint32(20, LE); - } - - set colour_description_present_flag(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get chroma_loc_info_present_flag() { - return this.#view.getUint32(24, LE); - } - - set chroma_loc_info_present_flag(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get neutral_chroma_indication_flag() { - return this.#view.getUint32(28, LE); - } - - set neutral_chroma_indication_flag(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get field_seq_flag() { - return this.#view.getUint32(32, LE); - } - - set field_seq_flag(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get frame_field_info_present_flag() { - return this.#view.getUint32(36, LE); - } - - set frame_field_info_present_flag(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get default_display_window_flag() { - return this.#view.getUint32(40, LE); - } - - set default_display_window_flag(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get vui_timing_info_present_flag() { - return this.#view.getUint32(44, LE); - } - - set vui_timing_info_present_flag(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get vui_poc_proportional_to_timing_flag() { - return this.#view.getUint32(48, LE); - } - - set vui_poc_proportional_to_timing_flag(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get vui_hrd_parameters_present_flag() { - return this.#view.getUint32(52, LE); - } - - set vui_hrd_parameters_present_flag(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get bitstream_restriction_flag() { - return this.#view.getUint32(56, LE); - } - - set bitstream_restriction_flag(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get tiles_fixed_structure_flag() { - return this.#view.getUint32(60, LE); - } - - set tiles_fixed_structure_flag(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get motion_vectors_over_pic_boundaries_flag() { - return this.#view.getUint32(64, LE); - } - - set motion_vectors_over_pic_boundaries_flag(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get restricted_ref_pic_lists_flag() { - return this.#view.getUint32(68, LE); - } - - set restricted_ref_pic_lists_flag(value: number) { - this.#view.setUint32(68, Number(value), LE); - } -} - -export interface InitStdVideoH265SequenceParameterSetVui { - flags?: StdVideoH265SpsVuiFlags; - aspect_ratio_idc?: StdVideoH265AspectRatioIdc; - sar_width?: number; - sar_height?: number; - video_format?: number; - colour_primaries?: number; - transfer_characteristics?: number; - matrix_coeffs?: number; - chroma_sample_loc_type_top_field?: number; - chroma_sample_loc_type_bottom_field?: number; - reserved1?: number; - reserved2?: number; - def_disp_win_left_offset?: number; - def_disp_win_right_offset?: number; - def_disp_win_top_offset?: number; - def_disp_win_bottom_offset?: number; - vui_num_units_in_tick?: number; - vui_time_scale?: number; - vui_num_ticks_poc_diff_one_minus1?: number; - min_spatial_segmentation_idc?: number; - reserved3?: number; - max_bytes_per_pic_denom?: number; - max_bits_per_min_cu_denom?: number; - log2_max_mv_length_horizontal?: number; - log2_max_mv_length_vertical?: number; - pHrdParameters?: AnyPointer; -} - -export class StdVideoH265SequenceParameterSetVui implements BaseStruct { - static size = 128; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265SequenceParameterSetVui); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SequenceParameterSetVui) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265SequenceParameterSetVui.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SequenceParameterSetVui.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SequenceParameterSetVui.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265SequenceParameterSetVui.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.aspect_ratio_idc !== undefined) this.aspect_ratio_idc = data.aspect_ratio_idc; - if (data.sar_width !== undefined) this.sar_width = data.sar_width; - if (data.sar_height !== undefined) this.sar_height = data.sar_height; - if (data.video_format !== undefined) this.video_format = data.video_format; - if (data.colour_primaries !== undefined) this.colour_primaries = data.colour_primaries; - if (data.transfer_characteristics !== undefined) this.transfer_characteristics = data.transfer_characteristics; - if (data.matrix_coeffs !== undefined) this.matrix_coeffs = data.matrix_coeffs; - if (data.chroma_sample_loc_type_top_field !== undefined) this.chroma_sample_loc_type_top_field = data.chroma_sample_loc_type_top_field; - if (data.chroma_sample_loc_type_bottom_field !== undefined) this.chroma_sample_loc_type_bottom_field = data.chroma_sample_loc_type_bottom_field; - if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; - if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; - if (data.def_disp_win_left_offset !== undefined) this.def_disp_win_left_offset = data.def_disp_win_left_offset; - if (data.def_disp_win_right_offset !== undefined) this.def_disp_win_right_offset = data.def_disp_win_right_offset; - if (data.def_disp_win_top_offset !== undefined) this.def_disp_win_top_offset = data.def_disp_win_top_offset; - if (data.def_disp_win_bottom_offset !== undefined) this.def_disp_win_bottom_offset = data.def_disp_win_bottom_offset; - if (data.vui_num_units_in_tick !== undefined) this.vui_num_units_in_tick = data.vui_num_units_in_tick; - if (data.vui_time_scale !== undefined) this.vui_time_scale = data.vui_time_scale; - if (data.vui_num_ticks_poc_diff_one_minus1 !== undefined) this.vui_num_ticks_poc_diff_one_minus1 = data.vui_num_ticks_poc_diff_one_minus1; - if (data.min_spatial_segmentation_idc !== undefined) this.min_spatial_segmentation_idc = data.min_spatial_segmentation_idc; - if (data.reserved3 !== undefined) this.reserved3 = data.reserved3; - if (data.max_bytes_per_pic_denom !== undefined) this.max_bytes_per_pic_denom = data.max_bytes_per_pic_denom; - if (data.max_bits_per_min_cu_denom !== undefined) this.max_bits_per_min_cu_denom = data.max_bits_per_min_cu_denom; - if (data.log2_max_mv_length_horizontal !== undefined) this.log2_max_mv_length_horizontal = data.log2_max_mv_length_horizontal; - if (data.log2_max_mv_length_vertical !== undefined) this.log2_max_mv_length_vertical = data.log2_max_mv_length_vertical; - if (data.pHrdParameters !== undefined) this.pHrdParameters = data.pHrdParameters; - } - } - - get flags() { - return new StdVideoH265SpsVuiFlags(this.#data.subarray(0, 0 + StdVideoH265SpsVuiFlags.size)); - } - - set flags(value: StdVideoH265SpsVuiFlags) { - if (value[BUFFER].byteLength < StdVideoH265SpsVuiFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get aspect_ratio_idc() { - return this.#view.getUint32(72, LE); - } - - set aspect_ratio_idc(value: StdVideoH265AspectRatioIdc) { - this.#view.setUint32(72, Number(value), LE); - } - - get sar_width() { - return this.#view.getUint16(76, LE); - } - - set sar_width(value: number) { - this.#view.setUint16(76, Number(value), LE); - } - - get sar_height() { - return this.#view.getUint16(78, LE); - } - - set sar_height(value: number) { - this.#view.setUint16(78, Number(value), LE); - } - - get video_format() { - return this.#view.getUint8(80); - } - - set video_format(value: number) { - this.#view.setUint8(80, Number(value)); - } - - get colour_primaries() { - return this.#view.getUint8(81); - } - - set colour_primaries(value: number) { - this.#view.setUint8(81, Number(value)); - } - - get transfer_characteristics() { - return this.#view.getUint8(82); - } - - set transfer_characteristics(value: number) { - this.#view.setUint8(82, Number(value)); - } - - get matrix_coeffs() { - return this.#view.getUint8(83); - } - - set matrix_coeffs(value: number) { - this.#view.setUint8(83, Number(value)); - } - - get chroma_sample_loc_type_top_field() { - return this.#view.getUint8(84); - } - - set chroma_sample_loc_type_top_field(value: number) { - this.#view.setUint8(84, Number(value)); - } - - get chroma_sample_loc_type_bottom_field() { - return this.#view.getUint8(85); - } - - set chroma_sample_loc_type_bottom_field(value: number) { - this.#view.setUint8(85, Number(value)); - } - - get reserved1() { - return this.#view.getUint8(86); - } - - set reserved1(value: number) { - this.#view.setUint8(86, Number(value)); - } - - get reserved2() { - return this.#view.getUint8(87); - } - - set reserved2(value: number) { - this.#view.setUint8(87, Number(value)); - } - - get def_disp_win_left_offset() { - return this.#view.getUint16(88, LE); - } - - set def_disp_win_left_offset(value: number) { - this.#view.setUint16(88, Number(value), LE); - } - - get def_disp_win_right_offset() { - return this.#view.getUint16(90, LE); - } - - set def_disp_win_right_offset(value: number) { - this.#view.setUint16(90, Number(value), LE); - } - - get def_disp_win_top_offset() { - return this.#view.getUint16(92, LE); - } - - set def_disp_win_top_offset(value: number) { - this.#view.setUint16(92, Number(value), LE); - } - - get def_disp_win_bottom_offset() { - return this.#view.getUint16(94, LE); - } - - set def_disp_win_bottom_offset(value: number) { - this.#view.setUint16(94, Number(value), LE); - } - - get vui_num_units_in_tick() { - return this.#view.getUint32(96, LE); - } - - set vui_num_units_in_tick(value: number) { - this.#view.setUint32(96, Number(value), LE); - } - - get vui_time_scale() { - return this.#view.getUint32(100, LE); - } - - set vui_time_scale(value: number) { - this.#view.setUint32(100, Number(value), LE); - } - - get vui_num_ticks_poc_diff_one_minus1() { - return this.#view.getUint32(104, LE); - } - - set vui_num_ticks_poc_diff_one_minus1(value: number) { - this.#view.setUint32(104, Number(value), LE); - } - - get min_spatial_segmentation_idc() { - return this.#view.getUint16(108, LE); - } - - set min_spatial_segmentation_idc(value: number) { - this.#view.setUint16(108, Number(value), LE); - } - - get reserved3() { - return this.#view.getUint16(110, LE); - } - - set reserved3(value: number) { - this.#view.setUint16(110, Number(value), LE); - } - - get max_bytes_per_pic_denom() { - return this.#view.getUint8(112); - } - - set max_bytes_per_pic_denom(value: number) { - this.#view.setUint8(112, Number(value)); - } - - get max_bits_per_min_cu_denom() { - return this.#view.getUint8(113); - } - - set max_bits_per_min_cu_denom(value: number) { - this.#view.setUint8(113, Number(value)); - } - - get log2_max_mv_length_horizontal() { - return this.#view.getUint8(114); - } - - set log2_max_mv_length_horizontal(value: number) { - this.#view.setUint8(114, Number(value)); - } - - get log2_max_mv_length_vertical() { - return this.#view.getUint8(115); - } - - set log2_max_mv_length_vertical(value: number) { - this.#view.setUint8(115, Number(value)); - } - - get pHrdParameters() { - return this.#view.getBigUint64(120, LE); - } - - set pHrdParameters(value: AnyPointer) { - this.#view.setBigUint64(120, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoH265PredictorPaletteEntries { - PredictorPaletteEntries?: Uint16Array; -} - -export class StdVideoH265PredictorPaletteEntries implements BaseStruct { - static size = 768; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265PredictorPaletteEntries); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265PredictorPaletteEntries) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265PredictorPaletteEntries.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265PredictorPaletteEntries.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265PredictorPaletteEntries.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265PredictorPaletteEntries.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.PredictorPaletteEntries !== undefined) this.PredictorPaletteEntries = data.PredictorPaletteEntries; - } - } - - get PredictorPaletteEntries() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 0, 384); - } - - set PredictorPaletteEntries(value: Uint16Array) { - this.#data.set(new Uint8Array(value.buffer), 0); - } -} - -export interface InitStdVideoH265SpsFlags { - sps_temporal_id_nesting_flag?: number; - separate_colour_plane_flag?: number; - conformance_window_flag?: number; - sps_sub_layer_ordering_info_present_flag?: number; - scaling_list_enabled_flag?: number; - sps_scaling_list_data_present_flag?: number; - amp_enabled_flag?: number; - sample_adaptive_offset_enabled_flag?: number; - pcm_enabled_flag?: number; - pcm_loop_filter_disabled_flag?: number; - long_term_ref_pics_present_flag?: number; - sps_temporal_mvp_enabled_flag?: number; - strong_intra_smoothing_enabled_flag?: number; - vui_parameters_present_flag?: number; - sps_extension_present_flag?: number; - sps_range_extension_flag?: number; - transform_skip_rotation_enabled_flag?: number; - transform_skip_context_enabled_flag?: number; - implicit_rdpcm_enabled_flag?: number; - explicit_rdpcm_enabled_flag?: number; - extended_precision_processing_flag?: number; - intra_smoothing_disabled_flag?: number; - high_precision_offsets_enabled_flag?: number; - persistent_rice_adaptation_enabled_flag?: number; - cabac_bypass_alignment_enabled_flag?: number; - sps_scc_extension_flag?: number; - sps_curr_pic_ref_enabled_flag?: number; - palette_mode_enabled_flag?: number; - sps_palette_predictor_initializers_present_flag?: number; - intra_boundary_filtering_disabled_flag?: number; -} - -export class StdVideoH265SpsFlags implements BaseStruct { - static size = 120; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265SpsFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SpsFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265SpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SpsFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265SpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.sps_temporal_id_nesting_flag !== undefined) this.sps_temporal_id_nesting_flag = data.sps_temporal_id_nesting_flag; - if (data.separate_colour_plane_flag !== undefined) this.separate_colour_plane_flag = data.separate_colour_plane_flag; - if (data.conformance_window_flag !== undefined) this.conformance_window_flag = data.conformance_window_flag; - if (data.sps_sub_layer_ordering_info_present_flag !== undefined) this.sps_sub_layer_ordering_info_present_flag = data.sps_sub_layer_ordering_info_present_flag; - if (data.scaling_list_enabled_flag !== undefined) this.scaling_list_enabled_flag = data.scaling_list_enabled_flag; - if (data.sps_scaling_list_data_present_flag !== undefined) this.sps_scaling_list_data_present_flag = data.sps_scaling_list_data_present_flag; - if (data.amp_enabled_flag !== undefined) this.amp_enabled_flag = data.amp_enabled_flag; - if (data.sample_adaptive_offset_enabled_flag !== undefined) this.sample_adaptive_offset_enabled_flag = data.sample_adaptive_offset_enabled_flag; - if (data.pcm_enabled_flag !== undefined) this.pcm_enabled_flag = data.pcm_enabled_flag; - if (data.pcm_loop_filter_disabled_flag !== undefined) this.pcm_loop_filter_disabled_flag = data.pcm_loop_filter_disabled_flag; - if (data.long_term_ref_pics_present_flag !== undefined) this.long_term_ref_pics_present_flag = data.long_term_ref_pics_present_flag; - if (data.sps_temporal_mvp_enabled_flag !== undefined) this.sps_temporal_mvp_enabled_flag = data.sps_temporal_mvp_enabled_flag; - if (data.strong_intra_smoothing_enabled_flag !== undefined) this.strong_intra_smoothing_enabled_flag = data.strong_intra_smoothing_enabled_flag; - if (data.vui_parameters_present_flag !== undefined) this.vui_parameters_present_flag = data.vui_parameters_present_flag; - if (data.sps_extension_present_flag !== undefined) this.sps_extension_present_flag = data.sps_extension_present_flag; - if (data.sps_range_extension_flag !== undefined) this.sps_range_extension_flag = data.sps_range_extension_flag; - if (data.transform_skip_rotation_enabled_flag !== undefined) this.transform_skip_rotation_enabled_flag = data.transform_skip_rotation_enabled_flag; - if (data.transform_skip_context_enabled_flag !== undefined) this.transform_skip_context_enabled_flag = data.transform_skip_context_enabled_flag; - if (data.implicit_rdpcm_enabled_flag !== undefined) this.implicit_rdpcm_enabled_flag = data.implicit_rdpcm_enabled_flag; - if (data.explicit_rdpcm_enabled_flag !== undefined) this.explicit_rdpcm_enabled_flag = data.explicit_rdpcm_enabled_flag; - if (data.extended_precision_processing_flag !== undefined) this.extended_precision_processing_flag = data.extended_precision_processing_flag; - if (data.intra_smoothing_disabled_flag !== undefined) this.intra_smoothing_disabled_flag = data.intra_smoothing_disabled_flag; - if (data.high_precision_offsets_enabled_flag !== undefined) this.high_precision_offsets_enabled_flag = data.high_precision_offsets_enabled_flag; - if (data.persistent_rice_adaptation_enabled_flag !== undefined) this.persistent_rice_adaptation_enabled_flag = data.persistent_rice_adaptation_enabled_flag; - if (data.cabac_bypass_alignment_enabled_flag !== undefined) this.cabac_bypass_alignment_enabled_flag = data.cabac_bypass_alignment_enabled_flag; - if (data.sps_scc_extension_flag !== undefined) this.sps_scc_extension_flag = data.sps_scc_extension_flag; - if (data.sps_curr_pic_ref_enabled_flag !== undefined) this.sps_curr_pic_ref_enabled_flag = data.sps_curr_pic_ref_enabled_flag; - if (data.palette_mode_enabled_flag !== undefined) this.palette_mode_enabled_flag = data.palette_mode_enabled_flag; - if (data.sps_palette_predictor_initializers_present_flag !== undefined) this.sps_palette_predictor_initializers_present_flag = data.sps_palette_predictor_initializers_present_flag; - if (data.intra_boundary_filtering_disabled_flag !== undefined) this.intra_boundary_filtering_disabled_flag = data.intra_boundary_filtering_disabled_flag; - } - } - - get sps_temporal_id_nesting_flag() { - return this.#view.getUint32(0, LE); - } - - set sps_temporal_id_nesting_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get separate_colour_plane_flag() { - return this.#view.getUint32(4, LE); - } - - set separate_colour_plane_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get conformance_window_flag() { - return this.#view.getUint32(8, LE); - } - - set conformance_window_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get sps_sub_layer_ordering_info_present_flag() { - return this.#view.getUint32(12, LE); - } - - set sps_sub_layer_ordering_info_present_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get scaling_list_enabled_flag() { - return this.#view.getUint32(16, LE); - } - - set scaling_list_enabled_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get sps_scaling_list_data_present_flag() { - return this.#view.getUint32(20, LE); - } - - set sps_scaling_list_data_present_flag(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get amp_enabled_flag() { - return this.#view.getUint32(24, LE); - } - - set amp_enabled_flag(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get sample_adaptive_offset_enabled_flag() { - return this.#view.getUint32(28, LE); - } - - set sample_adaptive_offset_enabled_flag(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get pcm_enabled_flag() { - return this.#view.getUint32(32, LE); - } - - set pcm_enabled_flag(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pcm_loop_filter_disabled_flag() { - return this.#view.getUint32(36, LE); - } - - set pcm_loop_filter_disabled_flag(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get long_term_ref_pics_present_flag() { - return this.#view.getUint32(40, LE); - } - - set long_term_ref_pics_present_flag(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get sps_temporal_mvp_enabled_flag() { - return this.#view.getUint32(44, LE); - } - - set sps_temporal_mvp_enabled_flag(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get strong_intra_smoothing_enabled_flag() { - return this.#view.getUint32(48, LE); - } - - set strong_intra_smoothing_enabled_flag(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get vui_parameters_present_flag() { - return this.#view.getUint32(52, LE); - } - - set vui_parameters_present_flag(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get sps_extension_present_flag() { - return this.#view.getUint32(56, LE); - } - - set sps_extension_present_flag(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get sps_range_extension_flag() { - return this.#view.getUint32(60, LE); - } - - set sps_range_extension_flag(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get transform_skip_rotation_enabled_flag() { - return this.#view.getUint32(64, LE); - } - - set transform_skip_rotation_enabled_flag(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get transform_skip_context_enabled_flag() { - return this.#view.getUint32(68, LE); - } - - set transform_skip_context_enabled_flag(value: number) { - this.#view.setUint32(68, Number(value), LE); - } - - get implicit_rdpcm_enabled_flag() { - return this.#view.getUint32(72, LE); - } - - set implicit_rdpcm_enabled_flag(value: number) { - this.#view.setUint32(72, Number(value), LE); - } - - get explicit_rdpcm_enabled_flag() { - return this.#view.getUint32(76, LE); - } - - set explicit_rdpcm_enabled_flag(value: number) { - this.#view.setUint32(76, Number(value), LE); - } - - get extended_precision_processing_flag() { - return this.#view.getUint32(80, LE); - } - - set extended_precision_processing_flag(value: number) { - this.#view.setUint32(80, Number(value), LE); - } - - get intra_smoothing_disabled_flag() { - return this.#view.getUint32(84, LE); - } - - set intra_smoothing_disabled_flag(value: number) { - this.#view.setUint32(84, Number(value), LE); - } - - get high_precision_offsets_enabled_flag() { - return this.#view.getUint32(88, LE); - } - - set high_precision_offsets_enabled_flag(value: number) { - this.#view.setUint32(88, Number(value), LE); - } - - get persistent_rice_adaptation_enabled_flag() { - return this.#view.getUint32(92, LE); - } - - set persistent_rice_adaptation_enabled_flag(value: number) { - this.#view.setUint32(92, Number(value), LE); - } - - get cabac_bypass_alignment_enabled_flag() { - return this.#view.getUint32(96, LE); - } - - set cabac_bypass_alignment_enabled_flag(value: number) { - this.#view.setUint32(96, Number(value), LE); - } - - get sps_scc_extension_flag() { - return this.#view.getUint32(100, LE); - } - - set sps_scc_extension_flag(value: number) { - this.#view.setUint32(100, Number(value), LE); - } - - get sps_curr_pic_ref_enabled_flag() { - return this.#view.getUint32(104, LE); - } - - set sps_curr_pic_ref_enabled_flag(value: number) { - this.#view.setUint32(104, Number(value), LE); - } - - get palette_mode_enabled_flag() { - return this.#view.getUint32(108, LE); - } - - set palette_mode_enabled_flag(value: number) { - this.#view.setUint32(108, Number(value), LE); - } - - get sps_palette_predictor_initializers_present_flag() { - return this.#view.getUint32(112, LE); - } - - set sps_palette_predictor_initializers_present_flag(value: number) { - this.#view.setUint32(112, Number(value), LE); - } - - get intra_boundary_filtering_disabled_flag() { - return this.#view.getUint32(116, LE); - } - - set intra_boundary_filtering_disabled_flag(value: number) { - this.#view.setUint32(116, Number(value), LE); - } -} - -export interface InitStdVideoH265SequenceParameterSet { - flags?: StdVideoH265SpsFlags; - chroma_format_idc?: StdVideoH265ChromaFormatIdc; - pic_width_in_luma_samples?: number; - pic_height_in_luma_samples?: number; - sps_video_parameter_set_id?: number; - sps_max_sub_layers_minus1?: number; - sps_seq_parameter_set_id?: number; - bit_depth_luma_minus8?: number; - bit_depth_chroma_minus8?: number; - log2_max_pic_order_cnt_lsb_minus4?: number; - log2_min_luma_coding_block_size_minus3?: number; - log2_diff_max_min_luma_coding_block_size?: number; - log2_min_luma_transform_block_size_minus2?: number; - log2_diff_max_min_luma_transform_block_size?: number; - max_transform_hierarchy_depth_inter?: number; - max_transform_hierarchy_depth_intra?: number; - num_short_term_ref_pic_sets?: number; - num_long_term_ref_pics_sps?: number; - pcm_sample_bit_depth_luma_minus1?: number; - pcm_sample_bit_depth_chroma_minus1?: number; - log2_min_pcm_luma_coding_block_size_minus3?: number; - log2_diff_max_min_pcm_luma_coding_block_size?: number; - reserved1?: number; - reserved2?: number; - palette_max_size?: number; - delta_palette_max_predictor_size?: number; - motion_vector_resolution_control_idc?: number; - sps_num_palette_predictor_initializers_minus1?: number; - conf_win_left_offset?: number; - conf_win_right_offset?: number; - conf_win_top_offset?: number; - conf_win_bottom_offset?: number; - pProfileTierLevel?: AnyPointer; - pDecPicBufMgr?: AnyPointer; - pScalingLists?: AnyPointer; - pShortTermRefPicSet?: AnyPointer; - pLongTermRefPicsSps?: AnyPointer; - pSequenceParameterSetVui?: AnyPointer; - pPredictorPaletteEntries?: AnyPointer; -} - -export class StdVideoH265SequenceParameterSet implements BaseStruct { - static size = 232; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265SequenceParameterSet); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265SequenceParameterSet) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265SequenceParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265SequenceParameterSet.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265SequenceParameterSet.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265SequenceParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.chroma_format_idc !== undefined) this.chroma_format_idc = data.chroma_format_idc; - if (data.pic_width_in_luma_samples !== undefined) this.pic_width_in_luma_samples = data.pic_width_in_luma_samples; - if (data.pic_height_in_luma_samples !== undefined) this.pic_height_in_luma_samples = data.pic_height_in_luma_samples; - if (data.sps_video_parameter_set_id !== undefined) this.sps_video_parameter_set_id = data.sps_video_parameter_set_id; - if (data.sps_max_sub_layers_minus1 !== undefined) this.sps_max_sub_layers_minus1 = data.sps_max_sub_layers_minus1; - if (data.sps_seq_parameter_set_id !== undefined) this.sps_seq_parameter_set_id = data.sps_seq_parameter_set_id; - if (data.bit_depth_luma_minus8 !== undefined) this.bit_depth_luma_minus8 = data.bit_depth_luma_minus8; - if (data.bit_depth_chroma_minus8 !== undefined) this.bit_depth_chroma_minus8 = data.bit_depth_chroma_minus8; - if (data.log2_max_pic_order_cnt_lsb_minus4 !== undefined) this.log2_max_pic_order_cnt_lsb_minus4 = data.log2_max_pic_order_cnt_lsb_minus4; - if (data.log2_min_luma_coding_block_size_minus3 !== undefined) this.log2_min_luma_coding_block_size_minus3 = data.log2_min_luma_coding_block_size_minus3; - if (data.log2_diff_max_min_luma_coding_block_size !== undefined) this.log2_diff_max_min_luma_coding_block_size = data.log2_diff_max_min_luma_coding_block_size; - if (data.log2_min_luma_transform_block_size_minus2 !== undefined) this.log2_min_luma_transform_block_size_minus2 = data.log2_min_luma_transform_block_size_minus2; - if (data.log2_diff_max_min_luma_transform_block_size !== undefined) this.log2_diff_max_min_luma_transform_block_size = data.log2_diff_max_min_luma_transform_block_size; - if (data.max_transform_hierarchy_depth_inter !== undefined) this.max_transform_hierarchy_depth_inter = data.max_transform_hierarchy_depth_inter; - if (data.max_transform_hierarchy_depth_intra !== undefined) this.max_transform_hierarchy_depth_intra = data.max_transform_hierarchy_depth_intra; - if (data.num_short_term_ref_pic_sets !== undefined) this.num_short_term_ref_pic_sets = data.num_short_term_ref_pic_sets; - if (data.num_long_term_ref_pics_sps !== undefined) this.num_long_term_ref_pics_sps = data.num_long_term_ref_pics_sps; - if (data.pcm_sample_bit_depth_luma_minus1 !== undefined) this.pcm_sample_bit_depth_luma_minus1 = data.pcm_sample_bit_depth_luma_minus1; - if (data.pcm_sample_bit_depth_chroma_minus1 !== undefined) this.pcm_sample_bit_depth_chroma_minus1 = data.pcm_sample_bit_depth_chroma_minus1; - if (data.log2_min_pcm_luma_coding_block_size_minus3 !== undefined) this.log2_min_pcm_luma_coding_block_size_minus3 = data.log2_min_pcm_luma_coding_block_size_minus3; - if (data.log2_diff_max_min_pcm_luma_coding_block_size !== undefined) this.log2_diff_max_min_pcm_luma_coding_block_size = data.log2_diff_max_min_pcm_luma_coding_block_size; - if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; - if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; - if (data.palette_max_size !== undefined) this.palette_max_size = data.palette_max_size; - if (data.delta_palette_max_predictor_size !== undefined) this.delta_palette_max_predictor_size = data.delta_palette_max_predictor_size; - if (data.motion_vector_resolution_control_idc !== undefined) this.motion_vector_resolution_control_idc = data.motion_vector_resolution_control_idc; - if (data.sps_num_palette_predictor_initializers_minus1 !== undefined) this.sps_num_palette_predictor_initializers_minus1 = data.sps_num_palette_predictor_initializers_minus1; - if (data.conf_win_left_offset !== undefined) this.conf_win_left_offset = data.conf_win_left_offset; - if (data.conf_win_right_offset !== undefined) this.conf_win_right_offset = data.conf_win_right_offset; - if (data.conf_win_top_offset !== undefined) this.conf_win_top_offset = data.conf_win_top_offset; - if (data.conf_win_bottom_offset !== undefined) this.conf_win_bottom_offset = data.conf_win_bottom_offset; - if (data.pProfileTierLevel !== undefined) this.pProfileTierLevel = data.pProfileTierLevel; - if (data.pDecPicBufMgr !== undefined) this.pDecPicBufMgr = data.pDecPicBufMgr; - if (data.pScalingLists !== undefined) this.pScalingLists = data.pScalingLists; - if (data.pShortTermRefPicSet !== undefined) this.pShortTermRefPicSet = data.pShortTermRefPicSet; - if (data.pLongTermRefPicsSps !== undefined) this.pLongTermRefPicsSps = data.pLongTermRefPicsSps; - if (data.pSequenceParameterSetVui !== undefined) this.pSequenceParameterSetVui = data.pSequenceParameterSetVui; - if (data.pPredictorPaletteEntries !== undefined) this.pPredictorPaletteEntries = data.pPredictorPaletteEntries; - } - } - - get flags() { - return new StdVideoH265SpsFlags(this.#data.subarray(0, 0 + StdVideoH265SpsFlags.size)); - } - - set flags(value: StdVideoH265SpsFlags) { - if (value[BUFFER].byteLength < StdVideoH265SpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get chroma_format_idc() { - return this.#view.getUint32(120, LE); - } - - set chroma_format_idc(value: StdVideoH265ChromaFormatIdc) { - this.#view.setUint32(120, Number(value), LE); - } - - get pic_width_in_luma_samples() { - return this.#view.getUint32(124, LE); - } - - set pic_width_in_luma_samples(value: number) { - this.#view.setUint32(124, Number(value), LE); - } - - get pic_height_in_luma_samples() { - return this.#view.getUint32(128, LE); - } - - set pic_height_in_luma_samples(value: number) { - this.#view.setUint32(128, Number(value), LE); - } - - get sps_video_parameter_set_id() { - return this.#view.getUint8(132); - } - - set sps_video_parameter_set_id(value: number) { - this.#view.setUint8(132, Number(value)); - } - - get sps_max_sub_layers_minus1() { - return this.#view.getUint8(133); - } - - set sps_max_sub_layers_minus1(value: number) { - this.#view.setUint8(133, Number(value)); - } - - get sps_seq_parameter_set_id() { - return this.#view.getUint8(134); - } - - set sps_seq_parameter_set_id(value: number) { - this.#view.setUint8(134, Number(value)); - } - - get bit_depth_luma_minus8() { - return this.#view.getUint8(135); - } - - set bit_depth_luma_minus8(value: number) { - this.#view.setUint8(135, Number(value)); - } - - get bit_depth_chroma_minus8() { - return this.#view.getUint8(136); - } - - set bit_depth_chroma_minus8(value: number) { - this.#view.setUint8(136, Number(value)); - } - - get log2_max_pic_order_cnt_lsb_minus4() { - return this.#view.getUint8(137); - } - - set log2_max_pic_order_cnt_lsb_minus4(value: number) { - this.#view.setUint8(137, Number(value)); - } - - get log2_min_luma_coding_block_size_minus3() { - return this.#view.getUint8(138); - } - - set log2_min_luma_coding_block_size_minus3(value: number) { - this.#view.setUint8(138, Number(value)); - } - - get log2_diff_max_min_luma_coding_block_size() { - return this.#view.getUint8(139); - } - - set log2_diff_max_min_luma_coding_block_size(value: number) { - this.#view.setUint8(139, Number(value)); - } - - get log2_min_luma_transform_block_size_minus2() { - return this.#view.getUint8(140); - } - - set log2_min_luma_transform_block_size_minus2(value: number) { - this.#view.setUint8(140, Number(value)); - } - - get log2_diff_max_min_luma_transform_block_size() { - return this.#view.getUint8(141); - } - - set log2_diff_max_min_luma_transform_block_size(value: number) { - this.#view.setUint8(141, Number(value)); - } - - get max_transform_hierarchy_depth_inter() { - return this.#view.getUint8(142); - } - - set max_transform_hierarchy_depth_inter(value: number) { - this.#view.setUint8(142, Number(value)); - } - - get max_transform_hierarchy_depth_intra() { - return this.#view.getUint8(143); - } - - set max_transform_hierarchy_depth_intra(value: number) { - this.#view.setUint8(143, Number(value)); - } - - get num_short_term_ref_pic_sets() { - return this.#view.getUint8(144); - } - - set num_short_term_ref_pic_sets(value: number) { - this.#view.setUint8(144, Number(value)); - } - - get num_long_term_ref_pics_sps() { - return this.#view.getUint8(145); - } - - set num_long_term_ref_pics_sps(value: number) { - this.#view.setUint8(145, Number(value)); - } - - get pcm_sample_bit_depth_luma_minus1() { - return this.#view.getUint8(146); - } - - set pcm_sample_bit_depth_luma_minus1(value: number) { - this.#view.setUint8(146, Number(value)); - } - - get pcm_sample_bit_depth_chroma_minus1() { - return this.#view.getUint8(147); - } - - set pcm_sample_bit_depth_chroma_minus1(value: number) { - this.#view.setUint8(147, Number(value)); - } - - get log2_min_pcm_luma_coding_block_size_minus3() { - return this.#view.getUint8(148); - } - - set log2_min_pcm_luma_coding_block_size_minus3(value: number) { - this.#view.setUint8(148, Number(value)); - } - - get log2_diff_max_min_pcm_luma_coding_block_size() { - return this.#view.getUint8(149); - } - - set log2_diff_max_min_pcm_luma_coding_block_size(value: number) { - this.#view.setUint8(149, Number(value)); - } - - get reserved1() { - return this.#view.getUint8(150); - } - - set reserved1(value: number) { - this.#view.setUint8(150, Number(value)); - } - - get reserved2() { - return this.#view.getUint8(151); - } - - set reserved2(value: number) { - this.#view.setUint8(151, Number(value)); - } - - get palette_max_size() { - return this.#view.getUint8(152); - } - - set palette_max_size(value: number) { - this.#view.setUint8(152, Number(value)); - } - - get delta_palette_max_predictor_size() { - return this.#view.getUint8(153); - } - - set delta_palette_max_predictor_size(value: number) { - this.#view.setUint8(153, Number(value)); - } - - get motion_vector_resolution_control_idc() { - return this.#view.getUint8(154); - } - - set motion_vector_resolution_control_idc(value: number) { - this.#view.setUint8(154, Number(value)); - } - - get sps_num_palette_predictor_initializers_minus1() { - return this.#view.getUint8(155); - } - - set sps_num_palette_predictor_initializers_minus1(value: number) { - this.#view.setUint8(155, Number(value)); - } - - get conf_win_left_offset() { - return this.#view.getUint32(156, LE); - } - - set conf_win_left_offset(value: number) { - this.#view.setUint32(156, Number(value), LE); - } - - get conf_win_right_offset() { - return this.#view.getUint32(160, LE); - } - - set conf_win_right_offset(value: number) { - this.#view.setUint32(160, Number(value), LE); - } - - get conf_win_top_offset() { - return this.#view.getUint32(164, LE); - } - - set conf_win_top_offset(value: number) { - this.#view.setUint32(164, Number(value), LE); - } - - get conf_win_bottom_offset() { - return this.#view.getUint32(168, LE); - } - - set conf_win_bottom_offset(value: number) { - this.#view.setUint32(168, Number(value), LE); - } - - get pProfileTierLevel() { - return this.#view.getBigUint64(176, LE); - } - - set pProfileTierLevel(value: AnyPointer) { - this.#view.setBigUint64(176, BigInt(anyPointer(value)), LE); - } - - get pDecPicBufMgr() { - return this.#view.getBigUint64(184, LE); - } - - set pDecPicBufMgr(value: AnyPointer) { - this.#view.setBigUint64(184, BigInt(anyPointer(value)), LE); - } - - get pScalingLists() { - return this.#view.getBigUint64(192, LE); - } - - set pScalingLists(value: AnyPointer) { - this.#view.setBigUint64(192, BigInt(anyPointer(value)), LE); - } - - get pShortTermRefPicSet() { - return this.#view.getBigUint64(200, LE); - } - - set pShortTermRefPicSet(value: AnyPointer) { - this.#view.setBigUint64(200, BigInt(anyPointer(value)), LE); - } - - get pLongTermRefPicsSps() { - return this.#view.getBigUint64(208, LE); - } - - set pLongTermRefPicsSps(value: AnyPointer) { - this.#view.setBigUint64(208, BigInt(anyPointer(value)), LE); - } - - get pSequenceParameterSetVui() { - return this.#view.getBigUint64(216, LE); - } - - set pSequenceParameterSetVui(value: AnyPointer) { - this.#view.setBigUint64(216, BigInt(anyPointer(value)), LE); - } - - get pPredictorPaletteEntries() { - return this.#view.getBigUint64(224, LE); - } - - set pPredictorPaletteEntries(value: AnyPointer) { - this.#view.setBigUint64(224, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoH265PpsFlags { - dependent_slice_segments_enabled_flag?: number; - output_flag_present_flag?: number; - sign_data_hiding_enabled_flag?: number; - cabac_init_present_flag?: number; - constrained_intra_pred_flag?: number; - transform_skip_enabled_flag?: number; - cu_qp_delta_enabled_flag?: number; - pps_slice_chroma_qp_offsets_present_flag?: number; - weighted_pred_flag?: number; - weighted_bipred_flag?: number; - transquant_bypass_enabled_flag?: number; - tiles_enabled_flag?: number; - entropy_coding_sync_enabled_flag?: number; - uniform_spacing_flag?: number; - loop_filter_across_tiles_enabled_flag?: number; - pps_loop_filter_across_slices_enabled_flag?: number; - deblocking_filter_control_present_flag?: number; - deblocking_filter_override_enabled_flag?: number; - pps_deblocking_filter_disabled_flag?: number; - pps_scaling_list_data_present_flag?: number; - lists_modification_present_flag?: number; - slice_segment_header_extension_present_flag?: number; - pps_extension_present_flag?: number; - cross_component_prediction_enabled_flag?: number; - chroma_qp_offset_list_enabled_flag?: number; - pps_curr_pic_ref_enabled_flag?: number; - residual_adaptive_colour_transform_enabled_flag?: number; - pps_slice_act_qp_offsets_present_flag?: number; - pps_palette_predictor_initializers_present_flag?: number; - monochrome_palette_flag?: number; - pps_range_extension_flag?: number; -} - -export class StdVideoH265PpsFlags implements BaseStruct { - static size = 124; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265PpsFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265PpsFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265PpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265PpsFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265PpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265PpsFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.dependent_slice_segments_enabled_flag !== undefined) this.dependent_slice_segments_enabled_flag = data.dependent_slice_segments_enabled_flag; - if (data.output_flag_present_flag !== undefined) this.output_flag_present_flag = data.output_flag_present_flag; - if (data.sign_data_hiding_enabled_flag !== undefined) this.sign_data_hiding_enabled_flag = data.sign_data_hiding_enabled_flag; - if (data.cabac_init_present_flag !== undefined) this.cabac_init_present_flag = data.cabac_init_present_flag; - if (data.constrained_intra_pred_flag !== undefined) this.constrained_intra_pred_flag = data.constrained_intra_pred_flag; - if (data.transform_skip_enabled_flag !== undefined) this.transform_skip_enabled_flag = data.transform_skip_enabled_flag; - if (data.cu_qp_delta_enabled_flag !== undefined) this.cu_qp_delta_enabled_flag = data.cu_qp_delta_enabled_flag; - if (data.pps_slice_chroma_qp_offsets_present_flag !== undefined) this.pps_slice_chroma_qp_offsets_present_flag = data.pps_slice_chroma_qp_offsets_present_flag; - if (data.weighted_pred_flag !== undefined) this.weighted_pred_flag = data.weighted_pred_flag; - if (data.weighted_bipred_flag !== undefined) this.weighted_bipred_flag = data.weighted_bipred_flag; - if (data.transquant_bypass_enabled_flag !== undefined) this.transquant_bypass_enabled_flag = data.transquant_bypass_enabled_flag; - if (data.tiles_enabled_flag !== undefined) this.tiles_enabled_flag = data.tiles_enabled_flag; - if (data.entropy_coding_sync_enabled_flag !== undefined) this.entropy_coding_sync_enabled_flag = data.entropy_coding_sync_enabled_flag; - if (data.uniform_spacing_flag !== undefined) this.uniform_spacing_flag = data.uniform_spacing_flag; - if (data.loop_filter_across_tiles_enabled_flag !== undefined) this.loop_filter_across_tiles_enabled_flag = data.loop_filter_across_tiles_enabled_flag; - if (data.pps_loop_filter_across_slices_enabled_flag !== undefined) this.pps_loop_filter_across_slices_enabled_flag = data.pps_loop_filter_across_slices_enabled_flag; - if (data.deblocking_filter_control_present_flag !== undefined) this.deblocking_filter_control_present_flag = data.deblocking_filter_control_present_flag; - if (data.deblocking_filter_override_enabled_flag !== undefined) this.deblocking_filter_override_enabled_flag = data.deblocking_filter_override_enabled_flag; - if (data.pps_deblocking_filter_disabled_flag !== undefined) this.pps_deblocking_filter_disabled_flag = data.pps_deblocking_filter_disabled_flag; - if (data.pps_scaling_list_data_present_flag !== undefined) this.pps_scaling_list_data_present_flag = data.pps_scaling_list_data_present_flag; - if (data.lists_modification_present_flag !== undefined) this.lists_modification_present_flag = data.lists_modification_present_flag; - if (data.slice_segment_header_extension_present_flag !== undefined) this.slice_segment_header_extension_present_flag = data.slice_segment_header_extension_present_flag; - if (data.pps_extension_present_flag !== undefined) this.pps_extension_present_flag = data.pps_extension_present_flag; - if (data.cross_component_prediction_enabled_flag !== undefined) this.cross_component_prediction_enabled_flag = data.cross_component_prediction_enabled_flag; - if (data.chroma_qp_offset_list_enabled_flag !== undefined) this.chroma_qp_offset_list_enabled_flag = data.chroma_qp_offset_list_enabled_flag; - if (data.pps_curr_pic_ref_enabled_flag !== undefined) this.pps_curr_pic_ref_enabled_flag = data.pps_curr_pic_ref_enabled_flag; - if (data.residual_adaptive_colour_transform_enabled_flag !== undefined) this.residual_adaptive_colour_transform_enabled_flag = data.residual_adaptive_colour_transform_enabled_flag; - if (data.pps_slice_act_qp_offsets_present_flag !== undefined) this.pps_slice_act_qp_offsets_present_flag = data.pps_slice_act_qp_offsets_present_flag; - if (data.pps_palette_predictor_initializers_present_flag !== undefined) this.pps_palette_predictor_initializers_present_flag = data.pps_palette_predictor_initializers_present_flag; - if (data.monochrome_palette_flag !== undefined) this.monochrome_palette_flag = data.monochrome_palette_flag; - if (data.pps_range_extension_flag !== undefined) this.pps_range_extension_flag = data.pps_range_extension_flag; - } - } - - get dependent_slice_segments_enabled_flag() { - return this.#view.getUint32(0, LE); - } - - set dependent_slice_segments_enabled_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get output_flag_present_flag() { - return this.#view.getUint32(4, LE); - } - - set output_flag_present_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get sign_data_hiding_enabled_flag() { - return this.#view.getUint32(8, LE); - } - - set sign_data_hiding_enabled_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get cabac_init_present_flag() { - return this.#view.getUint32(12, LE); - } - - set cabac_init_present_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get constrained_intra_pred_flag() { - return this.#view.getUint32(16, LE); - } - - set constrained_intra_pred_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get transform_skip_enabled_flag() { - return this.#view.getUint32(20, LE); - } - - set transform_skip_enabled_flag(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get cu_qp_delta_enabled_flag() { - return this.#view.getUint32(24, LE); - } - - set cu_qp_delta_enabled_flag(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pps_slice_chroma_qp_offsets_present_flag() { - return this.#view.getUint32(28, LE); - } - - set pps_slice_chroma_qp_offsets_present_flag(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get weighted_pred_flag() { - return this.#view.getUint32(32, LE); - } - - set weighted_pred_flag(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get weighted_bipred_flag() { - return this.#view.getUint32(36, LE); - } - - set weighted_bipred_flag(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get transquant_bypass_enabled_flag() { - return this.#view.getUint32(40, LE); - } - - set transquant_bypass_enabled_flag(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get tiles_enabled_flag() { - return this.#view.getUint32(44, LE); - } - - set tiles_enabled_flag(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get entropy_coding_sync_enabled_flag() { - return this.#view.getUint32(48, LE); - } - - set entropy_coding_sync_enabled_flag(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get uniform_spacing_flag() { - return this.#view.getUint32(52, LE); - } - - set uniform_spacing_flag(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get loop_filter_across_tiles_enabled_flag() { - return this.#view.getUint32(56, LE); - } - - set loop_filter_across_tiles_enabled_flag(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get pps_loop_filter_across_slices_enabled_flag() { - return this.#view.getUint32(60, LE); - } - - set pps_loop_filter_across_slices_enabled_flag(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get deblocking_filter_control_present_flag() { - return this.#view.getUint32(64, LE); - } - - set deblocking_filter_control_present_flag(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get deblocking_filter_override_enabled_flag() { - return this.#view.getUint32(68, LE); - } - - set deblocking_filter_override_enabled_flag(value: number) { - this.#view.setUint32(68, Number(value), LE); - } - - get pps_deblocking_filter_disabled_flag() { - return this.#view.getUint32(72, LE); - } - - set pps_deblocking_filter_disabled_flag(value: number) { - this.#view.setUint32(72, Number(value), LE); - } - - get pps_scaling_list_data_present_flag() { - return this.#view.getUint32(76, LE); - } - - set pps_scaling_list_data_present_flag(value: number) { - this.#view.setUint32(76, Number(value), LE); - } - - get lists_modification_present_flag() { - return this.#view.getUint32(80, LE); - } - - set lists_modification_present_flag(value: number) { - this.#view.setUint32(80, Number(value), LE); - } - - get slice_segment_header_extension_present_flag() { - return this.#view.getUint32(84, LE); - } - - set slice_segment_header_extension_present_flag(value: number) { - this.#view.setUint32(84, Number(value), LE); - } - - get pps_extension_present_flag() { - return this.#view.getUint32(88, LE); - } - - set pps_extension_present_flag(value: number) { - this.#view.setUint32(88, Number(value), LE); - } - - get cross_component_prediction_enabled_flag() { - return this.#view.getUint32(92, LE); - } - - set cross_component_prediction_enabled_flag(value: number) { - this.#view.setUint32(92, Number(value), LE); - } - - get chroma_qp_offset_list_enabled_flag() { - return this.#view.getUint32(96, LE); - } - - set chroma_qp_offset_list_enabled_flag(value: number) { - this.#view.setUint32(96, Number(value), LE); - } - - get pps_curr_pic_ref_enabled_flag() { - return this.#view.getUint32(100, LE); - } - - set pps_curr_pic_ref_enabled_flag(value: number) { - this.#view.setUint32(100, Number(value), LE); - } - - get residual_adaptive_colour_transform_enabled_flag() { - return this.#view.getUint32(104, LE); - } - - set residual_adaptive_colour_transform_enabled_flag(value: number) { - this.#view.setUint32(104, Number(value), LE); - } - - get pps_slice_act_qp_offsets_present_flag() { - return this.#view.getUint32(108, LE); - } - - set pps_slice_act_qp_offsets_present_flag(value: number) { - this.#view.setUint32(108, Number(value), LE); - } - - get pps_palette_predictor_initializers_present_flag() { - return this.#view.getUint32(112, LE); - } - - set pps_palette_predictor_initializers_present_flag(value: number) { - this.#view.setUint32(112, Number(value), LE); - } - - get monochrome_palette_flag() { - return this.#view.getUint32(116, LE); - } - - set monochrome_palette_flag(value: number) { - this.#view.setUint32(116, Number(value), LE); - } - - get pps_range_extension_flag() { - return this.#view.getUint32(120, LE); - } - - set pps_range_extension_flag(value: number) { - this.#view.setUint32(120, Number(value), LE); - } -} - -export interface InitStdVideoH265PictureParameterSet { - flags?: StdVideoH265PpsFlags; - pps_pic_parameter_set_id?: number; - pps_seq_parameter_set_id?: number; - sps_video_parameter_set_id?: number; - num_extra_slice_header_bits?: number; - num_ref_idx_l0_default_active_minus1?: number; - num_ref_idx_l1_default_active_minus1?: number; - init_qp_minus26?: number; - diff_cu_qp_delta_depth?: number; - pps_cb_qp_offset?: number; - pps_cr_qp_offset?: number; - pps_beta_offset_div2?: number; - pps_tc_offset_div2?: number; - log2_parallel_merge_level_minus2?: number; - log2_max_transform_skip_block_size_minus2?: number; - diff_cu_chroma_qp_offset_depth?: number; - chroma_qp_offset_list_len_minus1?: number; - cb_qp_offset_list?: Int8Array; - cr_qp_offset_list?: Int8Array; - log2_sao_offset_scale_luma?: number; - log2_sao_offset_scale_chroma?: number; - pps_act_y_qp_offset_plus5?: number; - pps_act_cb_qp_offset_plus5?: number; - pps_act_cr_qp_offset_plus3?: number; - pps_num_palette_predictor_initializers?: number; - luma_bit_depth_entry_minus8?: number; - chroma_bit_depth_entry_minus8?: number; - num_tile_columns_minus1?: number; - num_tile_rows_minus1?: number; - reserved1?: number; - reserved2?: number; - column_width_minus1?: Uint16Array; - row_height_minus1?: Uint16Array; - reserved3?: number; - pScalingLists?: AnyPointer; - pPredictorPaletteEntries?: AnyPointer; -} - -export class StdVideoH265PictureParameterSet implements BaseStruct { - static size = 264; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoH265PictureParameterSet); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoH265PictureParameterSet) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoH265PictureParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoH265PictureParameterSet.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoH265PictureParameterSet.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoH265PictureParameterSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.pps_pic_parameter_set_id !== undefined) this.pps_pic_parameter_set_id = data.pps_pic_parameter_set_id; - if (data.pps_seq_parameter_set_id !== undefined) this.pps_seq_parameter_set_id = data.pps_seq_parameter_set_id; - if (data.sps_video_parameter_set_id !== undefined) this.sps_video_parameter_set_id = data.sps_video_parameter_set_id; - if (data.num_extra_slice_header_bits !== undefined) this.num_extra_slice_header_bits = data.num_extra_slice_header_bits; - if (data.num_ref_idx_l0_default_active_minus1 !== undefined) this.num_ref_idx_l0_default_active_minus1 = data.num_ref_idx_l0_default_active_minus1; - if (data.num_ref_idx_l1_default_active_minus1 !== undefined) this.num_ref_idx_l1_default_active_minus1 = data.num_ref_idx_l1_default_active_minus1; - if (data.init_qp_minus26 !== undefined) this.init_qp_minus26 = data.init_qp_minus26; - if (data.diff_cu_qp_delta_depth !== undefined) this.diff_cu_qp_delta_depth = data.diff_cu_qp_delta_depth; - if (data.pps_cb_qp_offset !== undefined) this.pps_cb_qp_offset = data.pps_cb_qp_offset; - if (data.pps_cr_qp_offset !== undefined) this.pps_cr_qp_offset = data.pps_cr_qp_offset; - if (data.pps_beta_offset_div2 !== undefined) this.pps_beta_offset_div2 = data.pps_beta_offset_div2; - if (data.pps_tc_offset_div2 !== undefined) this.pps_tc_offset_div2 = data.pps_tc_offset_div2; - if (data.log2_parallel_merge_level_minus2 !== undefined) this.log2_parallel_merge_level_minus2 = data.log2_parallel_merge_level_minus2; - if (data.log2_max_transform_skip_block_size_minus2 !== undefined) this.log2_max_transform_skip_block_size_minus2 = data.log2_max_transform_skip_block_size_minus2; - if (data.diff_cu_chroma_qp_offset_depth !== undefined) this.diff_cu_chroma_qp_offset_depth = data.diff_cu_chroma_qp_offset_depth; - if (data.chroma_qp_offset_list_len_minus1 !== undefined) this.chroma_qp_offset_list_len_minus1 = data.chroma_qp_offset_list_len_minus1; - if (data.cb_qp_offset_list !== undefined) this.cb_qp_offset_list = data.cb_qp_offset_list; - if (data.cr_qp_offset_list !== undefined) this.cr_qp_offset_list = data.cr_qp_offset_list; - if (data.log2_sao_offset_scale_luma !== undefined) this.log2_sao_offset_scale_luma = data.log2_sao_offset_scale_luma; - if (data.log2_sao_offset_scale_chroma !== undefined) this.log2_sao_offset_scale_chroma = data.log2_sao_offset_scale_chroma; - if (data.pps_act_y_qp_offset_plus5 !== undefined) this.pps_act_y_qp_offset_plus5 = data.pps_act_y_qp_offset_plus5; - if (data.pps_act_cb_qp_offset_plus5 !== undefined) this.pps_act_cb_qp_offset_plus5 = data.pps_act_cb_qp_offset_plus5; - if (data.pps_act_cr_qp_offset_plus3 !== undefined) this.pps_act_cr_qp_offset_plus3 = data.pps_act_cr_qp_offset_plus3; - if (data.pps_num_palette_predictor_initializers !== undefined) this.pps_num_palette_predictor_initializers = data.pps_num_palette_predictor_initializers; - if (data.luma_bit_depth_entry_minus8 !== undefined) this.luma_bit_depth_entry_minus8 = data.luma_bit_depth_entry_minus8; - if (data.chroma_bit_depth_entry_minus8 !== undefined) this.chroma_bit_depth_entry_minus8 = data.chroma_bit_depth_entry_minus8; - if (data.num_tile_columns_minus1 !== undefined) this.num_tile_columns_minus1 = data.num_tile_columns_minus1; - if (data.num_tile_rows_minus1 !== undefined) this.num_tile_rows_minus1 = data.num_tile_rows_minus1; - if (data.reserved1 !== undefined) this.reserved1 = data.reserved1; - if (data.reserved2 !== undefined) this.reserved2 = data.reserved2; - if (data.column_width_minus1 !== undefined) this.column_width_minus1 = data.column_width_minus1; - if (data.row_height_minus1 !== undefined) this.row_height_minus1 = data.row_height_minus1; - if (data.reserved3 !== undefined) this.reserved3 = data.reserved3; - if (data.pScalingLists !== undefined) this.pScalingLists = data.pScalingLists; - if (data.pPredictorPaletteEntries !== undefined) this.pPredictorPaletteEntries = data.pPredictorPaletteEntries; - } - } - - get flags() { - return new StdVideoH265PpsFlags(this.#data.subarray(0, 0 + StdVideoH265PpsFlags.size)); - } - - set flags(value: StdVideoH265PpsFlags) { - if (value[BUFFER].byteLength < StdVideoH265PpsFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get pps_pic_parameter_set_id() { - return this.#view.getUint8(124); - } - - set pps_pic_parameter_set_id(value: number) { - this.#view.setUint8(124, Number(value)); - } - - get pps_seq_parameter_set_id() { - return this.#view.getUint8(125); - } - - set pps_seq_parameter_set_id(value: number) { - this.#view.setUint8(125, Number(value)); - } - - get sps_video_parameter_set_id() { - return this.#view.getUint8(126); - } - - set sps_video_parameter_set_id(value: number) { - this.#view.setUint8(126, Number(value)); - } - - get num_extra_slice_header_bits() { - return this.#view.getUint8(127); - } - - set num_extra_slice_header_bits(value: number) { - this.#view.setUint8(127, Number(value)); - } - - get num_ref_idx_l0_default_active_minus1() { - return this.#view.getUint8(128); - } - - set num_ref_idx_l0_default_active_minus1(value: number) { - this.#view.setUint8(128, Number(value)); - } - - get num_ref_idx_l1_default_active_minus1() { - return this.#view.getUint8(129); - } - - set num_ref_idx_l1_default_active_minus1(value: number) { - this.#view.setUint8(129, Number(value)); - } - - get init_qp_minus26() { - return this.#view.getInt8(130); - } - - set init_qp_minus26(value: number) { - this.#view.setInt8(130, Number(value)); - } - - get diff_cu_qp_delta_depth() { - return this.#view.getUint8(131); - } - - set diff_cu_qp_delta_depth(value: number) { - this.#view.setUint8(131, Number(value)); - } - - get pps_cb_qp_offset() { - return this.#view.getInt8(132); - } - - set pps_cb_qp_offset(value: number) { - this.#view.setInt8(132, Number(value)); - } - - get pps_cr_qp_offset() { - return this.#view.getInt8(133); - } - - set pps_cr_qp_offset(value: number) { - this.#view.setInt8(133, Number(value)); - } - - get pps_beta_offset_div2() { - return this.#view.getInt8(134); - } - - set pps_beta_offset_div2(value: number) { - this.#view.setInt8(134, Number(value)); - } - - get pps_tc_offset_div2() { - return this.#view.getInt8(135); - } - - set pps_tc_offset_div2(value: number) { - this.#view.setInt8(135, Number(value)); - } - - get log2_parallel_merge_level_minus2() { - return this.#view.getUint8(136); - } - - set log2_parallel_merge_level_minus2(value: number) { - this.#view.setUint8(136, Number(value)); - } - - get log2_max_transform_skip_block_size_minus2() { - return this.#view.getUint8(137); - } - - set log2_max_transform_skip_block_size_minus2(value: number) { - this.#view.setUint8(137, Number(value)); - } - - get diff_cu_chroma_qp_offset_depth() { - return this.#view.getUint8(138); - } - - set diff_cu_chroma_qp_offset_depth(value: number) { - this.#view.setUint8(138, Number(value)); - } - - get chroma_qp_offset_list_len_minus1() { - return this.#view.getUint8(139); - } - - set chroma_qp_offset_list_len_minus1(value: number) { - this.#view.setUint8(139, Number(value)); - } - - get cb_qp_offset_list() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 140, 6); - } - - set cb_qp_offset_list(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 140); - } - - get cr_qp_offset_list() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 146, 6); - } - - set cr_qp_offset_list(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 146); - } - - get log2_sao_offset_scale_luma() { - return this.#view.getUint8(152); - } - - set log2_sao_offset_scale_luma(value: number) { - this.#view.setUint8(152, Number(value)); - } - - get log2_sao_offset_scale_chroma() { - return this.#view.getUint8(153); - } - - set log2_sao_offset_scale_chroma(value: number) { - this.#view.setUint8(153, Number(value)); - } - - get pps_act_y_qp_offset_plus5() { - return this.#view.getInt8(154); - } - - set pps_act_y_qp_offset_plus5(value: number) { - this.#view.setInt8(154, Number(value)); - } - - get pps_act_cb_qp_offset_plus5() { - return this.#view.getInt8(155); - } - - set pps_act_cb_qp_offset_plus5(value: number) { - this.#view.setInt8(155, Number(value)); - } - - get pps_act_cr_qp_offset_plus3() { - return this.#view.getInt8(156); - } - - set pps_act_cr_qp_offset_plus3(value: number) { - this.#view.setInt8(156, Number(value)); - } - - get pps_num_palette_predictor_initializers() { - return this.#view.getUint8(157); - } - - set pps_num_palette_predictor_initializers(value: number) { - this.#view.setUint8(157, Number(value)); - } - - get luma_bit_depth_entry_minus8() { - return this.#view.getUint8(158); - } - - set luma_bit_depth_entry_minus8(value: number) { - this.#view.setUint8(158, Number(value)); - } - - get chroma_bit_depth_entry_minus8() { - return this.#view.getUint8(159); - } - - set chroma_bit_depth_entry_minus8(value: number) { - this.#view.setUint8(159, Number(value)); - } - - get num_tile_columns_minus1() { - return this.#view.getUint8(160); - } - - set num_tile_columns_minus1(value: number) { - this.#view.setUint8(160, Number(value)); - } - - get num_tile_rows_minus1() { - return this.#view.getUint8(161); - } - - set num_tile_rows_minus1(value: number) { - this.#view.setUint8(161, Number(value)); - } - - get reserved1() { - return this.#view.getUint8(162); - } - - set reserved1(value: number) { - this.#view.setUint8(162, Number(value)); - } - - get reserved2() { - return this.#view.getUint8(163); - } - - set reserved2(value: number) { - this.#view.setUint8(163, Number(value)); - } - - get column_width_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 164, 19); - } - - set column_width_minus1(value: Uint16Array) { - this.#data.set(new Uint8Array(value.buffer), 164); - } - - get row_height_minus1() { - return new Uint16Array(this.#data.buffer, this.#data.byteOffset + 202, 21); - } - - set row_height_minus1(value: Uint16Array) { - this.#data.set(new Uint8Array(value.buffer), 202); - } - - get reserved3() { - return this.#view.getUint32(244, LE); - } - - set reserved3(value: number) { - this.#view.setUint32(244, Number(value), LE); - } - - get pScalingLists() { - return this.#view.getBigUint64(248, LE); - } - - set pScalingLists(value: AnyPointer) { - this.#view.setBigUint64(248, BigInt(anyPointer(value)), LE); - } - - get pPredictorPaletteEntries() { - return this.#view.getBigUint64(256, LE); - } - - set pPredictorPaletteEntries(value: AnyPointer) { - this.#view.setBigUint64(256, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoDecodeH265PictureInfoFlags { - IrapPicFlag?: number; - IdrPicFlag?: number; - IsReference?: number; - short_term_ref_pic_set_sps_flag?: number; -} - -export class StdVideoDecodeH265PictureInfoFlags implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoDecodeH265PictureInfoFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH265PictureInfoFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoDecodeH265PictureInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265PictureInfoFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH265PictureInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoDecodeH265PictureInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.IrapPicFlag !== undefined) this.IrapPicFlag = data.IrapPicFlag; - if (data.IdrPicFlag !== undefined) this.IdrPicFlag = data.IdrPicFlag; - if (data.IsReference !== undefined) this.IsReference = data.IsReference; - if (data.short_term_ref_pic_set_sps_flag !== undefined) this.short_term_ref_pic_set_sps_flag = data.short_term_ref_pic_set_sps_flag; - } - } - - get IrapPicFlag() { - return this.#view.getUint32(0, LE); - } - - set IrapPicFlag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get IdrPicFlag() { - return this.#view.getUint32(4, LE); - } - - set IdrPicFlag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get IsReference() { - return this.#view.getUint32(8, LE); - } - - set IsReference(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get short_term_ref_pic_set_sps_flag() { - return this.#view.getUint32(12, LE); - } - - set short_term_ref_pic_set_sps_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitStdVideoDecodeH265PictureInfo { - flags?: StdVideoDecodeH265PictureInfoFlags; - sps_video_parameter_set_id?: number; - pps_seq_parameter_set_id?: number; - pps_pic_parameter_set_id?: number; - NumDeltaPocsOfRefRpsIdx?: number; - PicOrderCntVal?: number; - NumBitsForSTRefPicSetInSlice?: number; - reserved?: number; - RefPicSetStCurrBefore?: Uint8Array; - RefPicSetStCurrAfter?: Uint8Array; - RefPicSetLtCurr?: Uint8Array; -} - -export class StdVideoDecodeH265PictureInfo implements BaseStruct { - static size = 52; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoDecodeH265PictureInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH265PictureInfo) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoDecodeH265PictureInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265PictureInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH265PictureInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoDecodeH265PictureInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.sps_video_parameter_set_id !== undefined) this.sps_video_parameter_set_id = data.sps_video_parameter_set_id; - if (data.pps_seq_parameter_set_id !== undefined) this.pps_seq_parameter_set_id = data.pps_seq_parameter_set_id; - if (data.pps_pic_parameter_set_id !== undefined) this.pps_pic_parameter_set_id = data.pps_pic_parameter_set_id; - if (data.NumDeltaPocsOfRefRpsIdx !== undefined) this.NumDeltaPocsOfRefRpsIdx = data.NumDeltaPocsOfRefRpsIdx; - if (data.PicOrderCntVal !== undefined) this.PicOrderCntVal = data.PicOrderCntVal; - if (data.NumBitsForSTRefPicSetInSlice !== undefined) this.NumBitsForSTRefPicSetInSlice = data.NumBitsForSTRefPicSetInSlice; - if (data.reserved !== undefined) this.reserved = data.reserved; - if (data.RefPicSetStCurrBefore !== undefined) this.RefPicSetStCurrBefore = data.RefPicSetStCurrBefore; - if (data.RefPicSetStCurrAfter !== undefined) this.RefPicSetStCurrAfter = data.RefPicSetStCurrAfter; - if (data.RefPicSetLtCurr !== undefined) this.RefPicSetLtCurr = data.RefPicSetLtCurr; - } - } - - get flags() { - return new StdVideoDecodeH265PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH265PictureInfoFlags.size)); - } - - set flags(value: StdVideoDecodeH265PictureInfoFlags) { - if (value[BUFFER].byteLength < StdVideoDecodeH265PictureInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get sps_video_parameter_set_id() { - return this.#view.getUint8(16); - } - - set sps_video_parameter_set_id(value: number) { - this.#view.setUint8(16, Number(value)); - } - - get pps_seq_parameter_set_id() { - return this.#view.getUint8(17); - } - - set pps_seq_parameter_set_id(value: number) { - this.#view.setUint8(17, Number(value)); - } - - get pps_pic_parameter_set_id() { - return this.#view.getUint8(18); - } - - set pps_pic_parameter_set_id(value: number) { - this.#view.setUint8(18, Number(value)); - } - - get NumDeltaPocsOfRefRpsIdx() { - return this.#view.getUint8(19); - } - - set NumDeltaPocsOfRefRpsIdx(value: number) { - this.#view.setUint8(19, Number(value)); - } - - get PicOrderCntVal() { - return this.#view.getInt32(20, LE); - } - - set PicOrderCntVal(value: number) { - this.#view.setInt32(20, Number(value), LE); - } - - get NumBitsForSTRefPicSetInSlice() { - return this.#view.getUint16(24, LE); - } - - set NumBitsForSTRefPicSetInSlice(value: number) { - this.#view.setUint16(24, Number(value), LE); - } - - get reserved() { - return this.#view.getUint16(26, LE); - } - - set reserved(value: number) { - this.#view.setUint16(26, Number(value), LE); - } - - get RefPicSetStCurrBefore() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 28, 8); - } - - set RefPicSetStCurrBefore(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 28); - } - - get RefPicSetStCurrAfter() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 36, 8); - } - - set RefPicSetStCurrAfter(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 36); - } - - get RefPicSetLtCurr() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 44, 8); - } - - set RefPicSetLtCurr(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 44); - } -} - -export interface InitStdVideoDecodeH265ReferenceInfoFlags { - used_for_long_term_reference?: number; - unused_for_reference?: number; -} - -export class StdVideoDecodeH265ReferenceInfoFlags implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoDecodeH265ReferenceInfoFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH265ReferenceInfoFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265ReferenceInfoFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH265ReferenceInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; - if (data.unused_for_reference !== undefined) this.unused_for_reference = data.unused_for_reference; - } - } - - get used_for_long_term_reference() { - return this.#view.getUint32(0, LE); - } - - set used_for_long_term_reference(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get unused_for_reference() { - return this.#view.getUint32(4, LE); - } - - set unused_for_reference(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitStdVideoDecodeH265ReferenceInfo { - flags?: StdVideoDecodeH265ReferenceInfoFlags; - PicOrderCntVal?: number; -} - -export class StdVideoDecodeH265ReferenceInfo implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoDecodeH265ReferenceInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoDecodeH265ReferenceInfo) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoDecodeH265ReferenceInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoDecodeH265ReferenceInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoDecodeH265ReferenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.PicOrderCntVal !== undefined) this.PicOrderCntVal = data.PicOrderCntVal; - } - } - - get flags() { - return new StdVideoDecodeH265ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoDecodeH265ReferenceInfoFlags.size)); - } - - set flags(value: StdVideoDecodeH265ReferenceInfoFlags) { - if (value[BUFFER].byteLength < StdVideoDecodeH265ReferenceInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get PicOrderCntVal() { - return this.#view.getInt32(8, LE); - } - - set PicOrderCntVal(value: number) { - this.#view.setInt32(8, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH265WeightTableFlags { - luma_weight_l0_flag?: number; - chroma_weight_l0_flag?: number; - luma_weight_l1_flag?: number; - chroma_weight_l1_flag?: number; -} - -export class StdVideoEncodeH265WeightTableFlags implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265WeightTableFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265WeightTableFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265WeightTableFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265WeightTableFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265WeightTableFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265WeightTableFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.luma_weight_l0_flag !== undefined) this.luma_weight_l0_flag = data.luma_weight_l0_flag; - if (data.chroma_weight_l0_flag !== undefined) this.chroma_weight_l0_flag = data.chroma_weight_l0_flag; - if (data.luma_weight_l1_flag !== undefined) this.luma_weight_l1_flag = data.luma_weight_l1_flag; - if (data.chroma_weight_l1_flag !== undefined) this.chroma_weight_l1_flag = data.chroma_weight_l1_flag; - } - } - - get luma_weight_l0_flag() { - return this.#view.getUint16(0, LE); - } - - set luma_weight_l0_flag(value: number) { - this.#view.setUint16(0, Number(value), LE); - } - - get chroma_weight_l0_flag() { - return this.#view.getUint16(2, LE); - } - - set chroma_weight_l0_flag(value: number) { - this.#view.setUint16(2, Number(value), LE); - } - - get luma_weight_l1_flag() { - return this.#view.getUint16(4, LE); - } - - set luma_weight_l1_flag(value: number) { - this.#view.setUint16(4, Number(value), LE); - } - - get chroma_weight_l1_flag() { - return this.#view.getUint16(6, LE); - } - - set chroma_weight_l1_flag(value: number) { - this.#view.setUint16(6, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH265WeightTable { - flags?: StdVideoEncodeH265WeightTableFlags; - luma_log2_weight_denom?: number; - delta_chroma_log2_weight_denom?: number; - delta_luma_weight_l0?: Int8Array; - luma_offset_l0?: Int8Array; - delta_chroma_weight_l0?: Int8Array; - delta_chroma_offset_l0?: Int8Array; - delta_luma_weight_l1?: Int8Array; - luma_offset_l1?: Int8Array; - delta_chroma_weight_l1?: Int8Array; - delta_chroma_offset_l1?: Int8Array; -} - -export class StdVideoEncodeH265WeightTable implements BaseStruct { - static size = 190; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265WeightTable); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265WeightTable) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265WeightTable.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265WeightTable.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265WeightTable.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265WeightTable.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.luma_log2_weight_denom !== undefined) this.luma_log2_weight_denom = data.luma_log2_weight_denom; - if (data.delta_chroma_log2_weight_denom !== undefined) this.delta_chroma_log2_weight_denom = data.delta_chroma_log2_weight_denom; - if (data.delta_luma_weight_l0 !== undefined) this.delta_luma_weight_l0 = data.delta_luma_weight_l0; - if (data.luma_offset_l0 !== undefined) this.luma_offset_l0 = data.luma_offset_l0; - if (data.delta_chroma_weight_l0 !== undefined) this.delta_chroma_weight_l0 = data.delta_chroma_weight_l0; - if (data.delta_chroma_offset_l0 !== undefined) this.delta_chroma_offset_l0 = data.delta_chroma_offset_l0; - if (data.delta_luma_weight_l1 !== undefined) this.delta_luma_weight_l1 = data.delta_luma_weight_l1; - if (data.luma_offset_l1 !== undefined) this.luma_offset_l1 = data.luma_offset_l1; - if (data.delta_chroma_weight_l1 !== undefined) this.delta_chroma_weight_l1 = data.delta_chroma_weight_l1; - if (data.delta_chroma_offset_l1 !== undefined) this.delta_chroma_offset_l1 = data.delta_chroma_offset_l1; - } - } - - get flags() { - return new StdVideoEncodeH265WeightTableFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265WeightTableFlags.size)); - } - - set flags(value: StdVideoEncodeH265WeightTableFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH265WeightTableFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get luma_log2_weight_denom() { - return this.#view.getUint8(8); - } - - set luma_log2_weight_denom(value: number) { - this.#view.setUint8(8, Number(value)); - } - - get delta_chroma_log2_weight_denom() { - return this.#view.getInt8(9); - } - - set delta_chroma_log2_weight_denom(value: number) { - this.#view.setInt8(9, Number(value)); - } - - get delta_luma_weight_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 10, 15); - } - - set delta_luma_weight_l0(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 10); - } - - get luma_offset_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 25, 15); - } - - set luma_offset_l0(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 25); - } - - get delta_chroma_weight_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 40, 30); - } - - set delta_chroma_weight_l0(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 40); - } - - get delta_chroma_offset_l0() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 70, 30); - } - - set delta_chroma_offset_l0(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 70); - } - - get delta_luma_weight_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 100, 15); - } - - set delta_luma_weight_l1(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 100); - } - - get luma_offset_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 115, 15); - } - - set luma_offset_l1(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 115); - } - - get delta_chroma_weight_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 130, 30); - } - - set delta_chroma_weight_l1(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 130); - } - - get delta_chroma_offset_l1() { - return new Int8Array(this.#data.buffer, this.#data.byteOffset + 160, 30); - } - - set delta_chroma_offset_l1(value: Int8Array) { - this.#data.set(new Uint8Array(value.buffer), 160); - } -} - -export interface InitStdVideoEncodeH265SliceSegmentLongTermRefPics { - num_long_term_sps?: number; - num_long_term_pics?: number; - lt_idx_sps?: Uint8Array; - poc_lsb_lt?: Uint8Array; - used_by_curr_pic_lt_flag?: number; - delta_poc_msb_present_flag?: Uint8Array; - delta_poc_msb_cycle_lt?: Uint8Array; -} - -export class StdVideoEncodeH265SliceSegmentLongTermRefPics implements BaseStruct { - static size = 148; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265SliceSegmentLongTermRefPics); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265SliceSegmentLongTermRefPics) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentLongTermRefPics.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265SliceSegmentLongTermRefPics.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265SliceSegmentLongTermRefPics.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentLongTermRefPics.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.num_long_term_sps !== undefined) this.num_long_term_sps = data.num_long_term_sps; - if (data.num_long_term_pics !== undefined) this.num_long_term_pics = data.num_long_term_pics; - if (data.lt_idx_sps !== undefined) this.lt_idx_sps = data.lt_idx_sps; - if (data.poc_lsb_lt !== undefined) this.poc_lsb_lt = data.poc_lsb_lt; - if (data.used_by_curr_pic_lt_flag !== undefined) this.used_by_curr_pic_lt_flag = data.used_by_curr_pic_lt_flag; - if (data.delta_poc_msb_present_flag !== undefined) this.delta_poc_msb_present_flag = data.delta_poc_msb_present_flag; - if (data.delta_poc_msb_cycle_lt !== undefined) this.delta_poc_msb_cycle_lt = data.delta_poc_msb_cycle_lt; - } - } - - get num_long_term_sps() { - return this.#view.getUint8(0); - } - - set num_long_term_sps(value: number) { - this.#view.setUint8(0, Number(value)); - } - - get num_long_term_pics() { - return this.#view.getUint8(1); - } - - set num_long_term_pics(value: number) { - this.#view.setUint8(1, Number(value)); - } - - get lt_idx_sps() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 2, 32); - } - - set lt_idx_sps(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 2); - } - - get poc_lsb_lt() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 34, 16); - } - - set poc_lsb_lt(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 34); - } - - get used_by_curr_pic_lt_flag() { - return this.#view.getUint16(50, LE); - } - - set used_by_curr_pic_lt_flag(value: number) { - this.#view.setUint16(50, Number(value), LE); - } - - get delta_poc_msb_present_flag() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 52, 48); - } - - set delta_poc_msb_present_flag(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 52); - } - - get delta_poc_msb_cycle_lt() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 100, 48); - } - - set delta_poc_msb_cycle_lt(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 100); - } -} - -export interface InitStdVideoEncodeH265SliceSegmentHeaderFlags { - first_slice_segment_in_pic_flag?: number; - no_output_of_prior_pics_flag?: number; - dependent_slice_segment_flag?: number; - pic_output_flag?: number; - short_term_ref_pic_set_sps_flag?: number; - slice_temporal_mvp_enable_flag?: number; - slice_sao_luma_flag?: number; - slice_sao_chroma_flag?: number; - num_ref_idx_active_override_flag?: number; - mvd_l1_zero_flag?: number; - cabac_init_flag?: number; - cu_chroma_qp_offset_enabled_flag?: number; - deblocking_filter_override_flag?: number; - slice_deblocking_filter_disabled_flag?: number; - collocated_from_l0_flag?: number; - slice_loop_filter_across_slices_enabled_flag?: number; -} - -export class StdVideoEncodeH265SliceSegmentHeaderFlags implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265SliceSegmentHeaderFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265SliceSegmentHeaderFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeaderFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265SliceSegmentHeaderFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265SliceSegmentHeaderFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeaderFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.first_slice_segment_in_pic_flag !== undefined) this.first_slice_segment_in_pic_flag = data.first_slice_segment_in_pic_flag; - if (data.no_output_of_prior_pics_flag !== undefined) this.no_output_of_prior_pics_flag = data.no_output_of_prior_pics_flag; - if (data.dependent_slice_segment_flag !== undefined) this.dependent_slice_segment_flag = data.dependent_slice_segment_flag; - if (data.pic_output_flag !== undefined) this.pic_output_flag = data.pic_output_flag; - if (data.short_term_ref_pic_set_sps_flag !== undefined) this.short_term_ref_pic_set_sps_flag = data.short_term_ref_pic_set_sps_flag; - if (data.slice_temporal_mvp_enable_flag !== undefined) this.slice_temporal_mvp_enable_flag = data.slice_temporal_mvp_enable_flag; - if (data.slice_sao_luma_flag !== undefined) this.slice_sao_luma_flag = data.slice_sao_luma_flag; - if (data.slice_sao_chroma_flag !== undefined) this.slice_sao_chroma_flag = data.slice_sao_chroma_flag; - if (data.num_ref_idx_active_override_flag !== undefined) this.num_ref_idx_active_override_flag = data.num_ref_idx_active_override_flag; - if (data.mvd_l1_zero_flag !== undefined) this.mvd_l1_zero_flag = data.mvd_l1_zero_flag; - if (data.cabac_init_flag !== undefined) this.cabac_init_flag = data.cabac_init_flag; - if (data.cu_chroma_qp_offset_enabled_flag !== undefined) this.cu_chroma_qp_offset_enabled_flag = data.cu_chroma_qp_offset_enabled_flag; - if (data.deblocking_filter_override_flag !== undefined) this.deblocking_filter_override_flag = data.deblocking_filter_override_flag; - if (data.slice_deblocking_filter_disabled_flag !== undefined) this.slice_deblocking_filter_disabled_flag = data.slice_deblocking_filter_disabled_flag; - if (data.collocated_from_l0_flag !== undefined) this.collocated_from_l0_flag = data.collocated_from_l0_flag; - if (data.slice_loop_filter_across_slices_enabled_flag !== undefined) this.slice_loop_filter_across_slices_enabled_flag = data.slice_loop_filter_across_slices_enabled_flag; - } - } - - get first_slice_segment_in_pic_flag() { - return this.#view.getUint32(0, LE); - } - - set first_slice_segment_in_pic_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get no_output_of_prior_pics_flag() { - return this.#view.getUint32(4, LE); - } - - set no_output_of_prior_pics_flag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get dependent_slice_segment_flag() { - return this.#view.getUint32(8, LE); - } - - set dependent_slice_segment_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get pic_output_flag() { - return this.#view.getUint32(12, LE); - } - - set pic_output_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get short_term_ref_pic_set_sps_flag() { - return this.#view.getUint32(16, LE); - } - - set short_term_ref_pic_set_sps_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get slice_temporal_mvp_enable_flag() { - return this.#view.getUint32(20, LE); - } - - set slice_temporal_mvp_enable_flag(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get slice_sao_luma_flag() { - return this.#view.getUint32(24, LE); - } - - set slice_sao_luma_flag(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get slice_sao_chroma_flag() { - return this.#view.getUint32(28, LE); - } - - set slice_sao_chroma_flag(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get num_ref_idx_active_override_flag() { - return this.#view.getUint32(32, LE); - } - - set num_ref_idx_active_override_flag(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get mvd_l1_zero_flag() { - return this.#view.getUint32(36, LE); - } - - set mvd_l1_zero_flag(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get cabac_init_flag() { - return this.#view.getUint32(40, LE); - } - - set cabac_init_flag(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get cu_chroma_qp_offset_enabled_flag() { - return this.#view.getUint32(44, LE); - } - - set cu_chroma_qp_offset_enabled_flag(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get deblocking_filter_override_flag() { - return this.#view.getUint32(48, LE); - } - - set deblocking_filter_override_flag(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get slice_deblocking_filter_disabled_flag() { - return this.#view.getUint32(52, LE); - } - - set slice_deblocking_filter_disabled_flag(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get collocated_from_l0_flag() { - return this.#view.getUint32(56, LE); - } - - set collocated_from_l0_flag(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get slice_loop_filter_across_slices_enabled_flag() { - return this.#view.getUint32(60, LE); - } - - set slice_loop_filter_across_slices_enabled_flag(value: number) { - this.#view.setUint32(60, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH265SliceSegmentHeader { - flags?: StdVideoEncodeH265SliceSegmentHeaderFlags; - slice_type?: StdVideoH265SliceType; - slice_segment_address?: number; - short_term_ref_pic_set_idx?: number; - collocated_ref_idx?: number; - num_ref_idx_l0_active_minus1?: number; - num_ref_idx_l1_active_minus1?: number; - MaxNumMergeCand?: number; - slice_cb_qp_offset?: number; - slice_cr_qp_offset?: number; - slice_beta_offset_div2?: number; - slice_tc_offset_div2?: number; - slice_act_y_qp_offset?: number; - slice_act_cb_qp_offset?: number; - slice_act_cr_qp_offset?: number; - pShortTermRefPicSet?: AnyPointer; - pLongTermRefPics?: AnyPointer; - pWeightTable?: AnyPointer; -} - -export class StdVideoEncodeH265SliceSegmentHeader implements BaseStruct { - static size = 112; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265SliceSegmentHeader); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265SliceSegmentHeader) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeader.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265SliceSegmentHeader.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265SliceSegmentHeader.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265SliceSegmentHeader.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.slice_type !== undefined) this.slice_type = data.slice_type; - if (data.slice_segment_address !== undefined) this.slice_segment_address = data.slice_segment_address; - if (data.short_term_ref_pic_set_idx !== undefined) this.short_term_ref_pic_set_idx = data.short_term_ref_pic_set_idx; - if (data.collocated_ref_idx !== undefined) this.collocated_ref_idx = data.collocated_ref_idx; - if (data.num_ref_idx_l0_active_minus1 !== undefined) this.num_ref_idx_l0_active_minus1 = data.num_ref_idx_l0_active_minus1; - if (data.num_ref_idx_l1_active_minus1 !== undefined) this.num_ref_idx_l1_active_minus1 = data.num_ref_idx_l1_active_minus1; - if (data.MaxNumMergeCand !== undefined) this.MaxNumMergeCand = data.MaxNumMergeCand; - if (data.slice_cb_qp_offset !== undefined) this.slice_cb_qp_offset = data.slice_cb_qp_offset; - if (data.slice_cr_qp_offset !== undefined) this.slice_cr_qp_offset = data.slice_cr_qp_offset; - if (data.slice_beta_offset_div2 !== undefined) this.slice_beta_offset_div2 = data.slice_beta_offset_div2; - if (data.slice_tc_offset_div2 !== undefined) this.slice_tc_offset_div2 = data.slice_tc_offset_div2; - if (data.slice_act_y_qp_offset !== undefined) this.slice_act_y_qp_offset = data.slice_act_y_qp_offset; - if (data.slice_act_cb_qp_offset !== undefined) this.slice_act_cb_qp_offset = data.slice_act_cb_qp_offset; - if (data.slice_act_cr_qp_offset !== undefined) this.slice_act_cr_qp_offset = data.slice_act_cr_qp_offset; - if (data.pShortTermRefPicSet !== undefined) this.pShortTermRefPicSet = data.pShortTermRefPicSet; - if (data.pLongTermRefPics !== undefined) this.pLongTermRefPics = data.pLongTermRefPics; - if (data.pWeightTable !== undefined) this.pWeightTable = data.pWeightTable; - } - } - - get flags() { - return new StdVideoEncodeH265SliceSegmentHeaderFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265SliceSegmentHeaderFlags.size)); - } - - set flags(value: StdVideoEncodeH265SliceSegmentHeaderFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH265SliceSegmentHeaderFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get slice_type() { - return this.#view.getUint32(64, LE); - } - - set slice_type(value: StdVideoH265SliceType) { - this.#view.setUint32(64, Number(value), LE); - } - - get slice_segment_address() { - return this.#view.getUint32(68, LE); - } - - set slice_segment_address(value: number) { - this.#view.setUint32(68, Number(value), LE); - } - - get short_term_ref_pic_set_idx() { - return this.#view.getUint8(72); - } - - set short_term_ref_pic_set_idx(value: number) { - this.#view.setUint8(72, Number(value)); - } - - get collocated_ref_idx() { - return this.#view.getUint8(73); - } - - set collocated_ref_idx(value: number) { - this.#view.setUint8(73, Number(value)); - } - - get num_ref_idx_l0_active_minus1() { - return this.#view.getUint8(74); - } - - set num_ref_idx_l0_active_minus1(value: number) { - this.#view.setUint8(74, Number(value)); - } - - get num_ref_idx_l1_active_minus1() { - return this.#view.getUint8(75); - } - - set num_ref_idx_l1_active_minus1(value: number) { - this.#view.setUint8(75, Number(value)); - } - - get MaxNumMergeCand() { - return this.#view.getUint8(76); - } - - set MaxNumMergeCand(value: number) { - this.#view.setUint8(76, Number(value)); - } - - get slice_cb_qp_offset() { - return this.#view.getInt8(77); - } - - set slice_cb_qp_offset(value: number) { - this.#view.setInt8(77, Number(value)); - } - - get slice_cr_qp_offset() { - return this.#view.getInt8(78); - } - - set slice_cr_qp_offset(value: number) { - this.#view.setInt8(78, Number(value)); - } - - get slice_beta_offset_div2() { - return this.#view.getInt8(79); - } - - set slice_beta_offset_div2(value: number) { - this.#view.setInt8(79, Number(value)); - } - - get slice_tc_offset_div2() { - return this.#view.getInt8(80); - } - - set slice_tc_offset_div2(value: number) { - this.#view.setInt8(80, Number(value)); - } - - get slice_act_y_qp_offset() { - return this.#view.getInt8(81); - } - - set slice_act_y_qp_offset(value: number) { - this.#view.setInt8(81, Number(value)); - } - - get slice_act_cb_qp_offset() { - return this.#view.getInt8(82); - } - - set slice_act_cb_qp_offset(value: number) { - this.#view.setInt8(82, Number(value)); - } - - get slice_act_cr_qp_offset() { - return this.#view.getInt8(83); - } - - set slice_act_cr_qp_offset(value: number) { - this.#view.setInt8(83, Number(value)); - } - - get pShortTermRefPicSet() { - return this.#view.getBigUint64(88, LE); - } - - set pShortTermRefPicSet(value: AnyPointer) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } - - get pLongTermRefPics() { - return this.#view.getBigUint64(96, LE); - } - - set pLongTermRefPics(value: AnyPointer) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } - - get pWeightTable() { - return this.#view.getBigUint64(104, LE); - } - - set pWeightTable(value: AnyPointer) { - this.#view.setBigUint64(104, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoEncodeH265ReferenceModificationFlags { - ref_pic_list_modification_flag_l0?: number; - ref_pic_list_modification_flag_l1?: number; -} - -export class StdVideoEncodeH265ReferenceModificationFlags implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265ReferenceModificationFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265ReferenceModificationFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModificationFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceModificationFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265ReferenceModificationFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModificationFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.ref_pic_list_modification_flag_l0 !== undefined) this.ref_pic_list_modification_flag_l0 = data.ref_pic_list_modification_flag_l0; - if (data.ref_pic_list_modification_flag_l1 !== undefined) this.ref_pic_list_modification_flag_l1 = data.ref_pic_list_modification_flag_l1; - } - } - - get ref_pic_list_modification_flag_l0() { - return this.#view.getUint32(0, LE); - } - - set ref_pic_list_modification_flag_l0(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get ref_pic_list_modification_flag_l1() { - return this.#view.getUint32(4, LE); - } - - set ref_pic_list_modification_flag_l1(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH265ReferenceModifications { - flags?: StdVideoEncodeH265ReferenceModificationFlags; - referenceList0ModificationsCount?: number; - pReferenceList0Modifications?: AnyPointer; - referenceList1ModificationsCount?: number; - pReferenceList1Modifications?: AnyPointer; -} - -export class StdVideoEncodeH265ReferenceModifications implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265ReferenceModifications); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265ReferenceModifications) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModifications.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceModifications.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265ReferenceModifications.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265ReferenceModifications.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.referenceList0ModificationsCount !== undefined) this.referenceList0ModificationsCount = data.referenceList0ModificationsCount; - if (data.pReferenceList0Modifications !== undefined) this.pReferenceList0Modifications = data.pReferenceList0Modifications; - if (data.referenceList1ModificationsCount !== undefined) this.referenceList1ModificationsCount = data.referenceList1ModificationsCount; - if (data.pReferenceList1Modifications !== undefined) this.pReferenceList1Modifications = data.pReferenceList1Modifications; - } - } - - get flags() { - return new StdVideoEncodeH265ReferenceModificationFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265ReferenceModificationFlags.size)); - } - - set flags(value: StdVideoEncodeH265ReferenceModificationFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH265ReferenceModificationFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get referenceList0ModificationsCount() { - return this.#view.getUint8(8); - } - - set referenceList0ModificationsCount(value: number) { - this.#view.setUint8(8, Number(value)); - } - - get pReferenceList0Modifications() { - return this.#view.getBigUint64(16, LE); - } - - set pReferenceList0Modifications(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get referenceList1ModificationsCount() { - return this.#view.getUint8(24); - } - - set referenceList1ModificationsCount(value: number) { - this.#view.setUint8(24, Number(value)); - } - - get pReferenceList1Modifications() { - return this.#view.getBigUint64(32, LE); - } - - set pReferenceList1Modifications(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStdVideoEncodeH265PictureInfoFlags { - is_reference_flag?: number; - IrapPicFlag?: number; - long_term_flag?: number; - discardable_flag?: number; - cross_layer_bla_flag?: number; -} - -export class StdVideoEncodeH265PictureInfoFlags implements BaseStruct { - static size = 20; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265PictureInfoFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265PictureInfoFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265PictureInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265PictureInfoFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265PictureInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265PictureInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.is_reference_flag !== undefined) this.is_reference_flag = data.is_reference_flag; - if (data.IrapPicFlag !== undefined) this.IrapPicFlag = data.IrapPicFlag; - if (data.long_term_flag !== undefined) this.long_term_flag = data.long_term_flag; - if (data.discardable_flag !== undefined) this.discardable_flag = data.discardable_flag; - if (data.cross_layer_bla_flag !== undefined) this.cross_layer_bla_flag = data.cross_layer_bla_flag; - } - } - - get is_reference_flag() { - return this.#view.getUint32(0, LE); - } - - set is_reference_flag(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get IrapPicFlag() { - return this.#view.getUint32(4, LE); - } - - set IrapPicFlag(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get long_term_flag() { - return this.#view.getUint32(8, LE); - } - - set long_term_flag(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get discardable_flag() { - return this.#view.getUint32(12, LE); - } - - set discardable_flag(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get cross_layer_bla_flag() { - return this.#view.getUint32(16, LE); - } - - set cross_layer_bla_flag(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH265PictureInfo { - flags?: StdVideoEncodeH265PictureInfoFlags; - PictureType?: StdVideoH265PictureType; - sps_video_parameter_set_id?: number; - pps_seq_parameter_set_id?: number; - pps_pic_parameter_set_id?: number; - PicOrderCntVal?: number; - TemporalId?: number; -} - -export class StdVideoEncodeH265PictureInfo implements BaseStruct { - static size = 36; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265PictureInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265PictureInfo) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265PictureInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265PictureInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265PictureInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265PictureInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.PictureType !== undefined) this.PictureType = data.PictureType; - if (data.sps_video_parameter_set_id !== undefined) this.sps_video_parameter_set_id = data.sps_video_parameter_set_id; - if (data.pps_seq_parameter_set_id !== undefined) this.pps_seq_parameter_set_id = data.pps_seq_parameter_set_id; - if (data.pps_pic_parameter_set_id !== undefined) this.pps_pic_parameter_set_id = data.pps_pic_parameter_set_id; - if (data.PicOrderCntVal !== undefined) this.PicOrderCntVal = data.PicOrderCntVal; - if (data.TemporalId !== undefined) this.TemporalId = data.TemporalId; - } - } - - get flags() { - return new StdVideoEncodeH265PictureInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265PictureInfoFlags.size)); - } - - set flags(value: StdVideoEncodeH265PictureInfoFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH265PictureInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get PictureType() { - return this.#view.getUint32(20, LE); - } - - set PictureType(value: StdVideoH265PictureType) { - this.#view.setUint32(20, Number(value), LE); - } - - get sps_video_parameter_set_id() { - return this.#view.getUint8(24); - } - - set sps_video_parameter_set_id(value: number) { - this.#view.setUint8(24, Number(value)); - } - - get pps_seq_parameter_set_id() { - return this.#view.getUint8(25); - } - - set pps_seq_parameter_set_id(value: number) { - this.#view.setUint8(25, Number(value)); - } - - get pps_pic_parameter_set_id() { - return this.#view.getUint8(26); - } - - set pps_pic_parameter_set_id(value: number) { - this.#view.setUint8(26, Number(value)); - } - - get PicOrderCntVal() { - return this.#view.getInt32(28, LE); - } - - set PicOrderCntVal(value: number) { - this.#view.setInt32(28, Number(value), LE); - } - - get TemporalId() { - return this.#view.getUint8(32); - } - - set TemporalId(value: number) { - this.#view.setUint8(32, Number(value)); - } -} - -export interface InitStdVideoEncodeH265ReferenceInfoFlags { - used_for_long_term_reference?: number; - unused_for_reference?: number; -} - -export class StdVideoEncodeH265ReferenceInfoFlags implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265ReferenceInfoFlags); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265ReferenceInfoFlags) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceInfoFlags.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265ReferenceInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfoFlags.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.used_for_long_term_reference !== undefined) this.used_for_long_term_reference = data.used_for_long_term_reference; - if (data.unused_for_reference !== undefined) this.unused_for_reference = data.unused_for_reference; - } - } - - get used_for_long_term_reference() { - return this.#view.getUint32(0, LE); - } - - set used_for_long_term_reference(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get unused_for_reference() { - return this.#view.getUint32(4, LE); - } - - set unused_for_reference(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitStdVideoEncodeH265ReferenceInfo { - flags?: StdVideoEncodeH265ReferenceInfoFlags; - PicOrderCntVal?: number; - TemporalId?: number; -} - -export class StdVideoEncodeH265ReferenceInfo implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStdVideoEncodeH265ReferenceInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStdVideoEncodeH265ReferenceInfo) { - if (data === undefined) { - this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StdVideoEncodeH265ReferenceInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StdVideoEncodeH265ReferenceInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StdVideoEncodeH265ReferenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.PicOrderCntVal !== undefined) this.PicOrderCntVal = data.PicOrderCntVal; - if (data.TemporalId !== undefined) this.TemporalId = data.TemporalId; - } - } - - get flags() { - return new StdVideoEncodeH265ReferenceInfoFlags(this.#data.subarray(0, 0 + StdVideoEncodeH265ReferenceInfoFlags.size)); - } - - set flags(value: StdVideoEncodeH265ReferenceInfoFlags) { - if (value[BUFFER].byteLength < StdVideoEncodeH265ReferenceInfoFlags.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get PicOrderCntVal() { - return this.#view.getInt32(8, LE); - } - - set PicOrderCntVal(value: number) { - this.#view.setInt32(8, Number(value), LE); - } - - get TemporalId() { - return this.#view.getUint8(12); - } - - set TemporalId(value: number) { - this.#view.setUint8(12, Number(value)); - } -} - -export interface InitBaseOutStructure { - sType?: StructureType; - pNext?: AnyPointer; -} - -export class BaseOutStructure implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBaseOutStructure); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBaseOutStructure) { - if (data === undefined) { - this.#data = new Uint8Array(BaseOutStructure.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BaseOutStructure.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BaseOutStructure.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BaseOutStructure.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.sType !== undefined) this.sType = data.sType; - if (data.pNext !== undefined) this.pNext = data.pNext; - } - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} - -export interface InitBaseInStructure { - sType?: StructureType; - pNext?: AnyPointer; -} - -export class BaseInStructure implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBaseInStructure); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBaseInStructure) { - if (data === undefined) { - this.#data = new Uint8Array(BaseInStructure.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BaseInStructure.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BaseInStructure.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BaseInStructure.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.sType !== undefined) this.sType = data.sType; - if (data.pNext !== undefined) this.pNext = data.pNext; - } - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} - -export interface InitOffset2D { - x?: number; - y?: number; -} - -export class Offset2D implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitOffset2D); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitOffset2D) { - if (data === undefined) { - this.#data = new Uint8Array(Offset2D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Offset2D.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(Offset2D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.x !== undefined) this.x = data.x; - if (data.y !== undefined) this.y = data.y; - } - } - - get x() { - return this.#view.getInt32(0, LE); - } - - set x(value: number) { - this.#view.setInt32(0, Number(value), LE); - } - - get y() { - return this.#view.getInt32(4, LE); - } - - set y(value: number) { - this.#view.setInt32(4, Number(value), LE); - } -} - -export interface InitOffset3D { - x?: number; - y?: number; - z?: number; -} - -export class Offset3D implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitOffset3D); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitOffset3D) { - if (data === undefined) { - this.#data = new Uint8Array(Offset3D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Offset3D.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(Offset3D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.x !== undefined) this.x = data.x; - if (data.y !== undefined) this.y = data.y; - if (data.z !== undefined) this.z = data.z; - } - } - - get x() { - return this.#view.getInt32(0, LE); - } - - set x(value: number) { - this.#view.setInt32(0, Number(value), LE); - } - - get y() { - return this.#view.getInt32(4, LE); - } - - set y(value: number) { - this.#view.setInt32(4, Number(value), LE); - } - - get z() { - return this.#view.getInt32(8, LE); - } - - set z(value: number) { - this.#view.setInt32(8, Number(value), LE); - } -} - -export interface InitExtent2D { - width?: number; - height?: number; -} - -export class Extent2D implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExtent2D); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExtent2D) { - if (data === undefined) { - this.#data = new Uint8Array(Extent2D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Extent2D.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(Extent2D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.width !== undefined) this.width = data.width; - if (data.height !== undefined) this.height = data.height; - } - } - - get width() { - return this.#view.getUint32(0, LE); - } - - set width(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get height() { - return this.#view.getUint32(4, LE); - } - - set height(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitExtent3D { - width?: number; - height?: number; - depth?: number; -} - -export class Extent3D implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExtent3D); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExtent3D) { - if (data === undefined) { - this.#data = new Uint8Array(Extent3D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Extent3D.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(Extent3D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.width !== undefined) this.width = data.width; - if (data.height !== undefined) this.height = data.height; - if (data.depth !== undefined) this.depth = data.depth; - } - } - - get width() { - return this.#view.getUint32(0, LE); - } - - set width(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get height() { - return this.#view.getUint32(4, LE); - } - - set height(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get depth() { - return this.#view.getUint32(8, LE); - } - - set depth(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitViewport { - x?: number; - y?: number; - width?: number; - height?: number; - minDepth?: number; - maxDepth?: number; -} - -export class Viewport implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitViewport); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitViewport) { - if (data === undefined) { - this.#data = new Uint8Array(Viewport.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Viewport.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < Viewport.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(Viewport.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.x !== undefined) this.x = data.x; - if (data.y !== undefined) this.y = data.y; - if (data.width !== undefined) this.width = data.width; - if (data.height !== undefined) this.height = data.height; - if (data.minDepth !== undefined) this.minDepth = data.minDepth; - if (data.maxDepth !== undefined) this.maxDepth = data.maxDepth; - } - } - - get x() { - return this.#view.getFloat32(0, LE); - } - - set x(value: number) { - this.#view.setFloat32(0, Number(value), LE); - } - - get y() { - return this.#view.getFloat32(4, LE); - } - - set y(value: number) { - this.#view.setFloat32(4, Number(value), LE); - } - - get width() { - return this.#view.getFloat32(8, LE); - } - - set width(value: number) { - this.#view.setFloat32(8, Number(value), LE); - } - - get height() { - return this.#view.getFloat32(12, LE); - } - - set height(value: number) { - this.#view.setFloat32(12, Number(value), LE); - } - - get minDepth() { - return this.#view.getFloat32(16, LE); - } - - set minDepth(value: number) { - this.#view.setFloat32(16, Number(value), LE); - } - - get maxDepth() { - return this.#view.getFloat32(20, LE); - } - - set maxDepth(value: number) { - this.#view.setFloat32(20, Number(value), LE); - } -} - -export interface InitRect2D { - offset?: Offset2D; - extent?: Extent2D; -} - -export class Rect2D implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRect2D); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRect2D) { - if (data === undefined) { - this.#data = new Uint8Array(Rect2D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Rect2D.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < Rect2D.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(Rect2D.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.offset !== undefined) this.offset = data.offset; - if (data.extent !== undefined) this.extent = data.extent; - } - } - - get offset() { - return new Offset2D(this.#data.subarray(0, 0 + Offset2D.size)); - } - - set offset(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get extent() { - return new Extent2D(this.#data.subarray(8, 8 + Extent2D.size)); - } - - set extent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 8); - } -} - -export interface InitClearRect { - rect?: Rect2D; - baseArrayLayer?: number; - layerCount?: number; -} - -export class ClearRect implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitClearRect); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitClearRect) { - if (data === undefined) { - this.#data = new Uint8Array(ClearRect.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ClearRect.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ClearRect.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ClearRect.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.rect !== undefined) this.rect = data.rect; - if (data.baseArrayLayer !== undefined) this.baseArrayLayer = data.baseArrayLayer; - if (data.layerCount !== undefined) this.layerCount = data.layerCount; - } - } - - get rect() { - return new Rect2D(this.#data.subarray(0, 0 + Rect2D.size)); - } - - set rect(value: Rect2D) { - if (value[BUFFER].byteLength < Rect2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get baseArrayLayer() { - return this.#view.getUint32(16, LE); - } - - set baseArrayLayer(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get layerCount() { - return this.#view.getUint32(20, LE); - } - - set layerCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitComponentMapping { - r?: ComponentSwizzle; - g?: ComponentSwizzle; - b?: ComponentSwizzle; - a?: ComponentSwizzle; -} - -export class ComponentMapping implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitComponentMapping); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitComponentMapping) { - if (data === undefined) { - this.#data = new Uint8Array(ComponentMapping.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ComponentMapping.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ComponentMapping.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ComponentMapping.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.r !== undefined) this.r = data.r; - if (data.g !== undefined) this.g = data.g; - if (data.b !== undefined) this.b = data.b; - if (data.a !== undefined) this.a = data.a; - } - } - - get r() { - return this.#view.getUint32(0, LE); - } - - set r(value: ComponentSwizzle) { - this.#view.setUint32(0, Number(value), LE); - } - - get g() { - return this.#view.getUint32(4, LE); - } - - set g(value: ComponentSwizzle) { - this.#view.setUint32(4, Number(value), LE); - } - - get b() { - return this.#view.getUint32(8, LE); - } - - set b(value: ComponentSwizzle) { - this.#view.setUint32(8, Number(value), LE); - } - - get a() { - return this.#view.getUint32(12, LE); - } - - set a(value: ComponentSwizzle) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitPhysicalDeviceProperties { - apiVersion?: number; - driverVersion?: number; - vendorID?: number; - deviceID?: number; - deviceType?: PhysicalDeviceType; - deviceName?: Uint8Array; - pipelineCacheUUID?: Uint8Array; - limits?: PhysicalDeviceLimits; - sparseProperties?: PhysicalDeviceSparseProperties; -} - -export class PhysicalDeviceProperties implements BaseStruct { - static size = 784; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.apiVersion !== undefined) this.apiVersion = data.apiVersion; - if (data.driverVersion !== undefined) this.driverVersion = data.driverVersion; - if (data.vendorID !== undefined) this.vendorID = data.vendorID; - if (data.deviceID !== undefined) this.deviceID = data.deviceID; - if (data.deviceType !== undefined) this.deviceType = data.deviceType; - if (data.deviceName !== undefined) this.deviceName = data.deviceName; - if (data.pipelineCacheUUID !== undefined) this.pipelineCacheUUID = data.pipelineCacheUUID; - if (data.limits !== undefined) this.limits = data.limits; - if (data.sparseProperties !== undefined) this.sparseProperties = data.sparseProperties; - } - } - - get apiVersion() { - return this.#view.getUint32(0, LE); - } - - set apiVersion(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get driverVersion() { - return this.#view.getUint32(4, LE); - } - - set driverVersion(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get vendorID() { - return this.#view.getUint32(8, LE); - } - - set vendorID(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get deviceID() { - return this.#view.getUint32(12, LE); - } - - set deviceID(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get deviceType() { - return this.#view.getUint32(16, LE); - } - - set deviceType(value: PhysicalDeviceType) { - this.#view.setUint32(16, Number(value), LE); - } - - get deviceName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - - set deviceName(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - - get pipelineCacheUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 16); - } - - set pipelineCacheUUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - - get limits() { - return new PhysicalDeviceLimits(this.#data.subarray(292, 292 + PhysicalDeviceLimits.size)); - } - - set limits(value: PhysicalDeviceLimits) { - if (value[BUFFER].byteLength < PhysicalDeviceLimits.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 292); - } - - get sparseProperties() { - return new PhysicalDeviceSparseProperties(this.#data.subarray(764, 764 + PhysicalDeviceSparseProperties.size)); - } - - set sparseProperties(value: PhysicalDeviceSparseProperties) { - if (value[BUFFER].byteLength < PhysicalDeviceSparseProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 764); - } -} - -export interface InitExtensionProperties { - extensionName?: Uint8Array; - specVersion?: number; -} - -export class ExtensionProperties implements BaseStruct { - static size = 260; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExtensionProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExtensionProperties) { - if (data === undefined) { - this.#data = new Uint8Array(ExtensionProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExtensionProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExtensionProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExtensionProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.extensionName !== undefined) this.extensionName = data.extensionName; - if (data.specVersion !== undefined) this.specVersion = data.specVersion; - } - } - - get extensionName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 256); - } - - set extensionName(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - - get specVersion() { - return this.#view.getUint32(256, LE); - } - - set specVersion(value: number) { - this.#view.setUint32(256, Number(value), LE); - } -} - -export interface InitLayerProperties { - layerName?: Uint8Array; - specVersion?: number; - implementationVersion?: number; - description?: Uint8Array; -} - -export class LayerProperties implements BaseStruct { - static size = 520; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitLayerProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitLayerProperties) { - if (data === undefined) { - this.#data = new Uint8Array(LayerProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, LayerProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < LayerProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(LayerProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.layerName !== undefined) this.layerName = data.layerName; - if (data.specVersion !== undefined) this.specVersion = data.specVersion; - if (data.implementationVersion !== undefined) this.implementationVersion = data.implementationVersion; - if (data.description !== undefined) this.description = data.description; - } - } - - get layerName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 256); - } - - set layerName(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - - get specVersion() { - return this.#view.getUint32(256, LE); - } - - set specVersion(value: number) { - this.#view.setUint32(256, Number(value), LE); - } - - get implementationVersion() { - return this.#view.getUint32(260, LE); - } - - set implementationVersion(value: number) { - this.#view.setUint32(260, Number(value), LE); - } - - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 264, 256); - } - - set description(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 264); - } -} - -export interface InitApplicationInfo { - pNext?: AnyPointer; - pApplicationName?: AnyPointer; - applicationVersion?: number; - pEngineName?: AnyPointer; - engineVersion?: number; - apiVersion?: number; -} - -export class ApplicationInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitApplicationInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitApplicationInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ApplicationInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ApplicationInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ApplicationInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ApplicationInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pApplicationName !== undefined) this.pApplicationName = data.pApplicationName; - if (data.applicationVersion !== undefined) this.applicationVersion = data.applicationVersion; - if (data.pEngineName !== undefined) this.pEngineName = data.pEngineName; - if (data.engineVersion !== undefined) this.engineVersion = data.engineVersion; - if (data.apiVersion !== undefined) this.apiVersion = data.apiVersion; - } - this.sType = StructureType.APPLICATION_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pApplicationName() { - return this.#view.getBigUint64(16, LE); - } - - set pApplicationName(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get applicationVersion() { - return this.#view.getUint32(24, LE); - } - - set applicationVersion(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pEngineName() { - return this.#view.getBigUint64(32, LE); - } - - set pEngineName(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get engineVersion() { - return this.#view.getUint32(40, LE); - } - - set engineVersion(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get apiVersion() { - return this.#view.getUint32(44, LE); - } - - set apiVersion(value: number) { - this.#view.setUint32(44, Number(value), LE); - } -} - -export interface InitAllocationCallbacks { - pUserData?: AnyPointer; - pfnAllocation?: Deno.PointerValue; - pfnReallocation?: Deno.PointerValue; - pfnFree?: Deno.PointerValue; - pfnInternalAllocation?: Deno.PointerValue; - pfnInternalFree?: Deno.PointerValue; -} - -export class AllocationCallbacks implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAllocationCallbacks); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAllocationCallbacks) { - if (data === undefined) { - this.#data = new Uint8Array(AllocationCallbacks.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AllocationCallbacks.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AllocationCallbacks.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AllocationCallbacks.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pUserData !== undefined) this.pUserData = data.pUserData; - if (data.pfnAllocation !== undefined) this.pfnAllocation = data.pfnAllocation; - if (data.pfnReallocation !== undefined) this.pfnReallocation = data.pfnReallocation; - if (data.pfnFree !== undefined) this.pfnFree = data.pfnFree; - if (data.pfnInternalAllocation !== undefined) this.pfnInternalAllocation = data.pfnInternalAllocation; - if (data.pfnInternalFree !== undefined) this.pfnInternalFree = data.pfnInternalFree; - } - } - - get pUserData() { - return this.#view.getBigUint64(0, LE); - } - - set pUserData(value: AnyPointer) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get pfnAllocation() { - throw new Error(`Unknown type: "function"`); - } - - set pfnAllocation(value: Deno.PointerValue) { - throw new Error(`Unknown type: "function"`); - } - - get pfnReallocation() { - throw new Error(`Unknown type: "function"`); - } - - set pfnReallocation(value: Deno.PointerValue) { - throw new Error(`Unknown type: "function"`); - } - - get pfnFree() { - throw new Error(`Unknown type: "function"`); - } - - set pfnFree(value: Deno.PointerValue) { - throw new Error(`Unknown type: "function"`); - } - - get pfnInternalAllocation() { - throw new Error(`Unknown type: "function"`); - } - - set pfnInternalAllocation(value: Deno.PointerValue) { - throw new Error(`Unknown type: "function"`); - } - - get pfnInternalFree() { - throw new Error(`Unknown type: "function"`); - } - - set pfnInternalFree(value: Deno.PointerValue) { - throw new Error(`Unknown type: "function"`); - } -} - -export interface InitDeviceQueueCreateInfo { - pNext?: AnyPointer; - flags?: DeviceQueueCreateFlags; - queueFamilyIndex?: number; - queueCount?: number; - pQueuePriorities?: AnyPointer; -} - -export class DeviceQueueCreateInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceQueueCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceQueueCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceQueueCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceQueueCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceQueueCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceQueueCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; - if (data.queueCount !== undefined) this.queueCount = data.queueCount; - if (data.pQueuePriorities !== undefined) this.pQueuePriorities = data.pQueuePriorities; - } - this.sType = StructureType.DEVICE_QUEUE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DeviceQueueCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get queueFamilyIndex() { - return this.#view.getUint32(20, LE); - } - - set queueFamilyIndex(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get queueCount() { - return this.#view.getUint32(24, LE); - } - - set queueCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pQueuePriorities() { - return this.#view.getBigUint64(32, LE); - } - - set pQueuePriorities(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDeviceCreateInfo { - pNext?: AnyPointer; - flags?: DeviceCreateFlags; - queueCreateInfoCount?: number; - pQueueCreateInfos?: AnyPointer; - enabledLayerCount?: number; - ppEnabledLayerNames?: AnyPointer; - enabledExtensionCount?: number; - ppEnabledExtensionNames?: AnyPointer; - pEnabledFeatures?: AnyPointer; -} - -export class DeviceCreateInfo implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.queueCreateInfoCount !== undefined) this.queueCreateInfoCount = data.queueCreateInfoCount; - if (data.pQueueCreateInfos !== undefined) this.pQueueCreateInfos = data.pQueueCreateInfos; - if (data.enabledLayerCount !== undefined) this.enabledLayerCount = data.enabledLayerCount; - if (data.ppEnabledLayerNames !== undefined) this.ppEnabledLayerNames = data.ppEnabledLayerNames; - if (data.enabledExtensionCount !== undefined) this.enabledExtensionCount = data.enabledExtensionCount; - if (data.ppEnabledExtensionNames !== undefined) this.ppEnabledExtensionNames = data.ppEnabledExtensionNames; - if (data.pEnabledFeatures !== undefined) this.pEnabledFeatures = data.pEnabledFeatures; - } - this.sType = StructureType.DEVICE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DeviceCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get queueCreateInfoCount() { - return this.#view.getUint32(20, LE); - } - - set queueCreateInfoCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pQueueCreateInfos() { - return this.#view.getBigUint64(24, LE); - } - - set pQueueCreateInfos(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get enabledLayerCount() { - return this.#view.getUint32(32, LE); - } - - set enabledLayerCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get ppEnabledLayerNames() { - return this.#view.getBigUint64(40, LE); - } - - set ppEnabledLayerNames(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get enabledExtensionCount() { - return this.#view.getUint32(48, LE); - } - - set enabledExtensionCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get ppEnabledExtensionNames() { - return this.#view.getBigUint64(56, LE); - } - - set ppEnabledExtensionNames(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get pEnabledFeatures() { - return this.#view.getBigUint64(64, LE); - } - - set pEnabledFeatures(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} - -export interface InitInstanceCreateInfo { - pNext?: AnyPointer; - flags?: InstanceCreateFlags; - pApplicationInfo?: AnyPointer; - enabledLayerCount?: number; - ppEnabledLayerNames?: AnyPointer; - enabledExtensionCount?: number; - ppEnabledExtensionNames?: AnyPointer; -} - -export class InstanceCreateInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitInstanceCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitInstanceCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(InstanceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, InstanceCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < InstanceCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(InstanceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pApplicationInfo !== undefined) this.pApplicationInfo = data.pApplicationInfo; - if (data.enabledLayerCount !== undefined) this.enabledLayerCount = data.enabledLayerCount; - if (data.ppEnabledLayerNames !== undefined) this.ppEnabledLayerNames = data.ppEnabledLayerNames; - if (data.enabledExtensionCount !== undefined) this.enabledExtensionCount = data.enabledExtensionCount; - if (data.ppEnabledExtensionNames !== undefined) this.ppEnabledExtensionNames = data.ppEnabledExtensionNames; - } - this.sType = StructureType.INSTANCE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: InstanceCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get pApplicationInfo() { - return this.#view.getBigUint64(24, LE); - } - - set pApplicationInfo(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get enabledLayerCount() { - return this.#view.getUint32(32, LE); - } - - set enabledLayerCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get ppEnabledLayerNames() { - return this.#view.getBigUint64(40, LE); - } - - set ppEnabledLayerNames(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get enabledExtensionCount() { - return this.#view.getUint32(48, LE); - } - - set enabledExtensionCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get ppEnabledExtensionNames() { - return this.#view.getBigUint64(56, LE); - } - - set ppEnabledExtensionNames(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitQueueFamilyProperties { - queueFlags?: QueueFlags; - queueCount?: number; - timestampValidBits?: number; - minImageTransferGranularity?: Extent3D; -} - -export class QueueFamilyProperties implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueueFamilyProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyProperties) { - if (data === undefined) { - this.#data = new Uint8Array(QueueFamilyProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueueFamilyProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.queueFlags !== undefined) this.queueFlags = data.queueFlags; - if (data.queueCount !== undefined) this.queueCount = data.queueCount; - if (data.timestampValidBits !== undefined) this.timestampValidBits = data.timestampValidBits; - if (data.minImageTransferGranularity !== undefined) this.minImageTransferGranularity = data.minImageTransferGranularity; - } - } - - get queueFlags() { - return this.#view.getUint32(0, LE); - } - - set queueFlags(value: QueueFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get queueCount() { - return this.#view.getUint32(4, LE); - } - - set queueCount(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get timestampValidBits() { - return this.#view.getUint32(8, LE); - } - - set timestampValidBits(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get minImageTransferGranularity() { - return new Extent3D(this.#data.subarray(12, 12 + Extent3D.size)); - } - - set minImageTransferGranularity(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 12); - } -} - -export interface InitPhysicalDeviceMemoryProperties { - memoryTypeCount?: number; - memoryTypes?: MemoryType[]; - memoryHeapCount?: number; - memoryHeaps?: MemoryHeap[]; -} - -export class PhysicalDeviceMemoryProperties implements BaseStruct { - static size = 520; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMemoryProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMemoryProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMemoryProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.memoryTypeCount !== undefined) this.memoryTypeCount = data.memoryTypeCount; - if (data.memoryTypes !== undefined) this.memoryTypes = data.memoryTypes; - if (data.memoryHeapCount !== undefined) this.memoryHeapCount = data.memoryHeapCount; - if (data.memoryHeaps !== undefined) this.memoryHeaps = data.memoryHeaps; - } - } - - get memoryTypeCount() { - return this.#view.getUint32(0, LE); - } - - set memoryTypeCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get memoryTypes() { - const result: MemoryType[] = []; - for (let i = 0; i < 32; i++) { - result.push((() => { - return new MemoryType(this.#data.subarray(4 + i * 8, 4 + i * 8 + MemoryType.size)); - })()); - } - return result; - } - - set memoryTypes(value: MemoryType[]) { - for (let i = 0; i < value.length; i++) { - if (value[i][BUFFER].byteLength < MemoryType.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[i][BUFFER], 4 + i * 8); - } - } - - get memoryHeapCount() { - return this.#view.getUint32(260, LE); - } - - set memoryHeapCount(value: number) { - this.#view.setUint32(260, Number(value), LE); - } - - get memoryHeaps() { - const result: MemoryHeap[] = []; - for (let i = 0; i < 16; i++) { - result.push((() => { - return new MemoryHeap(this.#data.subarray(264 + i * 16, 264 + i * 16 + MemoryHeap.size)); - })()); - } - return result; - } - - set memoryHeaps(value: MemoryHeap[]) { - for (let i = 0; i < value.length; i++) { - if (value[i][BUFFER].byteLength < MemoryHeap.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[i][BUFFER], 264 + i * 16); - } - } -} - -export interface InitMemoryAllocateInfo { - pNext?: AnyPointer; - allocationSize?: DeviceSize; - memoryTypeIndex?: number; -} - -export class MemoryAllocateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryAllocateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryAllocateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryAllocateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryAllocateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.allocationSize !== undefined) this.allocationSize = data.allocationSize; - if (data.memoryTypeIndex !== undefined) this.memoryTypeIndex = data.memoryTypeIndex; - } - this.sType = StructureType.MEMORY_ALLOCATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get allocationSize() { - return this.#view.getBigUint64(16, LE); - } - - set allocationSize(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get memoryTypeIndex() { - return this.#view.getUint32(24, LE); - } - - set memoryTypeIndex(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitMemoryRequirements { - size?: DeviceSize; - alignment?: DeviceSize; - memoryTypeBits?: number; -} - -export class MemoryRequirements implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryRequirements); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryRequirements) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryRequirements.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryRequirements.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.size !== undefined) this.size = data.size; - if (data.alignment !== undefined) this.alignment = data.alignment; - if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; - } - } - - get size() { - return this.#view.getBigUint64(0, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get alignment() { - return this.#view.getBigUint64(8, LE); - } - - set alignment(value: DeviceSize) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - - set memoryTypeBits(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSparseImageFormatProperties { - aspectMask?: ImageAspectFlags; - imageGranularity?: Extent3D; - flags?: SparseImageFormatFlags; -} - -export class SparseImageFormatProperties implements BaseStruct { - static size = 20; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSparseImageFormatProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageFormatProperties) { - if (data === undefined) { - this.#data = new Uint8Array(SparseImageFormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageFormatProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageFormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SparseImageFormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; - if (data.imageGranularity !== undefined) this.imageGranularity = data.imageGranularity; - if (data.flags !== undefined) this.flags = data.flags; - } - } - - get aspectMask() { - return this.#view.getUint32(0, LE); - } - - set aspectMask(value: ImageAspectFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get imageGranularity() { - return new Extent3D(this.#data.subarray(4, 4 + Extent3D.size)); - } - - set imageGranularity(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 4); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: SparseImageFormatFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSparseImageMemoryRequirements { - formatProperties?: SparseImageFormatProperties; - imageMipTailFirstLod?: number; - imageMipTailSize?: DeviceSize; - imageMipTailOffset?: DeviceSize; - imageMipTailStride?: DeviceSize; -} - -export class SparseImageMemoryRequirements implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSparseImageMemoryRequirements); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageMemoryRequirements) { - if (data === undefined) { - this.#data = new Uint8Array(SparseImageMemoryRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryRequirements.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageMemoryRequirements.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SparseImageMemoryRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.formatProperties !== undefined) this.formatProperties = data.formatProperties; - if (data.imageMipTailFirstLod !== undefined) this.imageMipTailFirstLod = data.imageMipTailFirstLod; - if (data.imageMipTailSize !== undefined) this.imageMipTailSize = data.imageMipTailSize; - if (data.imageMipTailOffset !== undefined) this.imageMipTailOffset = data.imageMipTailOffset; - if (data.imageMipTailStride !== undefined) this.imageMipTailStride = data.imageMipTailStride; - } - } - - get formatProperties() { - return new SparseImageFormatProperties(this.#data.subarray(0, 0 + SparseImageFormatProperties.size)); - } - - set formatProperties(value: SparseImageFormatProperties) { - if (value[BUFFER].byteLength < SparseImageFormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get imageMipTailFirstLod() { - return this.#view.getUint32(20, LE); - } - - set imageMipTailFirstLod(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get imageMipTailSize() { - return this.#view.getBigUint64(24, LE); - } - - set imageMipTailSize(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get imageMipTailOffset() { - return this.#view.getBigUint64(32, LE); - } - - set imageMipTailOffset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get imageMipTailStride() { - return this.#view.getBigUint64(40, LE); - } - - set imageMipTailStride(value: DeviceSize) { - this.#view.setBigUint64(40, BigInt(value), LE); - } -} - -export interface InitMemoryType { - propertyFlags?: MemoryPropertyFlags; - heapIndex?: number; -} - -export class MemoryType implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryType); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryType) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryType.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryType.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryType.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryType.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.propertyFlags !== undefined) this.propertyFlags = data.propertyFlags; - if (data.heapIndex !== undefined) this.heapIndex = data.heapIndex; - } - } - - get propertyFlags() { - return this.#view.getUint32(0, LE); - } - - set propertyFlags(value: MemoryPropertyFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get heapIndex() { - return this.#view.getUint32(4, LE); - } - - set heapIndex(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitMemoryHeap { - size?: DeviceSize; - flags?: MemoryHeapFlags; -} - -export class MemoryHeap implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryHeap); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryHeap) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryHeap.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryHeap.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryHeap.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryHeap.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.size !== undefined) this.size = data.size; - if (data.flags !== undefined) this.flags = data.flags; - } - } - - get size() { - return this.#view.getBigUint64(0, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get flags() { - return this.#view.getUint32(8, LE); - } - - set flags(value: MemoryHeapFlags) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitMappedMemoryRange { - pNext?: AnyPointer; - memory?: DeviceMemory; - offset?: DeviceSize; - size?: DeviceSize; -} - -export class MappedMemoryRange implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMappedMemoryRange); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMappedMemoryRange) { - if (data === undefined) { - this.#data = new Uint8Array(MappedMemoryRange.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MappedMemoryRange.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MappedMemoryRange.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MappedMemoryRange.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memory !== undefined) this.memory = data.memory; - if (data.offset !== undefined) this.offset = data.offset; - if (data.size !== undefined) this.size = data.size; - } - this.sType = StructureType.MAPPED_MEMORY_RANGE; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(16, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get offset() { - return this.#view.getBigUint64(24, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(32, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitFormatProperties { - linearTilingFeatures?: FormatFeatureFlags; - optimalTilingFeatures?: FormatFeatureFlags; - bufferFeatures?: FormatFeatureFlags; -} - -export class FormatProperties implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFormatProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFormatProperties) { - if (data === undefined) { - this.#data = new Uint8Array(FormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FormatProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.linearTilingFeatures !== undefined) this.linearTilingFeatures = data.linearTilingFeatures; - if (data.optimalTilingFeatures !== undefined) this.optimalTilingFeatures = data.optimalTilingFeatures; - if (data.bufferFeatures !== undefined) this.bufferFeatures = data.bufferFeatures; - } - } - - get linearTilingFeatures() { - return this.#view.getUint32(0, LE); - } - - set linearTilingFeatures(value: FormatFeatureFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get optimalTilingFeatures() { - return this.#view.getUint32(4, LE); - } - - set optimalTilingFeatures(value: FormatFeatureFlags) { - this.#view.setUint32(4, Number(value), LE); - } - - get bufferFeatures() { - return this.#view.getUint32(8, LE); - } - - set bufferFeatures(value: FormatFeatureFlags) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitImageFormatProperties { - maxExtent?: Extent3D; - maxMipLevels?: number; - maxArrayLayers?: number; - sampleCounts?: SampleCountFlags; - maxResourceSize?: DeviceSize; -} - -export class ImageFormatProperties implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageFormatProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageFormatProperties) { - if (data === undefined) { - this.#data = new Uint8Array(ImageFormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageFormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageFormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.maxExtent !== undefined) this.maxExtent = data.maxExtent; - if (data.maxMipLevels !== undefined) this.maxMipLevels = data.maxMipLevels; - if (data.maxArrayLayers !== undefined) this.maxArrayLayers = data.maxArrayLayers; - if (data.sampleCounts !== undefined) this.sampleCounts = data.sampleCounts; - if (data.maxResourceSize !== undefined) this.maxResourceSize = data.maxResourceSize; - } - } - - get maxExtent() { - return new Extent3D(this.#data.subarray(0, 0 + Extent3D.size)); - } - - set maxExtent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get maxMipLevels() { - return this.#view.getUint32(12, LE); - } - - set maxMipLevels(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get maxArrayLayers() { - return this.#view.getUint32(16, LE); - } - - set maxArrayLayers(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get sampleCounts() { - return this.#view.getUint32(20, LE); - } - - set sampleCounts(value: SampleCountFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxResourceSize() { - return this.#view.getBigUint64(24, LE); - } - - set maxResourceSize(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitDescriptorBufferInfo { - buffer?: Buffer; - offset?: DeviceSize; - range?: DeviceSize; -} - -export class DescriptorBufferInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorBufferInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorBufferInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorBufferInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorBufferInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorBufferInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorBufferInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.offset !== undefined) this.offset = data.offset; - if (data.range !== undefined) this.range = data.range; - } - } - - get buffer() { - return this.#view.getBigUint64(0, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get offset() { - return this.#view.getBigUint64(8, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get range() { - return this.#view.getBigUint64(16, LE); - } - - set range(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitDescriptorImageInfo { - sampler?: Sampler; - imageView?: ImageView; - imageLayout?: ImageLayout; -} - -export class DescriptorImageInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorImageInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorImageInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorImageInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorImageInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorImageInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorImageInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.sampler !== undefined) this.sampler = data.sampler; - if (data.imageView !== undefined) this.imageView = data.imageView; - if (data.imageLayout !== undefined) this.imageLayout = data.imageLayout; - } - } - - get sampler() { - return this.#view.getBigUint64(0, LE); - } - - set sampler(value: Sampler) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get imageView() { - return this.#view.getBigUint64(8, LE); - } - - set imageView(value: ImageView) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageLayout() { - return this.#view.getUint32(16, LE); - } - - set imageLayout(value: ImageLayout) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitWriteDescriptorSet { - pNext?: AnyPointer; - dstSet?: DescriptorSet; - dstBinding?: number; - dstArrayElement?: number; - descriptorCount?: number; - descriptorType?: DescriptorType; - pImageInfo?: AnyPointer; - pBufferInfo?: AnyPointer; - pTexelBufferView?: AnyPointer; -} - -export class WriteDescriptorSet implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitWriteDescriptorSet); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitWriteDescriptorSet) { - if (data === undefined) { - this.#data = new Uint8Array(WriteDescriptorSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSet.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < WriteDescriptorSet.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(WriteDescriptorSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.dstSet !== undefined) this.dstSet = data.dstSet; - if (data.dstBinding !== undefined) this.dstBinding = data.dstBinding; - if (data.dstArrayElement !== undefined) this.dstArrayElement = data.dstArrayElement; - if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; - if (data.descriptorType !== undefined) this.descriptorType = data.descriptorType; - if (data.pImageInfo !== undefined) this.pImageInfo = data.pImageInfo; - if (data.pBufferInfo !== undefined) this.pBufferInfo = data.pBufferInfo; - if (data.pTexelBufferView !== undefined) this.pTexelBufferView = data.pTexelBufferView; - } - this.sType = StructureType.WRITE_DESCRIPTOR_SET; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dstSet() { - return this.#view.getBigUint64(16, LE); - } - - set dstSet(value: DescriptorSet) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dstBinding() { - return this.#view.getUint32(24, LE); - } - - set dstBinding(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get dstArrayElement() { - return this.#view.getUint32(28, LE); - } - - set dstArrayElement(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get descriptorCount() { - return this.#view.getUint32(32, LE); - } - - set descriptorCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get descriptorType() { - return this.#view.getUint32(36, LE); - } - - set descriptorType(value: DescriptorType) { - this.#view.setUint32(36, Number(value), LE); - } - - get pImageInfo() { - return this.#view.getBigUint64(40, LE); - } - - set pImageInfo(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get pBufferInfo() { - return this.#view.getBigUint64(48, LE); - } - - set pBufferInfo(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get pTexelBufferView() { - return this.#view.getBigUint64(56, LE); - } - - set pTexelBufferView(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitCopyDescriptorSet { - pNext?: AnyPointer; - srcSet?: DescriptorSet; - srcBinding?: number; - srcArrayElement?: number; - dstSet?: DescriptorSet; - dstBinding?: number; - dstArrayElement?: number; - descriptorCount?: number; -} - -export class CopyDescriptorSet implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyDescriptorSet); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyDescriptorSet) { - if (data === undefined) { - this.#data = new Uint8Array(CopyDescriptorSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyDescriptorSet.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyDescriptorSet.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyDescriptorSet.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcSet !== undefined) this.srcSet = data.srcSet; - if (data.srcBinding !== undefined) this.srcBinding = data.srcBinding; - if (data.srcArrayElement !== undefined) this.srcArrayElement = data.srcArrayElement; - if (data.dstSet !== undefined) this.dstSet = data.dstSet; - if (data.dstBinding !== undefined) this.dstBinding = data.dstBinding; - if (data.dstArrayElement !== undefined) this.dstArrayElement = data.dstArrayElement; - if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; - } - this.sType = StructureType.COPY_DESCRIPTOR_SET; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcSet() { - return this.#view.getBigUint64(16, LE); - } - - set srcSet(value: DescriptorSet) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get srcBinding() { - return this.#view.getUint32(24, LE); - } - - set srcBinding(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get srcArrayElement() { - return this.#view.getUint32(28, LE); - } - - set srcArrayElement(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get dstSet() { - return this.#view.getBigUint64(32, LE); - } - - set dstSet(value: DescriptorSet) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get dstBinding() { - return this.#view.getUint32(40, LE); - } - - set dstBinding(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get dstArrayElement() { - return this.#view.getUint32(44, LE); - } - - set dstArrayElement(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get descriptorCount() { - return this.#view.getUint32(48, LE); - } - - set descriptorCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitBufferCreateInfo { - pNext?: AnyPointer; - flags?: BufferCreateFlags; - size?: DeviceSize; - usage?: BufferUsageFlags; - sharingMode?: SharingMode; - queueFamilyIndexCount?: number; - pQueueFamilyIndices?: AnyPointer; -} - -export class BufferCreateInfo implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BufferCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.size !== undefined) this.size = data.size; - if (data.usage !== undefined) this.usage = data.usage; - if (data.sharingMode !== undefined) this.sharingMode = data.sharingMode; - if (data.queueFamilyIndexCount !== undefined) this.queueFamilyIndexCount = data.queueFamilyIndexCount; - if (data.pQueueFamilyIndices !== undefined) this.pQueueFamilyIndices = data.pQueueFamilyIndices; - } - this.sType = StructureType.BUFFER_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: BufferCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get size() { - return this.#view.getBigUint64(24, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get usage() { - return this.#view.getUint32(32, LE); - } - - set usage(value: BufferUsageFlags) { - this.#view.setUint32(32, Number(value), LE); - } - - get sharingMode() { - return this.#view.getUint32(36, LE); - } - - set sharingMode(value: SharingMode) { - this.#view.setUint32(36, Number(value), LE); - } - - get queueFamilyIndexCount() { - return this.#view.getUint32(40, LE); - } - - set queueFamilyIndexCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get pQueueFamilyIndices() { - return this.#view.getBigUint64(48, LE); - } - - set pQueueFamilyIndices(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitBufferViewCreateInfo { - pNext?: AnyPointer; - flags?: BufferViewCreateFlags; - buffer?: Buffer; - format?: Format; - offset?: DeviceSize; - range?: DeviceSize; -} - -export class BufferViewCreateInfo implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferViewCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferViewCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BufferViewCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferViewCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferViewCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferViewCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.format !== undefined) this.format = data.format; - if (data.offset !== undefined) this.offset = data.offset; - if (data.range !== undefined) this.range = data.range; - } - this.sType = StructureType.BUFFER_VIEW_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: BufferViewCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get buffer() { - return this.#view.getBigUint64(24, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get format() { - return this.#view.getUint32(32, LE); - } - - set format(value: Format) { - this.#view.setUint32(32, Number(value), LE); - } - - get offset() { - return this.#view.getBigUint64(40, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get range() { - return this.#view.getBigUint64(48, LE); - } - - set range(value: DeviceSize) { - this.#view.setBigUint64(48, BigInt(value), LE); - } -} - -export interface InitImageSubresource { - aspectMask?: ImageAspectFlags; - mipLevel?: number; - arrayLayer?: number; -} - -export class ImageSubresource implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageSubresource); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageSubresource) { - if (data === undefined) { - this.#data = new Uint8Array(ImageSubresource.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresource.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSubresource.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageSubresource.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; - if (data.mipLevel !== undefined) this.mipLevel = data.mipLevel; - if (data.arrayLayer !== undefined) this.arrayLayer = data.arrayLayer; - } - } - - get aspectMask() { - return this.#view.getUint32(0, LE); - } - - set aspectMask(value: ImageAspectFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get mipLevel() { - return this.#view.getUint32(4, LE); - } - - set mipLevel(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get arrayLayer() { - return this.#view.getUint32(8, LE); - } - - set arrayLayer(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitImageSubresourceLayers { - aspectMask?: ImageAspectFlags; - mipLevel?: number; - baseArrayLayer?: number; - layerCount?: number; -} - -export class ImageSubresourceLayers implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageSubresourceLayers); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageSubresourceLayers) { - if (data === undefined) { - this.#data = new Uint8Array(ImageSubresourceLayers.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresourceLayers.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageSubresourceLayers.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; - if (data.mipLevel !== undefined) this.mipLevel = data.mipLevel; - if (data.baseArrayLayer !== undefined) this.baseArrayLayer = data.baseArrayLayer; - if (data.layerCount !== undefined) this.layerCount = data.layerCount; - } - } - - get aspectMask() { - return this.#view.getUint32(0, LE); - } - - set aspectMask(value: ImageAspectFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get mipLevel() { - return this.#view.getUint32(4, LE); - } - - set mipLevel(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get baseArrayLayer() { - return this.#view.getUint32(8, LE); - } - - set baseArrayLayer(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get layerCount() { - return this.#view.getUint32(12, LE); - } - - set layerCount(value: number) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitImageSubresourceRange { - aspectMask?: ImageAspectFlags; - baseMipLevel?: number; - levelCount?: number; - baseArrayLayer?: number; - layerCount?: number; -} - -export class ImageSubresourceRange implements BaseStruct { - static size = 20; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageSubresourceRange); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageSubresourceRange) { - if (data === undefined) { - this.#data = new Uint8Array(ImageSubresourceRange.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresourceRange.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSubresourceRange.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageSubresourceRange.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; - if (data.baseMipLevel !== undefined) this.baseMipLevel = data.baseMipLevel; - if (data.levelCount !== undefined) this.levelCount = data.levelCount; - if (data.baseArrayLayer !== undefined) this.baseArrayLayer = data.baseArrayLayer; - if (data.layerCount !== undefined) this.layerCount = data.layerCount; - } - } - - get aspectMask() { - return this.#view.getUint32(0, LE); - } - - set aspectMask(value: ImageAspectFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get baseMipLevel() { - return this.#view.getUint32(4, LE); - } - - set baseMipLevel(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get levelCount() { - return this.#view.getUint32(8, LE); - } - - set levelCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get baseArrayLayer() { - return this.#view.getUint32(12, LE); - } - - set baseArrayLayer(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get layerCount() { - return this.#view.getUint32(16, LE); - } - - set layerCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMemoryBarrier { - pNext?: AnyPointer; - srcAccessMask?: AccessFlags; - dstAccessMask?: AccessFlags; -} - -export class MemoryBarrier implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryBarrier); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryBarrier) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryBarrier.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryBarrier.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryBarrier.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryBarrier.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; - if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; - } - this.sType = StructureType.MEMORY_BARRIER; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcAccessMask() { - return this.#view.getUint32(16, LE); - } - - set srcAccessMask(value: AccessFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get dstAccessMask() { - return this.#view.getUint32(20, LE); - } - - set dstAccessMask(value: AccessFlags) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitBufferMemoryBarrier { - pNext?: AnyPointer; - srcAccessMask?: AccessFlags; - dstAccessMask?: AccessFlags; - srcQueueFamilyIndex?: number; - dstQueueFamilyIndex?: number; - buffer?: Buffer; - offset?: DeviceSize; - size?: DeviceSize; -} - -export class BufferMemoryBarrier implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferMemoryBarrier); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferMemoryBarrier) { - if (data === undefined) { - this.#data = new Uint8Array(BufferMemoryBarrier.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferMemoryBarrier.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferMemoryBarrier.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferMemoryBarrier.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; - if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; - if (data.srcQueueFamilyIndex !== undefined) this.srcQueueFamilyIndex = data.srcQueueFamilyIndex; - if (data.dstQueueFamilyIndex !== undefined) this.dstQueueFamilyIndex = data.dstQueueFamilyIndex; - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.offset !== undefined) this.offset = data.offset; - if (data.size !== undefined) this.size = data.size; - } - this.sType = StructureType.BUFFER_MEMORY_BARRIER; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcAccessMask() { - return this.#view.getUint32(16, LE); - } - - set srcAccessMask(value: AccessFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get dstAccessMask() { - return this.#view.getUint32(20, LE); - } - - set dstAccessMask(value: AccessFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get srcQueueFamilyIndex() { - return this.#view.getUint32(24, LE); - } - - set srcQueueFamilyIndex(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get dstQueueFamilyIndex() { - return this.#view.getUint32(28, LE); - } - - set dstQueueFamilyIndex(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get buffer() { - return this.#view.getBigUint64(32, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get offset() { - return this.#view.getBigUint64(40, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(48, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(48, BigInt(value), LE); - } -} - -export interface InitImageMemoryBarrier { - pNext?: AnyPointer; - srcAccessMask?: AccessFlags; - dstAccessMask?: AccessFlags; - oldLayout?: ImageLayout; - newLayout?: ImageLayout; - srcQueueFamilyIndex?: number; - dstQueueFamilyIndex?: number; - image?: Image; - subresourceRange?: ImageSubresourceRange; -} - -export class ImageMemoryBarrier implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageMemoryBarrier); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageMemoryBarrier) { - if (data === undefined) { - this.#data = new Uint8Array(ImageMemoryBarrier.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageMemoryBarrier.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageMemoryBarrier.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageMemoryBarrier.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; - if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; - if (data.oldLayout !== undefined) this.oldLayout = data.oldLayout; - if (data.newLayout !== undefined) this.newLayout = data.newLayout; - if (data.srcQueueFamilyIndex !== undefined) this.srcQueueFamilyIndex = data.srcQueueFamilyIndex; - if (data.dstQueueFamilyIndex !== undefined) this.dstQueueFamilyIndex = data.dstQueueFamilyIndex; - if (data.image !== undefined) this.image = data.image; - if (data.subresourceRange !== undefined) this.subresourceRange = data.subresourceRange; - } - this.sType = StructureType.IMAGE_MEMORY_BARRIER; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcAccessMask() { - return this.#view.getUint32(16, LE); - } - - set srcAccessMask(value: AccessFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get dstAccessMask() { - return this.#view.getUint32(20, LE); - } - - set dstAccessMask(value: AccessFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get oldLayout() { - return this.#view.getUint32(24, LE); - } - - set oldLayout(value: ImageLayout) { - this.#view.setUint32(24, Number(value), LE); - } - - get newLayout() { - return this.#view.getUint32(28, LE); - } - - set newLayout(value: ImageLayout) { - this.#view.setUint32(28, Number(value), LE); - } - - get srcQueueFamilyIndex() { - return this.#view.getUint32(32, LE); - } - - set srcQueueFamilyIndex(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get dstQueueFamilyIndex() { - return this.#view.getUint32(36, LE); - } - - set dstQueueFamilyIndex(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get image() { - return this.#view.getBigUint64(40, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get subresourceRange() { - return new ImageSubresourceRange(this.#data.subarray(48, 48 + ImageSubresourceRange.size)); - } - - set subresourceRange(value: ImageSubresourceRange) { - if (value[BUFFER].byteLength < ImageSubresourceRange.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 48); - } -} - -export interface InitImageCreateInfo { - pNext?: AnyPointer; - flags?: ImageCreateFlags; - imageType?: ImageType; - format?: Format; - extent?: Extent3D; - mipLevels?: number; - arrayLayers?: number; - samples?: SampleCountFlagBits; - tiling?: ImageTiling; - usage?: ImageUsageFlags; - sharingMode?: SharingMode; - queueFamilyIndexCount?: number; - pQueueFamilyIndices?: AnyPointer; - initialLayout?: ImageLayout; -} - -export class ImageCreateInfo implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ImageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.imageType !== undefined) this.imageType = data.imageType; - if (data.format !== undefined) this.format = data.format; - if (data.extent !== undefined) this.extent = data.extent; - if (data.mipLevels !== undefined) this.mipLevels = data.mipLevels; - if (data.arrayLayers !== undefined) this.arrayLayers = data.arrayLayers; - if (data.samples !== undefined) this.samples = data.samples; - if (data.tiling !== undefined) this.tiling = data.tiling; - if (data.usage !== undefined) this.usage = data.usage; - if (data.sharingMode !== undefined) this.sharingMode = data.sharingMode; - if (data.queueFamilyIndexCount !== undefined) this.queueFamilyIndexCount = data.queueFamilyIndexCount; - if (data.pQueueFamilyIndices !== undefined) this.pQueueFamilyIndices = data.pQueueFamilyIndices; - if (data.initialLayout !== undefined) this.initialLayout = data.initialLayout; - } - this.sType = StructureType.IMAGE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: ImageCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get imageType() { - return this.#view.getUint32(20, LE); - } - - set imageType(value: ImageType) { - this.#view.setUint32(20, Number(value), LE); - } - - get format() { - return this.#view.getUint32(24, LE); - } - - set format(value: Format) { - this.#view.setUint32(24, Number(value), LE); - } - - get extent() { - return new Extent3D(this.#data.subarray(28, 28 + Extent3D.size)); - } - - set extent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 28); - } - - get mipLevels() { - return this.#view.getUint32(40, LE); - } - - set mipLevels(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get arrayLayers() { - return this.#view.getUint32(44, LE); - } - - set arrayLayers(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get samples() { - return this.#view.getUint32(48, LE); - } - - set samples(value: SampleCountFlagBits) { - this.#view.setUint32(48, Number(value), LE); - } - - get tiling() { - return this.#view.getUint32(52, LE); - } - - set tiling(value: ImageTiling) { - this.#view.setUint32(52, Number(value), LE); - } - - get usage() { - return this.#view.getUint32(56, LE); - } - - set usage(value: ImageUsageFlags) { - this.#view.setUint32(56, Number(value), LE); - } - - get sharingMode() { - return this.#view.getUint32(60, LE); - } - - set sharingMode(value: SharingMode) { - this.#view.setUint32(60, Number(value), LE); - } - - get queueFamilyIndexCount() { - return this.#view.getUint32(64, LE); - } - - set queueFamilyIndexCount(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get pQueueFamilyIndices() { - return this.#view.getBigUint64(72, LE); - } - - set pQueueFamilyIndices(value: AnyPointer) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - - get initialLayout() { - return this.#view.getUint32(80, LE); - } - - set initialLayout(value: ImageLayout) { - this.#view.setUint32(80, Number(value), LE); - } -} - -export interface InitSubresourceLayout { - offset?: DeviceSize; - size?: DeviceSize; - rowPitch?: DeviceSize; - arrayPitch?: DeviceSize; - depthPitch?: DeviceSize; -} - -export class SubresourceLayout implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubresourceLayout); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubresourceLayout) { - if (data === undefined) { - this.#data = new Uint8Array(SubresourceLayout.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubresourceLayout.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubresourceLayout.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubresourceLayout.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.offset !== undefined) this.offset = data.offset; - if (data.size !== undefined) this.size = data.size; - if (data.rowPitch !== undefined) this.rowPitch = data.rowPitch; - if (data.arrayPitch !== undefined) this.arrayPitch = data.arrayPitch; - if (data.depthPitch !== undefined) this.depthPitch = data.depthPitch; - } - } - - get offset() { - return this.#view.getBigUint64(0, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(8, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get rowPitch() { - return this.#view.getBigUint64(16, LE); - } - - set rowPitch(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get arrayPitch() { - return this.#view.getBigUint64(24, LE); - } - - set arrayPitch(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get depthPitch() { - return this.#view.getBigUint64(32, LE); - } - - set depthPitch(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitImageViewCreateInfo { - pNext?: AnyPointer; - flags?: ImageViewCreateFlags; - image?: Image; - viewType?: ImageViewType; - format?: Format; - components?: ComponentMapping; - subresourceRange?: ImageSubresourceRange; -} - -export class ImageViewCreateInfo implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageViewCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ImageViewCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageViewCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.image !== undefined) this.image = data.image; - if (data.viewType !== undefined) this.viewType = data.viewType; - if (data.format !== undefined) this.format = data.format; - if (data.components !== undefined) this.components = data.components; - if (data.subresourceRange !== undefined) this.subresourceRange = data.subresourceRange; - } - this.sType = StructureType.IMAGE_VIEW_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: ImageViewCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get image() { - return this.#view.getBigUint64(24, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get viewType() { - return this.#view.getUint32(32, LE); - } - - set viewType(value: ImageViewType) { - this.#view.setUint32(32, Number(value), LE); - } - - get format() { - return this.#view.getUint32(36, LE); - } - - set format(value: Format) { - this.#view.setUint32(36, Number(value), LE); - } - - get components() { - return new ComponentMapping(this.#data.subarray(40, 40 + ComponentMapping.size)); - } - - set components(value: ComponentMapping) { - if (value[BUFFER].byteLength < ComponentMapping.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } - - get subresourceRange() { - return new ImageSubresourceRange(this.#data.subarray(56, 56 + ImageSubresourceRange.size)); - } - - set subresourceRange(value: ImageSubresourceRange) { - if (value[BUFFER].byteLength < ImageSubresourceRange.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 56); - } -} - -export interface InitBufferCopy { - srcOffset?: DeviceSize; - dstOffset?: DeviceSize; - size?: DeviceSize; -} - -export class BufferCopy implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferCopy); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCopy) { - if (data === undefined) { - this.#data = new Uint8Array(BufferCopy.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCopy.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCopy.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferCopy.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; - if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; - if (data.size !== undefined) this.size = data.size; - } - } - - get srcOffset() { - return this.#view.getBigUint64(0, LE); - } - - set srcOffset(value: DeviceSize) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get dstOffset() { - return this.#view.getBigUint64(8, LE); - } - - set dstOffset(value: DeviceSize) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(16, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitSparseMemoryBind { - resourceOffset?: DeviceSize; - size?: DeviceSize; - memory?: DeviceMemory; - memoryOffset?: DeviceSize; - flags?: SparseMemoryBindFlags; -} - -export class SparseMemoryBind implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSparseMemoryBind); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSparseMemoryBind) { - if (data === undefined) { - this.#data = new Uint8Array(SparseMemoryBind.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseMemoryBind.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SparseMemoryBind.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SparseMemoryBind.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.resourceOffset !== undefined) this.resourceOffset = data.resourceOffset; - if (data.size !== undefined) this.size = data.size; - if (data.memory !== undefined) this.memory = data.memory; - if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; - if (data.flags !== undefined) this.flags = data.flags; - } - } - - get resourceOffset() { - return this.#view.getBigUint64(0, LE); - } - - set resourceOffset(value: DeviceSize) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(8, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get memory() { - return this.#view.getBigUint64(16, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get memoryOffset() { - return this.#view.getBigUint64(24, LE); - } - - set memoryOffset(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get flags() { - return this.#view.getUint32(32, LE); - } - - set flags(value: SparseMemoryBindFlags) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitSparseImageMemoryBind { - subresource?: ImageSubresource; - offset?: Offset3D; - extent?: Extent3D; - memory?: DeviceMemory; - memoryOffset?: DeviceSize; - flags?: SparseMemoryBindFlags; -} - -export class SparseImageMemoryBind implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSparseImageMemoryBind); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageMemoryBind) { - if (data === undefined) { - this.#data = new Uint8Array(SparseImageMemoryBind.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryBind.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageMemoryBind.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SparseImageMemoryBind.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.subresource !== undefined) this.subresource = data.subresource; - if (data.offset !== undefined) this.offset = data.offset; - if (data.extent !== undefined) this.extent = data.extent; - if (data.memory !== undefined) this.memory = data.memory; - if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; - if (data.flags !== undefined) this.flags = data.flags; - } - } - - get subresource() { - return new ImageSubresource(this.#data.subarray(0, 0 + ImageSubresource.size)); - } - - set subresource(value: ImageSubresource) { - if (value[BUFFER].byteLength < ImageSubresource.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get offset() { - return new Offset3D(this.#data.subarray(12, 12 + Offset3D.size)); - } - - set offset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 12); - } - - get extent() { - return new Extent3D(this.#data.subarray(24, 24 + Extent3D.size)); - } - - set extent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get memory() { - return this.#view.getBigUint64(40, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get memoryOffset() { - return this.#view.getBigUint64(48, LE); - } - - set memoryOffset(value: DeviceSize) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - - get flags() { - return this.#view.getUint32(56, LE); - } - - set flags(value: SparseMemoryBindFlags) { - this.#view.setUint32(56, Number(value), LE); - } -} - -export interface InitSparseBufferMemoryBindInfo { - buffer?: Buffer; - bindCount?: number; - pBinds?: AnyPointer; -} - -export class SparseBufferMemoryBindInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSparseBufferMemoryBindInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSparseBufferMemoryBindInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SparseBufferMemoryBindInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseBufferMemoryBindInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SparseBufferMemoryBindInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SparseBufferMemoryBindInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.bindCount !== undefined) this.bindCount = data.bindCount; - if (data.pBinds !== undefined) this.pBinds = data.pBinds; - } - } - - get buffer() { - return this.#view.getBigUint64(0, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get bindCount() { - return this.#view.getUint32(8, LE); - } - - set bindCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get pBinds() { - return this.#view.getBigUint64(16, LE); - } - - set pBinds(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSparseImageOpaqueMemoryBindInfo { - image?: Image; - bindCount?: number; - pBinds?: AnyPointer; -} - -export class SparseImageOpaqueMemoryBindInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSparseImageOpaqueMemoryBindInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageOpaqueMemoryBindInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SparseImageOpaqueMemoryBindInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageOpaqueMemoryBindInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageOpaqueMemoryBindInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SparseImageOpaqueMemoryBindInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.image !== undefined) this.image = data.image; - if (data.bindCount !== undefined) this.bindCount = data.bindCount; - if (data.pBinds !== undefined) this.pBinds = data.pBinds; - } - } - - get image() { - return this.#view.getBigUint64(0, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get bindCount() { - return this.#view.getUint32(8, LE); - } - - set bindCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get pBinds() { - return this.#view.getBigUint64(16, LE); - } - - set pBinds(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSparseImageMemoryBindInfo { - image?: Image; - bindCount?: number; - pBinds?: AnyPointer; -} - -export class SparseImageMemoryBindInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSparseImageMemoryBindInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageMemoryBindInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SparseImageMemoryBindInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryBindInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageMemoryBindInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SparseImageMemoryBindInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.image !== undefined) this.image = data.image; - if (data.bindCount !== undefined) this.bindCount = data.bindCount; - if (data.pBinds !== undefined) this.pBinds = data.pBinds; - } - } - - get image() { - return this.#view.getBigUint64(0, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get bindCount() { - return this.#view.getUint32(8, LE); - } - - set bindCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get pBinds() { - return this.#view.getBigUint64(16, LE); - } - - set pBinds(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitBindSparseInfo { - pNext?: AnyPointer; - waitSemaphoreCount?: number; - pWaitSemaphores?: AnyPointer; - bufferBindCount?: number; - pBufferBinds?: AnyPointer; - imageOpaqueBindCount?: number; - pImageOpaqueBinds?: AnyPointer; - imageBindCount?: number; - pImageBinds?: AnyPointer; - signalSemaphoreCount?: number; - pSignalSemaphores?: AnyPointer; -} - -export class BindSparseInfo implements BaseStruct { - static size = 96; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindSparseInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindSparseInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BindSparseInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindSparseInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindSparseInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindSparseInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.waitSemaphoreCount !== undefined) this.waitSemaphoreCount = data.waitSemaphoreCount; - if (data.pWaitSemaphores !== undefined) this.pWaitSemaphores = data.pWaitSemaphores; - if (data.bufferBindCount !== undefined) this.bufferBindCount = data.bufferBindCount; - if (data.pBufferBinds !== undefined) this.pBufferBinds = data.pBufferBinds; - if (data.imageOpaqueBindCount !== undefined) this.imageOpaqueBindCount = data.imageOpaqueBindCount; - if (data.pImageOpaqueBinds !== undefined) this.pImageOpaqueBinds = data.pImageOpaqueBinds; - if (data.imageBindCount !== undefined) this.imageBindCount = data.imageBindCount; - if (data.pImageBinds !== undefined) this.pImageBinds = data.pImageBinds; - if (data.signalSemaphoreCount !== undefined) this.signalSemaphoreCount = data.signalSemaphoreCount; - if (data.pSignalSemaphores !== undefined) this.pSignalSemaphores = data.pSignalSemaphores; - } - this.sType = StructureType.BIND_SPARSE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get waitSemaphoreCount() { - return this.#view.getUint32(16, LE); - } - - set waitSemaphoreCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pWaitSemaphores() { - return this.#view.getBigUint64(24, LE); - } - - set pWaitSemaphores(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get bufferBindCount() { - return this.#view.getUint32(32, LE); - } - - set bufferBindCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pBufferBinds() { - return this.#view.getBigUint64(40, LE); - } - - set pBufferBinds(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get imageOpaqueBindCount() { - return this.#view.getUint32(48, LE); - } - - set imageOpaqueBindCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pImageOpaqueBinds() { - return this.#view.getBigUint64(56, LE); - } - - set pImageOpaqueBinds(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get imageBindCount() { - return this.#view.getUint32(64, LE); - } - - set imageBindCount(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get pImageBinds() { - return this.#view.getBigUint64(72, LE); - } - - set pImageBinds(value: AnyPointer) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - - get signalSemaphoreCount() { - return this.#view.getUint32(80, LE); - } - - set signalSemaphoreCount(value: number) { - this.#view.setUint32(80, Number(value), LE); - } - - get pSignalSemaphores() { - return this.#view.getBigUint64(88, LE); - } - - set pSignalSemaphores(value: AnyPointer) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageCopy { - srcSubresource?: ImageSubresourceLayers; - srcOffset?: Offset3D; - dstSubresource?: ImageSubresourceLayers; - dstOffset?: Offset3D; - extent?: Extent3D; -} - -export class ImageCopy implements BaseStruct { - static size = 68; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageCopy); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageCopy) { - if (data === undefined) { - this.#data = new Uint8Array(ImageCopy.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCopy.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCopy.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageCopy.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; - if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; - if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; - if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; - if (data.extent !== undefined) this.extent = data.extent; - } - } - - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(0, 0 + ImageSubresourceLayers.size)); - } - - set srcSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get srcOffset() { - return new Offset3D(this.#data.subarray(16, 16 + Offset3D.size)); - } - - set srcOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(28, 28 + ImageSubresourceLayers.size)); - } - - set dstSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 28); - } - - get dstOffset() { - return new Offset3D(this.#data.subarray(44, 44 + Offset3D.size)); - } - - set dstOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 44); - } - - get extent() { - return new Extent3D(this.#data.subarray(56, 56 + Extent3D.size)); - } - - set extent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 56); - } -} - -export interface InitImageBlit { - srcSubresource?: ImageSubresourceLayers; - srcOffsets?: Offset3D[]; - dstSubresource?: ImageSubresourceLayers; - dstOffsets?: Offset3D[]; -} - -export class ImageBlit implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageBlit); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageBlit) { - if (data === undefined) { - this.#data = new Uint8Array(ImageBlit.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageBlit.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageBlit.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageBlit.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; - if (data.srcOffsets !== undefined) this.srcOffsets = data.srcOffsets; - if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; - if (data.dstOffsets !== undefined) this.dstOffsets = data.dstOffsets; - } - } - - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(0, 0 + ImageSubresourceLayers.size)); - } - - set srcSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get srcOffsets() { - const result: Offset3D[] = []; - for (let i = 0; i < 2; i++) { - result.push((() => { - return new Offset3D(this.#data.subarray(16 + i * 12, 16 + i * 12 + Offset3D.size)); - })()); - } - return result; - } - - set srcOffsets(value: Offset3D[]) { - for (let i = 0; i < value.length; i++) { - if (value[i][BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[i][BUFFER], 16 + i * 12); - } - } - - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(40, 40 + ImageSubresourceLayers.size)); - } - - set dstSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } - - get dstOffsets() { - const result: Offset3D[] = []; - for (let i = 0; i < 2; i++) { - result.push((() => { - return new Offset3D(this.#data.subarray(56 + i * 12, 56 + i * 12 + Offset3D.size)); - })()); - } - return result; - } - - set dstOffsets(value: Offset3D[]) { - for (let i = 0; i < value.length; i++) { - if (value[i][BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[i][BUFFER], 56 + i * 12); - } - } -} - -export interface InitBufferImageCopy { - bufferOffset?: DeviceSize; - bufferRowLength?: number; - bufferImageHeight?: number; - imageSubresource?: ImageSubresourceLayers; - imageOffset?: Offset3D; - imageExtent?: Extent3D; -} - -export class BufferImageCopy implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferImageCopy); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferImageCopy) { - if (data === undefined) { - this.#data = new Uint8Array(BufferImageCopy.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferImageCopy.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferImageCopy.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferImageCopy.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.bufferOffset !== undefined) this.bufferOffset = data.bufferOffset; - if (data.bufferRowLength !== undefined) this.bufferRowLength = data.bufferRowLength; - if (data.bufferImageHeight !== undefined) this.bufferImageHeight = data.bufferImageHeight; - if (data.imageSubresource !== undefined) this.imageSubresource = data.imageSubresource; - if (data.imageOffset !== undefined) this.imageOffset = data.imageOffset; - if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; - } - } - - get bufferOffset() { - return this.#view.getBigUint64(0, LE); - } - - set bufferOffset(value: DeviceSize) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get bufferRowLength() { - return this.#view.getUint32(8, LE); - } - - set bufferRowLength(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get bufferImageHeight() { - return this.#view.getUint32(12, LE); - } - - set bufferImageHeight(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get imageSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - - set imageSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get imageOffset() { - return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); - } - - set imageOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get imageExtent() { - return new Extent3D(this.#data.subarray(44, 44 + Extent3D.size)); - } - - set imageExtent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 44); - } -} - -export interface InitCopyMemoryIndirectCommandNV { - srcAddress?: DeviceAddress; - dstAddress?: DeviceAddress; - size?: DeviceSize; -} - -export class CopyMemoryIndirectCommandNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyMemoryIndirectCommandNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMemoryIndirectCommandNV) { - if (data === undefined) { - this.#data = new Uint8Array(CopyMemoryIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryIndirectCommandNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMemoryIndirectCommandNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyMemoryIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.srcAddress !== undefined) this.srcAddress = data.srcAddress; - if (data.dstAddress !== undefined) this.dstAddress = data.dstAddress; - if (data.size !== undefined) this.size = data.size; - } - } - - get srcAddress() { - return this.#view.getBigUint64(0, LE); - } - - set srcAddress(value: DeviceAddress) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get dstAddress() { - return this.#view.getBigUint64(8, LE); - } - - set dstAddress(value: DeviceAddress) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(16, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitCopyMemoryToImageIndirectCommandNV { - srcAddress?: DeviceAddress; - bufferRowLength?: number; - bufferImageHeight?: number; - imageSubresource?: ImageSubresourceLayers; - imageOffset?: Offset3D; - imageExtent?: Extent3D; -} - -export class CopyMemoryToImageIndirectCommandNV implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyMemoryToImageIndirectCommandNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMemoryToImageIndirectCommandNV) { - if (data === undefined) { - this.#data = new Uint8Array(CopyMemoryToImageIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryToImageIndirectCommandNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMemoryToImageIndirectCommandNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyMemoryToImageIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.srcAddress !== undefined) this.srcAddress = data.srcAddress; - if (data.bufferRowLength !== undefined) this.bufferRowLength = data.bufferRowLength; - if (data.bufferImageHeight !== undefined) this.bufferImageHeight = data.bufferImageHeight; - if (data.imageSubresource !== undefined) this.imageSubresource = data.imageSubresource; - if (data.imageOffset !== undefined) this.imageOffset = data.imageOffset; - if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; - } - } - - get srcAddress() { - return this.#view.getBigUint64(0, LE); - } - - set srcAddress(value: DeviceAddress) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get bufferRowLength() { - return this.#view.getUint32(8, LE); - } - - set bufferRowLength(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get bufferImageHeight() { - return this.#view.getUint32(12, LE); - } - - set bufferImageHeight(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get imageSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - - set imageSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get imageOffset() { - return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); - } - - set imageOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get imageExtent() { - return new Extent3D(this.#data.subarray(44, 44 + Extent3D.size)); - } - - set imageExtent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 44); - } -} - -export interface InitImageResolve { - srcSubresource?: ImageSubresourceLayers; - srcOffset?: Offset3D; - dstSubresource?: ImageSubresourceLayers; - dstOffset?: Offset3D; - extent?: Extent3D; -} - -export class ImageResolve implements BaseStruct { - static size = 68; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageResolve); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageResolve) { - if (data === undefined) { - this.#data = new Uint8Array(ImageResolve.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageResolve.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageResolve.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageResolve.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; - if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; - if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; - if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; - if (data.extent !== undefined) this.extent = data.extent; - } - } - - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(0, 0 + ImageSubresourceLayers.size)); - } - - set srcSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get srcOffset() { - return new Offset3D(this.#data.subarray(16, 16 + Offset3D.size)); - } - - set srcOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(28, 28 + ImageSubresourceLayers.size)); - } - - set dstSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 28); - } - - get dstOffset() { - return new Offset3D(this.#data.subarray(44, 44 + Offset3D.size)); - } - - set dstOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 44); - } - - get extent() { - return new Extent3D(this.#data.subarray(56, 56 + Extent3D.size)); - } - - set extent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 56); - } -} - -export interface InitShaderModuleCreateInfo { - pNext?: AnyPointer; - flags?: ShaderModuleCreateFlags; - codeSize?: Deno.PointerValue; - pCode?: AnyPointer; -} - -export class ShaderModuleCreateInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitShaderModuleCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitShaderModuleCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ShaderModuleCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderModuleCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderModuleCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ShaderModuleCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.codeSize !== undefined) this.codeSize = data.codeSize; - if (data.pCode !== undefined) this.pCode = data.pCode; - } - this.sType = StructureType.SHADER_MODULE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: ShaderModuleCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get codeSize() { - return this.#view.getBigUint64(24, LE); - } - - set codeSize(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get pCode() { - return this.#view.getBigUint64(32, LE); - } - - set pCode(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDescriptorSetLayoutBinding { - binding?: number; - descriptorType?: DescriptorType; - descriptorCount?: number; - stageFlags?: ShaderStageFlags; - pImmutableSamplers?: AnyPointer; -} - -export class DescriptorSetLayoutBinding implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorSetLayoutBinding); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutBinding) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorSetLayoutBinding.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutBinding.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutBinding.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorSetLayoutBinding.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.binding !== undefined) this.binding = data.binding; - if (data.descriptorType !== undefined) this.descriptorType = data.descriptorType; - if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; - if (data.stageFlags !== undefined) this.stageFlags = data.stageFlags; - if (data.pImmutableSamplers !== undefined) this.pImmutableSamplers = data.pImmutableSamplers; - } - } - - get binding() { - return this.#view.getUint32(0, LE); - } - - set binding(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get descriptorType() { - return this.#view.getUint32(4, LE); - } - - set descriptorType(value: DescriptorType) { - this.#view.setUint32(4, Number(value), LE); - } - - get descriptorCount() { - return this.#view.getUint32(8, LE); - } - - set descriptorCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get stageFlags() { - return this.#view.getUint32(12, LE); - } - - set stageFlags(value: ShaderStageFlags) { - this.#view.setUint32(12, Number(value), LE); - } - - get pImmutableSamplers() { - return this.#view.getBigUint64(16, LE); - } - - set pImmutableSamplers(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDescriptorSetLayoutCreateInfo { - pNext?: AnyPointer; - flags?: DescriptorSetLayoutCreateFlags; - bindingCount?: number; - pBindings?: AnyPointer; -} - -export class DescriptorSetLayoutCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorSetLayoutCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorSetLayoutCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorSetLayoutCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.bindingCount !== undefined) this.bindingCount = data.bindingCount; - if (data.pBindings !== undefined) this.pBindings = data.pBindings; - } - this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DescriptorSetLayoutCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get bindingCount() { - return this.#view.getUint32(20, LE); - } - - set bindingCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pBindings() { - return this.#view.getBigUint64(24, LE); - } - - set pBindings(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDescriptorPoolSize { - type?: DescriptorType; - descriptorCount?: number; -} - -export class DescriptorPoolSize implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorPoolSize); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorPoolSize) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorPoolSize.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorPoolSize.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorPoolSize.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorPoolSize.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.type !== undefined) this.type = data.type; - if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; - } - } - - get type() { - return this.#view.getUint32(0, LE); - } - - set type(value: DescriptorType) { - this.#view.setUint32(0, Number(value), LE); - } - - get descriptorCount() { - return this.#view.getUint32(4, LE); - } - - set descriptorCount(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitDescriptorPoolCreateInfo { - pNext?: AnyPointer; - flags?: DescriptorPoolCreateFlags; - maxSets?: number; - poolSizeCount?: number; - pPoolSizes?: AnyPointer; -} - -export class DescriptorPoolCreateInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorPoolCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorPoolCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorPoolCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorPoolCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorPoolCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorPoolCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.maxSets !== undefined) this.maxSets = data.maxSets; - if (data.poolSizeCount !== undefined) this.poolSizeCount = data.poolSizeCount; - if (data.pPoolSizes !== undefined) this.pPoolSizes = data.pPoolSizes; - } - this.sType = StructureType.DESCRIPTOR_POOL_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DescriptorPoolCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxSets() { - return this.#view.getUint32(20, LE); - } - - set maxSets(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get poolSizeCount() { - return this.#view.getUint32(24, LE); - } - - set poolSizeCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pPoolSizes() { - return this.#view.getBigUint64(32, LE); - } - - set pPoolSizes(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDescriptorSetAllocateInfo { - pNext?: AnyPointer; - descriptorPool?: DescriptorPool; - descriptorSetCount?: number; - pSetLayouts?: AnyPointer; -} - -export class DescriptorSetAllocateInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorSetAllocateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetAllocateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorSetAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetAllocateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetAllocateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorSetAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.descriptorPool !== undefined) this.descriptorPool = data.descriptorPool; - if (data.descriptorSetCount !== undefined) this.descriptorSetCount = data.descriptorSetCount; - if (data.pSetLayouts !== undefined) this.pSetLayouts = data.pSetLayouts; - } - this.sType = StructureType.DESCRIPTOR_SET_ALLOCATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get descriptorPool() { - return this.#view.getBigUint64(16, LE); - } - - set descriptorPool(value: DescriptorPool) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get descriptorSetCount() { - return this.#view.getUint32(24, LE); - } - - set descriptorSetCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pSetLayouts() { - return this.#view.getBigUint64(32, LE); - } - - set pSetLayouts(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSpecializationMapEntry { - constantID?: number; - offset?: number; - size?: Deno.PointerValue; -} - -export class SpecializationMapEntry implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSpecializationMapEntry); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSpecializationMapEntry) { - if (data === undefined) { - this.#data = new Uint8Array(SpecializationMapEntry.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SpecializationMapEntry.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SpecializationMapEntry.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SpecializationMapEntry.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.constantID !== undefined) this.constantID = data.constantID; - if (data.offset !== undefined) this.offset = data.offset; - if (data.size !== undefined) this.size = data.size; - } - } - - get constantID() { - return this.#view.getUint32(0, LE); - } - - set constantID(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get offset() { - return this.#view.getUint32(4, LE); - } - - set offset(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get size() { - return this.#view.getBigUint64(8, LE); - } - - set size(value: Deno.PointerValue) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} - -export interface InitSpecializationInfo { - mapEntryCount?: number; - pMapEntries?: AnyPointer; - dataSize?: Deno.PointerValue; - pData?: AnyPointer; -} - -export class SpecializationInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSpecializationInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSpecializationInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SpecializationInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SpecializationInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SpecializationInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SpecializationInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.mapEntryCount !== undefined) this.mapEntryCount = data.mapEntryCount; - if (data.pMapEntries !== undefined) this.pMapEntries = data.pMapEntries; - if (data.dataSize !== undefined) this.dataSize = data.dataSize; - if (data.pData !== undefined) this.pData = data.pData; - } - } - - get mapEntryCount() { - return this.#view.getUint32(0, LE); - } - - set mapEntryCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get pMapEntries() { - return this.#view.getBigUint64(8, LE); - } - - set pMapEntries(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dataSize() { - return this.#view.getBigUint64(16, LE); - } - - set dataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get pData() { - return this.#view.getBigUint64(24, LE); - } - - set pData(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelineShaderStageCreateInfo { - pNext?: AnyPointer; - flags?: PipelineShaderStageCreateFlags; - stage?: ShaderStageFlagBits; - module?: ShaderModule; - pName?: AnyPointer; - pSpecializationInfo?: AnyPointer; -} - -export class PipelineShaderStageCreateInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineShaderStageCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineShaderStageCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineShaderStageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineShaderStageCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineShaderStageCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineShaderStageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.stage !== undefined) this.stage = data.stage; - if (data.module !== undefined) this.module = data.module; - if (data.pName !== undefined) this.pName = data.pName; - if (data.pSpecializationInfo !== undefined) this.pSpecializationInfo = data.pSpecializationInfo; - } - this.sType = StructureType.PIPELINE_SHADER_STAGE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineShaderStageCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get stage() { - return this.#view.getUint32(20, LE); - } - - set stage(value: ShaderStageFlagBits) { - this.#view.setUint32(20, Number(value), LE); - } - - get module() { - return this.#view.getBigUint64(24, LE); - } - - set module(value: ShaderModule) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pName() { - return this.#view.getBigUint64(32, LE); - } - - set pName(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get pSpecializationInfo() { - return this.#view.getBigUint64(40, LE); - } - - set pSpecializationInfo(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitComputePipelineCreateInfo { - pNext?: AnyPointer; - flags?: PipelineCreateFlags; - stage?: PipelineShaderStageCreateInfo; - layout?: PipelineLayout; - basePipelineHandle?: Pipeline; - basePipelineIndex?: number; -} - -export class ComputePipelineCreateInfo implements BaseStruct { - static size = 96; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitComputePipelineCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitComputePipelineCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ComputePipelineCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ComputePipelineCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ComputePipelineCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ComputePipelineCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.stage !== undefined) this.stage = data.stage; - if (data.layout !== undefined) this.layout = data.layout; - if (data.basePipelineHandle !== undefined) this.basePipelineHandle = data.basePipelineHandle; - if (data.basePipelineIndex !== undefined) this.basePipelineIndex = data.basePipelineIndex; - } - this.sType = StructureType.COMPUTE_PIPELINE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get stage() { - return new PipelineShaderStageCreateInfo(this.#data.subarray(20, 20 + PipelineShaderStageCreateInfo.size)); - } - - set stage(value: PipelineShaderStageCreateInfo) { - if (value[BUFFER].byteLength < PipelineShaderStageCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } - - get layout() { - return this.#view.getBigUint64(72, LE); - } - - set layout(value: PipelineLayout) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - - get basePipelineHandle() { - return this.#view.getBigUint64(80, LE); - } - - set basePipelineHandle(value: Pipeline) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } - - get basePipelineIndex() { - return this.#view.getInt32(88, LE); - } - - set basePipelineIndex(value: number) { - this.#view.setInt32(88, Number(value), LE); - } -} - -export interface InitVertexInputBindingDescription { - binding?: number; - stride?: number; - inputRate?: VertexInputRate; -} - -export class VertexInputBindingDescription implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVertexInputBindingDescription); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputBindingDescription) { - if (data === undefined) { - this.#data = new Uint8Array(VertexInputBindingDescription.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputBindingDescription.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputBindingDescription.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VertexInputBindingDescription.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.binding !== undefined) this.binding = data.binding; - if (data.stride !== undefined) this.stride = data.stride; - if (data.inputRate !== undefined) this.inputRate = data.inputRate; - } - } - - get binding() { - return this.#view.getUint32(0, LE); - } - - set binding(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get stride() { - return this.#view.getUint32(4, LE); - } - - set stride(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get inputRate() { - return this.#view.getUint32(8, LE); - } - - set inputRate(value: VertexInputRate) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitVertexInputAttributeDescription { - location?: number; - binding?: number; - format?: Format; - offset?: number; -} - -export class VertexInputAttributeDescription implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVertexInputAttributeDescription); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputAttributeDescription) { - if (data === undefined) { - this.#data = new Uint8Array(VertexInputAttributeDescription.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputAttributeDescription.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputAttributeDescription.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VertexInputAttributeDescription.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.location !== undefined) this.location = data.location; - if (data.binding !== undefined) this.binding = data.binding; - if (data.format !== undefined) this.format = data.format; - if (data.offset !== undefined) this.offset = data.offset; - } - } - - get location() { - return this.#view.getUint32(0, LE); - } - - set location(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get binding() { - return this.#view.getUint32(4, LE); - } - - set binding(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get format() { - return this.#view.getUint32(8, LE); - } - - set format(value: Format) { - this.#view.setUint32(8, Number(value), LE); - } - - get offset() { - return this.#view.getUint32(12, LE); - } - - set offset(value: number) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitPipelineVertexInputStateCreateInfo { - pNext?: AnyPointer; - flags?: PipelineVertexInputStateCreateFlags; - vertexBindingDescriptionCount?: number; - pVertexBindingDescriptions?: AnyPointer; - vertexAttributeDescriptionCount?: number; - pVertexAttributeDescriptions?: AnyPointer; -} - -export class PipelineVertexInputStateCreateInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineVertexInputStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineVertexInputStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineVertexInputStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineVertexInputStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineVertexInputStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineVertexInputStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.vertexBindingDescriptionCount !== undefined) this.vertexBindingDescriptionCount = data.vertexBindingDescriptionCount; - if (data.pVertexBindingDescriptions !== undefined) this.pVertexBindingDescriptions = data.pVertexBindingDescriptions; - if (data.vertexAttributeDescriptionCount !== undefined) this.vertexAttributeDescriptionCount = data.vertexAttributeDescriptionCount; - if (data.pVertexAttributeDescriptions !== undefined) this.pVertexAttributeDescriptions = data.pVertexAttributeDescriptions; - } - this.sType = StructureType.PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineVertexInputStateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get vertexBindingDescriptionCount() { - return this.#view.getUint32(20, LE); - } - - set vertexBindingDescriptionCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pVertexBindingDescriptions() { - return this.#view.getBigUint64(24, LE); - } - - set pVertexBindingDescriptions(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get vertexAttributeDescriptionCount() { - return this.#view.getUint32(32, LE); - } - - set vertexAttributeDescriptionCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pVertexAttributeDescriptions() { - return this.#view.getBigUint64(40, LE); - } - - set pVertexAttributeDescriptions(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelineInputAssemblyStateCreateInfo { - pNext?: AnyPointer; - flags?: PipelineInputAssemblyStateCreateFlags; - topology?: PrimitiveTopology; - primitiveRestartEnable?: Bool32; -} - -export class PipelineInputAssemblyStateCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineInputAssemblyStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineInputAssemblyStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineInputAssemblyStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineInputAssemblyStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineInputAssemblyStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineInputAssemblyStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.topology !== undefined) this.topology = data.topology; - if (data.primitiveRestartEnable !== undefined) this.primitiveRestartEnable = data.primitiveRestartEnable; - } - this.sType = StructureType.PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineInputAssemblyStateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get topology() { - return this.#view.getUint32(20, LE); - } - - set topology(value: PrimitiveTopology) { - this.#view.setUint32(20, Number(value), LE); - } - - get primitiveRestartEnable() { - return this.#view.getUint32(24, LE); - } - - set primitiveRestartEnable(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPipelineTessellationStateCreateInfo { - pNext?: AnyPointer; - flags?: PipelineTessellationStateCreateFlags; - patchControlPoints?: number; -} - -export class PipelineTessellationStateCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineTessellationStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineTessellationStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineTessellationStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineTessellationStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineTessellationStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineTessellationStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.patchControlPoints !== undefined) this.patchControlPoints = data.patchControlPoints; - } - this.sType = StructureType.PIPELINE_TESSELLATION_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineTessellationStateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get patchControlPoints() { - return this.#view.getUint32(20, LE); - } - - set patchControlPoints(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPipelineViewportStateCreateInfo { - pNext?: AnyPointer; - flags?: PipelineViewportStateCreateFlags; - viewportCount?: number; - pViewports?: AnyPointer; - scissorCount?: number; - pScissors?: AnyPointer; -} - -export class PipelineViewportStateCreateInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineViewportStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineViewportStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineViewportStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.viewportCount !== undefined) this.viewportCount = data.viewportCount; - if (data.pViewports !== undefined) this.pViewports = data.pViewports; - if (data.scissorCount !== undefined) this.scissorCount = data.scissorCount; - if (data.pScissors !== undefined) this.pScissors = data.pScissors; - } - this.sType = StructureType.PIPELINE_VIEWPORT_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineViewportStateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get viewportCount() { - return this.#view.getUint32(20, LE); - } - - set viewportCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pViewports() { - return this.#view.getBigUint64(24, LE); - } - - set pViewports(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get scissorCount() { - return this.#view.getUint32(32, LE); - } - - set scissorCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pScissors() { - return this.#view.getBigUint64(40, LE); - } - - set pScissors(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelineRasterizationStateCreateInfo { - pNext?: AnyPointer; - flags?: PipelineRasterizationStateCreateFlags; - depthClampEnable?: Bool32; - rasterizerDiscardEnable?: Bool32; - polygonMode?: PolygonMode; - cullMode?: CullModeFlags; - frontFace?: FrontFace; - depthBiasEnable?: Bool32; - depthBiasConstantFactor?: number; - depthBiasClamp?: number; - depthBiasSlopeFactor?: number; - lineWidth?: number; -} - -export class PipelineRasterizationStateCreateInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRasterizationStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRasterizationStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRasterizationStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.depthClampEnable !== undefined) this.depthClampEnable = data.depthClampEnable; - if (data.rasterizerDiscardEnable !== undefined) this.rasterizerDiscardEnable = data.rasterizerDiscardEnable; - if (data.polygonMode !== undefined) this.polygonMode = data.polygonMode; - if (data.cullMode !== undefined) this.cullMode = data.cullMode; - if (data.frontFace !== undefined) this.frontFace = data.frontFace; - if (data.depthBiasEnable !== undefined) this.depthBiasEnable = data.depthBiasEnable; - if (data.depthBiasConstantFactor !== undefined) this.depthBiasConstantFactor = data.depthBiasConstantFactor; - if (data.depthBiasClamp !== undefined) this.depthBiasClamp = data.depthBiasClamp; - if (data.depthBiasSlopeFactor !== undefined) this.depthBiasSlopeFactor = data.depthBiasSlopeFactor; - if (data.lineWidth !== undefined) this.lineWidth = data.lineWidth; - } - this.sType = StructureType.PIPELINE_RASTERIZATION_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineRasterizationStateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get depthClampEnable() { - return this.#view.getUint32(20, LE); - } - - set depthClampEnable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get rasterizerDiscardEnable() { - return this.#view.getUint32(24, LE); - } - - set rasterizerDiscardEnable(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get polygonMode() { - return this.#view.getUint32(28, LE); - } - - set polygonMode(value: PolygonMode) { - this.#view.setUint32(28, Number(value), LE); - } - - get cullMode() { - return this.#view.getUint32(32, LE); - } - - set cullMode(value: CullModeFlags) { - this.#view.setUint32(32, Number(value), LE); - } - - get frontFace() { - return this.#view.getUint32(36, LE); - } - - set frontFace(value: FrontFace) { - this.#view.setUint32(36, Number(value), LE); - } - - get depthBiasEnable() { - return this.#view.getUint32(40, LE); - } - - set depthBiasEnable(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get depthBiasConstantFactor() { - return this.#view.getFloat32(44, LE); - } - - set depthBiasConstantFactor(value: number) { - this.#view.setFloat32(44, Number(value), LE); - } - - get depthBiasClamp() { - return this.#view.getFloat32(48, LE); - } - - set depthBiasClamp(value: number) { - this.#view.setFloat32(48, Number(value), LE); - } - - get depthBiasSlopeFactor() { - return this.#view.getFloat32(52, LE); - } - - set depthBiasSlopeFactor(value: number) { - this.#view.setFloat32(52, Number(value), LE); - } - - get lineWidth() { - return this.#view.getFloat32(56, LE); - } - - set lineWidth(value: number) { - this.#view.setFloat32(56, Number(value), LE); - } -} - -export interface InitPipelineMultisampleStateCreateInfo { - pNext?: AnyPointer; - flags?: PipelineMultisampleStateCreateFlags; - rasterizationSamples?: SampleCountFlagBits; - sampleShadingEnable?: Bool32; - minSampleShading?: number; - pSampleMask?: AnyPointer; - alphaToCoverageEnable?: Bool32; - alphaToOneEnable?: Bool32; -} - -export class PipelineMultisampleStateCreateInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineMultisampleStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineMultisampleStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineMultisampleStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineMultisampleStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineMultisampleStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineMultisampleStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.rasterizationSamples !== undefined) this.rasterizationSamples = data.rasterizationSamples; - if (data.sampleShadingEnable !== undefined) this.sampleShadingEnable = data.sampleShadingEnable; - if (data.minSampleShading !== undefined) this.minSampleShading = data.minSampleShading; - if (data.pSampleMask !== undefined) this.pSampleMask = data.pSampleMask; - if (data.alphaToCoverageEnable !== undefined) this.alphaToCoverageEnable = data.alphaToCoverageEnable; - if (data.alphaToOneEnable !== undefined) this.alphaToOneEnable = data.alphaToOneEnable; - } - this.sType = StructureType.PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineMultisampleStateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get rasterizationSamples() { - return this.#view.getUint32(20, LE); - } - - set rasterizationSamples(value: SampleCountFlagBits) { - this.#view.setUint32(20, Number(value), LE); - } - - get sampleShadingEnable() { - return this.#view.getUint32(24, LE); - } - - set sampleShadingEnable(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get minSampleShading() { - return this.#view.getFloat32(28, LE); - } - - set minSampleShading(value: number) { - this.#view.setFloat32(28, Number(value), LE); - } - - get pSampleMask() { - return this.#view.getBigUint64(32, LE); - } - - set pSampleMask(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get alphaToCoverageEnable() { - return this.#view.getUint32(40, LE); - } - - set alphaToCoverageEnable(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get alphaToOneEnable() { - return this.#view.getUint32(44, LE); - } - - set alphaToOneEnable(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } -} - -export interface InitPipelineColorBlendAttachmentState { - blendEnable?: Bool32; - srcColorBlendFactor?: BlendFactor; - dstColorBlendFactor?: BlendFactor; - colorBlendOp?: BlendOp; - srcAlphaBlendFactor?: BlendFactor; - dstAlphaBlendFactor?: BlendFactor; - alphaBlendOp?: BlendOp; - colorWriteMask?: ColorComponentFlags; -} - -export class PipelineColorBlendAttachmentState implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineColorBlendAttachmentState); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineColorBlendAttachmentState) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineColorBlendAttachmentState.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorBlendAttachmentState.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineColorBlendAttachmentState.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineColorBlendAttachmentState.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.blendEnable !== undefined) this.blendEnable = data.blendEnable; - if (data.srcColorBlendFactor !== undefined) this.srcColorBlendFactor = data.srcColorBlendFactor; - if (data.dstColorBlendFactor !== undefined) this.dstColorBlendFactor = data.dstColorBlendFactor; - if (data.colorBlendOp !== undefined) this.colorBlendOp = data.colorBlendOp; - if (data.srcAlphaBlendFactor !== undefined) this.srcAlphaBlendFactor = data.srcAlphaBlendFactor; - if (data.dstAlphaBlendFactor !== undefined) this.dstAlphaBlendFactor = data.dstAlphaBlendFactor; - if (data.alphaBlendOp !== undefined) this.alphaBlendOp = data.alphaBlendOp; - if (data.colorWriteMask !== undefined) this.colorWriteMask = data.colorWriteMask; - } - } - - get blendEnable() { - return this.#view.getUint32(0, LE); - } - - set blendEnable(value: Bool32) { - this.#view.setUint32(0, Number(value), LE); - } - - get srcColorBlendFactor() { - return this.#view.getUint32(4, LE); - } - - set srcColorBlendFactor(value: BlendFactor) { - this.#view.setUint32(4, Number(value), LE); - } - - get dstColorBlendFactor() { - return this.#view.getUint32(8, LE); - } - - set dstColorBlendFactor(value: BlendFactor) { - this.#view.setUint32(8, Number(value), LE); - } - - get colorBlendOp() { - return this.#view.getUint32(12, LE); - } - - set colorBlendOp(value: BlendOp) { - this.#view.setUint32(12, Number(value), LE); - } - - get srcAlphaBlendFactor() { - return this.#view.getUint32(16, LE); - } - - set srcAlphaBlendFactor(value: BlendFactor) { - this.#view.setUint32(16, Number(value), LE); - } - - get dstAlphaBlendFactor() { - return this.#view.getUint32(20, LE); - } - - set dstAlphaBlendFactor(value: BlendFactor) { - this.#view.setUint32(20, Number(value), LE); - } - - get alphaBlendOp() { - return this.#view.getUint32(24, LE); - } - - set alphaBlendOp(value: BlendOp) { - this.#view.setUint32(24, Number(value), LE); - } - - get colorWriteMask() { - return this.#view.getUint32(28, LE); - } - - set colorWriteMask(value: ColorComponentFlags) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPipelineColorBlendStateCreateInfo { - pNext?: AnyPointer; - flags?: PipelineColorBlendStateCreateFlags; - logicOpEnable?: Bool32; - logicOp?: LogicOp; - attachmentCount?: number; - pAttachments?: AnyPointer; - blendConstants?: Float32Array; -} - -export class PipelineColorBlendStateCreateInfo implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineColorBlendStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineColorBlendStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineColorBlendStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorBlendStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineColorBlendStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineColorBlendStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.logicOpEnable !== undefined) this.logicOpEnable = data.logicOpEnable; - if (data.logicOp !== undefined) this.logicOp = data.logicOp; - if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; - if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; - if (data.blendConstants !== undefined) this.blendConstants = data.blendConstants; - } - this.sType = StructureType.PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineColorBlendStateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get logicOpEnable() { - return this.#view.getUint32(20, LE); - } - - set logicOpEnable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get logicOp() { - return this.#view.getUint32(24, LE); - } - - set logicOp(value: LogicOp) { - this.#view.setUint32(24, Number(value), LE); - } - - get attachmentCount() { - return this.#view.getUint32(28, LE); - } - - set attachmentCount(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get pAttachments() { - return this.#view.getBigUint64(32, LE); - } - - set pAttachments(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get blendConstants() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 40, 4); - } - - set blendConstants(value: Float32Array) { - this.#data.set(new Uint8Array(value.buffer), 40); - } -} - -export interface InitPipelineDynamicStateCreateInfo { - pNext?: AnyPointer; - flags?: PipelineDynamicStateCreateFlags; - dynamicStateCount?: number; - pDynamicStates?: AnyPointer; -} - -export class PipelineDynamicStateCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineDynamicStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineDynamicStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineDynamicStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineDynamicStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineDynamicStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineDynamicStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.dynamicStateCount !== undefined) this.dynamicStateCount = data.dynamicStateCount; - if (data.pDynamicStates !== undefined) this.pDynamicStates = data.pDynamicStates; - } - this.sType = StructureType.PIPELINE_DYNAMIC_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineDynamicStateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get dynamicStateCount() { - return this.#view.getUint32(20, LE); - } - - set dynamicStateCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pDynamicStates() { - return this.#view.getBigUint64(24, LE); - } - - set pDynamicStates(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStencilOpState { - failOp?: StencilOp; - passOp?: StencilOp; - depthFailOp?: StencilOp; - compareOp?: CompareOp; - compareMask?: number; - writeMask?: number; - reference?: number; -} - -export class StencilOpState implements BaseStruct { - static size = 28; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStencilOpState); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStencilOpState) { - if (data === undefined) { - this.#data = new Uint8Array(StencilOpState.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StencilOpState.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StencilOpState.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StencilOpState.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.failOp !== undefined) this.failOp = data.failOp; - if (data.passOp !== undefined) this.passOp = data.passOp; - if (data.depthFailOp !== undefined) this.depthFailOp = data.depthFailOp; - if (data.compareOp !== undefined) this.compareOp = data.compareOp; - if (data.compareMask !== undefined) this.compareMask = data.compareMask; - if (data.writeMask !== undefined) this.writeMask = data.writeMask; - if (data.reference !== undefined) this.reference = data.reference; - } - } - - get failOp() { - return this.#view.getUint32(0, LE); - } - - set failOp(value: StencilOp) { - this.#view.setUint32(0, Number(value), LE); - } - - get passOp() { - return this.#view.getUint32(4, LE); - } - - set passOp(value: StencilOp) { - this.#view.setUint32(4, Number(value), LE); - } - - get depthFailOp() { - return this.#view.getUint32(8, LE); - } - - set depthFailOp(value: StencilOp) { - this.#view.setUint32(8, Number(value), LE); - } - - get compareOp() { - return this.#view.getUint32(12, LE); - } - - set compareOp(value: CompareOp) { - this.#view.setUint32(12, Number(value), LE); - } - - get compareMask() { - return this.#view.getUint32(16, LE); - } - - set compareMask(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get writeMask() { - return this.#view.getUint32(20, LE); - } - - set writeMask(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get reference() { - return this.#view.getUint32(24, LE); - } - - set reference(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPipelineDepthStencilStateCreateInfo { - pNext?: AnyPointer; - flags?: PipelineDepthStencilStateCreateFlags; - depthTestEnable?: Bool32; - depthWriteEnable?: Bool32; - depthCompareOp?: CompareOp; - depthBoundsTestEnable?: Bool32; - stencilTestEnable?: Bool32; - front?: StencilOpState; - back?: StencilOpState; - minDepthBounds?: number; - maxDepthBounds?: number; -} - -export class PipelineDepthStencilStateCreateInfo implements BaseStruct { - static size = 104; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineDepthStencilStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineDepthStencilStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineDepthStencilStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineDepthStencilStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineDepthStencilStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineDepthStencilStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.depthTestEnable !== undefined) this.depthTestEnable = data.depthTestEnable; - if (data.depthWriteEnable !== undefined) this.depthWriteEnable = data.depthWriteEnable; - if (data.depthCompareOp !== undefined) this.depthCompareOp = data.depthCompareOp; - if (data.depthBoundsTestEnable !== undefined) this.depthBoundsTestEnable = data.depthBoundsTestEnable; - if (data.stencilTestEnable !== undefined) this.stencilTestEnable = data.stencilTestEnable; - if (data.front !== undefined) this.front = data.front; - if (data.back !== undefined) this.back = data.back; - if (data.minDepthBounds !== undefined) this.minDepthBounds = data.minDepthBounds; - if (data.maxDepthBounds !== undefined) this.maxDepthBounds = data.maxDepthBounds; - } - this.sType = StructureType.PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineDepthStencilStateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get depthTestEnable() { - return this.#view.getUint32(20, LE); - } - - set depthTestEnable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get depthWriteEnable() { - return this.#view.getUint32(24, LE); - } - - set depthWriteEnable(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get depthCompareOp() { - return this.#view.getUint32(28, LE); - } - - set depthCompareOp(value: CompareOp) { - this.#view.setUint32(28, Number(value), LE); - } - - get depthBoundsTestEnable() { - return this.#view.getUint32(32, LE); - } - - set depthBoundsTestEnable(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get stencilTestEnable() { - return this.#view.getUint32(36, LE); - } - - set stencilTestEnable(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get front() { - return new StencilOpState(this.#data.subarray(40, 40 + StencilOpState.size)); - } - - set front(value: StencilOpState) { - if (value[BUFFER].byteLength < StencilOpState.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } - - get back() { - return new StencilOpState(this.#data.subarray(68, 68 + StencilOpState.size)); - } - - set back(value: StencilOpState) { - if (value[BUFFER].byteLength < StencilOpState.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 68); - } - - get minDepthBounds() { - return this.#view.getFloat32(96, LE); - } - - set minDepthBounds(value: number) { - this.#view.setFloat32(96, Number(value), LE); - } - - get maxDepthBounds() { - return this.#view.getFloat32(100, LE); - } - - set maxDepthBounds(value: number) { - this.#view.setFloat32(100, Number(value), LE); - } -} - -export interface InitGraphicsPipelineCreateInfo { - pNext?: AnyPointer; - flags?: PipelineCreateFlags; - stageCount?: number; - pStages?: AnyPointer; - pVertexInputState?: AnyPointer; - pInputAssemblyState?: AnyPointer; - pTessellationState?: AnyPointer; - pViewportState?: AnyPointer; - pRasterizationState?: AnyPointer; - pMultisampleState?: AnyPointer; - pDepthStencilState?: AnyPointer; - pColorBlendState?: AnyPointer; - pDynamicState?: AnyPointer; - layout?: PipelineLayout; - renderPass?: RenderPass; - subpass?: number; - basePipelineHandle?: Pipeline; - basePipelineIndex?: number; -} - -export class GraphicsPipelineCreateInfo implements BaseStruct { - static size = 144; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGraphicsPipelineCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGraphicsPipelineCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(GraphicsPipelineCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsPipelineCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GraphicsPipelineCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GraphicsPipelineCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.stageCount !== undefined) this.stageCount = data.stageCount; - if (data.pStages !== undefined) this.pStages = data.pStages; - if (data.pVertexInputState !== undefined) this.pVertexInputState = data.pVertexInputState; - if (data.pInputAssemblyState !== undefined) this.pInputAssemblyState = data.pInputAssemblyState; - if (data.pTessellationState !== undefined) this.pTessellationState = data.pTessellationState; - if (data.pViewportState !== undefined) this.pViewportState = data.pViewportState; - if (data.pRasterizationState !== undefined) this.pRasterizationState = data.pRasterizationState; - if (data.pMultisampleState !== undefined) this.pMultisampleState = data.pMultisampleState; - if (data.pDepthStencilState !== undefined) this.pDepthStencilState = data.pDepthStencilState; - if (data.pColorBlendState !== undefined) this.pColorBlendState = data.pColorBlendState; - if (data.pDynamicState !== undefined) this.pDynamicState = data.pDynamicState; - if (data.layout !== undefined) this.layout = data.layout; - if (data.renderPass !== undefined) this.renderPass = data.renderPass; - if (data.subpass !== undefined) this.subpass = data.subpass; - if (data.basePipelineHandle !== undefined) this.basePipelineHandle = data.basePipelineHandle; - if (data.basePipelineIndex !== undefined) this.basePipelineIndex = data.basePipelineIndex; - } - this.sType = StructureType.GRAPHICS_PIPELINE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get stageCount() { - return this.#view.getUint32(20, LE); - } - - set stageCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pStages() { - return this.#view.getBigUint64(24, LE); - } - - set pStages(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pVertexInputState() { - return this.#view.getBigUint64(32, LE); - } - - set pVertexInputState(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get pInputAssemblyState() { - return this.#view.getBigUint64(40, LE); - } - - set pInputAssemblyState(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get pTessellationState() { - return this.#view.getBigUint64(48, LE); - } - - set pTessellationState(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get pViewportState() { - return this.#view.getBigUint64(56, LE); - } - - set pViewportState(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get pRasterizationState() { - return this.#view.getBigUint64(64, LE); - } - - set pRasterizationState(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - - get pMultisampleState() { - return this.#view.getBigUint64(72, LE); - } - - set pMultisampleState(value: AnyPointer) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - - get pDepthStencilState() { - return this.#view.getBigUint64(80, LE); - } - - set pDepthStencilState(value: AnyPointer) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } - - get pColorBlendState() { - return this.#view.getBigUint64(88, LE); - } - - set pColorBlendState(value: AnyPointer) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } - - get pDynamicState() { - return this.#view.getBigUint64(96, LE); - } - - set pDynamicState(value: AnyPointer) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } - - get layout() { - return this.#view.getBigUint64(104, LE); - } - - set layout(value: PipelineLayout) { - this.#view.setBigUint64(104, BigInt(anyPointer(value)), LE); - } - - get renderPass() { - return this.#view.getBigUint64(112, LE); - } - - set renderPass(value: RenderPass) { - this.#view.setBigUint64(112, BigInt(anyPointer(value)), LE); - } - - get subpass() { - return this.#view.getUint32(120, LE); - } - - set subpass(value: number) { - this.#view.setUint32(120, Number(value), LE); - } - - get basePipelineHandle() { - return this.#view.getBigUint64(128, LE); - } - - set basePipelineHandle(value: Pipeline) { - this.#view.setBigUint64(128, BigInt(anyPointer(value)), LE); - } - - get basePipelineIndex() { - return this.#view.getInt32(136, LE); - } - - set basePipelineIndex(value: number) { - this.#view.setInt32(136, Number(value), LE); - } -} - -export interface InitPipelineCacheCreateInfo { - pNext?: AnyPointer; - flags?: PipelineCacheCreateFlags; - initialDataSize?: Deno.PointerValue; - pInitialData?: AnyPointer; -} - -export class PipelineCacheCreateInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineCacheCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCacheCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineCacheCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCacheCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCacheCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineCacheCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.initialDataSize !== undefined) this.initialDataSize = data.initialDataSize; - if (data.pInitialData !== undefined) this.pInitialData = data.pInitialData; - } - this.sType = StructureType.PIPELINE_CACHE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineCacheCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get initialDataSize() { - return this.#view.getBigUint64(24, LE); - } - - set initialDataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get pInitialData() { - return this.#view.getBigUint64(32, LE); - } - - set pInitialData(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelineCacheHeaderVersionOne { - headerSize?: number; - headerVersion?: PipelineCacheHeaderVersion; - vendorID?: number; - deviceID?: number; - pipelineCacheUUID?: Uint8Array; -} - -export class PipelineCacheHeaderVersionOne implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineCacheHeaderVersionOne); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCacheHeaderVersionOne) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineCacheHeaderVersionOne.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCacheHeaderVersionOne.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCacheHeaderVersionOne.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineCacheHeaderVersionOne.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.headerSize !== undefined) this.headerSize = data.headerSize; - if (data.headerVersion !== undefined) this.headerVersion = data.headerVersion; - if (data.vendorID !== undefined) this.vendorID = data.vendorID; - if (data.deviceID !== undefined) this.deviceID = data.deviceID; - if (data.pipelineCacheUUID !== undefined) this.pipelineCacheUUID = data.pipelineCacheUUID; - } - } - - get headerSize() { - return this.#view.getUint32(0, LE); - } - - set headerSize(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get headerVersion() { - return this.#view.getUint32(4, LE); - } - - set headerVersion(value: PipelineCacheHeaderVersion) { - this.#view.setUint32(4, Number(value), LE); - } - - get vendorID() { - return this.#view.getUint32(8, LE); - } - - set vendorID(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get deviceID() { - return this.#view.getUint32(12, LE); - } - - set deviceID(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get pipelineCacheUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - - set pipelineCacheUUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } -} - -export interface InitPushConstantRange { - stageFlags?: ShaderStageFlags; - offset?: number; - size?: number; -} - -export class PushConstantRange implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPushConstantRange); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPushConstantRange) { - if (data === undefined) { - this.#data = new Uint8Array(PushConstantRange.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PushConstantRange.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PushConstantRange.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PushConstantRange.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.stageFlags !== undefined) this.stageFlags = data.stageFlags; - if (data.offset !== undefined) this.offset = data.offset; - if (data.size !== undefined) this.size = data.size; - } - } - - get stageFlags() { - return this.#view.getUint32(0, LE); - } - - set stageFlags(value: ShaderStageFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get offset() { - return this.#view.getUint32(4, LE); - } - - set offset(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get size() { - return this.#view.getUint32(8, LE); - } - - set size(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitPipelineLayoutCreateInfo { - pNext?: AnyPointer; - flags?: PipelineLayoutCreateFlags; - setLayoutCount?: number; - pSetLayouts?: AnyPointer; - pushConstantRangeCount?: number; - pPushConstantRanges?: AnyPointer; -} - -export class PipelineLayoutCreateInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineLayoutCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineLayoutCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineLayoutCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineLayoutCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineLayoutCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineLayoutCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.setLayoutCount !== undefined) this.setLayoutCount = data.setLayoutCount; - if (data.pSetLayouts !== undefined) this.pSetLayouts = data.pSetLayouts; - if (data.pushConstantRangeCount !== undefined) this.pushConstantRangeCount = data.pushConstantRangeCount; - if (data.pPushConstantRanges !== undefined) this.pPushConstantRanges = data.pPushConstantRanges; - } - this.sType = StructureType.PIPELINE_LAYOUT_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineLayoutCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get setLayoutCount() { - return this.#view.getUint32(20, LE); - } - - set setLayoutCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pSetLayouts() { - return this.#view.getBigUint64(24, LE); - } - - set pSetLayouts(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pushConstantRangeCount() { - return this.#view.getUint32(32, LE); - } - - set pushConstantRangeCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pPushConstantRanges() { - return this.#view.getBigUint64(40, LE); - } - - set pPushConstantRanges(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSamplerCreateInfo { - pNext?: AnyPointer; - flags?: SamplerCreateFlags; - magFilter?: Filter; - minFilter?: Filter; - mipmapMode?: SamplerMipmapMode; - addressModeU?: SamplerAddressMode; - addressModeV?: SamplerAddressMode; - addressModeW?: SamplerAddressMode; - mipLodBias?: number; - anisotropyEnable?: Bool32; - maxAnisotropy?: number; - compareEnable?: Bool32; - compareOp?: CompareOp; - minLod?: number; - maxLod?: number; - borderColor?: BorderColor; - unnormalizedCoordinates?: Bool32; -} - -export class SamplerCreateInfo implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSamplerCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SamplerCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SamplerCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.magFilter !== undefined) this.magFilter = data.magFilter; - if (data.minFilter !== undefined) this.minFilter = data.minFilter; - if (data.mipmapMode !== undefined) this.mipmapMode = data.mipmapMode; - if (data.addressModeU !== undefined) this.addressModeU = data.addressModeU; - if (data.addressModeV !== undefined) this.addressModeV = data.addressModeV; - if (data.addressModeW !== undefined) this.addressModeW = data.addressModeW; - if (data.mipLodBias !== undefined) this.mipLodBias = data.mipLodBias; - if (data.anisotropyEnable !== undefined) this.anisotropyEnable = data.anisotropyEnable; - if (data.maxAnisotropy !== undefined) this.maxAnisotropy = data.maxAnisotropy; - if (data.compareEnable !== undefined) this.compareEnable = data.compareEnable; - if (data.compareOp !== undefined) this.compareOp = data.compareOp; - if (data.minLod !== undefined) this.minLod = data.minLod; - if (data.maxLod !== undefined) this.maxLod = data.maxLod; - if (data.borderColor !== undefined) this.borderColor = data.borderColor; - if (data.unnormalizedCoordinates !== undefined) this.unnormalizedCoordinates = data.unnormalizedCoordinates; - } - this.sType = StructureType.SAMPLER_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: SamplerCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get magFilter() { - return this.#view.getUint32(20, LE); - } - - set magFilter(value: Filter) { - this.#view.setUint32(20, Number(value), LE); - } - - get minFilter() { - return this.#view.getUint32(24, LE); - } - - set minFilter(value: Filter) { - this.#view.setUint32(24, Number(value), LE); - } - - get mipmapMode() { - return this.#view.getUint32(28, LE); - } - - set mipmapMode(value: SamplerMipmapMode) { - this.#view.setUint32(28, Number(value), LE); - } - - get addressModeU() { - return this.#view.getUint32(32, LE); - } - - set addressModeU(value: SamplerAddressMode) { - this.#view.setUint32(32, Number(value), LE); - } - - get addressModeV() { - return this.#view.getUint32(36, LE); - } - - set addressModeV(value: SamplerAddressMode) { - this.#view.setUint32(36, Number(value), LE); - } - - get addressModeW() { - return this.#view.getUint32(40, LE); - } - - set addressModeW(value: SamplerAddressMode) { - this.#view.setUint32(40, Number(value), LE); - } - - get mipLodBias() { - return this.#view.getFloat32(44, LE); - } - - set mipLodBias(value: number) { - this.#view.setFloat32(44, Number(value), LE); - } - - get anisotropyEnable() { - return this.#view.getUint32(48, LE); - } - - set anisotropyEnable(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get maxAnisotropy() { - return this.#view.getFloat32(52, LE); - } - - set maxAnisotropy(value: number) { - this.#view.setFloat32(52, Number(value), LE); - } - - get compareEnable() { - return this.#view.getUint32(56, LE); - } - - set compareEnable(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get compareOp() { - return this.#view.getUint32(60, LE); - } - - set compareOp(value: CompareOp) { - this.#view.setUint32(60, Number(value), LE); - } - - get minLod() { - return this.#view.getFloat32(64, LE); - } - - set minLod(value: number) { - this.#view.setFloat32(64, Number(value), LE); - } - - get maxLod() { - return this.#view.getFloat32(68, LE); - } - - set maxLod(value: number) { - this.#view.setFloat32(68, Number(value), LE); - } - - get borderColor() { - return this.#view.getUint32(72, LE); - } - - set borderColor(value: BorderColor) { - this.#view.setUint32(72, Number(value), LE); - } - - get unnormalizedCoordinates() { - return this.#view.getUint32(76, LE); - } - - set unnormalizedCoordinates(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } -} - -export interface InitCommandPoolCreateInfo { - pNext?: AnyPointer; - flags?: CommandPoolCreateFlags; - queueFamilyIndex?: number; -} - -export class CommandPoolCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCommandPoolCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCommandPoolCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(CommandPoolCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandPoolCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CommandPoolCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CommandPoolCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; - } - this.sType = StructureType.COMMAND_POOL_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: CommandPoolCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get queueFamilyIndex() { - return this.#view.getUint32(20, LE); - } - - set queueFamilyIndex(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitCommandBufferAllocateInfo { - pNext?: AnyPointer; - commandPool?: CommandPool; - level?: CommandBufferLevel; - commandBufferCount?: number; -} - -export class CommandBufferAllocateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCommandBufferAllocateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferAllocateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(CommandBufferAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferAllocateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferAllocateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CommandBufferAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.commandPool !== undefined) this.commandPool = data.commandPool; - if (data.level !== undefined) this.level = data.level; - if (data.commandBufferCount !== undefined) this.commandBufferCount = data.commandBufferCount; - } - this.sType = StructureType.COMMAND_BUFFER_ALLOCATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get commandPool() { - return this.#view.getBigUint64(16, LE); - } - - set commandPool(value: CommandPool) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get level() { - return this.#view.getUint32(24, LE); - } - - set level(value: CommandBufferLevel) { - this.#view.setUint32(24, Number(value), LE); - } - - get commandBufferCount() { - return this.#view.getUint32(28, LE); - } - - set commandBufferCount(value: number) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitCommandBufferInheritanceInfo { - pNext?: AnyPointer; - renderPass?: RenderPass; - subpass?: number; - framebuffer?: Framebuffer; - occlusionQueryEnable?: Bool32; - queryFlags?: QueryControlFlags; - pipelineStatistics?: QueryPipelineStatisticFlags; -} - -export class CommandBufferInheritanceInfo implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCommandBufferInheritanceInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceInfo) { - if (data === undefined) { - this.#data = new Uint8Array(CommandBufferInheritanceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CommandBufferInheritanceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.renderPass !== undefined) this.renderPass = data.renderPass; - if (data.subpass !== undefined) this.subpass = data.subpass; - if (data.framebuffer !== undefined) this.framebuffer = data.framebuffer; - if (data.occlusionQueryEnable !== undefined) this.occlusionQueryEnable = data.occlusionQueryEnable; - if (data.queryFlags !== undefined) this.queryFlags = data.queryFlags; - if (data.pipelineStatistics !== undefined) this.pipelineStatistics = data.pipelineStatistics; - } - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get renderPass() { - return this.#view.getBigUint64(16, LE); - } - - set renderPass(value: RenderPass) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get subpass() { - return this.#view.getUint32(24, LE); - } - - set subpass(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get framebuffer() { - return this.#view.getBigUint64(32, LE); - } - - set framebuffer(value: Framebuffer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get occlusionQueryEnable() { - return this.#view.getUint32(40, LE); - } - - set occlusionQueryEnable(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get queryFlags() { - return this.#view.getUint32(44, LE); - } - - set queryFlags(value: QueryControlFlags) { - this.#view.setUint32(44, Number(value), LE); - } - - get pipelineStatistics() { - return this.#view.getUint32(48, LE); - } - - set pipelineStatistics(value: QueryPipelineStatisticFlags) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitCommandBufferBeginInfo { - pNext?: AnyPointer; - flags?: CommandBufferUsageFlags; - pInheritanceInfo?: AnyPointer; -} - -export class CommandBufferBeginInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCommandBufferBeginInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferBeginInfo) { - if (data === undefined) { - this.#data = new Uint8Array(CommandBufferBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferBeginInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferBeginInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CommandBufferBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pInheritanceInfo !== undefined) this.pInheritanceInfo = data.pInheritanceInfo; - } - this.sType = StructureType.COMMAND_BUFFER_BEGIN_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: CommandBufferUsageFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get pInheritanceInfo() { - return this.#view.getBigUint64(24, LE); - } - - set pInheritanceInfo(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitRenderPassBeginInfo { - pNext?: AnyPointer; - renderPass?: RenderPass; - framebuffer?: Framebuffer; - renderArea?: Rect2D; - clearValueCount?: number; - pClearValues?: AnyPointer; -} - -export class RenderPassBeginInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassBeginInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassBeginInfo) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassBeginInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassBeginInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.renderPass !== undefined) this.renderPass = data.renderPass; - if (data.framebuffer !== undefined) this.framebuffer = data.framebuffer; - if (data.renderArea !== undefined) this.renderArea = data.renderArea; - if (data.clearValueCount !== undefined) this.clearValueCount = data.clearValueCount; - if (data.pClearValues !== undefined) this.pClearValues = data.pClearValues; - } - this.sType = StructureType.RENDER_PASS_BEGIN_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get renderPass() { - return this.#view.getBigUint64(16, LE); - } - - set renderPass(value: RenderPass) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get framebuffer() { - return this.#view.getBigUint64(24, LE); - } - - set framebuffer(value: Framebuffer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get renderArea() { - return new Rect2D(this.#data.subarray(32, 32 + Rect2D.size)); - } - - set renderArea(value: Rect2D) { - if (value[BUFFER].byteLength < Rect2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get clearValueCount() { - return this.#view.getUint32(48, LE); - } - - set clearValueCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pClearValues() { - return this.#view.getBigUint64(56, LE); - } - - set pClearValues(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitClearDepthStencilValue { - depth?: number; - stencil?: number; -} - -export class ClearDepthStencilValue implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitClearDepthStencilValue); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitClearDepthStencilValue) { - if (data === undefined) { - this.#data = new Uint8Array(ClearDepthStencilValue.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ClearDepthStencilValue.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ClearDepthStencilValue.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ClearDepthStencilValue.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.depth !== undefined) this.depth = data.depth; - if (data.stencil !== undefined) this.stencil = data.stencil; - } - } - - get depth() { - return this.#view.getFloat32(0, LE); - } - - set depth(value: number) { - this.#view.setFloat32(0, Number(value), LE); - } - - get stencil() { - return this.#view.getUint32(4, LE); - } - - set stencil(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitClearAttachment { - aspectMask?: ImageAspectFlags; - colorAttachment?: number; - clearValue?: ClearValue; -} - -export class ClearAttachment implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitClearAttachment); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitClearAttachment) { - if (data === undefined) { - this.#data = new Uint8Array(ClearAttachment.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ClearAttachment.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ClearAttachment.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ClearAttachment.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; - if (data.colorAttachment !== undefined) this.colorAttachment = data.colorAttachment; - if (data.clearValue !== undefined) this.clearValue = data.clearValue; - } - } - - get aspectMask() { - return this.#view.getUint32(0, LE); - } - - set aspectMask(value: ImageAspectFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get colorAttachment() { - return this.#view.getUint32(4, LE); - } - - set colorAttachment(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get clearValue() { - throw new Error(`Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}`); - } - - set clearValue(value: ClearValue) { - throw new Error(`Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}`); - } -} - -export interface InitAttachmentDescription { - flags?: AttachmentDescriptionFlags; - format?: Format; - samples?: SampleCountFlagBits; - loadOp?: AttachmentLoadOp; - storeOp?: AttachmentStoreOp; - stencilLoadOp?: AttachmentLoadOp; - stencilStoreOp?: AttachmentStoreOp; - initialLayout?: ImageLayout; - finalLayout?: ImageLayout; -} - -export class AttachmentDescription implements BaseStruct { - static size = 36; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAttachmentDescription); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentDescription) { - if (data === undefined) { - this.#data = new Uint8Array(AttachmentDescription.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentDescription.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentDescription.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AttachmentDescription.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.format !== undefined) this.format = data.format; - if (data.samples !== undefined) this.samples = data.samples; - if (data.loadOp !== undefined) this.loadOp = data.loadOp; - if (data.storeOp !== undefined) this.storeOp = data.storeOp; - if (data.stencilLoadOp !== undefined) this.stencilLoadOp = data.stencilLoadOp; - if (data.stencilStoreOp !== undefined) this.stencilStoreOp = data.stencilStoreOp; - if (data.initialLayout !== undefined) this.initialLayout = data.initialLayout; - if (data.finalLayout !== undefined) this.finalLayout = data.finalLayout; - } - } - - get flags() { - return this.#view.getUint32(0, LE); - } - - set flags(value: AttachmentDescriptionFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get format() { - return this.#view.getUint32(4, LE); - } - - set format(value: Format) { - this.#view.setUint32(4, Number(value), LE); - } - - get samples() { - return this.#view.getUint32(8, LE); - } - - set samples(value: SampleCountFlagBits) { - this.#view.setUint32(8, Number(value), LE); - } - - get loadOp() { - return this.#view.getUint32(12, LE); - } - - set loadOp(value: AttachmentLoadOp) { - this.#view.setUint32(12, Number(value), LE); - } - - get storeOp() { - return this.#view.getUint32(16, LE); - } - - set storeOp(value: AttachmentStoreOp) { - this.#view.setUint32(16, Number(value), LE); - } - - get stencilLoadOp() { - return this.#view.getUint32(20, LE); - } - - set stencilLoadOp(value: AttachmentLoadOp) { - this.#view.setUint32(20, Number(value), LE); - } - - get stencilStoreOp() { - return this.#view.getUint32(24, LE); - } - - set stencilStoreOp(value: AttachmentStoreOp) { - this.#view.setUint32(24, Number(value), LE); - } - - get initialLayout() { - return this.#view.getUint32(28, LE); - } - - set initialLayout(value: ImageLayout) { - this.#view.setUint32(28, Number(value), LE); - } - - get finalLayout() { - return this.#view.getUint32(32, LE); - } - - set finalLayout(value: ImageLayout) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitAttachmentReference { - attachment?: number; - layout?: ImageLayout; -} - -export class AttachmentReference implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAttachmentReference); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentReference) { - if (data === undefined) { - this.#data = new Uint8Array(AttachmentReference.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentReference.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentReference.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AttachmentReference.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.attachment !== undefined) this.attachment = data.attachment; - if (data.layout !== undefined) this.layout = data.layout; - } - } - - get attachment() { - return this.#view.getUint32(0, LE); - } - - set attachment(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get layout() { - return this.#view.getUint32(4, LE); - } - - set layout(value: ImageLayout) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitSubpassDescription { - flags?: SubpassDescriptionFlags; - pipelineBindPoint?: PipelineBindPoint; - inputAttachmentCount?: number; - pInputAttachments?: AnyPointer; - colorAttachmentCount?: number; - pColorAttachments?: AnyPointer; - pResolveAttachments?: AnyPointer; - pDepthStencilAttachment?: AnyPointer; - preserveAttachmentCount?: number; - pPreserveAttachments?: AnyPointer; -} - -export class SubpassDescription implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassDescription); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDescription) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassDescription.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDescription.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDescription.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassDescription.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; - if (data.inputAttachmentCount !== undefined) this.inputAttachmentCount = data.inputAttachmentCount; - if (data.pInputAttachments !== undefined) this.pInputAttachments = data.pInputAttachments; - if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; - if (data.pColorAttachments !== undefined) this.pColorAttachments = data.pColorAttachments; - if (data.pResolveAttachments !== undefined) this.pResolveAttachments = data.pResolveAttachments; - if (data.pDepthStencilAttachment !== undefined) this.pDepthStencilAttachment = data.pDepthStencilAttachment; - if (data.preserveAttachmentCount !== undefined) this.preserveAttachmentCount = data.preserveAttachmentCount; - if (data.pPreserveAttachments !== undefined) this.pPreserveAttachments = data.pPreserveAttachments; - } - } - - get flags() { - return this.#view.getUint32(0, LE); - } - - set flags(value: SubpassDescriptionFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get pipelineBindPoint() { - return this.#view.getUint32(4, LE); - } - - set pipelineBindPoint(value: PipelineBindPoint) { - this.#view.setUint32(4, Number(value), LE); - } - - get inputAttachmentCount() { - return this.#view.getUint32(8, LE); - } - - set inputAttachmentCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get pInputAttachments() { - return this.#view.getBigUint64(16, LE); - } - - set pInputAttachments(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get colorAttachmentCount() { - return this.#view.getUint32(24, LE); - } - - set colorAttachmentCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pColorAttachments() { - return this.#view.getBigUint64(32, LE); - } - - set pColorAttachments(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get pResolveAttachments() { - return this.#view.getBigUint64(40, LE); - } - - set pResolveAttachments(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get pDepthStencilAttachment() { - return this.#view.getBigUint64(48, LE); - } - - set pDepthStencilAttachment(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get preserveAttachmentCount() { - return this.#view.getUint32(56, LE); - } - - set preserveAttachmentCount(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get pPreserveAttachments() { - return this.#view.getBigUint64(64, LE); - } - - set pPreserveAttachments(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSubpassDependency { - srcSubpass?: number; - dstSubpass?: number; - srcStageMask?: PipelineStageFlags; - dstStageMask?: PipelineStageFlags; - srcAccessMask?: AccessFlags; - dstAccessMask?: AccessFlags; - dependencyFlags?: DependencyFlags; -} - -export class SubpassDependency implements BaseStruct { - static size = 28; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassDependency); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDependency) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassDependency.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDependency.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDependency.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassDependency.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.srcSubpass !== undefined) this.srcSubpass = data.srcSubpass; - if (data.dstSubpass !== undefined) this.dstSubpass = data.dstSubpass; - if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; - if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; - if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; - if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; - if (data.dependencyFlags !== undefined) this.dependencyFlags = data.dependencyFlags; - } - } - - get srcSubpass() { - return this.#view.getUint32(0, LE); - } - - set srcSubpass(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get dstSubpass() { - return this.#view.getUint32(4, LE); - } - - set dstSubpass(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get srcStageMask() { - return this.#view.getUint32(8, LE); - } - - set srcStageMask(value: PipelineStageFlags) { - this.#view.setUint32(8, Number(value), LE); - } - - get dstStageMask() { - return this.#view.getUint32(12, LE); - } - - set dstStageMask(value: PipelineStageFlags) { - this.#view.setUint32(12, Number(value), LE); - } - - get srcAccessMask() { - return this.#view.getUint32(16, LE); - } - - set srcAccessMask(value: AccessFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get dstAccessMask() { - return this.#view.getUint32(20, LE); - } - - set dstAccessMask(value: AccessFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get dependencyFlags() { - return this.#view.getUint32(24, LE); - } - - set dependencyFlags(value: DependencyFlags) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitRenderPassCreateInfo { - pNext?: AnyPointer; - flags?: RenderPassCreateFlags; - attachmentCount?: number; - pAttachments?: AnyPointer; - subpassCount?: number; - pSubpasses?: AnyPointer; - dependencyCount?: number; - pDependencies?: AnyPointer; -} - -export class RenderPassCreateInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; - if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; - if (data.subpassCount !== undefined) this.subpassCount = data.subpassCount; - if (data.pSubpasses !== undefined) this.pSubpasses = data.pSubpasses; - if (data.dependencyCount !== undefined) this.dependencyCount = data.dependencyCount; - if (data.pDependencies !== undefined) this.pDependencies = data.pDependencies; - } - this.sType = StructureType.RENDER_PASS_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: RenderPassCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get attachmentCount() { - return this.#view.getUint32(20, LE); - } - - set attachmentCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pAttachments() { - return this.#view.getBigUint64(24, LE); - } - - set pAttachments(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get subpassCount() { - return this.#view.getUint32(32, LE); - } - - set subpassCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pSubpasses() { - return this.#view.getBigUint64(40, LE); - } - - set pSubpasses(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get dependencyCount() { - return this.#view.getUint32(48, LE); - } - - set dependencyCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pDependencies() { - return this.#view.getBigUint64(56, LE); - } - - set pDependencies(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitEventCreateInfo { - pNext?: AnyPointer; - flags?: EventCreateFlags; -} - -export class EventCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitEventCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitEventCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(EventCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, EventCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < EventCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(EventCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.EVENT_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: EventCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitFenceCreateInfo { - pNext?: AnyPointer; - flags?: FenceCreateFlags; -} - -export class FenceCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFenceCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFenceCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(FenceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FenceCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FenceCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FenceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.FENCE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: FenceCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFeatures { - robustBufferAccess?: Bool32; - fullDrawIndexUint32?: Bool32; - imageCubeArray?: Bool32; - independentBlend?: Bool32; - geometryShader?: Bool32; - tessellationShader?: Bool32; - sampleRateShading?: Bool32; - dualSrcBlend?: Bool32; - logicOp?: Bool32; - multiDrawIndirect?: Bool32; - drawIndirectFirstInstance?: Bool32; - depthClamp?: Bool32; - depthBiasClamp?: Bool32; - fillModeNonSolid?: Bool32; - depthBounds?: Bool32; - wideLines?: Bool32; - largePoints?: Bool32; - alphaToOne?: Bool32; - multiViewport?: Bool32; - samplerAnisotropy?: Bool32; - textureCompressionETC2?: Bool32; - textureCompressionASTC_LDR?: Bool32; - textureCompressionBC?: Bool32; - occlusionQueryPrecise?: Bool32; - pipelineStatisticsQuery?: Bool32; - vertexPipelineStoresAndAtomics?: Bool32; - fragmentStoresAndAtomics?: Bool32; - shaderTessellationAndGeometryPointSize?: Bool32; - shaderImageGatherExtended?: Bool32; - shaderStorageImageExtendedFormats?: Bool32; - shaderStorageImageMultisample?: Bool32; - shaderStorageImageReadWithoutFormat?: Bool32; - shaderStorageImageWriteWithoutFormat?: Bool32; - shaderUniformBufferArrayDynamicIndexing?: Bool32; - shaderSampledImageArrayDynamicIndexing?: Bool32; - shaderStorageBufferArrayDynamicIndexing?: Bool32; - shaderStorageImageArrayDynamicIndexing?: Bool32; - shaderClipDistance?: Bool32; - shaderCullDistance?: Bool32; - shaderFloat64?: Bool32; - shaderInt64?: Bool32; - shaderInt16?: Bool32; - shaderResourceResidency?: Bool32; - shaderResourceMinLod?: Bool32; - sparseBinding?: Bool32; - sparseResidencyBuffer?: Bool32; - sparseResidencyImage2D?: Bool32; - sparseResidencyImage3D?: Bool32; - sparseResidency2Samples?: Bool32; - sparseResidency4Samples?: Bool32; - sparseResidency8Samples?: Bool32; - sparseResidency16Samples?: Bool32; - sparseResidencyAliased?: Bool32; - variableMultisampleRate?: Bool32; - inheritedQueries?: Bool32; -} - -export class PhysicalDeviceFeatures implements BaseStruct { - static size = 220; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.robustBufferAccess !== undefined) this.robustBufferAccess = data.robustBufferAccess; - if (data.fullDrawIndexUint32 !== undefined) this.fullDrawIndexUint32 = data.fullDrawIndexUint32; - if (data.imageCubeArray !== undefined) this.imageCubeArray = data.imageCubeArray; - if (data.independentBlend !== undefined) this.independentBlend = data.independentBlend; - if (data.geometryShader !== undefined) this.geometryShader = data.geometryShader; - if (data.tessellationShader !== undefined) this.tessellationShader = data.tessellationShader; - if (data.sampleRateShading !== undefined) this.sampleRateShading = data.sampleRateShading; - if (data.dualSrcBlend !== undefined) this.dualSrcBlend = data.dualSrcBlend; - if (data.logicOp !== undefined) this.logicOp = data.logicOp; - if (data.multiDrawIndirect !== undefined) this.multiDrawIndirect = data.multiDrawIndirect; - if (data.drawIndirectFirstInstance !== undefined) this.drawIndirectFirstInstance = data.drawIndirectFirstInstance; - if (data.depthClamp !== undefined) this.depthClamp = data.depthClamp; - if (data.depthBiasClamp !== undefined) this.depthBiasClamp = data.depthBiasClamp; - if (data.fillModeNonSolid !== undefined) this.fillModeNonSolid = data.fillModeNonSolid; - if (data.depthBounds !== undefined) this.depthBounds = data.depthBounds; - if (data.wideLines !== undefined) this.wideLines = data.wideLines; - if (data.largePoints !== undefined) this.largePoints = data.largePoints; - if (data.alphaToOne !== undefined) this.alphaToOne = data.alphaToOne; - if (data.multiViewport !== undefined) this.multiViewport = data.multiViewport; - if (data.samplerAnisotropy !== undefined) this.samplerAnisotropy = data.samplerAnisotropy; - if (data.textureCompressionETC2 !== undefined) this.textureCompressionETC2 = data.textureCompressionETC2; - if (data.textureCompressionASTC_LDR !== undefined) this.textureCompressionASTC_LDR = data.textureCompressionASTC_LDR; - if (data.textureCompressionBC !== undefined) this.textureCompressionBC = data.textureCompressionBC; - if (data.occlusionQueryPrecise !== undefined) this.occlusionQueryPrecise = data.occlusionQueryPrecise; - if (data.pipelineStatisticsQuery !== undefined) this.pipelineStatisticsQuery = data.pipelineStatisticsQuery; - if (data.vertexPipelineStoresAndAtomics !== undefined) this.vertexPipelineStoresAndAtomics = data.vertexPipelineStoresAndAtomics; - if (data.fragmentStoresAndAtomics !== undefined) this.fragmentStoresAndAtomics = data.fragmentStoresAndAtomics; - if (data.shaderTessellationAndGeometryPointSize !== undefined) this.shaderTessellationAndGeometryPointSize = data.shaderTessellationAndGeometryPointSize; - if (data.shaderImageGatherExtended !== undefined) this.shaderImageGatherExtended = data.shaderImageGatherExtended; - if (data.shaderStorageImageExtendedFormats !== undefined) this.shaderStorageImageExtendedFormats = data.shaderStorageImageExtendedFormats; - if (data.shaderStorageImageMultisample !== undefined) this.shaderStorageImageMultisample = data.shaderStorageImageMultisample; - if (data.shaderStorageImageReadWithoutFormat !== undefined) this.shaderStorageImageReadWithoutFormat = data.shaderStorageImageReadWithoutFormat; - if (data.shaderStorageImageWriteWithoutFormat !== undefined) this.shaderStorageImageWriteWithoutFormat = data.shaderStorageImageWriteWithoutFormat; - if (data.shaderUniformBufferArrayDynamicIndexing !== undefined) this.shaderUniformBufferArrayDynamicIndexing = data.shaderUniformBufferArrayDynamicIndexing; - if (data.shaderSampledImageArrayDynamicIndexing !== undefined) this.shaderSampledImageArrayDynamicIndexing = data.shaderSampledImageArrayDynamicIndexing; - if (data.shaderStorageBufferArrayDynamicIndexing !== undefined) this.shaderStorageBufferArrayDynamicIndexing = data.shaderStorageBufferArrayDynamicIndexing; - if (data.shaderStorageImageArrayDynamicIndexing !== undefined) this.shaderStorageImageArrayDynamicIndexing = data.shaderStorageImageArrayDynamicIndexing; - if (data.shaderClipDistance !== undefined) this.shaderClipDistance = data.shaderClipDistance; - if (data.shaderCullDistance !== undefined) this.shaderCullDistance = data.shaderCullDistance; - if (data.shaderFloat64 !== undefined) this.shaderFloat64 = data.shaderFloat64; - if (data.shaderInt64 !== undefined) this.shaderInt64 = data.shaderInt64; - if (data.shaderInt16 !== undefined) this.shaderInt16 = data.shaderInt16; - if (data.shaderResourceResidency !== undefined) this.shaderResourceResidency = data.shaderResourceResidency; - if (data.shaderResourceMinLod !== undefined) this.shaderResourceMinLod = data.shaderResourceMinLod; - if (data.sparseBinding !== undefined) this.sparseBinding = data.sparseBinding; - if (data.sparseResidencyBuffer !== undefined) this.sparseResidencyBuffer = data.sparseResidencyBuffer; - if (data.sparseResidencyImage2D !== undefined) this.sparseResidencyImage2D = data.sparseResidencyImage2D; - if (data.sparseResidencyImage3D !== undefined) this.sparseResidencyImage3D = data.sparseResidencyImage3D; - if (data.sparseResidency2Samples !== undefined) this.sparseResidency2Samples = data.sparseResidency2Samples; - if (data.sparseResidency4Samples !== undefined) this.sparseResidency4Samples = data.sparseResidency4Samples; - if (data.sparseResidency8Samples !== undefined) this.sparseResidency8Samples = data.sparseResidency8Samples; - if (data.sparseResidency16Samples !== undefined) this.sparseResidency16Samples = data.sparseResidency16Samples; - if (data.sparseResidencyAliased !== undefined) this.sparseResidencyAliased = data.sparseResidencyAliased; - if (data.variableMultisampleRate !== undefined) this.variableMultisampleRate = data.variableMultisampleRate; - if (data.inheritedQueries !== undefined) this.inheritedQueries = data.inheritedQueries; - } - } - - get robustBufferAccess() { - return this.#view.getUint32(0, LE); - } - - set robustBufferAccess(value: Bool32) { - this.#view.setUint32(0, Number(value), LE); - } - - get fullDrawIndexUint32() { - return this.#view.getUint32(4, LE); - } - - set fullDrawIndexUint32(value: Bool32) { - this.#view.setUint32(4, Number(value), LE); - } - - get imageCubeArray() { - return this.#view.getUint32(8, LE); - } - - set imageCubeArray(value: Bool32) { - this.#view.setUint32(8, Number(value), LE); - } - - get independentBlend() { - return this.#view.getUint32(12, LE); - } - - set independentBlend(value: Bool32) { - this.#view.setUint32(12, Number(value), LE); - } - - get geometryShader() { - return this.#view.getUint32(16, LE); - } - - set geometryShader(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get tessellationShader() { - return this.#view.getUint32(20, LE); - } - - set tessellationShader(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get sampleRateShading() { - return this.#view.getUint32(24, LE); - } - - set sampleRateShading(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get dualSrcBlend() { - return this.#view.getUint32(28, LE); - } - - set dualSrcBlend(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get logicOp() { - return this.#view.getUint32(32, LE); - } - - set logicOp(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get multiDrawIndirect() { - return this.#view.getUint32(36, LE); - } - - set multiDrawIndirect(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get drawIndirectFirstInstance() { - return this.#view.getUint32(40, LE); - } - - set drawIndirectFirstInstance(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get depthClamp() { - return this.#view.getUint32(44, LE); - } - - set depthClamp(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get depthBiasClamp() { - return this.#view.getUint32(48, LE); - } - - set depthBiasClamp(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get fillModeNonSolid() { - return this.#view.getUint32(52, LE); - } - - set fillModeNonSolid(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get depthBounds() { - return this.#view.getUint32(56, LE); - } - - set depthBounds(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get wideLines() { - return this.#view.getUint32(60, LE); - } - - set wideLines(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get largePoints() { - return this.#view.getUint32(64, LE); - } - - set largePoints(value: Bool32) { - this.#view.setUint32(64, Number(value), LE); - } - - get alphaToOne() { - return this.#view.getUint32(68, LE); - } - - set alphaToOne(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get multiViewport() { - return this.#view.getUint32(72, LE); - } - - set multiViewport(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } - - get samplerAnisotropy() { - return this.#view.getUint32(76, LE); - } - - set samplerAnisotropy(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } - - get textureCompressionETC2() { - return this.#view.getUint32(80, LE); - } - - set textureCompressionETC2(value: Bool32) { - this.#view.setUint32(80, Number(value), LE); - } - - get textureCompressionASTC_LDR() { - return this.#view.getUint32(84, LE); - } - - set textureCompressionASTC_LDR(value: Bool32) { - this.#view.setUint32(84, Number(value), LE); - } - - get textureCompressionBC() { - return this.#view.getUint32(88, LE); - } - - set textureCompressionBC(value: Bool32) { - this.#view.setUint32(88, Number(value), LE); - } - - get occlusionQueryPrecise() { - return this.#view.getUint32(92, LE); - } - - set occlusionQueryPrecise(value: Bool32) { - this.#view.setUint32(92, Number(value), LE); - } - - get pipelineStatisticsQuery() { - return this.#view.getUint32(96, LE); - } - - set pipelineStatisticsQuery(value: Bool32) { - this.#view.setUint32(96, Number(value), LE); - } - - get vertexPipelineStoresAndAtomics() { - return this.#view.getUint32(100, LE); - } - - set vertexPipelineStoresAndAtomics(value: Bool32) { - this.#view.setUint32(100, Number(value), LE); - } - - get fragmentStoresAndAtomics() { - return this.#view.getUint32(104, LE); - } - - set fragmentStoresAndAtomics(value: Bool32) { - this.#view.setUint32(104, Number(value), LE); - } - - get shaderTessellationAndGeometryPointSize() { - return this.#view.getUint32(108, LE); - } - - set shaderTessellationAndGeometryPointSize(value: Bool32) { - this.#view.setUint32(108, Number(value), LE); - } - - get shaderImageGatherExtended() { - return this.#view.getUint32(112, LE); - } - - set shaderImageGatherExtended(value: Bool32) { - this.#view.setUint32(112, Number(value), LE); - } - - get shaderStorageImageExtendedFormats() { - return this.#view.getUint32(116, LE); - } - - set shaderStorageImageExtendedFormats(value: Bool32) { - this.#view.setUint32(116, Number(value), LE); - } - - get shaderStorageImageMultisample() { - return this.#view.getUint32(120, LE); - } - - set shaderStorageImageMultisample(value: Bool32) { - this.#view.setUint32(120, Number(value), LE); - } - - get shaderStorageImageReadWithoutFormat() { - return this.#view.getUint32(124, LE); - } - - set shaderStorageImageReadWithoutFormat(value: Bool32) { - this.#view.setUint32(124, Number(value), LE); - } - - get shaderStorageImageWriteWithoutFormat() { - return this.#view.getUint32(128, LE); - } - - set shaderStorageImageWriteWithoutFormat(value: Bool32) { - this.#view.setUint32(128, Number(value), LE); - } - - get shaderUniformBufferArrayDynamicIndexing() { - return this.#view.getUint32(132, LE); - } - - set shaderUniformBufferArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(132, Number(value), LE); - } - - get shaderSampledImageArrayDynamicIndexing() { - return this.#view.getUint32(136, LE); - } - - set shaderSampledImageArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(136, Number(value), LE); - } - - get shaderStorageBufferArrayDynamicIndexing() { - return this.#view.getUint32(140, LE); - } - - set shaderStorageBufferArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(140, Number(value), LE); - } - - get shaderStorageImageArrayDynamicIndexing() { - return this.#view.getUint32(144, LE); - } - - set shaderStorageImageArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(144, Number(value), LE); - } - - get shaderClipDistance() { - return this.#view.getUint32(148, LE); - } - - set shaderClipDistance(value: Bool32) { - this.#view.setUint32(148, Number(value), LE); - } - - get shaderCullDistance() { - return this.#view.getUint32(152, LE); - } - - set shaderCullDistance(value: Bool32) { - this.#view.setUint32(152, Number(value), LE); - } - - get shaderFloat64() { - return this.#view.getUint32(156, LE); - } - - set shaderFloat64(value: Bool32) { - this.#view.setUint32(156, Number(value), LE); - } - - get shaderInt64() { - return this.#view.getUint32(160, LE); - } - - set shaderInt64(value: Bool32) { - this.#view.setUint32(160, Number(value), LE); - } - - get shaderInt16() { - return this.#view.getUint32(164, LE); - } - - set shaderInt16(value: Bool32) { - this.#view.setUint32(164, Number(value), LE); - } - - get shaderResourceResidency() { - return this.#view.getUint32(168, LE); - } - - set shaderResourceResidency(value: Bool32) { - this.#view.setUint32(168, Number(value), LE); - } - - get shaderResourceMinLod() { - return this.#view.getUint32(172, LE); - } - - set shaderResourceMinLod(value: Bool32) { - this.#view.setUint32(172, Number(value), LE); - } - - get sparseBinding() { - return this.#view.getUint32(176, LE); - } - - set sparseBinding(value: Bool32) { - this.#view.setUint32(176, Number(value), LE); - } - - get sparseResidencyBuffer() { - return this.#view.getUint32(180, LE); - } - - set sparseResidencyBuffer(value: Bool32) { - this.#view.setUint32(180, Number(value), LE); - } - - get sparseResidencyImage2D() { - return this.#view.getUint32(184, LE); - } - - set sparseResidencyImage2D(value: Bool32) { - this.#view.setUint32(184, Number(value), LE); - } - - get sparseResidencyImage3D() { - return this.#view.getUint32(188, LE); - } - - set sparseResidencyImage3D(value: Bool32) { - this.#view.setUint32(188, Number(value), LE); - } - - get sparseResidency2Samples() { - return this.#view.getUint32(192, LE); - } - - set sparseResidency2Samples(value: Bool32) { - this.#view.setUint32(192, Number(value), LE); - } - - get sparseResidency4Samples() { - return this.#view.getUint32(196, LE); - } - - set sparseResidency4Samples(value: Bool32) { - this.#view.setUint32(196, Number(value), LE); - } - - get sparseResidency8Samples() { - return this.#view.getUint32(200, LE); - } - - set sparseResidency8Samples(value: Bool32) { - this.#view.setUint32(200, Number(value), LE); - } - - get sparseResidency16Samples() { - return this.#view.getUint32(204, LE); - } - - set sparseResidency16Samples(value: Bool32) { - this.#view.setUint32(204, Number(value), LE); - } - - get sparseResidencyAliased() { - return this.#view.getUint32(208, LE); - } - - set sparseResidencyAliased(value: Bool32) { - this.#view.setUint32(208, Number(value), LE); - } - - get variableMultisampleRate() { - return this.#view.getUint32(212, LE); - } - - set variableMultisampleRate(value: Bool32) { - this.#view.setUint32(212, Number(value), LE); - } - - get inheritedQueries() { - return this.#view.getUint32(216, LE); - } - - set inheritedQueries(value: Bool32) { - this.#view.setUint32(216, Number(value), LE); - } -} - -export interface InitPhysicalDeviceSparseProperties { - residencyStandard2DBlockShape?: Bool32; - residencyStandard2DMultisampleBlockShape?: Bool32; - residencyStandard3DBlockShape?: Bool32; - residencyAlignedMipSize?: Bool32; - residencyNonResidentStrict?: Bool32; -} - -export class PhysicalDeviceSparseProperties implements BaseStruct { - static size = 20; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSparseProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSparseProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSparseProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSparseProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSparseProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSparseProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.residencyStandard2DBlockShape !== undefined) this.residencyStandard2DBlockShape = data.residencyStandard2DBlockShape; - if (data.residencyStandard2DMultisampleBlockShape !== undefined) this.residencyStandard2DMultisampleBlockShape = data.residencyStandard2DMultisampleBlockShape; - if (data.residencyStandard3DBlockShape !== undefined) this.residencyStandard3DBlockShape = data.residencyStandard3DBlockShape; - if (data.residencyAlignedMipSize !== undefined) this.residencyAlignedMipSize = data.residencyAlignedMipSize; - if (data.residencyNonResidentStrict !== undefined) this.residencyNonResidentStrict = data.residencyNonResidentStrict; - } - } - - get residencyStandard2DBlockShape() { - return this.#view.getUint32(0, LE); - } - - set residencyStandard2DBlockShape(value: Bool32) { - this.#view.setUint32(0, Number(value), LE); - } - - get residencyStandard2DMultisampleBlockShape() { - return this.#view.getUint32(4, LE); - } - - set residencyStandard2DMultisampleBlockShape(value: Bool32) { - this.#view.setUint32(4, Number(value), LE); - } - - get residencyStandard3DBlockShape() { - return this.#view.getUint32(8, LE); - } - - set residencyStandard3DBlockShape(value: Bool32) { - this.#view.setUint32(8, Number(value), LE); - } - - get residencyAlignedMipSize() { - return this.#view.getUint32(12, LE); - } - - set residencyAlignedMipSize(value: Bool32) { - this.#view.setUint32(12, Number(value), LE); - } - - get residencyNonResidentStrict() { - return this.#view.getUint32(16, LE); - } - - set residencyNonResidentStrict(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceLimits { - maxImageDimension1D?: number; - maxImageDimension2D?: number; - maxImageDimension3D?: number; - maxImageDimensionCube?: number; - maxImageArrayLayers?: number; - maxTexelBufferElements?: number; - maxUniformBufferRange?: number; - maxStorageBufferRange?: number; - maxPushConstantsSize?: number; - maxMemoryAllocationCount?: number; - maxSamplerAllocationCount?: number; - bufferImageGranularity?: DeviceSize; - sparseAddressSpaceSize?: DeviceSize; - maxBoundDescriptorSets?: number; - maxPerStageDescriptorSamplers?: number; - maxPerStageDescriptorUniformBuffers?: number; - maxPerStageDescriptorStorageBuffers?: number; - maxPerStageDescriptorSampledImages?: number; - maxPerStageDescriptorStorageImages?: number; - maxPerStageDescriptorInputAttachments?: number; - maxPerStageResources?: number; - maxDescriptorSetSamplers?: number; - maxDescriptorSetUniformBuffers?: number; - maxDescriptorSetUniformBuffersDynamic?: number; - maxDescriptorSetStorageBuffers?: number; - maxDescriptorSetStorageBuffersDynamic?: number; - maxDescriptorSetSampledImages?: number; - maxDescriptorSetStorageImages?: number; - maxDescriptorSetInputAttachments?: number; - maxVertexInputAttributes?: number; - maxVertexInputBindings?: number; - maxVertexInputAttributeOffset?: number; - maxVertexInputBindingStride?: number; - maxVertexOutputComponents?: number; - maxTessellationGenerationLevel?: number; - maxTessellationPatchSize?: number; - maxTessellationControlPerVertexInputComponents?: number; - maxTessellationControlPerVertexOutputComponents?: number; - maxTessellationControlPerPatchOutputComponents?: number; - maxTessellationControlTotalOutputComponents?: number; - maxTessellationEvaluationInputComponents?: number; - maxTessellationEvaluationOutputComponents?: number; - maxGeometryShaderInvocations?: number; - maxGeometryInputComponents?: number; - maxGeometryOutputComponents?: number; - maxGeometryOutputVertices?: number; - maxGeometryTotalOutputComponents?: number; - maxFragmentInputComponents?: number; - maxFragmentOutputAttachments?: number; - maxFragmentDualSrcAttachments?: number; - maxFragmentCombinedOutputResources?: number; - maxComputeSharedMemorySize?: number; - maxComputeWorkGroupCount?: Uint32Array; - maxComputeWorkGroupInvocations?: number; - maxComputeWorkGroupSize?: Uint32Array; - subPixelPrecisionBits?: number; - subTexelPrecisionBits?: number; - mipmapPrecisionBits?: number; - maxDrawIndexedIndexValue?: number; - maxDrawIndirectCount?: number; - maxSamplerLodBias?: number; - maxSamplerAnisotropy?: number; - maxViewports?: number; - maxViewportDimensions?: Uint32Array; - viewportBoundsRange?: Float32Array; - viewportSubPixelBits?: number; - minMemoryMapAlignment?: Deno.PointerValue; - minTexelBufferOffsetAlignment?: DeviceSize; - minUniformBufferOffsetAlignment?: DeviceSize; - minStorageBufferOffsetAlignment?: DeviceSize; - minTexelOffset?: number; - maxTexelOffset?: number; - minTexelGatherOffset?: number; - maxTexelGatherOffset?: number; - minInterpolationOffset?: number; - maxInterpolationOffset?: number; - subPixelInterpolationOffsetBits?: number; - maxFramebufferWidth?: number; - maxFramebufferHeight?: number; - maxFramebufferLayers?: number; - framebufferColorSampleCounts?: SampleCountFlags; - framebufferDepthSampleCounts?: SampleCountFlags; - framebufferStencilSampleCounts?: SampleCountFlags; - framebufferNoAttachmentsSampleCounts?: SampleCountFlags; - maxColorAttachments?: number; - sampledImageColorSampleCounts?: SampleCountFlags; - sampledImageIntegerSampleCounts?: SampleCountFlags; - sampledImageDepthSampleCounts?: SampleCountFlags; - sampledImageStencilSampleCounts?: SampleCountFlags; - storageImageSampleCounts?: SampleCountFlags; - maxSampleMaskWords?: number; - timestampComputeAndGraphics?: Bool32; - timestampPeriod?: number; - maxClipDistances?: number; - maxCullDistances?: number; - maxCombinedClipAndCullDistances?: number; - discreteQueuePriorities?: number; - pointSizeRange?: Float32Array; - lineWidthRange?: Float32Array; - pointSizeGranularity?: number; - lineWidthGranularity?: number; - strictLines?: Bool32; - standardSampleLocations?: Bool32; - optimalBufferCopyOffsetAlignment?: DeviceSize; - optimalBufferCopyRowPitchAlignment?: DeviceSize; - nonCoherentAtomSize?: DeviceSize; -} - -export class PhysicalDeviceLimits implements BaseStruct { - static size = 504; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceLimits); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLimits) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceLimits.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLimits.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLimits.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceLimits.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.maxImageDimension1D !== undefined) this.maxImageDimension1D = data.maxImageDimension1D; - if (data.maxImageDimension2D !== undefined) this.maxImageDimension2D = data.maxImageDimension2D; - if (data.maxImageDimension3D !== undefined) this.maxImageDimension3D = data.maxImageDimension3D; - if (data.maxImageDimensionCube !== undefined) this.maxImageDimensionCube = data.maxImageDimensionCube; - if (data.maxImageArrayLayers !== undefined) this.maxImageArrayLayers = data.maxImageArrayLayers; - if (data.maxTexelBufferElements !== undefined) this.maxTexelBufferElements = data.maxTexelBufferElements; - if (data.maxUniformBufferRange !== undefined) this.maxUniformBufferRange = data.maxUniformBufferRange; - if (data.maxStorageBufferRange !== undefined) this.maxStorageBufferRange = data.maxStorageBufferRange; - if (data.maxPushConstantsSize !== undefined) this.maxPushConstantsSize = data.maxPushConstantsSize; - if (data.maxMemoryAllocationCount !== undefined) this.maxMemoryAllocationCount = data.maxMemoryAllocationCount; - if (data.maxSamplerAllocationCount !== undefined) this.maxSamplerAllocationCount = data.maxSamplerAllocationCount; - if (data.bufferImageGranularity !== undefined) this.bufferImageGranularity = data.bufferImageGranularity; - if (data.sparseAddressSpaceSize !== undefined) this.sparseAddressSpaceSize = data.sparseAddressSpaceSize; - if (data.maxBoundDescriptorSets !== undefined) this.maxBoundDescriptorSets = data.maxBoundDescriptorSets; - if (data.maxPerStageDescriptorSamplers !== undefined) this.maxPerStageDescriptorSamplers = data.maxPerStageDescriptorSamplers; - if (data.maxPerStageDescriptorUniformBuffers !== undefined) this.maxPerStageDescriptorUniformBuffers = data.maxPerStageDescriptorUniformBuffers; - if (data.maxPerStageDescriptorStorageBuffers !== undefined) this.maxPerStageDescriptorStorageBuffers = data.maxPerStageDescriptorStorageBuffers; - if (data.maxPerStageDescriptorSampledImages !== undefined) this.maxPerStageDescriptorSampledImages = data.maxPerStageDescriptorSampledImages; - if (data.maxPerStageDescriptorStorageImages !== undefined) this.maxPerStageDescriptorStorageImages = data.maxPerStageDescriptorStorageImages; - if (data.maxPerStageDescriptorInputAttachments !== undefined) this.maxPerStageDescriptorInputAttachments = data.maxPerStageDescriptorInputAttachments; - if (data.maxPerStageResources !== undefined) this.maxPerStageResources = data.maxPerStageResources; - if (data.maxDescriptorSetSamplers !== undefined) this.maxDescriptorSetSamplers = data.maxDescriptorSetSamplers; - if (data.maxDescriptorSetUniformBuffers !== undefined) this.maxDescriptorSetUniformBuffers = data.maxDescriptorSetUniformBuffers; - if (data.maxDescriptorSetUniformBuffersDynamic !== undefined) this.maxDescriptorSetUniformBuffersDynamic = data.maxDescriptorSetUniformBuffersDynamic; - if (data.maxDescriptorSetStorageBuffers !== undefined) this.maxDescriptorSetStorageBuffers = data.maxDescriptorSetStorageBuffers; - if (data.maxDescriptorSetStorageBuffersDynamic !== undefined) this.maxDescriptorSetStorageBuffersDynamic = data.maxDescriptorSetStorageBuffersDynamic; - if (data.maxDescriptorSetSampledImages !== undefined) this.maxDescriptorSetSampledImages = data.maxDescriptorSetSampledImages; - if (data.maxDescriptorSetStorageImages !== undefined) this.maxDescriptorSetStorageImages = data.maxDescriptorSetStorageImages; - if (data.maxDescriptorSetInputAttachments !== undefined) this.maxDescriptorSetInputAttachments = data.maxDescriptorSetInputAttachments; - if (data.maxVertexInputAttributes !== undefined) this.maxVertexInputAttributes = data.maxVertexInputAttributes; - if (data.maxVertexInputBindings !== undefined) this.maxVertexInputBindings = data.maxVertexInputBindings; - if (data.maxVertexInputAttributeOffset !== undefined) this.maxVertexInputAttributeOffset = data.maxVertexInputAttributeOffset; - if (data.maxVertexInputBindingStride !== undefined) this.maxVertexInputBindingStride = data.maxVertexInputBindingStride; - if (data.maxVertexOutputComponents !== undefined) this.maxVertexOutputComponents = data.maxVertexOutputComponents; - if (data.maxTessellationGenerationLevel !== undefined) this.maxTessellationGenerationLevel = data.maxTessellationGenerationLevel; - if (data.maxTessellationPatchSize !== undefined) this.maxTessellationPatchSize = data.maxTessellationPatchSize; - if (data.maxTessellationControlPerVertexInputComponents !== undefined) this.maxTessellationControlPerVertexInputComponents = data.maxTessellationControlPerVertexInputComponents; - if (data.maxTessellationControlPerVertexOutputComponents !== undefined) this.maxTessellationControlPerVertexOutputComponents = data.maxTessellationControlPerVertexOutputComponents; - if (data.maxTessellationControlPerPatchOutputComponents !== undefined) this.maxTessellationControlPerPatchOutputComponents = data.maxTessellationControlPerPatchOutputComponents; - if (data.maxTessellationControlTotalOutputComponents !== undefined) this.maxTessellationControlTotalOutputComponents = data.maxTessellationControlTotalOutputComponents; - if (data.maxTessellationEvaluationInputComponents !== undefined) this.maxTessellationEvaluationInputComponents = data.maxTessellationEvaluationInputComponents; - if (data.maxTessellationEvaluationOutputComponents !== undefined) this.maxTessellationEvaluationOutputComponents = data.maxTessellationEvaluationOutputComponents; - if (data.maxGeometryShaderInvocations !== undefined) this.maxGeometryShaderInvocations = data.maxGeometryShaderInvocations; - if (data.maxGeometryInputComponents !== undefined) this.maxGeometryInputComponents = data.maxGeometryInputComponents; - if (data.maxGeometryOutputComponents !== undefined) this.maxGeometryOutputComponents = data.maxGeometryOutputComponents; - if (data.maxGeometryOutputVertices !== undefined) this.maxGeometryOutputVertices = data.maxGeometryOutputVertices; - if (data.maxGeometryTotalOutputComponents !== undefined) this.maxGeometryTotalOutputComponents = data.maxGeometryTotalOutputComponents; - if (data.maxFragmentInputComponents !== undefined) this.maxFragmentInputComponents = data.maxFragmentInputComponents; - if (data.maxFragmentOutputAttachments !== undefined) this.maxFragmentOutputAttachments = data.maxFragmentOutputAttachments; - if (data.maxFragmentDualSrcAttachments !== undefined) this.maxFragmentDualSrcAttachments = data.maxFragmentDualSrcAttachments; - if (data.maxFragmentCombinedOutputResources !== undefined) this.maxFragmentCombinedOutputResources = data.maxFragmentCombinedOutputResources; - if (data.maxComputeSharedMemorySize !== undefined) this.maxComputeSharedMemorySize = data.maxComputeSharedMemorySize; - if (data.maxComputeWorkGroupCount !== undefined) this.maxComputeWorkGroupCount = data.maxComputeWorkGroupCount; - if (data.maxComputeWorkGroupInvocations !== undefined) this.maxComputeWorkGroupInvocations = data.maxComputeWorkGroupInvocations; - if (data.maxComputeWorkGroupSize !== undefined) this.maxComputeWorkGroupSize = data.maxComputeWorkGroupSize; - if (data.subPixelPrecisionBits !== undefined) this.subPixelPrecisionBits = data.subPixelPrecisionBits; - if (data.subTexelPrecisionBits !== undefined) this.subTexelPrecisionBits = data.subTexelPrecisionBits; - if (data.mipmapPrecisionBits !== undefined) this.mipmapPrecisionBits = data.mipmapPrecisionBits; - if (data.maxDrawIndexedIndexValue !== undefined) this.maxDrawIndexedIndexValue = data.maxDrawIndexedIndexValue; - if (data.maxDrawIndirectCount !== undefined) this.maxDrawIndirectCount = data.maxDrawIndirectCount; - if (data.maxSamplerLodBias !== undefined) this.maxSamplerLodBias = data.maxSamplerLodBias; - if (data.maxSamplerAnisotropy !== undefined) this.maxSamplerAnisotropy = data.maxSamplerAnisotropy; - if (data.maxViewports !== undefined) this.maxViewports = data.maxViewports; - if (data.maxViewportDimensions !== undefined) this.maxViewportDimensions = data.maxViewportDimensions; - if (data.viewportBoundsRange !== undefined) this.viewportBoundsRange = data.viewportBoundsRange; - if (data.viewportSubPixelBits !== undefined) this.viewportSubPixelBits = data.viewportSubPixelBits; - if (data.minMemoryMapAlignment !== undefined) this.minMemoryMapAlignment = data.minMemoryMapAlignment; - if (data.minTexelBufferOffsetAlignment !== undefined) this.minTexelBufferOffsetAlignment = data.minTexelBufferOffsetAlignment; - if (data.minUniformBufferOffsetAlignment !== undefined) this.minUniformBufferOffsetAlignment = data.minUniformBufferOffsetAlignment; - if (data.minStorageBufferOffsetAlignment !== undefined) this.minStorageBufferOffsetAlignment = data.minStorageBufferOffsetAlignment; - if (data.minTexelOffset !== undefined) this.minTexelOffset = data.minTexelOffset; - if (data.maxTexelOffset !== undefined) this.maxTexelOffset = data.maxTexelOffset; - if (data.minTexelGatherOffset !== undefined) this.minTexelGatherOffset = data.minTexelGatherOffset; - if (data.maxTexelGatherOffset !== undefined) this.maxTexelGatherOffset = data.maxTexelGatherOffset; - if (data.minInterpolationOffset !== undefined) this.minInterpolationOffset = data.minInterpolationOffset; - if (data.maxInterpolationOffset !== undefined) this.maxInterpolationOffset = data.maxInterpolationOffset; - if (data.subPixelInterpolationOffsetBits !== undefined) this.subPixelInterpolationOffsetBits = data.subPixelInterpolationOffsetBits; - if (data.maxFramebufferWidth !== undefined) this.maxFramebufferWidth = data.maxFramebufferWidth; - if (data.maxFramebufferHeight !== undefined) this.maxFramebufferHeight = data.maxFramebufferHeight; - if (data.maxFramebufferLayers !== undefined) this.maxFramebufferLayers = data.maxFramebufferLayers; - if (data.framebufferColorSampleCounts !== undefined) this.framebufferColorSampleCounts = data.framebufferColorSampleCounts; - if (data.framebufferDepthSampleCounts !== undefined) this.framebufferDepthSampleCounts = data.framebufferDepthSampleCounts; - if (data.framebufferStencilSampleCounts !== undefined) this.framebufferStencilSampleCounts = data.framebufferStencilSampleCounts; - if (data.framebufferNoAttachmentsSampleCounts !== undefined) this.framebufferNoAttachmentsSampleCounts = data.framebufferNoAttachmentsSampleCounts; - if (data.maxColorAttachments !== undefined) this.maxColorAttachments = data.maxColorAttachments; - if (data.sampledImageColorSampleCounts !== undefined) this.sampledImageColorSampleCounts = data.sampledImageColorSampleCounts; - if (data.sampledImageIntegerSampleCounts !== undefined) this.sampledImageIntegerSampleCounts = data.sampledImageIntegerSampleCounts; - if (data.sampledImageDepthSampleCounts !== undefined) this.sampledImageDepthSampleCounts = data.sampledImageDepthSampleCounts; - if (data.sampledImageStencilSampleCounts !== undefined) this.sampledImageStencilSampleCounts = data.sampledImageStencilSampleCounts; - if (data.storageImageSampleCounts !== undefined) this.storageImageSampleCounts = data.storageImageSampleCounts; - if (data.maxSampleMaskWords !== undefined) this.maxSampleMaskWords = data.maxSampleMaskWords; - if (data.timestampComputeAndGraphics !== undefined) this.timestampComputeAndGraphics = data.timestampComputeAndGraphics; - if (data.timestampPeriod !== undefined) this.timestampPeriod = data.timestampPeriod; - if (data.maxClipDistances !== undefined) this.maxClipDistances = data.maxClipDistances; - if (data.maxCullDistances !== undefined) this.maxCullDistances = data.maxCullDistances; - if (data.maxCombinedClipAndCullDistances !== undefined) this.maxCombinedClipAndCullDistances = data.maxCombinedClipAndCullDistances; - if (data.discreteQueuePriorities !== undefined) this.discreteQueuePriorities = data.discreteQueuePriorities; - if (data.pointSizeRange !== undefined) this.pointSizeRange = data.pointSizeRange; - if (data.lineWidthRange !== undefined) this.lineWidthRange = data.lineWidthRange; - if (data.pointSizeGranularity !== undefined) this.pointSizeGranularity = data.pointSizeGranularity; - if (data.lineWidthGranularity !== undefined) this.lineWidthGranularity = data.lineWidthGranularity; - if (data.strictLines !== undefined) this.strictLines = data.strictLines; - if (data.standardSampleLocations !== undefined) this.standardSampleLocations = data.standardSampleLocations; - if (data.optimalBufferCopyOffsetAlignment !== undefined) this.optimalBufferCopyOffsetAlignment = data.optimalBufferCopyOffsetAlignment; - if (data.optimalBufferCopyRowPitchAlignment !== undefined) this.optimalBufferCopyRowPitchAlignment = data.optimalBufferCopyRowPitchAlignment; - if (data.nonCoherentAtomSize !== undefined) this.nonCoherentAtomSize = data.nonCoherentAtomSize; - } - } - - get maxImageDimension1D() { - return this.#view.getUint32(0, LE); - } - - set maxImageDimension1D(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get maxImageDimension2D() { - return this.#view.getUint32(4, LE); - } - - set maxImageDimension2D(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get maxImageDimension3D() { - return this.#view.getUint32(8, LE); - } - - set maxImageDimension3D(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get maxImageDimensionCube() { - return this.#view.getUint32(12, LE); - } - - set maxImageDimensionCube(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get maxImageArrayLayers() { - return this.#view.getUint32(16, LE); - } - - set maxImageArrayLayers(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxTexelBufferElements() { - return this.#view.getUint32(20, LE); - } - - set maxTexelBufferElements(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxUniformBufferRange() { - return this.#view.getUint32(24, LE); - } - - set maxUniformBufferRange(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get maxStorageBufferRange() { - return this.#view.getUint32(28, LE); - } - - set maxStorageBufferRange(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get maxPushConstantsSize() { - return this.#view.getUint32(32, LE); - } - - set maxPushConstantsSize(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get maxMemoryAllocationCount() { - return this.#view.getUint32(36, LE); - } - - set maxMemoryAllocationCount(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get maxSamplerAllocationCount() { - return this.#view.getUint32(40, LE); - } - - set maxSamplerAllocationCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get bufferImageGranularity() { - return this.#view.getBigUint64(48, LE); - } - - set bufferImageGranularity(value: DeviceSize) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - - get sparseAddressSpaceSize() { - return this.#view.getBigUint64(56, LE); - } - - set sparseAddressSpaceSize(value: DeviceSize) { - this.#view.setBigUint64(56, BigInt(value), LE); - } - - get maxBoundDescriptorSets() { - return this.#view.getUint32(64, LE); - } - - set maxBoundDescriptorSets(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get maxPerStageDescriptorSamplers() { - return this.#view.getUint32(68, LE); - } - - set maxPerStageDescriptorSamplers(value: number) { - this.#view.setUint32(68, Number(value), LE); - } - - get maxPerStageDescriptorUniformBuffers() { - return this.#view.getUint32(72, LE); - } - - set maxPerStageDescriptorUniformBuffers(value: number) { - this.#view.setUint32(72, Number(value), LE); - } - - get maxPerStageDescriptorStorageBuffers() { - return this.#view.getUint32(76, LE); - } - - set maxPerStageDescriptorStorageBuffers(value: number) { - this.#view.setUint32(76, Number(value), LE); - } - - get maxPerStageDescriptorSampledImages() { - return this.#view.getUint32(80, LE); - } - - set maxPerStageDescriptorSampledImages(value: number) { - this.#view.setUint32(80, Number(value), LE); - } - - get maxPerStageDescriptorStorageImages() { - return this.#view.getUint32(84, LE); - } - - set maxPerStageDescriptorStorageImages(value: number) { - this.#view.setUint32(84, Number(value), LE); - } - - get maxPerStageDescriptorInputAttachments() { - return this.#view.getUint32(88, LE); - } - - set maxPerStageDescriptorInputAttachments(value: number) { - this.#view.setUint32(88, Number(value), LE); - } - - get maxPerStageResources() { - return this.#view.getUint32(92, LE); - } - - set maxPerStageResources(value: number) { - this.#view.setUint32(92, Number(value), LE); - } - - get maxDescriptorSetSamplers() { - return this.#view.getUint32(96, LE); - } - - set maxDescriptorSetSamplers(value: number) { - this.#view.setUint32(96, Number(value), LE); - } - - get maxDescriptorSetUniformBuffers() { - return this.#view.getUint32(100, LE); - } - - set maxDescriptorSetUniformBuffers(value: number) { - this.#view.setUint32(100, Number(value), LE); - } - - get maxDescriptorSetUniformBuffersDynamic() { - return this.#view.getUint32(104, LE); - } - - set maxDescriptorSetUniformBuffersDynamic(value: number) { - this.#view.setUint32(104, Number(value), LE); - } - - get maxDescriptorSetStorageBuffers() { - return this.#view.getUint32(108, LE); - } - - set maxDescriptorSetStorageBuffers(value: number) { - this.#view.setUint32(108, Number(value), LE); - } - - get maxDescriptorSetStorageBuffersDynamic() { - return this.#view.getUint32(112, LE); - } - - set maxDescriptorSetStorageBuffersDynamic(value: number) { - this.#view.setUint32(112, Number(value), LE); - } - - get maxDescriptorSetSampledImages() { - return this.#view.getUint32(116, LE); - } - - set maxDescriptorSetSampledImages(value: number) { - this.#view.setUint32(116, Number(value), LE); - } - - get maxDescriptorSetStorageImages() { - return this.#view.getUint32(120, LE); - } - - set maxDescriptorSetStorageImages(value: number) { - this.#view.setUint32(120, Number(value), LE); - } - - get maxDescriptorSetInputAttachments() { - return this.#view.getUint32(124, LE); - } - - set maxDescriptorSetInputAttachments(value: number) { - this.#view.setUint32(124, Number(value), LE); - } - - get maxVertexInputAttributes() { - return this.#view.getUint32(128, LE); - } - - set maxVertexInputAttributes(value: number) { - this.#view.setUint32(128, Number(value), LE); - } - - get maxVertexInputBindings() { - return this.#view.getUint32(132, LE); - } - - set maxVertexInputBindings(value: number) { - this.#view.setUint32(132, Number(value), LE); - } - - get maxVertexInputAttributeOffset() { - return this.#view.getUint32(136, LE); - } - - set maxVertexInputAttributeOffset(value: number) { - this.#view.setUint32(136, Number(value), LE); - } - - get maxVertexInputBindingStride() { - return this.#view.getUint32(140, LE); - } - - set maxVertexInputBindingStride(value: number) { - this.#view.setUint32(140, Number(value), LE); - } - - get maxVertexOutputComponents() { - return this.#view.getUint32(144, LE); - } - - set maxVertexOutputComponents(value: number) { - this.#view.setUint32(144, Number(value), LE); - } - - get maxTessellationGenerationLevel() { - return this.#view.getUint32(148, LE); - } - - set maxTessellationGenerationLevel(value: number) { - this.#view.setUint32(148, Number(value), LE); - } - - get maxTessellationPatchSize() { - return this.#view.getUint32(152, LE); - } - - set maxTessellationPatchSize(value: number) { - this.#view.setUint32(152, Number(value), LE); - } - - get maxTessellationControlPerVertexInputComponents() { - return this.#view.getUint32(156, LE); - } - - set maxTessellationControlPerVertexInputComponents(value: number) { - this.#view.setUint32(156, Number(value), LE); - } - - get maxTessellationControlPerVertexOutputComponents() { - return this.#view.getUint32(160, LE); - } - - set maxTessellationControlPerVertexOutputComponents(value: number) { - this.#view.setUint32(160, Number(value), LE); - } - - get maxTessellationControlPerPatchOutputComponents() { - return this.#view.getUint32(164, LE); - } - - set maxTessellationControlPerPatchOutputComponents(value: number) { - this.#view.setUint32(164, Number(value), LE); - } - - get maxTessellationControlTotalOutputComponents() { - return this.#view.getUint32(168, LE); - } - - set maxTessellationControlTotalOutputComponents(value: number) { - this.#view.setUint32(168, Number(value), LE); - } - - get maxTessellationEvaluationInputComponents() { - return this.#view.getUint32(172, LE); - } - - set maxTessellationEvaluationInputComponents(value: number) { - this.#view.setUint32(172, Number(value), LE); - } - - get maxTessellationEvaluationOutputComponents() { - return this.#view.getUint32(176, LE); - } - - set maxTessellationEvaluationOutputComponents(value: number) { - this.#view.setUint32(176, Number(value), LE); - } - - get maxGeometryShaderInvocations() { - return this.#view.getUint32(180, LE); - } - - set maxGeometryShaderInvocations(value: number) { - this.#view.setUint32(180, Number(value), LE); - } - - get maxGeometryInputComponents() { - return this.#view.getUint32(184, LE); - } - - set maxGeometryInputComponents(value: number) { - this.#view.setUint32(184, Number(value), LE); - } - - get maxGeometryOutputComponents() { - return this.#view.getUint32(188, LE); - } - - set maxGeometryOutputComponents(value: number) { - this.#view.setUint32(188, Number(value), LE); - } - - get maxGeometryOutputVertices() { - return this.#view.getUint32(192, LE); - } - - set maxGeometryOutputVertices(value: number) { - this.#view.setUint32(192, Number(value), LE); - } - - get maxGeometryTotalOutputComponents() { - return this.#view.getUint32(196, LE); - } - - set maxGeometryTotalOutputComponents(value: number) { - this.#view.setUint32(196, Number(value), LE); - } - - get maxFragmentInputComponents() { - return this.#view.getUint32(200, LE); - } - - set maxFragmentInputComponents(value: number) { - this.#view.setUint32(200, Number(value), LE); - } - - get maxFragmentOutputAttachments() { - return this.#view.getUint32(204, LE); - } - - set maxFragmentOutputAttachments(value: number) { - this.#view.setUint32(204, Number(value), LE); - } - - get maxFragmentDualSrcAttachments() { - return this.#view.getUint32(208, LE); - } - - set maxFragmentDualSrcAttachments(value: number) { - this.#view.setUint32(208, Number(value), LE); - } - - get maxFragmentCombinedOutputResources() { - return this.#view.getUint32(212, LE); - } - - set maxFragmentCombinedOutputResources(value: number) { - this.#view.setUint32(212, Number(value), LE); - } - - get maxComputeSharedMemorySize() { - return this.#view.getUint32(216, LE); - } - - set maxComputeSharedMemorySize(value: number) { - this.#view.setUint32(216, Number(value), LE); - } - - get maxComputeWorkGroupCount() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 220, 3); - } - - set maxComputeWorkGroupCount(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 220); - } - - get maxComputeWorkGroupInvocations() { - return this.#view.getUint32(232, LE); - } - - set maxComputeWorkGroupInvocations(value: number) { - this.#view.setUint32(232, Number(value), LE); - } - - get maxComputeWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 236, 3); - } - - set maxComputeWorkGroupSize(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 236); - } - - get subPixelPrecisionBits() { - return this.#view.getUint32(248, LE); - } - - set subPixelPrecisionBits(value: number) { - this.#view.setUint32(248, Number(value), LE); - } - - get subTexelPrecisionBits() { - return this.#view.getUint32(252, LE); - } - - set subTexelPrecisionBits(value: number) { - this.#view.setUint32(252, Number(value), LE); - } - - get mipmapPrecisionBits() { - return this.#view.getUint32(256, LE); - } - - set mipmapPrecisionBits(value: number) { - this.#view.setUint32(256, Number(value), LE); - } - - get maxDrawIndexedIndexValue() { - return this.#view.getUint32(260, LE); - } - - set maxDrawIndexedIndexValue(value: number) { - this.#view.setUint32(260, Number(value), LE); - } - - get maxDrawIndirectCount() { - return this.#view.getUint32(264, LE); - } - - set maxDrawIndirectCount(value: number) { - this.#view.setUint32(264, Number(value), LE); - } - - get maxSamplerLodBias() { - return this.#view.getFloat32(268, LE); - } - - set maxSamplerLodBias(value: number) { - this.#view.setFloat32(268, Number(value), LE); - } - - get maxSamplerAnisotropy() { - return this.#view.getFloat32(272, LE); - } - - set maxSamplerAnisotropy(value: number) { - this.#view.setFloat32(272, Number(value), LE); - } - - get maxViewports() { - return this.#view.getUint32(276, LE); - } - - set maxViewports(value: number) { - this.#view.setUint32(276, Number(value), LE); - } - - get maxViewportDimensions() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 280, 2); - } - - set maxViewportDimensions(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 280); - } - - get viewportBoundsRange() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 288, 2); - } - - set viewportBoundsRange(value: Float32Array) { - this.#data.set(new Uint8Array(value.buffer), 288); - } - - get viewportSubPixelBits() { - return this.#view.getUint32(296, LE); - } - - set viewportSubPixelBits(value: number) { - this.#view.setUint32(296, Number(value), LE); - } - - get minMemoryMapAlignment() { - return this.#view.getBigUint64(304, LE); - } - - set minMemoryMapAlignment(value: Deno.PointerValue) { - this.#view.setBigUint64(304, BigInt(value), LE); - } - - get minTexelBufferOffsetAlignment() { - return this.#view.getBigUint64(312, LE); - } - - set minTexelBufferOffsetAlignment(value: DeviceSize) { - this.#view.setBigUint64(312, BigInt(value), LE); - } - - get minUniformBufferOffsetAlignment() { - return this.#view.getBigUint64(320, LE); - } - - set minUniformBufferOffsetAlignment(value: DeviceSize) { - this.#view.setBigUint64(320, BigInt(value), LE); - } - - get minStorageBufferOffsetAlignment() { - return this.#view.getBigUint64(328, LE); - } - - set minStorageBufferOffsetAlignment(value: DeviceSize) { - this.#view.setBigUint64(328, BigInt(value), LE); - } - - get minTexelOffset() { - return this.#view.getInt32(336, LE); - } - - set minTexelOffset(value: number) { - this.#view.setInt32(336, Number(value), LE); - } - - get maxTexelOffset() { - return this.#view.getUint32(340, LE); - } - - set maxTexelOffset(value: number) { - this.#view.setUint32(340, Number(value), LE); - } - - get minTexelGatherOffset() { - return this.#view.getInt32(344, LE); - } - - set minTexelGatherOffset(value: number) { - this.#view.setInt32(344, Number(value), LE); - } - - get maxTexelGatherOffset() { - return this.#view.getUint32(348, LE); - } - - set maxTexelGatherOffset(value: number) { - this.#view.setUint32(348, Number(value), LE); - } - - get minInterpolationOffset() { - return this.#view.getFloat32(352, LE); - } - - set minInterpolationOffset(value: number) { - this.#view.setFloat32(352, Number(value), LE); - } - - get maxInterpolationOffset() { - return this.#view.getFloat32(356, LE); - } - - set maxInterpolationOffset(value: number) { - this.#view.setFloat32(356, Number(value), LE); - } - - get subPixelInterpolationOffsetBits() { - return this.#view.getUint32(360, LE); - } - - set subPixelInterpolationOffsetBits(value: number) { - this.#view.setUint32(360, Number(value), LE); - } - - get maxFramebufferWidth() { - return this.#view.getUint32(364, LE); - } - - set maxFramebufferWidth(value: number) { - this.#view.setUint32(364, Number(value), LE); - } - - get maxFramebufferHeight() { - return this.#view.getUint32(368, LE); - } - - set maxFramebufferHeight(value: number) { - this.#view.setUint32(368, Number(value), LE); - } - - get maxFramebufferLayers() { - return this.#view.getUint32(372, LE); - } - - set maxFramebufferLayers(value: number) { - this.#view.setUint32(372, Number(value), LE); - } - - get framebufferColorSampleCounts() { - return this.#view.getUint32(376, LE); - } - - set framebufferColorSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(376, Number(value), LE); - } - - get framebufferDepthSampleCounts() { - return this.#view.getUint32(380, LE); - } - - set framebufferDepthSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(380, Number(value), LE); - } - - get framebufferStencilSampleCounts() { - return this.#view.getUint32(384, LE); - } - - set framebufferStencilSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(384, Number(value), LE); - } - - get framebufferNoAttachmentsSampleCounts() { - return this.#view.getUint32(388, LE); - } - - set framebufferNoAttachmentsSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(388, Number(value), LE); - } - - get maxColorAttachments() { - return this.#view.getUint32(392, LE); - } - - set maxColorAttachments(value: number) { - this.#view.setUint32(392, Number(value), LE); - } - - get sampledImageColorSampleCounts() { - return this.#view.getUint32(396, LE); - } - - set sampledImageColorSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(396, Number(value), LE); - } - - get sampledImageIntegerSampleCounts() { - return this.#view.getUint32(400, LE); - } - - set sampledImageIntegerSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(400, Number(value), LE); - } - - get sampledImageDepthSampleCounts() { - return this.#view.getUint32(404, LE); - } - - set sampledImageDepthSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(404, Number(value), LE); - } - - get sampledImageStencilSampleCounts() { - return this.#view.getUint32(408, LE); - } - - set sampledImageStencilSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(408, Number(value), LE); - } - - get storageImageSampleCounts() { - return this.#view.getUint32(412, LE); - } - - set storageImageSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(412, Number(value), LE); - } - - get maxSampleMaskWords() { - return this.#view.getUint32(416, LE); - } - - set maxSampleMaskWords(value: number) { - this.#view.setUint32(416, Number(value), LE); - } - - get timestampComputeAndGraphics() { - return this.#view.getUint32(420, LE); - } - - set timestampComputeAndGraphics(value: Bool32) { - this.#view.setUint32(420, Number(value), LE); - } - - get timestampPeriod() { - return this.#view.getFloat32(424, LE); - } - - set timestampPeriod(value: number) { - this.#view.setFloat32(424, Number(value), LE); - } - - get maxClipDistances() { - return this.#view.getUint32(428, LE); - } - - set maxClipDistances(value: number) { - this.#view.setUint32(428, Number(value), LE); - } - - get maxCullDistances() { - return this.#view.getUint32(432, LE); - } - - set maxCullDistances(value: number) { - this.#view.setUint32(432, Number(value), LE); - } - - get maxCombinedClipAndCullDistances() { - return this.#view.getUint32(436, LE); - } - - set maxCombinedClipAndCullDistances(value: number) { - this.#view.setUint32(436, Number(value), LE); - } - - get discreteQueuePriorities() { - return this.#view.getUint32(440, LE); - } - - set discreteQueuePriorities(value: number) { - this.#view.setUint32(440, Number(value), LE); - } - - get pointSizeRange() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 444, 2); - } - - set pointSizeRange(value: Float32Array) { - this.#data.set(new Uint8Array(value.buffer), 444); - } - - get lineWidthRange() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 452, 2); - } - - set lineWidthRange(value: Float32Array) { - this.#data.set(new Uint8Array(value.buffer), 452); - } - - get pointSizeGranularity() { - return this.#view.getFloat32(460, LE); - } - - set pointSizeGranularity(value: number) { - this.#view.setFloat32(460, Number(value), LE); - } - - get lineWidthGranularity() { - return this.#view.getFloat32(464, LE); - } - - set lineWidthGranularity(value: number) { - this.#view.setFloat32(464, Number(value), LE); - } - - get strictLines() { - return this.#view.getUint32(468, LE); - } - - set strictLines(value: Bool32) { - this.#view.setUint32(468, Number(value), LE); - } - - get standardSampleLocations() { - return this.#view.getUint32(472, LE); - } - - set standardSampleLocations(value: Bool32) { - this.#view.setUint32(472, Number(value), LE); - } - - get optimalBufferCopyOffsetAlignment() { - return this.#view.getBigUint64(480, LE); - } - - set optimalBufferCopyOffsetAlignment(value: DeviceSize) { - this.#view.setBigUint64(480, BigInt(value), LE); - } - - get optimalBufferCopyRowPitchAlignment() { - return this.#view.getBigUint64(488, LE); - } - - set optimalBufferCopyRowPitchAlignment(value: DeviceSize) { - this.#view.setBigUint64(488, BigInt(value), LE); - } - - get nonCoherentAtomSize() { - return this.#view.getBigUint64(496, LE); - } - - set nonCoherentAtomSize(value: DeviceSize) { - this.#view.setBigUint64(496, BigInt(value), LE); - } -} - -export interface InitSemaphoreCreateInfo { - pNext?: AnyPointer; - flags?: SemaphoreCreateFlags; -} - -export class SemaphoreCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSemaphoreCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SemaphoreCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SemaphoreCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.SEMAPHORE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: SemaphoreCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitQueryPoolCreateInfo { - pNext?: AnyPointer; - flags?: QueryPoolCreateFlags; - queryType?: QueryType; - queryCount?: number; - pipelineStatistics?: QueryPipelineStatisticFlags; -} - -export class QueryPoolCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueryPoolCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueryPoolCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(QueryPoolCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueryPoolCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueryPoolCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueryPoolCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.queryType !== undefined) this.queryType = data.queryType; - if (data.queryCount !== undefined) this.queryCount = data.queryCount; - if (data.pipelineStatistics !== undefined) this.pipelineStatistics = data.pipelineStatistics; - } - this.sType = StructureType.QUERY_POOL_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: QueryPoolCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get queryType() { - return this.#view.getUint32(20, LE); - } - - set queryType(value: QueryType) { - this.#view.setUint32(20, Number(value), LE); - } - - get queryCount() { - return this.#view.getUint32(24, LE); - } - - set queryCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pipelineStatistics() { - return this.#view.getUint32(28, LE); - } - - set pipelineStatistics(value: QueryPipelineStatisticFlags) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitFramebufferCreateInfo { - pNext?: AnyPointer; - flags?: FramebufferCreateFlags; - renderPass?: RenderPass; - attachmentCount?: number; - pAttachments?: AnyPointer; - width?: number; - height?: number; - layers?: number; -} - -export class FramebufferCreateInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFramebufferCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFramebufferCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(FramebufferCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FramebufferCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FramebufferCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.renderPass !== undefined) this.renderPass = data.renderPass; - if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; - if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; - if (data.width !== undefined) this.width = data.width; - if (data.height !== undefined) this.height = data.height; - if (data.layers !== undefined) this.layers = data.layers; - } - this.sType = StructureType.FRAMEBUFFER_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: FramebufferCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get renderPass() { - return this.#view.getBigUint64(24, LE); - } - - set renderPass(value: RenderPass) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get attachmentCount() { - return this.#view.getUint32(32, LE); - } - - set attachmentCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pAttachments() { - return this.#view.getBigUint64(40, LE); - } - - set pAttachments(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get width() { - return this.#view.getUint32(48, LE); - } - - set width(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get height() { - return this.#view.getUint32(52, LE); - } - - set height(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get layers() { - return this.#view.getUint32(56, LE); - } - - set layers(value: number) { - this.#view.setUint32(56, Number(value), LE); - } -} - -export interface InitDrawIndirectCommand { - vertexCount?: number; - instanceCount?: number; - firstVertex?: number; - firstInstance?: number; -} - -export class DrawIndirectCommand implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDrawIndirectCommand); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDrawIndirectCommand) { - if (data === undefined) { - this.#data = new Uint8Array(DrawIndirectCommand.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawIndirectCommand.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DrawIndirectCommand.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DrawIndirectCommand.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.vertexCount !== undefined) this.vertexCount = data.vertexCount; - if (data.instanceCount !== undefined) this.instanceCount = data.instanceCount; - if (data.firstVertex !== undefined) this.firstVertex = data.firstVertex; - if (data.firstInstance !== undefined) this.firstInstance = data.firstInstance; - } - } - - get vertexCount() { - return this.#view.getUint32(0, LE); - } - - set vertexCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get instanceCount() { - return this.#view.getUint32(4, LE); - } - - set instanceCount(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get firstVertex() { - return this.#view.getUint32(8, LE); - } - - set firstVertex(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get firstInstance() { - return this.#view.getUint32(12, LE); - } - - set firstInstance(value: number) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitDrawIndexedIndirectCommand { - indexCount?: number; - instanceCount?: number; - firstIndex?: number; - vertexOffset?: number; - firstInstance?: number; -} - -export class DrawIndexedIndirectCommand implements BaseStruct { - static size = 20; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDrawIndexedIndirectCommand); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDrawIndexedIndirectCommand) { - if (data === undefined) { - this.#data = new Uint8Array(DrawIndexedIndirectCommand.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawIndexedIndirectCommand.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DrawIndexedIndirectCommand.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DrawIndexedIndirectCommand.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.indexCount !== undefined) this.indexCount = data.indexCount; - if (data.instanceCount !== undefined) this.instanceCount = data.instanceCount; - if (data.firstIndex !== undefined) this.firstIndex = data.firstIndex; - if (data.vertexOffset !== undefined) this.vertexOffset = data.vertexOffset; - if (data.firstInstance !== undefined) this.firstInstance = data.firstInstance; - } - } - - get indexCount() { - return this.#view.getUint32(0, LE); - } - - set indexCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get instanceCount() { - return this.#view.getUint32(4, LE); - } - - set instanceCount(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get firstIndex() { - return this.#view.getUint32(8, LE); - } - - set firstIndex(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get vertexOffset() { - return this.#view.getInt32(12, LE); - } - - set vertexOffset(value: number) { - this.#view.setInt32(12, Number(value), LE); - } - - get firstInstance() { - return this.#view.getUint32(16, LE); - } - - set firstInstance(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDispatchIndirectCommand { - x?: number; - y?: number; - z?: number; -} - -export class DispatchIndirectCommand implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDispatchIndirectCommand); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDispatchIndirectCommand) { - if (data === undefined) { - this.#data = new Uint8Array(DispatchIndirectCommand.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DispatchIndirectCommand.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DispatchIndirectCommand.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DispatchIndirectCommand.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.x !== undefined) this.x = data.x; - if (data.y !== undefined) this.y = data.y; - if (data.z !== undefined) this.z = data.z; - } - } - - get x() { - return this.#view.getUint32(0, LE); - } - - set x(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get y() { - return this.#view.getUint32(4, LE); - } - - set y(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get z() { - return this.#view.getUint32(8, LE); - } - - set z(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitMultiDrawInfoEXT { - firstVertex?: number; - vertexCount?: number; -} - -export class MultiDrawInfoEXT implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMultiDrawInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMultiDrawInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MultiDrawInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultiDrawInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MultiDrawInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MultiDrawInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.firstVertex !== undefined) this.firstVertex = data.firstVertex; - if (data.vertexCount !== undefined) this.vertexCount = data.vertexCount; - } - } - - get firstVertex() { - return this.#view.getUint32(0, LE); - } - - set firstVertex(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get vertexCount() { - return this.#view.getUint32(4, LE); - } - - set vertexCount(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitMultiDrawIndexedInfoEXT { - firstIndex?: number; - indexCount?: number; - vertexOffset?: number; -} - -export class MultiDrawIndexedInfoEXT implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMultiDrawIndexedInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMultiDrawIndexedInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MultiDrawIndexedInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultiDrawIndexedInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MultiDrawIndexedInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MultiDrawIndexedInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.firstIndex !== undefined) this.firstIndex = data.firstIndex; - if (data.indexCount !== undefined) this.indexCount = data.indexCount; - if (data.vertexOffset !== undefined) this.vertexOffset = data.vertexOffset; - } - } - - get firstIndex() { - return this.#view.getUint32(0, LE); - } - - set firstIndex(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get indexCount() { - return this.#view.getUint32(4, LE); - } - - set indexCount(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get vertexOffset() { - return this.#view.getInt32(8, LE); - } - - set vertexOffset(value: number) { - this.#view.setInt32(8, Number(value), LE); - } -} - -export interface InitSubmitInfo { - pNext?: AnyPointer; - waitSemaphoreCount?: number; - pWaitSemaphores?: AnyPointer; - pWaitDstStageMask?: AnyPointer; - commandBufferCount?: number; - pCommandBuffers?: AnyPointer; - signalSemaphoreCount?: number; - pSignalSemaphores?: AnyPointer; -} - -export class SubmitInfo implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubmitInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubmitInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubmitInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubmitInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.waitSemaphoreCount !== undefined) this.waitSemaphoreCount = data.waitSemaphoreCount; - if (data.pWaitSemaphores !== undefined) this.pWaitSemaphores = data.pWaitSemaphores; - if (data.pWaitDstStageMask !== undefined) this.pWaitDstStageMask = data.pWaitDstStageMask; - if (data.commandBufferCount !== undefined) this.commandBufferCount = data.commandBufferCount; - if (data.pCommandBuffers !== undefined) this.pCommandBuffers = data.pCommandBuffers; - if (data.signalSemaphoreCount !== undefined) this.signalSemaphoreCount = data.signalSemaphoreCount; - if (data.pSignalSemaphores !== undefined) this.pSignalSemaphores = data.pSignalSemaphores; - } - this.sType = StructureType.SUBMIT_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get waitSemaphoreCount() { - return this.#view.getUint32(16, LE); - } - - set waitSemaphoreCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pWaitSemaphores() { - return this.#view.getBigUint64(24, LE); - } - - set pWaitSemaphores(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pWaitDstStageMask() { - return this.#view.getBigUint64(32, LE); - } - - set pWaitDstStageMask(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get commandBufferCount() { - return this.#view.getUint32(40, LE); - } - - set commandBufferCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get pCommandBuffers() { - return this.#view.getBigUint64(48, LE); - } - - set pCommandBuffers(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get signalSemaphoreCount() { - return this.#view.getUint32(56, LE); - } - - set signalSemaphoreCount(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get pSignalSemaphores() { - return this.#view.getBigUint64(64, LE); - } - - set pSignalSemaphores(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDisplayPropertiesKHR { - display?: DisplayKHR; - displayName?: AnyPointer; - physicalDimensions?: Extent2D; - physicalResolution?: Extent2D; - supportedTransforms?: SurfaceTransformFlagsKHR; - planeReorderPossible?: Bool32; - persistentContent?: Bool32; -} - -export class DisplayPropertiesKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.display !== undefined) this.display = data.display; - if (data.displayName !== undefined) this.displayName = data.displayName; - if (data.physicalDimensions !== undefined) this.physicalDimensions = data.physicalDimensions; - if (data.physicalResolution !== undefined) this.physicalResolution = data.physicalResolution; - if (data.supportedTransforms !== undefined) this.supportedTransforms = data.supportedTransforms; - if (data.planeReorderPossible !== undefined) this.planeReorderPossible = data.planeReorderPossible; - if (data.persistentContent !== undefined) this.persistentContent = data.persistentContent; - } - } - - get display() { - return this.#view.getBigUint64(0, LE); - } - - set display(value: DisplayKHR) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get displayName() { - return this.#view.getBigUint64(8, LE); - } - - set displayName(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get physicalDimensions() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - - set physicalDimensions(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get physicalResolution() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - - set physicalResolution(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get supportedTransforms() { - return this.#view.getUint32(32, LE); - } - - set supportedTransforms(value: SurfaceTransformFlagsKHR) { - this.#view.setUint32(32, Number(value), LE); - } - - get planeReorderPossible() { - return this.#view.getUint32(36, LE); - } - - set planeReorderPossible(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get persistentContent() { - return this.#view.getUint32(40, LE); - } - - set persistentContent(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } -} - -export interface InitDisplayPlanePropertiesKHR { - currentDisplay?: DisplayKHR; - currentStackIndex?: number; -} - -export class DisplayPlanePropertiesKHR implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayPlanePropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlanePropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayPlanePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlanePropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlanePropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayPlanePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.currentDisplay !== undefined) this.currentDisplay = data.currentDisplay; - if (data.currentStackIndex !== undefined) this.currentStackIndex = data.currentStackIndex; - } - } - - get currentDisplay() { - return this.#view.getBigUint64(0, LE); - } - - set currentDisplay(value: DisplayKHR) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get currentStackIndex() { - return this.#view.getUint32(8, LE); - } - - set currentStackIndex(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitDisplayModeParametersKHR { - visibleRegion?: Extent2D; - refreshRate?: number; -} - -export class DisplayModeParametersKHR implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayModeParametersKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayModeParametersKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayModeParametersKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModeParametersKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayModeParametersKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayModeParametersKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.visibleRegion !== undefined) this.visibleRegion = data.visibleRegion; - if (data.refreshRate !== undefined) this.refreshRate = data.refreshRate; - } - } - - get visibleRegion() { - return new Extent2D(this.#data.subarray(0, 0 + Extent2D.size)); - } - - set visibleRegion(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get refreshRate() { - return this.#view.getUint32(8, LE); - } - - set refreshRate(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitDisplayModePropertiesKHR { - displayMode?: DisplayModeKHR; - parameters?: DisplayModeParametersKHR; -} - -export class DisplayModePropertiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayModePropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayModePropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayModePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModePropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayModePropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayModePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.displayMode !== undefined) this.displayMode = data.displayMode; - if (data.parameters !== undefined) this.parameters = data.parameters; - } - } - - get displayMode() { - return this.#view.getBigUint64(0, LE); - } - - set displayMode(value: DisplayModeKHR) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get parameters() { - return new DisplayModeParametersKHR(this.#data.subarray(8, 8 + DisplayModeParametersKHR.size)); - } - - set parameters(value: DisplayModeParametersKHR) { - if (value[BUFFER].byteLength < DisplayModeParametersKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 8); - } -} - -export interface InitDisplayModeCreateInfoKHR { - pNext?: AnyPointer; - flags?: DisplayModeCreateFlagsKHR; - parameters?: DisplayModeParametersKHR; -} - -export class DisplayModeCreateInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayModeCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayModeCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayModeCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModeCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayModeCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayModeCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.parameters !== undefined) this.parameters = data.parameters; - } - this.sType = StructureType.DISPLAY_MODE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DisplayModeCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get parameters() { - return new DisplayModeParametersKHR(this.#data.subarray(20, 20 + DisplayModeParametersKHR.size)); - } - - set parameters(value: DisplayModeParametersKHR) { - if (value[BUFFER].byteLength < DisplayModeParametersKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } -} - -export interface InitDisplayPlaneCapabilitiesKHR { - supportedAlpha?: DisplayPlaneAlphaFlagsKHR; - minSrcPosition?: Offset2D; - maxSrcPosition?: Offset2D; - minSrcExtent?: Extent2D; - maxSrcExtent?: Extent2D; - minDstPosition?: Offset2D; - maxDstPosition?: Offset2D; - minDstExtent?: Extent2D; - maxDstExtent?: Extent2D; -} - -export class DisplayPlaneCapabilitiesKHR implements BaseStruct { - static size = 68; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayPlaneCapabilitiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlaneCapabilitiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayPlaneCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneCapabilitiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlaneCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayPlaneCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.supportedAlpha !== undefined) this.supportedAlpha = data.supportedAlpha; - if (data.minSrcPosition !== undefined) this.minSrcPosition = data.minSrcPosition; - if (data.maxSrcPosition !== undefined) this.maxSrcPosition = data.maxSrcPosition; - if (data.minSrcExtent !== undefined) this.minSrcExtent = data.minSrcExtent; - if (data.maxSrcExtent !== undefined) this.maxSrcExtent = data.maxSrcExtent; - if (data.minDstPosition !== undefined) this.minDstPosition = data.minDstPosition; - if (data.maxDstPosition !== undefined) this.maxDstPosition = data.maxDstPosition; - if (data.minDstExtent !== undefined) this.minDstExtent = data.minDstExtent; - if (data.maxDstExtent !== undefined) this.maxDstExtent = data.maxDstExtent; - } - } - - get supportedAlpha() { - return this.#view.getUint32(0, LE); - } - - set supportedAlpha(value: DisplayPlaneAlphaFlagsKHR) { - this.#view.setUint32(0, Number(value), LE); - } - - get minSrcPosition() { - return new Offset2D(this.#data.subarray(4, 4 + Offset2D.size)); - } - - set minSrcPosition(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 4); - } - - get maxSrcPosition() { - return new Offset2D(this.#data.subarray(12, 12 + Offset2D.size)); - } - - set maxSrcPosition(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 12); - } - - get minSrcExtent() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - - set minSrcExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } - - get maxSrcExtent() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - - set maxSrcExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 28); - } - - get minDstPosition() { - return new Offset2D(this.#data.subarray(36, 36 + Offset2D.size)); - } - - set minDstPosition(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 36); - } - - get maxDstPosition() { - return new Offset2D(this.#data.subarray(44, 44 + Offset2D.size)); - } - - set maxDstPosition(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 44); - } - - get minDstExtent() { - return new Extent2D(this.#data.subarray(52, 52 + Extent2D.size)); - } - - set minDstExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 52); - } - - get maxDstExtent() { - return new Extent2D(this.#data.subarray(60, 60 + Extent2D.size)); - } - - set maxDstExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 60); - } -} - -export interface InitDisplaySurfaceCreateInfoKHR { - pNext?: AnyPointer; - flags?: DisplaySurfaceCreateFlagsKHR; - displayMode?: DisplayModeKHR; - planeIndex?: number; - planeStackIndex?: number; - transform?: SurfaceTransformFlagBitsKHR; - globalAlpha?: number; - alphaMode?: DisplayPlaneAlphaFlagBitsKHR; - imageExtent?: Extent2D; -} - -export class DisplaySurfaceCreateInfoKHR implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplaySurfaceCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplaySurfaceCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplaySurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplaySurfaceCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplaySurfaceCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplaySurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.displayMode !== undefined) this.displayMode = data.displayMode; - if (data.planeIndex !== undefined) this.planeIndex = data.planeIndex; - if (data.planeStackIndex !== undefined) this.planeStackIndex = data.planeStackIndex; - if (data.transform !== undefined) this.transform = data.transform; - if (data.globalAlpha !== undefined) this.globalAlpha = data.globalAlpha; - if (data.alphaMode !== undefined) this.alphaMode = data.alphaMode; - if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; - } - this.sType = StructureType.DISPLAY_SURFACE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DisplaySurfaceCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get displayMode() { - return this.#view.getBigUint64(24, LE); - } - - set displayMode(value: DisplayModeKHR) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get planeIndex() { - return this.#view.getUint32(32, LE); - } - - set planeIndex(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get planeStackIndex() { - return this.#view.getUint32(36, LE); - } - - set planeStackIndex(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get transform() { - return this.#view.getUint32(40, LE); - } - - set transform(value: SurfaceTransformFlagBitsKHR) { - this.#view.setUint32(40, Number(value), LE); - } - - get globalAlpha() { - return this.#view.getFloat32(44, LE); - } - - set globalAlpha(value: number) { - this.#view.setFloat32(44, Number(value), LE); - } - - get alphaMode() { - return this.#view.getUint32(48, LE); - } - - set alphaMode(value: DisplayPlaneAlphaFlagBitsKHR) { - this.#view.setUint32(48, Number(value), LE); - } - - get imageExtent() { - return new Extent2D(this.#data.subarray(52, 52 + Extent2D.size)); - } - - set imageExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 52); - } -} - -export interface InitDisplayPresentInfoKHR { - pNext?: AnyPointer; - srcRect?: Rect2D; - dstRect?: Rect2D; - persistent?: Bool32; -} - -export class DisplayPresentInfoKHR implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayPresentInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPresentInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayPresentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPresentInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPresentInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayPresentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcRect !== undefined) this.srcRect = data.srcRect; - if (data.dstRect !== undefined) this.dstRect = data.dstRect; - if (data.persistent !== undefined) this.persistent = data.persistent; - } - this.sType = StructureType.DISPLAY_PRESENT_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcRect() { - return new Rect2D(this.#data.subarray(16, 16 + Rect2D.size)); - } - - set srcRect(value: Rect2D) { - if (value[BUFFER].byteLength < Rect2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get dstRect() { - return new Rect2D(this.#data.subarray(32, 32 + Rect2D.size)); - } - - set dstRect(value: Rect2D) { - if (value[BUFFER].byteLength < Rect2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get persistent() { - return this.#view.getUint32(48, LE); - } - - set persistent(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitSurfaceCapabilitiesKHR { - minImageCount?: number; - maxImageCount?: number; - currentExtent?: Extent2D; - minImageExtent?: Extent2D; - maxImageExtent?: Extent2D; - maxImageArrayLayers?: number; - supportedTransforms?: SurfaceTransformFlagsKHR; - currentTransform?: SurfaceTransformFlagBitsKHR; - supportedCompositeAlpha?: CompositeAlphaFlagsKHR; - supportedUsageFlags?: ImageUsageFlags; -} - -export class SurfaceCapabilitiesKHR implements BaseStruct { - static size = 52; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceCapabilitiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilitiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilitiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.minImageCount !== undefined) this.minImageCount = data.minImageCount; - if (data.maxImageCount !== undefined) this.maxImageCount = data.maxImageCount; - if (data.currentExtent !== undefined) this.currentExtent = data.currentExtent; - if (data.minImageExtent !== undefined) this.minImageExtent = data.minImageExtent; - if (data.maxImageExtent !== undefined) this.maxImageExtent = data.maxImageExtent; - if (data.maxImageArrayLayers !== undefined) this.maxImageArrayLayers = data.maxImageArrayLayers; - if (data.supportedTransforms !== undefined) this.supportedTransforms = data.supportedTransforms; - if (data.currentTransform !== undefined) this.currentTransform = data.currentTransform; - if (data.supportedCompositeAlpha !== undefined) this.supportedCompositeAlpha = data.supportedCompositeAlpha; - if (data.supportedUsageFlags !== undefined) this.supportedUsageFlags = data.supportedUsageFlags; - } - } - - get minImageCount() { - return this.#view.getUint32(0, LE); - } - - set minImageCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get maxImageCount() { - return this.#view.getUint32(4, LE); - } - - set maxImageCount(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get currentExtent() { - return new Extent2D(this.#data.subarray(8, 8 + Extent2D.size)); - } - - set currentExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 8); - } - - get minImageExtent() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - - set minImageExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get maxImageExtent() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - - set maxImageExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get maxImageArrayLayers() { - return this.#view.getUint32(32, LE); - } - - set maxImageArrayLayers(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get supportedTransforms() { - return this.#view.getUint32(36, LE); - } - - set supportedTransforms(value: SurfaceTransformFlagsKHR) { - this.#view.setUint32(36, Number(value), LE); - } - - get currentTransform() { - return this.#view.getUint32(40, LE); - } - - set currentTransform(value: SurfaceTransformFlagBitsKHR) { - this.#view.setUint32(40, Number(value), LE); - } - - get supportedCompositeAlpha() { - return this.#view.getUint32(44, LE); - } - - set supportedCompositeAlpha(value: CompositeAlphaFlagsKHR) { - this.#view.setUint32(44, Number(value), LE); - } - - get supportedUsageFlags() { - return this.#view.getUint32(48, LE); - } - - set supportedUsageFlags(value: ImageUsageFlags) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitAndroidSurfaceCreateInfoKHR { - pNext?: AnyPointer; - flags?: AndroidSurfaceCreateFlagsKHR; - window?: AnyPointer; -} - -export class AndroidSurfaceCreateInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAndroidSurfaceCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidSurfaceCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AndroidSurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidSurfaceCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidSurfaceCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AndroidSurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.window !== undefined) this.window = data.window; - } - this.sType = StructureType.ANDROID_SURFACE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: AndroidSurfaceCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get window() { - return this.#view.getBigUint64(24, LE); - } - - set window(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitViSurfaceCreateInfoNN { - pNext?: AnyPointer; - flags?: ViSurfaceCreateFlagsNN; - window?: AnyPointer; -} - -export class ViSurfaceCreateInfoNN implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitViSurfaceCreateInfoNN); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitViSurfaceCreateInfoNN) { - if (data === undefined) { - this.#data = new Uint8Array(ViSurfaceCreateInfoNN.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ViSurfaceCreateInfoNN.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ViSurfaceCreateInfoNN.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ViSurfaceCreateInfoNN.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.window !== undefined) this.window = data.window; - } - this.sType = StructureType.VI_SURFACE_CREATE_INFO_NN; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: ViSurfaceCreateFlagsNN) { - this.#view.setUint32(16, Number(value), LE); - } - - get window() { - return this.#view.getBigUint64(24, LE); - } - - set window(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitWaylandSurfaceCreateInfoKHR { - pNext?: AnyPointer; - flags?: WaylandSurfaceCreateFlagsKHR; - display?: AnyPointer; - surface?: AnyPointer; -} - -export class WaylandSurfaceCreateInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitWaylandSurfaceCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitWaylandSurfaceCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(WaylandSurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WaylandSurfaceCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < WaylandSurfaceCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(WaylandSurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.display !== undefined) this.display = data.display; - if (data.surface !== undefined) this.surface = data.surface; - } - this.sType = StructureType.WAYLAND_SURFACE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: WaylandSurfaceCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get display() { - return this.#view.getBigUint64(24, LE); - } - - set display(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get surface() { - return this.#view.getBigUint64(32, LE); - } - - set surface(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitWin32SurfaceCreateInfoKHR { - pNext?: AnyPointer; - flags?: Win32SurfaceCreateFlagsKHR; - hinstance?: Deno.PointerValue; - hwnd?: Deno.PointerValue; -} - -export class Win32SurfaceCreateInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitWin32SurfaceCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitWin32SurfaceCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(Win32SurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Win32SurfaceCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < Win32SurfaceCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(Win32SurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.hinstance !== undefined) this.hinstance = data.hinstance; - if (data.hwnd !== undefined) this.hwnd = data.hwnd; - } - this.sType = StructureType.WIN32_SURFACE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: Win32SurfaceCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get hinstance() { - return this.#view.getBigUint64(24, LE); - } - - set hinstance(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get hwnd() { - return this.#view.getBigUint64(32, LE); - } - - set hwnd(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitXlibSurfaceCreateInfoKHR { - pNext?: AnyPointer; - flags?: XlibSurfaceCreateFlagsKHR; - dpy?: AnyPointer; - window?: Deno.PointerValue; -} - -export class XlibSurfaceCreateInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitXlibSurfaceCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitXlibSurfaceCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(XlibSurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, XlibSurfaceCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < XlibSurfaceCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(XlibSurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.dpy !== undefined) this.dpy = data.dpy; - if (data.window !== undefined) this.window = data.window; - } - this.sType = StructureType.XLIB_SURFACE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: XlibSurfaceCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get dpy() { - return this.#view.getBigUint64(24, LE); - } - - set dpy(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get window() { - return this.#view.getBigUint64(32, LE); - } - - set window(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitXcbSurfaceCreateInfoKHR { - pNext?: AnyPointer; - flags?: XcbSurfaceCreateFlagsKHR; - connection?: AnyPointer; - window?: Deno.PointerValue; -} - -export class XcbSurfaceCreateInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitXcbSurfaceCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitXcbSurfaceCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(XcbSurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, XcbSurfaceCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < XcbSurfaceCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(XcbSurfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.connection !== undefined) this.connection = data.connection; - if (data.window !== undefined) this.window = data.window; - } - this.sType = StructureType.XCB_SURFACE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: XcbSurfaceCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get connection() { - return this.#view.getBigUint64(24, LE); - } - - set connection(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get window() { - return this.#view.getBigUint64(32, LE); - } - - set window(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDirectFBSurfaceCreateInfoEXT { - pNext?: AnyPointer; - flags?: DirectFBSurfaceCreateFlagsEXT; - dfb?: AnyPointer; - surface?: AnyPointer; -} - -export class DirectFBSurfaceCreateInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDirectFBSurfaceCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDirectFBSurfaceCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DirectFBSurfaceCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DirectFBSurfaceCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DirectFBSurfaceCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DirectFBSurfaceCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.dfb !== undefined) this.dfb = data.dfb; - if (data.surface !== undefined) this.surface = data.surface; - } - this.sType = StructureType.DIRECTFB_SURFACE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DirectFBSurfaceCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get dfb() { - return this.#view.getBigUint64(24, LE); - } - - set dfb(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get surface() { - return this.#view.getBigUint64(32, LE); - } - - set surface(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImagePipeSurfaceCreateInfoFUCHSIA { - pNext?: AnyPointer; - flags?: ImagePipeSurfaceCreateFlagsFUCHSIA; - imagePipeHandle?: Deno.PointerValue; -} - -export class ImagePipeSurfaceCreateInfoFUCHSIA implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImagePipeSurfaceCreateInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImagePipeSurfaceCreateInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(ImagePipeSurfaceCreateInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImagePipeSurfaceCreateInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImagePipeSurfaceCreateInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImagePipeSurfaceCreateInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.imagePipeHandle !== undefined) this.imagePipeHandle = data.imagePipeHandle; - } - this.sType = StructureType.IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: ImagePipeSurfaceCreateFlagsFUCHSIA) { - this.#view.setUint32(16, Number(value), LE); - } - - get imagePipeHandle() { - return this.#view.getBigUint64(24, LE); - } - - set imagePipeHandle(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitStreamDescriptorSurfaceCreateInfoGGP { - pNext?: AnyPointer; - flags?: StreamDescriptorSurfaceCreateFlagsGGP; - streamDescriptor?: Deno.PointerValue; -} - -export class StreamDescriptorSurfaceCreateInfoGGP implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStreamDescriptorSurfaceCreateInfoGGP); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStreamDescriptorSurfaceCreateInfoGGP) { - if (data === undefined) { - this.#data = new Uint8Array(StreamDescriptorSurfaceCreateInfoGGP.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StreamDescriptorSurfaceCreateInfoGGP.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StreamDescriptorSurfaceCreateInfoGGP.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StreamDescriptorSurfaceCreateInfoGGP.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.streamDescriptor !== undefined) this.streamDescriptor = data.streamDescriptor; - } - this.sType = StructureType.STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: StreamDescriptorSurfaceCreateFlagsGGP) { - this.#view.setUint32(16, Number(value), LE); - } - - get streamDescriptor() { - return this.#view.getBigUint64(24, LE); - } - - set streamDescriptor(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitScreenSurfaceCreateInfoQNX { - pNext?: AnyPointer; - flags?: ScreenSurfaceCreateFlagsQNX; - context?: AnyPointer; - window?: AnyPointer; -} - -export class ScreenSurfaceCreateInfoQNX implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitScreenSurfaceCreateInfoQNX); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitScreenSurfaceCreateInfoQNX) { - if (data === undefined) { - this.#data = new Uint8Array(ScreenSurfaceCreateInfoQNX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ScreenSurfaceCreateInfoQNX.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ScreenSurfaceCreateInfoQNX.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ScreenSurfaceCreateInfoQNX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.context !== undefined) this.context = data.context; - if (data.window !== undefined) this.window = data.window; - } - this.sType = StructureType.SCREEN_SURFACE_CREATE_INFO_QNX; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: ScreenSurfaceCreateFlagsQNX) { - this.#view.setUint32(16, Number(value), LE); - } - - get context() { - return this.#view.getBigUint64(24, LE); - } - - set context(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get window() { - return this.#view.getBigUint64(32, LE); - } - - set window(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSurfaceFormatKHR { - format?: Format; - colorSpace?: ColorSpaceKHR; -} - -export class SurfaceFormatKHR implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceFormatKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceFormatKHR) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceFormatKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFormatKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceFormatKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceFormatKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.format !== undefined) this.format = data.format; - if (data.colorSpace !== undefined) this.colorSpace = data.colorSpace; - } - } - - get format() { - return this.#view.getUint32(0, LE); - } - - set format(value: Format) { - this.#view.setUint32(0, Number(value), LE); - } - - get colorSpace() { - return this.#view.getUint32(4, LE); - } - - set colorSpace(value: ColorSpaceKHR) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitSwapchainCreateInfoKHR { - pNext?: AnyPointer; - flags?: SwapchainCreateFlagsKHR; - surface?: SurfaceKHR; - minImageCount?: number; - imageFormat?: Format; - imageColorSpace?: ColorSpaceKHR; - imageExtent?: Extent2D; - imageArrayLayers?: number; - imageUsage?: ImageUsageFlags; - imageSharingMode?: SharingMode; - queueFamilyIndexCount?: number; - pQueueFamilyIndices?: AnyPointer; - preTransform?: SurfaceTransformFlagBitsKHR; - compositeAlpha?: CompositeAlphaFlagBitsKHR; - presentMode?: PresentModeKHR; - clipped?: Bool32; - oldSwapchain?: SwapchainKHR; -} - -export class SwapchainCreateInfoKHR implements BaseStruct { - static size = 104; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSwapchainCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(SwapchainCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SwapchainCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.surface !== undefined) this.surface = data.surface; - if (data.minImageCount !== undefined) this.minImageCount = data.minImageCount; - if (data.imageFormat !== undefined) this.imageFormat = data.imageFormat; - if (data.imageColorSpace !== undefined) this.imageColorSpace = data.imageColorSpace; - if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; - if (data.imageArrayLayers !== undefined) this.imageArrayLayers = data.imageArrayLayers; - if (data.imageUsage !== undefined) this.imageUsage = data.imageUsage; - if (data.imageSharingMode !== undefined) this.imageSharingMode = data.imageSharingMode; - if (data.queueFamilyIndexCount !== undefined) this.queueFamilyIndexCount = data.queueFamilyIndexCount; - if (data.pQueueFamilyIndices !== undefined) this.pQueueFamilyIndices = data.pQueueFamilyIndices; - if (data.preTransform !== undefined) this.preTransform = data.preTransform; - if (data.compositeAlpha !== undefined) this.compositeAlpha = data.compositeAlpha; - if (data.presentMode !== undefined) this.presentMode = data.presentMode; - if (data.clipped !== undefined) this.clipped = data.clipped; - if (data.oldSwapchain !== undefined) this.oldSwapchain = data.oldSwapchain; - } - this.sType = StructureType.SWAPCHAIN_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: SwapchainCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get surface() { - return this.#view.getBigUint64(24, LE); - } - - set surface(value: SurfaceKHR) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get minImageCount() { - return this.#view.getUint32(32, LE); - } - - set minImageCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get imageFormat() { - return this.#view.getUint32(36, LE); - } - - set imageFormat(value: Format) { - this.#view.setUint32(36, Number(value), LE); - } - - get imageColorSpace() { - return this.#view.getUint32(40, LE); - } - - set imageColorSpace(value: ColorSpaceKHR) { - this.#view.setUint32(40, Number(value), LE); - } - - get imageExtent() { - return new Extent2D(this.#data.subarray(44, 44 + Extent2D.size)); - } - - set imageExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 44); - } - - get imageArrayLayers() { - return this.#view.getUint32(52, LE); - } - - set imageArrayLayers(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get imageUsage() { - return this.#view.getUint32(56, LE); - } - - set imageUsage(value: ImageUsageFlags) { - this.#view.setUint32(56, Number(value), LE); - } - - get imageSharingMode() { - return this.#view.getUint32(60, LE); - } - - set imageSharingMode(value: SharingMode) { - this.#view.setUint32(60, Number(value), LE); - } - - get queueFamilyIndexCount() { - return this.#view.getUint32(64, LE); - } - - set queueFamilyIndexCount(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get pQueueFamilyIndices() { - return this.#view.getBigUint64(72, LE); - } - - set pQueueFamilyIndices(value: AnyPointer) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - - get preTransform() { - return this.#view.getUint32(80, LE); - } - - set preTransform(value: SurfaceTransformFlagBitsKHR) { - this.#view.setUint32(80, Number(value), LE); - } - - get compositeAlpha() { - return this.#view.getUint32(84, LE); - } - - set compositeAlpha(value: CompositeAlphaFlagBitsKHR) { - this.#view.setUint32(84, Number(value), LE); - } - - get presentMode() { - return this.#view.getUint32(88, LE); - } - - set presentMode(value: PresentModeKHR) { - this.#view.setUint32(88, Number(value), LE); - } - - get clipped() { - return this.#view.getUint32(92, LE); - } - - set clipped(value: Bool32) { - this.#view.setUint32(92, Number(value), LE); - } - - get oldSwapchain() { - return this.#view.getBigUint64(96, LE); - } - - set oldSwapchain(value: SwapchainKHR) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPresentInfoKHR { - pNext?: AnyPointer; - waitSemaphoreCount?: number; - pWaitSemaphores?: AnyPointer; - swapchainCount?: number; - pSwapchains?: AnyPointer; - pImageIndices?: AnyPointer; - pResults?: AnyPointer; -} - -export class PresentInfoKHR implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPresentInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPresentInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PresentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PresentInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PresentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.waitSemaphoreCount !== undefined) this.waitSemaphoreCount = data.waitSemaphoreCount; - if (data.pWaitSemaphores !== undefined) this.pWaitSemaphores = data.pWaitSemaphores; - if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; - if (data.pSwapchains !== undefined) this.pSwapchains = data.pSwapchains; - if (data.pImageIndices !== undefined) this.pImageIndices = data.pImageIndices; - if (data.pResults !== undefined) this.pResults = data.pResults; - } - this.sType = StructureType.PRESENT_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get waitSemaphoreCount() { - return this.#view.getUint32(16, LE); - } - - set waitSemaphoreCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pWaitSemaphores() { - return this.#view.getBigUint64(24, LE); - } - - set pWaitSemaphores(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get swapchainCount() { - return this.#view.getUint32(32, LE); - } - - set swapchainCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pSwapchains() { - return this.#view.getBigUint64(40, LE); - } - - set pSwapchains(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get pImageIndices() { - return this.#view.getBigUint64(48, LE); - } - - set pImageIndices(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get pResults() { - return this.#view.getBigUint64(56, LE); - } - - set pResults(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDebugReportCallbackCreateInfoEXT { - pNext?: AnyPointer; - flags?: DebugReportFlagsEXT; - pfnCallback?: Deno.PointerValue; - pUserData?: AnyPointer; -} - -export class DebugReportCallbackCreateInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDebugReportCallbackCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDebugReportCallbackCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DebugReportCallbackCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugReportCallbackCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DebugReportCallbackCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DebugReportCallbackCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pfnCallback !== undefined) this.pfnCallback = data.pfnCallback; - if (data.pUserData !== undefined) this.pUserData = data.pUserData; - } - this.sType = StructureType.DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DebugReportFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get pfnCallback() { - throw new Error(`Unknown type: "function"`); - } - - set pfnCallback(value: Deno.PointerValue) { - throw new Error(`Unknown type: "function"`); - } - - get pUserData() { - return this.#view.getBigUint64(32, LE); - } - - set pUserData(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitValidationFlagsEXT { - pNext?: AnyPointer; - disabledValidationCheckCount?: number; - pDisabledValidationChecks?: AnyPointer; -} - -export class ValidationFlagsEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitValidationFlagsEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitValidationFlagsEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ValidationFlagsEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ValidationFlagsEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ValidationFlagsEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ValidationFlagsEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.disabledValidationCheckCount !== undefined) this.disabledValidationCheckCount = data.disabledValidationCheckCount; - if (data.pDisabledValidationChecks !== undefined) this.pDisabledValidationChecks = data.pDisabledValidationChecks; - } - this.sType = StructureType.VALIDATION_FLAGS_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get disabledValidationCheckCount() { - return this.#view.getUint32(16, LE); - } - - set disabledValidationCheckCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pDisabledValidationChecks() { - return this.#view.getBigUint64(24, LE); - } - - set pDisabledValidationChecks(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitValidationFeaturesEXT { - pNext?: AnyPointer; - enabledValidationFeatureCount?: number; - pEnabledValidationFeatures?: AnyPointer; - disabledValidationFeatureCount?: number; - pDisabledValidationFeatures?: AnyPointer; -} - -export class ValidationFeaturesEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitValidationFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitValidationFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ValidationFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ValidationFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ValidationFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ValidationFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.enabledValidationFeatureCount !== undefined) this.enabledValidationFeatureCount = data.enabledValidationFeatureCount; - if (data.pEnabledValidationFeatures !== undefined) this.pEnabledValidationFeatures = data.pEnabledValidationFeatures; - if (data.disabledValidationFeatureCount !== undefined) this.disabledValidationFeatureCount = data.disabledValidationFeatureCount; - if (data.pDisabledValidationFeatures !== undefined) this.pDisabledValidationFeatures = data.pDisabledValidationFeatures; - } - this.sType = StructureType.VALIDATION_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get enabledValidationFeatureCount() { - return this.#view.getUint32(16, LE); - } - - set enabledValidationFeatureCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pEnabledValidationFeatures() { - return this.#view.getBigUint64(24, LE); - } - - set pEnabledValidationFeatures(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get disabledValidationFeatureCount() { - return this.#view.getUint32(32, LE); - } - - set disabledValidationFeatureCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pDisabledValidationFeatures() { - return this.#view.getBigUint64(40, LE); - } - - set pDisabledValidationFeatures(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelineRasterizationStateRasterizationOrderAMD { - pNext?: AnyPointer; - rasterizationOrder?: RasterizationOrderAMD; -} - -export class PipelineRasterizationStateRasterizationOrderAMD implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRasterizationStateRasterizationOrderAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationStateRasterizationOrderAMD) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRasterizationStateRasterizationOrderAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationStateRasterizationOrderAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationStateRasterizationOrderAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRasterizationStateRasterizationOrderAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.rasterizationOrder !== undefined) this.rasterizationOrder = data.rasterizationOrder; - } - this.sType = StructureType.PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get rasterizationOrder() { - return this.#view.getUint32(16, LE); - } - - set rasterizationOrder(value: RasterizationOrderAMD) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDebugMarkerObjectNameInfoEXT { - pNext?: AnyPointer; - objectType?: DebugReportObjectTypeEXT; - object?: Deno.PointerValue; - pObjectName?: AnyPointer; -} - -export class DebugMarkerObjectNameInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDebugMarkerObjectNameInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDebugMarkerObjectNameInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DebugMarkerObjectNameInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugMarkerObjectNameInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DebugMarkerObjectNameInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DebugMarkerObjectNameInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.objectType !== undefined) this.objectType = data.objectType; - if (data.object !== undefined) this.object = data.object; - if (data.pObjectName !== undefined) this.pObjectName = data.pObjectName; - } - this.sType = StructureType.DEBUG_MARKER_OBJECT_NAME_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get objectType() { - return this.#view.getUint32(16, LE); - } - - set objectType(value: DebugReportObjectTypeEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get object() { - return this.#view.getBigUint64(24, LE); - } - - set object(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get pObjectName() { - return this.#view.getBigUint64(32, LE); - } - - set pObjectName(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDebugMarkerObjectTagInfoEXT { - pNext?: AnyPointer; - objectType?: DebugReportObjectTypeEXT; - object?: Deno.PointerValue; - tagName?: Deno.PointerValue; - tagSize?: Deno.PointerValue; - pTag?: AnyPointer; -} - -export class DebugMarkerObjectTagInfoEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDebugMarkerObjectTagInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDebugMarkerObjectTagInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DebugMarkerObjectTagInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugMarkerObjectTagInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DebugMarkerObjectTagInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DebugMarkerObjectTagInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.objectType !== undefined) this.objectType = data.objectType; - if (data.object !== undefined) this.object = data.object; - if (data.tagName !== undefined) this.tagName = data.tagName; - if (data.tagSize !== undefined) this.tagSize = data.tagSize; - if (data.pTag !== undefined) this.pTag = data.pTag; - } - this.sType = StructureType.DEBUG_MARKER_OBJECT_TAG_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get objectType() { - return this.#view.getUint32(16, LE); - } - - set objectType(value: DebugReportObjectTypeEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get object() { - return this.#view.getBigUint64(24, LE); - } - - set object(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get tagName() { - return this.#view.getBigUint64(32, LE); - } - - set tagName(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get tagSize() { - return this.#view.getBigUint64(40, LE); - } - - set tagSize(value: Deno.PointerValue) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get pTag() { - return this.#view.getBigUint64(48, LE); - } - - set pTag(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDebugMarkerMarkerInfoEXT { - pNext?: AnyPointer; - pMarkerName?: AnyPointer; - color?: Float32Array; -} - -export class DebugMarkerMarkerInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDebugMarkerMarkerInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDebugMarkerMarkerInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DebugMarkerMarkerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugMarkerMarkerInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DebugMarkerMarkerInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DebugMarkerMarkerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pMarkerName !== undefined) this.pMarkerName = data.pMarkerName; - if (data.color !== undefined) this.color = data.color; - } - this.sType = StructureType.DEBUG_MARKER_MARKER_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pMarkerName() { - return this.#view.getBigUint64(16, LE); - } - - set pMarkerName(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get color() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 24, 4); - } - - set color(value: Float32Array) { - this.#data.set(new Uint8Array(value.buffer), 24); - } -} - -export interface InitDedicatedAllocationImageCreateInfoNV { - pNext?: AnyPointer; - dedicatedAllocation?: Bool32; -} - -export class DedicatedAllocationImageCreateInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDedicatedAllocationImageCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDedicatedAllocationImageCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(DedicatedAllocationImageCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DedicatedAllocationImageCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DedicatedAllocationImageCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DedicatedAllocationImageCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.dedicatedAllocation !== undefined) this.dedicatedAllocation = data.dedicatedAllocation; - } - this.sType = StructureType.DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dedicatedAllocation() { - return this.#view.getUint32(16, LE); - } - - set dedicatedAllocation(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDedicatedAllocationBufferCreateInfoNV { - pNext?: AnyPointer; - dedicatedAllocation?: Bool32; -} - -export class DedicatedAllocationBufferCreateInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDedicatedAllocationBufferCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDedicatedAllocationBufferCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(DedicatedAllocationBufferCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DedicatedAllocationBufferCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DedicatedAllocationBufferCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DedicatedAllocationBufferCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.dedicatedAllocation !== undefined) this.dedicatedAllocation = data.dedicatedAllocation; - } - this.sType = StructureType.DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dedicatedAllocation() { - return this.#view.getUint32(16, LE); - } - - set dedicatedAllocation(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDedicatedAllocationMemoryAllocateInfoNV { - pNext?: AnyPointer; - image?: Image; - buffer?: Buffer; -} - -export class DedicatedAllocationMemoryAllocateInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDedicatedAllocationMemoryAllocateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDedicatedAllocationMemoryAllocateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(DedicatedAllocationMemoryAllocateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DedicatedAllocationMemoryAllocateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DedicatedAllocationMemoryAllocateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DedicatedAllocationMemoryAllocateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.image !== undefined) this.image = data.image; - if (data.buffer !== undefined) this.buffer = data.buffer; - } - this.sType = StructureType.DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get image() { - return this.#view.getBigUint64(16, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get buffer() { - return this.#view.getBigUint64(24, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExternalImageFormatPropertiesNV { - imageFormatProperties?: ImageFormatProperties; - externalMemoryFeatures?: ExternalMemoryFeatureFlagsNV; - exportFromImportedHandleTypes?: ExternalMemoryHandleTypeFlagsNV; - compatibleHandleTypes?: ExternalMemoryHandleTypeFlagsNV; -} - -export class ExternalImageFormatPropertiesNV implements BaseStruct { - static size = 44; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalImageFormatPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalImageFormatPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalImageFormatPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalImageFormatPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalImageFormatPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalImageFormatPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.imageFormatProperties !== undefined) this.imageFormatProperties = data.imageFormatProperties; - if (data.externalMemoryFeatures !== undefined) this.externalMemoryFeatures = data.externalMemoryFeatures; - if (data.exportFromImportedHandleTypes !== undefined) this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes; - if (data.compatibleHandleTypes !== undefined) this.compatibleHandleTypes = data.compatibleHandleTypes; - } - } - - get imageFormatProperties() { - return new ImageFormatProperties(this.#data.subarray(0, 0 + ImageFormatProperties.size)); - } - - set imageFormatProperties(value: ImageFormatProperties) { - if (value[BUFFER].byteLength < ImageFormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get externalMemoryFeatures() { - return this.#view.getUint32(32, LE); - } - - set externalMemoryFeatures(value: ExternalMemoryFeatureFlagsNV) { - this.#view.setUint32(32, Number(value), LE); - } - - get exportFromImportedHandleTypes() { - return this.#view.getUint32(36, LE); - } - - set exportFromImportedHandleTypes(value: ExternalMemoryHandleTypeFlagsNV) { - this.#view.setUint32(36, Number(value), LE); - } - - get compatibleHandleTypes() { - return this.#view.getUint32(40, LE); - } - - set compatibleHandleTypes(value: ExternalMemoryHandleTypeFlagsNV) { - this.#view.setUint32(40, Number(value), LE); - } -} - -export interface InitExternalMemoryImageCreateInfoNV { - pNext?: AnyPointer; - handleTypes?: ExternalMemoryHandleTypeFlagsNV; -} - -export class ExternalMemoryImageCreateInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalMemoryImageCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalMemoryImageCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalMemoryImageCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryImageCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalMemoryImageCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalMemoryImageCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; - } - this.sType = StructureType.EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleTypes() { - return this.#view.getUint32(16, LE); - } - - set handleTypes(value: ExternalMemoryHandleTypeFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitExportMemoryAllocateInfoNV { - pNext?: AnyPointer; - handleTypes?: ExternalMemoryHandleTypeFlagsNV; -} - -export class ExportMemoryAllocateInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMemoryAllocateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMemoryAllocateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMemoryAllocateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryAllocateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMemoryAllocateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMemoryAllocateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; - } - this.sType = StructureType.EXPORT_MEMORY_ALLOCATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleTypes() { - return this.#view.getUint32(16, LE); - } - - set handleTypes(value: ExternalMemoryHandleTypeFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImportMemoryWin32HandleInfoNV { - pNext?: AnyPointer; - handleType?: ExternalMemoryHandleTypeFlagsNV; - handle?: Deno.PointerValue; -} - -export class ImportMemoryWin32HandleInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMemoryWin32HandleInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryWin32HandleInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMemoryWin32HandleInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryWin32HandleInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryWin32HandleInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMemoryWin32HandleInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.handle !== undefined) this.handle = data.handle; - } - this.sType = StructureType.IMPORT_MEMORY_WIN32_HANDLE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(16, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get handle() { - return this.#view.getBigUint64(24, LE); - } - - set handle(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportMemoryWin32HandleInfoNV { - pNext?: AnyPointer; - pAttributes?: AnyPointer; - dwAccess?: number; -} - -export class ExportMemoryWin32HandleInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMemoryWin32HandleInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMemoryWin32HandleInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMemoryWin32HandleInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryWin32HandleInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMemoryWin32HandleInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMemoryWin32HandleInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pAttributes !== undefined) this.pAttributes = data.pAttributes; - if (data.dwAccess !== undefined) this.dwAccess = data.dwAccess; - } - this.sType = StructureType.EXPORT_MEMORY_WIN32_HANDLE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pAttributes() { - return this.#view.getBigUint64(16, LE); - } - - set pAttributes(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dwAccess() { - return this.#view.getUint32(24, LE); - } - - set dwAccess(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitWin32KeyedMutexAcquireReleaseInfoNV { - pNext?: AnyPointer; - acquireCount?: number; - pAcquireSyncs?: AnyPointer; - pAcquireKeys?: AnyPointer; - pAcquireTimeoutMilliseconds?: AnyPointer; - releaseCount?: number; - pReleaseSyncs?: AnyPointer; - pReleaseKeys?: AnyPointer; -} - -export class Win32KeyedMutexAcquireReleaseInfoNV implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitWin32KeyedMutexAcquireReleaseInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitWin32KeyedMutexAcquireReleaseInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Win32KeyedMutexAcquireReleaseInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < Win32KeyedMutexAcquireReleaseInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.acquireCount !== undefined) this.acquireCount = data.acquireCount; - if (data.pAcquireSyncs !== undefined) this.pAcquireSyncs = data.pAcquireSyncs; - if (data.pAcquireKeys !== undefined) this.pAcquireKeys = data.pAcquireKeys; - if (data.pAcquireTimeoutMilliseconds !== undefined) this.pAcquireTimeoutMilliseconds = data.pAcquireTimeoutMilliseconds; - if (data.releaseCount !== undefined) this.releaseCount = data.releaseCount; - if (data.pReleaseSyncs !== undefined) this.pReleaseSyncs = data.pReleaseSyncs; - if (data.pReleaseKeys !== undefined) this.pReleaseKeys = data.pReleaseKeys; - } - this.sType = StructureType.WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get acquireCount() { - return this.#view.getUint32(16, LE); - } - - set acquireCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pAcquireSyncs() { - return this.#view.getBigUint64(24, LE); - } - - set pAcquireSyncs(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pAcquireKeys() { - return this.#view.getBigUint64(32, LE); - } - - set pAcquireKeys(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get pAcquireTimeoutMilliseconds() { - return this.#view.getBigUint64(40, LE); - } - - set pAcquireTimeoutMilliseconds(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get releaseCount() { - return this.#view.getUint32(48, LE); - } - - set releaseCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pReleaseSyncs() { - return this.#view.getBigUint64(56, LE); - } - - set pReleaseSyncs(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get pReleaseKeys() { - return this.#view.getBigUint64(64, LE); - } - - set pReleaseKeys(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceDeviceGeneratedCommandsFeaturesNV { - pNext?: AnyPointer; - deviceGeneratedCommands?: Bool32; -} - -export class PhysicalDeviceDeviceGeneratedCommandsFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDeviceGeneratedCommandsFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDeviceGeneratedCommandsFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceGeneratedCommands !== undefined) this.deviceGeneratedCommands = data.deviceGeneratedCommands; - } - this.sType = StructureType.PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceGeneratedCommands() { - return this.#view.getUint32(16, LE); - } - - set deviceGeneratedCommands(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDevicePrivateDataCreateInfo { - pNext?: AnyPointer; - privateDataSlotRequestCount?: number; -} - -export class DevicePrivateDataCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDevicePrivateDataCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDevicePrivateDataCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DevicePrivateDataCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DevicePrivateDataCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DevicePrivateDataCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DevicePrivateDataCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.privateDataSlotRequestCount !== undefined) this.privateDataSlotRequestCount = data.privateDataSlotRequestCount; - } - this.sType = StructureType.DEVICE_PRIVATE_DATA_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get privateDataSlotRequestCount() { - return this.#view.getUint32(16, LE); - } - - set privateDataSlotRequestCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPrivateDataSlotCreateInfo { - pNext?: AnyPointer; - flags?: PrivateDataSlotCreateFlags; -} - -export class PrivateDataSlotCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPrivateDataSlotCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPrivateDataSlotCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PrivateDataSlotCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PrivateDataSlotCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PrivateDataSlotCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PrivateDataSlotCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.PRIVATE_DATA_SLOT_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PrivateDataSlotCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevicePrivateDataFeatures { - pNext?: AnyPointer; - privateData?: Bool32; -} - -export class PhysicalDevicePrivateDataFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePrivateDataFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePrivateDataFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePrivateDataFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePrivateDataFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePrivateDataFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePrivateDataFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.privateData !== undefined) this.privateData = data.privateData; - } - this.sType = StructureType.PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get privateData() { - return this.#view.getUint32(16, LE); - } - - set privateData(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDeviceGeneratedCommandsPropertiesNV { - pNext?: AnyPointer; - maxGraphicsShaderGroupCount?: number; - maxIndirectSequenceCount?: number; - maxIndirectCommandsTokenCount?: number; - maxIndirectCommandsStreamCount?: number; - maxIndirectCommandsTokenOffset?: number; - maxIndirectCommandsStreamStride?: number; - minSequencesCountBufferOffsetAlignment?: number; - minSequencesIndexBufferOffsetAlignment?: number; - minIndirectCommandsBufferOffsetAlignment?: number; -} - -export class PhysicalDeviceDeviceGeneratedCommandsPropertiesNV implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDeviceGeneratedCommandsPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDeviceGeneratedCommandsPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDeviceGeneratedCommandsPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxGraphicsShaderGroupCount !== undefined) this.maxGraphicsShaderGroupCount = data.maxGraphicsShaderGroupCount; - if (data.maxIndirectSequenceCount !== undefined) this.maxIndirectSequenceCount = data.maxIndirectSequenceCount; - if (data.maxIndirectCommandsTokenCount !== undefined) this.maxIndirectCommandsTokenCount = data.maxIndirectCommandsTokenCount; - if (data.maxIndirectCommandsStreamCount !== undefined) this.maxIndirectCommandsStreamCount = data.maxIndirectCommandsStreamCount; - if (data.maxIndirectCommandsTokenOffset !== undefined) this.maxIndirectCommandsTokenOffset = data.maxIndirectCommandsTokenOffset; - if (data.maxIndirectCommandsStreamStride !== undefined) this.maxIndirectCommandsStreamStride = data.maxIndirectCommandsStreamStride; - if (data.minSequencesCountBufferOffsetAlignment !== undefined) this.minSequencesCountBufferOffsetAlignment = data.minSequencesCountBufferOffsetAlignment; - if (data.minSequencesIndexBufferOffsetAlignment !== undefined) this.minSequencesIndexBufferOffsetAlignment = data.minSequencesIndexBufferOffsetAlignment; - if (data.minIndirectCommandsBufferOffsetAlignment !== undefined) this.minIndirectCommandsBufferOffsetAlignment = data.minIndirectCommandsBufferOffsetAlignment; - } - this.sType = StructureType.PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxGraphicsShaderGroupCount() { - return this.#view.getUint32(16, LE); - } - - set maxGraphicsShaderGroupCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxIndirectSequenceCount() { - return this.#view.getUint32(20, LE); - } - - set maxIndirectSequenceCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxIndirectCommandsTokenCount() { - return this.#view.getUint32(24, LE); - } - - set maxIndirectCommandsTokenCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get maxIndirectCommandsStreamCount() { - return this.#view.getUint32(28, LE); - } - - set maxIndirectCommandsStreamCount(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get maxIndirectCommandsTokenOffset() { - return this.#view.getUint32(32, LE); - } - - set maxIndirectCommandsTokenOffset(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get maxIndirectCommandsStreamStride() { - return this.#view.getUint32(36, LE); - } - - set maxIndirectCommandsStreamStride(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get minSequencesCountBufferOffsetAlignment() { - return this.#view.getUint32(40, LE); - } - - set minSequencesCountBufferOffsetAlignment(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get minSequencesIndexBufferOffsetAlignment() { - return this.#view.getUint32(44, LE); - } - - set minSequencesIndexBufferOffsetAlignment(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get minIndirectCommandsBufferOffsetAlignment() { - return this.#view.getUint32(48, LE); - } - - set minIndirectCommandsBufferOffsetAlignment(value: number) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMultiDrawPropertiesEXT { - pNext?: AnyPointer; - maxMultiDrawCount?: number; -} - -export class PhysicalDeviceMultiDrawPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMultiDrawPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiDrawPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMultiDrawPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiDrawPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiDrawPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMultiDrawPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxMultiDrawCount !== undefined) this.maxMultiDrawCount = data.maxMultiDrawCount; - } - this.sType = StructureType.PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxMultiDrawCount() { - return this.#view.getUint32(16, LE); - } - - set maxMultiDrawCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitGraphicsShaderGroupCreateInfoNV { - pNext?: AnyPointer; - stageCount?: number; - pStages?: AnyPointer; - pVertexInputState?: AnyPointer; - pTessellationState?: AnyPointer; -} - -export class GraphicsShaderGroupCreateInfoNV implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGraphicsShaderGroupCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGraphicsShaderGroupCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(GraphicsShaderGroupCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsShaderGroupCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GraphicsShaderGroupCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GraphicsShaderGroupCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stageCount !== undefined) this.stageCount = data.stageCount; - if (data.pStages !== undefined) this.pStages = data.pStages; - if (data.pVertexInputState !== undefined) this.pVertexInputState = data.pVertexInputState; - if (data.pTessellationState !== undefined) this.pTessellationState = data.pTessellationState; - } - this.sType = StructureType.GRAPHICS_SHADER_GROUP_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stageCount() { - return this.#view.getUint32(16, LE); - } - - set stageCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pStages() { - return this.#view.getBigUint64(24, LE); - } - - set pStages(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pVertexInputState() { - return this.#view.getBigUint64(32, LE); - } - - set pVertexInputState(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get pTessellationState() { - return this.#view.getBigUint64(40, LE); - } - - set pTessellationState(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitGraphicsPipelineShaderGroupsCreateInfoNV { - pNext?: AnyPointer; - groupCount?: number; - pGroups?: AnyPointer; - pipelineCount?: number; - pPipelines?: AnyPointer; -} - -export class GraphicsPipelineShaderGroupsCreateInfoNV implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGraphicsPipelineShaderGroupsCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGraphicsPipelineShaderGroupsCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(GraphicsPipelineShaderGroupsCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsPipelineShaderGroupsCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GraphicsPipelineShaderGroupsCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GraphicsPipelineShaderGroupsCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.groupCount !== undefined) this.groupCount = data.groupCount; - if (data.pGroups !== undefined) this.pGroups = data.pGroups; - if (data.pipelineCount !== undefined) this.pipelineCount = data.pipelineCount; - if (data.pPipelines !== undefined) this.pPipelines = data.pPipelines; - } - this.sType = StructureType.GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get groupCount() { - return this.#view.getUint32(16, LE); - } - - set groupCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pGroups() { - return this.#view.getBigUint64(24, LE); - } - - set pGroups(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pipelineCount() { - return this.#view.getUint32(32, LE); - } - - set pipelineCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pPipelines() { - return this.#view.getBigUint64(40, LE); - } - - set pPipelines(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitBindShaderGroupIndirectCommandNV { - groupIndex?: number; -} - -export class BindShaderGroupIndirectCommandNV implements BaseStruct { - static size = 4; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindShaderGroupIndirectCommandNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindShaderGroupIndirectCommandNV) { - if (data === undefined) { - this.#data = new Uint8Array(BindShaderGroupIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindShaderGroupIndirectCommandNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindShaderGroupIndirectCommandNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindShaderGroupIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.groupIndex !== undefined) this.groupIndex = data.groupIndex; - } - } - - get groupIndex() { - return this.#view.getUint32(0, LE); - } - - set groupIndex(value: number) { - this.#view.setUint32(0, Number(value), LE); - } -} - -export interface InitBindIndexBufferIndirectCommandNV { - bufferAddress?: DeviceAddress; - size?: number; - indexType?: IndexType; -} - -export class BindIndexBufferIndirectCommandNV implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindIndexBufferIndirectCommandNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindIndexBufferIndirectCommandNV) { - if (data === undefined) { - this.#data = new Uint8Array(BindIndexBufferIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindIndexBufferIndirectCommandNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindIndexBufferIndirectCommandNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindIndexBufferIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.bufferAddress !== undefined) this.bufferAddress = data.bufferAddress; - if (data.size !== undefined) this.size = data.size; - if (data.indexType !== undefined) this.indexType = data.indexType; - } - } - - get bufferAddress() { - return this.#view.getBigUint64(0, LE); - } - - set bufferAddress(value: DeviceAddress) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get size() { - return this.#view.getUint32(8, LE); - } - - set size(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get indexType() { - return this.#view.getUint32(12, LE); - } - - set indexType(value: IndexType) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitBindVertexBufferIndirectCommandNV { - bufferAddress?: DeviceAddress; - size?: number; - stride?: number; -} - -export class BindVertexBufferIndirectCommandNV implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindVertexBufferIndirectCommandNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindVertexBufferIndirectCommandNV) { - if (data === undefined) { - this.#data = new Uint8Array(BindVertexBufferIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindVertexBufferIndirectCommandNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindVertexBufferIndirectCommandNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindVertexBufferIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.bufferAddress !== undefined) this.bufferAddress = data.bufferAddress; - if (data.size !== undefined) this.size = data.size; - if (data.stride !== undefined) this.stride = data.stride; - } - } - - get bufferAddress() { - return this.#view.getBigUint64(0, LE); - } - - set bufferAddress(value: DeviceAddress) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get size() { - return this.#view.getUint32(8, LE); - } - - set size(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get stride() { - return this.#view.getUint32(12, LE); - } - - set stride(value: number) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitSetStateFlagsIndirectCommandNV { - data?: number; -} - -export class SetStateFlagsIndirectCommandNV implements BaseStruct { - static size = 4; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSetStateFlagsIndirectCommandNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSetStateFlagsIndirectCommandNV) { - if (data === undefined) { - this.#data = new Uint8Array(SetStateFlagsIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SetStateFlagsIndirectCommandNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SetStateFlagsIndirectCommandNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SetStateFlagsIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.data !== undefined) this.data = data.data; - } - } - - get data() { - return this.#view.getUint32(0, LE); - } - - set data(value: number) { - this.#view.setUint32(0, Number(value), LE); - } -} - -export interface InitIndirectCommandsStreamNV { - buffer?: Buffer; - offset?: DeviceSize; -} - -export class IndirectCommandsStreamNV implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitIndirectCommandsStreamNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitIndirectCommandsStreamNV) { - if (data === undefined) { - this.#data = new Uint8Array(IndirectCommandsStreamNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IndirectCommandsStreamNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < IndirectCommandsStreamNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(IndirectCommandsStreamNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.offset !== undefined) this.offset = data.offset; - } - } - - get buffer() { - return this.#view.getBigUint64(0, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(0, BigInt(anyPointer(value)), LE); - } - - get offset() { - return this.#view.getBigUint64(8, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} - -export interface InitIndirectCommandsLayoutTokenNV { - pNext?: AnyPointer; - tokenType?: IndirectCommandsTokenTypeNV; - stream?: number; - offset?: number; - vertexBindingUnit?: number; - vertexDynamicStride?: Bool32; - pushconstantPipelineLayout?: PipelineLayout; - pushconstantShaderStageFlags?: ShaderStageFlags; - pushconstantOffset?: number; - pushconstantSize?: number; - indirectStateFlags?: IndirectStateFlagsNV; - indexTypeCount?: number; - pIndexTypes?: AnyPointer; - pIndexTypeValues?: AnyPointer; -} - -export class IndirectCommandsLayoutTokenNV implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitIndirectCommandsLayoutTokenNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitIndirectCommandsLayoutTokenNV) { - if (data === undefined) { - this.#data = new Uint8Array(IndirectCommandsLayoutTokenNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IndirectCommandsLayoutTokenNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < IndirectCommandsLayoutTokenNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(IndirectCommandsLayoutTokenNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.tokenType !== undefined) this.tokenType = data.tokenType; - if (data.stream !== undefined) this.stream = data.stream; - if (data.offset !== undefined) this.offset = data.offset; - if (data.vertexBindingUnit !== undefined) this.vertexBindingUnit = data.vertexBindingUnit; - if (data.vertexDynamicStride !== undefined) this.vertexDynamicStride = data.vertexDynamicStride; - if (data.pushconstantPipelineLayout !== undefined) this.pushconstantPipelineLayout = data.pushconstantPipelineLayout; - if (data.pushconstantShaderStageFlags !== undefined) this.pushconstantShaderStageFlags = data.pushconstantShaderStageFlags; - if (data.pushconstantOffset !== undefined) this.pushconstantOffset = data.pushconstantOffset; - if (data.pushconstantSize !== undefined) this.pushconstantSize = data.pushconstantSize; - if (data.indirectStateFlags !== undefined) this.indirectStateFlags = data.indirectStateFlags; - if (data.indexTypeCount !== undefined) this.indexTypeCount = data.indexTypeCount; - if (data.pIndexTypes !== undefined) this.pIndexTypes = data.pIndexTypes; - if (data.pIndexTypeValues !== undefined) this.pIndexTypeValues = data.pIndexTypeValues; - } - this.sType = StructureType.INDIRECT_COMMANDS_LAYOUT_TOKEN_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get tokenType() { - return this.#view.getUint32(16, LE); - } - - set tokenType(value: IndirectCommandsTokenTypeNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get stream() { - return this.#view.getUint32(20, LE); - } - - set stream(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get offset() { - return this.#view.getUint32(24, LE); - } - - set offset(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get vertexBindingUnit() { - return this.#view.getUint32(28, LE); - } - - set vertexBindingUnit(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get vertexDynamicStride() { - return this.#view.getUint32(32, LE); - } - - set vertexDynamicStride(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get pushconstantPipelineLayout() { - return this.#view.getBigUint64(40, LE); - } - - set pushconstantPipelineLayout(value: PipelineLayout) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get pushconstantShaderStageFlags() { - return this.#view.getUint32(48, LE); - } - - set pushconstantShaderStageFlags(value: ShaderStageFlags) { - this.#view.setUint32(48, Number(value), LE); - } - - get pushconstantOffset() { - return this.#view.getUint32(52, LE); - } - - set pushconstantOffset(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get pushconstantSize() { - return this.#view.getUint32(56, LE); - } - - set pushconstantSize(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get indirectStateFlags() { - return this.#view.getUint32(60, LE); - } - - set indirectStateFlags(value: IndirectStateFlagsNV) { - this.#view.setUint32(60, Number(value), LE); - } - - get indexTypeCount() { - return this.#view.getUint32(64, LE); - } - - set indexTypeCount(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get pIndexTypes() { - return this.#view.getBigUint64(72, LE); - } - - set pIndexTypes(value: AnyPointer) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - - get pIndexTypeValues() { - return this.#view.getBigUint64(80, LE); - } - - set pIndexTypeValues(value: AnyPointer) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } -} - -export interface InitIndirectCommandsLayoutCreateInfoNV { - pNext?: AnyPointer; - flags?: IndirectCommandsLayoutUsageFlagsNV; - pipelineBindPoint?: PipelineBindPoint; - tokenCount?: number; - pTokens?: AnyPointer; - streamCount?: number; - pStreamStrides?: AnyPointer; -} - -export class IndirectCommandsLayoutCreateInfoNV implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitIndirectCommandsLayoutCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitIndirectCommandsLayoutCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(IndirectCommandsLayoutCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IndirectCommandsLayoutCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < IndirectCommandsLayoutCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(IndirectCommandsLayoutCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; - if (data.tokenCount !== undefined) this.tokenCount = data.tokenCount; - if (data.pTokens !== undefined) this.pTokens = data.pTokens; - if (data.streamCount !== undefined) this.streamCount = data.streamCount; - if (data.pStreamStrides !== undefined) this.pStreamStrides = data.pStreamStrides; - } - this.sType = StructureType.INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: IndirectCommandsLayoutUsageFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get pipelineBindPoint() { - return this.#view.getUint32(20, LE); - } - - set pipelineBindPoint(value: PipelineBindPoint) { - this.#view.setUint32(20, Number(value), LE); - } - - get tokenCount() { - return this.#view.getUint32(24, LE); - } - - set tokenCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pTokens() { - return this.#view.getBigUint64(32, LE); - } - - set pTokens(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get streamCount() { - return this.#view.getUint32(40, LE); - } - - set streamCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get pStreamStrides() { - return this.#view.getBigUint64(48, LE); - } - - set pStreamStrides(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitGeneratedCommandsInfoNV { - pNext?: AnyPointer; - pipelineBindPoint?: PipelineBindPoint; - pipeline?: Pipeline; - indirectCommandsLayout?: IndirectCommandsLayoutNV; - streamCount?: number; - pStreams?: AnyPointer; - sequencesCount?: number; - preprocessBuffer?: Buffer; - preprocessOffset?: DeviceSize; - preprocessSize?: DeviceSize; - sequencesCountBuffer?: Buffer; - sequencesCountOffset?: DeviceSize; - sequencesIndexBuffer?: Buffer; - sequencesIndexOffset?: DeviceSize; -} - -export class GeneratedCommandsInfoNV implements BaseStruct { - static size = 120; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGeneratedCommandsInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGeneratedCommandsInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(GeneratedCommandsInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeneratedCommandsInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GeneratedCommandsInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GeneratedCommandsInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; - if (data.pipeline !== undefined) this.pipeline = data.pipeline; - if (data.indirectCommandsLayout !== undefined) this.indirectCommandsLayout = data.indirectCommandsLayout; - if (data.streamCount !== undefined) this.streamCount = data.streamCount; - if (data.pStreams !== undefined) this.pStreams = data.pStreams; - if (data.sequencesCount !== undefined) this.sequencesCount = data.sequencesCount; - if (data.preprocessBuffer !== undefined) this.preprocessBuffer = data.preprocessBuffer; - if (data.preprocessOffset !== undefined) this.preprocessOffset = data.preprocessOffset; - if (data.preprocessSize !== undefined) this.preprocessSize = data.preprocessSize; - if (data.sequencesCountBuffer !== undefined) this.sequencesCountBuffer = data.sequencesCountBuffer; - if (data.sequencesCountOffset !== undefined) this.sequencesCountOffset = data.sequencesCountOffset; - if (data.sequencesIndexBuffer !== undefined) this.sequencesIndexBuffer = data.sequencesIndexBuffer; - if (data.sequencesIndexOffset !== undefined) this.sequencesIndexOffset = data.sequencesIndexOffset; - } - this.sType = StructureType.GENERATED_COMMANDS_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipelineBindPoint() { - return this.#view.getUint32(16, LE); - } - - set pipelineBindPoint(value: PipelineBindPoint) { - this.#view.setUint32(16, Number(value), LE); - } - - get pipeline() { - return this.#view.getBigUint64(24, LE); - } - - set pipeline(value: Pipeline) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get indirectCommandsLayout() { - return this.#view.getBigUint64(32, LE); - } - - set indirectCommandsLayout(value: IndirectCommandsLayoutNV) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get streamCount() { - return this.#view.getUint32(40, LE); - } - - set streamCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get pStreams() { - return this.#view.getBigUint64(48, LE); - } - - set pStreams(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get sequencesCount() { - return this.#view.getUint32(56, LE); - } - - set sequencesCount(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get preprocessBuffer() { - return this.#view.getBigUint64(64, LE); - } - - set preprocessBuffer(value: Buffer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - - get preprocessOffset() { - return this.#view.getBigUint64(72, LE); - } - - set preprocessOffset(value: DeviceSize) { - this.#view.setBigUint64(72, BigInt(value), LE); - } - - get preprocessSize() { - return this.#view.getBigUint64(80, LE); - } - - set preprocessSize(value: DeviceSize) { - this.#view.setBigUint64(80, BigInt(value), LE); - } - - get sequencesCountBuffer() { - return this.#view.getBigUint64(88, LE); - } - - set sequencesCountBuffer(value: Buffer) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } - - get sequencesCountOffset() { - return this.#view.getBigUint64(96, LE); - } - - set sequencesCountOffset(value: DeviceSize) { - this.#view.setBigUint64(96, BigInt(value), LE); - } - - get sequencesIndexBuffer() { - return this.#view.getBigUint64(104, LE); - } - - set sequencesIndexBuffer(value: Buffer) { - this.#view.setBigUint64(104, BigInt(anyPointer(value)), LE); - } - - get sequencesIndexOffset() { - return this.#view.getBigUint64(112, LE); - } - - set sequencesIndexOffset(value: DeviceSize) { - this.#view.setBigUint64(112, BigInt(value), LE); - } -} - -export interface InitGeneratedCommandsMemoryRequirementsInfoNV { - pNext?: AnyPointer; - pipelineBindPoint?: PipelineBindPoint; - pipeline?: Pipeline; - indirectCommandsLayout?: IndirectCommandsLayoutNV; - maxSequencesCount?: number; -} - -export class GeneratedCommandsMemoryRequirementsInfoNV implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGeneratedCommandsMemoryRequirementsInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGeneratedCommandsMemoryRequirementsInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(GeneratedCommandsMemoryRequirementsInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeneratedCommandsMemoryRequirementsInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GeneratedCommandsMemoryRequirementsInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GeneratedCommandsMemoryRequirementsInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; - if (data.pipeline !== undefined) this.pipeline = data.pipeline; - if (data.indirectCommandsLayout !== undefined) this.indirectCommandsLayout = data.indirectCommandsLayout; - if (data.maxSequencesCount !== undefined) this.maxSequencesCount = data.maxSequencesCount; - } - this.sType = StructureType.GENERATED_COMMANDS_MEMORY_REQUIREMENTS_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipelineBindPoint() { - return this.#view.getUint32(16, LE); - } - - set pipelineBindPoint(value: PipelineBindPoint) { - this.#view.setUint32(16, Number(value), LE); - } - - get pipeline() { - return this.#view.getBigUint64(24, LE); - } - - set pipeline(value: Pipeline) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get indirectCommandsLayout() { - return this.#view.getBigUint64(32, LE); - } - - set indirectCommandsLayout(value: IndirectCommandsLayoutNV) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get maxSequencesCount() { - return this.#view.getUint32(40, LE); - } - - set maxSequencesCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFeatures2 { - pNext?: AnyPointer; - features?: PhysicalDeviceFeatures; -} - -export class PhysicalDeviceFeatures2 implements BaseStruct { - static size = 240; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFeatures2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFeatures2) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFeatures2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFeatures2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFeatures2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFeatures2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.features !== undefined) this.features = data.features; - } - this.sType = StructureType.PHYSICAL_DEVICE_FEATURES_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get features() { - return new PhysicalDeviceFeatures(this.#data.subarray(16, 16 + PhysicalDeviceFeatures.size)); - } - - set features(value: PhysicalDeviceFeatures) { - if (value[BUFFER].byteLength < PhysicalDeviceFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitPhysicalDeviceProperties2 { - pNext?: AnyPointer; - properties?: PhysicalDeviceProperties; -} - -export class PhysicalDeviceProperties2 implements BaseStruct { - static size = 536; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceProperties2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProperties2) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProperties2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProperties2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.properties !== undefined) this.properties = data.properties; - } - this.sType = StructureType.PHYSICAL_DEVICE_PROPERTIES_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get properties() { - return new PhysicalDeviceProperties(this.#data.subarray(16, 16 + PhysicalDeviceProperties.size)); - } - - set properties(value: PhysicalDeviceProperties) { - if (value[BUFFER].byteLength < PhysicalDeviceProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitFormatProperties2 { - pNext?: AnyPointer; - formatProperties?: FormatProperties; -} - -export class FormatProperties2 implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFormatProperties2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFormatProperties2) { - if (data === undefined) { - this.#data = new Uint8Array(FormatProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FormatProperties2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FormatProperties2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FormatProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.formatProperties !== undefined) this.formatProperties = data.formatProperties; - } - this.sType = StructureType.FORMAT_PROPERTIES_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get formatProperties() { - return new FormatProperties(this.#data.subarray(16, 16 + FormatProperties.size)); - } - - set formatProperties(value: FormatProperties) { - if (value[BUFFER].byteLength < FormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitImageFormatProperties2 { - pNext?: AnyPointer; - imageFormatProperties?: ImageFormatProperties; -} - -export class ImageFormatProperties2 implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageFormatProperties2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageFormatProperties2) { - if (data === undefined) { - this.#data = new Uint8Array(ImageFormatProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatProperties2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageFormatProperties2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageFormatProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageFormatProperties !== undefined) this.imageFormatProperties = data.imageFormatProperties; - } - this.sType = StructureType.IMAGE_FORMAT_PROPERTIES_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageFormatProperties() { - return new ImageFormatProperties(this.#data.subarray(16, 16 + ImageFormatProperties.size)); - } - - set imageFormatProperties(value: ImageFormatProperties) { - if (value[BUFFER].byteLength < ImageFormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitPhysicalDeviceImageFormatInfo2 { - pNext?: AnyPointer; - format?: Format; - type?: ImageType; - tiling?: ImageTiling; - usage?: ImageUsageFlags; - flags?: ImageCreateFlags; -} - -export class PhysicalDeviceImageFormatInfo2 implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImageFormatInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageFormatInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImageFormatInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageFormatInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageFormatInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImageFormatInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.format !== undefined) this.format = data.format; - if (data.type !== undefined) this.type = data.type; - if (data.tiling !== undefined) this.tiling = data.tiling; - if (data.usage !== undefined) this.usage = data.usage; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get format() { - return this.#view.getUint32(16, LE); - } - - set format(value: Format) { - this.#view.setUint32(16, Number(value), LE); - } - - get type() { - return this.#view.getUint32(20, LE); - } - - set type(value: ImageType) { - this.#view.setUint32(20, Number(value), LE); - } - - get tiling() { - return this.#view.getUint32(24, LE); - } - - set tiling(value: ImageTiling) { - this.#view.setUint32(24, Number(value), LE); - } - - get usage() { - return this.#view.getUint32(28, LE); - } - - set usage(value: ImageUsageFlags) { - this.#view.setUint32(28, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(32, LE); - } - - set flags(value: ImageCreateFlags) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitQueueFamilyProperties2 { - pNext?: AnyPointer; - queueFamilyProperties?: QueueFamilyProperties; -} - -export class QueueFamilyProperties2 implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueueFamilyProperties2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyProperties2) { - if (data === undefined) { - this.#data = new Uint8Array(QueueFamilyProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyProperties2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyProperties2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueueFamilyProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.queueFamilyProperties !== undefined) this.queueFamilyProperties = data.queueFamilyProperties; - } - this.sType = StructureType.QUEUE_FAMILY_PROPERTIES_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get queueFamilyProperties() { - return new QueueFamilyProperties(this.#data.subarray(16, 16 + QueueFamilyProperties.size)); - } - - set queueFamilyProperties(value: QueueFamilyProperties) { - if (value[BUFFER].byteLength < QueueFamilyProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitPhysicalDeviceMemoryProperties2 { - pNext?: AnyPointer; - memoryProperties?: PhysicalDeviceMemoryProperties; -} - -export class PhysicalDeviceMemoryProperties2 implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMemoryProperties2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryProperties2) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMemoryProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryProperties2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryProperties2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMemoryProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryProperties !== undefined) this.memoryProperties = data.memoryProperties; - } - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_PROPERTIES_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryProperties() { - return new PhysicalDeviceMemoryProperties(this.#data.subarray(16, 16 + PhysicalDeviceMemoryProperties.size)); - } - - set memoryProperties(value: PhysicalDeviceMemoryProperties) { - if (value[BUFFER].byteLength < PhysicalDeviceMemoryProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitSparseImageFormatProperties2 { - pNext?: AnyPointer; - properties?: SparseImageFormatProperties; -} - -export class SparseImageFormatProperties2 implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSparseImageFormatProperties2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageFormatProperties2) { - if (data === undefined) { - this.#data = new Uint8Array(SparseImageFormatProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageFormatProperties2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageFormatProperties2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SparseImageFormatProperties2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.properties !== undefined) this.properties = data.properties; - } - this.sType = StructureType.SPARSE_IMAGE_FORMAT_PROPERTIES_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get properties() { - return new SparseImageFormatProperties(this.#data.subarray(16, 16 + SparseImageFormatProperties.size)); - } - - set properties(value: SparseImageFormatProperties) { - if (value[BUFFER].byteLength < SparseImageFormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitPhysicalDeviceSparseImageFormatInfo2 { - pNext?: AnyPointer; - format?: Format; - type?: ImageType; - samples?: SampleCountFlagBits; - usage?: ImageUsageFlags; - tiling?: ImageTiling; -} - -export class PhysicalDeviceSparseImageFormatInfo2 implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSparseImageFormatInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSparseImageFormatInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSparseImageFormatInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSparseImageFormatInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSparseImageFormatInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSparseImageFormatInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.format !== undefined) this.format = data.format; - if (data.type !== undefined) this.type = data.type; - if (data.samples !== undefined) this.samples = data.samples; - if (data.usage !== undefined) this.usage = data.usage; - if (data.tiling !== undefined) this.tiling = data.tiling; - } - this.sType = StructureType.PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get format() { - return this.#view.getUint32(16, LE); - } - - set format(value: Format) { - this.#view.setUint32(16, Number(value), LE); - } - - get type() { - return this.#view.getUint32(20, LE); - } - - set type(value: ImageType) { - this.#view.setUint32(20, Number(value), LE); - } - - get samples() { - return this.#view.getUint32(24, LE); - } - - set samples(value: SampleCountFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } - - get usage() { - return this.#view.getUint32(28, LE); - } - - set usage(value: ImageUsageFlags) { - this.#view.setUint32(28, Number(value), LE); - } - - get tiling() { - return this.#view.getUint32(32, LE); - } - - set tiling(value: ImageTiling) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitPhysicalDevicePushDescriptorPropertiesKHR { - pNext?: AnyPointer; - maxPushDescriptors?: number; -} - -export class PhysicalDevicePushDescriptorPropertiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePushDescriptorPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePushDescriptorPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePushDescriptorPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePushDescriptorPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePushDescriptorPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePushDescriptorPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxPushDescriptors !== undefined) this.maxPushDescriptors = data.maxPushDescriptors; - } - this.sType = StructureType.PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxPushDescriptors() { - return this.#view.getUint32(16, LE); - } - - set maxPushDescriptors(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitConformanceVersion { - major?: number; - minor?: number; - subminor?: number; - patch?: number; -} - -export class ConformanceVersion implements BaseStruct { - static size = 4; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitConformanceVersion); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitConformanceVersion) { - if (data === undefined) { - this.#data = new Uint8Array(ConformanceVersion.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ConformanceVersion.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ConformanceVersion.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ConformanceVersion.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.major !== undefined) this.major = data.major; - if (data.minor !== undefined) this.minor = data.minor; - if (data.subminor !== undefined) this.subminor = data.subminor; - if (data.patch !== undefined) this.patch = data.patch; - } - } - - get major() { - return this.#view.getUint8(0); - } - - set major(value: number) { - this.#view.setUint8(0, Number(value)); - } - - get minor() { - return this.#view.getUint8(1); - } - - set minor(value: number) { - this.#view.setUint8(1, Number(value)); - } - - get subminor() { - return this.#view.getUint8(2); - } - - set subminor(value: number) { - this.#view.setUint8(2, Number(value)); - } - - get patch() { - return this.#view.getUint8(3); - } - - set patch(value: number) { - this.#view.setUint8(3, Number(value)); - } -} - -export interface InitPhysicalDeviceDriverProperties { - pNext?: AnyPointer; - driverID?: DriverId; - driverName?: Uint8Array; - driverInfo?: Uint8Array; - conformanceVersion?: ConformanceVersion; -} - -export class PhysicalDeviceDriverProperties implements BaseStruct { - static size = 536; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDriverProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDriverProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDriverProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDriverProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDriverProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDriverProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.driverID !== undefined) this.driverID = data.driverID; - if (data.driverName !== undefined) this.driverName = data.driverName; - if (data.driverInfo !== undefined) this.driverInfo = data.driverInfo; - if (data.conformanceVersion !== undefined) this.conformanceVersion = data.conformanceVersion; - } - this.sType = StructureType.PHYSICAL_DEVICE_DRIVER_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get driverID() { - return this.#view.getUint32(16, LE); - } - - set driverID(value: DriverId) { - this.#view.setUint32(16, Number(value), LE); - } - - get driverName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - - set driverName(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - - get driverInfo() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); - } - - set driverInfo(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - - get conformanceVersion() { - return new ConformanceVersion(this.#data.subarray(532, 532 + ConformanceVersion.size)); - } - - set conformanceVersion(value: ConformanceVersion) { - if (value[BUFFER].byteLength < ConformanceVersion.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 532); - } -} - -export interface InitPresentRegionsKHR { - pNext?: AnyPointer; - swapchainCount?: number; - pRegions?: AnyPointer; -} - -export class PresentRegionsKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPresentRegionsKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPresentRegionsKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PresentRegionsKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentRegionsKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PresentRegionsKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PresentRegionsKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; - if (data.pRegions !== undefined) this.pRegions = data.pRegions; - } - this.sType = StructureType.PRESENT_REGIONS_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get swapchainCount() { - return this.#view.getUint32(16, LE); - } - - set swapchainCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pRegions() { - return this.#view.getBigUint64(24, LE); - } - - set pRegions(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPresentRegionKHR { - rectangleCount?: number; - pRectangles?: AnyPointer; -} - -export class PresentRegionKHR implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPresentRegionKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPresentRegionKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PresentRegionKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentRegionKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PresentRegionKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PresentRegionKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.rectangleCount !== undefined) this.rectangleCount = data.rectangleCount; - if (data.pRectangles !== undefined) this.pRectangles = data.pRectangles; - } - } - - get rectangleCount() { - return this.#view.getUint32(0, LE); - } - - set rectangleCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get pRectangles() { - return this.#view.getBigUint64(8, LE); - } - - set pRectangles(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} - -export interface InitRectLayerKHR { - offset?: Offset2D; - extent?: Extent2D; - layer?: number; -} - -export class RectLayerKHR implements BaseStruct { - static size = 20; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRectLayerKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRectLayerKHR) { - if (data === undefined) { - this.#data = new Uint8Array(RectLayerKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RectLayerKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RectLayerKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RectLayerKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.offset !== undefined) this.offset = data.offset; - if (data.extent !== undefined) this.extent = data.extent; - if (data.layer !== undefined) this.layer = data.layer; - } - } - - get offset() { - return new Offset2D(this.#data.subarray(0, 0 + Offset2D.size)); - } - - set offset(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get extent() { - return new Extent2D(this.#data.subarray(8, 8 + Extent2D.size)); - } - - set extent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 8); - } - - get layer() { - return this.#view.getUint32(16, LE); - } - - set layer(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceVariablePointersFeatures { - pNext?: AnyPointer; - variablePointersStorageBuffer?: Bool32; - variablePointers?: Bool32; -} - -export class PhysicalDeviceVariablePointersFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVariablePointersFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVariablePointersFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVariablePointersFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVariablePointersFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVariablePointersFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVariablePointersFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.variablePointersStorageBuffer !== undefined) this.variablePointersStorageBuffer = data.variablePointersStorageBuffer; - if (data.variablePointers !== undefined) this.variablePointers = data.variablePointers; - } - this.sType = StructureType.PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get variablePointersStorageBuffer() { - return this.#view.getUint32(16, LE); - } - - set variablePointersStorageBuffer(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get variablePointers() { - return this.#view.getUint32(20, LE); - } - - set variablePointers(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitExternalMemoryProperties { - externalMemoryFeatures?: ExternalMemoryFeatureFlags; - exportFromImportedHandleTypes?: ExternalMemoryHandleTypeFlags; - compatibleHandleTypes?: ExternalMemoryHandleTypeFlags; -} - -export class ExternalMemoryProperties implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalMemoryProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalMemoryProperties) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalMemoryProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalMemoryProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalMemoryProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.externalMemoryFeatures !== undefined) this.externalMemoryFeatures = data.externalMemoryFeatures; - if (data.exportFromImportedHandleTypes !== undefined) this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes; - if (data.compatibleHandleTypes !== undefined) this.compatibleHandleTypes = data.compatibleHandleTypes; - } - } - - get externalMemoryFeatures() { - return this.#view.getUint32(0, LE); - } - - set externalMemoryFeatures(value: ExternalMemoryFeatureFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get exportFromImportedHandleTypes() { - return this.#view.getUint32(4, LE); - } - - set exportFromImportedHandleTypes(value: ExternalMemoryHandleTypeFlags) { - this.#view.setUint32(4, Number(value), LE); - } - - get compatibleHandleTypes() { - return this.#view.getUint32(8, LE); - } - - set compatibleHandleTypes(value: ExternalMemoryHandleTypeFlags) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitPhysicalDeviceExternalImageFormatInfo { - pNext?: AnyPointer; - handleType?: ExternalMemoryHandleTypeFlagBits; -} - -export class PhysicalDeviceExternalImageFormatInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExternalImageFormatInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalImageFormatInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExternalImageFormatInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalImageFormatInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalImageFormatInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExternalImageFormatInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(16, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitExternalImageFormatProperties { - pNext?: AnyPointer; - externalMemoryProperties?: ExternalMemoryProperties; -} - -export class ExternalImageFormatProperties implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalImageFormatProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalImageFormatProperties) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalImageFormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalImageFormatProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalImageFormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalImageFormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.externalMemoryProperties !== undefined) this.externalMemoryProperties = data.externalMemoryProperties; - } - this.sType = StructureType.EXTERNAL_IMAGE_FORMAT_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get externalMemoryProperties() { - return new ExternalMemoryProperties(this.#data.subarray(16, 16 + ExternalMemoryProperties.size)); - } - - set externalMemoryProperties(value: ExternalMemoryProperties) { - if (value[BUFFER].byteLength < ExternalMemoryProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitPhysicalDeviceExternalBufferInfo { - pNext?: AnyPointer; - flags?: BufferCreateFlags; - usage?: BufferUsageFlags; - handleType?: ExternalMemoryHandleTypeFlagBits; -} - -export class PhysicalDeviceExternalBufferInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExternalBufferInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalBufferInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExternalBufferInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalBufferInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalBufferInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExternalBufferInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.usage !== undefined) this.usage = data.usage; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: BufferCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get usage() { - return this.#view.getUint32(20, LE); - } - - set usage(value: BufferUsageFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitExternalBufferProperties { - pNext?: AnyPointer; - externalMemoryProperties?: ExternalMemoryProperties; -} - -export class ExternalBufferProperties implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalBufferProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalBufferProperties) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalBufferProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalBufferProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalBufferProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalBufferProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.externalMemoryProperties !== undefined) this.externalMemoryProperties = data.externalMemoryProperties; - } - this.sType = StructureType.EXTERNAL_BUFFER_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get externalMemoryProperties() { - return new ExternalMemoryProperties(this.#data.subarray(16, 16 + ExternalMemoryProperties.size)); - } - - set externalMemoryProperties(value: ExternalMemoryProperties) { - if (value[BUFFER].byteLength < ExternalMemoryProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitPhysicalDeviceIDProperties { - pNext?: AnyPointer; - deviceUUID?: Uint8Array; - driverUUID?: Uint8Array; - deviceLUID?: Uint8Array; - deviceNodeMask?: number; - deviceLUIDValid?: Bool32; -} - -export class PhysicalDeviceIDProperties implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceIDProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceIDProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceIDProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceIDProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceIDProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceIDProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceUUID !== undefined) this.deviceUUID = data.deviceUUID; - if (data.driverUUID !== undefined) this.driverUUID = data.driverUUID; - if (data.deviceLUID !== undefined) this.deviceLUID = data.deviceLUID; - if (data.deviceNodeMask !== undefined) this.deviceNodeMask = data.deviceNodeMask; - if (data.deviceLUIDValid !== undefined) this.deviceLUIDValid = data.deviceLUIDValid; - } - this.sType = StructureType.PHYSICAL_DEVICE_ID_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - - set deviceUUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - - get driverUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 32, 16); - } - - set driverUUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 32); - } - - get deviceLUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 48, 8); - } - - set deviceLUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 48); - } - - get deviceNodeMask() { - return this.#view.getUint32(56, LE); - } - - set deviceNodeMask(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get deviceLUIDValid() { - return this.#view.getUint32(60, LE); - } - - set deviceLUIDValid(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } -} - -export interface InitExternalMemoryImageCreateInfo { - pNext?: AnyPointer; - handleTypes?: ExternalMemoryHandleTypeFlags; -} - -export class ExternalMemoryImageCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalMemoryImageCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalMemoryImageCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalMemoryImageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryImageCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalMemoryImageCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalMemoryImageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; - } - this.sType = StructureType.EXTERNAL_MEMORY_IMAGE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleTypes() { - return this.#view.getUint32(16, LE); - } - - set handleTypes(value: ExternalMemoryHandleTypeFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitExternalMemoryBufferCreateInfo { - pNext?: AnyPointer; - handleTypes?: ExternalMemoryHandleTypeFlags; -} - -export class ExternalMemoryBufferCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalMemoryBufferCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalMemoryBufferCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalMemoryBufferCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalMemoryBufferCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalMemoryBufferCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalMemoryBufferCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; - } - this.sType = StructureType.EXTERNAL_MEMORY_BUFFER_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleTypes() { - return this.#view.getUint32(16, LE); - } - - set handleTypes(value: ExternalMemoryHandleTypeFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitExportMemoryAllocateInfo { - pNext?: AnyPointer; - handleTypes?: ExternalMemoryHandleTypeFlags; -} - -export class ExportMemoryAllocateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMemoryAllocateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMemoryAllocateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMemoryAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryAllocateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMemoryAllocateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMemoryAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; - } - this.sType = StructureType.EXPORT_MEMORY_ALLOCATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleTypes() { - return this.#view.getUint32(16, LE); - } - - set handleTypes(value: ExternalMemoryHandleTypeFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImportMemoryWin32HandleInfoKHR { - pNext?: AnyPointer; - handleType?: ExternalMemoryHandleTypeFlagBits; - handle?: Deno.PointerValue; - name?: Deno.PointerValue; -} - -export class ImportMemoryWin32HandleInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMemoryWin32HandleInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryWin32HandleInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMemoryWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryWin32HandleInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryWin32HandleInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMemoryWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.handle !== undefined) this.handle = data.handle; - if (data.name !== undefined) this.name = data.name; - } - this.sType = StructureType.IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(16, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } - - get handle() { - return this.#view.getBigUint64(24, LE); - } - - set handle(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get name() { - return this.#view.getBigUint64(32, LE); - } - - set name(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportMemoryWin32HandleInfoKHR { - pNext?: AnyPointer; - pAttributes?: AnyPointer; - dwAccess?: number; - name?: Deno.PointerValue; -} - -export class ExportMemoryWin32HandleInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMemoryWin32HandleInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMemoryWin32HandleInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMemoryWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMemoryWin32HandleInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMemoryWin32HandleInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMemoryWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pAttributes !== undefined) this.pAttributes = data.pAttributes; - if (data.dwAccess !== undefined) this.dwAccess = data.dwAccess; - if (data.name !== undefined) this.name = data.name; - } - this.sType = StructureType.EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pAttributes() { - return this.#view.getBigUint64(16, LE); - } - - set pAttributes(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dwAccess() { - return this.#view.getUint32(24, LE); - } - - set dwAccess(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get name() { - return this.#view.getBigUint64(32, LE); - } - - set name(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImportMemoryZirconHandleInfoFUCHSIA { - pNext?: AnyPointer; - handleType?: ExternalMemoryHandleTypeFlagBits; - handle?: Deno.PointerValue; -} - -export class ImportMemoryZirconHandleInfoFUCHSIA implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMemoryZirconHandleInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryZirconHandleInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMemoryZirconHandleInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryZirconHandleInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryZirconHandleInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMemoryZirconHandleInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.handle !== undefined) this.handle = data.handle; - } - this.sType = StructureType.IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(16, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } - - get handle() { - return this.#view.getBigUint64(24, LE); - } - - set handle(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitMemoryZirconHandlePropertiesFUCHSIA { - pNext?: AnyPointer; - memoryTypeBits?: number; -} - -export class MemoryZirconHandlePropertiesFUCHSIA implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryZirconHandlePropertiesFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryZirconHandlePropertiesFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryZirconHandlePropertiesFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryZirconHandlePropertiesFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryZirconHandlePropertiesFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryZirconHandlePropertiesFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; - } - this.sType = StructureType.MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - - set memoryTypeBits(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMemoryGetZirconHandleInfoFUCHSIA { - pNext?: AnyPointer; - memory?: DeviceMemory; - handleType?: ExternalMemoryHandleTypeFlagBits; -} - -export class MemoryGetZirconHandleInfoFUCHSIA implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryGetZirconHandleInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetZirconHandleInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryGetZirconHandleInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetZirconHandleInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetZirconHandleInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryGetZirconHandleInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memory !== undefined) this.memory = data.memory; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(16, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitMemoryWin32HandlePropertiesKHR { - pNext?: AnyPointer; - memoryTypeBits?: number; -} - -export class MemoryWin32HandlePropertiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryWin32HandlePropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryWin32HandlePropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryWin32HandlePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryWin32HandlePropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryWin32HandlePropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryWin32HandlePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; - } - this.sType = StructureType.MEMORY_WIN32_HANDLE_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - - set memoryTypeBits(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMemoryGetWin32HandleInfoKHR { - pNext?: AnyPointer; - memory?: DeviceMemory; - handleType?: ExternalMemoryHandleTypeFlagBits; -} - -export class MemoryGetWin32HandleInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryGetWin32HandleInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetWin32HandleInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryGetWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetWin32HandleInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetWin32HandleInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryGetWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memory !== undefined) this.memory = data.memory; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.MEMORY_GET_WIN32_HANDLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(16, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitImportMemoryFdInfoKHR { - pNext?: AnyPointer; - handleType?: ExternalMemoryHandleTypeFlagBits; - fd?: number; -} - -export class ImportMemoryFdInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMemoryFdInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryFdInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMemoryFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryFdInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryFdInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMemoryFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.fd !== undefined) this.fd = data.fd; - } - this.sType = StructureType.IMPORT_MEMORY_FD_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(16, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } - - get fd() { - return this.#view.getInt32(20, LE); - } - - set fd(value: number) { - this.#view.setInt32(20, Number(value), LE); - } -} - -export interface InitMemoryFdPropertiesKHR { - pNext?: AnyPointer; - memoryTypeBits?: number; -} - -export class MemoryFdPropertiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryFdPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryFdPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryFdPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryFdPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryFdPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryFdPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; - } - this.sType = StructureType.MEMORY_FD_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - - set memoryTypeBits(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMemoryGetFdInfoKHR { - pNext?: AnyPointer; - memory?: DeviceMemory; - handleType?: ExternalMemoryHandleTypeFlagBits; -} - -export class MemoryGetFdInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryGetFdInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetFdInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryGetFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetFdInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetFdInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryGetFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memory !== undefined) this.memory = data.memory; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.MEMORY_GET_FD_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(16, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitWin32KeyedMutexAcquireReleaseInfoKHR { - pNext?: AnyPointer; - acquireCount?: number; - pAcquireSyncs?: AnyPointer; - pAcquireKeys?: AnyPointer; - pAcquireTimeouts?: AnyPointer; - releaseCount?: number; - pReleaseSyncs?: AnyPointer; - pReleaseKeys?: AnyPointer; -} - -export class Win32KeyedMutexAcquireReleaseInfoKHR implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitWin32KeyedMutexAcquireReleaseInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitWin32KeyedMutexAcquireReleaseInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, Win32KeyedMutexAcquireReleaseInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < Win32KeyedMutexAcquireReleaseInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(Win32KeyedMutexAcquireReleaseInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.acquireCount !== undefined) this.acquireCount = data.acquireCount; - if (data.pAcquireSyncs !== undefined) this.pAcquireSyncs = data.pAcquireSyncs; - if (data.pAcquireKeys !== undefined) this.pAcquireKeys = data.pAcquireKeys; - if (data.pAcquireTimeouts !== undefined) this.pAcquireTimeouts = data.pAcquireTimeouts; - if (data.releaseCount !== undefined) this.releaseCount = data.releaseCount; - if (data.pReleaseSyncs !== undefined) this.pReleaseSyncs = data.pReleaseSyncs; - if (data.pReleaseKeys !== undefined) this.pReleaseKeys = data.pReleaseKeys; - } - this.sType = StructureType.WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get acquireCount() { - return this.#view.getUint32(16, LE); - } - - set acquireCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pAcquireSyncs() { - return this.#view.getBigUint64(24, LE); - } - - set pAcquireSyncs(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pAcquireKeys() { - return this.#view.getBigUint64(32, LE); - } - - set pAcquireKeys(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get pAcquireTimeouts() { - return this.#view.getBigUint64(40, LE); - } - - set pAcquireTimeouts(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get releaseCount() { - return this.#view.getUint32(48, LE); - } - - set releaseCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pReleaseSyncs() { - return this.#view.getBigUint64(56, LE); - } - - set pReleaseSyncs(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get pReleaseKeys() { - return this.#view.getBigUint64(64, LE); - } - - set pReleaseKeys(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceExternalSemaphoreInfo { - pNext?: AnyPointer; - handleType?: ExternalSemaphoreHandleTypeFlagBits; -} - -export class PhysicalDeviceExternalSemaphoreInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExternalSemaphoreInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalSemaphoreInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExternalSemaphoreInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalSemaphoreInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalSemaphoreInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExternalSemaphoreInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(16, LE); - } - - set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitExternalSemaphoreProperties { - pNext?: AnyPointer; - exportFromImportedHandleTypes?: ExternalSemaphoreHandleTypeFlags; - compatibleHandleTypes?: ExternalSemaphoreHandleTypeFlags; - externalSemaphoreFeatures?: ExternalSemaphoreFeatureFlags; -} - -export class ExternalSemaphoreProperties implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalSemaphoreProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalSemaphoreProperties) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalSemaphoreProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalSemaphoreProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalSemaphoreProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalSemaphoreProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.exportFromImportedHandleTypes !== undefined) this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes; - if (data.compatibleHandleTypes !== undefined) this.compatibleHandleTypes = data.compatibleHandleTypes; - if (data.externalSemaphoreFeatures !== undefined) this.externalSemaphoreFeatures = data.externalSemaphoreFeatures; - } - this.sType = StructureType.EXTERNAL_SEMAPHORE_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get exportFromImportedHandleTypes() { - return this.#view.getUint32(16, LE); - } - - set exportFromImportedHandleTypes(value: ExternalSemaphoreHandleTypeFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get compatibleHandleTypes() { - return this.#view.getUint32(20, LE); - } - - set compatibleHandleTypes(value: ExternalSemaphoreHandleTypeFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get externalSemaphoreFeatures() { - return this.#view.getUint32(24, LE); - } - - set externalSemaphoreFeatures(value: ExternalSemaphoreFeatureFlags) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitExportSemaphoreCreateInfo { - pNext?: AnyPointer; - handleTypes?: ExternalSemaphoreHandleTypeFlags; -} - -export class ExportSemaphoreCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportSemaphoreCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportSemaphoreCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ExportSemaphoreCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportSemaphoreCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportSemaphoreCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportSemaphoreCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; - } - this.sType = StructureType.EXPORT_SEMAPHORE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleTypes() { - return this.#view.getUint32(16, LE); - } - - set handleTypes(value: ExternalSemaphoreHandleTypeFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImportSemaphoreWin32HandleInfoKHR { - pNext?: AnyPointer; - semaphore?: Semaphore; - flags?: SemaphoreImportFlags; - handleType?: ExternalSemaphoreHandleTypeFlagBits; - handle?: Deno.PointerValue; - name?: Deno.PointerValue; -} - -export class ImportSemaphoreWin32HandleInfoKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportSemaphoreWin32HandleInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportSemaphoreWin32HandleInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ImportSemaphoreWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportSemaphoreWin32HandleInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportSemaphoreWin32HandleInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportSemaphoreWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.flags !== undefined) this.flags = data.flags; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.handle !== undefined) this.handle = data.handle; - if (data.name !== undefined) this.name = data.name; - } - this.sType = StructureType.IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(24, LE); - } - - set flags(value: SemaphoreImportFlags) { - this.#view.setUint32(24, Number(value), LE); - } - - get handleType() { - return this.#view.getUint32(28, LE); - } - - set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { - this.#view.setUint32(28, Number(value), LE); - } - - get handle() { - return this.#view.getBigUint64(32, LE); - } - - set handle(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get name() { - return this.#view.getBigUint64(40, LE); - } - - set name(value: Deno.PointerValue) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportSemaphoreWin32HandleInfoKHR { - pNext?: AnyPointer; - pAttributes?: AnyPointer; - dwAccess?: number; - name?: Deno.PointerValue; -} - -export class ExportSemaphoreWin32HandleInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportSemaphoreWin32HandleInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportSemaphoreWin32HandleInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ExportSemaphoreWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportSemaphoreWin32HandleInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportSemaphoreWin32HandleInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportSemaphoreWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pAttributes !== undefined) this.pAttributes = data.pAttributes; - if (data.dwAccess !== undefined) this.dwAccess = data.dwAccess; - if (data.name !== undefined) this.name = data.name; - } - this.sType = StructureType.EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pAttributes() { - return this.#view.getBigUint64(16, LE); - } - - set pAttributes(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dwAccess() { - return this.#view.getUint32(24, LE); - } - - set dwAccess(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get name() { - return this.#view.getBigUint64(32, LE); - } - - set name(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitD3D12FenceSubmitInfoKHR { - pNext?: AnyPointer; - waitSemaphoreValuesCount?: number; - pWaitSemaphoreValues?: AnyPointer; - signalSemaphoreValuesCount?: number; - pSignalSemaphoreValues?: AnyPointer; -} - -export class D3D12FenceSubmitInfoKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitD3D12FenceSubmitInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitD3D12FenceSubmitInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(D3D12FenceSubmitInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, D3D12FenceSubmitInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < D3D12FenceSubmitInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(D3D12FenceSubmitInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.waitSemaphoreValuesCount !== undefined) this.waitSemaphoreValuesCount = data.waitSemaphoreValuesCount; - if (data.pWaitSemaphoreValues !== undefined) this.pWaitSemaphoreValues = data.pWaitSemaphoreValues; - if (data.signalSemaphoreValuesCount !== undefined) this.signalSemaphoreValuesCount = data.signalSemaphoreValuesCount; - if (data.pSignalSemaphoreValues !== undefined) this.pSignalSemaphoreValues = data.pSignalSemaphoreValues; - } - this.sType = StructureType.D3D12_FENCE_SUBMIT_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get waitSemaphoreValuesCount() { - return this.#view.getUint32(16, LE); - } - - set waitSemaphoreValuesCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pWaitSemaphoreValues() { - return this.#view.getBigUint64(24, LE); - } - - set pWaitSemaphoreValues(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get signalSemaphoreValuesCount() { - return this.#view.getUint32(32, LE); - } - - set signalSemaphoreValuesCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pSignalSemaphoreValues() { - return this.#view.getBigUint64(40, LE); - } - - set pSignalSemaphoreValues(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSemaphoreGetWin32HandleInfoKHR { - pNext?: AnyPointer; - semaphore?: Semaphore; - handleType?: ExternalSemaphoreHandleTypeFlagBits; -} - -export class SemaphoreGetWin32HandleInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSemaphoreGetWin32HandleInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreGetWin32HandleInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(SemaphoreGetWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreGetWin32HandleInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreGetWin32HandleInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SemaphoreGetWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitImportSemaphoreFdInfoKHR { - pNext?: AnyPointer; - semaphore?: Semaphore; - flags?: SemaphoreImportFlags; - handleType?: ExternalSemaphoreHandleTypeFlagBits; - fd?: number; -} - -export class ImportSemaphoreFdInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportSemaphoreFdInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportSemaphoreFdInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ImportSemaphoreFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportSemaphoreFdInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportSemaphoreFdInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportSemaphoreFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.flags !== undefined) this.flags = data.flags; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.fd !== undefined) this.fd = data.fd; - } - this.sType = StructureType.IMPORT_SEMAPHORE_FD_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(24, LE); - } - - set flags(value: SemaphoreImportFlags) { - this.#view.setUint32(24, Number(value), LE); - } - - get handleType() { - return this.#view.getUint32(28, LE); - } - - set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { - this.#view.setUint32(28, Number(value), LE); - } - - get fd() { - return this.#view.getInt32(32, LE); - } - - set fd(value: number) { - this.#view.setInt32(32, Number(value), LE); - } -} - -export interface InitSemaphoreGetFdInfoKHR { - pNext?: AnyPointer; - semaphore?: Semaphore; - handleType?: ExternalSemaphoreHandleTypeFlagBits; -} - -export class SemaphoreGetFdInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSemaphoreGetFdInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreGetFdInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(SemaphoreGetFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreGetFdInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreGetFdInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SemaphoreGetFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.SEMAPHORE_GET_FD_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitImportSemaphoreZirconHandleInfoFUCHSIA { - pNext?: AnyPointer; - semaphore?: Semaphore; - flags?: SemaphoreImportFlags; - handleType?: ExternalSemaphoreHandleTypeFlagBits; - zirconHandle?: Deno.PointerValue; -} - -export class ImportSemaphoreZirconHandleInfoFUCHSIA implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportSemaphoreZirconHandleInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportSemaphoreZirconHandleInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(ImportSemaphoreZirconHandleInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportSemaphoreZirconHandleInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportSemaphoreZirconHandleInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportSemaphoreZirconHandleInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.flags !== undefined) this.flags = data.flags; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.zirconHandle !== undefined) this.zirconHandle = data.zirconHandle; - } - this.sType = StructureType.IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(24, LE); - } - - set flags(value: SemaphoreImportFlags) { - this.#view.setUint32(24, Number(value), LE); - } - - get handleType() { - return this.#view.getUint32(28, LE); - } - - set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { - this.#view.setUint32(28, Number(value), LE); - } - - get zirconHandle() { - return this.#view.getBigUint64(32, LE); - } - - set zirconHandle(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSemaphoreGetZirconHandleInfoFUCHSIA { - pNext?: AnyPointer; - semaphore?: Semaphore; - handleType?: ExternalSemaphoreHandleTypeFlagBits; -} - -export class SemaphoreGetZirconHandleInfoFUCHSIA implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSemaphoreGetZirconHandleInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreGetZirconHandleInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(SemaphoreGetZirconHandleInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreGetZirconHandleInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreGetZirconHandleInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SemaphoreGetZirconHandleInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalSemaphoreHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceExternalFenceInfo { - pNext?: AnyPointer; - handleType?: ExternalFenceHandleTypeFlagBits; -} - -export class PhysicalDeviceExternalFenceInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExternalFenceInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalFenceInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExternalFenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalFenceInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalFenceInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExternalFenceInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(16, LE); - } - - set handleType(value: ExternalFenceHandleTypeFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitExternalFenceProperties { - pNext?: AnyPointer; - exportFromImportedHandleTypes?: ExternalFenceHandleTypeFlags; - compatibleHandleTypes?: ExternalFenceHandleTypeFlags; - externalFenceFeatures?: ExternalFenceFeatureFlags; -} - -export class ExternalFenceProperties implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalFenceProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalFenceProperties) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalFenceProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalFenceProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalFenceProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalFenceProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.exportFromImportedHandleTypes !== undefined) this.exportFromImportedHandleTypes = data.exportFromImportedHandleTypes; - if (data.compatibleHandleTypes !== undefined) this.compatibleHandleTypes = data.compatibleHandleTypes; - if (data.externalFenceFeatures !== undefined) this.externalFenceFeatures = data.externalFenceFeatures; - } - this.sType = StructureType.EXTERNAL_FENCE_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get exportFromImportedHandleTypes() { - return this.#view.getUint32(16, LE); - } - - set exportFromImportedHandleTypes(value: ExternalFenceHandleTypeFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get compatibleHandleTypes() { - return this.#view.getUint32(20, LE); - } - - set compatibleHandleTypes(value: ExternalFenceHandleTypeFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get externalFenceFeatures() { - return this.#view.getUint32(24, LE); - } - - set externalFenceFeatures(value: ExternalFenceFeatureFlags) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitExportFenceCreateInfo { - pNext?: AnyPointer; - handleTypes?: ExternalFenceHandleTypeFlags; -} - -export class ExportFenceCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportFenceCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportFenceCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ExportFenceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportFenceCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportFenceCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportFenceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleTypes !== undefined) this.handleTypes = data.handleTypes; - } - this.sType = StructureType.EXPORT_FENCE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleTypes() { - return this.#view.getUint32(16, LE); - } - - set handleTypes(value: ExternalFenceHandleTypeFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImportFenceWin32HandleInfoKHR { - pNext?: AnyPointer; - fence?: Fence; - flags?: FenceImportFlags; - handleType?: ExternalFenceHandleTypeFlagBits; - handle?: Deno.PointerValue; - name?: Deno.PointerValue; -} - -export class ImportFenceWin32HandleInfoKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportFenceWin32HandleInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportFenceWin32HandleInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ImportFenceWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportFenceWin32HandleInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportFenceWin32HandleInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportFenceWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fence !== undefined) this.fence = data.fence; - if (data.flags !== undefined) this.flags = data.flags; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.handle !== undefined) this.handle = data.handle; - if (data.name !== undefined) this.name = data.name; - } - this.sType = StructureType.IMPORT_FENCE_WIN32_HANDLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fence() { - return this.#view.getBigUint64(16, LE); - } - - set fence(value: Fence) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(24, LE); - } - - set flags(value: FenceImportFlags) { - this.#view.setUint32(24, Number(value), LE); - } - - get handleType() { - return this.#view.getUint32(28, LE); - } - - set handleType(value: ExternalFenceHandleTypeFlagBits) { - this.#view.setUint32(28, Number(value), LE); - } - - get handle() { - return this.#view.getBigUint64(32, LE); - } - - set handle(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get name() { - return this.#view.getBigUint64(40, LE); - } - - set name(value: Deno.PointerValue) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportFenceWin32HandleInfoKHR { - pNext?: AnyPointer; - pAttributes?: AnyPointer; - dwAccess?: number; - name?: Deno.PointerValue; -} - -export class ExportFenceWin32HandleInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportFenceWin32HandleInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportFenceWin32HandleInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ExportFenceWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportFenceWin32HandleInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportFenceWin32HandleInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportFenceWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pAttributes !== undefined) this.pAttributes = data.pAttributes; - if (data.dwAccess !== undefined) this.dwAccess = data.dwAccess; - if (data.name !== undefined) this.name = data.name; - } - this.sType = StructureType.EXPORT_FENCE_WIN32_HANDLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pAttributes() { - return this.#view.getBigUint64(16, LE); - } - - set pAttributes(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dwAccess() { - return this.#view.getUint32(24, LE); - } - - set dwAccess(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get name() { - return this.#view.getBigUint64(32, LE); - } - - set name(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitFenceGetWin32HandleInfoKHR { - pNext?: AnyPointer; - fence?: Fence; - handleType?: ExternalFenceHandleTypeFlagBits; -} - -export class FenceGetWin32HandleInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFenceGetWin32HandleInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFenceGetWin32HandleInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(FenceGetWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FenceGetWin32HandleInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FenceGetWin32HandleInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FenceGetWin32HandleInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fence !== undefined) this.fence = data.fence; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.FENCE_GET_WIN32_HANDLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fence() { - return this.#view.getBigUint64(16, LE); - } - - set fence(value: Fence) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalFenceHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitImportFenceFdInfoKHR { - pNext?: AnyPointer; - fence?: Fence; - flags?: FenceImportFlags; - handleType?: ExternalFenceHandleTypeFlagBits; - fd?: number; -} - -export class ImportFenceFdInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportFenceFdInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportFenceFdInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ImportFenceFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportFenceFdInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportFenceFdInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportFenceFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fence !== undefined) this.fence = data.fence; - if (data.flags !== undefined) this.flags = data.flags; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.fd !== undefined) this.fd = data.fd; - } - this.sType = StructureType.IMPORT_FENCE_FD_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fence() { - return this.#view.getBigUint64(16, LE); - } - - set fence(value: Fence) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(24, LE); - } - - set flags(value: FenceImportFlags) { - this.#view.setUint32(24, Number(value), LE); - } - - get handleType() { - return this.#view.getUint32(28, LE); - } - - set handleType(value: ExternalFenceHandleTypeFlagBits) { - this.#view.setUint32(28, Number(value), LE); - } - - get fd() { - return this.#view.getInt32(32, LE); - } - - set fd(value: number) { - this.#view.setInt32(32, Number(value), LE); - } -} - -export interface InitFenceGetFdInfoKHR { - pNext?: AnyPointer; - fence?: Fence; - handleType?: ExternalFenceHandleTypeFlagBits; -} - -export class FenceGetFdInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFenceGetFdInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFenceGetFdInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(FenceGetFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FenceGetFdInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FenceGetFdInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FenceGetFdInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fence !== undefined) this.fence = data.fence; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.FENCE_GET_FD_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fence() { - return this.#view.getBigUint64(16, LE); - } - - set fence(value: Fence) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalFenceHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMultiviewFeatures { - pNext?: AnyPointer; - multiview?: Bool32; - multiviewGeometryShader?: Bool32; - multiviewTessellationShader?: Bool32; -} - -export class PhysicalDeviceMultiviewFeatures implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMultiviewFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiviewFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMultiviewFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiviewFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiviewFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMultiviewFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.multiview !== undefined) this.multiview = data.multiview; - if (data.multiviewGeometryShader !== undefined) this.multiviewGeometryShader = data.multiviewGeometryShader; - if (data.multiviewTessellationShader !== undefined) this.multiviewTessellationShader = data.multiviewTessellationShader; - } - this.sType = StructureType.PHYSICAL_DEVICE_MULTIVIEW_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get multiview() { - return this.#view.getUint32(16, LE); - } - - set multiview(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get multiviewGeometryShader() { - return this.#view.getUint32(20, LE); - } - - set multiviewGeometryShader(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get multiviewTessellationShader() { - return this.#view.getUint32(24, LE); - } - - set multiviewTessellationShader(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMultiviewProperties { - pNext?: AnyPointer; - maxMultiviewViewCount?: number; - maxMultiviewInstanceIndex?: number; -} - -export class PhysicalDeviceMultiviewProperties implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMultiviewProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiviewProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMultiviewProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiviewProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiviewProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMultiviewProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxMultiviewViewCount !== undefined) this.maxMultiviewViewCount = data.maxMultiviewViewCount; - if (data.maxMultiviewInstanceIndex !== undefined) this.maxMultiviewInstanceIndex = data.maxMultiviewInstanceIndex; - } - this.sType = StructureType.PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxMultiviewViewCount() { - return this.#view.getUint32(16, LE); - } - - set maxMultiviewViewCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxMultiviewInstanceIndex() { - return this.#view.getUint32(20, LE); - } - - set maxMultiviewInstanceIndex(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitRenderPassMultiviewCreateInfo { - pNext?: AnyPointer; - subpassCount?: number; - pViewMasks?: AnyPointer; - dependencyCount?: number; - pViewOffsets?: AnyPointer; - correlationMaskCount?: number; - pCorrelationMasks?: AnyPointer; -} - -export class RenderPassMultiviewCreateInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassMultiviewCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassMultiviewCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassMultiviewCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassMultiviewCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassMultiviewCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassMultiviewCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.subpassCount !== undefined) this.subpassCount = data.subpassCount; - if (data.pViewMasks !== undefined) this.pViewMasks = data.pViewMasks; - if (data.dependencyCount !== undefined) this.dependencyCount = data.dependencyCount; - if (data.pViewOffsets !== undefined) this.pViewOffsets = data.pViewOffsets; - if (data.correlationMaskCount !== undefined) this.correlationMaskCount = data.correlationMaskCount; - if (data.pCorrelationMasks !== undefined) this.pCorrelationMasks = data.pCorrelationMasks; - } - this.sType = StructureType.RENDER_PASS_MULTIVIEW_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get subpassCount() { - return this.#view.getUint32(16, LE); - } - - set subpassCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pViewMasks() { - return this.#view.getBigUint64(24, LE); - } - - set pViewMasks(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get dependencyCount() { - return this.#view.getUint32(32, LE); - } - - set dependencyCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pViewOffsets() { - return this.#view.getBigUint64(40, LE); - } - - set pViewOffsets(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get correlationMaskCount() { - return this.#view.getUint32(48, LE); - } - - set correlationMaskCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pCorrelationMasks() { - return this.#view.getBigUint64(56, LE); - } - - set pCorrelationMasks(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSurfaceCapabilities2EXT { - pNext?: AnyPointer; - minImageCount?: number; - maxImageCount?: number; - currentExtent?: Extent2D; - minImageExtent?: Extent2D; - maxImageExtent?: Extent2D; - maxImageArrayLayers?: number; - supportedTransforms?: SurfaceTransformFlagsKHR; - currentTransform?: SurfaceTransformFlagBitsKHR; - supportedCompositeAlpha?: CompositeAlphaFlagsKHR; - supportedUsageFlags?: ImageUsageFlags; - supportedSurfaceCounters?: SurfaceCounterFlagsEXT; -} - -export class SurfaceCapabilities2EXT implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceCapabilities2EXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilities2EXT) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceCapabilities2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilities2EXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilities2EXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceCapabilities2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minImageCount !== undefined) this.minImageCount = data.minImageCount; - if (data.maxImageCount !== undefined) this.maxImageCount = data.maxImageCount; - if (data.currentExtent !== undefined) this.currentExtent = data.currentExtent; - if (data.minImageExtent !== undefined) this.minImageExtent = data.minImageExtent; - if (data.maxImageExtent !== undefined) this.maxImageExtent = data.maxImageExtent; - if (data.maxImageArrayLayers !== undefined) this.maxImageArrayLayers = data.maxImageArrayLayers; - if (data.supportedTransforms !== undefined) this.supportedTransforms = data.supportedTransforms; - if (data.currentTransform !== undefined) this.currentTransform = data.currentTransform; - if (data.supportedCompositeAlpha !== undefined) this.supportedCompositeAlpha = data.supportedCompositeAlpha; - if (data.supportedUsageFlags !== undefined) this.supportedUsageFlags = data.supportedUsageFlags; - if (data.supportedSurfaceCounters !== undefined) this.supportedSurfaceCounters = data.supportedSurfaceCounters; - } - this.sType = StructureType.SURFACE_CAPABILITIES_2_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minImageCount() { - return this.#view.getUint32(16, LE); - } - - set minImageCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxImageCount() { - return this.#view.getUint32(20, LE); - } - - set maxImageCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get currentExtent() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - - set currentExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get minImageExtent() { - return new Extent2D(this.#data.subarray(32, 32 + Extent2D.size)); - } - - set minImageExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get maxImageExtent() { - return new Extent2D(this.#data.subarray(40, 40 + Extent2D.size)); - } - - set maxImageExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } - - get maxImageArrayLayers() { - return this.#view.getUint32(48, LE); - } - - set maxImageArrayLayers(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get supportedTransforms() { - return this.#view.getUint32(52, LE); - } - - set supportedTransforms(value: SurfaceTransformFlagsKHR) { - this.#view.setUint32(52, Number(value), LE); - } - - get currentTransform() { - return this.#view.getUint32(56, LE); - } - - set currentTransform(value: SurfaceTransformFlagBitsKHR) { - this.#view.setUint32(56, Number(value), LE); - } - - get supportedCompositeAlpha() { - return this.#view.getUint32(60, LE); - } - - set supportedCompositeAlpha(value: CompositeAlphaFlagsKHR) { - this.#view.setUint32(60, Number(value), LE); - } - - get supportedUsageFlags() { - return this.#view.getUint32(64, LE); - } - - set supportedUsageFlags(value: ImageUsageFlags) { - this.#view.setUint32(64, Number(value), LE); - } - - get supportedSurfaceCounters() { - return this.#view.getUint32(68, LE); - } - - set supportedSurfaceCounters(value: SurfaceCounterFlagsEXT) { - this.#view.setUint32(68, Number(value), LE); - } -} - -export interface InitDisplayPowerInfoEXT { - pNext?: AnyPointer; - powerState?: DisplayPowerStateEXT; -} - -export class DisplayPowerInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayPowerInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPowerInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayPowerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPowerInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPowerInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayPowerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.powerState !== undefined) this.powerState = data.powerState; - } - this.sType = StructureType.DISPLAY_POWER_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get powerState() { - return this.#view.getUint32(16, LE); - } - - set powerState(value: DisplayPowerStateEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDeviceEventInfoEXT { - pNext?: AnyPointer; - deviceEvent?: DeviceEventTypeEXT; -} - -export class DeviceEventInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceEventInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceEventInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceEventInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceEventInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceEventInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceEventInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceEvent !== undefined) this.deviceEvent = data.deviceEvent; - } - this.sType = StructureType.DEVICE_EVENT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceEvent() { - return this.#view.getUint32(16, LE); - } - - set deviceEvent(value: DeviceEventTypeEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDisplayEventInfoEXT { - pNext?: AnyPointer; - displayEvent?: DisplayEventTypeEXT; -} - -export class DisplayEventInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayEventInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayEventInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayEventInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayEventInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayEventInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayEventInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.displayEvent !== undefined) this.displayEvent = data.displayEvent; - } - this.sType = StructureType.DISPLAY_EVENT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get displayEvent() { - return this.#view.getUint32(16, LE); - } - - set displayEvent(value: DisplayEventTypeEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSwapchainCounterCreateInfoEXT { - pNext?: AnyPointer; - surfaceCounters?: SurfaceCounterFlagsEXT; -} - -export class SwapchainCounterCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSwapchainCounterCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainCounterCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SwapchainCounterCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainCounterCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainCounterCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SwapchainCounterCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.surfaceCounters !== undefined) this.surfaceCounters = data.surfaceCounters; - } - this.sType = StructureType.SWAPCHAIN_COUNTER_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get surfaceCounters() { - return this.#view.getUint32(16, LE); - } - - set surfaceCounters(value: SurfaceCounterFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceGroupProperties { - pNext?: AnyPointer; - physicalDeviceCount?: number; - physicalDevices?: PhysicalDevice[]; - subsetAllocation?: Bool32; -} - -export class PhysicalDeviceGroupProperties implements BaseStruct { - static size = 288; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceGroupProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceGroupProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceGroupProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGroupProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceGroupProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceGroupProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.physicalDeviceCount !== undefined) this.physicalDeviceCount = data.physicalDeviceCount; - if (data.physicalDevices !== undefined) this.physicalDevices = data.physicalDevices; - if (data.subsetAllocation !== undefined) this.subsetAllocation = data.subsetAllocation; - } - this.sType = StructureType.PHYSICAL_DEVICE_GROUP_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get physicalDeviceCount() { - return this.#view.getUint32(16, LE); - } - - set physicalDeviceCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get physicalDevices() { - const result: PhysicalDevice[] = []; - for (let i = 0; i < 32; i++) { - result.push((() => { - return this.#view.getBigUint64(24 + i * 8, LE); - })()); - } - return result; - } - - set physicalDevices(value: PhysicalDevice[]) { - for (let i = 0; i < value.length; i++) { - this.#view.setBigUint64(24 + i * 8, BigInt(anyPointer(value[i])), LE); - } - } - - get subsetAllocation() { - return this.#view.getUint32(280, LE); - } - - set subsetAllocation(value: Bool32) { - this.#view.setUint32(280, Number(value), LE); - } -} - -export interface InitMemoryAllocateFlagsInfo { - pNext?: AnyPointer; - flags?: MemoryAllocateFlags; - deviceMask?: number; -} - -export class MemoryAllocateFlagsInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryAllocateFlagsInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryAllocateFlagsInfo) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryAllocateFlagsInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryAllocateFlagsInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryAllocateFlagsInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryAllocateFlagsInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; - } - this.sType = StructureType.MEMORY_ALLOCATE_FLAGS_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: MemoryAllocateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get deviceMask() { - return this.#view.getUint32(20, LE); - } - - set deviceMask(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitBindBufferMemoryInfo { - pNext?: AnyPointer; - buffer?: Buffer; - memory?: DeviceMemory; - memoryOffset?: DeviceSize; -} - -export class BindBufferMemoryInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindBufferMemoryInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindBufferMemoryInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BindBufferMemoryInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindBufferMemoryInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindBufferMemoryInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindBufferMemoryInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.memory !== undefined) this.memory = data.memory; - if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; - } - this.sType = StructureType.BIND_BUFFER_MEMORY_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get buffer() { - return this.#view.getBigUint64(16, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(24, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get memoryOffset() { - return this.#view.getBigUint64(32, LE); - } - - set memoryOffset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitBindBufferMemoryDeviceGroupInfo { - pNext?: AnyPointer; - deviceIndexCount?: number; - pDeviceIndices?: AnyPointer; -} - -export class BindBufferMemoryDeviceGroupInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindBufferMemoryDeviceGroupInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindBufferMemoryDeviceGroupInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BindBufferMemoryDeviceGroupInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindBufferMemoryDeviceGroupInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindBufferMemoryDeviceGroupInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindBufferMemoryDeviceGroupInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceIndexCount !== undefined) this.deviceIndexCount = data.deviceIndexCount; - if (data.pDeviceIndices !== undefined) this.pDeviceIndices = data.pDeviceIndices; - } - this.sType = StructureType.BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceIndexCount() { - return this.#view.getUint32(16, LE); - } - - set deviceIndexCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pDeviceIndices() { - return this.#view.getBigUint64(24, LE); - } - - set pDeviceIndices(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitBindImageMemoryInfo { - pNext?: AnyPointer; - image?: Image; - memory?: DeviceMemory; - memoryOffset?: DeviceSize; -} - -export class BindImageMemoryInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindImageMemoryInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindImageMemoryInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BindImageMemoryInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImageMemoryInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindImageMemoryInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindImageMemoryInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.image !== undefined) this.image = data.image; - if (data.memory !== undefined) this.memory = data.memory; - if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; - } - this.sType = StructureType.BIND_IMAGE_MEMORY_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get image() { - return this.#view.getBigUint64(16, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(24, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get memoryOffset() { - return this.#view.getBigUint64(32, LE); - } - - set memoryOffset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitBindImageMemoryDeviceGroupInfo { - pNext?: AnyPointer; - deviceIndexCount?: number; - pDeviceIndices?: AnyPointer; - splitInstanceBindRegionCount?: number; - pSplitInstanceBindRegions?: AnyPointer; -} - -export class BindImageMemoryDeviceGroupInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindImageMemoryDeviceGroupInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindImageMemoryDeviceGroupInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BindImageMemoryDeviceGroupInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImageMemoryDeviceGroupInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindImageMemoryDeviceGroupInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindImageMemoryDeviceGroupInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceIndexCount !== undefined) this.deviceIndexCount = data.deviceIndexCount; - if (data.pDeviceIndices !== undefined) this.pDeviceIndices = data.pDeviceIndices; - if (data.splitInstanceBindRegionCount !== undefined) this.splitInstanceBindRegionCount = data.splitInstanceBindRegionCount; - if (data.pSplitInstanceBindRegions !== undefined) this.pSplitInstanceBindRegions = data.pSplitInstanceBindRegions; - } - this.sType = StructureType.BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceIndexCount() { - return this.#view.getUint32(16, LE); - } - - set deviceIndexCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pDeviceIndices() { - return this.#view.getBigUint64(24, LE); - } - - set pDeviceIndices(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get splitInstanceBindRegionCount() { - return this.#view.getUint32(32, LE); - } - - set splitInstanceBindRegionCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pSplitInstanceBindRegions() { - return this.#view.getBigUint64(40, LE); - } - - set pSplitInstanceBindRegions(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDeviceGroupRenderPassBeginInfo { - pNext?: AnyPointer; - deviceMask?: number; - deviceRenderAreaCount?: number; - pDeviceRenderAreas?: AnyPointer; -} - -export class DeviceGroupRenderPassBeginInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceGroupRenderPassBeginInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupRenderPassBeginInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceGroupRenderPassBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupRenderPassBeginInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupRenderPassBeginInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceGroupRenderPassBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; - if (data.deviceRenderAreaCount !== undefined) this.deviceRenderAreaCount = data.deviceRenderAreaCount; - if (data.pDeviceRenderAreas !== undefined) this.pDeviceRenderAreas = data.pDeviceRenderAreas; - } - this.sType = StructureType.DEVICE_GROUP_RENDER_PASS_BEGIN_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceMask() { - return this.#view.getUint32(16, LE); - } - - set deviceMask(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get deviceRenderAreaCount() { - return this.#view.getUint32(20, LE); - } - - set deviceRenderAreaCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pDeviceRenderAreas() { - return this.#view.getBigUint64(24, LE); - } - - set pDeviceRenderAreas(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDeviceGroupCommandBufferBeginInfo { - pNext?: AnyPointer; - deviceMask?: number; -} - -export class DeviceGroupCommandBufferBeginInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceGroupCommandBufferBeginInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupCommandBufferBeginInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceGroupCommandBufferBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupCommandBufferBeginInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupCommandBufferBeginInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceGroupCommandBufferBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; - } - this.sType = StructureType.DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceMask() { - return this.#view.getUint32(16, LE); - } - - set deviceMask(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDeviceGroupSubmitInfo { - pNext?: AnyPointer; - waitSemaphoreCount?: number; - pWaitSemaphoreDeviceIndices?: AnyPointer; - commandBufferCount?: number; - pCommandBufferDeviceMasks?: AnyPointer; - signalSemaphoreCount?: number; - pSignalSemaphoreDeviceIndices?: AnyPointer; -} - -export class DeviceGroupSubmitInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceGroupSubmitInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupSubmitInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceGroupSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupSubmitInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupSubmitInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceGroupSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.waitSemaphoreCount !== undefined) this.waitSemaphoreCount = data.waitSemaphoreCount; - if (data.pWaitSemaphoreDeviceIndices !== undefined) this.pWaitSemaphoreDeviceIndices = data.pWaitSemaphoreDeviceIndices; - if (data.commandBufferCount !== undefined) this.commandBufferCount = data.commandBufferCount; - if (data.pCommandBufferDeviceMasks !== undefined) this.pCommandBufferDeviceMasks = data.pCommandBufferDeviceMasks; - if (data.signalSemaphoreCount !== undefined) this.signalSemaphoreCount = data.signalSemaphoreCount; - if (data.pSignalSemaphoreDeviceIndices !== undefined) this.pSignalSemaphoreDeviceIndices = data.pSignalSemaphoreDeviceIndices; - } - this.sType = StructureType.DEVICE_GROUP_SUBMIT_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get waitSemaphoreCount() { - return this.#view.getUint32(16, LE); - } - - set waitSemaphoreCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pWaitSemaphoreDeviceIndices() { - return this.#view.getBigUint64(24, LE); - } - - set pWaitSemaphoreDeviceIndices(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get commandBufferCount() { - return this.#view.getUint32(32, LE); - } - - set commandBufferCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pCommandBufferDeviceMasks() { - return this.#view.getBigUint64(40, LE); - } - - set pCommandBufferDeviceMasks(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get signalSemaphoreCount() { - return this.#view.getUint32(48, LE); - } - - set signalSemaphoreCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pSignalSemaphoreDeviceIndices() { - return this.#view.getBigUint64(56, LE); - } - - set pSignalSemaphoreDeviceIndices(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDeviceGroupBindSparseInfo { - pNext?: AnyPointer; - resourceDeviceIndex?: number; - memoryDeviceIndex?: number; -} - -export class DeviceGroupBindSparseInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceGroupBindSparseInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupBindSparseInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceGroupBindSparseInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupBindSparseInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupBindSparseInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceGroupBindSparseInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.resourceDeviceIndex !== undefined) this.resourceDeviceIndex = data.resourceDeviceIndex; - if (data.memoryDeviceIndex !== undefined) this.memoryDeviceIndex = data.memoryDeviceIndex; - } - this.sType = StructureType.DEVICE_GROUP_BIND_SPARSE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get resourceDeviceIndex() { - return this.#view.getUint32(16, LE); - } - - set resourceDeviceIndex(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get memoryDeviceIndex() { - return this.#view.getUint32(20, LE); - } - - set memoryDeviceIndex(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitDeviceGroupPresentCapabilitiesKHR { - pNext?: AnyPointer; - presentMask?: Uint32Array; - modes?: DeviceGroupPresentModeFlagsKHR; -} - -export class DeviceGroupPresentCapabilitiesKHR implements BaseStruct { - static size = 152; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceGroupPresentCapabilitiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupPresentCapabilitiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceGroupPresentCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupPresentCapabilitiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupPresentCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceGroupPresentCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.presentMask !== undefined) this.presentMask = data.presentMask; - if (data.modes !== undefined) this.modes = data.modes; - } - this.sType = StructureType.DEVICE_GROUP_PRESENT_CAPABILITIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get presentMask() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 16, 32); - } - - set presentMask(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - - get modes() { - return this.#view.getUint32(144, LE); - } - - set modes(value: DeviceGroupPresentModeFlagsKHR) { - this.#view.setUint32(144, Number(value), LE); - } -} - -export interface InitImageSwapchainCreateInfoKHR { - pNext?: AnyPointer; - swapchain?: SwapchainKHR; -} - -export class ImageSwapchainCreateInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageSwapchainCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageSwapchainCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(ImageSwapchainCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSwapchainCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSwapchainCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageSwapchainCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.swapchain !== undefined) this.swapchain = data.swapchain; - } - this.sType = StructureType.IMAGE_SWAPCHAIN_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get swapchain() { - return this.#view.getBigUint64(16, LE); - } - - set swapchain(value: SwapchainKHR) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitBindImageMemorySwapchainInfoKHR { - pNext?: AnyPointer; - swapchain?: SwapchainKHR; - imageIndex?: number; -} - -export class BindImageMemorySwapchainInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindImageMemorySwapchainInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindImageMemorySwapchainInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(BindImageMemorySwapchainInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImageMemorySwapchainInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindImageMemorySwapchainInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindImageMemorySwapchainInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.swapchain !== undefined) this.swapchain = data.swapchain; - if (data.imageIndex !== undefined) this.imageIndex = data.imageIndex; - } - this.sType = StructureType.BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get swapchain() { - return this.#view.getBigUint64(16, LE); - } - - set swapchain(value: SwapchainKHR) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get imageIndex() { - return this.#view.getUint32(24, LE); - } - - set imageIndex(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitAcquireNextImageInfoKHR { - pNext?: AnyPointer; - swapchain?: SwapchainKHR; - timeout?: Deno.PointerValue; - semaphore?: Semaphore; - fence?: Fence; - deviceMask?: number; -} - -export class AcquireNextImageInfoKHR implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAcquireNextImageInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAcquireNextImageInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AcquireNextImageInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AcquireNextImageInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AcquireNextImageInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AcquireNextImageInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.swapchain !== undefined) this.swapchain = data.swapchain; - if (data.timeout !== undefined) this.timeout = data.timeout; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.fence !== undefined) this.fence = data.fence; - if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; - } - this.sType = StructureType.ACQUIRE_NEXT_IMAGE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get swapchain() { - return this.#view.getBigUint64(16, LE); - } - - set swapchain(value: SwapchainKHR) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get timeout() { - return this.#view.getBigUint64(24, LE); - } - - set timeout(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get semaphore() { - return this.#view.getBigUint64(32, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get fence() { - return this.#view.getBigUint64(40, LE); - } - - set fence(value: Fence) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get deviceMask() { - return this.#view.getUint32(48, LE); - } - - set deviceMask(value: number) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitDeviceGroupPresentInfoKHR { - pNext?: AnyPointer; - swapchainCount?: number; - pDeviceMasks?: AnyPointer; - mode?: DeviceGroupPresentModeFlagBitsKHR; -} - -export class DeviceGroupPresentInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceGroupPresentInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupPresentInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceGroupPresentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupPresentInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupPresentInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceGroupPresentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; - if (data.pDeviceMasks !== undefined) this.pDeviceMasks = data.pDeviceMasks; - if (data.mode !== undefined) this.mode = data.mode; - } - this.sType = StructureType.DEVICE_GROUP_PRESENT_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get swapchainCount() { - return this.#view.getUint32(16, LE); - } - - set swapchainCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pDeviceMasks() { - return this.#view.getBigUint64(24, LE); - } - - set pDeviceMasks(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get mode() { - return this.#view.getUint32(32, LE); - } - - set mode(value: DeviceGroupPresentModeFlagBitsKHR) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitDeviceGroupDeviceCreateInfo { - pNext?: AnyPointer; - physicalDeviceCount?: number; - pPhysicalDevices?: AnyPointer; -} - -export class DeviceGroupDeviceCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceGroupDeviceCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupDeviceCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceGroupDeviceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupDeviceCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupDeviceCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceGroupDeviceCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.physicalDeviceCount !== undefined) this.physicalDeviceCount = data.physicalDeviceCount; - if (data.pPhysicalDevices !== undefined) this.pPhysicalDevices = data.pPhysicalDevices; - } - this.sType = StructureType.DEVICE_GROUP_DEVICE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get physicalDeviceCount() { - return this.#view.getUint32(16, LE); - } - - set physicalDeviceCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pPhysicalDevices() { - return this.#view.getBigUint64(24, LE); - } - - set pPhysicalDevices(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDeviceGroupSwapchainCreateInfoKHR { - pNext?: AnyPointer; - modes?: DeviceGroupPresentModeFlagsKHR; -} - -export class DeviceGroupSwapchainCreateInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceGroupSwapchainCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceGroupSwapchainCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceGroupSwapchainCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceGroupSwapchainCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceGroupSwapchainCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceGroupSwapchainCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.modes !== undefined) this.modes = data.modes; - } - this.sType = StructureType.DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get modes() { - return this.#view.getUint32(16, LE); - } - - set modes(value: DeviceGroupPresentModeFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDescriptorUpdateTemplateEntry { - dstBinding?: number; - dstArrayElement?: number; - descriptorCount?: number; - descriptorType?: DescriptorType; - offset?: Deno.PointerValue; - stride?: Deno.PointerValue; -} - -export class DescriptorUpdateTemplateEntry implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorUpdateTemplateEntry); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorUpdateTemplateEntry) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorUpdateTemplateEntry.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorUpdateTemplateEntry.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorUpdateTemplateEntry.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorUpdateTemplateEntry.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.dstBinding !== undefined) this.dstBinding = data.dstBinding; - if (data.dstArrayElement !== undefined) this.dstArrayElement = data.dstArrayElement; - if (data.descriptorCount !== undefined) this.descriptorCount = data.descriptorCount; - if (data.descriptorType !== undefined) this.descriptorType = data.descriptorType; - if (data.offset !== undefined) this.offset = data.offset; - if (data.stride !== undefined) this.stride = data.stride; - } - } - - get dstBinding() { - return this.#view.getUint32(0, LE); - } - - set dstBinding(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get dstArrayElement() { - return this.#view.getUint32(4, LE); - } - - set dstArrayElement(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get descriptorCount() { - return this.#view.getUint32(8, LE); - } - - set descriptorCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get descriptorType() { - return this.#view.getUint32(12, LE); - } - - set descriptorType(value: DescriptorType) { - this.#view.setUint32(12, Number(value), LE); - } - - get offset() { - return this.#view.getBigUint64(16, LE); - } - - set offset(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get stride() { - return this.#view.getBigUint64(24, LE); - } - - set stride(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitDescriptorUpdateTemplateCreateInfo { - pNext?: AnyPointer; - flags?: DescriptorUpdateTemplateCreateFlags; - descriptorUpdateEntryCount?: number; - pDescriptorUpdateEntries?: AnyPointer; - templateType?: DescriptorUpdateTemplateType; - descriptorSetLayout?: DescriptorSetLayout; - pipelineBindPoint?: PipelineBindPoint; - pipelineLayout?: PipelineLayout; - set?: number; -} - -export class DescriptorUpdateTemplateCreateInfo implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorUpdateTemplateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorUpdateTemplateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorUpdateTemplateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorUpdateTemplateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorUpdateTemplateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorUpdateTemplateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.descriptorUpdateEntryCount !== undefined) this.descriptorUpdateEntryCount = data.descriptorUpdateEntryCount; - if (data.pDescriptorUpdateEntries !== undefined) this.pDescriptorUpdateEntries = data.pDescriptorUpdateEntries; - if (data.templateType !== undefined) this.templateType = data.templateType; - if (data.descriptorSetLayout !== undefined) this.descriptorSetLayout = data.descriptorSetLayout; - if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; - if (data.pipelineLayout !== undefined) this.pipelineLayout = data.pipelineLayout; - if (data.set !== undefined) this.set = data.set; - } - this.sType = StructureType.DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DescriptorUpdateTemplateCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get descriptorUpdateEntryCount() { - return this.#view.getUint32(20, LE); - } - - set descriptorUpdateEntryCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pDescriptorUpdateEntries() { - return this.#view.getBigUint64(24, LE); - } - - set pDescriptorUpdateEntries(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get templateType() { - return this.#view.getUint32(32, LE); - } - - set templateType(value: DescriptorUpdateTemplateType) { - this.#view.setUint32(32, Number(value), LE); - } - - get descriptorSetLayout() { - return this.#view.getBigUint64(40, LE); - } - - set descriptorSetLayout(value: DescriptorSetLayout) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get pipelineBindPoint() { - return this.#view.getUint32(48, LE); - } - - set pipelineBindPoint(value: PipelineBindPoint) { - this.#view.setUint32(48, Number(value), LE); - } - - get pipelineLayout() { - return this.#view.getBigUint64(56, LE); - } - - set pipelineLayout(value: PipelineLayout) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get set() { - return this.#view.getUint32(64, LE); - } - - set set(value: number) { - this.#view.setUint32(64, Number(value), LE); - } -} - -export interface InitXYColorEXT { - x?: number; - y?: number; -} - -/** Chromaticity coordinate */ -export class XYColorEXT implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitXYColorEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitXYColorEXT) { - if (data === undefined) { - this.#data = new Uint8Array(XYColorEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, XYColorEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < XYColorEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(XYColorEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.x !== undefined) this.x = data.x; - if (data.y !== undefined) this.y = data.y; - } - } - - get x() { - return this.#view.getFloat32(0, LE); - } - - set x(value: number) { - this.#view.setFloat32(0, Number(value), LE); - } - - get y() { - return this.#view.getFloat32(4, LE); - } - - set y(value: number) { - this.#view.setFloat32(4, Number(value), LE); - } -} - -export interface InitPhysicalDevicePresentIdFeaturesKHR { - pNext?: AnyPointer; - presentId?: Bool32; -} - -export class PhysicalDevicePresentIdFeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePresentIdFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePresentIdFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePresentIdFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentIdFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePresentIdFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePresentIdFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.presentId !== undefined) this.presentId = data.presentId; - } - this.sType = StructureType.PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get presentId() { - return this.#view.getUint32(16, LE); - } - - set presentId(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPresentIdKHR { - pNext?: AnyPointer; - swapchainCount?: number; - pPresentIds?: AnyPointer; -} - -export class PresentIdKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPresentIdKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPresentIdKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PresentIdKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentIdKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PresentIdKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PresentIdKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; - if (data.pPresentIds !== undefined) this.pPresentIds = data.pPresentIds; - } - this.sType = StructureType.PRESENT_ID_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get swapchainCount() { - return this.#view.getUint32(16, LE); - } - - set swapchainCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pPresentIds() { - return this.#view.getBigUint64(24, LE); - } - - set pPresentIds(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDevicePresentWaitFeaturesKHR { - pNext?: AnyPointer; - presentWait?: Bool32; -} - -export class PhysicalDevicePresentWaitFeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePresentWaitFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePresentWaitFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePresentWaitFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentWaitFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePresentWaitFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePresentWaitFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.presentWait !== undefined) this.presentWait = data.presentWait; - } - this.sType = StructureType.PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get presentWait() { - return this.#view.getUint32(16, LE); - } - - set presentWait(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitHdrMetadataEXT { - pNext?: AnyPointer; - displayPrimaryRed?: XYColorEXT; - displayPrimaryGreen?: XYColorEXT; - displayPrimaryBlue?: XYColorEXT; - whitePoint?: XYColorEXT; - maxLuminance?: number; - minLuminance?: number; - maxContentLightLevel?: number; - maxFrameAverageLightLevel?: number; -} - -export class HdrMetadataEXT implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitHdrMetadataEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitHdrMetadataEXT) { - if (data === undefined) { - this.#data = new Uint8Array(HdrMetadataEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, HdrMetadataEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < HdrMetadataEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(HdrMetadataEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.displayPrimaryRed !== undefined) this.displayPrimaryRed = data.displayPrimaryRed; - if (data.displayPrimaryGreen !== undefined) this.displayPrimaryGreen = data.displayPrimaryGreen; - if (data.displayPrimaryBlue !== undefined) this.displayPrimaryBlue = data.displayPrimaryBlue; - if (data.whitePoint !== undefined) this.whitePoint = data.whitePoint; - if (data.maxLuminance !== undefined) this.maxLuminance = data.maxLuminance; - if (data.minLuminance !== undefined) this.minLuminance = data.minLuminance; - if (data.maxContentLightLevel !== undefined) this.maxContentLightLevel = data.maxContentLightLevel; - if (data.maxFrameAverageLightLevel !== undefined) this.maxFrameAverageLightLevel = data.maxFrameAverageLightLevel; - } - this.sType = StructureType.HDR_METADATA_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get displayPrimaryRed() { - return new XYColorEXT(this.#data.subarray(16, 16 + XYColorEXT.size)); - } - - set displayPrimaryRed(value: XYColorEXT) { - if (value[BUFFER].byteLength < XYColorEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get displayPrimaryGreen() { - return new XYColorEXT(this.#data.subarray(24, 24 + XYColorEXT.size)); - } - - set displayPrimaryGreen(value: XYColorEXT) { - if (value[BUFFER].byteLength < XYColorEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get displayPrimaryBlue() { - return new XYColorEXT(this.#data.subarray(32, 32 + XYColorEXT.size)); - } - - set displayPrimaryBlue(value: XYColorEXT) { - if (value[BUFFER].byteLength < XYColorEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get whitePoint() { - return new XYColorEXT(this.#data.subarray(40, 40 + XYColorEXT.size)); - } - - set whitePoint(value: XYColorEXT) { - if (value[BUFFER].byteLength < XYColorEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } - - get maxLuminance() { - return this.#view.getFloat32(48, LE); - } - - set maxLuminance(value: number) { - this.#view.setFloat32(48, Number(value), LE); - } - - get minLuminance() { - return this.#view.getFloat32(52, LE); - } - - set minLuminance(value: number) { - this.#view.setFloat32(52, Number(value), LE); - } - - get maxContentLightLevel() { - return this.#view.getFloat32(56, LE); - } - - set maxContentLightLevel(value: number) { - this.#view.setFloat32(56, Number(value), LE); - } - - get maxFrameAverageLightLevel() { - return this.#view.getFloat32(60, LE); - } - - set maxFrameAverageLightLevel(value: number) { - this.#view.setFloat32(60, Number(value), LE); - } -} - -export interface InitDisplayNativeHdrSurfaceCapabilitiesAMD { - pNext?: AnyPointer; - localDimmingSupport?: Bool32; -} - -export class DisplayNativeHdrSurfaceCapabilitiesAMD implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayNativeHdrSurfaceCapabilitiesAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayNativeHdrSurfaceCapabilitiesAMD) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayNativeHdrSurfaceCapabilitiesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayNativeHdrSurfaceCapabilitiesAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayNativeHdrSurfaceCapabilitiesAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayNativeHdrSurfaceCapabilitiesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.localDimmingSupport !== undefined) this.localDimmingSupport = data.localDimmingSupport; - } - this.sType = StructureType.DISPLAY_NATIVE_HDR_SURFACE_CAPABILITIES_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get localDimmingSupport() { - return this.#view.getUint32(16, LE); - } - - set localDimmingSupport(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSwapchainDisplayNativeHdrCreateInfoAMD { - pNext?: AnyPointer; - localDimmingEnable?: Bool32; -} - -export class SwapchainDisplayNativeHdrCreateInfoAMD implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSwapchainDisplayNativeHdrCreateInfoAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainDisplayNativeHdrCreateInfoAMD) { - if (data === undefined) { - this.#data = new Uint8Array(SwapchainDisplayNativeHdrCreateInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainDisplayNativeHdrCreateInfoAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainDisplayNativeHdrCreateInfoAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SwapchainDisplayNativeHdrCreateInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.localDimmingEnable !== undefined) this.localDimmingEnable = data.localDimmingEnable; - } - this.sType = StructureType.SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get localDimmingEnable() { - return this.#view.getUint32(16, LE); - } - - set localDimmingEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitRefreshCycleDurationGOOGLE { - refreshDuration?: Deno.PointerValue; -} - -export class RefreshCycleDurationGOOGLE implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRefreshCycleDurationGOOGLE); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRefreshCycleDurationGOOGLE) { - if (data === undefined) { - this.#data = new Uint8Array(RefreshCycleDurationGOOGLE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RefreshCycleDurationGOOGLE.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RefreshCycleDurationGOOGLE.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RefreshCycleDurationGOOGLE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.refreshDuration !== undefined) this.refreshDuration = data.refreshDuration; - } - } - - get refreshDuration() { - return this.#view.getBigUint64(0, LE); - } - - set refreshDuration(value: Deno.PointerValue) { - this.#view.setBigUint64(0, BigInt(value), LE); - } -} - -export interface InitPastPresentationTimingGOOGLE { - presentID?: number; - desiredPresentTime?: Deno.PointerValue; - actualPresentTime?: Deno.PointerValue; - earliestPresentTime?: Deno.PointerValue; - presentMargin?: Deno.PointerValue; -} - -export class PastPresentationTimingGOOGLE implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPastPresentationTimingGOOGLE); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPastPresentationTimingGOOGLE) { - if (data === undefined) { - this.#data = new Uint8Array(PastPresentationTimingGOOGLE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PastPresentationTimingGOOGLE.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PastPresentationTimingGOOGLE.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PastPresentationTimingGOOGLE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.presentID !== undefined) this.presentID = data.presentID; - if (data.desiredPresentTime !== undefined) this.desiredPresentTime = data.desiredPresentTime; - if (data.actualPresentTime !== undefined) this.actualPresentTime = data.actualPresentTime; - if (data.earliestPresentTime !== undefined) this.earliestPresentTime = data.earliestPresentTime; - if (data.presentMargin !== undefined) this.presentMargin = data.presentMargin; - } - } - - get presentID() { - return this.#view.getUint32(0, LE); - } - - set presentID(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get desiredPresentTime() { - return this.#view.getBigUint64(8, LE); - } - - set desiredPresentTime(value: Deno.PointerValue) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get actualPresentTime() { - return this.#view.getBigUint64(16, LE); - } - - set actualPresentTime(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get earliestPresentTime() { - return this.#view.getBigUint64(24, LE); - } - - set earliestPresentTime(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get presentMargin() { - return this.#view.getBigUint64(32, LE); - } - - set presentMargin(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitPresentTimesInfoGOOGLE { - pNext?: AnyPointer; - swapchainCount?: number; - pTimes?: AnyPointer; -} - -export class PresentTimesInfoGOOGLE implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPresentTimesInfoGOOGLE); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPresentTimesInfoGOOGLE) { - if (data === undefined) { - this.#data = new Uint8Array(PresentTimesInfoGOOGLE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentTimesInfoGOOGLE.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PresentTimesInfoGOOGLE.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PresentTimesInfoGOOGLE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.swapchainCount !== undefined) this.swapchainCount = data.swapchainCount; - if (data.pTimes !== undefined) this.pTimes = data.pTimes; - } - this.sType = StructureType.PRESENT_TIMES_INFO_GOOGLE; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get swapchainCount() { - return this.#view.getUint32(16, LE); - } - - set swapchainCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pTimes() { - return this.#view.getBigUint64(24, LE); - } - - set pTimes(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPresentTimeGOOGLE { - presentID?: number; - desiredPresentTime?: Deno.PointerValue; -} - -export class PresentTimeGOOGLE implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPresentTimeGOOGLE); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPresentTimeGOOGLE) { - if (data === undefined) { - this.#data = new Uint8Array(PresentTimeGOOGLE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentTimeGOOGLE.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PresentTimeGOOGLE.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PresentTimeGOOGLE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.presentID !== undefined) this.presentID = data.presentID; - if (data.desiredPresentTime !== undefined) this.desiredPresentTime = data.desiredPresentTime; - } - } - - get presentID() { - return this.#view.getUint32(0, LE); - } - - set presentID(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get desiredPresentTime() { - return this.#view.getBigUint64(8, LE); - } - - set desiredPresentTime(value: Deno.PointerValue) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} - -export interface InitIOSSurfaceCreateInfoMVK { - pNext?: AnyPointer; - flags?: IOSSurfaceCreateFlagsMVK; - pView?: AnyPointer; -} - -export class IOSSurfaceCreateInfoMVK implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitIOSSurfaceCreateInfoMVK); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitIOSSurfaceCreateInfoMVK) { - if (data === undefined) { - this.#data = new Uint8Array(IOSSurfaceCreateInfoMVK.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, IOSSurfaceCreateInfoMVK.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < IOSSurfaceCreateInfoMVK.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(IOSSurfaceCreateInfoMVK.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pView !== undefined) this.pView = data.pView; - } - this.sType = StructureType.IOS_SURFACE_CREATE_INFO_MVK; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: IOSSurfaceCreateFlagsMVK) { - this.#view.setUint32(16, Number(value), LE); - } - - get pView() { - return this.#view.getBigUint64(24, LE); - } - - set pView(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitMacOSSurfaceCreateInfoMVK { - pNext?: AnyPointer; - flags?: MacOSSurfaceCreateFlagsMVK; - pView?: AnyPointer; -} - -export class MacOSSurfaceCreateInfoMVK implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMacOSSurfaceCreateInfoMVK); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMacOSSurfaceCreateInfoMVK) { - if (data === undefined) { - this.#data = new Uint8Array(MacOSSurfaceCreateInfoMVK.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MacOSSurfaceCreateInfoMVK.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MacOSSurfaceCreateInfoMVK.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MacOSSurfaceCreateInfoMVK.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pView !== undefined) this.pView = data.pView; - } - this.sType = StructureType.MACOS_SURFACE_CREATE_INFO_MVK; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: MacOSSurfaceCreateFlagsMVK) { - this.#view.setUint32(16, Number(value), LE); - } - - get pView() { - return this.#view.getBigUint64(24, LE); - } - - set pView(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitMetalSurfaceCreateInfoEXT { - pNext?: AnyPointer; - flags?: MetalSurfaceCreateFlagsEXT; - pLayer?: AnyPointer; -} - -export class MetalSurfaceCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMetalSurfaceCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMetalSurfaceCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MetalSurfaceCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MetalSurfaceCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MetalSurfaceCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MetalSurfaceCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pLayer !== undefined) this.pLayer = data.pLayer; - } - this.sType = StructureType.METAL_SURFACE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: MetalSurfaceCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get pLayer() { - return this.#view.getBigUint64(24, LE); - } - - set pLayer(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitViewportWScalingNV { - xcoeff?: number; - ycoeff?: number; -} - -export class ViewportWScalingNV implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitViewportWScalingNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitViewportWScalingNV) { - if (data === undefined) { - this.#data = new Uint8Array(ViewportWScalingNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ViewportWScalingNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ViewportWScalingNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ViewportWScalingNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.xcoeff !== undefined) this.xcoeff = data.xcoeff; - if (data.ycoeff !== undefined) this.ycoeff = data.ycoeff; - } - } - - get xcoeff() { - return this.#view.getFloat32(0, LE); - } - - set xcoeff(value: number) { - this.#view.setFloat32(0, Number(value), LE); - } - - get ycoeff() { - return this.#view.getFloat32(4, LE); - } - - set ycoeff(value: number) { - this.#view.setFloat32(4, Number(value), LE); - } -} - -export interface InitPipelineViewportWScalingStateCreateInfoNV { - pNext?: AnyPointer; - viewportWScalingEnable?: Bool32; - viewportCount?: number; - pViewportWScalings?: AnyPointer; -} - -export class PipelineViewportWScalingStateCreateInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineViewportWScalingStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportWScalingStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineViewportWScalingStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportWScalingStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportWScalingStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineViewportWScalingStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.viewportWScalingEnable !== undefined) this.viewportWScalingEnable = data.viewportWScalingEnable; - if (data.viewportCount !== undefined) this.viewportCount = data.viewportCount; - if (data.pViewportWScalings !== undefined) this.pViewportWScalings = data.pViewportWScalings; - } - this.sType = StructureType.PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get viewportWScalingEnable() { - return this.#view.getUint32(16, LE); - } - - set viewportWScalingEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get viewportCount() { - return this.#view.getUint32(20, LE); - } - - set viewportCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pViewportWScalings() { - return this.#view.getBigUint64(24, LE); - } - - set pViewportWScalings(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitViewportSwizzleNV { - x?: ViewportCoordinateSwizzleNV; - y?: ViewportCoordinateSwizzleNV; - z?: ViewportCoordinateSwizzleNV; - w?: ViewportCoordinateSwizzleNV; -} - -export class ViewportSwizzleNV implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitViewportSwizzleNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitViewportSwizzleNV) { - if (data === undefined) { - this.#data = new Uint8Array(ViewportSwizzleNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ViewportSwizzleNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ViewportSwizzleNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ViewportSwizzleNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.x !== undefined) this.x = data.x; - if (data.y !== undefined) this.y = data.y; - if (data.z !== undefined) this.z = data.z; - if (data.w !== undefined) this.w = data.w; - } - } - - get x() { - return this.#view.getUint32(0, LE); - } - - set x(value: ViewportCoordinateSwizzleNV) { - this.#view.setUint32(0, Number(value), LE); - } - - get y() { - return this.#view.getUint32(4, LE); - } - - set y(value: ViewportCoordinateSwizzleNV) { - this.#view.setUint32(4, Number(value), LE); - } - - get z() { - return this.#view.getUint32(8, LE); - } - - set z(value: ViewportCoordinateSwizzleNV) { - this.#view.setUint32(8, Number(value), LE); - } - - get w() { - return this.#view.getUint32(12, LE); - } - - set w(value: ViewportCoordinateSwizzleNV) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitPipelineViewportSwizzleStateCreateInfoNV { - pNext?: AnyPointer; - flags?: PipelineViewportSwizzleStateCreateFlagsNV; - viewportCount?: number; - pViewportSwizzles?: AnyPointer; -} - -export class PipelineViewportSwizzleStateCreateInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineViewportSwizzleStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportSwizzleStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineViewportSwizzleStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportSwizzleStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportSwizzleStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineViewportSwizzleStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.viewportCount !== undefined) this.viewportCount = data.viewportCount; - if (data.pViewportSwizzles !== undefined) this.pViewportSwizzles = data.pViewportSwizzles; - } - this.sType = StructureType.PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineViewportSwizzleStateCreateFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get viewportCount() { - return this.#view.getUint32(20, LE); - } - - set viewportCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pViewportSwizzles() { - return this.#view.getBigUint64(24, LE); - } - - set pViewportSwizzles(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceDiscardRectanglePropertiesEXT { - pNext?: AnyPointer; - maxDiscardRectangles?: number; -} - -export class PhysicalDeviceDiscardRectanglePropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDiscardRectanglePropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDiscardRectanglePropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDiscardRectanglePropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDiscardRectanglePropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDiscardRectanglePropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDiscardRectanglePropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxDiscardRectangles !== undefined) this.maxDiscardRectangles = data.maxDiscardRectangles; - } - this.sType = StructureType.PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxDiscardRectangles() { - return this.#view.getUint32(16, LE); - } - - set maxDiscardRectangles(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineDiscardRectangleStateCreateInfoEXT { - pNext?: AnyPointer; - flags?: PipelineDiscardRectangleStateCreateFlagsEXT; - discardRectangleMode?: DiscardRectangleModeEXT; - discardRectangleCount?: number; - pDiscardRectangles?: AnyPointer; -} - -export class PipelineDiscardRectangleStateCreateInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineDiscardRectangleStateCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineDiscardRectangleStateCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineDiscardRectangleStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineDiscardRectangleStateCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineDiscardRectangleStateCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineDiscardRectangleStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.discardRectangleMode !== undefined) this.discardRectangleMode = data.discardRectangleMode; - if (data.discardRectangleCount !== undefined) this.discardRectangleCount = data.discardRectangleCount; - if (data.pDiscardRectangles !== undefined) this.pDiscardRectangles = data.pDiscardRectangles; - } - this.sType = StructureType.PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineDiscardRectangleStateCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get discardRectangleMode() { - return this.#view.getUint32(20, LE); - } - - set discardRectangleMode(value: DiscardRectangleModeEXT) { - this.#view.setUint32(20, Number(value), LE); - } - - get discardRectangleCount() { - return this.#view.getUint32(24, LE); - } - - set discardRectangleCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pDiscardRectangles() { - return this.#view.getBigUint64(32, LE); - } - - set pDiscardRectangles(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { - pNext?: AnyPointer; - perViewPositionAllComponents?: Bool32; -} - -export class PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMultiviewPerViewAttributesPropertiesNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.perViewPositionAllComponents !== undefined) this.perViewPositionAllComponents = data.perViewPositionAllComponents; - } - this.sType = StructureType.PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get perViewPositionAllComponents() { - return this.#view.getUint32(16, LE); - } - - set perViewPositionAllComponents(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitInputAttachmentAspectReference { - subpass?: number; - inputAttachmentIndex?: number; - aspectMask?: ImageAspectFlags; -} - -export class InputAttachmentAspectReference implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitInputAttachmentAspectReference); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitInputAttachmentAspectReference) { - if (data === undefined) { - this.#data = new Uint8Array(InputAttachmentAspectReference.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, InputAttachmentAspectReference.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < InputAttachmentAspectReference.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(InputAttachmentAspectReference.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.subpass !== undefined) this.subpass = data.subpass; - if (data.inputAttachmentIndex !== undefined) this.inputAttachmentIndex = data.inputAttachmentIndex; - if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; - } - } - - get subpass() { - return this.#view.getUint32(0, LE); - } - - set subpass(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get inputAttachmentIndex() { - return this.#view.getUint32(4, LE); - } - - set inputAttachmentIndex(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get aspectMask() { - return this.#view.getUint32(8, LE); - } - - set aspectMask(value: ImageAspectFlags) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitRenderPassInputAttachmentAspectCreateInfo { - pNext?: AnyPointer; - aspectReferenceCount?: number; - pAspectReferences?: AnyPointer; -} - -export class RenderPassInputAttachmentAspectCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassInputAttachmentAspectCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassInputAttachmentAspectCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassInputAttachmentAspectCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassInputAttachmentAspectCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassInputAttachmentAspectCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassInputAttachmentAspectCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.aspectReferenceCount !== undefined) this.aspectReferenceCount = data.aspectReferenceCount; - if (data.pAspectReferences !== undefined) this.pAspectReferences = data.pAspectReferences; - } - this.sType = StructureType.RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get aspectReferenceCount() { - return this.#view.getUint32(16, LE); - } - - set aspectReferenceCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pAspectReferences() { - return this.#view.getBigUint64(24, LE); - } - - set pAspectReferences(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceSurfaceInfo2KHR { - pNext?: AnyPointer; - surface?: SurfaceKHR; -} - -export class PhysicalDeviceSurfaceInfo2KHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSurfaceInfo2KHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSurfaceInfo2KHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSurfaceInfo2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSurfaceInfo2KHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSurfaceInfo2KHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSurfaceInfo2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.surface !== undefined) this.surface = data.surface; - } - this.sType = StructureType.PHYSICAL_DEVICE_SURFACE_INFO_2_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get surface() { - return this.#view.getBigUint64(16, LE); - } - - set surface(value: SurfaceKHR) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSurfaceCapabilities2KHR { - pNext?: AnyPointer; - surfaceCapabilities?: SurfaceCapabilitiesKHR; -} - -export class SurfaceCapabilities2KHR implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceCapabilities2KHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilities2KHR) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceCapabilities2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilities2KHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilities2KHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceCapabilities2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.surfaceCapabilities !== undefined) this.surfaceCapabilities = data.surfaceCapabilities; - } - this.sType = StructureType.SURFACE_CAPABILITIES_2_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get surfaceCapabilities() { - return new SurfaceCapabilitiesKHR(this.#data.subarray(16, 16 + SurfaceCapabilitiesKHR.size)); - } - - set surfaceCapabilities(value: SurfaceCapabilitiesKHR) { - if (value[BUFFER].byteLength < SurfaceCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitSurfaceFormat2KHR { - pNext?: AnyPointer; - surfaceFormat?: SurfaceFormatKHR; -} - -export class SurfaceFormat2KHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceFormat2KHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceFormat2KHR) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceFormat2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFormat2KHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceFormat2KHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceFormat2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.surfaceFormat !== undefined) this.surfaceFormat = data.surfaceFormat; - } - this.sType = StructureType.SURFACE_FORMAT_2_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get surfaceFormat() { - return new SurfaceFormatKHR(this.#data.subarray(16, 16 + SurfaceFormatKHR.size)); - } - - set surfaceFormat(value: SurfaceFormatKHR) { - if (value[BUFFER].byteLength < SurfaceFormatKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitDisplayProperties2KHR { - pNext?: AnyPointer; - displayProperties?: DisplayPropertiesKHR; -} - -export class DisplayProperties2KHR implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayProperties2KHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayProperties2KHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayProperties2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayProperties2KHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayProperties2KHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayProperties2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.displayProperties !== undefined) this.displayProperties = data.displayProperties; - } - this.sType = StructureType.DISPLAY_PROPERTIES_2_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get displayProperties() { - return new DisplayPropertiesKHR(this.#data.subarray(16, 16 + DisplayPropertiesKHR.size)); - } - - set displayProperties(value: DisplayPropertiesKHR) { - if (value[BUFFER].byteLength < DisplayPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitDisplayPlaneProperties2KHR { - pNext?: AnyPointer; - displayPlaneProperties?: DisplayPlanePropertiesKHR; -} - -export class DisplayPlaneProperties2KHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayPlaneProperties2KHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlaneProperties2KHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayPlaneProperties2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneProperties2KHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlaneProperties2KHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayPlaneProperties2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.displayPlaneProperties !== undefined) this.displayPlaneProperties = data.displayPlaneProperties; - } - this.sType = StructureType.DISPLAY_PLANE_PROPERTIES_2_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get displayPlaneProperties() { - return new DisplayPlanePropertiesKHR(this.#data.subarray(16, 16 + DisplayPlanePropertiesKHR.size)); - } - - set displayPlaneProperties(value: DisplayPlanePropertiesKHR) { - if (value[BUFFER].byteLength < DisplayPlanePropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitDisplayModeProperties2KHR { - pNext?: AnyPointer; - displayModeProperties?: DisplayModePropertiesKHR; -} - -export class DisplayModeProperties2KHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayModeProperties2KHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayModeProperties2KHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayModeProperties2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayModeProperties2KHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayModeProperties2KHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayModeProperties2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.displayModeProperties !== undefined) this.displayModeProperties = data.displayModeProperties; - } - this.sType = StructureType.DISPLAY_MODE_PROPERTIES_2_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get displayModeProperties() { - return new DisplayModePropertiesKHR(this.#data.subarray(16, 16 + DisplayModePropertiesKHR.size)); - } - - set displayModeProperties(value: DisplayModePropertiesKHR) { - if (value[BUFFER].byteLength < DisplayModePropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitDisplayPlaneInfo2KHR { - pNext?: AnyPointer; - mode?: DisplayModeKHR; - planeIndex?: number; -} - -export class DisplayPlaneInfo2KHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayPlaneInfo2KHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlaneInfo2KHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayPlaneInfo2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneInfo2KHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlaneInfo2KHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayPlaneInfo2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.mode !== undefined) this.mode = data.mode; - if (data.planeIndex !== undefined) this.planeIndex = data.planeIndex; - } - this.sType = StructureType.DISPLAY_PLANE_INFO_2_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get mode() { - return this.#view.getBigUint64(16, LE); - } - - set mode(value: DisplayModeKHR) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get planeIndex() { - return this.#view.getUint32(24, LE); - } - - set planeIndex(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitDisplayPlaneCapabilities2KHR { - pNext?: AnyPointer; - capabilities?: DisplayPlaneCapabilitiesKHR; -} - -export class DisplayPlaneCapabilities2KHR implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDisplayPlaneCapabilities2KHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDisplayPlaneCapabilities2KHR) { - if (data === undefined) { - this.#data = new Uint8Array(DisplayPlaneCapabilities2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DisplayPlaneCapabilities2KHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DisplayPlaneCapabilities2KHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DisplayPlaneCapabilities2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.capabilities !== undefined) this.capabilities = data.capabilities; - } - this.sType = StructureType.DISPLAY_PLANE_CAPABILITIES_2_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get capabilities() { - return new DisplayPlaneCapabilitiesKHR(this.#data.subarray(16, 16 + DisplayPlaneCapabilitiesKHR.size)); - } - - set capabilities(value: DisplayPlaneCapabilitiesKHR) { - if (value[BUFFER].byteLength < DisplayPlaneCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitSharedPresentSurfaceCapabilitiesKHR { - pNext?: AnyPointer; - sharedPresentSupportedUsageFlags?: ImageUsageFlags; -} - -export class SharedPresentSurfaceCapabilitiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSharedPresentSurfaceCapabilitiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSharedPresentSurfaceCapabilitiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(SharedPresentSurfaceCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SharedPresentSurfaceCapabilitiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SharedPresentSurfaceCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SharedPresentSurfaceCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.sharedPresentSupportedUsageFlags !== undefined) this.sharedPresentSupportedUsageFlags = data.sharedPresentSupportedUsageFlags; - } - this.sType = StructureType.SHARED_PRESENT_SURFACE_CAPABILITIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get sharedPresentSupportedUsageFlags() { - return this.#view.getUint32(16, LE); - } - - set sharedPresentSupportedUsageFlags(value: ImageUsageFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevice16BitStorageFeatures { - pNext?: AnyPointer; - storageBuffer16BitAccess?: Bool32; - uniformAndStorageBuffer16BitAccess?: Bool32; - storagePushConstant16?: Bool32; - storageInputOutput16?: Bool32; -} - -export class PhysicalDevice16BitStorageFeatures implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevice16BitStorageFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevice16BitStorageFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevice16BitStorageFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevice16BitStorageFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevice16BitStorageFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevice16BitStorageFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.storageBuffer16BitAccess !== undefined) this.storageBuffer16BitAccess = data.storageBuffer16BitAccess; - if (data.uniformAndStorageBuffer16BitAccess !== undefined) this.uniformAndStorageBuffer16BitAccess = data.uniformAndStorageBuffer16BitAccess; - if (data.storagePushConstant16 !== undefined) this.storagePushConstant16 = data.storagePushConstant16; - if (data.storageInputOutput16 !== undefined) this.storageInputOutput16 = data.storageInputOutput16; - } - this.sType = StructureType.PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get storageBuffer16BitAccess() { - return this.#view.getUint32(16, LE); - } - - set storageBuffer16BitAccess(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get uniformAndStorageBuffer16BitAccess() { - return this.#view.getUint32(20, LE); - } - - set uniformAndStorageBuffer16BitAccess(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get storagePushConstant16() { - return this.#view.getUint32(24, LE); - } - - set storagePushConstant16(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get storageInputOutput16() { - return this.#view.getUint32(28, LE); - } - - set storageInputOutput16(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDeviceSubgroupProperties { - pNext?: AnyPointer; - subgroupSize?: number; - supportedStages?: ShaderStageFlags; - supportedOperations?: SubgroupFeatureFlags; - quadOperationsInAllStages?: Bool32; -} - -export class PhysicalDeviceSubgroupProperties implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSubgroupProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubgroupProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSubgroupProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubgroupProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubgroupProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSubgroupProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.subgroupSize !== undefined) this.subgroupSize = data.subgroupSize; - if (data.supportedStages !== undefined) this.supportedStages = data.supportedStages; - if (data.supportedOperations !== undefined) this.supportedOperations = data.supportedOperations; - if (data.quadOperationsInAllStages !== undefined) this.quadOperationsInAllStages = data.quadOperationsInAllStages; - } - this.sType = StructureType.PHYSICAL_DEVICE_SUBGROUP_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get subgroupSize() { - return this.#view.getUint32(16, LE); - } - - set subgroupSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get supportedStages() { - return this.#view.getUint32(20, LE); - } - - set supportedStages(value: ShaderStageFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get supportedOperations() { - return this.#view.getUint32(24, LE); - } - - set supportedOperations(value: SubgroupFeatureFlags) { - this.#view.setUint32(24, Number(value), LE); - } - - get quadOperationsInAllStages() { - return this.#view.getUint32(28, LE); - } - - set quadOperationsInAllStages(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderSubgroupExtendedTypesFeatures { - pNext?: AnyPointer; - shaderSubgroupExtendedTypes?: Bool32; -} - -export class PhysicalDeviceShaderSubgroupExtendedTypesFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderSubgroupExtendedTypesFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderSubgroupExtendedTypesFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupExtendedTypesFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderSubgroupExtendedTypes !== undefined) this.shaderSubgroupExtendedTypes = data.shaderSubgroupExtendedTypes; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderSubgroupExtendedTypes() { - return this.#view.getUint32(16, LE); - } - - set shaderSubgroupExtendedTypes(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitBufferMemoryRequirementsInfo2 { - pNext?: AnyPointer; - buffer?: Buffer; -} - -export class BufferMemoryRequirementsInfo2 implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferMemoryRequirementsInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferMemoryRequirementsInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(BufferMemoryRequirementsInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferMemoryRequirementsInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferMemoryRequirementsInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferMemoryRequirementsInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.buffer !== undefined) this.buffer = data.buffer; - } - this.sType = StructureType.BUFFER_MEMORY_REQUIREMENTS_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get buffer() { - return this.#view.getBigUint64(16, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDeviceBufferMemoryRequirements { - pNext?: AnyPointer; - pCreateInfo?: AnyPointer; -} - -export class DeviceBufferMemoryRequirements implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceBufferMemoryRequirements); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceBufferMemoryRequirements) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceBufferMemoryRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceBufferMemoryRequirements.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceBufferMemoryRequirements.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceBufferMemoryRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pCreateInfo !== undefined) this.pCreateInfo = data.pCreateInfo; - } - this.sType = StructureType.DEVICE_BUFFER_MEMORY_REQUIREMENTS; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pCreateInfo() { - return this.#view.getBigUint64(16, LE); - } - - set pCreateInfo(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageMemoryRequirementsInfo2 { - pNext?: AnyPointer; - image?: Image; -} - -export class ImageMemoryRequirementsInfo2 implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageMemoryRequirementsInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageMemoryRequirementsInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(ImageMemoryRequirementsInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageMemoryRequirementsInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageMemoryRequirementsInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageMemoryRequirementsInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.image !== undefined) this.image = data.image; - } - this.sType = StructureType.IMAGE_MEMORY_REQUIREMENTS_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get image() { - return this.#view.getBigUint64(16, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageSparseMemoryRequirementsInfo2 { - pNext?: AnyPointer; - image?: Image; -} - -export class ImageSparseMemoryRequirementsInfo2 implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageSparseMemoryRequirementsInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageSparseMemoryRequirementsInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(ImageSparseMemoryRequirementsInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSparseMemoryRequirementsInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSparseMemoryRequirementsInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageSparseMemoryRequirementsInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.image !== undefined) this.image = data.image; - } - this.sType = StructureType.IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get image() { - return this.#view.getBigUint64(16, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDeviceImageMemoryRequirements { - pNext?: AnyPointer; - pCreateInfo?: AnyPointer; - planeAspect?: ImageAspectFlagBits; -} - -export class DeviceImageMemoryRequirements implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceImageMemoryRequirements); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceImageMemoryRequirements) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceImageMemoryRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceImageMemoryRequirements.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceImageMemoryRequirements.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceImageMemoryRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pCreateInfo !== undefined) this.pCreateInfo = data.pCreateInfo; - if (data.planeAspect !== undefined) this.planeAspect = data.planeAspect; - } - this.sType = StructureType.DEVICE_IMAGE_MEMORY_REQUIREMENTS; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pCreateInfo() { - return this.#view.getBigUint64(16, LE); - } - - set pCreateInfo(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get planeAspect() { - return this.#view.getUint32(24, LE); - } - - set planeAspect(value: ImageAspectFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitMemoryRequirements2 { - pNext?: AnyPointer; - memoryRequirements?: MemoryRequirements; -} - -export class MemoryRequirements2 implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryRequirements2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryRequirements2) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryRequirements2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryRequirements2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryRequirements2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryRequirements2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryRequirements !== undefined) this.memoryRequirements = data.memoryRequirements; - } - this.sType = StructureType.MEMORY_REQUIREMENTS_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryRequirements() { - return new MemoryRequirements(this.#data.subarray(16, 16 + MemoryRequirements.size)); - } - - set memoryRequirements(value: MemoryRequirements) { - if (value[BUFFER].byteLength < MemoryRequirements.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitSparseImageMemoryRequirements2 { - pNext?: AnyPointer; - memoryRequirements?: SparseImageMemoryRequirements; -} - -export class SparseImageMemoryRequirements2 implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSparseImageMemoryRequirements2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSparseImageMemoryRequirements2) { - if (data === undefined) { - this.#data = new Uint8Array(SparseImageMemoryRequirements2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SparseImageMemoryRequirements2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SparseImageMemoryRequirements2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SparseImageMemoryRequirements2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryRequirements !== undefined) this.memoryRequirements = data.memoryRequirements; - } - this.sType = StructureType.SPARSE_IMAGE_MEMORY_REQUIREMENTS_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryRequirements() { - return new SparseImageMemoryRequirements(this.#data.subarray(16, 16 + SparseImageMemoryRequirements.size)); - } - - set memoryRequirements(value: SparseImageMemoryRequirements) { - if (value[BUFFER].byteLength < SparseImageMemoryRequirements.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitPhysicalDevicePointClippingProperties { - pNext?: AnyPointer; - pointClippingBehavior?: PointClippingBehavior; -} - -export class PhysicalDevicePointClippingProperties implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePointClippingProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePointClippingProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePointClippingProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePointClippingProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePointClippingProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePointClippingProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pointClippingBehavior !== undefined) this.pointClippingBehavior = data.pointClippingBehavior; - } - this.sType = StructureType.PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pointClippingBehavior() { - return this.#view.getUint32(16, LE); - } - - set pointClippingBehavior(value: PointClippingBehavior) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMemoryDedicatedRequirements { - pNext?: AnyPointer; - prefersDedicatedAllocation?: Bool32; - requiresDedicatedAllocation?: Bool32; -} - -export class MemoryDedicatedRequirements implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryDedicatedRequirements); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryDedicatedRequirements) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryDedicatedRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryDedicatedRequirements.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryDedicatedRequirements.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryDedicatedRequirements.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.prefersDedicatedAllocation !== undefined) this.prefersDedicatedAllocation = data.prefersDedicatedAllocation; - if (data.requiresDedicatedAllocation !== undefined) this.requiresDedicatedAllocation = data.requiresDedicatedAllocation; - } - this.sType = StructureType.MEMORY_DEDICATED_REQUIREMENTS; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get prefersDedicatedAllocation() { - return this.#view.getUint32(16, LE); - } - - set prefersDedicatedAllocation(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get requiresDedicatedAllocation() { - return this.#view.getUint32(20, LE); - } - - set requiresDedicatedAllocation(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitMemoryDedicatedAllocateInfo { - pNext?: AnyPointer; - image?: Image; - buffer?: Buffer; -} - -export class MemoryDedicatedAllocateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryDedicatedAllocateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryDedicatedAllocateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryDedicatedAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryDedicatedAllocateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryDedicatedAllocateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryDedicatedAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.image !== undefined) this.image = data.image; - if (data.buffer !== undefined) this.buffer = data.buffer; - } - this.sType = StructureType.MEMORY_DEDICATED_ALLOCATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get image() { - return this.#view.getBigUint64(16, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get buffer() { - return this.#view.getBigUint64(24, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageViewUsageCreateInfo { - pNext?: AnyPointer; - usage?: ImageUsageFlags; -} - -export class ImageViewUsageCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageViewUsageCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewUsageCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ImageViewUsageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewUsageCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewUsageCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageViewUsageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.usage !== undefined) this.usage = data.usage; - } - this.sType = StructureType.IMAGE_VIEW_USAGE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get usage() { - return this.#view.getUint32(16, LE); - } - - set usage(value: ImageUsageFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineTessellationDomainOriginStateCreateInfo { - pNext?: AnyPointer; - domainOrigin?: TessellationDomainOrigin; -} - -export class PipelineTessellationDomainOriginStateCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineTessellationDomainOriginStateCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineTessellationDomainOriginStateCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineTessellationDomainOriginStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineTessellationDomainOriginStateCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineTessellationDomainOriginStateCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineTessellationDomainOriginStateCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.domainOrigin !== undefined) this.domainOrigin = data.domainOrigin; - } - this.sType = StructureType.PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get domainOrigin() { - return this.#view.getUint32(16, LE); - } - - set domainOrigin(value: TessellationDomainOrigin) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSamplerYcbcrConversionInfo { - pNext?: AnyPointer; - conversion?: SamplerYcbcrConversion; -} - -export class SamplerYcbcrConversionInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSamplerYcbcrConversionInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerYcbcrConversionInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SamplerYcbcrConversionInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerYcbcrConversionInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerYcbcrConversionInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SamplerYcbcrConversionInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.conversion !== undefined) this.conversion = data.conversion; - } - this.sType = StructureType.SAMPLER_YCBCR_CONVERSION_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get conversion() { - return this.#view.getBigUint64(16, LE); - } - - set conversion(value: SamplerYcbcrConversion) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSamplerYcbcrConversionCreateInfo { - pNext?: AnyPointer; - format?: Format; - ycbcrModel?: SamplerYcbcrModelConversion; - ycbcrRange?: SamplerYcbcrRange; - components?: ComponentMapping; - xChromaOffset?: ChromaLocation; - yChromaOffset?: ChromaLocation; - chromaFilter?: Filter; - forceExplicitReconstruction?: Bool32; -} - -export class SamplerYcbcrConversionCreateInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSamplerYcbcrConversionCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerYcbcrConversionCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SamplerYcbcrConversionCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerYcbcrConversionCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerYcbcrConversionCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SamplerYcbcrConversionCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.format !== undefined) this.format = data.format; - if (data.ycbcrModel !== undefined) this.ycbcrModel = data.ycbcrModel; - if (data.ycbcrRange !== undefined) this.ycbcrRange = data.ycbcrRange; - if (data.components !== undefined) this.components = data.components; - if (data.xChromaOffset !== undefined) this.xChromaOffset = data.xChromaOffset; - if (data.yChromaOffset !== undefined) this.yChromaOffset = data.yChromaOffset; - if (data.chromaFilter !== undefined) this.chromaFilter = data.chromaFilter; - if (data.forceExplicitReconstruction !== undefined) this.forceExplicitReconstruction = data.forceExplicitReconstruction; - } - this.sType = StructureType.SAMPLER_YCBCR_CONVERSION_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get format() { - return this.#view.getUint32(16, LE); - } - - set format(value: Format) { - this.#view.setUint32(16, Number(value), LE); - } - - get ycbcrModel() { - return this.#view.getUint32(20, LE); - } - - set ycbcrModel(value: SamplerYcbcrModelConversion) { - this.#view.setUint32(20, Number(value), LE); - } - - get ycbcrRange() { - return this.#view.getUint32(24, LE); - } - - set ycbcrRange(value: SamplerYcbcrRange) { - this.#view.setUint32(24, Number(value), LE); - } - - get components() { - return new ComponentMapping(this.#data.subarray(28, 28 + ComponentMapping.size)); - } - - set components(value: ComponentMapping) { - if (value[BUFFER].byteLength < ComponentMapping.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 28); - } - - get xChromaOffset() { - return this.#view.getUint32(44, LE); - } - - set xChromaOffset(value: ChromaLocation) { - this.#view.setUint32(44, Number(value), LE); - } - - get yChromaOffset() { - return this.#view.getUint32(48, LE); - } - - set yChromaOffset(value: ChromaLocation) { - this.#view.setUint32(48, Number(value), LE); - } - - get chromaFilter() { - return this.#view.getUint32(52, LE); - } - - set chromaFilter(value: Filter) { - this.#view.setUint32(52, Number(value), LE); - } - - get forceExplicitReconstruction() { - return this.#view.getUint32(56, LE); - } - - set forceExplicitReconstruction(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } -} - -export interface InitBindImagePlaneMemoryInfo { - pNext?: AnyPointer; - planeAspect?: ImageAspectFlagBits; -} - -export class BindImagePlaneMemoryInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindImagePlaneMemoryInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindImagePlaneMemoryInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BindImagePlaneMemoryInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindImagePlaneMemoryInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindImagePlaneMemoryInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindImagePlaneMemoryInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.planeAspect !== undefined) this.planeAspect = data.planeAspect; - } - this.sType = StructureType.BIND_IMAGE_PLANE_MEMORY_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get planeAspect() { - return this.#view.getUint32(16, LE); - } - - set planeAspect(value: ImageAspectFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImagePlaneMemoryRequirementsInfo { - pNext?: AnyPointer; - planeAspect?: ImageAspectFlagBits; -} - -export class ImagePlaneMemoryRequirementsInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImagePlaneMemoryRequirementsInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImagePlaneMemoryRequirementsInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ImagePlaneMemoryRequirementsInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImagePlaneMemoryRequirementsInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImagePlaneMemoryRequirementsInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImagePlaneMemoryRequirementsInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.planeAspect !== undefined) this.planeAspect = data.planeAspect; - } - this.sType = StructureType.IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get planeAspect() { - return this.#view.getUint32(16, LE); - } - - set planeAspect(value: ImageAspectFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceSamplerYcbcrConversionFeatures { - pNext?: AnyPointer; - samplerYcbcrConversion?: Bool32; -} - -export class PhysicalDeviceSamplerYcbcrConversionFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSamplerYcbcrConversionFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSamplerYcbcrConversionFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSamplerYcbcrConversionFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSamplerYcbcrConversionFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSamplerYcbcrConversionFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSamplerYcbcrConversionFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.samplerYcbcrConversion !== undefined) this.samplerYcbcrConversion = data.samplerYcbcrConversion; - } - this.sType = StructureType.PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get samplerYcbcrConversion() { - return this.#view.getUint32(16, LE); - } - - set samplerYcbcrConversion(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSamplerYcbcrConversionImageFormatProperties { - pNext?: AnyPointer; - combinedImageSamplerDescriptorCount?: number; -} - -export class SamplerYcbcrConversionImageFormatProperties implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSamplerYcbcrConversionImageFormatProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerYcbcrConversionImageFormatProperties) { - if (data === undefined) { - this.#data = new Uint8Array(SamplerYcbcrConversionImageFormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerYcbcrConversionImageFormatProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerYcbcrConversionImageFormatProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SamplerYcbcrConversionImageFormatProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.combinedImageSamplerDescriptorCount !== undefined) this.combinedImageSamplerDescriptorCount = data.combinedImageSamplerDescriptorCount; - } - this.sType = StructureType.SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get combinedImageSamplerDescriptorCount() { - return this.#view.getUint32(16, LE); - } - - set combinedImageSamplerDescriptorCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitTextureLODGatherFormatPropertiesAMD { - pNext?: AnyPointer; - supportsTextureGatherLODBiasAMD?: Bool32; -} - -export class TextureLODGatherFormatPropertiesAMD implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitTextureLODGatherFormatPropertiesAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitTextureLODGatherFormatPropertiesAMD) { - if (data === undefined) { - this.#data = new Uint8Array(TextureLODGatherFormatPropertiesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TextureLODGatherFormatPropertiesAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < TextureLODGatherFormatPropertiesAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(TextureLODGatherFormatPropertiesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.supportsTextureGatherLODBiasAMD !== undefined) this.supportsTextureGatherLODBiasAMD = data.supportsTextureGatherLODBiasAMD; - } - this.sType = StructureType.TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get supportsTextureGatherLODBiasAMD() { - return this.#view.getUint32(16, LE); - } - - set supportsTextureGatherLODBiasAMD(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitConditionalRenderingBeginInfoEXT { - pNext?: AnyPointer; - buffer?: Buffer; - offset?: DeviceSize; - flags?: ConditionalRenderingFlagsEXT; -} - -export class ConditionalRenderingBeginInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitConditionalRenderingBeginInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitConditionalRenderingBeginInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ConditionalRenderingBeginInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ConditionalRenderingBeginInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ConditionalRenderingBeginInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ConditionalRenderingBeginInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.offset !== undefined) this.offset = data.offset; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.CONDITIONAL_RENDERING_BEGIN_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get buffer() { - return this.#view.getBigUint64(16, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get offset() { - return this.#view.getBigUint64(24, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get flags() { - return this.#view.getUint32(32, LE); - } - - set flags(value: ConditionalRenderingFlagsEXT) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitProtectedSubmitInfo { - pNext?: AnyPointer; - protectedSubmit?: Bool32; -} - -export class ProtectedSubmitInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitProtectedSubmitInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitProtectedSubmitInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ProtectedSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ProtectedSubmitInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ProtectedSubmitInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ProtectedSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.protectedSubmit !== undefined) this.protectedSubmit = data.protectedSubmit; - } - this.sType = StructureType.PROTECTED_SUBMIT_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get protectedSubmit() { - return this.#view.getUint32(16, LE); - } - - set protectedSubmit(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceProtectedMemoryFeatures { - pNext?: AnyPointer; - protectedMemory?: Bool32; -} - -export class PhysicalDeviceProtectedMemoryFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceProtectedMemoryFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProtectedMemoryFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProtectedMemoryFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProtectedMemoryFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.protectedMemory !== undefined) this.protectedMemory = data.protectedMemory; - } - this.sType = StructureType.PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get protectedMemory() { - return this.#view.getUint32(16, LE); - } - - set protectedMemory(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceProtectedMemoryProperties { - pNext?: AnyPointer; - protectedNoFault?: Bool32; -} - -export class PhysicalDeviceProtectedMemoryProperties implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceProtectedMemoryProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProtectedMemoryProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProtectedMemoryProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProtectedMemoryProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceProtectedMemoryProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.protectedNoFault !== undefined) this.protectedNoFault = data.protectedNoFault; - } - this.sType = StructureType.PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get protectedNoFault() { - return this.#view.getUint32(16, LE); - } - - set protectedNoFault(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDeviceQueueInfo2 { - pNext?: AnyPointer; - flags?: DeviceQueueCreateFlags; - queueFamilyIndex?: number; - queueIndex?: number; -} - -export class DeviceQueueInfo2 implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceQueueInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceQueueInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceQueueInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceQueueInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceQueueInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceQueueInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; - if (data.queueIndex !== undefined) this.queueIndex = data.queueIndex; - } - this.sType = StructureType.DEVICE_QUEUE_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DeviceQueueCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get queueFamilyIndex() { - return this.#view.getUint32(20, LE); - } - - set queueFamilyIndex(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get queueIndex() { - return this.#view.getUint32(24, LE); - } - - set queueIndex(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPipelineCoverageToColorStateCreateInfoNV { - pNext?: AnyPointer; - flags?: PipelineCoverageToColorStateCreateFlagsNV; - coverageToColorEnable?: Bool32; - coverageToColorLocation?: number; -} - -export class PipelineCoverageToColorStateCreateInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineCoverageToColorStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCoverageToColorStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineCoverageToColorStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCoverageToColorStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCoverageToColorStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineCoverageToColorStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.coverageToColorEnable !== undefined) this.coverageToColorEnable = data.coverageToColorEnable; - if (data.coverageToColorLocation !== undefined) this.coverageToColorLocation = data.coverageToColorLocation; - } - this.sType = StructureType.PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineCoverageToColorStateCreateFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get coverageToColorEnable() { - return this.#view.getUint32(20, LE); - } - - set coverageToColorEnable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get coverageToColorLocation() { - return this.#view.getUint32(24, LE); - } - - set coverageToColorLocation(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceSamplerFilterMinmaxProperties { - pNext?: AnyPointer; - filterMinmaxSingleComponentFormats?: Bool32; - filterMinmaxImageComponentMapping?: Bool32; -} - -export class PhysicalDeviceSamplerFilterMinmaxProperties implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSamplerFilterMinmaxProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSamplerFilterMinmaxProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSamplerFilterMinmaxProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSamplerFilterMinmaxProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSamplerFilterMinmaxProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSamplerFilterMinmaxProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.filterMinmaxSingleComponentFormats !== undefined) this.filterMinmaxSingleComponentFormats = data.filterMinmaxSingleComponentFormats; - if (data.filterMinmaxImageComponentMapping !== undefined) this.filterMinmaxImageComponentMapping = data.filterMinmaxImageComponentMapping; - } - this.sType = StructureType.PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get filterMinmaxSingleComponentFormats() { - return this.#view.getUint32(16, LE); - } - - set filterMinmaxSingleComponentFormats(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get filterMinmaxImageComponentMapping() { - return this.#view.getUint32(20, LE); - } - - set filterMinmaxImageComponentMapping(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitSampleLocationEXT { - x?: number; - y?: number; -} - -export class SampleLocationEXT implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSampleLocationEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSampleLocationEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SampleLocationEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SampleLocationEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SampleLocationEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SampleLocationEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.x !== undefined) this.x = data.x; - if (data.y !== undefined) this.y = data.y; - } - } - - get x() { - return this.#view.getFloat32(0, LE); - } - - set x(value: number) { - this.#view.setFloat32(0, Number(value), LE); - } - - get y() { - return this.#view.getFloat32(4, LE); - } - - set y(value: number) { - this.#view.setFloat32(4, Number(value), LE); - } -} - -export interface InitSampleLocationsInfoEXT { - pNext?: AnyPointer; - sampleLocationsPerPixel?: SampleCountFlagBits; - sampleLocationGridSize?: Extent2D; - sampleLocationsCount?: number; - pSampleLocations?: AnyPointer; -} - -export class SampleLocationsInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSampleLocationsInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSampleLocationsInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SampleLocationsInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SampleLocationsInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SampleLocationsInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SampleLocationsInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.sampleLocationsPerPixel !== undefined) this.sampleLocationsPerPixel = data.sampleLocationsPerPixel; - if (data.sampleLocationGridSize !== undefined) this.sampleLocationGridSize = data.sampleLocationGridSize; - if (data.sampleLocationsCount !== undefined) this.sampleLocationsCount = data.sampleLocationsCount; - if (data.pSampleLocations !== undefined) this.pSampleLocations = data.pSampleLocations; - } - this.sType = StructureType.SAMPLE_LOCATIONS_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get sampleLocationsPerPixel() { - return this.#view.getUint32(16, LE); - } - - set sampleLocationsPerPixel(value: SampleCountFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } - - get sampleLocationGridSize() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - - set sampleLocationGridSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } - - get sampleLocationsCount() { - return this.#view.getUint32(28, LE); - } - - set sampleLocationsCount(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get pSampleLocations() { - return this.#view.getBigUint64(32, LE); - } - - set pSampleLocations(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitAttachmentSampleLocationsEXT { - attachmentIndex?: number; - sampleLocationsInfo?: SampleLocationsInfoEXT; -} - -export class AttachmentSampleLocationsEXT implements BaseStruct { - static size = 44; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAttachmentSampleLocationsEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentSampleLocationsEXT) { - if (data === undefined) { - this.#data = new Uint8Array(AttachmentSampleLocationsEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentSampleLocationsEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentSampleLocationsEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AttachmentSampleLocationsEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.attachmentIndex !== undefined) this.attachmentIndex = data.attachmentIndex; - if (data.sampleLocationsInfo !== undefined) this.sampleLocationsInfo = data.sampleLocationsInfo; - } - } - - get attachmentIndex() { - return this.#view.getUint32(0, LE); - } - - set attachmentIndex(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get sampleLocationsInfo() { - return new SampleLocationsInfoEXT(this.#data.subarray(4, 4 + SampleLocationsInfoEXT.size)); - } - - set sampleLocationsInfo(value: SampleLocationsInfoEXT) { - if (value[BUFFER].byteLength < SampleLocationsInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 4); - } -} - -export interface InitSubpassSampleLocationsEXT { - subpassIndex?: number; - sampleLocationsInfo?: SampleLocationsInfoEXT; -} - -export class SubpassSampleLocationsEXT implements BaseStruct { - static size = 44; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassSampleLocationsEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassSampleLocationsEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassSampleLocationsEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassSampleLocationsEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassSampleLocationsEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassSampleLocationsEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.subpassIndex !== undefined) this.subpassIndex = data.subpassIndex; - if (data.sampleLocationsInfo !== undefined) this.sampleLocationsInfo = data.sampleLocationsInfo; - } - } - - get subpassIndex() { - return this.#view.getUint32(0, LE); - } - - set subpassIndex(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get sampleLocationsInfo() { - return new SampleLocationsInfoEXT(this.#data.subarray(4, 4 + SampleLocationsInfoEXT.size)); - } - - set sampleLocationsInfo(value: SampleLocationsInfoEXT) { - if (value[BUFFER].byteLength < SampleLocationsInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 4); - } -} - -export interface InitRenderPassSampleLocationsBeginInfoEXT { - pNext?: AnyPointer; - attachmentInitialSampleLocationsCount?: number; - pAttachmentInitialSampleLocations?: AnyPointer; - postSubpassSampleLocationsCount?: number; - pPostSubpassSampleLocations?: AnyPointer; -} - -export class RenderPassSampleLocationsBeginInfoEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassSampleLocationsBeginInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassSampleLocationsBeginInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassSampleLocationsBeginInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassSampleLocationsBeginInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassSampleLocationsBeginInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassSampleLocationsBeginInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.attachmentInitialSampleLocationsCount !== undefined) this.attachmentInitialSampleLocationsCount = data.attachmentInitialSampleLocationsCount; - if (data.pAttachmentInitialSampleLocations !== undefined) this.pAttachmentInitialSampleLocations = data.pAttachmentInitialSampleLocations; - if (data.postSubpassSampleLocationsCount !== undefined) this.postSubpassSampleLocationsCount = data.postSubpassSampleLocationsCount; - if (data.pPostSubpassSampleLocations !== undefined) this.pPostSubpassSampleLocations = data.pPostSubpassSampleLocations; - } - this.sType = StructureType.RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get attachmentInitialSampleLocationsCount() { - return this.#view.getUint32(16, LE); - } - - set attachmentInitialSampleLocationsCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pAttachmentInitialSampleLocations() { - return this.#view.getBigUint64(24, LE); - } - - set pAttachmentInitialSampleLocations(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get postSubpassSampleLocationsCount() { - return this.#view.getUint32(32, LE); - } - - set postSubpassSampleLocationsCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pPostSubpassSampleLocations() { - return this.#view.getBigUint64(40, LE); - } - - set pPostSubpassSampleLocations(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelineSampleLocationsStateCreateInfoEXT { - pNext?: AnyPointer; - sampleLocationsEnable?: Bool32; - sampleLocationsInfo?: SampleLocationsInfoEXT; -} - -export class PipelineSampleLocationsStateCreateInfoEXT implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineSampleLocationsStateCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineSampleLocationsStateCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineSampleLocationsStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineSampleLocationsStateCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineSampleLocationsStateCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineSampleLocationsStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.sampleLocationsEnable !== undefined) this.sampleLocationsEnable = data.sampleLocationsEnable; - if (data.sampleLocationsInfo !== undefined) this.sampleLocationsInfo = data.sampleLocationsInfo; - } - this.sType = StructureType.PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get sampleLocationsEnable() { - return this.#view.getUint32(16, LE); - } - - set sampleLocationsEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get sampleLocationsInfo() { - return new SampleLocationsInfoEXT(this.#data.subarray(20, 20 + SampleLocationsInfoEXT.size)); - } - - set sampleLocationsInfo(value: SampleLocationsInfoEXT) { - if (value[BUFFER].byteLength < SampleLocationsInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } -} - -export interface InitPhysicalDeviceSampleLocationsPropertiesEXT { - pNext?: AnyPointer; - sampleLocationSampleCounts?: SampleCountFlags; - maxSampleLocationGridSize?: Extent2D; - sampleLocationCoordinateRange?: Float32Array; - sampleLocationSubPixelBits?: number; - variableSampleLocations?: Bool32; -} - -export class PhysicalDeviceSampleLocationsPropertiesEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSampleLocationsPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSampleLocationsPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSampleLocationsPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSampleLocationsPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSampleLocationsPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSampleLocationsPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.sampleLocationSampleCounts !== undefined) this.sampleLocationSampleCounts = data.sampleLocationSampleCounts; - if (data.maxSampleLocationGridSize !== undefined) this.maxSampleLocationGridSize = data.maxSampleLocationGridSize; - if (data.sampleLocationCoordinateRange !== undefined) this.sampleLocationCoordinateRange = data.sampleLocationCoordinateRange; - if (data.sampleLocationSubPixelBits !== undefined) this.sampleLocationSubPixelBits = data.sampleLocationSubPixelBits; - if (data.variableSampleLocations !== undefined) this.variableSampleLocations = data.variableSampleLocations; - } - this.sType = StructureType.PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get sampleLocationSampleCounts() { - return this.#view.getUint32(16, LE); - } - - set sampleLocationSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxSampleLocationGridSize() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - - set maxSampleLocationGridSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } - - get sampleLocationCoordinateRange() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 28, 2); - } - - set sampleLocationCoordinateRange(value: Float32Array) { - this.#data.set(new Uint8Array(value.buffer), 28); - } - - get sampleLocationSubPixelBits() { - return this.#view.getUint32(36, LE); - } - - set sampleLocationSubPixelBits(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get variableSampleLocations() { - return this.#view.getUint32(40, LE); - } - - set variableSampleLocations(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } -} - -export interface InitMultisamplePropertiesEXT { - pNext?: AnyPointer; - maxSampleLocationGridSize?: Extent2D; -} - -export class MultisamplePropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMultisamplePropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMultisamplePropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MultisamplePropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultisamplePropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MultisamplePropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MultisamplePropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxSampleLocationGridSize !== undefined) this.maxSampleLocationGridSize = data.maxSampleLocationGridSize; - } - this.sType = StructureType.MULTISAMPLE_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxSampleLocationGridSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - - set maxSampleLocationGridSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitSamplerReductionModeCreateInfo { - pNext?: AnyPointer; - reductionMode?: SamplerReductionMode; -} - -export class SamplerReductionModeCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSamplerReductionModeCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerReductionModeCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SamplerReductionModeCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerReductionModeCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerReductionModeCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SamplerReductionModeCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.reductionMode !== undefined) this.reductionMode = data.reductionMode; - } - this.sType = StructureType.SAMPLER_REDUCTION_MODE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get reductionMode() { - return this.#view.getUint32(16, LE); - } - - set reductionMode(value: SamplerReductionMode) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceBlendOperationAdvancedFeaturesEXT { - pNext?: AnyPointer; - advancedBlendCoherentOperations?: Bool32; -} - -export class PhysicalDeviceBlendOperationAdvancedFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceBlendOperationAdvancedFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBlendOperationAdvancedFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.advancedBlendCoherentOperations !== undefined) this.advancedBlendCoherentOperations = data.advancedBlendCoherentOperations; - } - this.sType = StructureType.PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get advancedBlendCoherentOperations() { - return this.#view.getUint32(16, LE); - } - - set advancedBlendCoherentOperations(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMultiDrawFeaturesEXT { - pNext?: AnyPointer; - multiDraw?: Bool32; -} - -export class PhysicalDeviceMultiDrawFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMultiDrawFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultiDrawFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMultiDrawFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultiDrawFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultiDrawFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMultiDrawFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.multiDraw !== undefined) this.multiDraw = data.multiDraw; - } - this.sType = StructureType.PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get multiDraw() { - return this.#view.getUint32(16, LE); - } - - set multiDraw(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceBlendOperationAdvancedPropertiesEXT { - pNext?: AnyPointer; - advancedBlendMaxColorAttachments?: number; - advancedBlendIndependentBlend?: Bool32; - advancedBlendNonPremultipliedSrcColor?: Bool32; - advancedBlendNonPremultipliedDstColor?: Bool32; - advancedBlendCorrelatedOverlap?: Bool32; - advancedBlendAllOperations?: Bool32; -} - -export class PhysicalDeviceBlendOperationAdvancedPropertiesEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceBlendOperationAdvancedPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBlendOperationAdvancedPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceBlendOperationAdvancedPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.advancedBlendMaxColorAttachments !== undefined) this.advancedBlendMaxColorAttachments = data.advancedBlendMaxColorAttachments; - if (data.advancedBlendIndependentBlend !== undefined) this.advancedBlendIndependentBlend = data.advancedBlendIndependentBlend; - if (data.advancedBlendNonPremultipliedSrcColor !== undefined) this.advancedBlendNonPremultipliedSrcColor = data.advancedBlendNonPremultipliedSrcColor; - if (data.advancedBlendNonPremultipliedDstColor !== undefined) this.advancedBlendNonPremultipliedDstColor = data.advancedBlendNonPremultipliedDstColor; - if (data.advancedBlendCorrelatedOverlap !== undefined) this.advancedBlendCorrelatedOverlap = data.advancedBlendCorrelatedOverlap; - if (data.advancedBlendAllOperations !== undefined) this.advancedBlendAllOperations = data.advancedBlendAllOperations; - } - this.sType = StructureType.PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get advancedBlendMaxColorAttachments() { - return this.#view.getUint32(16, LE); - } - - set advancedBlendMaxColorAttachments(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get advancedBlendIndependentBlend() { - return this.#view.getUint32(20, LE); - } - - set advancedBlendIndependentBlend(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get advancedBlendNonPremultipliedSrcColor() { - return this.#view.getUint32(24, LE); - } - - set advancedBlendNonPremultipliedSrcColor(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get advancedBlendNonPremultipliedDstColor() { - return this.#view.getUint32(28, LE); - } - - set advancedBlendNonPremultipliedDstColor(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get advancedBlendCorrelatedOverlap() { - return this.#view.getUint32(32, LE); - } - - set advancedBlendCorrelatedOverlap(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get advancedBlendAllOperations() { - return this.#view.getUint32(36, LE); - } - - set advancedBlendAllOperations(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } -} - -export interface InitPipelineColorBlendAdvancedStateCreateInfoEXT { - pNext?: AnyPointer; - srcPremultiplied?: Bool32; - dstPremultiplied?: Bool32; - blendOverlap?: BlendOverlapEXT; -} - -export class PipelineColorBlendAdvancedStateCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineColorBlendAdvancedStateCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineColorBlendAdvancedStateCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineColorBlendAdvancedStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorBlendAdvancedStateCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineColorBlendAdvancedStateCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineColorBlendAdvancedStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcPremultiplied !== undefined) this.srcPremultiplied = data.srcPremultiplied; - if (data.dstPremultiplied !== undefined) this.dstPremultiplied = data.dstPremultiplied; - if (data.blendOverlap !== undefined) this.blendOverlap = data.blendOverlap; - } - this.sType = StructureType.PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcPremultiplied() { - return this.#view.getUint32(16, LE); - } - - set srcPremultiplied(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get dstPremultiplied() { - return this.#view.getUint32(20, LE); - } - - set dstPremultiplied(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get blendOverlap() { - return this.#view.getUint32(24, LE); - } - - set blendOverlap(value: BlendOverlapEXT) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceInlineUniformBlockFeatures { - pNext?: AnyPointer; - inlineUniformBlock?: Bool32; - descriptorBindingInlineUniformBlockUpdateAfterBind?: Bool32; -} - -export class PhysicalDeviceInlineUniformBlockFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceInlineUniformBlockFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceInlineUniformBlockFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInlineUniformBlockFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceInlineUniformBlockFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.inlineUniformBlock !== undefined) this.inlineUniformBlock = data.inlineUniformBlock; - if (data.descriptorBindingInlineUniformBlockUpdateAfterBind !== undefined) this.descriptorBindingInlineUniformBlockUpdateAfterBind = data.descriptorBindingInlineUniformBlockUpdateAfterBind; - } - this.sType = StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get inlineUniformBlock() { - return this.#view.getUint32(16, LE); - } - - set inlineUniformBlock(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get descriptorBindingInlineUniformBlockUpdateAfterBind() { - return this.#view.getUint32(20, LE); - } - - set descriptorBindingInlineUniformBlockUpdateAfterBind(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceInlineUniformBlockProperties { - pNext?: AnyPointer; - maxInlineUniformBlockSize?: number; - maxPerStageDescriptorInlineUniformBlocks?: number; - maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks?: number; - maxDescriptorSetInlineUniformBlocks?: number; - maxDescriptorSetUpdateAfterBindInlineUniformBlocks?: number; -} - -export class PhysicalDeviceInlineUniformBlockProperties implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceInlineUniformBlockProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceInlineUniformBlockProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInlineUniformBlockProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceInlineUniformBlockProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceInlineUniformBlockProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxInlineUniformBlockSize !== undefined) this.maxInlineUniformBlockSize = data.maxInlineUniformBlockSize; - if (data.maxPerStageDescriptorInlineUniformBlocks !== undefined) this.maxPerStageDescriptorInlineUniformBlocks = data.maxPerStageDescriptorInlineUniformBlocks; - if (data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks !== undefined) this.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; - if (data.maxDescriptorSetInlineUniformBlocks !== undefined) this.maxDescriptorSetInlineUniformBlocks = data.maxDescriptorSetInlineUniformBlocks; - if (data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks !== undefined) this.maxDescriptorSetUpdateAfterBindInlineUniformBlocks = data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks; - } - this.sType = StructureType.PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxInlineUniformBlockSize() { - return this.#view.getUint32(16, LE); - } - - set maxInlineUniformBlockSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxPerStageDescriptorInlineUniformBlocks() { - return this.#view.getUint32(20, LE); - } - - set maxPerStageDescriptorInlineUniformBlocks(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks() { - return this.#view.getUint32(24, LE); - } - - set maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get maxDescriptorSetInlineUniformBlocks() { - return this.#view.getUint32(28, LE); - } - - set maxDescriptorSetInlineUniformBlocks(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindInlineUniformBlocks() { - return this.#view.getUint32(32, LE); - } - - set maxDescriptorSetUpdateAfterBindInlineUniformBlocks(value: number) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitWriteDescriptorSetInlineUniformBlock { - pNext?: AnyPointer; - dataSize?: number; - pData?: AnyPointer; -} - -export class WriteDescriptorSetInlineUniformBlock implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitWriteDescriptorSetInlineUniformBlock); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitWriteDescriptorSetInlineUniformBlock) { - if (data === undefined) { - this.#data = new Uint8Array(WriteDescriptorSetInlineUniformBlock.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSetInlineUniformBlock.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < WriteDescriptorSetInlineUniformBlock.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(WriteDescriptorSetInlineUniformBlock.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.dataSize !== undefined) this.dataSize = data.dataSize; - if (data.pData !== undefined) this.pData = data.pData; - } - this.sType = StructureType.WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dataSize() { - return this.#view.getUint32(16, LE); - } - - set dataSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pData() { - return this.#view.getBigUint64(24, LE); - } - - set pData(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDescriptorPoolInlineUniformBlockCreateInfo { - pNext?: AnyPointer; - maxInlineUniformBlockBindings?: number; -} - -export class DescriptorPoolInlineUniformBlockCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorPoolInlineUniformBlockCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorPoolInlineUniformBlockCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorPoolInlineUniformBlockCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorPoolInlineUniformBlockCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorPoolInlineUniformBlockCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorPoolInlineUniformBlockCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxInlineUniformBlockBindings !== undefined) this.maxInlineUniformBlockBindings = data.maxInlineUniformBlockBindings; - } - this.sType = StructureType.DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxInlineUniformBlockBindings() { - return this.#view.getUint32(16, LE); - } - - set maxInlineUniformBlockBindings(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineCoverageModulationStateCreateInfoNV { - pNext?: AnyPointer; - flags?: PipelineCoverageModulationStateCreateFlagsNV; - coverageModulationMode?: CoverageModulationModeNV; - coverageModulationTableEnable?: Bool32; - coverageModulationTableCount?: number; - pCoverageModulationTable?: AnyPointer; -} - -export class PipelineCoverageModulationStateCreateInfoNV implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineCoverageModulationStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCoverageModulationStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineCoverageModulationStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCoverageModulationStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCoverageModulationStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineCoverageModulationStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.coverageModulationMode !== undefined) this.coverageModulationMode = data.coverageModulationMode; - if (data.coverageModulationTableEnable !== undefined) this.coverageModulationTableEnable = data.coverageModulationTableEnable; - if (data.coverageModulationTableCount !== undefined) this.coverageModulationTableCount = data.coverageModulationTableCount; - if (data.pCoverageModulationTable !== undefined) this.pCoverageModulationTable = data.pCoverageModulationTable; - } - this.sType = StructureType.PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineCoverageModulationStateCreateFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get coverageModulationMode() { - return this.#view.getUint32(20, LE); - } - - set coverageModulationMode(value: CoverageModulationModeNV) { - this.#view.setUint32(20, Number(value), LE); - } - - get coverageModulationTableEnable() { - return this.#view.getUint32(24, LE); - } - - set coverageModulationTableEnable(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get coverageModulationTableCount() { - return this.#view.getUint32(28, LE); - } - - set coverageModulationTableCount(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get pCoverageModulationTable() { - return this.#view.getBigUint64(32, LE); - } - - set pCoverageModulationTable(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageFormatListCreateInfo { - pNext?: AnyPointer; - viewFormatCount?: number; - pViewFormats?: AnyPointer; -} - -export class ImageFormatListCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageFormatListCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageFormatListCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ImageFormatListCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatListCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageFormatListCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageFormatListCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.viewFormatCount !== undefined) this.viewFormatCount = data.viewFormatCount; - if (data.pViewFormats !== undefined) this.pViewFormats = data.pViewFormats; - } - this.sType = StructureType.IMAGE_FORMAT_LIST_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get viewFormatCount() { - return this.#view.getUint32(16, LE); - } - - set viewFormatCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pViewFormats() { - return this.#view.getBigUint64(24, LE); - } - - set pViewFormats(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitValidationCacheCreateInfoEXT { - pNext?: AnyPointer; - flags?: ValidationCacheCreateFlagsEXT; - initialDataSize?: Deno.PointerValue; - pInitialData?: AnyPointer; -} - -export class ValidationCacheCreateInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitValidationCacheCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitValidationCacheCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ValidationCacheCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ValidationCacheCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ValidationCacheCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ValidationCacheCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.initialDataSize !== undefined) this.initialDataSize = data.initialDataSize; - if (data.pInitialData !== undefined) this.pInitialData = data.pInitialData; - } - this.sType = StructureType.VALIDATION_CACHE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: ValidationCacheCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get initialDataSize() { - return this.#view.getBigUint64(24, LE); - } - - set initialDataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get pInitialData() { - return this.#view.getBigUint64(32, LE); - } - - set pInitialData(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitShaderModuleValidationCacheCreateInfoEXT { - pNext?: AnyPointer; - validationCache?: ValidationCacheEXT; -} - -export class ShaderModuleValidationCacheCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitShaderModuleValidationCacheCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitShaderModuleValidationCacheCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ShaderModuleValidationCacheCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderModuleValidationCacheCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderModuleValidationCacheCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ShaderModuleValidationCacheCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.validationCache !== undefined) this.validationCache = data.validationCache; - } - this.sType = StructureType.SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get validationCache() { - return this.#view.getBigUint64(16, LE); - } - - set validationCache(value: ValidationCacheEXT) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceMaintenance3Properties { - pNext?: AnyPointer; - maxPerSetDescriptors?: number; - maxMemoryAllocationSize?: DeviceSize; -} - -export class PhysicalDeviceMaintenance3Properties implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMaintenance3Properties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMaintenance3Properties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMaintenance3Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMaintenance3Properties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMaintenance3Properties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMaintenance3Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxPerSetDescriptors !== undefined) this.maxPerSetDescriptors = data.maxPerSetDescriptors; - if (data.maxMemoryAllocationSize !== undefined) this.maxMemoryAllocationSize = data.maxMemoryAllocationSize; - } - this.sType = StructureType.PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxPerSetDescriptors() { - return this.#view.getUint32(16, LE); - } - - set maxPerSetDescriptors(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxMemoryAllocationSize() { - return this.#view.getBigUint64(24, LE); - } - - set maxMemoryAllocationSize(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceMaintenance4Features { - pNext?: AnyPointer; - maintenance4?: Bool32; -} - -export class PhysicalDeviceMaintenance4Features implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMaintenance4Features); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMaintenance4Features) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMaintenance4Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMaintenance4Features.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMaintenance4Features.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMaintenance4Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maintenance4 !== undefined) this.maintenance4 = data.maintenance4; - } - this.sType = StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maintenance4() { - return this.#view.getUint32(16, LE); - } - - set maintenance4(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMaintenance4Properties { - pNext?: AnyPointer; - maxBufferSize?: DeviceSize; -} - -export class PhysicalDeviceMaintenance4Properties implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMaintenance4Properties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMaintenance4Properties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMaintenance4Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMaintenance4Properties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMaintenance4Properties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMaintenance4Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxBufferSize !== undefined) this.maxBufferSize = data.maxBufferSize; - } - this.sType = StructureType.PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxBufferSize() { - return this.#view.getBigUint64(16, LE); - } - - set maxBufferSize(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitDescriptorSetLayoutSupport { - pNext?: AnyPointer; - supported?: Bool32; -} - -export class DescriptorSetLayoutSupport implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorSetLayoutSupport); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutSupport) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorSetLayoutSupport.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutSupport.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutSupport.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorSetLayoutSupport.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.supported !== undefined) this.supported = data.supported; - } - this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_SUPPORT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get supported() { - return this.#view.getUint32(16, LE); - } - - set supported(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderDrawParametersFeatures { - pNext?: AnyPointer; - shaderDrawParameters?: Bool32; -} - -export class PhysicalDeviceShaderDrawParametersFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderDrawParametersFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderDrawParametersFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderDrawParametersFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderDrawParametersFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderDrawParametersFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderDrawParametersFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderDrawParameters !== undefined) this.shaderDrawParameters = data.shaderDrawParameters; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderDrawParameters() { - return this.#view.getUint32(16, LE); - } - - set shaderDrawParameters(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderFloat16Int8Features { - pNext?: AnyPointer; - shaderFloat16?: Bool32; - shaderInt8?: Bool32; -} - -export class PhysicalDeviceShaderFloat16Int8Features implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderFloat16Int8Features); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderFloat16Int8Features) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderFloat16Int8Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderFloat16Int8Features.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderFloat16Int8Features.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderFloat16Int8Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderFloat16 !== undefined) this.shaderFloat16 = data.shaderFloat16; - if (data.shaderInt8 !== undefined) this.shaderInt8 = data.shaderInt8; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderFloat16() { - return this.#view.getUint32(16, LE); - } - - set shaderFloat16(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get shaderInt8() { - return this.#view.getUint32(20, LE); - } - - set shaderInt8(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFloatControlsProperties { - pNext?: AnyPointer; - denormBehaviorIndependence?: ShaderFloatControlsIndependence; - roundingModeIndependence?: ShaderFloatControlsIndependence; - shaderSignedZeroInfNanPreserveFloat16?: Bool32; - shaderSignedZeroInfNanPreserveFloat32?: Bool32; - shaderSignedZeroInfNanPreserveFloat64?: Bool32; - shaderDenormPreserveFloat16?: Bool32; - shaderDenormPreserveFloat32?: Bool32; - shaderDenormPreserveFloat64?: Bool32; - shaderDenormFlushToZeroFloat16?: Bool32; - shaderDenormFlushToZeroFloat32?: Bool32; - shaderDenormFlushToZeroFloat64?: Bool32; - shaderRoundingModeRTEFloat16?: Bool32; - shaderRoundingModeRTEFloat32?: Bool32; - shaderRoundingModeRTEFloat64?: Bool32; - shaderRoundingModeRTZFloat16?: Bool32; - shaderRoundingModeRTZFloat32?: Bool32; - shaderRoundingModeRTZFloat64?: Bool32; -} - -export class PhysicalDeviceFloatControlsProperties implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFloatControlsProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFloatControlsProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFloatControlsProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFloatControlsProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFloatControlsProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFloatControlsProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.denormBehaviorIndependence !== undefined) this.denormBehaviorIndependence = data.denormBehaviorIndependence; - if (data.roundingModeIndependence !== undefined) this.roundingModeIndependence = data.roundingModeIndependence; - if (data.shaderSignedZeroInfNanPreserveFloat16 !== undefined) this.shaderSignedZeroInfNanPreserveFloat16 = data.shaderSignedZeroInfNanPreserveFloat16; - if (data.shaderSignedZeroInfNanPreserveFloat32 !== undefined) this.shaderSignedZeroInfNanPreserveFloat32 = data.shaderSignedZeroInfNanPreserveFloat32; - if (data.shaderSignedZeroInfNanPreserveFloat64 !== undefined) this.shaderSignedZeroInfNanPreserveFloat64 = data.shaderSignedZeroInfNanPreserveFloat64; - if (data.shaderDenormPreserveFloat16 !== undefined) this.shaderDenormPreserveFloat16 = data.shaderDenormPreserveFloat16; - if (data.shaderDenormPreserveFloat32 !== undefined) this.shaderDenormPreserveFloat32 = data.shaderDenormPreserveFloat32; - if (data.shaderDenormPreserveFloat64 !== undefined) this.shaderDenormPreserveFloat64 = data.shaderDenormPreserveFloat64; - if (data.shaderDenormFlushToZeroFloat16 !== undefined) this.shaderDenormFlushToZeroFloat16 = data.shaderDenormFlushToZeroFloat16; - if (data.shaderDenormFlushToZeroFloat32 !== undefined) this.shaderDenormFlushToZeroFloat32 = data.shaderDenormFlushToZeroFloat32; - if (data.shaderDenormFlushToZeroFloat64 !== undefined) this.shaderDenormFlushToZeroFloat64 = data.shaderDenormFlushToZeroFloat64; - if (data.shaderRoundingModeRTEFloat16 !== undefined) this.shaderRoundingModeRTEFloat16 = data.shaderRoundingModeRTEFloat16; - if (data.shaderRoundingModeRTEFloat32 !== undefined) this.shaderRoundingModeRTEFloat32 = data.shaderRoundingModeRTEFloat32; - if (data.shaderRoundingModeRTEFloat64 !== undefined) this.shaderRoundingModeRTEFloat64 = data.shaderRoundingModeRTEFloat64; - if (data.shaderRoundingModeRTZFloat16 !== undefined) this.shaderRoundingModeRTZFloat16 = data.shaderRoundingModeRTZFloat16; - if (data.shaderRoundingModeRTZFloat32 !== undefined) this.shaderRoundingModeRTZFloat32 = data.shaderRoundingModeRTZFloat32; - if (data.shaderRoundingModeRTZFloat64 !== undefined) this.shaderRoundingModeRTZFloat64 = data.shaderRoundingModeRTZFloat64; - } - this.sType = StructureType.PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get denormBehaviorIndependence() { - return this.#view.getUint32(16, LE); - } - - set denormBehaviorIndependence(value: ShaderFloatControlsIndependence) { - this.#view.setUint32(16, Number(value), LE); - } - - get roundingModeIndependence() { - return this.#view.getUint32(20, LE); - } - - set roundingModeIndependence(value: ShaderFloatControlsIndependence) { - this.#view.setUint32(20, Number(value), LE); - } - - get shaderSignedZeroInfNanPreserveFloat16() { - return this.#view.getUint32(24, LE); - } - - set shaderSignedZeroInfNanPreserveFloat16(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get shaderSignedZeroInfNanPreserveFloat32() { - return this.#view.getUint32(28, LE); - } - - set shaderSignedZeroInfNanPreserveFloat32(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get shaderSignedZeroInfNanPreserveFloat64() { - return this.#view.getUint32(32, LE); - } - - set shaderSignedZeroInfNanPreserveFloat64(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get shaderDenormPreserveFloat16() { - return this.#view.getUint32(36, LE); - } - - set shaderDenormPreserveFloat16(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get shaderDenormPreserveFloat32() { - return this.#view.getUint32(40, LE); - } - - set shaderDenormPreserveFloat32(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get shaderDenormPreserveFloat64() { - return this.#view.getUint32(44, LE); - } - - set shaderDenormPreserveFloat64(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get shaderDenormFlushToZeroFloat16() { - return this.#view.getUint32(48, LE); - } - - set shaderDenormFlushToZeroFloat16(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get shaderDenormFlushToZeroFloat32() { - return this.#view.getUint32(52, LE); - } - - set shaderDenormFlushToZeroFloat32(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get shaderDenormFlushToZeroFloat64() { - return this.#view.getUint32(56, LE); - } - - set shaderDenormFlushToZeroFloat64(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get shaderRoundingModeRTEFloat16() { - return this.#view.getUint32(60, LE); - } - - set shaderRoundingModeRTEFloat16(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get shaderRoundingModeRTEFloat32() { - return this.#view.getUint32(64, LE); - } - - set shaderRoundingModeRTEFloat32(value: Bool32) { - this.#view.setUint32(64, Number(value), LE); - } - - get shaderRoundingModeRTEFloat64() { - return this.#view.getUint32(68, LE); - } - - set shaderRoundingModeRTEFloat64(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get shaderRoundingModeRTZFloat16() { - return this.#view.getUint32(72, LE); - } - - set shaderRoundingModeRTZFloat16(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } - - get shaderRoundingModeRTZFloat32() { - return this.#view.getUint32(76, LE); - } - - set shaderRoundingModeRTZFloat32(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } - - get shaderRoundingModeRTZFloat64() { - return this.#view.getUint32(80, LE); - } - - set shaderRoundingModeRTZFloat64(value: Bool32) { - this.#view.setUint32(80, Number(value), LE); - } -} - -export interface InitPhysicalDeviceHostQueryResetFeatures { - pNext?: AnyPointer; - hostQueryReset?: Bool32; -} - -export class PhysicalDeviceHostQueryResetFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceHostQueryResetFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceHostQueryResetFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceHostQueryResetFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceHostQueryResetFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceHostQueryResetFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceHostQueryResetFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.hostQueryReset !== undefined) this.hostQueryReset = data.hostQueryReset; - } - this.sType = StructureType.PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get hostQueryReset() { - return this.#view.getUint32(16, LE); - } - - set hostQueryReset(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitNativeBufferUsage2ANDROID { - consumer?: Deno.PointerValue; - producer?: Deno.PointerValue; -} - -export class NativeBufferUsage2ANDROID implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitNativeBufferUsage2ANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitNativeBufferUsage2ANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(NativeBufferUsage2ANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, NativeBufferUsage2ANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < NativeBufferUsage2ANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(NativeBufferUsage2ANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.consumer !== undefined) this.consumer = data.consumer; - if (data.producer !== undefined) this.producer = data.producer; - } - } - - get consumer() { - return this.#view.getBigUint64(0, LE); - } - - set consumer(value: Deno.PointerValue) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get producer() { - return this.#view.getBigUint64(8, LE); - } - - set producer(value: Deno.PointerValue) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} - -export interface InitNativeBufferANDROID { - pNext?: AnyPointer; - handle?: AnyPointer; - stride?: number; - format?: number; - usage?: number; - usage2?: NativeBufferUsage2ANDROID; -} - -export class NativeBufferANDROID implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitNativeBufferANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitNativeBufferANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(NativeBufferANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, NativeBufferANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < NativeBufferANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(NativeBufferANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handle !== undefined) this.handle = data.handle; - if (data.stride !== undefined) this.stride = data.stride; - if (data.format !== undefined) this.format = data.format; - if (data.usage !== undefined) this.usage = data.usage; - if (data.usage2 !== undefined) this.usage2 = data.usage2; - } - this.sType = StructureType.NATIVE_BUFFER_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handle() { - return this.#view.getBigUint64(16, LE); - } - - set handle(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get stride() { - return this.#view.getInt32(24, LE); - } - - set stride(value: number) { - this.#view.setInt32(24, Number(value), LE); - } - - get format() { - return this.#view.getInt32(28, LE); - } - - set format(value: number) { - this.#view.setInt32(28, Number(value), LE); - } - - get usage() { - return this.#view.getInt32(32, LE); - } - - set usage(value: number) { - this.#view.setInt32(32, Number(value), LE); - } - - get usage2() { - return new NativeBufferUsage2ANDROID(this.#data.subarray(40, 40 + NativeBufferUsage2ANDROID.size)); - } - - set usage2(value: NativeBufferUsage2ANDROID) { - if (value[BUFFER].byteLength < NativeBufferUsage2ANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } -} - -export interface InitSwapchainImageCreateInfoANDROID { - pNext?: AnyPointer; - usage?: SwapchainImageUsageFlagsANDROID; -} - -export class SwapchainImageCreateInfoANDROID implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSwapchainImageCreateInfoANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainImageCreateInfoANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(SwapchainImageCreateInfoANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainImageCreateInfoANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainImageCreateInfoANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SwapchainImageCreateInfoANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.usage !== undefined) this.usage = data.usage; - } - this.sType = StructureType.SWAPCHAIN_IMAGE_CREATE_INFO_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get usage() { - return this.#view.getUint32(16, LE); - } - - set usage(value: SwapchainImageUsageFlagsANDROID) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevicePresentationPropertiesANDROID { - pNext?: AnyPointer; - sharedImage?: Bool32; -} - -export class PhysicalDevicePresentationPropertiesANDROID implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePresentationPropertiesANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePresentationPropertiesANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePresentationPropertiesANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentationPropertiesANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePresentationPropertiesANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePresentationPropertiesANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.sharedImage !== undefined) this.sharedImage = data.sharedImage; - } - this.sType = StructureType.PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get sharedImage() { - return this.#view.getUint32(16, LE); - } - - set sharedImage(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitShaderResourceUsageAMD { - numUsedVgprs?: number; - numUsedSgprs?: number; - ldsSizePerLocalWorkGroup?: number; - ldsUsageSizeInBytes?: Deno.PointerValue; - scratchMemUsageInBytes?: Deno.PointerValue; -} - -export class ShaderResourceUsageAMD implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitShaderResourceUsageAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitShaderResourceUsageAMD) { - if (data === undefined) { - this.#data = new Uint8Array(ShaderResourceUsageAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderResourceUsageAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderResourceUsageAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ShaderResourceUsageAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.numUsedVgprs !== undefined) this.numUsedVgprs = data.numUsedVgprs; - if (data.numUsedSgprs !== undefined) this.numUsedSgprs = data.numUsedSgprs; - if (data.ldsSizePerLocalWorkGroup !== undefined) this.ldsSizePerLocalWorkGroup = data.ldsSizePerLocalWorkGroup; - if (data.ldsUsageSizeInBytes !== undefined) this.ldsUsageSizeInBytes = data.ldsUsageSizeInBytes; - if (data.scratchMemUsageInBytes !== undefined) this.scratchMemUsageInBytes = data.scratchMemUsageInBytes; - } - } - - get numUsedVgprs() { - return this.#view.getUint32(0, LE); - } - - set numUsedVgprs(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get numUsedSgprs() { - return this.#view.getUint32(4, LE); - } - - set numUsedSgprs(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get ldsSizePerLocalWorkGroup() { - return this.#view.getUint32(8, LE); - } - - set ldsSizePerLocalWorkGroup(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get ldsUsageSizeInBytes() { - return this.#view.getBigUint64(16, LE); - } - - set ldsUsageSizeInBytes(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get scratchMemUsageInBytes() { - return this.#view.getBigUint64(24, LE); - } - - set scratchMemUsageInBytes(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitShaderStatisticsInfoAMD { - shaderStageMask?: ShaderStageFlags; - resourceUsage?: ShaderResourceUsageAMD; - numPhysicalVgprs?: number; - numPhysicalSgprs?: number; - numAvailableVgprs?: number; - numAvailableSgprs?: number; - computeWorkGroupSize?: Uint32Array; -} - -export class ShaderStatisticsInfoAMD implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitShaderStatisticsInfoAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitShaderStatisticsInfoAMD) { - if (data === undefined) { - this.#data = new Uint8Array(ShaderStatisticsInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderStatisticsInfoAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderStatisticsInfoAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ShaderStatisticsInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.shaderStageMask !== undefined) this.shaderStageMask = data.shaderStageMask; - if (data.resourceUsage !== undefined) this.resourceUsage = data.resourceUsage; - if (data.numPhysicalVgprs !== undefined) this.numPhysicalVgprs = data.numPhysicalVgprs; - if (data.numPhysicalSgprs !== undefined) this.numPhysicalSgprs = data.numPhysicalSgprs; - if (data.numAvailableVgprs !== undefined) this.numAvailableVgprs = data.numAvailableVgprs; - if (data.numAvailableSgprs !== undefined) this.numAvailableSgprs = data.numAvailableSgprs; - if (data.computeWorkGroupSize !== undefined) this.computeWorkGroupSize = data.computeWorkGroupSize; - } - } - - get shaderStageMask() { - return this.#view.getUint32(0, LE); - } - - set shaderStageMask(value: ShaderStageFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get resourceUsage() { - return new ShaderResourceUsageAMD(this.#data.subarray(4, 4 + ShaderResourceUsageAMD.size)); - } - - set resourceUsage(value: ShaderResourceUsageAMD) { - if (value[BUFFER].byteLength < ShaderResourceUsageAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 4); - } - - get numPhysicalVgprs() { - return this.#view.getUint32(36, LE); - } - - set numPhysicalVgprs(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get numPhysicalSgprs() { - return this.#view.getUint32(40, LE); - } - - set numPhysicalSgprs(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get numAvailableVgprs() { - return this.#view.getUint32(44, LE); - } - - set numAvailableVgprs(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get numAvailableSgprs() { - return this.#view.getUint32(48, LE); - } - - set numAvailableSgprs(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get computeWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 52, 3); - } - - set computeWorkGroupSize(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 52); - } -} - -export interface InitDeviceQueueGlobalPriorityCreateInfoKHR { - pNext?: AnyPointer; - globalPriority?: QueueGlobalPriorityKHR; -} - -export class DeviceQueueGlobalPriorityCreateInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceQueueGlobalPriorityCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceQueueGlobalPriorityCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceQueueGlobalPriorityCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceQueueGlobalPriorityCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceQueueGlobalPriorityCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceQueueGlobalPriorityCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.globalPriority !== undefined) this.globalPriority = data.globalPriority; - } - this.sType = StructureType.DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get globalPriority() { - return this.#view.getUint32(16, LE); - } - - set globalPriority(value: QueueGlobalPriorityKHR) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceGlobalPriorityQueryFeaturesKHR { - pNext?: AnyPointer; - globalPriorityQuery?: Bool32; -} - -export class PhysicalDeviceGlobalPriorityQueryFeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceGlobalPriorityQueryFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceGlobalPriorityQueryFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceGlobalPriorityQueryFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.globalPriorityQuery !== undefined) this.globalPriorityQuery = data.globalPriorityQuery; - } - this.sType = StructureType.PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get globalPriorityQuery() { - return this.#view.getUint32(16, LE); - } - - set globalPriorityQuery(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitQueueFamilyGlobalPriorityPropertiesKHR { - pNext?: AnyPointer; - priorityCount?: number; - priorities?: Uint32Array; -} - -export class QueueFamilyGlobalPriorityPropertiesKHR implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueueFamilyGlobalPriorityPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyGlobalPriorityPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(QueueFamilyGlobalPriorityPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyGlobalPriorityPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyGlobalPriorityPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueueFamilyGlobalPriorityPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.priorityCount !== undefined) this.priorityCount = data.priorityCount; - if (data.priorities !== undefined) this.priorities = data.priorities; - } - this.sType = StructureType.QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get priorityCount() { - return this.#view.getUint32(16, LE); - } - - set priorityCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get priorities() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 20, 16); - } - - set priorities(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } -} - -export interface InitDebugUtilsObjectNameInfoEXT { - pNext?: AnyPointer; - objectType?: ObjectType; - objectHandle?: Deno.PointerValue; - pObjectName?: AnyPointer; -} - -export class DebugUtilsObjectNameInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDebugUtilsObjectNameInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsObjectNameInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DebugUtilsObjectNameInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsObjectNameInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsObjectNameInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DebugUtilsObjectNameInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.objectType !== undefined) this.objectType = data.objectType; - if (data.objectHandle !== undefined) this.objectHandle = data.objectHandle; - if (data.pObjectName !== undefined) this.pObjectName = data.pObjectName; - } - this.sType = StructureType.DEBUG_UTILS_OBJECT_NAME_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get objectType() { - return this.#view.getUint32(16, LE); - } - - set objectType(value: ObjectType) { - this.#view.setUint32(16, Number(value), LE); - } - - get objectHandle() { - return this.#view.getBigUint64(24, LE); - } - - set objectHandle(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get pObjectName() { - return this.#view.getBigUint64(32, LE); - } - - set pObjectName(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDebugUtilsObjectTagInfoEXT { - pNext?: AnyPointer; - objectType?: ObjectType; - objectHandle?: Deno.PointerValue; - tagName?: Deno.PointerValue; - tagSize?: Deno.PointerValue; - pTag?: AnyPointer; -} - -export class DebugUtilsObjectTagInfoEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDebugUtilsObjectTagInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsObjectTagInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DebugUtilsObjectTagInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsObjectTagInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsObjectTagInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DebugUtilsObjectTagInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.objectType !== undefined) this.objectType = data.objectType; - if (data.objectHandle !== undefined) this.objectHandle = data.objectHandle; - if (data.tagName !== undefined) this.tagName = data.tagName; - if (data.tagSize !== undefined) this.tagSize = data.tagSize; - if (data.pTag !== undefined) this.pTag = data.pTag; - } - this.sType = StructureType.DEBUG_UTILS_OBJECT_TAG_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get objectType() { - return this.#view.getUint32(16, LE); - } - - set objectType(value: ObjectType) { - this.#view.setUint32(16, Number(value), LE); - } - - get objectHandle() { - return this.#view.getBigUint64(24, LE); - } - - set objectHandle(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get tagName() { - return this.#view.getBigUint64(32, LE); - } - - set tagName(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get tagSize() { - return this.#view.getBigUint64(40, LE); - } - - set tagSize(value: Deno.PointerValue) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get pTag() { - return this.#view.getBigUint64(48, LE); - } - - set pTag(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDebugUtilsLabelEXT { - pNext?: AnyPointer; - pLabelName?: AnyPointer; - color?: Float32Array; -} - -export class DebugUtilsLabelEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDebugUtilsLabelEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsLabelEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DebugUtilsLabelEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsLabelEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsLabelEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DebugUtilsLabelEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pLabelName !== undefined) this.pLabelName = data.pLabelName; - if (data.color !== undefined) this.color = data.color; - } - this.sType = StructureType.DEBUG_UTILS_LABEL_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pLabelName() { - return this.#view.getBigUint64(16, LE); - } - - set pLabelName(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get color() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 24, 4); - } - - set color(value: Float32Array) { - this.#data.set(new Uint8Array(value.buffer), 24); - } -} - -export interface InitDebugUtilsMessengerCreateInfoEXT { - pNext?: AnyPointer; - flags?: DebugUtilsMessengerCreateFlagsEXT; - messageSeverity?: DebugUtilsMessageSeverityFlagsEXT; - messageType?: DebugUtilsMessageTypeFlagsEXT; - pfnUserCallback?: Deno.PointerValue; - pUserData?: AnyPointer; -} - -export class DebugUtilsMessengerCreateInfoEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDebugUtilsMessengerCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsMessengerCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DebugUtilsMessengerCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsMessengerCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsMessengerCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DebugUtilsMessengerCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.messageSeverity !== undefined) this.messageSeverity = data.messageSeverity; - if (data.messageType !== undefined) this.messageType = data.messageType; - if (data.pfnUserCallback !== undefined) this.pfnUserCallback = data.pfnUserCallback; - if (data.pUserData !== undefined) this.pUserData = data.pUserData; - } - this.sType = StructureType.DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DebugUtilsMessengerCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get messageSeverity() { - return this.#view.getUint32(20, LE); - } - - set messageSeverity(value: DebugUtilsMessageSeverityFlagsEXT) { - this.#view.setUint32(20, Number(value), LE); - } - - get messageType() { - return this.#view.getUint32(24, LE); - } - - set messageType(value: DebugUtilsMessageTypeFlagsEXT) { - this.#view.setUint32(24, Number(value), LE); - } - - get pfnUserCallback() { - throw new Error(`Unknown type: "function"`); - } - - set pfnUserCallback(value: Deno.PointerValue) { - throw new Error(`Unknown type: "function"`); - } - - get pUserData() { - return this.#view.getBigUint64(40, LE); - } - - set pUserData(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDebugUtilsMessengerCallbackDataEXT { - pNext?: AnyPointer; - flags?: DebugUtilsMessengerCallbackDataFlagsEXT; - pMessageIdName?: AnyPointer; - messageIdNumber?: number; - pMessage?: AnyPointer; - queueLabelCount?: number; - pQueueLabels?: AnyPointer; - cmdBufLabelCount?: number; - pCmdBufLabels?: AnyPointer; - objectCount?: number; - pObjects?: AnyPointer; -} - -export class DebugUtilsMessengerCallbackDataEXT implements BaseStruct { - static size = 96; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDebugUtilsMessengerCallbackDataEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDebugUtilsMessengerCallbackDataEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DebugUtilsMessengerCallbackDataEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DebugUtilsMessengerCallbackDataEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DebugUtilsMessengerCallbackDataEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DebugUtilsMessengerCallbackDataEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pMessageIdName !== undefined) this.pMessageIdName = data.pMessageIdName; - if (data.messageIdNumber !== undefined) this.messageIdNumber = data.messageIdNumber; - if (data.pMessage !== undefined) this.pMessage = data.pMessage; - if (data.queueLabelCount !== undefined) this.queueLabelCount = data.queueLabelCount; - if (data.pQueueLabels !== undefined) this.pQueueLabels = data.pQueueLabels; - if (data.cmdBufLabelCount !== undefined) this.cmdBufLabelCount = data.cmdBufLabelCount; - if (data.pCmdBufLabels !== undefined) this.pCmdBufLabels = data.pCmdBufLabels; - if (data.objectCount !== undefined) this.objectCount = data.objectCount; - if (data.pObjects !== undefined) this.pObjects = data.pObjects; - } - this.sType = StructureType.DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DebugUtilsMessengerCallbackDataFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get pMessageIdName() { - return this.#view.getBigUint64(24, LE); - } - - set pMessageIdName(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get messageIdNumber() { - return this.#view.getInt32(32, LE); - } - - set messageIdNumber(value: number) { - this.#view.setInt32(32, Number(value), LE); - } - - get pMessage() { - return this.#view.getBigUint64(40, LE); - } - - set pMessage(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get queueLabelCount() { - return this.#view.getUint32(48, LE); - } - - set queueLabelCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pQueueLabels() { - return this.#view.getBigUint64(56, LE); - } - - set pQueueLabels(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get cmdBufLabelCount() { - return this.#view.getUint32(64, LE); - } - - set cmdBufLabelCount(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get pCmdBufLabels() { - return this.#view.getBigUint64(72, LE); - } - - set pCmdBufLabels(value: AnyPointer) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - - get objectCount() { - return this.#view.getUint32(80, LE); - } - - set objectCount(value: number) { - this.#view.setUint32(80, Number(value), LE); - } - - get pObjects() { - return this.#view.getBigUint64(88, LE); - } - - set pObjects(value: AnyPointer) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceDeviceMemoryReportFeaturesEXT { - pNext?: AnyPointer; - deviceMemoryReport?: Bool32; -} - -export class PhysicalDeviceDeviceMemoryReportFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDeviceMemoryReportFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDeviceMemoryReportFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDeviceMemoryReportFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDeviceMemoryReportFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDeviceMemoryReportFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDeviceMemoryReportFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceMemoryReport !== undefined) this.deviceMemoryReport = data.deviceMemoryReport; - } - this.sType = StructureType.PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceMemoryReport() { - return this.#view.getUint32(16, LE); - } - - set deviceMemoryReport(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDeviceDeviceMemoryReportCreateInfoEXT { - pNext?: AnyPointer; - flags?: DeviceMemoryReportFlagsEXT; - pfnUserCallback?: Deno.PointerValue; - pUserData?: AnyPointer; -} - -export class DeviceDeviceMemoryReportCreateInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceDeviceMemoryReportCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceDeviceMemoryReportCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceDeviceMemoryReportCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceDeviceMemoryReportCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceDeviceMemoryReportCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceDeviceMemoryReportCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pfnUserCallback !== undefined) this.pfnUserCallback = data.pfnUserCallback; - if (data.pUserData !== undefined) this.pUserData = data.pUserData; - } - this.sType = StructureType.DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DeviceMemoryReportFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get pfnUserCallback() { - throw new Error(`Unknown type: "function"`); - } - - set pfnUserCallback(value: Deno.PointerValue) { - throw new Error(`Unknown type: "function"`); - } - - get pUserData() { - return this.#view.getBigUint64(32, LE); - } - - set pUserData(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDeviceMemoryReportCallbackDataEXT { - pNext?: AnyPointer; - flags?: DeviceMemoryReportFlagsEXT; - type?: DeviceMemoryReportEventTypeEXT; - memoryObjectId?: Deno.PointerValue; - size?: DeviceSize; - objectType?: ObjectType; - objectHandle?: Deno.PointerValue; - heapIndex?: number; -} - -export class DeviceMemoryReportCallbackDataEXT implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceMemoryReportCallbackDataEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceMemoryReportCallbackDataEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceMemoryReportCallbackDataEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceMemoryReportCallbackDataEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceMemoryReportCallbackDataEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceMemoryReportCallbackDataEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.type !== undefined) this.type = data.type; - if (data.memoryObjectId !== undefined) this.memoryObjectId = data.memoryObjectId; - if (data.size !== undefined) this.size = data.size; - if (data.objectType !== undefined) this.objectType = data.objectType; - if (data.objectHandle !== undefined) this.objectHandle = data.objectHandle; - if (data.heapIndex !== undefined) this.heapIndex = data.heapIndex; - } - this.sType = StructureType.DEVICE_MEMORY_REPORT_CALLBACK_DATA_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DeviceMemoryReportFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get type() { - return this.#view.getUint32(20, LE); - } - - set type(value: DeviceMemoryReportEventTypeEXT) { - this.#view.setUint32(20, Number(value), LE); - } - - get memoryObjectId() { - return this.#view.getBigUint64(24, LE); - } - - set memoryObjectId(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(32, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get objectType() { - return this.#view.getUint32(40, LE); - } - - set objectType(value: ObjectType) { - this.#view.setUint32(40, Number(value), LE); - } - - get objectHandle() { - return this.#view.getBigUint64(48, LE); - } - - set objectHandle(value: Deno.PointerValue) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - - get heapIndex() { - return this.#view.getUint32(56, LE); - } - - set heapIndex(value: number) { - this.#view.setUint32(56, Number(value), LE); - } -} - -export interface InitImportMemoryHostPointerInfoEXT { - pNext?: AnyPointer; - handleType?: ExternalMemoryHandleTypeFlagBits; - pHostPointer?: AnyPointer; -} - -export class ImportMemoryHostPointerInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMemoryHostPointerInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryHostPointerInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMemoryHostPointerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryHostPointerInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryHostPointerInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMemoryHostPointerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.handleType !== undefined) this.handleType = data.handleType; - if (data.pHostPointer !== undefined) this.pHostPointer = data.pHostPointer; - } - this.sType = StructureType.IMPORT_MEMORY_HOST_POINTER_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(16, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } - - get pHostPointer() { - return this.#view.getBigUint64(24, LE); - } - - set pHostPointer(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitMemoryHostPointerPropertiesEXT { - pNext?: AnyPointer; - memoryTypeBits?: number; -} - -export class MemoryHostPointerPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryHostPointerPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryHostPointerPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryHostPointerPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryHostPointerPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryHostPointerPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryHostPointerPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; - } - this.sType = StructureType.MEMORY_HOST_POINTER_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - - set memoryTypeBits(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceExternalMemoryHostPropertiesEXT { - pNext?: AnyPointer; - minImportedHostPointerAlignment?: DeviceSize; -} - -export class PhysicalDeviceExternalMemoryHostPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExternalMemoryHostPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalMemoryHostPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExternalMemoryHostPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalMemoryHostPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalMemoryHostPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExternalMemoryHostPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minImportedHostPointerAlignment !== undefined) this.minImportedHostPointerAlignment = data.minImportedHostPointerAlignment; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minImportedHostPointerAlignment() { - return this.#view.getBigUint64(16, LE); - } - - set minImportedHostPointerAlignment(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceConservativeRasterizationPropertiesEXT { - pNext?: AnyPointer; - primitiveOverestimationSize?: number; - maxExtraPrimitiveOverestimationSize?: number; - extraPrimitiveOverestimationSizeGranularity?: number; - primitiveUnderestimation?: Bool32; - conservativePointAndLineRasterization?: Bool32; - degenerateTrianglesRasterized?: Bool32; - degenerateLinesRasterized?: Bool32; - fullyCoveredFragmentShaderInputVariable?: Bool32; - conservativeRasterizationPostDepthCoverage?: Bool32; -} - -export class PhysicalDeviceConservativeRasterizationPropertiesEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceConservativeRasterizationPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceConservativeRasterizationPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceConservativeRasterizationPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceConservativeRasterizationPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceConservativeRasterizationPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceConservativeRasterizationPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.primitiveOverestimationSize !== undefined) this.primitiveOverestimationSize = data.primitiveOverestimationSize; - if (data.maxExtraPrimitiveOverestimationSize !== undefined) this.maxExtraPrimitiveOverestimationSize = data.maxExtraPrimitiveOverestimationSize; - if (data.extraPrimitiveOverestimationSizeGranularity !== undefined) this.extraPrimitiveOverestimationSizeGranularity = data.extraPrimitiveOverestimationSizeGranularity; - if (data.primitiveUnderestimation !== undefined) this.primitiveUnderestimation = data.primitiveUnderestimation; - if (data.conservativePointAndLineRasterization !== undefined) this.conservativePointAndLineRasterization = data.conservativePointAndLineRasterization; - if (data.degenerateTrianglesRasterized !== undefined) this.degenerateTrianglesRasterized = data.degenerateTrianglesRasterized; - if (data.degenerateLinesRasterized !== undefined) this.degenerateLinesRasterized = data.degenerateLinesRasterized; - if (data.fullyCoveredFragmentShaderInputVariable !== undefined) this.fullyCoveredFragmentShaderInputVariable = data.fullyCoveredFragmentShaderInputVariable; - if (data.conservativeRasterizationPostDepthCoverage !== undefined) this.conservativeRasterizationPostDepthCoverage = data.conservativeRasterizationPostDepthCoverage; - } - this.sType = StructureType.PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get primitiveOverestimationSize() { - return this.#view.getFloat32(16, LE); - } - - set primitiveOverestimationSize(value: number) { - this.#view.setFloat32(16, Number(value), LE); - } - - get maxExtraPrimitiveOverestimationSize() { - return this.#view.getFloat32(20, LE); - } - - set maxExtraPrimitiveOverestimationSize(value: number) { - this.#view.setFloat32(20, Number(value), LE); - } - - get extraPrimitiveOverestimationSizeGranularity() { - return this.#view.getFloat32(24, LE); - } - - set extraPrimitiveOverestimationSizeGranularity(value: number) { - this.#view.setFloat32(24, Number(value), LE); - } - - get primitiveUnderestimation() { - return this.#view.getUint32(28, LE); - } - - set primitiveUnderestimation(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get conservativePointAndLineRasterization() { - return this.#view.getUint32(32, LE); - } - - set conservativePointAndLineRasterization(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get degenerateTrianglesRasterized() { - return this.#view.getUint32(36, LE); - } - - set degenerateTrianglesRasterized(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get degenerateLinesRasterized() { - return this.#view.getUint32(40, LE); - } - - set degenerateLinesRasterized(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get fullyCoveredFragmentShaderInputVariable() { - return this.#view.getUint32(44, LE); - } - - set fullyCoveredFragmentShaderInputVariable(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get conservativeRasterizationPostDepthCoverage() { - return this.#view.getUint32(48, LE); - } - - set conservativeRasterizationPostDepthCoverage(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitCalibratedTimestampInfoEXT { - pNext?: AnyPointer; - timeDomain?: TimeDomainEXT; -} - -export class CalibratedTimestampInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCalibratedTimestampInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCalibratedTimestampInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(CalibratedTimestampInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CalibratedTimestampInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CalibratedTimestampInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CalibratedTimestampInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.timeDomain !== undefined) this.timeDomain = data.timeDomain; - } - this.sType = StructureType.CALIBRATED_TIMESTAMP_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get timeDomain() { - return this.#view.getUint32(16, LE); - } - - set timeDomain(value: TimeDomainEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderCorePropertiesAMD { - pNext?: AnyPointer; - shaderEngineCount?: number; - shaderArraysPerEngineCount?: number; - computeUnitsPerShaderArray?: number; - simdPerComputeUnit?: number; - wavefrontsPerSimd?: number; - wavefrontSize?: number; - sgprsPerSimd?: number; - minSgprAllocation?: number; - maxSgprAllocation?: number; - sgprAllocationGranularity?: number; - vgprsPerSimd?: number; - minVgprAllocation?: number; - maxVgprAllocation?: number; - vgprAllocationGranularity?: number; -} - -export class PhysicalDeviceShaderCorePropertiesAMD implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderCorePropertiesAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderCorePropertiesAMD) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderCorePropertiesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCorePropertiesAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderCorePropertiesAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderCorePropertiesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderEngineCount !== undefined) this.shaderEngineCount = data.shaderEngineCount; - if (data.shaderArraysPerEngineCount !== undefined) this.shaderArraysPerEngineCount = data.shaderArraysPerEngineCount; - if (data.computeUnitsPerShaderArray !== undefined) this.computeUnitsPerShaderArray = data.computeUnitsPerShaderArray; - if (data.simdPerComputeUnit !== undefined) this.simdPerComputeUnit = data.simdPerComputeUnit; - if (data.wavefrontsPerSimd !== undefined) this.wavefrontsPerSimd = data.wavefrontsPerSimd; - if (data.wavefrontSize !== undefined) this.wavefrontSize = data.wavefrontSize; - if (data.sgprsPerSimd !== undefined) this.sgprsPerSimd = data.sgprsPerSimd; - if (data.minSgprAllocation !== undefined) this.minSgprAllocation = data.minSgprAllocation; - if (data.maxSgprAllocation !== undefined) this.maxSgprAllocation = data.maxSgprAllocation; - if (data.sgprAllocationGranularity !== undefined) this.sgprAllocationGranularity = data.sgprAllocationGranularity; - if (data.vgprsPerSimd !== undefined) this.vgprsPerSimd = data.vgprsPerSimd; - if (data.minVgprAllocation !== undefined) this.minVgprAllocation = data.minVgprAllocation; - if (data.maxVgprAllocation !== undefined) this.maxVgprAllocation = data.maxVgprAllocation; - if (data.vgprAllocationGranularity !== undefined) this.vgprAllocationGranularity = data.vgprAllocationGranularity; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderEngineCount() { - return this.#view.getUint32(16, LE); - } - - set shaderEngineCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get shaderArraysPerEngineCount() { - return this.#view.getUint32(20, LE); - } - - set shaderArraysPerEngineCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get computeUnitsPerShaderArray() { - return this.#view.getUint32(24, LE); - } - - set computeUnitsPerShaderArray(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get simdPerComputeUnit() { - return this.#view.getUint32(28, LE); - } - - set simdPerComputeUnit(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get wavefrontsPerSimd() { - return this.#view.getUint32(32, LE); - } - - set wavefrontsPerSimd(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get wavefrontSize() { - return this.#view.getUint32(36, LE); - } - - set wavefrontSize(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get sgprsPerSimd() { - return this.#view.getUint32(40, LE); - } - - set sgprsPerSimd(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get minSgprAllocation() { - return this.#view.getUint32(44, LE); - } - - set minSgprAllocation(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get maxSgprAllocation() { - return this.#view.getUint32(48, LE); - } - - set maxSgprAllocation(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get sgprAllocationGranularity() { - return this.#view.getUint32(52, LE); - } - - set sgprAllocationGranularity(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get vgprsPerSimd() { - return this.#view.getUint32(56, LE); - } - - set vgprsPerSimd(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get minVgprAllocation() { - return this.#view.getUint32(60, LE); - } - - set minVgprAllocation(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get maxVgprAllocation() { - return this.#view.getUint32(64, LE); - } - - set maxVgprAllocation(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get vgprAllocationGranularity() { - return this.#view.getUint32(68, LE); - } - - set vgprAllocationGranularity(value: number) { - this.#view.setUint32(68, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderCoreProperties2AMD { - pNext?: AnyPointer; - shaderCoreFeatures?: ShaderCorePropertiesFlagsAMD; - activeComputeUnitCount?: number; -} - -export class PhysicalDeviceShaderCoreProperties2AMD implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderCoreProperties2AMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderCoreProperties2AMD) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderCoreProperties2AMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCoreProperties2AMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderCoreProperties2AMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderCoreProperties2AMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderCoreFeatures !== undefined) this.shaderCoreFeatures = data.shaderCoreFeatures; - if (data.activeComputeUnitCount !== undefined) this.activeComputeUnitCount = data.activeComputeUnitCount; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderCoreFeatures() { - return this.#view.getUint32(16, LE); - } - - set shaderCoreFeatures(value: ShaderCorePropertiesFlagsAMD) { - this.#view.setUint32(16, Number(value), LE); - } - - get activeComputeUnitCount() { - return this.#view.getUint32(20, LE); - } - - set activeComputeUnitCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPipelineRasterizationConservativeStateCreateInfoEXT { - pNext?: AnyPointer; - flags?: PipelineRasterizationConservativeStateCreateFlagsEXT; - conservativeRasterizationMode?: ConservativeRasterizationModeEXT; - extraPrimitiveOverestimationSize?: number; -} - -export class PipelineRasterizationConservativeStateCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRasterizationConservativeStateCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationConservativeStateCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRasterizationConservativeStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationConservativeStateCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationConservativeStateCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRasterizationConservativeStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.conservativeRasterizationMode !== undefined) this.conservativeRasterizationMode = data.conservativeRasterizationMode; - if (data.extraPrimitiveOverestimationSize !== undefined) this.extraPrimitiveOverestimationSize = data.extraPrimitiveOverestimationSize; - } - this.sType = StructureType.PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineRasterizationConservativeStateCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get conservativeRasterizationMode() { - return this.#view.getUint32(20, LE); - } - - set conservativeRasterizationMode(value: ConservativeRasterizationModeEXT) { - this.#view.setUint32(20, Number(value), LE); - } - - get extraPrimitiveOverestimationSize() { - return this.#view.getFloat32(24, LE); - } - - set extraPrimitiveOverestimationSize(value: number) { - this.#view.setFloat32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDescriptorIndexingFeatures { - pNext?: AnyPointer; - shaderInputAttachmentArrayDynamicIndexing?: Bool32; - shaderUniformTexelBufferArrayDynamicIndexing?: Bool32; - shaderStorageTexelBufferArrayDynamicIndexing?: Bool32; - shaderUniformBufferArrayNonUniformIndexing?: Bool32; - shaderSampledImageArrayNonUniformIndexing?: Bool32; - shaderStorageBufferArrayNonUniformIndexing?: Bool32; - shaderStorageImageArrayNonUniformIndexing?: Bool32; - shaderInputAttachmentArrayNonUniformIndexing?: Bool32; - shaderUniformTexelBufferArrayNonUniformIndexing?: Bool32; - shaderStorageTexelBufferArrayNonUniformIndexing?: Bool32; - descriptorBindingUniformBufferUpdateAfterBind?: Bool32; - descriptorBindingSampledImageUpdateAfterBind?: Bool32; - descriptorBindingStorageImageUpdateAfterBind?: Bool32; - descriptorBindingStorageBufferUpdateAfterBind?: Bool32; - descriptorBindingUniformTexelBufferUpdateAfterBind?: Bool32; - descriptorBindingStorageTexelBufferUpdateAfterBind?: Bool32; - descriptorBindingUpdateUnusedWhilePending?: Bool32; - descriptorBindingPartiallyBound?: Bool32; - descriptorBindingVariableDescriptorCount?: Bool32; - runtimeDescriptorArray?: Bool32; -} - -export class PhysicalDeviceDescriptorIndexingFeatures implements BaseStruct { - static size = 96; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDescriptorIndexingFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorIndexingFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorIndexingFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorIndexingFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderInputAttachmentArrayDynamicIndexing !== undefined) this.shaderInputAttachmentArrayDynamicIndexing = data.shaderInputAttachmentArrayDynamicIndexing; - if (data.shaderUniformTexelBufferArrayDynamicIndexing !== undefined) this.shaderUniformTexelBufferArrayDynamicIndexing = data.shaderUniformTexelBufferArrayDynamicIndexing; - if (data.shaderStorageTexelBufferArrayDynamicIndexing !== undefined) this.shaderStorageTexelBufferArrayDynamicIndexing = data.shaderStorageTexelBufferArrayDynamicIndexing; - if (data.shaderUniformBufferArrayNonUniformIndexing !== undefined) this.shaderUniformBufferArrayNonUniformIndexing = data.shaderUniformBufferArrayNonUniformIndexing; - if (data.shaderSampledImageArrayNonUniformIndexing !== undefined) this.shaderSampledImageArrayNonUniformIndexing = data.shaderSampledImageArrayNonUniformIndexing; - if (data.shaderStorageBufferArrayNonUniformIndexing !== undefined) this.shaderStorageBufferArrayNonUniformIndexing = data.shaderStorageBufferArrayNonUniformIndexing; - if (data.shaderStorageImageArrayNonUniformIndexing !== undefined) this.shaderStorageImageArrayNonUniformIndexing = data.shaderStorageImageArrayNonUniformIndexing; - if (data.shaderInputAttachmentArrayNonUniformIndexing !== undefined) this.shaderInputAttachmentArrayNonUniformIndexing = data.shaderInputAttachmentArrayNonUniformIndexing; - if (data.shaderUniformTexelBufferArrayNonUniformIndexing !== undefined) this.shaderUniformTexelBufferArrayNonUniformIndexing = data.shaderUniformTexelBufferArrayNonUniformIndexing; - if (data.shaderStorageTexelBufferArrayNonUniformIndexing !== undefined) this.shaderStorageTexelBufferArrayNonUniformIndexing = data.shaderStorageTexelBufferArrayNonUniformIndexing; - if (data.descriptorBindingUniformBufferUpdateAfterBind !== undefined) this.descriptorBindingUniformBufferUpdateAfterBind = data.descriptorBindingUniformBufferUpdateAfterBind; - if (data.descriptorBindingSampledImageUpdateAfterBind !== undefined) this.descriptorBindingSampledImageUpdateAfterBind = data.descriptorBindingSampledImageUpdateAfterBind; - if (data.descriptorBindingStorageImageUpdateAfterBind !== undefined) this.descriptorBindingStorageImageUpdateAfterBind = data.descriptorBindingStorageImageUpdateAfterBind; - if (data.descriptorBindingStorageBufferUpdateAfterBind !== undefined) this.descriptorBindingStorageBufferUpdateAfterBind = data.descriptorBindingStorageBufferUpdateAfterBind; - if (data.descriptorBindingUniformTexelBufferUpdateAfterBind !== undefined) this.descriptorBindingUniformTexelBufferUpdateAfterBind = data.descriptorBindingUniformTexelBufferUpdateAfterBind; - if (data.descriptorBindingStorageTexelBufferUpdateAfterBind !== undefined) this.descriptorBindingStorageTexelBufferUpdateAfterBind = data.descriptorBindingStorageTexelBufferUpdateAfterBind; - if (data.descriptorBindingUpdateUnusedWhilePending !== undefined) this.descriptorBindingUpdateUnusedWhilePending = data.descriptorBindingUpdateUnusedWhilePending; - if (data.descriptorBindingPartiallyBound !== undefined) this.descriptorBindingPartiallyBound = data.descriptorBindingPartiallyBound; - if (data.descriptorBindingVariableDescriptorCount !== undefined) this.descriptorBindingVariableDescriptorCount = data.descriptorBindingVariableDescriptorCount; - if (data.runtimeDescriptorArray !== undefined) this.runtimeDescriptorArray = data.runtimeDescriptorArray; - } - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderInputAttachmentArrayDynamicIndexing() { - return this.#view.getUint32(16, LE); - } - - set shaderInputAttachmentArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get shaderUniformTexelBufferArrayDynamicIndexing() { - return this.#view.getUint32(20, LE); - } - - set shaderUniformTexelBufferArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get shaderStorageTexelBufferArrayDynamicIndexing() { - return this.#view.getUint32(24, LE); - } - - set shaderStorageTexelBufferArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get shaderUniformBufferArrayNonUniformIndexing() { - return this.#view.getUint32(28, LE); - } - - set shaderUniformBufferArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get shaderSampledImageArrayNonUniformIndexing() { - return this.#view.getUint32(32, LE); - } - - set shaderSampledImageArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get shaderStorageBufferArrayNonUniformIndexing() { - return this.#view.getUint32(36, LE); - } - - set shaderStorageBufferArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get shaderStorageImageArrayNonUniformIndexing() { - return this.#view.getUint32(40, LE); - } - - set shaderStorageImageArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get shaderInputAttachmentArrayNonUniformIndexing() { - return this.#view.getUint32(44, LE); - } - - set shaderInputAttachmentArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get shaderUniformTexelBufferArrayNonUniformIndexing() { - return this.#view.getUint32(48, LE); - } - - set shaderUniformTexelBufferArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get shaderStorageTexelBufferArrayNonUniformIndexing() { - return this.#view.getUint32(52, LE); - } - - set shaderStorageTexelBufferArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get descriptorBindingUniformBufferUpdateAfterBind() { - return this.#view.getUint32(56, LE); - } - - set descriptorBindingUniformBufferUpdateAfterBind(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get descriptorBindingSampledImageUpdateAfterBind() { - return this.#view.getUint32(60, LE); - } - - set descriptorBindingSampledImageUpdateAfterBind(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get descriptorBindingStorageImageUpdateAfterBind() { - return this.#view.getUint32(64, LE); - } - - set descriptorBindingStorageImageUpdateAfterBind(value: Bool32) { - this.#view.setUint32(64, Number(value), LE); - } - - get descriptorBindingStorageBufferUpdateAfterBind() { - return this.#view.getUint32(68, LE); - } - - set descriptorBindingStorageBufferUpdateAfterBind(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get descriptorBindingUniformTexelBufferUpdateAfterBind() { - return this.#view.getUint32(72, LE); - } - - set descriptorBindingUniformTexelBufferUpdateAfterBind(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } - - get descriptorBindingStorageTexelBufferUpdateAfterBind() { - return this.#view.getUint32(76, LE); - } - - set descriptorBindingStorageTexelBufferUpdateAfterBind(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } - - get descriptorBindingUpdateUnusedWhilePending() { - return this.#view.getUint32(80, LE); - } - - set descriptorBindingUpdateUnusedWhilePending(value: Bool32) { - this.#view.setUint32(80, Number(value), LE); - } - - get descriptorBindingPartiallyBound() { - return this.#view.getUint32(84, LE); - } - - set descriptorBindingPartiallyBound(value: Bool32) { - this.#view.setUint32(84, Number(value), LE); - } - - get descriptorBindingVariableDescriptorCount() { - return this.#view.getUint32(88, LE); - } - - set descriptorBindingVariableDescriptorCount(value: Bool32) { - this.#view.setUint32(88, Number(value), LE); - } - - get runtimeDescriptorArray() { - return this.#view.getUint32(92, LE); - } - - set runtimeDescriptorArray(value: Bool32) { - this.#view.setUint32(92, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDescriptorIndexingProperties { - pNext?: AnyPointer; - maxUpdateAfterBindDescriptorsInAllPools?: number; - shaderUniformBufferArrayNonUniformIndexingNative?: Bool32; - shaderSampledImageArrayNonUniformIndexingNative?: Bool32; - shaderStorageBufferArrayNonUniformIndexingNative?: Bool32; - shaderStorageImageArrayNonUniformIndexingNative?: Bool32; - shaderInputAttachmentArrayNonUniformIndexingNative?: Bool32; - robustBufferAccessUpdateAfterBind?: Bool32; - quadDivergentImplicitLod?: Bool32; - maxPerStageDescriptorUpdateAfterBindSamplers?: number; - maxPerStageDescriptorUpdateAfterBindUniformBuffers?: number; - maxPerStageDescriptorUpdateAfterBindStorageBuffers?: number; - maxPerStageDescriptorUpdateAfterBindSampledImages?: number; - maxPerStageDescriptorUpdateAfterBindStorageImages?: number; - maxPerStageDescriptorUpdateAfterBindInputAttachments?: number; - maxPerStageUpdateAfterBindResources?: number; - maxDescriptorSetUpdateAfterBindSamplers?: number; - maxDescriptorSetUpdateAfterBindUniformBuffers?: number; - maxDescriptorSetUpdateAfterBindUniformBuffersDynamic?: number; - maxDescriptorSetUpdateAfterBindStorageBuffers?: number; - maxDescriptorSetUpdateAfterBindStorageBuffersDynamic?: number; - maxDescriptorSetUpdateAfterBindSampledImages?: number; - maxDescriptorSetUpdateAfterBindStorageImages?: number; - maxDescriptorSetUpdateAfterBindInputAttachments?: number; -} - -export class PhysicalDeviceDescriptorIndexingProperties implements BaseStruct { - static size = 112; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDescriptorIndexingProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorIndexingProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorIndexingProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorIndexingProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDescriptorIndexingProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxUpdateAfterBindDescriptorsInAllPools !== undefined) this.maxUpdateAfterBindDescriptorsInAllPools = data.maxUpdateAfterBindDescriptorsInAllPools; - if (data.shaderUniformBufferArrayNonUniformIndexingNative !== undefined) this.shaderUniformBufferArrayNonUniformIndexingNative = data.shaderUniformBufferArrayNonUniformIndexingNative; - if (data.shaderSampledImageArrayNonUniformIndexingNative !== undefined) this.shaderSampledImageArrayNonUniformIndexingNative = data.shaderSampledImageArrayNonUniformIndexingNative; - if (data.shaderStorageBufferArrayNonUniformIndexingNative !== undefined) this.shaderStorageBufferArrayNonUniformIndexingNative = data.shaderStorageBufferArrayNonUniformIndexingNative; - if (data.shaderStorageImageArrayNonUniformIndexingNative !== undefined) this.shaderStorageImageArrayNonUniformIndexingNative = data.shaderStorageImageArrayNonUniformIndexingNative; - if (data.shaderInputAttachmentArrayNonUniformIndexingNative !== undefined) this.shaderInputAttachmentArrayNonUniformIndexingNative = data.shaderInputAttachmentArrayNonUniformIndexingNative; - if (data.robustBufferAccessUpdateAfterBind !== undefined) this.robustBufferAccessUpdateAfterBind = data.robustBufferAccessUpdateAfterBind; - if (data.quadDivergentImplicitLod !== undefined) this.quadDivergentImplicitLod = data.quadDivergentImplicitLod; - if (data.maxPerStageDescriptorUpdateAfterBindSamplers !== undefined) this.maxPerStageDescriptorUpdateAfterBindSamplers = data.maxPerStageDescriptorUpdateAfterBindSamplers; - if (data.maxPerStageDescriptorUpdateAfterBindUniformBuffers !== undefined) this.maxPerStageDescriptorUpdateAfterBindUniformBuffers = data.maxPerStageDescriptorUpdateAfterBindUniformBuffers; - if (data.maxPerStageDescriptorUpdateAfterBindStorageBuffers !== undefined) this.maxPerStageDescriptorUpdateAfterBindStorageBuffers = data.maxPerStageDescriptorUpdateAfterBindStorageBuffers; - if (data.maxPerStageDescriptorUpdateAfterBindSampledImages !== undefined) this.maxPerStageDescriptorUpdateAfterBindSampledImages = data.maxPerStageDescriptorUpdateAfterBindSampledImages; - if (data.maxPerStageDescriptorUpdateAfterBindStorageImages !== undefined) this.maxPerStageDescriptorUpdateAfterBindStorageImages = data.maxPerStageDescriptorUpdateAfterBindStorageImages; - if (data.maxPerStageDescriptorUpdateAfterBindInputAttachments !== undefined) this.maxPerStageDescriptorUpdateAfterBindInputAttachments = data.maxPerStageDescriptorUpdateAfterBindInputAttachments; - if (data.maxPerStageUpdateAfterBindResources !== undefined) this.maxPerStageUpdateAfterBindResources = data.maxPerStageUpdateAfterBindResources; - if (data.maxDescriptorSetUpdateAfterBindSamplers !== undefined) this.maxDescriptorSetUpdateAfterBindSamplers = data.maxDescriptorSetUpdateAfterBindSamplers; - if (data.maxDescriptorSetUpdateAfterBindUniformBuffers !== undefined) this.maxDescriptorSetUpdateAfterBindUniformBuffers = data.maxDescriptorSetUpdateAfterBindUniformBuffers; - if (data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic !== undefined) this.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; - if (data.maxDescriptorSetUpdateAfterBindStorageBuffers !== undefined) this.maxDescriptorSetUpdateAfterBindStorageBuffers = data.maxDescriptorSetUpdateAfterBindStorageBuffers; - if (data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic !== undefined) this.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; - if (data.maxDescriptorSetUpdateAfterBindSampledImages !== undefined) this.maxDescriptorSetUpdateAfterBindSampledImages = data.maxDescriptorSetUpdateAfterBindSampledImages; - if (data.maxDescriptorSetUpdateAfterBindStorageImages !== undefined) this.maxDescriptorSetUpdateAfterBindStorageImages = data.maxDescriptorSetUpdateAfterBindStorageImages; - if (data.maxDescriptorSetUpdateAfterBindInputAttachments !== undefined) this.maxDescriptorSetUpdateAfterBindInputAttachments = data.maxDescriptorSetUpdateAfterBindInputAttachments; - } - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxUpdateAfterBindDescriptorsInAllPools() { - return this.#view.getUint32(16, LE); - } - - set maxUpdateAfterBindDescriptorsInAllPools(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get shaderUniformBufferArrayNonUniformIndexingNative() { - return this.#view.getUint32(20, LE); - } - - set shaderUniformBufferArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get shaderSampledImageArrayNonUniformIndexingNative() { - return this.#view.getUint32(24, LE); - } - - set shaderSampledImageArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get shaderStorageBufferArrayNonUniformIndexingNative() { - return this.#view.getUint32(28, LE); - } - - set shaderStorageBufferArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get shaderStorageImageArrayNonUniformIndexingNative() { - return this.#view.getUint32(32, LE); - } - - set shaderStorageImageArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get shaderInputAttachmentArrayNonUniformIndexingNative() { - return this.#view.getUint32(36, LE); - } - - set shaderInputAttachmentArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get robustBufferAccessUpdateAfterBind() { - return this.#view.getUint32(40, LE); - } - - set robustBufferAccessUpdateAfterBind(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get quadDivergentImplicitLod() { - return this.#view.getUint32(44, LE); - } - - set quadDivergentImplicitLod(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindSamplers() { - return this.#view.getUint32(48, LE); - } - - set maxPerStageDescriptorUpdateAfterBindSamplers(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindUniformBuffers() { - return this.#view.getUint32(52, LE); - } - - set maxPerStageDescriptorUpdateAfterBindUniformBuffers(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindStorageBuffers() { - return this.#view.getUint32(56, LE); - } - - set maxPerStageDescriptorUpdateAfterBindStorageBuffers(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindSampledImages() { - return this.#view.getUint32(60, LE); - } - - set maxPerStageDescriptorUpdateAfterBindSampledImages(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindStorageImages() { - return this.#view.getUint32(64, LE); - } - - set maxPerStageDescriptorUpdateAfterBindStorageImages(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindInputAttachments() { - return this.#view.getUint32(68, LE); - } - - set maxPerStageDescriptorUpdateAfterBindInputAttachments(value: number) { - this.#view.setUint32(68, Number(value), LE); - } - - get maxPerStageUpdateAfterBindResources() { - return this.#view.getUint32(72, LE); - } - - set maxPerStageUpdateAfterBindResources(value: number) { - this.#view.setUint32(72, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindSamplers() { - return this.#view.getUint32(76, LE); - } - - set maxDescriptorSetUpdateAfterBindSamplers(value: number) { - this.#view.setUint32(76, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindUniformBuffers() { - return this.#view.getUint32(80, LE); - } - - set maxDescriptorSetUpdateAfterBindUniformBuffers(value: number) { - this.#view.setUint32(80, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindUniformBuffersDynamic() { - return this.#view.getUint32(84, LE); - } - - set maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(value: number) { - this.#view.setUint32(84, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindStorageBuffers() { - return this.#view.getUint32(88, LE); - } - - set maxDescriptorSetUpdateAfterBindStorageBuffers(value: number) { - this.#view.setUint32(88, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindStorageBuffersDynamic() { - return this.#view.getUint32(92, LE); - } - - set maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(value: number) { - this.#view.setUint32(92, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindSampledImages() { - return this.#view.getUint32(96, LE); - } - - set maxDescriptorSetUpdateAfterBindSampledImages(value: number) { - this.#view.setUint32(96, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindStorageImages() { - return this.#view.getUint32(100, LE); - } - - set maxDescriptorSetUpdateAfterBindStorageImages(value: number) { - this.#view.setUint32(100, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindInputAttachments() { - return this.#view.getUint32(104, LE); - } - - set maxDescriptorSetUpdateAfterBindInputAttachments(value: number) { - this.#view.setUint32(104, Number(value), LE); - } -} - -export interface InitDescriptorSetLayoutBindingFlagsCreateInfo { - pNext?: AnyPointer; - bindingCount?: number; - pBindingFlags?: AnyPointer; -} - -export class DescriptorSetLayoutBindingFlagsCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorSetLayoutBindingFlagsCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutBindingFlagsCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorSetLayoutBindingFlagsCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutBindingFlagsCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutBindingFlagsCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorSetLayoutBindingFlagsCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.bindingCount !== undefined) this.bindingCount = data.bindingCount; - if (data.pBindingFlags !== undefined) this.pBindingFlags = data.pBindingFlags; - } - this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get bindingCount() { - return this.#view.getUint32(16, LE); - } - - set bindingCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pBindingFlags() { - return this.#view.getBigUint64(24, LE); - } - - set pBindingFlags(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDescriptorSetVariableDescriptorCountAllocateInfo { - pNext?: AnyPointer; - descriptorSetCount?: number; - pDescriptorCounts?: AnyPointer; -} - -export class DescriptorSetVariableDescriptorCountAllocateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorSetVariableDescriptorCountAllocateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetVariableDescriptorCountAllocateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetVariableDescriptorCountAllocateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetVariableDescriptorCountAllocateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.descriptorSetCount !== undefined) this.descriptorSetCount = data.descriptorSetCount; - if (data.pDescriptorCounts !== undefined) this.pDescriptorCounts = data.pDescriptorCounts; - } - this.sType = StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get descriptorSetCount() { - return this.#view.getUint32(16, LE); - } - - set descriptorSetCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pDescriptorCounts() { - return this.#view.getBigUint64(24, LE); - } - - set pDescriptorCounts(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDescriptorSetVariableDescriptorCountLayoutSupport { - pNext?: AnyPointer; - maxVariableDescriptorCount?: number; -} - -export class DescriptorSetVariableDescriptorCountLayoutSupport implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorSetVariableDescriptorCountLayoutSupport); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetVariableDescriptorCountLayoutSupport) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountLayoutSupport.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetVariableDescriptorCountLayoutSupport.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetVariableDescriptorCountLayoutSupport.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorSetVariableDescriptorCountLayoutSupport.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxVariableDescriptorCount !== undefined) this.maxVariableDescriptorCount = data.maxVariableDescriptorCount; - } - this.sType = StructureType.DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxVariableDescriptorCount() { - return this.#view.getUint32(16, LE); - } - - set maxVariableDescriptorCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitAttachmentDescription2 { - pNext?: AnyPointer; - flags?: AttachmentDescriptionFlags; - format?: Format; - samples?: SampleCountFlagBits; - loadOp?: AttachmentLoadOp; - storeOp?: AttachmentStoreOp; - stencilLoadOp?: AttachmentLoadOp; - stencilStoreOp?: AttachmentStoreOp; - initialLayout?: ImageLayout; - finalLayout?: ImageLayout; -} - -export class AttachmentDescription2 implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAttachmentDescription2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentDescription2) { - if (data === undefined) { - this.#data = new Uint8Array(AttachmentDescription2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentDescription2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentDescription2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AttachmentDescription2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.format !== undefined) this.format = data.format; - if (data.samples !== undefined) this.samples = data.samples; - if (data.loadOp !== undefined) this.loadOp = data.loadOp; - if (data.storeOp !== undefined) this.storeOp = data.storeOp; - if (data.stencilLoadOp !== undefined) this.stencilLoadOp = data.stencilLoadOp; - if (data.stencilStoreOp !== undefined) this.stencilStoreOp = data.stencilStoreOp; - if (data.initialLayout !== undefined) this.initialLayout = data.initialLayout; - if (data.finalLayout !== undefined) this.finalLayout = data.finalLayout; - } - this.sType = StructureType.ATTACHMENT_DESCRIPTION_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: AttachmentDescriptionFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get format() { - return this.#view.getUint32(20, LE); - } - - set format(value: Format) { - this.#view.setUint32(20, Number(value), LE); - } - - get samples() { - return this.#view.getUint32(24, LE); - } - - set samples(value: SampleCountFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } - - get loadOp() { - return this.#view.getUint32(28, LE); - } - - set loadOp(value: AttachmentLoadOp) { - this.#view.setUint32(28, Number(value), LE); - } - - get storeOp() { - return this.#view.getUint32(32, LE); - } - - set storeOp(value: AttachmentStoreOp) { - this.#view.setUint32(32, Number(value), LE); - } - - get stencilLoadOp() { - return this.#view.getUint32(36, LE); - } - - set stencilLoadOp(value: AttachmentLoadOp) { - this.#view.setUint32(36, Number(value), LE); - } - - get stencilStoreOp() { - return this.#view.getUint32(40, LE); - } - - set stencilStoreOp(value: AttachmentStoreOp) { - this.#view.setUint32(40, Number(value), LE); - } - - get initialLayout() { - return this.#view.getUint32(44, LE); - } - - set initialLayout(value: ImageLayout) { - this.#view.setUint32(44, Number(value), LE); - } - - get finalLayout() { - return this.#view.getUint32(48, LE); - } - - set finalLayout(value: ImageLayout) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitAttachmentReference2 { - pNext?: AnyPointer; - attachment?: number; - layout?: ImageLayout; - aspectMask?: ImageAspectFlags; -} - -export class AttachmentReference2 implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAttachmentReference2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentReference2) { - if (data === undefined) { - this.#data = new Uint8Array(AttachmentReference2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentReference2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentReference2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AttachmentReference2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.attachment !== undefined) this.attachment = data.attachment; - if (data.layout !== undefined) this.layout = data.layout; - if (data.aspectMask !== undefined) this.aspectMask = data.aspectMask; - } - this.sType = StructureType.ATTACHMENT_REFERENCE_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get attachment() { - return this.#view.getUint32(16, LE); - } - - set attachment(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get layout() { - return this.#view.getUint32(20, LE); - } - - set layout(value: ImageLayout) { - this.#view.setUint32(20, Number(value), LE); - } - - get aspectMask() { - return this.#view.getUint32(24, LE); - } - - set aspectMask(value: ImageAspectFlags) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitSubpassDescription2 { - pNext?: AnyPointer; - flags?: SubpassDescriptionFlags; - pipelineBindPoint?: PipelineBindPoint; - viewMask?: number; - inputAttachmentCount?: number; - pInputAttachments?: AnyPointer; - colorAttachmentCount?: number; - pColorAttachments?: AnyPointer; - pResolveAttachments?: AnyPointer; - pDepthStencilAttachment?: AnyPointer; - preserveAttachmentCount?: number; - pPreserveAttachments?: AnyPointer; -} - -export class SubpassDescription2 implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassDescription2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDescription2) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassDescription2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDescription2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDescription2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassDescription2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pipelineBindPoint !== undefined) this.pipelineBindPoint = data.pipelineBindPoint; - if (data.viewMask !== undefined) this.viewMask = data.viewMask; - if (data.inputAttachmentCount !== undefined) this.inputAttachmentCount = data.inputAttachmentCount; - if (data.pInputAttachments !== undefined) this.pInputAttachments = data.pInputAttachments; - if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; - if (data.pColorAttachments !== undefined) this.pColorAttachments = data.pColorAttachments; - if (data.pResolveAttachments !== undefined) this.pResolveAttachments = data.pResolveAttachments; - if (data.pDepthStencilAttachment !== undefined) this.pDepthStencilAttachment = data.pDepthStencilAttachment; - if (data.preserveAttachmentCount !== undefined) this.preserveAttachmentCount = data.preserveAttachmentCount; - if (data.pPreserveAttachments !== undefined) this.pPreserveAttachments = data.pPreserveAttachments; - } - this.sType = StructureType.SUBPASS_DESCRIPTION_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: SubpassDescriptionFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get pipelineBindPoint() { - return this.#view.getUint32(20, LE); - } - - set pipelineBindPoint(value: PipelineBindPoint) { - this.#view.setUint32(20, Number(value), LE); - } - - get viewMask() { - return this.#view.getUint32(24, LE); - } - - set viewMask(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get inputAttachmentCount() { - return this.#view.getUint32(28, LE); - } - - set inputAttachmentCount(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get pInputAttachments() { - return this.#view.getBigUint64(32, LE); - } - - set pInputAttachments(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get colorAttachmentCount() { - return this.#view.getUint32(40, LE); - } - - set colorAttachmentCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get pColorAttachments() { - return this.#view.getBigUint64(48, LE); - } - - set pColorAttachments(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get pResolveAttachments() { - return this.#view.getBigUint64(56, LE); - } - - set pResolveAttachments(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get pDepthStencilAttachment() { - return this.#view.getBigUint64(64, LE); - } - - set pDepthStencilAttachment(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - - get preserveAttachmentCount() { - return this.#view.getUint32(72, LE); - } - - set preserveAttachmentCount(value: number) { - this.#view.setUint32(72, Number(value), LE); - } - - get pPreserveAttachments() { - return this.#view.getBigUint64(80, LE); - } - - set pPreserveAttachments(value: AnyPointer) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSubpassDependency2 { - pNext?: AnyPointer; - srcSubpass?: number; - dstSubpass?: number; - srcStageMask?: PipelineStageFlags; - dstStageMask?: PipelineStageFlags; - srcAccessMask?: AccessFlags; - dstAccessMask?: AccessFlags; - dependencyFlags?: DependencyFlags; - viewOffset?: number; -} - -export class SubpassDependency2 implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassDependency2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDependency2) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassDependency2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDependency2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDependency2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassDependency2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcSubpass !== undefined) this.srcSubpass = data.srcSubpass; - if (data.dstSubpass !== undefined) this.dstSubpass = data.dstSubpass; - if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; - if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; - if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; - if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; - if (data.dependencyFlags !== undefined) this.dependencyFlags = data.dependencyFlags; - if (data.viewOffset !== undefined) this.viewOffset = data.viewOffset; - } - this.sType = StructureType.SUBPASS_DEPENDENCY_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcSubpass() { - return this.#view.getUint32(16, LE); - } - - set srcSubpass(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get dstSubpass() { - return this.#view.getUint32(20, LE); - } - - set dstSubpass(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get srcStageMask() { - return this.#view.getUint32(24, LE); - } - - set srcStageMask(value: PipelineStageFlags) { - this.#view.setUint32(24, Number(value), LE); - } - - get dstStageMask() { - return this.#view.getUint32(28, LE); - } - - set dstStageMask(value: PipelineStageFlags) { - this.#view.setUint32(28, Number(value), LE); - } - - get srcAccessMask() { - return this.#view.getUint32(32, LE); - } - - set srcAccessMask(value: AccessFlags) { - this.#view.setUint32(32, Number(value), LE); - } - - get dstAccessMask() { - return this.#view.getUint32(36, LE); - } - - set dstAccessMask(value: AccessFlags) { - this.#view.setUint32(36, Number(value), LE); - } - - get dependencyFlags() { - return this.#view.getUint32(40, LE); - } - - set dependencyFlags(value: DependencyFlags) { - this.#view.setUint32(40, Number(value), LE); - } - - get viewOffset() { - return this.#view.getInt32(44, LE); - } - - set viewOffset(value: number) { - this.#view.setInt32(44, Number(value), LE); - } -} - -export interface InitRenderPassCreateInfo2 { - pNext?: AnyPointer; - flags?: RenderPassCreateFlags; - attachmentCount?: number; - pAttachments?: AnyPointer; - subpassCount?: number; - pSubpasses?: AnyPointer; - dependencyCount?: number; - pDependencies?: AnyPointer; - correlatedViewMaskCount?: number; - pCorrelatedViewMasks?: AnyPointer; -} - -export class RenderPassCreateInfo2 implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassCreateInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreateInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassCreateInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreateInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreateInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassCreateInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; - if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; - if (data.subpassCount !== undefined) this.subpassCount = data.subpassCount; - if (data.pSubpasses !== undefined) this.pSubpasses = data.pSubpasses; - if (data.dependencyCount !== undefined) this.dependencyCount = data.dependencyCount; - if (data.pDependencies !== undefined) this.pDependencies = data.pDependencies; - if (data.correlatedViewMaskCount !== undefined) this.correlatedViewMaskCount = data.correlatedViewMaskCount; - if (data.pCorrelatedViewMasks !== undefined) this.pCorrelatedViewMasks = data.pCorrelatedViewMasks; - } - this.sType = StructureType.RENDER_PASS_CREATE_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: RenderPassCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get attachmentCount() { - return this.#view.getUint32(20, LE); - } - - set attachmentCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pAttachments() { - return this.#view.getBigUint64(24, LE); - } - - set pAttachments(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get subpassCount() { - return this.#view.getUint32(32, LE); - } - - set subpassCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pSubpasses() { - return this.#view.getBigUint64(40, LE); - } - - set pSubpasses(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get dependencyCount() { - return this.#view.getUint32(48, LE); - } - - set dependencyCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pDependencies() { - return this.#view.getBigUint64(56, LE); - } - - set pDependencies(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get correlatedViewMaskCount() { - return this.#view.getUint32(64, LE); - } - - set correlatedViewMaskCount(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get pCorrelatedViewMasks() { - return this.#view.getBigUint64(72, LE); - } - - set pCorrelatedViewMasks(value: AnyPointer) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSubpassBeginInfo { - pNext?: AnyPointer; - contents?: SubpassContents; -} - -export class SubpassBeginInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassBeginInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassBeginInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassBeginInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassBeginInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.contents !== undefined) this.contents = data.contents; - } - this.sType = StructureType.SUBPASS_BEGIN_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get contents() { - return this.#view.getUint32(16, LE); - } - - set contents(value: SubpassContents) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSubpassEndInfo { - pNext?: AnyPointer; -} - -export class SubpassEndInfo implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassEndInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassEndInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassEndInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassEndInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassEndInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassEndInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - } - this.sType = StructureType.SUBPASS_END_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceTimelineSemaphoreFeatures { - pNext?: AnyPointer; - timelineSemaphore?: Bool32; -} - -export class PhysicalDeviceTimelineSemaphoreFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceTimelineSemaphoreFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTimelineSemaphoreFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTimelineSemaphoreFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTimelineSemaphoreFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.timelineSemaphore !== undefined) this.timelineSemaphore = data.timelineSemaphore; - } - this.sType = StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get timelineSemaphore() { - return this.#view.getUint32(16, LE); - } - - set timelineSemaphore(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceTimelineSemaphoreProperties { - pNext?: AnyPointer; - maxTimelineSemaphoreValueDifference?: Deno.PointerValue; -} - -export class PhysicalDeviceTimelineSemaphoreProperties implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceTimelineSemaphoreProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTimelineSemaphoreProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTimelineSemaphoreProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTimelineSemaphoreProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceTimelineSemaphoreProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxTimelineSemaphoreValueDifference !== undefined) this.maxTimelineSemaphoreValueDifference = data.maxTimelineSemaphoreValueDifference; - } - this.sType = StructureType.PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxTimelineSemaphoreValueDifference() { - return this.#view.getBigUint64(16, LE); - } - - set maxTimelineSemaphoreValueDifference(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitSemaphoreTypeCreateInfo { - pNext?: AnyPointer; - semaphoreType?: SemaphoreType; - initialValue?: Deno.PointerValue; -} - -export class SemaphoreTypeCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSemaphoreTypeCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreTypeCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SemaphoreTypeCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreTypeCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreTypeCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SemaphoreTypeCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphoreType !== undefined) this.semaphoreType = data.semaphoreType; - if (data.initialValue !== undefined) this.initialValue = data.initialValue; - } - this.sType = StructureType.SEMAPHORE_TYPE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphoreType() { - return this.#view.getUint32(16, LE); - } - - set semaphoreType(value: SemaphoreType) { - this.#view.setUint32(16, Number(value), LE); - } - - get initialValue() { - return this.#view.getBigUint64(24, LE); - } - - set initialValue(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitTimelineSemaphoreSubmitInfo { - pNext?: AnyPointer; - waitSemaphoreValueCount?: number; - pWaitSemaphoreValues?: AnyPointer; - signalSemaphoreValueCount?: number; - pSignalSemaphoreValues?: AnyPointer; -} - -export class TimelineSemaphoreSubmitInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitTimelineSemaphoreSubmitInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitTimelineSemaphoreSubmitInfo) { - if (data === undefined) { - this.#data = new Uint8Array(TimelineSemaphoreSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TimelineSemaphoreSubmitInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < TimelineSemaphoreSubmitInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(TimelineSemaphoreSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.waitSemaphoreValueCount !== undefined) this.waitSemaphoreValueCount = data.waitSemaphoreValueCount; - if (data.pWaitSemaphoreValues !== undefined) this.pWaitSemaphoreValues = data.pWaitSemaphoreValues; - if (data.signalSemaphoreValueCount !== undefined) this.signalSemaphoreValueCount = data.signalSemaphoreValueCount; - if (data.pSignalSemaphoreValues !== undefined) this.pSignalSemaphoreValues = data.pSignalSemaphoreValues; - } - this.sType = StructureType.TIMELINE_SEMAPHORE_SUBMIT_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get waitSemaphoreValueCount() { - return this.#view.getUint32(16, LE); - } - - set waitSemaphoreValueCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pWaitSemaphoreValues() { - return this.#view.getBigUint64(24, LE); - } - - set pWaitSemaphoreValues(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get signalSemaphoreValueCount() { - return this.#view.getUint32(32, LE); - } - - set signalSemaphoreValueCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pSignalSemaphoreValues() { - return this.#view.getBigUint64(40, LE); - } - - set pSignalSemaphoreValues(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSemaphoreWaitInfo { - pNext?: AnyPointer; - flags?: SemaphoreWaitFlags; - semaphoreCount?: number; - pSemaphores?: AnyPointer; - pValues?: AnyPointer; -} - -export class SemaphoreWaitInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSemaphoreWaitInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreWaitInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SemaphoreWaitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreWaitInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreWaitInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SemaphoreWaitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.semaphoreCount !== undefined) this.semaphoreCount = data.semaphoreCount; - if (data.pSemaphores !== undefined) this.pSemaphores = data.pSemaphores; - if (data.pValues !== undefined) this.pValues = data.pValues; - } - this.sType = StructureType.SEMAPHORE_WAIT_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: SemaphoreWaitFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get semaphoreCount() { - return this.#view.getUint32(20, LE); - } - - set semaphoreCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pSemaphores() { - return this.#view.getBigUint64(24, LE); - } - - set pSemaphores(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pValues() { - return this.#view.getBigUint64(32, LE); - } - - set pValues(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSemaphoreSignalInfo { - pNext?: AnyPointer; - semaphore?: Semaphore; - value?: Deno.PointerValue; -} - -export class SemaphoreSignalInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSemaphoreSignalInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreSignalInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SemaphoreSignalInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreSignalInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreSignalInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SemaphoreSignalInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.value !== undefined) this.value = data.value; - } - this.sType = StructureType.SEMAPHORE_SIGNAL_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get value() { - return this.#view.getBigUint64(24, LE); - } - - set value(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitVertexInputBindingDivisorDescriptionEXT { - binding?: number; - divisor?: number; -} - -export class VertexInputBindingDivisorDescriptionEXT implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVertexInputBindingDivisorDescriptionEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputBindingDivisorDescriptionEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VertexInputBindingDivisorDescriptionEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputBindingDivisorDescriptionEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputBindingDivisorDescriptionEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VertexInputBindingDivisorDescriptionEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.binding !== undefined) this.binding = data.binding; - if (data.divisor !== undefined) this.divisor = data.divisor; - } - } - - get binding() { - return this.#view.getUint32(0, LE); - } - - set binding(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get divisor() { - return this.#view.getUint32(4, LE); - } - - set divisor(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitPipelineVertexInputDivisorStateCreateInfoEXT { - pNext?: AnyPointer; - vertexBindingDivisorCount?: number; - pVertexBindingDivisors?: AnyPointer; -} - -export class PipelineVertexInputDivisorStateCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineVertexInputDivisorStateCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineVertexInputDivisorStateCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineVertexInputDivisorStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineVertexInputDivisorStateCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineVertexInputDivisorStateCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineVertexInputDivisorStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.vertexBindingDivisorCount !== undefined) this.vertexBindingDivisorCount = data.vertexBindingDivisorCount; - if (data.pVertexBindingDivisors !== undefined) this.pVertexBindingDivisors = data.pVertexBindingDivisors; - } - this.sType = StructureType.PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get vertexBindingDivisorCount() { - return this.#view.getUint32(16, LE); - } - - set vertexBindingDivisorCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pVertexBindingDivisors() { - return this.#view.getBigUint64(24, LE); - } - - set pVertexBindingDivisors(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceVertexAttributeDivisorPropertiesEXT { - pNext?: AnyPointer; - maxVertexAttribDivisor?: number; -} - -export class PhysicalDeviceVertexAttributeDivisorPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVertexAttributeDivisorPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVertexAttributeDivisorPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxVertexAttribDivisor !== undefined) this.maxVertexAttribDivisor = data.maxVertexAttribDivisor; - } - this.sType = StructureType.PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxVertexAttribDivisor() { - return this.#view.getUint32(16, LE); - } - - set maxVertexAttribDivisor(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevicePCIBusInfoPropertiesEXT { - pNext?: AnyPointer; - pciDomain?: number; - pciBus?: number; - pciDevice?: number; - pciFunction?: number; -} - -export class PhysicalDevicePCIBusInfoPropertiesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePCIBusInfoPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePCIBusInfoPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePCIBusInfoPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePCIBusInfoPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePCIBusInfoPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePCIBusInfoPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pciDomain !== undefined) this.pciDomain = data.pciDomain; - if (data.pciBus !== undefined) this.pciBus = data.pciBus; - if (data.pciDevice !== undefined) this.pciDevice = data.pciDevice; - if (data.pciFunction !== undefined) this.pciFunction = data.pciFunction; - } - this.sType = StructureType.PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pciDomain() { - return this.#view.getUint32(16, LE); - } - - set pciDomain(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pciBus() { - return this.#view.getUint32(20, LE); - } - - set pciBus(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pciDevice() { - return this.#view.getUint32(24, LE); - } - - set pciDevice(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pciFunction() { - return this.#view.getUint32(28, LE); - } - - set pciFunction(value: number) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitImportAndroidHardwareBufferInfoANDROID { - pNext?: AnyPointer; - buffer?: AnyPointer; -} - -export class ImportAndroidHardwareBufferInfoANDROID implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportAndroidHardwareBufferInfoANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportAndroidHardwareBufferInfoANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(ImportAndroidHardwareBufferInfoANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportAndroidHardwareBufferInfoANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportAndroidHardwareBufferInfoANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportAndroidHardwareBufferInfoANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.buffer !== undefined) this.buffer = data.buffer; - } - this.sType = StructureType.IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get buffer() { - return this.#view.getBigUint64(16, LE); - } - - set buffer(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitAndroidHardwareBufferUsageANDROID { - pNext?: AnyPointer; - androidHardwareBufferUsage?: Deno.PointerValue; -} - -export class AndroidHardwareBufferUsageANDROID implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAndroidHardwareBufferUsageANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidHardwareBufferUsageANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(AndroidHardwareBufferUsageANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferUsageANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidHardwareBufferUsageANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AndroidHardwareBufferUsageANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.androidHardwareBufferUsage !== undefined) this.androidHardwareBufferUsage = data.androidHardwareBufferUsage; - } - this.sType = StructureType.ANDROID_HARDWARE_BUFFER_USAGE_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get androidHardwareBufferUsage() { - return this.#view.getBigUint64(16, LE); - } - - set androidHardwareBufferUsage(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitAndroidHardwareBufferPropertiesANDROID { - pNext?: AnyPointer; - allocationSize?: DeviceSize; - memoryTypeBits?: number; -} - -export class AndroidHardwareBufferPropertiesANDROID implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAndroidHardwareBufferPropertiesANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidHardwareBufferPropertiesANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(AndroidHardwareBufferPropertiesANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferPropertiesANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidHardwareBufferPropertiesANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AndroidHardwareBufferPropertiesANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.allocationSize !== undefined) this.allocationSize = data.allocationSize; - if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; - } - this.sType = StructureType.ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get allocationSize() { - return this.#view.getBigUint64(16, LE); - } - - set allocationSize(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get memoryTypeBits() { - return this.#view.getUint32(24, LE); - } - - set memoryTypeBits(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitMemoryGetAndroidHardwareBufferInfoANDROID { - pNext?: AnyPointer; - memory?: DeviceMemory; -} - -export class MemoryGetAndroidHardwareBufferInfoANDROID implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryGetAndroidHardwareBufferInfoANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetAndroidHardwareBufferInfoANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryGetAndroidHardwareBufferInfoANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetAndroidHardwareBufferInfoANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetAndroidHardwareBufferInfoANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryGetAndroidHardwareBufferInfoANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memory !== undefined) this.memory = data.memory; - } - this.sType = StructureType.MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(16, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitAndroidHardwareBufferFormatPropertiesANDROID { - pNext?: AnyPointer; - format?: Format; - externalFormat?: Deno.PointerValue; - formatFeatures?: FormatFeatureFlags; - samplerYcbcrConversionComponents?: ComponentMapping; - suggestedYcbcrModel?: SamplerYcbcrModelConversion; - suggestedYcbcrRange?: SamplerYcbcrRange; - suggestedXChromaOffset?: ChromaLocation; - suggestedYChromaOffset?: ChromaLocation; -} - -export class AndroidHardwareBufferFormatPropertiesANDROID implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAndroidHardwareBufferFormatPropertiesANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidHardwareBufferFormatPropertiesANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(AndroidHardwareBufferFormatPropertiesANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferFormatPropertiesANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidHardwareBufferFormatPropertiesANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AndroidHardwareBufferFormatPropertiesANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.format !== undefined) this.format = data.format; - if (data.externalFormat !== undefined) this.externalFormat = data.externalFormat; - if (data.formatFeatures !== undefined) this.formatFeatures = data.formatFeatures; - if (data.samplerYcbcrConversionComponents !== undefined) this.samplerYcbcrConversionComponents = data.samplerYcbcrConversionComponents; - if (data.suggestedYcbcrModel !== undefined) this.suggestedYcbcrModel = data.suggestedYcbcrModel; - if (data.suggestedYcbcrRange !== undefined) this.suggestedYcbcrRange = data.suggestedYcbcrRange; - if (data.suggestedXChromaOffset !== undefined) this.suggestedXChromaOffset = data.suggestedXChromaOffset; - if (data.suggestedYChromaOffset !== undefined) this.suggestedYChromaOffset = data.suggestedYChromaOffset; - } - this.sType = StructureType.ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get format() { - return this.#view.getUint32(16, LE); - } - - set format(value: Format) { - this.#view.setUint32(16, Number(value), LE); - } - - get externalFormat() { - return this.#view.getBigUint64(24, LE); - } - - set externalFormat(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get formatFeatures() { - return this.#view.getUint32(32, LE); - } - - set formatFeatures(value: FormatFeatureFlags) { - this.#view.setUint32(32, Number(value), LE); - } - - get samplerYcbcrConversionComponents() { - return new ComponentMapping(this.#data.subarray(36, 36 + ComponentMapping.size)); - } - - set samplerYcbcrConversionComponents(value: ComponentMapping) { - if (value[BUFFER].byteLength < ComponentMapping.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 36); - } - - get suggestedYcbcrModel() { - return this.#view.getUint32(52, LE); - } - - set suggestedYcbcrModel(value: SamplerYcbcrModelConversion) { - this.#view.setUint32(52, Number(value), LE); - } - - get suggestedYcbcrRange() { - return this.#view.getUint32(56, LE); - } - - set suggestedYcbcrRange(value: SamplerYcbcrRange) { - this.#view.setUint32(56, Number(value), LE); - } - - get suggestedXChromaOffset() { - return this.#view.getUint32(60, LE); - } - - set suggestedXChromaOffset(value: ChromaLocation) { - this.#view.setUint32(60, Number(value), LE); - } - - get suggestedYChromaOffset() { - return this.#view.getUint32(64, LE); - } - - set suggestedYChromaOffset(value: ChromaLocation) { - this.#view.setUint32(64, Number(value), LE); - } -} - -export interface InitCommandBufferInheritanceConditionalRenderingInfoEXT { - pNext?: AnyPointer; - conditionalRenderingEnable?: Bool32; -} - -export class CommandBufferInheritanceConditionalRenderingInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCommandBufferInheritanceConditionalRenderingInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceConditionalRenderingInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(CommandBufferInheritanceConditionalRenderingInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceConditionalRenderingInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceConditionalRenderingInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CommandBufferInheritanceConditionalRenderingInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.conditionalRenderingEnable !== undefined) this.conditionalRenderingEnable = data.conditionalRenderingEnable; - } - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get conditionalRenderingEnable() { - return this.#view.getUint32(16, LE); - } - - set conditionalRenderingEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitExternalFormatANDROID { - pNext?: AnyPointer; - externalFormat?: Deno.PointerValue; -} - -export class ExternalFormatANDROID implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExternalFormatANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExternalFormatANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(ExternalFormatANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExternalFormatANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExternalFormatANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExternalFormatANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.externalFormat !== undefined) this.externalFormat = data.externalFormat; - } - this.sType = StructureType.EXTERNAL_FORMAT_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get externalFormat() { - return this.#view.getBigUint64(16, LE); - } - - set externalFormat(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitPhysicalDevice8BitStorageFeatures { - pNext?: AnyPointer; - storageBuffer8BitAccess?: Bool32; - uniformAndStorageBuffer8BitAccess?: Bool32; - storagePushConstant8?: Bool32; -} - -export class PhysicalDevice8BitStorageFeatures implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevice8BitStorageFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevice8BitStorageFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevice8BitStorageFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevice8BitStorageFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevice8BitStorageFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevice8BitStorageFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.storageBuffer8BitAccess !== undefined) this.storageBuffer8BitAccess = data.storageBuffer8BitAccess; - if (data.uniformAndStorageBuffer8BitAccess !== undefined) this.uniformAndStorageBuffer8BitAccess = data.uniformAndStorageBuffer8BitAccess; - if (data.storagePushConstant8 !== undefined) this.storagePushConstant8 = data.storagePushConstant8; - } - this.sType = StructureType.PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get storageBuffer8BitAccess() { - return this.#view.getUint32(16, LE); - } - - set storageBuffer8BitAccess(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get uniformAndStorageBuffer8BitAccess() { - return this.#view.getUint32(20, LE); - } - - set uniformAndStorageBuffer8BitAccess(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get storagePushConstant8() { - return this.#view.getUint32(24, LE); - } - - set storagePushConstant8(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceConditionalRenderingFeaturesEXT { - pNext?: AnyPointer; - conditionalRendering?: Bool32; - inheritedConditionalRendering?: Bool32; -} - -export class PhysicalDeviceConditionalRenderingFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceConditionalRenderingFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceConditionalRenderingFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceConditionalRenderingFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceConditionalRenderingFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceConditionalRenderingFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceConditionalRenderingFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.conditionalRendering !== undefined) this.conditionalRendering = data.conditionalRendering; - if (data.inheritedConditionalRendering !== undefined) this.inheritedConditionalRendering = data.inheritedConditionalRendering; - } - this.sType = StructureType.PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get conditionalRendering() { - return this.#view.getUint32(16, LE); - } - - set conditionalRendering(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get inheritedConditionalRendering() { - return this.#view.getUint32(20, LE); - } - - set inheritedConditionalRendering(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceVulkanMemoryModelFeatures { - pNext?: AnyPointer; - vulkanMemoryModel?: Bool32; - vulkanMemoryModelDeviceScope?: Bool32; - vulkanMemoryModelAvailabilityVisibilityChains?: Bool32; -} - -export class PhysicalDeviceVulkanMemoryModelFeatures implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVulkanMemoryModelFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkanMemoryModelFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVulkanMemoryModelFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkanMemoryModelFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkanMemoryModelFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVulkanMemoryModelFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.vulkanMemoryModel !== undefined) this.vulkanMemoryModel = data.vulkanMemoryModel; - if (data.vulkanMemoryModelDeviceScope !== undefined) this.vulkanMemoryModelDeviceScope = data.vulkanMemoryModelDeviceScope; - if (data.vulkanMemoryModelAvailabilityVisibilityChains !== undefined) this.vulkanMemoryModelAvailabilityVisibilityChains = data.vulkanMemoryModelAvailabilityVisibilityChains; - } - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get vulkanMemoryModel() { - return this.#view.getUint32(16, LE); - } - - set vulkanMemoryModel(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get vulkanMemoryModelDeviceScope() { - return this.#view.getUint32(20, LE); - } - - set vulkanMemoryModelDeviceScope(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get vulkanMemoryModelAvailabilityVisibilityChains() { - return this.#view.getUint32(24, LE); - } - - set vulkanMemoryModelAvailabilityVisibilityChains(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderAtomicInt64Features { - pNext?: AnyPointer; - shaderBufferInt64Atomics?: Bool32; - shaderSharedInt64Atomics?: Bool32; -} - -export class PhysicalDeviceShaderAtomicInt64Features implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderAtomicInt64Features); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderAtomicInt64Features) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderAtomicInt64Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderAtomicInt64Features.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderAtomicInt64Features.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderAtomicInt64Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderBufferInt64Atomics !== undefined) this.shaderBufferInt64Atomics = data.shaderBufferInt64Atomics; - if (data.shaderSharedInt64Atomics !== undefined) this.shaderSharedInt64Atomics = data.shaderSharedInt64Atomics; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderBufferInt64Atomics() { - return this.#view.getUint32(16, LE); - } - - set shaderBufferInt64Atomics(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get shaderSharedInt64Atomics() { - return this.#view.getUint32(20, LE); - } - - set shaderSharedInt64Atomics(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderAtomicFloatFeaturesEXT { - pNext?: AnyPointer; - shaderBufferFloat32Atomics?: Bool32; - shaderBufferFloat32AtomicAdd?: Bool32; - shaderBufferFloat64Atomics?: Bool32; - shaderBufferFloat64AtomicAdd?: Bool32; - shaderSharedFloat32Atomics?: Bool32; - shaderSharedFloat32AtomicAdd?: Bool32; - shaderSharedFloat64Atomics?: Bool32; - shaderSharedFloat64AtomicAdd?: Bool32; - shaderImageFloat32Atomics?: Bool32; - shaderImageFloat32AtomicAdd?: Bool32; - sparseImageFloat32Atomics?: Bool32; - sparseImageFloat32AtomicAdd?: Bool32; -} - -export class PhysicalDeviceShaderAtomicFloatFeaturesEXT implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderAtomicFloatFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderAtomicFloatFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloatFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderAtomicFloatFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderAtomicFloatFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloatFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderBufferFloat32Atomics !== undefined) this.shaderBufferFloat32Atomics = data.shaderBufferFloat32Atomics; - if (data.shaderBufferFloat32AtomicAdd !== undefined) this.shaderBufferFloat32AtomicAdd = data.shaderBufferFloat32AtomicAdd; - if (data.shaderBufferFloat64Atomics !== undefined) this.shaderBufferFloat64Atomics = data.shaderBufferFloat64Atomics; - if (data.shaderBufferFloat64AtomicAdd !== undefined) this.shaderBufferFloat64AtomicAdd = data.shaderBufferFloat64AtomicAdd; - if (data.shaderSharedFloat32Atomics !== undefined) this.shaderSharedFloat32Atomics = data.shaderSharedFloat32Atomics; - if (data.shaderSharedFloat32AtomicAdd !== undefined) this.shaderSharedFloat32AtomicAdd = data.shaderSharedFloat32AtomicAdd; - if (data.shaderSharedFloat64Atomics !== undefined) this.shaderSharedFloat64Atomics = data.shaderSharedFloat64Atomics; - if (data.shaderSharedFloat64AtomicAdd !== undefined) this.shaderSharedFloat64AtomicAdd = data.shaderSharedFloat64AtomicAdd; - if (data.shaderImageFloat32Atomics !== undefined) this.shaderImageFloat32Atomics = data.shaderImageFloat32Atomics; - if (data.shaderImageFloat32AtomicAdd !== undefined) this.shaderImageFloat32AtomicAdd = data.shaderImageFloat32AtomicAdd; - if (data.sparseImageFloat32Atomics !== undefined) this.sparseImageFloat32Atomics = data.sparseImageFloat32Atomics; - if (data.sparseImageFloat32AtomicAdd !== undefined) this.sparseImageFloat32AtomicAdd = data.sparseImageFloat32AtomicAdd; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderBufferFloat32Atomics() { - return this.#view.getUint32(16, LE); - } - - set shaderBufferFloat32Atomics(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get shaderBufferFloat32AtomicAdd() { - return this.#view.getUint32(20, LE); - } - - set shaderBufferFloat32AtomicAdd(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get shaderBufferFloat64Atomics() { - return this.#view.getUint32(24, LE); - } - - set shaderBufferFloat64Atomics(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get shaderBufferFloat64AtomicAdd() { - return this.#view.getUint32(28, LE); - } - - set shaderBufferFloat64AtomicAdd(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get shaderSharedFloat32Atomics() { - return this.#view.getUint32(32, LE); - } - - set shaderSharedFloat32Atomics(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get shaderSharedFloat32AtomicAdd() { - return this.#view.getUint32(36, LE); - } - - set shaderSharedFloat32AtomicAdd(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get shaderSharedFloat64Atomics() { - return this.#view.getUint32(40, LE); - } - - set shaderSharedFloat64Atomics(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get shaderSharedFloat64AtomicAdd() { - return this.#view.getUint32(44, LE); - } - - set shaderSharedFloat64AtomicAdd(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get shaderImageFloat32Atomics() { - return this.#view.getUint32(48, LE); - } - - set shaderImageFloat32Atomics(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get shaderImageFloat32AtomicAdd() { - return this.#view.getUint32(52, LE); - } - - set shaderImageFloat32AtomicAdd(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get sparseImageFloat32Atomics() { - return this.#view.getUint32(56, LE); - } - - set sparseImageFloat32Atomics(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get sparseImageFloat32AtomicAdd() { - return this.#view.getUint32(60, LE); - } - - set sparseImageFloat32AtomicAdd(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderAtomicFloat2FeaturesEXT { - pNext?: AnyPointer; - shaderBufferFloat16Atomics?: Bool32; - shaderBufferFloat16AtomicAdd?: Bool32; - shaderBufferFloat16AtomicMinMax?: Bool32; - shaderBufferFloat32AtomicMinMax?: Bool32; - shaderBufferFloat64AtomicMinMax?: Bool32; - shaderSharedFloat16Atomics?: Bool32; - shaderSharedFloat16AtomicAdd?: Bool32; - shaderSharedFloat16AtomicMinMax?: Bool32; - shaderSharedFloat32AtomicMinMax?: Bool32; - shaderSharedFloat64AtomicMinMax?: Bool32; - shaderImageFloat32AtomicMinMax?: Bool32; - sparseImageFloat32AtomicMinMax?: Bool32; -} - -export class PhysicalDeviceShaderAtomicFloat2FeaturesEXT implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderAtomicFloat2FeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderAtomicFloat2FeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderAtomicFloat2FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderBufferFloat16Atomics !== undefined) this.shaderBufferFloat16Atomics = data.shaderBufferFloat16Atomics; - if (data.shaderBufferFloat16AtomicAdd !== undefined) this.shaderBufferFloat16AtomicAdd = data.shaderBufferFloat16AtomicAdd; - if (data.shaderBufferFloat16AtomicMinMax !== undefined) this.shaderBufferFloat16AtomicMinMax = data.shaderBufferFloat16AtomicMinMax; - if (data.shaderBufferFloat32AtomicMinMax !== undefined) this.shaderBufferFloat32AtomicMinMax = data.shaderBufferFloat32AtomicMinMax; - if (data.shaderBufferFloat64AtomicMinMax !== undefined) this.shaderBufferFloat64AtomicMinMax = data.shaderBufferFloat64AtomicMinMax; - if (data.shaderSharedFloat16Atomics !== undefined) this.shaderSharedFloat16Atomics = data.shaderSharedFloat16Atomics; - if (data.shaderSharedFloat16AtomicAdd !== undefined) this.shaderSharedFloat16AtomicAdd = data.shaderSharedFloat16AtomicAdd; - if (data.shaderSharedFloat16AtomicMinMax !== undefined) this.shaderSharedFloat16AtomicMinMax = data.shaderSharedFloat16AtomicMinMax; - if (data.shaderSharedFloat32AtomicMinMax !== undefined) this.shaderSharedFloat32AtomicMinMax = data.shaderSharedFloat32AtomicMinMax; - if (data.shaderSharedFloat64AtomicMinMax !== undefined) this.shaderSharedFloat64AtomicMinMax = data.shaderSharedFloat64AtomicMinMax; - if (data.shaderImageFloat32AtomicMinMax !== undefined) this.shaderImageFloat32AtomicMinMax = data.shaderImageFloat32AtomicMinMax; - if (data.sparseImageFloat32AtomicMinMax !== undefined) this.sparseImageFloat32AtomicMinMax = data.sparseImageFloat32AtomicMinMax; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderBufferFloat16Atomics() { - return this.#view.getUint32(16, LE); - } - - set shaderBufferFloat16Atomics(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get shaderBufferFloat16AtomicAdd() { - return this.#view.getUint32(20, LE); - } - - set shaderBufferFloat16AtomicAdd(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get shaderBufferFloat16AtomicMinMax() { - return this.#view.getUint32(24, LE); - } - - set shaderBufferFloat16AtomicMinMax(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get shaderBufferFloat32AtomicMinMax() { - return this.#view.getUint32(28, LE); - } - - set shaderBufferFloat32AtomicMinMax(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get shaderBufferFloat64AtomicMinMax() { - return this.#view.getUint32(32, LE); - } - - set shaderBufferFloat64AtomicMinMax(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get shaderSharedFloat16Atomics() { - return this.#view.getUint32(36, LE); - } - - set shaderSharedFloat16Atomics(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get shaderSharedFloat16AtomicAdd() { - return this.#view.getUint32(40, LE); - } - - set shaderSharedFloat16AtomicAdd(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get shaderSharedFloat16AtomicMinMax() { - return this.#view.getUint32(44, LE); - } - - set shaderSharedFloat16AtomicMinMax(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get shaderSharedFloat32AtomicMinMax() { - return this.#view.getUint32(48, LE); - } - - set shaderSharedFloat32AtomicMinMax(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get shaderSharedFloat64AtomicMinMax() { - return this.#view.getUint32(52, LE); - } - - set shaderSharedFloat64AtomicMinMax(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get shaderImageFloat32AtomicMinMax() { - return this.#view.getUint32(56, LE); - } - - set shaderImageFloat32AtomicMinMax(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get sparseImageFloat32AtomicMinMax() { - return this.#view.getUint32(60, LE); - } - - set sparseImageFloat32AtomicMinMax(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } -} - -export interface InitPhysicalDeviceVertexAttributeDivisorFeaturesEXT { - pNext?: AnyPointer; - vertexAttributeInstanceRateDivisor?: Bool32; - vertexAttributeInstanceRateZeroDivisor?: Bool32; -} - -export class PhysicalDeviceVertexAttributeDivisorFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVertexAttributeDivisorFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVertexAttributeDivisorFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVertexAttributeDivisorFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.vertexAttributeInstanceRateDivisor !== undefined) this.vertexAttributeInstanceRateDivisor = data.vertexAttributeInstanceRateDivisor; - if (data.vertexAttributeInstanceRateZeroDivisor !== undefined) this.vertexAttributeInstanceRateZeroDivisor = data.vertexAttributeInstanceRateZeroDivisor; - } - this.sType = StructureType.PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get vertexAttributeInstanceRateDivisor() { - return this.#view.getUint32(16, LE); - } - - set vertexAttributeInstanceRateDivisor(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get vertexAttributeInstanceRateZeroDivisor() { - return this.#view.getUint32(20, LE); - } - - set vertexAttributeInstanceRateZeroDivisor(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitQueueFamilyCheckpointPropertiesNV { - pNext?: AnyPointer; - checkpointExecutionStageMask?: PipelineStageFlags; -} - -export class QueueFamilyCheckpointPropertiesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueueFamilyCheckpointPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyCheckpointPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(QueueFamilyCheckpointPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyCheckpointPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyCheckpointPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueueFamilyCheckpointPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.checkpointExecutionStageMask !== undefined) this.checkpointExecutionStageMask = data.checkpointExecutionStageMask; - } - this.sType = StructureType.QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get checkpointExecutionStageMask() { - return this.#view.getUint32(16, LE); - } - - set checkpointExecutionStageMask(value: PipelineStageFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitCheckpointDataNV { - pNext?: AnyPointer; - stage?: PipelineStageFlagBits; - pCheckpointMarker?: AnyPointer; -} - -export class CheckpointDataNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCheckpointDataNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCheckpointDataNV) { - if (data === undefined) { - this.#data = new Uint8Array(CheckpointDataNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CheckpointDataNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CheckpointDataNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CheckpointDataNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stage !== undefined) this.stage = data.stage; - if (data.pCheckpointMarker !== undefined) this.pCheckpointMarker = data.pCheckpointMarker; - } - this.sType = StructureType.CHECKPOINT_DATA_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stage() { - return this.#view.getUint32(16, LE); - } - - set stage(value: PipelineStageFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } - - get pCheckpointMarker() { - return this.#view.getBigUint64(24, LE); - } - - set pCheckpointMarker(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceDepthStencilResolveProperties { - pNext?: AnyPointer; - supportedDepthResolveModes?: ResolveModeFlags; - supportedStencilResolveModes?: ResolveModeFlags; - independentResolveNone?: Bool32; - independentResolve?: Bool32; -} - -export class PhysicalDeviceDepthStencilResolveProperties implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDepthStencilResolveProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDepthStencilResolveProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDepthStencilResolveProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthStencilResolveProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDepthStencilResolveProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDepthStencilResolveProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.supportedDepthResolveModes !== undefined) this.supportedDepthResolveModes = data.supportedDepthResolveModes; - if (data.supportedStencilResolveModes !== undefined) this.supportedStencilResolveModes = data.supportedStencilResolveModes; - if (data.independentResolveNone !== undefined) this.independentResolveNone = data.independentResolveNone; - if (data.independentResolve !== undefined) this.independentResolve = data.independentResolve; - } - this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get supportedDepthResolveModes() { - return this.#view.getUint32(16, LE); - } - - set supportedDepthResolveModes(value: ResolveModeFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get supportedStencilResolveModes() { - return this.#view.getUint32(20, LE); - } - - set supportedStencilResolveModes(value: ResolveModeFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get independentResolveNone() { - return this.#view.getUint32(24, LE); - } - - set independentResolveNone(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get independentResolve() { - return this.#view.getUint32(28, LE); - } - - set independentResolve(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitSubpassDescriptionDepthStencilResolve { - pNext?: AnyPointer; - depthResolveMode?: ResolveModeFlagBits; - stencilResolveMode?: ResolveModeFlagBits; - pDepthStencilResolveAttachment?: AnyPointer; -} - -export class SubpassDescriptionDepthStencilResolve implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassDescriptionDepthStencilResolve); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassDescriptionDepthStencilResolve) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassDescriptionDepthStencilResolve.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassDescriptionDepthStencilResolve.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassDescriptionDepthStencilResolve.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassDescriptionDepthStencilResolve.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.depthResolveMode !== undefined) this.depthResolveMode = data.depthResolveMode; - if (data.stencilResolveMode !== undefined) this.stencilResolveMode = data.stencilResolveMode; - if (data.pDepthStencilResolveAttachment !== undefined) this.pDepthStencilResolveAttachment = data.pDepthStencilResolveAttachment; - } - this.sType = StructureType.SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get depthResolveMode() { - return this.#view.getUint32(16, LE); - } - - set depthResolveMode(value: ResolveModeFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } - - get stencilResolveMode() { - return this.#view.getUint32(20, LE); - } - - set stencilResolveMode(value: ResolveModeFlagBits) { - this.#view.setUint32(20, Number(value), LE); - } - - get pDepthStencilResolveAttachment() { - return this.#view.getBigUint64(24, LE); - } - - set pDepthStencilResolveAttachment(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageViewASTCDecodeModeEXT { - pNext?: AnyPointer; - decodeMode?: Format; -} - -export class ImageViewASTCDecodeModeEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageViewASTCDecodeModeEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewASTCDecodeModeEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageViewASTCDecodeModeEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewASTCDecodeModeEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewASTCDecodeModeEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageViewASTCDecodeModeEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.decodeMode !== undefined) this.decodeMode = data.decodeMode; - } - this.sType = StructureType.IMAGE_VIEW_ASTC_DECODE_MODE_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get decodeMode() { - return this.#view.getUint32(16, LE); - } - - set decodeMode(value: Format) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceASTCDecodeFeaturesEXT { - pNext?: AnyPointer; - decodeModeSharedExponent?: Bool32; -} - -export class PhysicalDeviceASTCDecodeFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceASTCDecodeFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceASTCDecodeFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceASTCDecodeFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceASTCDecodeFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceASTCDecodeFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceASTCDecodeFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.decodeModeSharedExponent !== undefined) this.decodeModeSharedExponent = data.decodeModeSharedExponent; - } - this.sType = StructureType.PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get decodeModeSharedExponent() { - return this.#view.getUint32(16, LE); - } - - set decodeModeSharedExponent(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceTransformFeedbackFeaturesEXT { - pNext?: AnyPointer; - transformFeedback?: Bool32; - geometryStreams?: Bool32; -} - -export class PhysicalDeviceTransformFeedbackFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceTransformFeedbackFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTransformFeedbackFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTransformFeedbackFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTransformFeedbackFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.transformFeedback !== undefined) this.transformFeedback = data.transformFeedback; - if (data.geometryStreams !== undefined) this.geometryStreams = data.geometryStreams; - } - this.sType = StructureType.PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get transformFeedback() { - return this.#view.getUint32(16, LE); - } - - set transformFeedback(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get geometryStreams() { - return this.#view.getUint32(20, LE); - } - - set geometryStreams(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceTransformFeedbackPropertiesEXT { - pNext?: AnyPointer; - maxTransformFeedbackStreams?: number; - maxTransformFeedbackBuffers?: number; - maxTransformFeedbackBufferSize?: DeviceSize; - maxTransformFeedbackStreamDataSize?: number; - maxTransformFeedbackBufferDataSize?: number; - maxTransformFeedbackBufferDataStride?: number; - transformFeedbackQueries?: Bool32; - transformFeedbackStreamsLinesTriangles?: Bool32; - transformFeedbackRasterizationStreamSelect?: Bool32; - transformFeedbackDraw?: Bool32; -} - -export class PhysicalDeviceTransformFeedbackPropertiesEXT implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceTransformFeedbackPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTransformFeedbackPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTransformFeedbackPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTransformFeedbackPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceTransformFeedbackPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxTransformFeedbackStreams !== undefined) this.maxTransformFeedbackStreams = data.maxTransformFeedbackStreams; - if (data.maxTransformFeedbackBuffers !== undefined) this.maxTransformFeedbackBuffers = data.maxTransformFeedbackBuffers; - if (data.maxTransformFeedbackBufferSize !== undefined) this.maxTransformFeedbackBufferSize = data.maxTransformFeedbackBufferSize; - if (data.maxTransformFeedbackStreamDataSize !== undefined) this.maxTransformFeedbackStreamDataSize = data.maxTransformFeedbackStreamDataSize; - if (data.maxTransformFeedbackBufferDataSize !== undefined) this.maxTransformFeedbackBufferDataSize = data.maxTransformFeedbackBufferDataSize; - if (data.maxTransformFeedbackBufferDataStride !== undefined) this.maxTransformFeedbackBufferDataStride = data.maxTransformFeedbackBufferDataStride; - if (data.transformFeedbackQueries !== undefined) this.transformFeedbackQueries = data.transformFeedbackQueries; - if (data.transformFeedbackStreamsLinesTriangles !== undefined) this.transformFeedbackStreamsLinesTriangles = data.transformFeedbackStreamsLinesTriangles; - if (data.transformFeedbackRasterizationStreamSelect !== undefined) this.transformFeedbackRasterizationStreamSelect = data.transformFeedbackRasterizationStreamSelect; - if (data.transformFeedbackDraw !== undefined) this.transformFeedbackDraw = data.transformFeedbackDraw; - } - this.sType = StructureType.PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxTransformFeedbackStreams() { - return this.#view.getUint32(16, LE); - } - - set maxTransformFeedbackStreams(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxTransformFeedbackBuffers() { - return this.#view.getUint32(20, LE); - } - - set maxTransformFeedbackBuffers(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxTransformFeedbackBufferSize() { - return this.#view.getBigUint64(24, LE); - } - - set maxTransformFeedbackBufferSize(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get maxTransformFeedbackStreamDataSize() { - return this.#view.getUint32(32, LE); - } - - set maxTransformFeedbackStreamDataSize(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get maxTransformFeedbackBufferDataSize() { - return this.#view.getUint32(36, LE); - } - - set maxTransformFeedbackBufferDataSize(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get maxTransformFeedbackBufferDataStride() { - return this.#view.getUint32(40, LE); - } - - set maxTransformFeedbackBufferDataStride(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get transformFeedbackQueries() { - return this.#view.getUint32(44, LE); - } - - set transformFeedbackQueries(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get transformFeedbackStreamsLinesTriangles() { - return this.#view.getUint32(48, LE); - } - - set transformFeedbackStreamsLinesTriangles(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get transformFeedbackRasterizationStreamSelect() { - return this.#view.getUint32(52, LE); - } - - set transformFeedbackRasterizationStreamSelect(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get transformFeedbackDraw() { - return this.#view.getUint32(56, LE); - } - - set transformFeedbackDraw(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } -} - -export interface InitPipelineRasterizationStateStreamCreateInfoEXT { - pNext?: AnyPointer; - flags?: PipelineRasterizationStateStreamCreateFlagsEXT; - rasterizationStream?: number; -} - -export class PipelineRasterizationStateStreamCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRasterizationStateStreamCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationStateStreamCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRasterizationStateStreamCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationStateStreamCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationStateStreamCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRasterizationStateStreamCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.rasterizationStream !== undefined) this.rasterizationStream = data.rasterizationStream; - } - this.sType = StructureType.PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineRasterizationStateStreamCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get rasterizationStream() { - return this.#view.getUint32(20, LE); - } - - set rasterizationStream(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRepresentativeFragmentTestFeaturesNV { - pNext?: AnyPointer; - representativeFragmentTest?: Bool32; -} - -export class PhysicalDeviceRepresentativeFragmentTestFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRepresentativeFragmentTestFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRepresentativeFragmentTestFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRepresentativeFragmentTestFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.representativeFragmentTest !== undefined) this.representativeFragmentTest = data.representativeFragmentTest; - } - this.sType = StructureType.PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get representativeFragmentTest() { - return this.#view.getUint32(16, LE); - } - - set representativeFragmentTest(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineRepresentativeFragmentTestStateCreateInfoNV { - pNext?: AnyPointer; - representativeFragmentTestEnable?: Bool32; -} - -export class PipelineRepresentativeFragmentTestStateCreateInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRepresentativeFragmentTestStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRepresentativeFragmentTestStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRepresentativeFragmentTestStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRepresentativeFragmentTestStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRepresentativeFragmentTestStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRepresentativeFragmentTestStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.representativeFragmentTestEnable !== undefined) this.representativeFragmentTestEnable = data.representativeFragmentTestEnable; - } - this.sType = StructureType.PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get representativeFragmentTestEnable() { - return this.#view.getUint32(16, LE); - } - - set representativeFragmentTestEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceExclusiveScissorFeaturesNV { - pNext?: AnyPointer; - exclusiveScissor?: Bool32; -} - -export class PhysicalDeviceExclusiveScissorFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExclusiveScissorFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExclusiveScissorFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExclusiveScissorFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExclusiveScissorFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExclusiveScissorFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExclusiveScissorFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.exclusiveScissor !== undefined) this.exclusiveScissor = data.exclusiveScissor; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get exclusiveScissor() { - return this.#view.getUint32(16, LE); - } - - set exclusiveScissor(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineViewportExclusiveScissorStateCreateInfoNV { - pNext?: AnyPointer; - exclusiveScissorCount?: number; - pExclusiveScissors?: AnyPointer; -} - -export class PipelineViewportExclusiveScissorStateCreateInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineViewportExclusiveScissorStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportExclusiveScissorStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineViewportExclusiveScissorStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportExclusiveScissorStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportExclusiveScissorStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineViewportExclusiveScissorStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.exclusiveScissorCount !== undefined) this.exclusiveScissorCount = data.exclusiveScissorCount; - if (data.pExclusiveScissors !== undefined) this.pExclusiveScissors = data.pExclusiveScissors; - } - this.sType = StructureType.PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get exclusiveScissorCount() { - return this.#view.getUint32(16, LE); - } - - set exclusiveScissorCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pExclusiveScissors() { - return this.#view.getBigUint64(24, LE); - } - - set pExclusiveScissors(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceCornerSampledImageFeaturesNV { - pNext?: AnyPointer; - cornerSampledImage?: Bool32; -} - -export class PhysicalDeviceCornerSampledImageFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceCornerSampledImageFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCornerSampledImageFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceCornerSampledImageFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCornerSampledImageFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCornerSampledImageFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceCornerSampledImageFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.cornerSampledImage !== undefined) this.cornerSampledImage = data.cornerSampledImage; - } - this.sType = StructureType.PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get cornerSampledImage() { - return this.#view.getUint32(16, LE); - } - - set cornerSampledImage(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceComputeShaderDerivativesFeaturesNV { - pNext?: AnyPointer; - computeDerivativeGroupQuads?: Bool32; - computeDerivativeGroupLinear?: Bool32; -} - -export class PhysicalDeviceComputeShaderDerivativesFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceComputeShaderDerivativesFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceComputeShaderDerivativesFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceComputeShaderDerivativesFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceComputeShaderDerivativesFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceComputeShaderDerivativesFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceComputeShaderDerivativesFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.computeDerivativeGroupQuads !== undefined) this.computeDerivativeGroupQuads = data.computeDerivativeGroupQuads; - if (data.computeDerivativeGroupLinear !== undefined) this.computeDerivativeGroupLinear = data.computeDerivativeGroupLinear; - } - this.sType = StructureType.PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get computeDerivativeGroupQuads() { - return this.#view.getUint32(16, LE); - } - - set computeDerivativeGroupQuads(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get computeDerivativeGroupLinear() { - return this.#view.getUint32(20, LE); - } - - set computeDerivativeGroupLinear(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderImageFootprintFeaturesNV { - pNext?: AnyPointer; - imageFootprint?: Bool32; -} - -export class PhysicalDeviceShaderImageFootprintFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderImageFootprintFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderImageFootprintFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderImageFootprintFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderImageFootprintFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderImageFootprintFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderImageFootprintFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageFootprint !== undefined) this.imageFootprint = data.imageFootprint; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageFootprint() { - return this.#view.getUint32(16, LE); - } - - set imageFootprint(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV { - pNext?: AnyPointer; - dedicatedAllocationImageAliasing?: Bool32; -} - -export class PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.dedicatedAllocationImageAliasing !== undefined) this.dedicatedAllocationImageAliasing = data.dedicatedAllocationImageAliasing; - } - this.sType = StructureType.PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dedicatedAllocationImageAliasing() { - return this.#view.getUint32(16, LE); - } - - set dedicatedAllocationImageAliasing(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceCopyMemoryIndirectFeaturesNV { - pNext?: AnyPointer; - indirectCopy?: Bool32; -} - -export class PhysicalDeviceCopyMemoryIndirectFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceCopyMemoryIndirectFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCopyMemoryIndirectFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCopyMemoryIndirectFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCopyMemoryIndirectFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.indirectCopy !== undefined) this.indirectCopy = data.indirectCopy; - } - this.sType = StructureType.PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get indirectCopy() { - return this.#view.getUint32(16, LE); - } - - set indirectCopy(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceCopyMemoryIndirectPropertiesNV { - pNext?: AnyPointer; - supportedQueues?: QueueFlags; -} - -export class PhysicalDeviceCopyMemoryIndirectPropertiesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceCopyMemoryIndirectPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCopyMemoryIndirectPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCopyMemoryIndirectPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCopyMemoryIndirectPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceCopyMemoryIndirectPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.supportedQueues !== undefined) this.supportedQueues = data.supportedQueues; - } - this.sType = StructureType.PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get supportedQueues() { - return this.#view.getUint32(16, LE); - } - - set supportedQueues(value: QueueFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMemoryDecompressionFeaturesNV { - pNext?: AnyPointer; - memoryDecompression?: Bool32; -} - -export class PhysicalDeviceMemoryDecompressionFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMemoryDecompressionFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryDecompressionFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryDecompressionFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryDecompressionFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryDecompression !== undefined) this.memoryDecompression = data.memoryDecompression; - } - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryDecompression() { - return this.#view.getUint32(16, LE); - } - - set memoryDecompression(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMemoryDecompressionPropertiesNV { - pNext?: AnyPointer; - decompressionMethods?: MemoryDecompressionMethodFlagsNV; - maxDecompressionIndirectCount?: Deno.PointerValue; -} - -export class PhysicalDeviceMemoryDecompressionPropertiesNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMemoryDecompressionPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryDecompressionPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryDecompressionPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryDecompressionPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMemoryDecompressionPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.decompressionMethods !== undefined) this.decompressionMethods = data.decompressionMethods; - if (data.maxDecompressionIndirectCount !== undefined) this.maxDecompressionIndirectCount = data.maxDecompressionIndirectCount; - } - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get decompressionMethods() { - return this.#view.getBigUint64(16, LE); - } - - set decompressionMethods(value: MemoryDecompressionMethodFlagsNV) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get maxDecompressionIndirectCount() { - return this.#view.getBigUint64(24, LE); - } - - set maxDecompressionIndirectCount(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitShadingRatePaletteNV { - shadingRatePaletteEntryCount?: number; - pShadingRatePaletteEntries?: AnyPointer; -} - -export class ShadingRatePaletteNV implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitShadingRatePaletteNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitShadingRatePaletteNV) { - if (data === undefined) { - this.#data = new Uint8Array(ShadingRatePaletteNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShadingRatePaletteNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ShadingRatePaletteNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ShadingRatePaletteNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.shadingRatePaletteEntryCount !== undefined) this.shadingRatePaletteEntryCount = data.shadingRatePaletteEntryCount; - if (data.pShadingRatePaletteEntries !== undefined) this.pShadingRatePaletteEntries = data.pShadingRatePaletteEntries; - } - } - - get shadingRatePaletteEntryCount() { - return this.#view.getUint32(0, LE); - } - - set shadingRatePaletteEntryCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get pShadingRatePaletteEntries() { - return this.#view.getBigUint64(8, LE); - } - - set pShadingRatePaletteEntries(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelineViewportShadingRateImageStateCreateInfoNV { - pNext?: AnyPointer; - shadingRateImageEnable?: Bool32; - viewportCount?: number; - pShadingRatePalettes?: AnyPointer; -} - -export class PipelineViewportShadingRateImageStateCreateInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineViewportShadingRateImageStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportShadingRateImageStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineViewportShadingRateImageStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportShadingRateImageStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportShadingRateImageStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineViewportShadingRateImageStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shadingRateImageEnable !== undefined) this.shadingRateImageEnable = data.shadingRateImageEnable; - if (data.viewportCount !== undefined) this.viewportCount = data.viewportCount; - if (data.pShadingRatePalettes !== undefined) this.pShadingRatePalettes = data.pShadingRatePalettes; - } - this.sType = StructureType.PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shadingRateImageEnable() { - return this.#view.getUint32(16, LE); - } - - set shadingRateImageEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get viewportCount() { - return this.#view.getUint32(20, LE); - } - - set viewportCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pShadingRatePalettes() { - return this.#view.getBigUint64(24, LE); - } - - set pShadingRatePalettes(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceShadingRateImageFeaturesNV { - pNext?: AnyPointer; - shadingRateImage?: Bool32; - shadingRateCoarseSampleOrder?: Bool32; -} - -export class PhysicalDeviceShadingRateImageFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShadingRateImageFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShadingRateImageFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShadingRateImageFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShadingRateImageFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShadingRateImageFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShadingRateImageFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shadingRateImage !== undefined) this.shadingRateImage = data.shadingRateImage; - if (data.shadingRateCoarseSampleOrder !== undefined) this.shadingRateCoarseSampleOrder = data.shadingRateCoarseSampleOrder; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shadingRateImage() { - return this.#view.getUint32(16, LE); - } - - set shadingRateImage(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get shadingRateCoarseSampleOrder() { - return this.#view.getUint32(20, LE); - } - - set shadingRateCoarseSampleOrder(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShadingRateImagePropertiesNV { - pNext?: AnyPointer; - shadingRateTexelSize?: Extent2D; - shadingRatePaletteSize?: number; - shadingRateMaxCoarseSamples?: number; -} - -export class PhysicalDeviceShadingRateImagePropertiesNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShadingRateImagePropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShadingRateImagePropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShadingRateImagePropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShadingRateImagePropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShadingRateImagePropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShadingRateImagePropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shadingRateTexelSize !== undefined) this.shadingRateTexelSize = data.shadingRateTexelSize; - if (data.shadingRatePaletteSize !== undefined) this.shadingRatePaletteSize = data.shadingRatePaletteSize; - if (data.shadingRateMaxCoarseSamples !== undefined) this.shadingRateMaxCoarseSamples = data.shadingRateMaxCoarseSamples; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shadingRateTexelSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - - set shadingRateTexelSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get shadingRatePaletteSize() { - return this.#view.getUint32(24, LE); - } - - set shadingRatePaletteSize(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get shadingRateMaxCoarseSamples() { - return this.#view.getUint32(28, LE); - } - - set shadingRateMaxCoarseSamples(value: number) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDeviceInvocationMaskFeaturesHUAWEI { - pNext?: AnyPointer; - invocationMask?: Bool32; -} - -export class PhysicalDeviceInvocationMaskFeaturesHUAWEI implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceInvocationMaskFeaturesHUAWEI); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceInvocationMaskFeaturesHUAWEI) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceInvocationMaskFeaturesHUAWEI.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInvocationMaskFeaturesHUAWEI.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceInvocationMaskFeaturesHUAWEI.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceInvocationMaskFeaturesHUAWEI.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.invocationMask !== undefined) this.invocationMask = data.invocationMask; - } - this.sType = StructureType.PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get invocationMask() { - return this.#view.getUint32(16, LE); - } - - set invocationMask(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitCoarseSampleLocationNV { - pixelX?: number; - pixelY?: number; - sample?: number; -} - -export class CoarseSampleLocationNV implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCoarseSampleLocationNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCoarseSampleLocationNV) { - if (data === undefined) { - this.#data = new Uint8Array(CoarseSampleLocationNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CoarseSampleLocationNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CoarseSampleLocationNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CoarseSampleLocationNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pixelX !== undefined) this.pixelX = data.pixelX; - if (data.pixelY !== undefined) this.pixelY = data.pixelY; - if (data.sample !== undefined) this.sample = data.sample; - } - } - - get pixelX() { - return this.#view.getUint32(0, LE); - } - - set pixelX(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get pixelY() { - return this.#view.getUint32(4, LE); - } - - set pixelY(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get sample() { - return this.#view.getUint32(8, LE); - } - - set sample(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitCoarseSampleOrderCustomNV { - shadingRate?: ShadingRatePaletteEntryNV; - sampleCount?: number; - sampleLocationCount?: number; - pSampleLocations?: AnyPointer; -} - -export class CoarseSampleOrderCustomNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCoarseSampleOrderCustomNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCoarseSampleOrderCustomNV) { - if (data === undefined) { - this.#data = new Uint8Array(CoarseSampleOrderCustomNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CoarseSampleOrderCustomNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CoarseSampleOrderCustomNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CoarseSampleOrderCustomNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.shadingRate !== undefined) this.shadingRate = data.shadingRate; - if (data.sampleCount !== undefined) this.sampleCount = data.sampleCount; - if (data.sampleLocationCount !== undefined) this.sampleLocationCount = data.sampleLocationCount; - if (data.pSampleLocations !== undefined) this.pSampleLocations = data.pSampleLocations; - } - } - - get shadingRate() { - return this.#view.getUint32(0, LE); - } - - set shadingRate(value: ShadingRatePaletteEntryNV) { - this.#view.setUint32(0, Number(value), LE); - } - - get sampleCount() { - return this.#view.getUint32(4, LE); - } - - set sampleCount(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get sampleLocationCount() { - return this.#view.getUint32(8, LE); - } - - set sampleLocationCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get pSampleLocations() { - return this.#view.getBigUint64(16, LE); - } - - set pSampleLocations(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelineViewportCoarseSampleOrderStateCreateInfoNV { - pNext?: AnyPointer; - sampleOrderType?: CoarseSampleOrderTypeNV; - customSampleOrderCount?: number; - pCustomSampleOrders?: AnyPointer; -} - -export class PipelineViewportCoarseSampleOrderStateCreateInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineViewportCoarseSampleOrderStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportCoarseSampleOrderStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineViewportCoarseSampleOrderStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportCoarseSampleOrderStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportCoarseSampleOrderStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineViewportCoarseSampleOrderStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.sampleOrderType !== undefined) this.sampleOrderType = data.sampleOrderType; - if (data.customSampleOrderCount !== undefined) this.customSampleOrderCount = data.customSampleOrderCount; - if (data.pCustomSampleOrders !== undefined) this.pCustomSampleOrders = data.pCustomSampleOrders; - } - this.sType = StructureType.PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get sampleOrderType() { - return this.#view.getUint32(16, LE); - } - - set sampleOrderType(value: CoarseSampleOrderTypeNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get customSampleOrderCount() { - return this.#view.getUint32(20, LE); - } - - set customSampleOrderCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pCustomSampleOrders() { - return this.#view.getBigUint64(24, LE); - } - - set pCustomSampleOrders(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceMeshShaderFeaturesNV { - pNext?: AnyPointer; - taskShader?: Bool32; - meshShader?: Bool32; -} - -export class PhysicalDeviceMeshShaderFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMeshShaderFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMeshShaderFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMeshShaderFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.taskShader !== undefined) this.taskShader = data.taskShader; - if (data.meshShader !== undefined) this.meshShader = data.meshShader; - } - this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get taskShader() { - return this.#view.getUint32(16, LE); - } - - set taskShader(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get meshShader() { - return this.#view.getUint32(20, LE); - } - - set meshShader(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMeshShaderPropertiesNV { - pNext?: AnyPointer; - maxDrawMeshTasksCount?: number; - maxTaskWorkGroupInvocations?: number; - maxTaskWorkGroupSize?: Uint32Array; - maxTaskTotalMemorySize?: number; - maxTaskOutputCount?: number; - maxMeshWorkGroupInvocations?: number; - maxMeshWorkGroupSize?: Uint32Array; - maxMeshTotalMemorySize?: number; - maxMeshOutputVertices?: number; - maxMeshOutputPrimitives?: number; - maxMeshMultiviewViewCount?: number; - meshOutputPerVertexGranularity?: number; - meshOutputPerPrimitiveGranularity?: number; -} - -export class PhysicalDeviceMeshShaderPropertiesNV implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMeshShaderPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMeshShaderPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMeshShaderPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxDrawMeshTasksCount !== undefined) this.maxDrawMeshTasksCount = data.maxDrawMeshTasksCount; - if (data.maxTaskWorkGroupInvocations !== undefined) this.maxTaskWorkGroupInvocations = data.maxTaskWorkGroupInvocations; - if (data.maxTaskWorkGroupSize !== undefined) this.maxTaskWorkGroupSize = data.maxTaskWorkGroupSize; - if (data.maxTaskTotalMemorySize !== undefined) this.maxTaskTotalMemorySize = data.maxTaskTotalMemorySize; - if (data.maxTaskOutputCount !== undefined) this.maxTaskOutputCount = data.maxTaskOutputCount; - if (data.maxMeshWorkGroupInvocations !== undefined) this.maxMeshWorkGroupInvocations = data.maxMeshWorkGroupInvocations; - if (data.maxMeshWorkGroupSize !== undefined) this.maxMeshWorkGroupSize = data.maxMeshWorkGroupSize; - if (data.maxMeshTotalMemorySize !== undefined) this.maxMeshTotalMemorySize = data.maxMeshTotalMemorySize; - if (data.maxMeshOutputVertices !== undefined) this.maxMeshOutputVertices = data.maxMeshOutputVertices; - if (data.maxMeshOutputPrimitives !== undefined) this.maxMeshOutputPrimitives = data.maxMeshOutputPrimitives; - if (data.maxMeshMultiviewViewCount !== undefined) this.maxMeshMultiviewViewCount = data.maxMeshMultiviewViewCount; - if (data.meshOutputPerVertexGranularity !== undefined) this.meshOutputPerVertexGranularity = data.meshOutputPerVertexGranularity; - if (data.meshOutputPerPrimitiveGranularity !== undefined) this.meshOutputPerPrimitiveGranularity = data.meshOutputPerPrimitiveGranularity; - } - this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxDrawMeshTasksCount() { - return this.#view.getUint32(16, LE); - } - - set maxDrawMeshTasksCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxTaskWorkGroupInvocations() { - return this.#view.getUint32(20, LE); - } - - set maxTaskWorkGroupInvocations(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxTaskWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 24, 3); - } - - set maxTaskWorkGroupSize(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 24); - } - - get maxTaskTotalMemorySize() { - return this.#view.getUint32(36, LE); - } - - set maxTaskTotalMemorySize(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get maxTaskOutputCount() { - return this.#view.getUint32(40, LE); - } - - set maxTaskOutputCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get maxMeshWorkGroupInvocations() { - return this.#view.getUint32(44, LE); - } - - set maxMeshWorkGroupInvocations(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get maxMeshWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 48, 3); - } - - set maxMeshWorkGroupSize(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 48); - } - - get maxMeshTotalMemorySize() { - return this.#view.getUint32(60, LE); - } - - set maxMeshTotalMemorySize(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get maxMeshOutputVertices() { - return this.#view.getUint32(64, LE); - } - - set maxMeshOutputVertices(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get maxMeshOutputPrimitives() { - return this.#view.getUint32(68, LE); - } - - set maxMeshOutputPrimitives(value: number) { - this.#view.setUint32(68, Number(value), LE); - } - - get maxMeshMultiviewViewCount() { - return this.#view.getUint32(72, LE); - } - - set maxMeshMultiviewViewCount(value: number) { - this.#view.setUint32(72, Number(value), LE); - } - - get meshOutputPerVertexGranularity() { - return this.#view.getUint32(76, LE); - } - - set meshOutputPerVertexGranularity(value: number) { - this.#view.setUint32(76, Number(value), LE); - } - - get meshOutputPerPrimitiveGranularity() { - return this.#view.getUint32(80, LE); - } - - set meshOutputPerPrimitiveGranularity(value: number) { - this.#view.setUint32(80, Number(value), LE); - } -} - -export interface InitDrawMeshTasksIndirectCommandNV { - taskCount?: number; - firstTask?: number; -} - -export class DrawMeshTasksIndirectCommandNV implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDrawMeshTasksIndirectCommandNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDrawMeshTasksIndirectCommandNV) { - if (data === undefined) { - this.#data = new Uint8Array(DrawMeshTasksIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawMeshTasksIndirectCommandNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DrawMeshTasksIndirectCommandNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DrawMeshTasksIndirectCommandNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.taskCount !== undefined) this.taskCount = data.taskCount; - if (data.firstTask !== undefined) this.firstTask = data.firstTask; - } - } - - get taskCount() { - return this.#view.getUint32(0, LE); - } - - set taskCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get firstTask() { - return this.#view.getUint32(4, LE); - } - - set firstTask(value: number) { - this.#view.setUint32(4, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMeshShaderFeaturesEXT { - pNext?: AnyPointer; - taskShader?: Bool32; - meshShader?: Bool32; - multiviewMeshShader?: Bool32; - primitiveFragmentShadingRateMeshShader?: Bool32; - meshShaderQueries?: Bool32; -} - -export class PhysicalDeviceMeshShaderFeaturesEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMeshShaderFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMeshShaderFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMeshShaderFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMeshShaderFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.taskShader !== undefined) this.taskShader = data.taskShader; - if (data.meshShader !== undefined) this.meshShader = data.meshShader; - if (data.multiviewMeshShader !== undefined) this.multiviewMeshShader = data.multiviewMeshShader; - if (data.primitiveFragmentShadingRateMeshShader !== undefined) this.primitiveFragmentShadingRateMeshShader = data.primitiveFragmentShadingRateMeshShader; - if (data.meshShaderQueries !== undefined) this.meshShaderQueries = data.meshShaderQueries; - } - this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get taskShader() { - return this.#view.getUint32(16, LE); - } - - set taskShader(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get meshShader() { - return this.#view.getUint32(20, LE); - } - - set meshShader(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get multiviewMeshShader() { - return this.#view.getUint32(24, LE); - } - - set multiviewMeshShader(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get primitiveFragmentShadingRateMeshShader() { - return this.#view.getUint32(28, LE); - } - - set primitiveFragmentShadingRateMeshShader(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get meshShaderQueries() { - return this.#view.getUint32(32, LE); - } - - set meshShaderQueries(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMeshShaderPropertiesEXT { - pNext?: AnyPointer; - maxTaskWorkGroupTotalCount?: number; - maxTaskWorkGroupCount?: Uint32Array; - maxTaskWorkGroupInvocations?: number; - maxTaskWorkGroupSize?: Uint32Array; - maxTaskPayloadSize?: number; - maxTaskSharedMemorySize?: number; - maxTaskPayloadAndSharedMemorySize?: number; - maxMeshWorkGroupTotalCount?: number; - maxMeshWorkGroupCount?: Uint32Array; - maxMeshWorkGroupInvocations?: number; - maxMeshWorkGroupSize?: Uint32Array; - maxMeshSharedMemorySize?: number; - maxMeshPayloadAndSharedMemorySize?: number; - maxMeshOutputMemorySize?: number; - maxMeshPayloadAndOutputMemorySize?: number; - maxMeshOutputComponents?: number; - maxMeshOutputVertices?: number; - maxMeshOutputPrimitives?: number; - maxMeshOutputLayers?: number; - maxMeshMultiviewViewCount?: number; - meshOutputPerVertexGranularity?: number; - meshOutputPerPrimitiveGranularity?: number; - maxPreferredTaskWorkGroupInvocations?: number; - maxPreferredMeshWorkGroupInvocations?: number; - prefersLocalInvocationVertexOutput?: Bool32; - prefersLocalInvocationPrimitiveOutput?: Bool32; - prefersCompactVertexOutput?: Bool32; - prefersCompactPrimitiveOutput?: Bool32; -} - -export class PhysicalDeviceMeshShaderPropertiesEXT implements BaseStruct { - static size = 160; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMeshShaderPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMeshShaderPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMeshShaderPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMeshShaderPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMeshShaderPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxTaskWorkGroupTotalCount !== undefined) this.maxTaskWorkGroupTotalCount = data.maxTaskWorkGroupTotalCount; - if (data.maxTaskWorkGroupCount !== undefined) this.maxTaskWorkGroupCount = data.maxTaskWorkGroupCount; - if (data.maxTaskWorkGroupInvocations !== undefined) this.maxTaskWorkGroupInvocations = data.maxTaskWorkGroupInvocations; - if (data.maxTaskWorkGroupSize !== undefined) this.maxTaskWorkGroupSize = data.maxTaskWorkGroupSize; - if (data.maxTaskPayloadSize !== undefined) this.maxTaskPayloadSize = data.maxTaskPayloadSize; - if (data.maxTaskSharedMemorySize !== undefined) this.maxTaskSharedMemorySize = data.maxTaskSharedMemorySize; - if (data.maxTaskPayloadAndSharedMemorySize !== undefined) this.maxTaskPayloadAndSharedMemorySize = data.maxTaskPayloadAndSharedMemorySize; - if (data.maxMeshWorkGroupTotalCount !== undefined) this.maxMeshWorkGroupTotalCount = data.maxMeshWorkGroupTotalCount; - if (data.maxMeshWorkGroupCount !== undefined) this.maxMeshWorkGroupCount = data.maxMeshWorkGroupCount; - if (data.maxMeshWorkGroupInvocations !== undefined) this.maxMeshWorkGroupInvocations = data.maxMeshWorkGroupInvocations; - if (data.maxMeshWorkGroupSize !== undefined) this.maxMeshWorkGroupSize = data.maxMeshWorkGroupSize; - if (data.maxMeshSharedMemorySize !== undefined) this.maxMeshSharedMemorySize = data.maxMeshSharedMemorySize; - if (data.maxMeshPayloadAndSharedMemorySize !== undefined) this.maxMeshPayloadAndSharedMemorySize = data.maxMeshPayloadAndSharedMemorySize; - if (data.maxMeshOutputMemorySize !== undefined) this.maxMeshOutputMemorySize = data.maxMeshOutputMemorySize; - if (data.maxMeshPayloadAndOutputMemorySize !== undefined) this.maxMeshPayloadAndOutputMemorySize = data.maxMeshPayloadAndOutputMemorySize; - if (data.maxMeshOutputComponents !== undefined) this.maxMeshOutputComponents = data.maxMeshOutputComponents; - if (data.maxMeshOutputVertices !== undefined) this.maxMeshOutputVertices = data.maxMeshOutputVertices; - if (data.maxMeshOutputPrimitives !== undefined) this.maxMeshOutputPrimitives = data.maxMeshOutputPrimitives; - if (data.maxMeshOutputLayers !== undefined) this.maxMeshOutputLayers = data.maxMeshOutputLayers; - if (data.maxMeshMultiviewViewCount !== undefined) this.maxMeshMultiviewViewCount = data.maxMeshMultiviewViewCount; - if (data.meshOutputPerVertexGranularity !== undefined) this.meshOutputPerVertexGranularity = data.meshOutputPerVertexGranularity; - if (data.meshOutputPerPrimitiveGranularity !== undefined) this.meshOutputPerPrimitiveGranularity = data.meshOutputPerPrimitiveGranularity; - if (data.maxPreferredTaskWorkGroupInvocations !== undefined) this.maxPreferredTaskWorkGroupInvocations = data.maxPreferredTaskWorkGroupInvocations; - if (data.maxPreferredMeshWorkGroupInvocations !== undefined) this.maxPreferredMeshWorkGroupInvocations = data.maxPreferredMeshWorkGroupInvocations; - if (data.prefersLocalInvocationVertexOutput !== undefined) this.prefersLocalInvocationVertexOutput = data.prefersLocalInvocationVertexOutput; - if (data.prefersLocalInvocationPrimitiveOutput !== undefined) this.prefersLocalInvocationPrimitiveOutput = data.prefersLocalInvocationPrimitiveOutput; - if (data.prefersCompactVertexOutput !== undefined) this.prefersCompactVertexOutput = data.prefersCompactVertexOutput; - if (data.prefersCompactPrimitiveOutput !== undefined) this.prefersCompactPrimitiveOutput = data.prefersCompactPrimitiveOutput; - } - this.sType = StructureType.PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxTaskWorkGroupTotalCount() { - return this.#view.getUint32(16, LE); - } - - set maxTaskWorkGroupTotalCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxTaskWorkGroupCount() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 20, 3); - } - - set maxTaskWorkGroupCount(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - - get maxTaskWorkGroupInvocations() { - return this.#view.getUint32(32, LE); - } - - set maxTaskWorkGroupInvocations(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get maxTaskWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 36, 3); - } - - set maxTaskWorkGroupSize(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 36); - } - - get maxTaskPayloadSize() { - return this.#view.getUint32(48, LE); - } - - set maxTaskPayloadSize(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get maxTaskSharedMemorySize() { - return this.#view.getUint32(52, LE); - } - - set maxTaskSharedMemorySize(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get maxTaskPayloadAndSharedMemorySize() { - return this.#view.getUint32(56, LE); - } - - set maxTaskPayloadAndSharedMemorySize(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get maxMeshWorkGroupTotalCount() { - return this.#view.getUint32(60, LE); - } - - set maxMeshWorkGroupTotalCount(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get maxMeshWorkGroupCount() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 64, 3); - } - - set maxMeshWorkGroupCount(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 64); - } - - get maxMeshWorkGroupInvocations() { - return this.#view.getUint32(76, LE); - } - - set maxMeshWorkGroupInvocations(value: number) { - this.#view.setUint32(76, Number(value), LE); - } - - get maxMeshWorkGroupSize() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 80, 3); - } - - set maxMeshWorkGroupSize(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 80); - } - - get maxMeshSharedMemorySize() { - return this.#view.getUint32(92, LE); - } - - set maxMeshSharedMemorySize(value: number) { - this.#view.setUint32(92, Number(value), LE); - } - - get maxMeshPayloadAndSharedMemorySize() { - return this.#view.getUint32(96, LE); - } - - set maxMeshPayloadAndSharedMemorySize(value: number) { - this.#view.setUint32(96, Number(value), LE); - } - - get maxMeshOutputMemorySize() { - return this.#view.getUint32(100, LE); - } - - set maxMeshOutputMemorySize(value: number) { - this.#view.setUint32(100, Number(value), LE); - } - - get maxMeshPayloadAndOutputMemorySize() { - return this.#view.getUint32(104, LE); - } - - set maxMeshPayloadAndOutputMemorySize(value: number) { - this.#view.setUint32(104, Number(value), LE); - } - - get maxMeshOutputComponents() { - return this.#view.getUint32(108, LE); - } - - set maxMeshOutputComponents(value: number) { - this.#view.setUint32(108, Number(value), LE); - } - - get maxMeshOutputVertices() { - return this.#view.getUint32(112, LE); - } - - set maxMeshOutputVertices(value: number) { - this.#view.setUint32(112, Number(value), LE); - } - - get maxMeshOutputPrimitives() { - return this.#view.getUint32(116, LE); - } - - set maxMeshOutputPrimitives(value: number) { - this.#view.setUint32(116, Number(value), LE); - } - - get maxMeshOutputLayers() { - return this.#view.getUint32(120, LE); - } - - set maxMeshOutputLayers(value: number) { - this.#view.setUint32(120, Number(value), LE); - } - - get maxMeshMultiviewViewCount() { - return this.#view.getUint32(124, LE); - } - - set maxMeshMultiviewViewCount(value: number) { - this.#view.setUint32(124, Number(value), LE); - } - - get meshOutputPerVertexGranularity() { - return this.#view.getUint32(128, LE); - } - - set meshOutputPerVertexGranularity(value: number) { - this.#view.setUint32(128, Number(value), LE); - } - - get meshOutputPerPrimitiveGranularity() { - return this.#view.getUint32(132, LE); - } - - set meshOutputPerPrimitiveGranularity(value: number) { - this.#view.setUint32(132, Number(value), LE); - } - - get maxPreferredTaskWorkGroupInvocations() { - return this.#view.getUint32(136, LE); - } - - set maxPreferredTaskWorkGroupInvocations(value: number) { - this.#view.setUint32(136, Number(value), LE); - } - - get maxPreferredMeshWorkGroupInvocations() { - return this.#view.getUint32(140, LE); - } - - set maxPreferredMeshWorkGroupInvocations(value: number) { - this.#view.setUint32(140, Number(value), LE); - } - - get prefersLocalInvocationVertexOutput() { - return this.#view.getUint32(144, LE); - } - - set prefersLocalInvocationVertexOutput(value: Bool32) { - this.#view.setUint32(144, Number(value), LE); - } - - get prefersLocalInvocationPrimitiveOutput() { - return this.#view.getUint32(148, LE); - } - - set prefersLocalInvocationPrimitiveOutput(value: Bool32) { - this.#view.setUint32(148, Number(value), LE); - } - - get prefersCompactVertexOutput() { - return this.#view.getUint32(152, LE); - } - - set prefersCompactVertexOutput(value: Bool32) { - this.#view.setUint32(152, Number(value), LE); - } - - get prefersCompactPrimitiveOutput() { - return this.#view.getUint32(156, LE); - } - - set prefersCompactPrimitiveOutput(value: Bool32) { - this.#view.setUint32(156, Number(value), LE); - } -} - -export interface InitDrawMeshTasksIndirectCommandEXT { - groupCountX?: number; - groupCountY?: number; - groupCountZ?: number; -} - -export class DrawMeshTasksIndirectCommandEXT implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDrawMeshTasksIndirectCommandEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDrawMeshTasksIndirectCommandEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DrawMeshTasksIndirectCommandEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrawMeshTasksIndirectCommandEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DrawMeshTasksIndirectCommandEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DrawMeshTasksIndirectCommandEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.groupCountX !== undefined) this.groupCountX = data.groupCountX; - if (data.groupCountY !== undefined) this.groupCountY = data.groupCountY; - if (data.groupCountZ !== undefined) this.groupCountZ = data.groupCountZ; - } - } - - get groupCountX() { - return this.#view.getUint32(0, LE); - } - - set groupCountX(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get groupCountY() { - return this.#view.getUint32(4, LE); - } - - set groupCountY(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get groupCountZ() { - return this.#view.getUint32(8, LE); - } - - set groupCountZ(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitRayTracingShaderGroupCreateInfoNV { - pNext?: AnyPointer; - type?: RayTracingShaderGroupTypeKHR; - generalShader?: number; - closestHitShader?: number; - anyHitShader?: number; - intersectionShader?: number; -} - -export class RayTracingShaderGroupCreateInfoNV implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRayTracingShaderGroupCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingShaderGroupCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingShaderGroupCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingShaderGroupCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.type !== undefined) this.type = data.type; - if (data.generalShader !== undefined) this.generalShader = data.generalShader; - if (data.closestHitShader !== undefined) this.closestHitShader = data.closestHitShader; - if (data.anyHitShader !== undefined) this.anyHitShader = data.anyHitShader; - if (data.intersectionShader !== undefined) this.intersectionShader = data.intersectionShader; - } - this.sType = StructureType.RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get type() { - return this.#view.getUint32(16, LE); - } - - set type(value: RayTracingShaderGroupTypeKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get generalShader() { - return this.#view.getUint32(20, LE); - } - - set generalShader(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get closestHitShader() { - return this.#view.getUint32(24, LE); - } - - set closestHitShader(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get anyHitShader() { - return this.#view.getUint32(28, LE); - } - - set anyHitShader(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get intersectionShader() { - return this.#view.getUint32(32, LE); - } - - set intersectionShader(value: number) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitRayTracingShaderGroupCreateInfoKHR { - pNext?: AnyPointer; - type?: RayTracingShaderGroupTypeKHR; - generalShader?: number; - closestHitShader?: number; - anyHitShader?: number; - intersectionShader?: number; - pShaderGroupCaptureReplayHandle?: AnyPointer; -} - -export class RayTracingShaderGroupCreateInfoKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRayTracingShaderGroupCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingShaderGroupCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingShaderGroupCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingShaderGroupCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RayTracingShaderGroupCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.type !== undefined) this.type = data.type; - if (data.generalShader !== undefined) this.generalShader = data.generalShader; - if (data.closestHitShader !== undefined) this.closestHitShader = data.closestHitShader; - if (data.anyHitShader !== undefined) this.anyHitShader = data.anyHitShader; - if (data.intersectionShader !== undefined) this.intersectionShader = data.intersectionShader; - if (data.pShaderGroupCaptureReplayHandle !== undefined) this.pShaderGroupCaptureReplayHandle = data.pShaderGroupCaptureReplayHandle; - } - this.sType = StructureType.RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get type() { - return this.#view.getUint32(16, LE); - } - - set type(value: RayTracingShaderGroupTypeKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get generalShader() { - return this.#view.getUint32(20, LE); - } - - set generalShader(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get closestHitShader() { - return this.#view.getUint32(24, LE); - } - - set closestHitShader(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get anyHitShader() { - return this.#view.getUint32(28, LE); - } - - set anyHitShader(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get intersectionShader() { - return this.#view.getUint32(32, LE); - } - - set intersectionShader(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pShaderGroupCaptureReplayHandle() { - return this.#view.getBigUint64(40, LE); - } - - set pShaderGroupCaptureReplayHandle(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitRayTracingPipelineCreateInfoNV { - pNext?: AnyPointer; - flags?: PipelineCreateFlags; - stageCount?: number; - pStages?: AnyPointer; - groupCount?: number; - pGroups?: AnyPointer; - maxRecursionDepth?: number; - layout?: PipelineLayout; - basePipelineHandle?: Pipeline; - basePipelineIndex?: number; -} - -export class RayTracingPipelineCreateInfoNV implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRayTracingPipelineCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingPipelineCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(RayTracingPipelineCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingPipelineCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingPipelineCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RayTracingPipelineCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.stageCount !== undefined) this.stageCount = data.stageCount; - if (data.pStages !== undefined) this.pStages = data.pStages; - if (data.groupCount !== undefined) this.groupCount = data.groupCount; - if (data.pGroups !== undefined) this.pGroups = data.pGroups; - if (data.maxRecursionDepth !== undefined) this.maxRecursionDepth = data.maxRecursionDepth; - if (data.layout !== undefined) this.layout = data.layout; - if (data.basePipelineHandle !== undefined) this.basePipelineHandle = data.basePipelineHandle; - if (data.basePipelineIndex !== undefined) this.basePipelineIndex = data.basePipelineIndex; - } - this.sType = StructureType.RAY_TRACING_PIPELINE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get stageCount() { - return this.#view.getUint32(20, LE); - } - - set stageCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pStages() { - return this.#view.getBigUint64(24, LE); - } - - set pStages(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get groupCount() { - return this.#view.getUint32(32, LE); - } - - set groupCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pGroups() { - return this.#view.getBigUint64(40, LE); - } - - set pGroups(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get maxRecursionDepth() { - return this.#view.getUint32(48, LE); - } - - set maxRecursionDepth(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get layout() { - return this.#view.getBigUint64(56, LE); - } - - set layout(value: PipelineLayout) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get basePipelineHandle() { - return this.#view.getBigUint64(64, LE); - } - - set basePipelineHandle(value: Pipeline) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - - get basePipelineIndex() { - return this.#view.getInt32(72, LE); - } - - set basePipelineIndex(value: number) { - this.#view.setInt32(72, Number(value), LE); - } -} - -export interface InitRayTracingPipelineCreateInfoKHR { - pNext?: AnyPointer; - flags?: PipelineCreateFlags; - stageCount?: number; - pStages?: AnyPointer; - groupCount?: number; - pGroups?: AnyPointer; - maxPipelineRayRecursionDepth?: number; - pLibraryInfo?: AnyPointer; - pLibraryInterface?: AnyPointer; - pDynamicState?: AnyPointer; - layout?: PipelineLayout; - basePipelineHandle?: Pipeline; - basePipelineIndex?: number; -} - -export class RayTracingPipelineCreateInfoKHR implements BaseStruct { - static size = 104; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRayTracingPipelineCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingPipelineCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(RayTracingPipelineCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingPipelineCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingPipelineCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RayTracingPipelineCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.stageCount !== undefined) this.stageCount = data.stageCount; - if (data.pStages !== undefined) this.pStages = data.pStages; - if (data.groupCount !== undefined) this.groupCount = data.groupCount; - if (data.pGroups !== undefined) this.pGroups = data.pGroups; - if (data.maxPipelineRayRecursionDepth !== undefined) this.maxPipelineRayRecursionDepth = data.maxPipelineRayRecursionDepth; - if (data.pLibraryInfo !== undefined) this.pLibraryInfo = data.pLibraryInfo; - if (data.pLibraryInterface !== undefined) this.pLibraryInterface = data.pLibraryInterface; - if (data.pDynamicState !== undefined) this.pDynamicState = data.pDynamicState; - if (data.layout !== undefined) this.layout = data.layout; - if (data.basePipelineHandle !== undefined) this.basePipelineHandle = data.basePipelineHandle; - if (data.basePipelineIndex !== undefined) this.basePipelineIndex = data.basePipelineIndex; - } - this.sType = StructureType.RAY_TRACING_PIPELINE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get stageCount() { - return this.#view.getUint32(20, LE); - } - - set stageCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pStages() { - return this.#view.getBigUint64(24, LE); - } - - set pStages(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get groupCount() { - return this.#view.getUint32(32, LE); - } - - set groupCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pGroups() { - return this.#view.getBigUint64(40, LE); - } - - set pGroups(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get maxPipelineRayRecursionDepth() { - return this.#view.getUint32(48, LE); - } - - set maxPipelineRayRecursionDepth(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pLibraryInfo() { - return this.#view.getBigUint64(56, LE); - } - - set pLibraryInfo(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get pLibraryInterface() { - return this.#view.getBigUint64(64, LE); - } - - set pLibraryInterface(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - - get pDynamicState() { - return this.#view.getBigUint64(72, LE); - } - - set pDynamicState(value: AnyPointer) { - this.#view.setBigUint64(72, BigInt(anyPointer(value)), LE); - } - - get layout() { - return this.#view.getBigUint64(80, LE); - } - - set layout(value: PipelineLayout) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } - - get basePipelineHandle() { - return this.#view.getBigUint64(88, LE); - } - - set basePipelineHandle(value: Pipeline) { - this.#view.setBigUint64(88, BigInt(anyPointer(value)), LE); - } - - get basePipelineIndex() { - return this.#view.getInt32(96, LE); - } - - set basePipelineIndex(value: number) { - this.#view.setInt32(96, Number(value), LE); - } -} - -export interface InitGeometryTrianglesNV { - pNext?: AnyPointer; - vertexData?: Buffer; - vertexOffset?: DeviceSize; - vertexCount?: number; - vertexStride?: DeviceSize; - vertexFormat?: Format; - indexData?: Buffer; - indexOffset?: DeviceSize; - indexCount?: number; - indexType?: IndexType; - transformData?: Buffer; - transformOffset?: DeviceSize; -} - -export class GeometryTrianglesNV implements BaseStruct { - static size = 96; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGeometryTrianglesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGeometryTrianglesNV) { - if (data === undefined) { - this.#data = new Uint8Array(GeometryTrianglesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryTrianglesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GeometryTrianglesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GeometryTrianglesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.vertexData !== undefined) this.vertexData = data.vertexData; - if (data.vertexOffset !== undefined) this.vertexOffset = data.vertexOffset; - if (data.vertexCount !== undefined) this.vertexCount = data.vertexCount; - if (data.vertexStride !== undefined) this.vertexStride = data.vertexStride; - if (data.vertexFormat !== undefined) this.vertexFormat = data.vertexFormat; - if (data.indexData !== undefined) this.indexData = data.indexData; - if (data.indexOffset !== undefined) this.indexOffset = data.indexOffset; - if (data.indexCount !== undefined) this.indexCount = data.indexCount; - if (data.indexType !== undefined) this.indexType = data.indexType; - if (data.transformData !== undefined) this.transformData = data.transformData; - if (data.transformOffset !== undefined) this.transformOffset = data.transformOffset; - } - this.sType = StructureType.GEOMETRY_TRIANGLES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get vertexData() { - return this.#view.getBigUint64(16, LE); - } - - set vertexData(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get vertexOffset() { - return this.#view.getBigUint64(24, LE); - } - - set vertexOffset(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get vertexCount() { - return this.#view.getUint32(32, LE); - } - - set vertexCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get vertexStride() { - return this.#view.getBigUint64(40, LE); - } - - set vertexStride(value: DeviceSize) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get vertexFormat() { - return this.#view.getUint32(48, LE); - } - - set vertexFormat(value: Format) { - this.#view.setUint32(48, Number(value), LE); - } - - get indexData() { - return this.#view.getBigUint64(56, LE); - } - - set indexData(value: Buffer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get indexOffset() { - return this.#view.getBigUint64(64, LE); - } - - set indexOffset(value: DeviceSize) { - this.#view.setBigUint64(64, BigInt(value), LE); - } - - get indexCount() { - return this.#view.getUint32(72, LE); - } - - set indexCount(value: number) { - this.#view.setUint32(72, Number(value), LE); - } - - get indexType() { - return this.#view.getUint32(76, LE); - } - - set indexType(value: IndexType) { - this.#view.setUint32(76, Number(value), LE); - } - - get transformData() { - return this.#view.getBigUint64(80, LE); - } - - set transformData(value: Buffer) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } - - get transformOffset() { - return this.#view.getBigUint64(88, LE); - } - - set transformOffset(value: DeviceSize) { - this.#view.setBigUint64(88, BigInt(value), LE); - } -} - -export interface InitGeometryAABBNV { - pNext?: AnyPointer; - aabbData?: Buffer; - numAABBs?: number; - stride?: number; - offset?: DeviceSize; -} - -export class GeometryAABBNV implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGeometryAABBNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGeometryAABBNV) { - if (data === undefined) { - this.#data = new Uint8Array(GeometryAABBNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryAABBNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GeometryAABBNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GeometryAABBNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.aabbData !== undefined) this.aabbData = data.aabbData; - if (data.numAABBs !== undefined) this.numAABBs = data.numAABBs; - if (data.stride !== undefined) this.stride = data.stride; - if (data.offset !== undefined) this.offset = data.offset; - } - this.sType = StructureType.GEOMETRY_AABB_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get aabbData() { - return this.#view.getBigUint64(16, LE); - } - - set aabbData(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get numAABBs() { - return this.#view.getUint32(24, LE); - } - - set numAABBs(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get stride() { - return this.#view.getUint32(28, LE); - } - - set stride(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get offset() { - return this.#view.getBigUint64(32, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitGeometryDataNV { - triangles?: GeometryTrianglesNV; - aabbs?: GeometryAABBNV; -} - -export class GeometryDataNV implements BaseStruct { - static size = 136; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGeometryDataNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGeometryDataNV) { - if (data === undefined) { - this.#data = new Uint8Array(GeometryDataNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryDataNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GeometryDataNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GeometryDataNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.triangles !== undefined) this.triangles = data.triangles; - if (data.aabbs !== undefined) this.aabbs = data.aabbs; - } - } - - get triangles() { - return new GeometryTrianglesNV(this.#data.subarray(0, 0 + GeometryTrianglesNV.size)); - } - - set triangles(value: GeometryTrianglesNV) { - if (value[BUFFER].byteLength < GeometryTrianglesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get aabbs() { - return new GeometryAABBNV(this.#data.subarray(96, 96 + GeometryAABBNV.size)); - } - - set aabbs(value: GeometryAABBNV) { - if (value[BUFFER].byteLength < GeometryAABBNV.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 96); - } -} - -export interface InitGeometryNV { - pNext?: AnyPointer; - geometryType?: GeometryTypeKHR; - geometry?: GeometryDataNV; - flags?: GeometryFlagsKHR; -} - -export class GeometryNV implements BaseStruct { - static size = 160; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGeometryNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGeometryNV) { - if (data === undefined) { - this.#data = new Uint8Array(GeometryNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GeometryNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GeometryNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GeometryNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.geometryType !== undefined) this.geometryType = data.geometryType; - if (data.geometry !== undefined) this.geometry = data.geometry; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.GEOMETRY_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get geometryType() { - return this.#view.getUint32(16, LE); - } - - set geometryType(value: GeometryTypeKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get geometry() { - return new GeometryDataNV(this.#data.subarray(20, 20 + GeometryDataNV.size)); - } - - set geometry(value: GeometryDataNV) { - if (value[BUFFER].byteLength < GeometryDataNV.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } - - get flags() { - return this.#view.getUint32(156, LE); - } - - set flags(value: GeometryFlagsKHR) { - this.#view.setUint32(156, Number(value), LE); - } -} - -export interface InitAccelerationStructureInfoNV { - pNext?: AnyPointer; - type?: AccelerationStructureTypeNV; - flags?: BuildAccelerationStructureFlagsNV; - instanceCount?: number; - geometryCount?: number; - pGeometries?: AnyPointer; -} - -export class AccelerationStructureInfoNV implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.type !== undefined) this.type = data.type; - if (data.flags !== undefined) this.flags = data.flags; - if (data.instanceCount !== undefined) this.instanceCount = data.instanceCount; - if (data.geometryCount !== undefined) this.geometryCount = data.geometryCount; - if (data.pGeometries !== undefined) this.pGeometries = data.pGeometries; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get type() { - return this.#view.getUint32(16, LE); - } - - set type(value: AccelerationStructureTypeNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(20, LE); - } - - set flags(value: BuildAccelerationStructureFlagsNV) { - this.#view.setUint32(20, Number(value), LE); - } - - get instanceCount() { - return this.#view.getUint32(24, LE); - } - - set instanceCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get geometryCount() { - return this.#view.getUint32(28, LE); - } - - set geometryCount(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get pGeometries() { - return this.#view.getBigUint64(32, LE); - } - - set pGeometries(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitAccelerationStructureCreateInfoNV { - pNext?: AnyPointer; - compactedSize?: DeviceSize; - info?: AccelerationStructureInfoNV; -} - -export class AccelerationStructureCreateInfoNV implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.compactedSize !== undefined) this.compactedSize = data.compactedSize; - if (data.info !== undefined) this.info = data.info; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get compactedSize() { - return this.#view.getBigUint64(16, LE); - } - - set compactedSize(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get info() { - return new AccelerationStructureInfoNV(this.#data.subarray(24, 24 + AccelerationStructureInfoNV.size)); - } - - set info(value: AccelerationStructureInfoNV) { - if (value[BUFFER].byteLength < AccelerationStructureInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } -} - -export interface InitBindAccelerationStructureMemoryInfoNV { - pNext?: AnyPointer; - accelerationStructure?: AccelerationStructureNV; - memory?: DeviceMemory; - memoryOffset?: DeviceSize; - deviceIndexCount?: number; - pDeviceIndices?: AnyPointer; -} - -export class BindAccelerationStructureMemoryInfoNV implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindAccelerationStructureMemoryInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindAccelerationStructureMemoryInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(BindAccelerationStructureMemoryInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindAccelerationStructureMemoryInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindAccelerationStructureMemoryInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindAccelerationStructureMemoryInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; - if (data.memory !== undefined) this.memory = data.memory; - if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; - if (data.deviceIndexCount !== undefined) this.deviceIndexCount = data.deviceIndexCount; - if (data.pDeviceIndices !== undefined) this.pDeviceIndices = data.pDeviceIndices; - } - this.sType = StructureType.BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get accelerationStructure() { - return this.#view.getBigUint64(16, LE); - } - - set accelerationStructure(value: AccelerationStructureNV) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(24, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get memoryOffset() { - return this.#view.getBigUint64(32, LE); - } - - set memoryOffset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get deviceIndexCount() { - return this.#view.getUint32(40, LE); - } - - set deviceIndexCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get pDeviceIndices() { - return this.#view.getBigUint64(48, LE); - } - - set pDeviceIndices(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitWriteDescriptorSetAccelerationStructureKHR { - pNext?: AnyPointer; - accelerationStructureCount?: number; - pAccelerationStructures?: AnyPointer; -} - -export class WriteDescriptorSetAccelerationStructureKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitWriteDescriptorSetAccelerationStructureKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitWriteDescriptorSetAccelerationStructureKHR) { - if (data === undefined) { - this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSetAccelerationStructureKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < WriteDescriptorSetAccelerationStructureKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.accelerationStructureCount !== undefined) this.accelerationStructureCount = data.accelerationStructureCount; - if (data.pAccelerationStructures !== undefined) this.pAccelerationStructures = data.pAccelerationStructures; - } - this.sType = StructureType.WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get accelerationStructureCount() { - return this.#view.getUint32(16, LE); - } - - set accelerationStructureCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pAccelerationStructures() { - return this.#view.getBigUint64(24, LE); - } - - set pAccelerationStructures(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitWriteDescriptorSetAccelerationStructureNV { - pNext?: AnyPointer; - accelerationStructureCount?: number; - pAccelerationStructures?: AnyPointer; -} - -export class WriteDescriptorSetAccelerationStructureNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitWriteDescriptorSetAccelerationStructureNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitWriteDescriptorSetAccelerationStructureNV) { - if (data === undefined) { - this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, WriteDescriptorSetAccelerationStructureNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < WriteDescriptorSetAccelerationStructureNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(WriteDescriptorSetAccelerationStructureNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.accelerationStructureCount !== undefined) this.accelerationStructureCount = data.accelerationStructureCount; - if (data.pAccelerationStructures !== undefined) this.pAccelerationStructures = data.pAccelerationStructures; - } - this.sType = StructureType.WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get accelerationStructureCount() { - return this.#view.getUint32(16, LE); - } - - set accelerationStructureCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pAccelerationStructures() { - return this.#view.getBigUint64(24, LE); - } - - set pAccelerationStructures(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitAccelerationStructureMemoryRequirementsInfoNV { - pNext?: AnyPointer; - type?: AccelerationStructureMemoryRequirementsTypeNV; - accelerationStructure?: AccelerationStructureNV; -} - -export class AccelerationStructureMemoryRequirementsInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureMemoryRequirementsInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureMemoryRequirementsInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureMemoryRequirementsInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMemoryRequirementsInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureMemoryRequirementsInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureMemoryRequirementsInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.type !== undefined) this.type = data.type; - if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get type() { - return this.#view.getUint32(16, LE); - } - - set type(value: AccelerationStructureMemoryRequirementsTypeNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get accelerationStructure() { - return this.#view.getBigUint64(24, LE); - } - - set accelerationStructure(value: AccelerationStructureNV) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceAccelerationStructureFeaturesKHR { - pNext?: AnyPointer; - accelerationStructure?: Bool32; - accelerationStructureCaptureReplay?: Bool32; - accelerationStructureIndirectBuild?: Bool32; - accelerationStructureHostCommands?: Bool32; - descriptorBindingAccelerationStructureUpdateAfterBind?: Bool32; -} - -export class PhysicalDeviceAccelerationStructureFeaturesKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceAccelerationStructureFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAccelerationStructureFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceAccelerationStructureFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAccelerationStructureFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAccelerationStructureFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceAccelerationStructureFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; - if (data.accelerationStructureCaptureReplay !== undefined) this.accelerationStructureCaptureReplay = data.accelerationStructureCaptureReplay; - if (data.accelerationStructureIndirectBuild !== undefined) this.accelerationStructureIndirectBuild = data.accelerationStructureIndirectBuild; - if (data.accelerationStructureHostCommands !== undefined) this.accelerationStructureHostCommands = data.accelerationStructureHostCommands; - if (data.descriptorBindingAccelerationStructureUpdateAfterBind !== undefined) this.descriptorBindingAccelerationStructureUpdateAfterBind = data.descriptorBindingAccelerationStructureUpdateAfterBind; - } - this.sType = StructureType.PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get accelerationStructure() { - return this.#view.getUint32(16, LE); - } - - set accelerationStructure(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get accelerationStructureCaptureReplay() { - return this.#view.getUint32(20, LE); - } - - set accelerationStructureCaptureReplay(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get accelerationStructureIndirectBuild() { - return this.#view.getUint32(24, LE); - } - - set accelerationStructureIndirectBuild(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get accelerationStructureHostCommands() { - return this.#view.getUint32(28, LE); - } - - set accelerationStructureHostCommands(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get descriptorBindingAccelerationStructureUpdateAfterBind() { - return this.#view.getUint32(32, LE); - } - - set descriptorBindingAccelerationStructureUpdateAfterBind(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRayTracingPipelineFeaturesKHR { - pNext?: AnyPointer; - rayTracingPipeline?: Bool32; - rayTracingPipelineShaderGroupHandleCaptureReplay?: Bool32; - rayTracingPipelineShaderGroupHandleCaptureReplayMixed?: Bool32; - rayTracingPipelineTraceRaysIndirect?: Bool32; - rayTraversalPrimitiveCulling?: Bool32; -} - -export class PhysicalDeviceRayTracingPipelineFeaturesKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRayTracingPipelineFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingPipelineFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelineFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingPipelineFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingPipelineFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelineFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.rayTracingPipeline !== undefined) this.rayTracingPipeline = data.rayTracingPipeline; - if (data.rayTracingPipelineShaderGroupHandleCaptureReplay !== undefined) this.rayTracingPipelineShaderGroupHandleCaptureReplay = data.rayTracingPipelineShaderGroupHandleCaptureReplay; - if (data.rayTracingPipelineShaderGroupHandleCaptureReplayMixed !== undefined) this.rayTracingPipelineShaderGroupHandleCaptureReplayMixed = data.rayTracingPipelineShaderGroupHandleCaptureReplayMixed; - if (data.rayTracingPipelineTraceRaysIndirect !== undefined) this.rayTracingPipelineTraceRaysIndirect = data.rayTracingPipelineTraceRaysIndirect; - if (data.rayTraversalPrimitiveCulling !== undefined) this.rayTraversalPrimitiveCulling = data.rayTraversalPrimitiveCulling; - } - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get rayTracingPipeline() { - return this.#view.getUint32(16, LE); - } - - set rayTracingPipeline(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get rayTracingPipelineShaderGroupHandleCaptureReplay() { - return this.#view.getUint32(20, LE); - } - - set rayTracingPipelineShaderGroupHandleCaptureReplay(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get rayTracingPipelineShaderGroupHandleCaptureReplayMixed() { - return this.#view.getUint32(24, LE); - } - - set rayTracingPipelineShaderGroupHandleCaptureReplayMixed(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get rayTracingPipelineTraceRaysIndirect() { - return this.#view.getUint32(28, LE); - } - - set rayTracingPipelineTraceRaysIndirect(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get rayTraversalPrimitiveCulling() { - return this.#view.getUint32(32, LE); - } - - set rayTraversalPrimitiveCulling(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRayQueryFeaturesKHR { - pNext?: AnyPointer; - rayQuery?: Bool32; -} - -export class PhysicalDeviceRayQueryFeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRayQueryFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayQueryFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRayQueryFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayQueryFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayQueryFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRayQueryFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.rayQuery !== undefined) this.rayQuery = data.rayQuery; - } - this.sType = StructureType.PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get rayQuery() { - return this.#view.getUint32(16, LE); - } - - set rayQuery(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceAccelerationStructurePropertiesKHR { - pNext?: AnyPointer; - maxGeometryCount?: Deno.PointerValue; - maxInstanceCount?: Deno.PointerValue; - maxPrimitiveCount?: Deno.PointerValue; - maxPerStageDescriptorAccelerationStructures?: number; - maxPerStageDescriptorUpdateAfterBindAccelerationStructures?: number; - maxDescriptorSetAccelerationStructures?: number; - maxDescriptorSetUpdateAfterBindAccelerationStructures?: number; - minAccelerationStructureScratchOffsetAlignment?: number; -} - -export class PhysicalDeviceAccelerationStructurePropertiesKHR implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceAccelerationStructurePropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAccelerationStructurePropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceAccelerationStructurePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAccelerationStructurePropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAccelerationStructurePropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceAccelerationStructurePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxGeometryCount !== undefined) this.maxGeometryCount = data.maxGeometryCount; - if (data.maxInstanceCount !== undefined) this.maxInstanceCount = data.maxInstanceCount; - if (data.maxPrimitiveCount !== undefined) this.maxPrimitiveCount = data.maxPrimitiveCount; - if (data.maxPerStageDescriptorAccelerationStructures !== undefined) this.maxPerStageDescriptorAccelerationStructures = data.maxPerStageDescriptorAccelerationStructures; - if (data.maxPerStageDescriptorUpdateAfterBindAccelerationStructures !== undefined) this.maxPerStageDescriptorUpdateAfterBindAccelerationStructures = data.maxPerStageDescriptorUpdateAfterBindAccelerationStructures; - if (data.maxDescriptorSetAccelerationStructures !== undefined) this.maxDescriptorSetAccelerationStructures = data.maxDescriptorSetAccelerationStructures; - if (data.maxDescriptorSetUpdateAfterBindAccelerationStructures !== undefined) this.maxDescriptorSetUpdateAfterBindAccelerationStructures = data.maxDescriptorSetUpdateAfterBindAccelerationStructures; - if (data.minAccelerationStructureScratchOffsetAlignment !== undefined) this.minAccelerationStructureScratchOffsetAlignment = data.minAccelerationStructureScratchOffsetAlignment; - } - this.sType = StructureType.PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxGeometryCount() { - return this.#view.getBigUint64(16, LE); - } - - set maxGeometryCount(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get maxInstanceCount() { - return this.#view.getBigUint64(24, LE); - } - - set maxInstanceCount(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get maxPrimitiveCount() { - return this.#view.getBigUint64(32, LE); - } - - set maxPrimitiveCount(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get maxPerStageDescriptorAccelerationStructures() { - return this.#view.getUint32(40, LE); - } - - set maxPerStageDescriptorAccelerationStructures(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindAccelerationStructures() { - return this.#view.getUint32(44, LE); - } - - set maxPerStageDescriptorUpdateAfterBindAccelerationStructures(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get maxDescriptorSetAccelerationStructures() { - return this.#view.getUint32(48, LE); - } - - set maxDescriptorSetAccelerationStructures(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindAccelerationStructures() { - return this.#view.getUint32(52, LE); - } - - set maxDescriptorSetUpdateAfterBindAccelerationStructures(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get minAccelerationStructureScratchOffsetAlignment() { - return this.#view.getUint32(56, LE); - } - - set minAccelerationStructureScratchOffsetAlignment(value: number) { - this.#view.setUint32(56, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRayTracingPipelinePropertiesKHR { - pNext?: AnyPointer; - shaderGroupHandleSize?: number; - maxRayRecursionDepth?: number; - maxShaderGroupStride?: number; - shaderGroupBaseAlignment?: number; - shaderGroupHandleCaptureReplaySize?: number; - maxRayDispatchInvocationCount?: number; - shaderGroupHandleAlignment?: number; - maxRayHitAttributeSize?: number; -} - -export class PhysicalDeviceRayTracingPipelinePropertiesKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRayTracingPipelinePropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingPipelinePropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelinePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingPipelinePropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingPipelinePropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRayTracingPipelinePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderGroupHandleSize !== undefined) this.shaderGroupHandleSize = data.shaderGroupHandleSize; - if (data.maxRayRecursionDepth !== undefined) this.maxRayRecursionDepth = data.maxRayRecursionDepth; - if (data.maxShaderGroupStride !== undefined) this.maxShaderGroupStride = data.maxShaderGroupStride; - if (data.shaderGroupBaseAlignment !== undefined) this.shaderGroupBaseAlignment = data.shaderGroupBaseAlignment; - if (data.shaderGroupHandleCaptureReplaySize !== undefined) this.shaderGroupHandleCaptureReplaySize = data.shaderGroupHandleCaptureReplaySize; - if (data.maxRayDispatchInvocationCount !== undefined) this.maxRayDispatchInvocationCount = data.maxRayDispatchInvocationCount; - if (data.shaderGroupHandleAlignment !== undefined) this.shaderGroupHandleAlignment = data.shaderGroupHandleAlignment; - if (data.maxRayHitAttributeSize !== undefined) this.maxRayHitAttributeSize = data.maxRayHitAttributeSize; - } - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderGroupHandleSize() { - return this.#view.getUint32(16, LE); - } - - set shaderGroupHandleSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxRayRecursionDepth() { - return this.#view.getUint32(20, LE); - } - - set maxRayRecursionDepth(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxShaderGroupStride() { - return this.#view.getUint32(24, LE); - } - - set maxShaderGroupStride(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get shaderGroupBaseAlignment() { - return this.#view.getUint32(28, LE); - } - - set shaderGroupBaseAlignment(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get shaderGroupHandleCaptureReplaySize() { - return this.#view.getUint32(32, LE); - } - - set shaderGroupHandleCaptureReplaySize(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get maxRayDispatchInvocationCount() { - return this.#view.getUint32(36, LE); - } - - set maxRayDispatchInvocationCount(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get shaderGroupHandleAlignment() { - return this.#view.getUint32(40, LE); - } - - set shaderGroupHandleAlignment(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get maxRayHitAttributeSize() { - return this.#view.getUint32(44, LE); - } - - set maxRayHitAttributeSize(value: number) { - this.#view.setUint32(44, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRayTracingPropertiesNV { - pNext?: AnyPointer; - shaderGroupHandleSize?: number; - maxRecursionDepth?: number; - maxShaderGroupStride?: number; - shaderGroupBaseAlignment?: number; - maxGeometryCount?: Deno.PointerValue; - maxInstanceCount?: Deno.PointerValue; - maxTriangleCount?: Deno.PointerValue; - maxDescriptorSetAccelerationStructures?: number; -} - -export class PhysicalDeviceRayTracingPropertiesNV implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRayTracingPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRayTracingPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRayTracingPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderGroupHandleSize !== undefined) this.shaderGroupHandleSize = data.shaderGroupHandleSize; - if (data.maxRecursionDepth !== undefined) this.maxRecursionDepth = data.maxRecursionDepth; - if (data.maxShaderGroupStride !== undefined) this.maxShaderGroupStride = data.maxShaderGroupStride; - if (data.shaderGroupBaseAlignment !== undefined) this.shaderGroupBaseAlignment = data.shaderGroupBaseAlignment; - if (data.maxGeometryCount !== undefined) this.maxGeometryCount = data.maxGeometryCount; - if (data.maxInstanceCount !== undefined) this.maxInstanceCount = data.maxInstanceCount; - if (data.maxTriangleCount !== undefined) this.maxTriangleCount = data.maxTriangleCount; - if (data.maxDescriptorSetAccelerationStructures !== undefined) this.maxDescriptorSetAccelerationStructures = data.maxDescriptorSetAccelerationStructures; - } - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderGroupHandleSize() { - return this.#view.getUint32(16, LE); - } - - set shaderGroupHandleSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxRecursionDepth() { - return this.#view.getUint32(20, LE); - } - - set maxRecursionDepth(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxShaderGroupStride() { - return this.#view.getUint32(24, LE); - } - - set maxShaderGroupStride(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get shaderGroupBaseAlignment() { - return this.#view.getUint32(28, LE); - } - - set shaderGroupBaseAlignment(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get maxGeometryCount() { - return this.#view.getBigUint64(32, LE); - } - - set maxGeometryCount(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get maxInstanceCount() { - return this.#view.getBigUint64(40, LE); - } - - set maxInstanceCount(value: Deno.PointerValue) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get maxTriangleCount() { - return this.#view.getBigUint64(48, LE); - } - - set maxTriangleCount(value: Deno.PointerValue) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - - get maxDescriptorSetAccelerationStructures() { - return this.#view.getUint32(56, LE); - } - - set maxDescriptorSetAccelerationStructures(value: number) { - this.#view.setUint32(56, Number(value), LE); - } -} - -export interface InitStridedDeviceAddressRegionKHR { - deviceAddress?: DeviceAddress; - stride?: DeviceSize; - size?: DeviceSize; -} - -export class StridedDeviceAddressRegionKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitStridedDeviceAddressRegionKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitStridedDeviceAddressRegionKHR) { - if (data === undefined) { - this.#data = new Uint8Array(StridedDeviceAddressRegionKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, StridedDeviceAddressRegionKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < StridedDeviceAddressRegionKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(StridedDeviceAddressRegionKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; - if (data.stride !== undefined) this.stride = data.stride; - if (data.size !== undefined) this.size = data.size; - } - } - - get deviceAddress() { - return this.#view.getBigUint64(0, LE); - } - - set deviceAddress(value: DeviceAddress) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get stride() { - return this.#view.getBigUint64(8, LE); - } - - set stride(value: DeviceSize) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(16, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitTraceRaysIndirectCommandKHR { - width?: number; - height?: number; - depth?: number; -} - -export class TraceRaysIndirectCommandKHR implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitTraceRaysIndirectCommandKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitTraceRaysIndirectCommandKHR) { - if (data === undefined) { - this.#data = new Uint8Array(TraceRaysIndirectCommandKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TraceRaysIndirectCommandKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < TraceRaysIndirectCommandKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(TraceRaysIndirectCommandKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.width !== undefined) this.width = data.width; - if (data.height !== undefined) this.height = data.height; - if (data.depth !== undefined) this.depth = data.depth; - } - } - - get width() { - return this.#view.getUint32(0, LE); - } - - set width(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get height() { - return this.#view.getUint32(4, LE); - } - - set height(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get depth() { - return this.#view.getUint32(8, LE); - } - - set depth(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitTraceRaysIndirectCommand2KHR { - raygenShaderRecordAddress?: DeviceAddress; - raygenShaderRecordSize?: DeviceSize; - missShaderBindingTableAddress?: DeviceAddress; - missShaderBindingTableSize?: DeviceSize; - missShaderBindingTableStride?: DeviceSize; - hitShaderBindingTableAddress?: DeviceAddress; - hitShaderBindingTableSize?: DeviceSize; - hitShaderBindingTableStride?: DeviceSize; - callableShaderBindingTableAddress?: DeviceAddress; - callableShaderBindingTableSize?: DeviceSize; - callableShaderBindingTableStride?: DeviceSize; - width?: number; - height?: number; - depth?: number; -} - -export class TraceRaysIndirectCommand2KHR implements BaseStruct { - static size = 104; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitTraceRaysIndirectCommand2KHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitTraceRaysIndirectCommand2KHR) { - if (data === undefined) { - this.#data = new Uint8Array(TraceRaysIndirectCommand2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TraceRaysIndirectCommand2KHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < TraceRaysIndirectCommand2KHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(TraceRaysIndirectCommand2KHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.raygenShaderRecordAddress !== undefined) this.raygenShaderRecordAddress = data.raygenShaderRecordAddress; - if (data.raygenShaderRecordSize !== undefined) this.raygenShaderRecordSize = data.raygenShaderRecordSize; - if (data.missShaderBindingTableAddress !== undefined) this.missShaderBindingTableAddress = data.missShaderBindingTableAddress; - if (data.missShaderBindingTableSize !== undefined) this.missShaderBindingTableSize = data.missShaderBindingTableSize; - if (data.missShaderBindingTableStride !== undefined) this.missShaderBindingTableStride = data.missShaderBindingTableStride; - if (data.hitShaderBindingTableAddress !== undefined) this.hitShaderBindingTableAddress = data.hitShaderBindingTableAddress; - if (data.hitShaderBindingTableSize !== undefined) this.hitShaderBindingTableSize = data.hitShaderBindingTableSize; - if (data.hitShaderBindingTableStride !== undefined) this.hitShaderBindingTableStride = data.hitShaderBindingTableStride; - if (data.callableShaderBindingTableAddress !== undefined) this.callableShaderBindingTableAddress = data.callableShaderBindingTableAddress; - if (data.callableShaderBindingTableSize !== undefined) this.callableShaderBindingTableSize = data.callableShaderBindingTableSize; - if (data.callableShaderBindingTableStride !== undefined) this.callableShaderBindingTableStride = data.callableShaderBindingTableStride; - if (data.width !== undefined) this.width = data.width; - if (data.height !== undefined) this.height = data.height; - if (data.depth !== undefined) this.depth = data.depth; - } - } - - get raygenShaderRecordAddress() { - return this.#view.getBigUint64(0, LE); - } - - set raygenShaderRecordAddress(value: DeviceAddress) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get raygenShaderRecordSize() { - return this.#view.getBigUint64(8, LE); - } - - set raygenShaderRecordSize(value: DeviceSize) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get missShaderBindingTableAddress() { - return this.#view.getBigUint64(16, LE); - } - - set missShaderBindingTableAddress(value: DeviceAddress) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get missShaderBindingTableSize() { - return this.#view.getBigUint64(24, LE); - } - - set missShaderBindingTableSize(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get missShaderBindingTableStride() { - return this.#view.getBigUint64(32, LE); - } - - set missShaderBindingTableStride(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get hitShaderBindingTableAddress() { - return this.#view.getBigUint64(40, LE); - } - - set hitShaderBindingTableAddress(value: DeviceAddress) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get hitShaderBindingTableSize() { - return this.#view.getBigUint64(48, LE); - } - - set hitShaderBindingTableSize(value: DeviceSize) { - this.#view.setBigUint64(48, BigInt(value), LE); - } - - get hitShaderBindingTableStride() { - return this.#view.getBigUint64(56, LE); - } - - set hitShaderBindingTableStride(value: DeviceSize) { - this.#view.setBigUint64(56, BigInt(value), LE); - } - - get callableShaderBindingTableAddress() { - return this.#view.getBigUint64(64, LE); - } - - set callableShaderBindingTableAddress(value: DeviceAddress) { - this.#view.setBigUint64(64, BigInt(value), LE); - } - - get callableShaderBindingTableSize() { - return this.#view.getBigUint64(72, LE); - } - - set callableShaderBindingTableSize(value: DeviceSize) { - this.#view.setBigUint64(72, BigInt(value), LE); - } - - get callableShaderBindingTableStride() { - return this.#view.getBigUint64(80, LE); - } - - set callableShaderBindingTableStride(value: DeviceSize) { - this.#view.setBigUint64(80, BigInt(value), LE); - } - - get width() { - return this.#view.getUint32(88, LE); - } - - set width(value: number) { - this.#view.setUint32(88, Number(value), LE); - } - - get height() { - return this.#view.getUint32(92, LE); - } - - set height(value: number) { - this.#view.setUint32(92, Number(value), LE); - } - - get depth() { - return this.#view.getUint32(96, LE); - } - - set depth(value: number) { - this.#view.setUint32(96, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRayTracingMaintenance1FeaturesKHR { - pNext?: AnyPointer; - rayTracingMaintenance1?: Bool32; - rayTracingPipelineTraceRaysIndirect2?: Bool32; -} - -export class PhysicalDeviceRayTracingMaintenance1FeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRayTracingMaintenance1FeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingMaintenance1FeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRayTracingMaintenance1FeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.rayTracingMaintenance1 !== undefined) this.rayTracingMaintenance1 = data.rayTracingMaintenance1; - if (data.rayTracingPipelineTraceRaysIndirect2 !== undefined) this.rayTracingPipelineTraceRaysIndirect2 = data.rayTracingPipelineTraceRaysIndirect2; - } - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get rayTracingMaintenance1() { - return this.#view.getUint32(16, LE); - } - - set rayTracingMaintenance1(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get rayTracingPipelineTraceRaysIndirect2() { - return this.#view.getUint32(20, LE); - } - - set rayTracingPipelineTraceRaysIndirect2(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitDrmFormatModifierPropertiesListEXT { - pNext?: AnyPointer; - drmFormatModifierCount?: number; - pDrmFormatModifierProperties?: AnyPointer; -} - -export class DrmFormatModifierPropertiesListEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDrmFormatModifierPropertiesListEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDrmFormatModifierPropertiesListEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DrmFormatModifierPropertiesListEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierPropertiesListEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DrmFormatModifierPropertiesListEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DrmFormatModifierPropertiesListEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.drmFormatModifierCount !== undefined) this.drmFormatModifierCount = data.drmFormatModifierCount; - if (data.pDrmFormatModifierProperties !== undefined) this.pDrmFormatModifierProperties = data.pDrmFormatModifierProperties; - } - this.sType = StructureType.DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get drmFormatModifierCount() { - return this.#view.getUint32(16, LE); - } - - set drmFormatModifierCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pDrmFormatModifierProperties() { - return this.#view.getBigUint64(24, LE); - } - - set pDrmFormatModifierProperties(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDrmFormatModifierPropertiesEXT { - drmFormatModifier?: Deno.PointerValue; - drmFormatModifierPlaneCount?: number; - drmFormatModifierTilingFeatures?: FormatFeatureFlags; -} - -export class DrmFormatModifierPropertiesEXT implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDrmFormatModifierPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDrmFormatModifierPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DrmFormatModifierPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DrmFormatModifierPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DrmFormatModifierPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; - if (data.drmFormatModifierPlaneCount !== undefined) this.drmFormatModifierPlaneCount = data.drmFormatModifierPlaneCount; - if (data.drmFormatModifierTilingFeatures !== undefined) this.drmFormatModifierTilingFeatures = data.drmFormatModifierTilingFeatures; - } - } - - get drmFormatModifier() { - return this.#view.getBigUint64(0, LE); - } - - set drmFormatModifier(value: Deno.PointerValue) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get drmFormatModifierPlaneCount() { - return this.#view.getUint32(8, LE); - } - - set drmFormatModifierPlaneCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get drmFormatModifierTilingFeatures() { - return this.#view.getUint32(12, LE); - } - - set drmFormatModifierTilingFeatures(value: FormatFeatureFlags) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitPhysicalDeviceImageDrmFormatModifierInfoEXT { - pNext?: AnyPointer; - drmFormatModifier?: Deno.PointerValue; - sharingMode?: SharingMode; - queueFamilyIndexCount?: number; - pQueueFamilyIndices?: AnyPointer; -} - -export class PhysicalDeviceImageDrmFormatModifierInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImageDrmFormatModifierInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageDrmFormatModifierInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImageDrmFormatModifierInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageDrmFormatModifierInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageDrmFormatModifierInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImageDrmFormatModifierInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; - if (data.sharingMode !== undefined) this.sharingMode = data.sharingMode; - if (data.queueFamilyIndexCount !== undefined) this.queueFamilyIndexCount = data.queueFamilyIndexCount; - if (data.pQueueFamilyIndices !== undefined) this.pQueueFamilyIndices = data.pQueueFamilyIndices; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get drmFormatModifier() { - return this.#view.getBigUint64(16, LE); - } - - set drmFormatModifier(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get sharingMode() { - return this.#view.getUint32(24, LE); - } - - set sharingMode(value: SharingMode) { - this.#view.setUint32(24, Number(value), LE); - } - - get queueFamilyIndexCount() { - return this.#view.getUint32(28, LE); - } - - set queueFamilyIndexCount(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get pQueueFamilyIndices() { - return this.#view.getBigUint64(32, LE); - } - - set pQueueFamilyIndices(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageDrmFormatModifierListCreateInfoEXT { - pNext?: AnyPointer; - drmFormatModifierCount?: number; - pDrmFormatModifiers?: AnyPointer; -} - -export class ImageDrmFormatModifierListCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageDrmFormatModifierListCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageDrmFormatModifierListCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageDrmFormatModifierListCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageDrmFormatModifierListCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageDrmFormatModifierListCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageDrmFormatModifierListCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.drmFormatModifierCount !== undefined) this.drmFormatModifierCount = data.drmFormatModifierCount; - if (data.pDrmFormatModifiers !== undefined) this.pDrmFormatModifiers = data.pDrmFormatModifiers; - } - this.sType = StructureType.IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get drmFormatModifierCount() { - return this.#view.getUint32(16, LE); - } - - set drmFormatModifierCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pDrmFormatModifiers() { - return this.#view.getBigUint64(24, LE); - } - - set pDrmFormatModifiers(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageDrmFormatModifierExplicitCreateInfoEXT { - pNext?: AnyPointer; - drmFormatModifier?: Deno.PointerValue; - drmFormatModifierPlaneCount?: number; - pPlaneLayouts?: AnyPointer; -} - -export class ImageDrmFormatModifierExplicitCreateInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageDrmFormatModifierExplicitCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageDrmFormatModifierExplicitCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageDrmFormatModifierExplicitCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageDrmFormatModifierExplicitCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageDrmFormatModifierExplicitCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageDrmFormatModifierExplicitCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; - if (data.drmFormatModifierPlaneCount !== undefined) this.drmFormatModifierPlaneCount = data.drmFormatModifierPlaneCount; - if (data.pPlaneLayouts !== undefined) this.pPlaneLayouts = data.pPlaneLayouts; - } - this.sType = StructureType.IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get drmFormatModifier() { - return this.#view.getBigUint64(16, LE); - } - - set drmFormatModifier(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get drmFormatModifierPlaneCount() { - return this.#view.getUint32(24, LE); - } - - set drmFormatModifierPlaneCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pPlaneLayouts() { - return this.#view.getBigUint64(32, LE); - } - - set pPlaneLayouts(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageDrmFormatModifierPropertiesEXT { - pNext?: AnyPointer; - drmFormatModifier?: Deno.PointerValue; -} - -export class ImageDrmFormatModifierPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageDrmFormatModifierPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageDrmFormatModifierPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageDrmFormatModifierPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageDrmFormatModifierPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageDrmFormatModifierPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageDrmFormatModifierPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; - } - this.sType = StructureType.IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get drmFormatModifier() { - return this.#view.getBigUint64(16, LE); - } - - set drmFormatModifier(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitImageStencilUsageCreateInfo { - pNext?: AnyPointer; - stencilUsage?: ImageUsageFlags; -} - -export class ImageStencilUsageCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageStencilUsageCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageStencilUsageCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(ImageStencilUsageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageStencilUsageCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageStencilUsageCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageStencilUsageCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stencilUsage !== undefined) this.stencilUsage = data.stencilUsage; - } - this.sType = StructureType.IMAGE_STENCIL_USAGE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stencilUsage() { - return this.#view.getUint32(16, LE); - } - - set stencilUsage(value: ImageUsageFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDeviceMemoryOverallocationCreateInfoAMD { - pNext?: AnyPointer; - overallocationBehavior?: MemoryOverallocationBehaviorAMD; -} - -export class DeviceMemoryOverallocationCreateInfoAMD implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceMemoryOverallocationCreateInfoAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceMemoryOverallocationCreateInfoAMD) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceMemoryOverallocationCreateInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceMemoryOverallocationCreateInfoAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceMemoryOverallocationCreateInfoAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceMemoryOverallocationCreateInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.overallocationBehavior !== undefined) this.overallocationBehavior = data.overallocationBehavior; - } - this.sType = StructureType.DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get overallocationBehavior() { - return this.#view.getUint32(16, LE); - } - - set overallocationBehavior(value: MemoryOverallocationBehaviorAMD) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentDensityMapFeaturesEXT { - pNext?: AnyPointer; - fragmentDensityMap?: Bool32; - fragmentDensityMapDynamic?: Bool32; - fragmentDensityMapNonSubsampledImages?: Bool32; -} - -export class PhysicalDeviceFragmentDensityMapFeaturesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentDensityMapFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMapFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMapFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentDensityMap !== undefined) this.fragmentDensityMap = data.fragmentDensityMap; - if (data.fragmentDensityMapDynamic !== undefined) this.fragmentDensityMapDynamic = data.fragmentDensityMapDynamic; - if (data.fragmentDensityMapNonSubsampledImages !== undefined) this.fragmentDensityMapNonSubsampledImages = data.fragmentDensityMapNonSubsampledImages; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentDensityMap() { - return this.#view.getUint32(16, LE); - } - - set fragmentDensityMap(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get fragmentDensityMapDynamic() { - return this.#view.getUint32(20, LE); - } - - set fragmentDensityMapDynamic(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get fragmentDensityMapNonSubsampledImages() { - return this.#view.getUint32(24, LE); - } - - set fragmentDensityMapNonSubsampledImages(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentDensityMap2FeaturesEXT { - pNext?: AnyPointer; - fragmentDensityMapDeferred?: Bool32; -} - -export class PhysicalDeviceFragmentDensityMap2FeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentDensityMap2FeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMap2FeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMap2FeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMap2FeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentDensityMapDeferred !== undefined) this.fragmentDensityMapDeferred = data.fragmentDensityMapDeferred; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentDensityMapDeferred() { - return this.#view.getUint32(16, LE); - } - - set fragmentDensityMapDeferred(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM { - pNext?: AnyPointer; - fragmentDensityMapOffset?: Bool32; -} - -export class PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentDensityMapOffset !== undefined) this.fragmentDensityMapOffset = data.fragmentDensityMapOffset; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentDensityMapOffset() { - return this.#view.getUint32(16, LE); - } - - set fragmentDensityMapOffset(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentDensityMapPropertiesEXT { - pNext?: AnyPointer; - minFragmentDensityTexelSize?: Extent2D; - maxFragmentDensityTexelSize?: Extent2D; - fragmentDensityInvocations?: Bool32; -} - -export class PhysicalDeviceFragmentDensityMapPropertiesEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentDensityMapPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMapPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMapPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minFragmentDensityTexelSize !== undefined) this.minFragmentDensityTexelSize = data.minFragmentDensityTexelSize; - if (data.maxFragmentDensityTexelSize !== undefined) this.maxFragmentDensityTexelSize = data.maxFragmentDensityTexelSize; - if (data.fragmentDensityInvocations !== undefined) this.fragmentDensityInvocations = data.fragmentDensityInvocations; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minFragmentDensityTexelSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - - set minFragmentDensityTexelSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get maxFragmentDensityTexelSize() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - - set maxFragmentDensityTexelSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get fragmentDensityInvocations() { - return this.#view.getUint32(32, LE); - } - - set fragmentDensityInvocations(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentDensityMap2PropertiesEXT { - pNext?: AnyPointer; - subsampledLoads?: Bool32; - subsampledCoarseReconstructionEarlyAccess?: Bool32; - maxSubsampledArrayLayers?: number; - maxDescriptorSetSubsampledSamplers?: number; -} - -export class PhysicalDeviceFragmentDensityMap2PropertiesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentDensityMap2PropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMap2PropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2PropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMap2PropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMap2PropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMap2PropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.subsampledLoads !== undefined) this.subsampledLoads = data.subsampledLoads; - if (data.subsampledCoarseReconstructionEarlyAccess !== undefined) this.subsampledCoarseReconstructionEarlyAccess = data.subsampledCoarseReconstructionEarlyAccess; - if (data.maxSubsampledArrayLayers !== undefined) this.maxSubsampledArrayLayers = data.maxSubsampledArrayLayers; - if (data.maxDescriptorSetSubsampledSamplers !== undefined) this.maxDescriptorSetSubsampledSamplers = data.maxDescriptorSetSubsampledSamplers; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get subsampledLoads() { - return this.#view.getUint32(16, LE); - } - - set subsampledLoads(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get subsampledCoarseReconstructionEarlyAccess() { - return this.#view.getUint32(20, LE); - } - - set subsampledCoarseReconstructionEarlyAccess(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxSubsampledArrayLayers() { - return this.#view.getUint32(24, LE); - } - - set maxSubsampledArrayLayers(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get maxDescriptorSetSubsampledSamplers() { - return this.#view.getUint32(28, LE); - } - - set maxDescriptorSetSubsampledSamplers(value: number) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM { - pNext?: AnyPointer; - fragmentDensityOffsetGranularity?: Extent2D; -} - -export class PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentDensityOffsetGranularity !== undefined) this.fragmentDensityOffsetGranularity = data.fragmentDensityOffsetGranularity; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_PROPERTIES_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentDensityOffsetGranularity() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - - set fragmentDensityOffsetGranularity(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitRenderPassFragmentDensityMapCreateInfoEXT { - pNext?: AnyPointer; - fragmentDensityMapAttachment?: AttachmentReference; -} - -export class RenderPassFragmentDensityMapCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassFragmentDensityMapCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassFragmentDensityMapCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassFragmentDensityMapCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassFragmentDensityMapCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassFragmentDensityMapCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassFragmentDensityMapCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentDensityMapAttachment !== undefined) this.fragmentDensityMapAttachment = data.fragmentDensityMapAttachment; - } - this.sType = StructureType.RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentDensityMapAttachment() { - return new AttachmentReference(this.#data.subarray(16, 16 + AttachmentReference.size)); - } - - set fragmentDensityMapAttachment(value: AttachmentReference) { - if (value[BUFFER].byteLength < AttachmentReference.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitSubpassFragmentDensityMapOffsetEndInfoQCOM { - pNext?: AnyPointer; - fragmentDensityOffsetCount?: number; - pFragmentDensityOffsets?: AnyPointer; -} - -export class SubpassFragmentDensityMapOffsetEndInfoQCOM implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassFragmentDensityMapOffsetEndInfoQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassFragmentDensityMapOffsetEndInfoQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassFragmentDensityMapOffsetEndInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassFragmentDensityMapOffsetEndInfoQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassFragmentDensityMapOffsetEndInfoQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassFragmentDensityMapOffsetEndInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentDensityOffsetCount !== undefined) this.fragmentDensityOffsetCount = data.fragmentDensityOffsetCount; - if (data.pFragmentDensityOffsets !== undefined) this.pFragmentDensityOffsets = data.pFragmentDensityOffsets; - } - this.sType = StructureType.SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentDensityOffsetCount() { - return this.#view.getUint32(16, LE); - } - - set fragmentDensityOffsetCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pFragmentDensityOffsets() { - return this.#view.getBigUint64(24, LE); - } - - set pFragmentDensityOffsets(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceScalarBlockLayoutFeatures { - pNext?: AnyPointer; - scalarBlockLayout?: Bool32; -} - -export class PhysicalDeviceScalarBlockLayoutFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceScalarBlockLayoutFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceScalarBlockLayoutFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceScalarBlockLayoutFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceScalarBlockLayoutFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceScalarBlockLayoutFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceScalarBlockLayoutFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.scalarBlockLayout !== undefined) this.scalarBlockLayout = data.scalarBlockLayout; - } - this.sType = StructureType.PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get scalarBlockLayout() { - return this.#view.getUint32(16, LE); - } - - set scalarBlockLayout(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSurfaceProtectedCapabilitiesKHR { - pNext?: AnyPointer; - supportsProtected?: Bool32; -} - -export class SurfaceProtectedCapabilitiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceProtectedCapabilitiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceProtectedCapabilitiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceProtectedCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceProtectedCapabilitiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceProtectedCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceProtectedCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.supportsProtected !== undefined) this.supportsProtected = data.supportsProtected; - } - this.sType = StructureType.SURFACE_PROTECTED_CAPABILITIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get supportsProtected() { - return this.#view.getUint32(16, LE); - } - - set supportsProtected(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceUniformBufferStandardLayoutFeatures { - pNext?: AnyPointer; - uniformBufferStandardLayout?: Bool32; -} - -export class PhysicalDeviceUniformBufferStandardLayoutFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceUniformBufferStandardLayoutFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceUniformBufferStandardLayoutFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceUniformBufferStandardLayoutFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceUniformBufferStandardLayoutFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceUniformBufferStandardLayoutFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceUniformBufferStandardLayoutFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.uniformBufferStandardLayout !== undefined) this.uniformBufferStandardLayout = data.uniformBufferStandardLayout; - } - this.sType = StructureType.PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get uniformBufferStandardLayout() { - return this.#view.getUint32(16, LE); - } - - set uniformBufferStandardLayout(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDepthClipEnableFeaturesEXT { - pNext?: AnyPointer; - depthClipEnable?: Bool32; -} - -export class PhysicalDeviceDepthClipEnableFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDepthClipEnableFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDepthClipEnableFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDepthClipEnableFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthClipEnableFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDepthClipEnableFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDepthClipEnableFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.depthClipEnable !== undefined) this.depthClipEnable = data.depthClipEnable; - } - this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get depthClipEnable() { - return this.#view.getUint32(16, LE); - } - - set depthClipEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineRasterizationDepthClipStateCreateInfoEXT { - pNext?: AnyPointer; - flags?: PipelineRasterizationDepthClipStateCreateFlagsEXT; - depthClipEnable?: Bool32; -} - -export class PipelineRasterizationDepthClipStateCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRasterizationDepthClipStateCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationDepthClipStateCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRasterizationDepthClipStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationDepthClipStateCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationDepthClipStateCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRasterizationDepthClipStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.depthClipEnable !== undefined) this.depthClipEnable = data.depthClipEnable; - } - this.sType = StructureType.PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineRasterizationDepthClipStateCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get depthClipEnable() { - return this.#view.getUint32(20, LE); - } - - set depthClipEnable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMemoryBudgetPropertiesEXT { - pNext?: AnyPointer; - heapBudget?: BigUint64Array; - heapUsage?: BigUint64Array; -} - -export class PhysicalDeviceMemoryBudgetPropertiesEXT implements BaseStruct { - static size = 272; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMemoryBudgetPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryBudgetPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMemoryBudgetPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryBudgetPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryBudgetPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMemoryBudgetPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.heapBudget !== undefined) this.heapBudget = data.heapBudget; - if (data.heapUsage !== undefined) this.heapUsage = data.heapUsage; - } - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get heapBudget() { - return new BigUint64Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - - set heapBudget(value: BigUint64Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - - get heapUsage() { - return new BigUint64Array(this.#data.buffer, this.#data.byteOffset + 144, 16); - } - - set heapUsage(value: BigUint64Array) { - this.#data.set(new Uint8Array(value.buffer), 144); - } -} - -export interface InitPhysicalDeviceMemoryPriorityFeaturesEXT { - pNext?: AnyPointer; - memoryPriority?: Bool32; -} - -export class PhysicalDeviceMemoryPriorityFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMemoryPriorityFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMemoryPriorityFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMemoryPriorityFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMemoryPriorityFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMemoryPriorityFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMemoryPriorityFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryPriority !== undefined) this.memoryPriority = data.memoryPriority; - } - this.sType = StructureType.PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryPriority() { - return this.#view.getUint32(16, LE); - } - - set memoryPriority(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMemoryPriorityAllocateInfoEXT { - pNext?: AnyPointer; - priority?: number; -} - -export class MemoryPriorityAllocateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryPriorityAllocateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryPriorityAllocateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryPriorityAllocateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryPriorityAllocateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryPriorityAllocateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryPriorityAllocateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.priority !== undefined) this.priority = data.priority; - } - this.sType = StructureType.MEMORY_PRIORITY_ALLOCATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get priority() { - return this.#view.getFloat32(16, LE); - } - - set priority(value: number) { - this.#view.setFloat32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT { - pNext?: AnyPointer; - pageableDeviceLocalMemory?: Bool32; -} - -export class PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pageableDeviceLocalMemory !== undefined) this.pageableDeviceLocalMemory = data.pageableDeviceLocalMemory; - } - this.sType = StructureType.PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pageableDeviceLocalMemory() { - return this.#view.getUint32(16, LE); - } - - set pageableDeviceLocalMemory(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceBufferDeviceAddressFeatures { - pNext?: AnyPointer; - bufferDeviceAddress?: Bool32; - bufferDeviceAddressCaptureReplay?: Bool32; - bufferDeviceAddressMultiDevice?: Bool32; -} - -export class PhysicalDeviceBufferDeviceAddressFeatures implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceBufferDeviceAddressFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBufferDeviceAddressFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBufferDeviceAddressFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBufferDeviceAddressFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.bufferDeviceAddress !== undefined) this.bufferDeviceAddress = data.bufferDeviceAddress; - if (data.bufferDeviceAddressCaptureReplay !== undefined) this.bufferDeviceAddressCaptureReplay = data.bufferDeviceAddressCaptureReplay; - if (data.bufferDeviceAddressMultiDevice !== undefined) this.bufferDeviceAddressMultiDevice = data.bufferDeviceAddressMultiDevice; - } - this.sType = StructureType.PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get bufferDeviceAddress() { - return this.#view.getUint32(16, LE); - } - - set bufferDeviceAddress(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get bufferDeviceAddressCaptureReplay() { - return this.#view.getUint32(20, LE); - } - - set bufferDeviceAddressCaptureReplay(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get bufferDeviceAddressMultiDevice() { - return this.#view.getUint32(24, LE); - } - - set bufferDeviceAddressMultiDevice(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceBufferDeviceAddressFeaturesEXT { - pNext?: AnyPointer; - bufferDeviceAddress?: Bool32; - bufferDeviceAddressCaptureReplay?: Bool32; - bufferDeviceAddressMultiDevice?: Bool32; -} - -export class PhysicalDeviceBufferDeviceAddressFeaturesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceBufferDeviceAddressFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBufferDeviceAddressFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBufferDeviceAddressFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBufferDeviceAddressFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceBufferDeviceAddressFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.bufferDeviceAddress !== undefined) this.bufferDeviceAddress = data.bufferDeviceAddress; - if (data.bufferDeviceAddressCaptureReplay !== undefined) this.bufferDeviceAddressCaptureReplay = data.bufferDeviceAddressCaptureReplay; - if (data.bufferDeviceAddressMultiDevice !== undefined) this.bufferDeviceAddressMultiDevice = data.bufferDeviceAddressMultiDevice; - } - this.sType = StructureType.PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get bufferDeviceAddress() { - return this.#view.getUint32(16, LE); - } - - set bufferDeviceAddress(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get bufferDeviceAddressCaptureReplay() { - return this.#view.getUint32(20, LE); - } - - set bufferDeviceAddressCaptureReplay(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get bufferDeviceAddressMultiDevice() { - return this.#view.getUint32(24, LE); - } - - set bufferDeviceAddressMultiDevice(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitBufferDeviceAddressInfo { - pNext?: AnyPointer; - buffer?: Buffer; -} - -export class BufferDeviceAddressInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferDeviceAddressInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferDeviceAddressInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BufferDeviceAddressInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferDeviceAddressInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferDeviceAddressInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferDeviceAddressInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.buffer !== undefined) this.buffer = data.buffer; - } - this.sType = StructureType.BUFFER_DEVICE_ADDRESS_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get buffer() { - return this.#view.getBigUint64(16, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitBufferOpaqueCaptureAddressCreateInfo { - pNext?: AnyPointer; - opaqueCaptureAddress?: Deno.PointerValue; -} - -export class BufferOpaqueCaptureAddressCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferOpaqueCaptureAddressCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferOpaqueCaptureAddressCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(BufferOpaqueCaptureAddressCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferOpaqueCaptureAddressCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferOpaqueCaptureAddressCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferOpaqueCaptureAddressCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.opaqueCaptureAddress !== undefined) this.opaqueCaptureAddress = data.opaqueCaptureAddress; - } - this.sType = StructureType.BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get opaqueCaptureAddress() { - return this.#view.getBigUint64(16, LE); - } - - set opaqueCaptureAddress(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitBufferDeviceAddressCreateInfoEXT { - pNext?: AnyPointer; - deviceAddress?: DeviceAddress; -} - -export class BufferDeviceAddressCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferDeviceAddressCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferDeviceAddressCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(BufferDeviceAddressCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferDeviceAddressCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferDeviceAddressCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferDeviceAddressCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; - } - this.sType = StructureType.BUFFER_DEVICE_ADDRESS_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceAddress() { - return this.#view.getBigUint64(16, LE); - } - - set deviceAddress(value: DeviceAddress) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceImageViewImageFormatInfoEXT { - pNext?: AnyPointer; - imageViewType?: ImageViewType; -} - -export class PhysicalDeviceImageViewImageFormatInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImageViewImageFormatInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageViewImageFormatInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImageViewImageFormatInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageViewImageFormatInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageViewImageFormatInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImageViewImageFormatInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageViewType !== undefined) this.imageViewType = data.imageViewType; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageViewType() { - return this.#view.getUint32(16, LE); - } - - set imageViewType(value: ImageViewType) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitFilterCubicImageViewImageFormatPropertiesEXT { - pNext?: AnyPointer; - filterCubic?: Bool32; - filterCubicMinmax?: Bool32; -} - -export class FilterCubicImageViewImageFormatPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFilterCubicImageViewImageFormatPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFilterCubicImageViewImageFormatPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(FilterCubicImageViewImageFormatPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FilterCubicImageViewImageFormatPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FilterCubicImageViewImageFormatPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FilterCubicImageViewImageFormatPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.filterCubic !== undefined) this.filterCubic = data.filterCubic; - if (data.filterCubicMinmax !== undefined) this.filterCubicMinmax = data.filterCubicMinmax; - } - this.sType = StructureType.FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get filterCubic() { - return this.#view.getUint32(16, LE); - } - - set filterCubic(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get filterCubicMinmax() { - return this.#view.getUint32(20, LE); - } - - set filterCubicMinmax(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceImagelessFramebufferFeatures { - pNext?: AnyPointer; - imagelessFramebuffer?: Bool32; -} - -export class PhysicalDeviceImagelessFramebufferFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImagelessFramebufferFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImagelessFramebufferFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImagelessFramebufferFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImagelessFramebufferFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImagelessFramebufferFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImagelessFramebufferFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imagelessFramebuffer !== undefined) this.imagelessFramebuffer = data.imagelessFramebuffer; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imagelessFramebuffer() { - return this.#view.getUint32(16, LE); - } - - set imagelessFramebuffer(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitFramebufferAttachmentsCreateInfo { - pNext?: AnyPointer; - attachmentImageInfoCount?: number; - pAttachmentImageInfos?: AnyPointer; -} - -export class FramebufferAttachmentsCreateInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFramebufferAttachmentsCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFramebufferAttachmentsCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(FramebufferAttachmentsCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferAttachmentsCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FramebufferAttachmentsCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FramebufferAttachmentsCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.attachmentImageInfoCount !== undefined) this.attachmentImageInfoCount = data.attachmentImageInfoCount; - if (data.pAttachmentImageInfos !== undefined) this.pAttachmentImageInfos = data.pAttachmentImageInfos; - } - this.sType = StructureType.FRAMEBUFFER_ATTACHMENTS_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get attachmentImageInfoCount() { - return this.#view.getUint32(16, LE); - } - - set attachmentImageInfoCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pAttachmentImageInfos() { - return this.#view.getBigUint64(24, LE); - } - - set pAttachmentImageInfos(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitFramebufferAttachmentImageInfo { - pNext?: AnyPointer; - flags?: ImageCreateFlags; - usage?: ImageUsageFlags; - width?: number; - height?: number; - layerCount?: number; - viewFormatCount?: number; - pViewFormats?: AnyPointer; -} - -export class FramebufferAttachmentImageInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFramebufferAttachmentImageInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFramebufferAttachmentImageInfo) { - if (data === undefined) { - this.#data = new Uint8Array(FramebufferAttachmentImageInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferAttachmentImageInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FramebufferAttachmentImageInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FramebufferAttachmentImageInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.usage !== undefined) this.usage = data.usage; - if (data.width !== undefined) this.width = data.width; - if (data.height !== undefined) this.height = data.height; - if (data.layerCount !== undefined) this.layerCount = data.layerCount; - if (data.viewFormatCount !== undefined) this.viewFormatCount = data.viewFormatCount; - if (data.pViewFormats !== undefined) this.pViewFormats = data.pViewFormats; - } - this.sType = StructureType.FRAMEBUFFER_ATTACHMENT_IMAGE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: ImageCreateFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get usage() { - return this.#view.getUint32(20, LE); - } - - set usage(value: ImageUsageFlags) { - this.#view.setUint32(20, Number(value), LE); - } - - get width() { - return this.#view.getUint32(24, LE); - } - - set width(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get height() { - return this.#view.getUint32(28, LE); - } - - set height(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get layerCount() { - return this.#view.getUint32(32, LE); - } - - set layerCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get viewFormatCount() { - return this.#view.getUint32(36, LE); - } - - set viewFormatCount(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get pViewFormats() { - return this.#view.getBigUint64(40, LE); - } - - set pViewFormats(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitRenderPassAttachmentBeginInfo { - pNext?: AnyPointer; - attachmentCount?: number; - pAttachments?: AnyPointer; -} - -export class RenderPassAttachmentBeginInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassAttachmentBeginInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassAttachmentBeginInfo) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassAttachmentBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassAttachmentBeginInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassAttachmentBeginInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassAttachmentBeginInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; - if (data.pAttachments !== undefined) this.pAttachments = data.pAttachments; - } - this.sType = StructureType.RENDER_PASS_ATTACHMENT_BEGIN_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get attachmentCount() { - return this.#view.getUint32(16, LE); - } - - set attachmentCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pAttachments() { - return this.#view.getBigUint64(24, LE); - } - - set pAttachments(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceTextureCompressionASTCHDRFeatures { - pNext?: AnyPointer; - textureCompressionASTC_HDR?: Bool32; -} - -export class PhysicalDeviceTextureCompressionASTCHDRFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceTextureCompressionASTCHDRFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTextureCompressionASTCHDRFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceTextureCompressionASTCHDRFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTextureCompressionASTCHDRFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTextureCompressionASTCHDRFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceTextureCompressionASTCHDRFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.textureCompressionASTC_HDR !== undefined) this.textureCompressionASTC_HDR = data.textureCompressionASTC_HDR; - } - this.sType = StructureType.PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get textureCompressionASTC_HDR() { - return this.#view.getUint32(16, LE); - } - - set textureCompressionASTC_HDR(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceCooperativeMatrixFeaturesNV { - pNext?: AnyPointer; - cooperativeMatrix?: Bool32; - cooperativeMatrixRobustBufferAccess?: Bool32; -} - -export class PhysicalDeviceCooperativeMatrixFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceCooperativeMatrixFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCooperativeMatrixFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCooperativeMatrixFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCooperativeMatrixFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.cooperativeMatrix !== undefined) this.cooperativeMatrix = data.cooperativeMatrix; - if (data.cooperativeMatrixRobustBufferAccess !== undefined) this.cooperativeMatrixRobustBufferAccess = data.cooperativeMatrixRobustBufferAccess; - } - this.sType = StructureType.PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get cooperativeMatrix() { - return this.#view.getUint32(16, LE); - } - - set cooperativeMatrix(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get cooperativeMatrixRobustBufferAccess() { - return this.#view.getUint32(20, LE); - } - - set cooperativeMatrixRobustBufferAccess(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceCooperativeMatrixPropertiesNV { - pNext?: AnyPointer; - cooperativeMatrixSupportedStages?: ShaderStageFlags; -} - -export class PhysicalDeviceCooperativeMatrixPropertiesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceCooperativeMatrixPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCooperativeMatrixPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCooperativeMatrixPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCooperativeMatrixPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceCooperativeMatrixPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.cooperativeMatrixSupportedStages !== undefined) this.cooperativeMatrixSupportedStages = data.cooperativeMatrixSupportedStages; - } - this.sType = StructureType.PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get cooperativeMatrixSupportedStages() { - return this.#view.getUint32(16, LE); - } - - set cooperativeMatrixSupportedStages(value: ShaderStageFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitCooperativeMatrixPropertiesNV { - pNext?: AnyPointer; - MSize?: number; - NSize?: number; - KSize?: number; - AType?: ComponentTypeNV; - BType?: ComponentTypeNV; - CType?: ComponentTypeNV; - DType?: ComponentTypeNV; - scope?: ScopeNV; -} - -export class CooperativeMatrixPropertiesNV implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCooperativeMatrixPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCooperativeMatrixPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(CooperativeMatrixPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CooperativeMatrixPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CooperativeMatrixPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CooperativeMatrixPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.MSize !== undefined) this.MSize = data.MSize; - if (data.NSize !== undefined) this.NSize = data.NSize; - if (data.KSize !== undefined) this.KSize = data.KSize; - if (data.AType !== undefined) this.AType = data.AType; - if (data.BType !== undefined) this.BType = data.BType; - if (data.CType !== undefined) this.CType = data.CType; - if (data.DType !== undefined) this.DType = data.DType; - if (data.scope !== undefined) this.scope = data.scope; - } - this.sType = StructureType.COOPERATIVE_MATRIX_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get MSize() { - return this.#view.getUint32(16, LE); - } - - set MSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get NSize() { - return this.#view.getUint32(20, LE); - } - - set NSize(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get KSize() { - return this.#view.getUint32(24, LE); - } - - set KSize(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get AType() { - return this.#view.getUint32(28, LE); - } - - set AType(value: ComponentTypeNV) { - this.#view.setUint32(28, Number(value), LE); - } - - get BType() { - return this.#view.getUint32(32, LE); - } - - set BType(value: ComponentTypeNV) { - this.#view.setUint32(32, Number(value), LE); - } - - get CType() { - return this.#view.getUint32(36, LE); - } - - set CType(value: ComponentTypeNV) { - this.#view.setUint32(36, Number(value), LE); - } - - get DType() { - return this.#view.getUint32(40, LE); - } - - set DType(value: ComponentTypeNV) { - this.#view.setUint32(40, Number(value), LE); - } - - get scope() { - return this.#view.getUint32(44, LE); - } - - set scope(value: ScopeNV) { - this.#view.setUint32(44, Number(value), LE); - } -} - -export interface InitPhysicalDeviceYcbcrImageArraysFeaturesEXT { - pNext?: AnyPointer; - ycbcrImageArrays?: Bool32; -} - -export class PhysicalDeviceYcbcrImageArraysFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceYcbcrImageArraysFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceYcbcrImageArraysFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceYcbcrImageArraysFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceYcbcrImageArraysFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceYcbcrImageArraysFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceYcbcrImageArraysFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.ycbcrImageArrays !== undefined) this.ycbcrImageArrays = data.ycbcrImageArrays; - } - this.sType = StructureType.PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get ycbcrImageArrays() { - return this.#view.getUint32(16, LE); - } - - set ycbcrImageArrays(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImageViewHandleInfoNVX { - pNext?: AnyPointer; - imageView?: ImageView; - descriptorType?: DescriptorType; - sampler?: Sampler; -} - -export class ImageViewHandleInfoNVX implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageViewHandleInfoNVX); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewHandleInfoNVX) { - if (data === undefined) { - this.#data = new Uint8Array(ImageViewHandleInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewHandleInfoNVX.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewHandleInfoNVX.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageViewHandleInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageView !== undefined) this.imageView = data.imageView; - if (data.descriptorType !== undefined) this.descriptorType = data.descriptorType; - if (data.sampler !== undefined) this.sampler = data.sampler; - } - this.sType = StructureType.IMAGE_VIEW_HANDLE_INFO_NVX; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageView() { - return this.#view.getBigUint64(16, LE); - } - - set imageView(value: ImageView) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get descriptorType() { - return this.#view.getUint32(24, LE); - } - - set descriptorType(value: DescriptorType) { - this.#view.setUint32(24, Number(value), LE); - } - - get sampler() { - return this.#view.getBigUint64(32, LE); - } - - set sampler(value: Sampler) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageViewAddressPropertiesNVX { - pNext?: AnyPointer; - deviceAddress?: DeviceAddress; - size?: DeviceSize; -} - -export class ImageViewAddressPropertiesNVX implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageViewAddressPropertiesNVX); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewAddressPropertiesNVX) { - if (data === undefined) { - this.#data = new Uint8Array(ImageViewAddressPropertiesNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewAddressPropertiesNVX.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewAddressPropertiesNVX.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageViewAddressPropertiesNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; - if (data.size !== undefined) this.size = data.size; - } - this.sType = StructureType.IMAGE_VIEW_ADDRESS_PROPERTIES_NVX; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceAddress() { - return this.#view.getBigUint64(16, LE); - } - - set deviceAddress(value: DeviceAddress) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(24, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitPresentFrameTokenGGP { - pNext?: AnyPointer; - frameToken?: Deno.PointerValue; -} - -export class PresentFrameTokenGGP implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPresentFrameTokenGGP); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPresentFrameTokenGGP) { - if (data === undefined) { - this.#data = new Uint8Array(PresentFrameTokenGGP.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PresentFrameTokenGGP.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PresentFrameTokenGGP.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PresentFrameTokenGGP.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.frameToken !== undefined) this.frameToken = data.frameToken; - } - this.sType = StructureType.PRESENT_FRAME_TOKEN_GGP; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get frameToken() { - return this.#view.getBigUint64(16, LE); - } - - set frameToken(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitPipelineCreationFeedback { - flags?: PipelineCreationFeedbackFlags; - duration?: Deno.PointerValue; -} - -export class PipelineCreationFeedback implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineCreationFeedback); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCreationFeedback) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineCreationFeedback.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCreationFeedback.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCreationFeedback.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineCreationFeedback.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.flags !== undefined) this.flags = data.flags; - if (data.duration !== undefined) this.duration = data.duration; - } - } - - get flags() { - return this.#view.getUint32(0, LE); - } - - set flags(value: PipelineCreationFeedbackFlags) { - this.#view.setUint32(0, Number(value), LE); - } - - get duration() { - return this.#view.getBigUint64(8, LE); - } - - set duration(value: Deno.PointerValue) { - this.#view.setBigUint64(8, BigInt(value), LE); - } -} - -export interface InitPipelineCreationFeedbackCreateInfo { - pNext?: AnyPointer; - pPipelineCreationFeedback?: AnyPointer; - pipelineStageCreationFeedbackCount?: number; - pPipelineStageCreationFeedbacks?: AnyPointer; -} - -export class PipelineCreationFeedbackCreateInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineCreationFeedbackCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCreationFeedbackCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineCreationFeedbackCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCreationFeedbackCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCreationFeedbackCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineCreationFeedbackCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pPipelineCreationFeedback !== undefined) this.pPipelineCreationFeedback = data.pPipelineCreationFeedback; - if (data.pipelineStageCreationFeedbackCount !== undefined) this.pipelineStageCreationFeedbackCount = data.pipelineStageCreationFeedbackCount; - if (data.pPipelineStageCreationFeedbacks !== undefined) this.pPipelineStageCreationFeedbacks = data.pPipelineStageCreationFeedbacks; - } - this.sType = StructureType.PIPELINE_CREATION_FEEDBACK_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pPipelineCreationFeedback() { - return this.#view.getBigUint64(16, LE); - } - - set pPipelineCreationFeedback(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get pipelineStageCreationFeedbackCount() { - return this.#view.getUint32(24, LE); - } - - set pipelineStageCreationFeedbackCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pPipelineStageCreationFeedbacks() { - return this.#view.getBigUint64(32, LE); - } - - set pPipelineStageCreationFeedbacks(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSurfaceFullScreenExclusiveInfoEXT { - pNext?: AnyPointer; - fullScreenExclusive?: FullScreenExclusiveEXT; -} - -export class SurfaceFullScreenExclusiveInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceFullScreenExclusiveInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceFullScreenExclusiveInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceFullScreenExclusiveInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFullScreenExclusiveInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceFullScreenExclusiveInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceFullScreenExclusiveInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fullScreenExclusive !== undefined) this.fullScreenExclusive = data.fullScreenExclusive; - } - this.sType = StructureType.SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fullScreenExclusive() { - return this.#view.getUint32(16, LE); - } - - set fullScreenExclusive(value: FullScreenExclusiveEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSurfaceFullScreenExclusiveWin32InfoEXT { - pNext?: AnyPointer; - hmonitor?: Deno.PointerValue; -} - -export class SurfaceFullScreenExclusiveWin32InfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceFullScreenExclusiveWin32InfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceFullScreenExclusiveWin32InfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceFullScreenExclusiveWin32InfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceFullScreenExclusiveWin32InfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceFullScreenExclusiveWin32InfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceFullScreenExclusiveWin32InfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.hmonitor !== undefined) this.hmonitor = data.hmonitor; - } - this.sType = StructureType.SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get hmonitor() { - return this.#view.getBigUint64(16, LE); - } - - set hmonitor(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSurfaceCapabilitiesFullScreenExclusiveEXT { - pNext?: AnyPointer; - fullScreenExclusiveSupported?: Bool32; -} - -export class SurfaceCapabilitiesFullScreenExclusiveEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceCapabilitiesFullScreenExclusiveEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilitiesFullScreenExclusiveEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceCapabilitiesFullScreenExclusiveEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilitiesFullScreenExclusiveEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilitiesFullScreenExclusiveEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceCapabilitiesFullScreenExclusiveEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fullScreenExclusiveSupported !== undefined) this.fullScreenExclusiveSupported = data.fullScreenExclusiveSupported; - } - this.sType = StructureType.SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fullScreenExclusiveSupported() { - return this.#view.getUint32(16, LE); - } - - set fullScreenExclusiveSupported(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevicePresentBarrierFeaturesNV { - pNext?: AnyPointer; - presentBarrier?: Bool32; -} - -export class PhysicalDevicePresentBarrierFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePresentBarrierFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePresentBarrierFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePresentBarrierFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePresentBarrierFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePresentBarrierFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePresentBarrierFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.presentBarrier !== undefined) this.presentBarrier = data.presentBarrier; - } - this.sType = StructureType.PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get presentBarrier() { - return this.#view.getUint32(16, LE); - } - - set presentBarrier(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSurfaceCapabilitiesPresentBarrierNV { - pNext?: AnyPointer; - presentBarrierSupported?: Bool32; -} - -export class SurfaceCapabilitiesPresentBarrierNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSurfaceCapabilitiesPresentBarrierNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSurfaceCapabilitiesPresentBarrierNV) { - if (data === undefined) { - this.#data = new Uint8Array(SurfaceCapabilitiesPresentBarrierNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SurfaceCapabilitiesPresentBarrierNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SurfaceCapabilitiesPresentBarrierNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SurfaceCapabilitiesPresentBarrierNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.presentBarrierSupported !== undefined) this.presentBarrierSupported = data.presentBarrierSupported; - } - this.sType = StructureType.SURFACE_CAPABILITIES_PRESENT_BARRIER_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get presentBarrierSupported() { - return this.#view.getUint32(16, LE); - } - - set presentBarrierSupported(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSwapchainPresentBarrierCreateInfoNV { - pNext?: AnyPointer; - presentBarrierEnable?: Bool32; -} - -export class SwapchainPresentBarrierCreateInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSwapchainPresentBarrierCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSwapchainPresentBarrierCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(SwapchainPresentBarrierCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SwapchainPresentBarrierCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SwapchainPresentBarrierCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SwapchainPresentBarrierCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.presentBarrierEnable !== undefined) this.presentBarrierEnable = data.presentBarrierEnable; - } - this.sType = StructureType.SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get presentBarrierEnable() { - return this.#view.getUint32(16, LE); - } - - set presentBarrierEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevicePerformanceQueryFeaturesKHR { - pNext?: AnyPointer; - performanceCounterQueryPools?: Bool32; - performanceCounterMultipleQueryPools?: Bool32; -} - -export class PhysicalDevicePerformanceQueryFeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePerformanceQueryFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePerformanceQueryFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePerformanceQueryFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePerformanceQueryFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePerformanceQueryFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePerformanceQueryFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.performanceCounterQueryPools !== undefined) this.performanceCounterQueryPools = data.performanceCounterQueryPools; - if (data.performanceCounterMultipleQueryPools !== undefined) this.performanceCounterMultipleQueryPools = data.performanceCounterMultipleQueryPools; - } - this.sType = StructureType.PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get performanceCounterQueryPools() { - return this.#view.getUint32(16, LE); - } - - set performanceCounterQueryPools(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get performanceCounterMultipleQueryPools() { - return this.#view.getUint32(20, LE); - } - - set performanceCounterMultipleQueryPools(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDevicePerformanceQueryPropertiesKHR { - pNext?: AnyPointer; - allowCommandBufferQueryCopies?: Bool32; -} - -export class PhysicalDevicePerformanceQueryPropertiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePerformanceQueryPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePerformanceQueryPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePerformanceQueryPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePerformanceQueryPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePerformanceQueryPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePerformanceQueryPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.allowCommandBufferQueryCopies !== undefined) this.allowCommandBufferQueryCopies = data.allowCommandBufferQueryCopies; - } - this.sType = StructureType.PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get allowCommandBufferQueryCopies() { - return this.#view.getUint32(16, LE); - } - - set allowCommandBufferQueryCopies(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPerformanceCounterKHR { - pNext?: AnyPointer; - unit?: PerformanceCounterUnitKHR; - scope?: PerformanceCounterScopeKHR; - storage?: PerformanceCounterStorageKHR; - uuid?: Uint8Array; -} - -export class PerformanceCounterKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPerformanceCounterKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceCounterKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PerformanceCounterKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceCounterKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceCounterKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PerformanceCounterKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.unit !== undefined) this.unit = data.unit; - if (data.scope !== undefined) this.scope = data.scope; - if (data.storage !== undefined) this.storage = data.storage; - if (data.uuid !== undefined) this.uuid = data.uuid; - } - this.sType = StructureType.PERFORMANCE_COUNTER_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get unit() { - return this.#view.getUint32(16, LE); - } - - set unit(value: PerformanceCounterUnitKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get scope() { - return this.#view.getUint32(20, LE); - } - - set scope(value: PerformanceCounterScopeKHR) { - this.#view.setUint32(20, Number(value), LE); - } - - get storage() { - return this.#view.getUint32(24, LE); - } - - set storage(value: PerformanceCounterStorageKHR) { - this.#view.setUint32(24, Number(value), LE); - } - - get uuid() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 28, 16); - } - - set uuid(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 28); - } -} - -export interface InitPerformanceCounterDescriptionKHR { - pNext?: AnyPointer; - flags?: PerformanceCounterDescriptionFlagsKHR; - name?: Uint8Array; - category?: Uint8Array; - description?: Uint8Array; -} - -export class PerformanceCounterDescriptionKHR implements BaseStruct { - static size = 792; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPerformanceCounterDescriptionKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceCounterDescriptionKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PerformanceCounterDescriptionKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceCounterDescriptionKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceCounterDescriptionKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PerformanceCounterDescriptionKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.name !== undefined) this.name = data.name; - if (data.category !== undefined) this.category = data.category; - if (data.description !== undefined) this.description = data.description; - } - this.sType = StructureType.PERFORMANCE_COUNTER_DESCRIPTION_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PerformanceCounterDescriptionFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - - set name(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - - get category() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); - } - - set category(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 532, 256); - } - - set description(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 532); - } -} - -export interface InitQueryPoolPerformanceCreateInfoKHR { - pNext?: AnyPointer; - queueFamilyIndex?: number; - counterIndexCount?: number; - pCounterIndices?: AnyPointer; -} - -export class QueryPoolPerformanceCreateInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueryPoolPerformanceCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueryPoolPerformanceCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(QueryPoolPerformanceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueryPoolPerformanceCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueryPoolPerformanceCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueryPoolPerformanceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; - if (data.counterIndexCount !== undefined) this.counterIndexCount = data.counterIndexCount; - if (data.pCounterIndices !== undefined) this.pCounterIndices = data.pCounterIndices; - } - this.sType = StructureType.QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get queueFamilyIndex() { - return this.#view.getUint32(16, LE); - } - - set queueFamilyIndex(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get counterIndexCount() { - return this.#view.getUint32(20, LE); - } - - set counterIndexCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pCounterIndices() { - return this.#view.getBigUint64(24, LE); - } - - set pCounterIndices(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitAcquireProfilingLockInfoKHR { - pNext?: AnyPointer; - flags?: AcquireProfilingLockFlagsKHR; - timeout?: Deno.PointerValue; -} - -export class AcquireProfilingLockInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAcquireProfilingLockInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAcquireProfilingLockInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AcquireProfilingLockInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AcquireProfilingLockInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AcquireProfilingLockInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AcquireProfilingLockInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.timeout !== undefined) this.timeout = data.timeout; - } - this.sType = StructureType.ACQUIRE_PROFILING_LOCK_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: AcquireProfilingLockFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get timeout() { - return this.#view.getBigUint64(24, LE); - } - - set timeout(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitPerformanceQuerySubmitInfoKHR { - pNext?: AnyPointer; - counterPassIndex?: number; -} - -export class PerformanceQuerySubmitInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPerformanceQuerySubmitInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceQuerySubmitInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PerformanceQuerySubmitInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceQuerySubmitInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceQuerySubmitInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PerformanceQuerySubmitInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.counterPassIndex !== undefined) this.counterPassIndex = data.counterPassIndex; - } - this.sType = StructureType.PERFORMANCE_QUERY_SUBMIT_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get counterPassIndex() { - return this.#view.getUint32(16, LE); - } - - set counterPassIndex(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitHeadlessSurfaceCreateInfoEXT { - pNext?: AnyPointer; - flags?: HeadlessSurfaceCreateFlagsEXT; -} - -export class HeadlessSurfaceCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitHeadlessSurfaceCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitHeadlessSurfaceCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(HeadlessSurfaceCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, HeadlessSurfaceCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < HeadlessSurfaceCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(HeadlessSurfaceCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.HEADLESS_SURFACE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: HeadlessSurfaceCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceCoverageReductionModeFeaturesNV { - pNext?: AnyPointer; - coverageReductionMode?: Bool32; -} - -export class PhysicalDeviceCoverageReductionModeFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceCoverageReductionModeFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCoverageReductionModeFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceCoverageReductionModeFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCoverageReductionModeFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCoverageReductionModeFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceCoverageReductionModeFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.coverageReductionMode !== undefined) this.coverageReductionMode = data.coverageReductionMode; - } - this.sType = StructureType.PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get coverageReductionMode() { - return this.#view.getUint32(16, LE); - } - - set coverageReductionMode(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineCoverageReductionStateCreateInfoNV { - pNext?: AnyPointer; - flags?: PipelineCoverageReductionStateCreateFlagsNV; - coverageReductionMode?: CoverageReductionModeNV; -} - -export class PipelineCoverageReductionStateCreateInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineCoverageReductionStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCoverageReductionStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineCoverageReductionStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCoverageReductionStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCoverageReductionStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineCoverageReductionStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.coverageReductionMode !== undefined) this.coverageReductionMode = data.coverageReductionMode; - } - this.sType = StructureType.PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: PipelineCoverageReductionStateCreateFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get coverageReductionMode() { - return this.#view.getUint32(20, LE); - } - - set coverageReductionMode(value: CoverageReductionModeNV) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitFramebufferMixedSamplesCombinationNV { - pNext?: AnyPointer; - coverageReductionMode?: CoverageReductionModeNV; - rasterizationSamples?: SampleCountFlagBits; - depthStencilSamples?: SampleCountFlags; - colorSamples?: SampleCountFlags; -} - -export class FramebufferMixedSamplesCombinationNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFramebufferMixedSamplesCombinationNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFramebufferMixedSamplesCombinationNV) { - if (data === undefined) { - this.#data = new Uint8Array(FramebufferMixedSamplesCombinationNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FramebufferMixedSamplesCombinationNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FramebufferMixedSamplesCombinationNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FramebufferMixedSamplesCombinationNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.coverageReductionMode !== undefined) this.coverageReductionMode = data.coverageReductionMode; - if (data.rasterizationSamples !== undefined) this.rasterizationSamples = data.rasterizationSamples; - if (data.depthStencilSamples !== undefined) this.depthStencilSamples = data.depthStencilSamples; - if (data.colorSamples !== undefined) this.colorSamples = data.colorSamples; - } - this.sType = StructureType.FRAMEBUFFER_MIXED_SAMPLES_COMBINATION_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get coverageReductionMode() { - return this.#view.getUint32(16, LE); - } - - set coverageReductionMode(value: CoverageReductionModeNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get rasterizationSamples() { - return this.#view.getUint32(20, LE); - } - - set rasterizationSamples(value: SampleCountFlagBits) { - this.#view.setUint32(20, Number(value), LE); - } - - get depthStencilSamples() { - return this.#view.getUint32(24, LE); - } - - set depthStencilSamples(value: SampleCountFlags) { - this.#view.setUint32(24, Number(value), LE); - } - - get colorSamples() { - return this.#view.getUint32(28, LE); - } - - set colorSamples(value: SampleCountFlags) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL { - pNext?: AnyPointer; - shaderIntegerFunctions2?: Bool32; -} - -export class PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderIntegerFunctions2 !== undefined) this.shaderIntegerFunctions2 = data.shaderIntegerFunctions2; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderIntegerFunctions2() { - return this.#view.getUint32(16, LE); - } - - set shaderIntegerFunctions2(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPerformanceValueINTEL { - type?: PerformanceValueTypeINTEL; - data?: PerformanceValueDataINTEL; -} - -export class PerformanceValueINTEL implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPerformanceValueINTEL); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceValueINTEL) { - if (data === undefined) { - this.#data = new Uint8Array(PerformanceValueINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceValueINTEL.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceValueINTEL.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PerformanceValueINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.type !== undefined) this.type = data.type; - if (data.data !== undefined) this.data = data.data; - } - } - - get type() { - return this.#view.getUint32(0, LE); - } - - set type(value: PerformanceValueTypeINTEL) { - this.#view.setUint32(0, Number(value), LE); - } - - get data() { - throw new Error(`Unknown type: {"union":["u32","u64","f32","u32","buffer"]}`); - } - - set data(value: PerformanceValueDataINTEL) { - throw new Error(`Unknown type: {"union":["u32","u64","f32","u32","buffer"]}`); - } -} - -export interface InitInitializePerformanceApiInfoINTEL { - pNext?: AnyPointer; - pUserData?: AnyPointer; -} - -export class InitializePerformanceApiInfoINTEL implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitInitializePerformanceApiInfoINTEL); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitInitializePerformanceApiInfoINTEL) { - if (data === undefined) { - this.#data = new Uint8Array(InitializePerformanceApiInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, InitializePerformanceApiInfoINTEL.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < InitializePerformanceApiInfoINTEL.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(InitializePerformanceApiInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pUserData !== undefined) this.pUserData = data.pUserData; - } - this.sType = StructureType.INITIALIZE_PERFORMANCE_API_INFO_INTEL; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pUserData() { - return this.#view.getBigUint64(16, LE); - } - - set pUserData(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitQueryPoolPerformanceQueryCreateInfoINTEL { - pNext?: AnyPointer; - performanceCountersSampling?: QueryPoolSamplingModeINTEL; -} - -export class QueryPoolPerformanceQueryCreateInfoINTEL implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueryPoolPerformanceQueryCreateInfoINTEL); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueryPoolPerformanceQueryCreateInfoINTEL) { - if (data === undefined) { - this.#data = new Uint8Array(QueryPoolPerformanceQueryCreateInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueryPoolPerformanceQueryCreateInfoINTEL.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueryPoolPerformanceQueryCreateInfoINTEL.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueryPoolPerformanceQueryCreateInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.performanceCountersSampling !== undefined) this.performanceCountersSampling = data.performanceCountersSampling; - } - this.sType = StructureType.QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get performanceCountersSampling() { - return this.#view.getUint32(16, LE); - } - - set performanceCountersSampling(value: QueryPoolSamplingModeINTEL) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPerformanceMarkerInfoINTEL { - pNext?: AnyPointer; - marker?: Deno.PointerValue; -} - -export class PerformanceMarkerInfoINTEL implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPerformanceMarkerInfoINTEL); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceMarkerInfoINTEL) { - if (data === undefined) { - this.#data = new Uint8Array(PerformanceMarkerInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceMarkerInfoINTEL.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceMarkerInfoINTEL.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PerformanceMarkerInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.marker !== undefined) this.marker = data.marker; - } - this.sType = StructureType.PERFORMANCE_MARKER_INFO_INTEL; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get marker() { - return this.#view.getBigUint64(16, LE); - } - - set marker(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitPerformanceStreamMarkerInfoINTEL { - pNext?: AnyPointer; - marker?: number; -} - -export class PerformanceStreamMarkerInfoINTEL implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPerformanceStreamMarkerInfoINTEL); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceStreamMarkerInfoINTEL) { - if (data === undefined) { - this.#data = new Uint8Array(PerformanceStreamMarkerInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceStreamMarkerInfoINTEL.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceStreamMarkerInfoINTEL.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PerformanceStreamMarkerInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.marker !== undefined) this.marker = data.marker; - } - this.sType = StructureType.PERFORMANCE_STREAM_MARKER_INFO_INTEL; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get marker() { - return this.#view.getUint32(16, LE); - } - - set marker(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPerformanceOverrideInfoINTEL { - pNext?: AnyPointer; - type?: PerformanceOverrideTypeINTEL; - enable?: Bool32; - parameter?: Deno.PointerValue; -} - -export class PerformanceOverrideInfoINTEL implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPerformanceOverrideInfoINTEL); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceOverrideInfoINTEL) { - if (data === undefined) { - this.#data = new Uint8Array(PerformanceOverrideInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceOverrideInfoINTEL.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceOverrideInfoINTEL.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PerformanceOverrideInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.type !== undefined) this.type = data.type; - if (data.enable !== undefined) this.enable = data.enable; - if (data.parameter !== undefined) this.parameter = data.parameter; - } - this.sType = StructureType.PERFORMANCE_OVERRIDE_INFO_INTEL; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get type() { - return this.#view.getUint32(16, LE); - } - - set type(value: PerformanceOverrideTypeINTEL) { - this.#view.setUint32(16, Number(value), LE); - } - - get enable() { - return this.#view.getUint32(20, LE); - } - - set enable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get parameter() { - return this.#view.getBigUint64(24, LE); - } - - set parameter(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitPerformanceConfigurationAcquireInfoINTEL { - pNext?: AnyPointer; - type?: PerformanceConfigurationTypeINTEL; -} - -export class PerformanceConfigurationAcquireInfoINTEL implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPerformanceConfigurationAcquireInfoINTEL); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPerformanceConfigurationAcquireInfoINTEL) { - if (data === undefined) { - this.#data = new Uint8Array(PerformanceConfigurationAcquireInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PerformanceConfigurationAcquireInfoINTEL.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PerformanceConfigurationAcquireInfoINTEL.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PerformanceConfigurationAcquireInfoINTEL.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.type !== undefined) this.type = data.type; - } - this.sType = StructureType.PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get type() { - return this.#view.getUint32(16, LE); - } - - set type(value: PerformanceConfigurationTypeINTEL) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderClockFeaturesKHR { - pNext?: AnyPointer; - shaderSubgroupClock?: Bool32; - shaderDeviceClock?: Bool32; -} - -export class PhysicalDeviceShaderClockFeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderClockFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderClockFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderClockFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderClockFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderClockFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderClockFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderSubgroupClock !== undefined) this.shaderSubgroupClock = data.shaderSubgroupClock; - if (data.shaderDeviceClock !== undefined) this.shaderDeviceClock = data.shaderDeviceClock; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderSubgroupClock() { - return this.#view.getUint32(16, LE); - } - - set shaderSubgroupClock(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get shaderDeviceClock() { - return this.#view.getUint32(20, LE); - } - - set shaderDeviceClock(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceIndexTypeUint8FeaturesEXT { - pNext?: AnyPointer; - indexTypeUint8?: Bool32; -} - -export class PhysicalDeviceIndexTypeUint8FeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceIndexTypeUint8FeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceIndexTypeUint8FeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceIndexTypeUint8FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceIndexTypeUint8FeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceIndexTypeUint8FeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceIndexTypeUint8FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.indexTypeUint8 !== undefined) this.indexTypeUint8 = data.indexTypeUint8; - } - this.sType = StructureType.PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get indexTypeUint8() { - return this.#view.getUint32(16, LE); - } - - set indexTypeUint8(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderSMBuiltinsPropertiesNV { - pNext?: AnyPointer; - shaderSMCount?: number; - shaderWarpsPerSM?: number; -} - -export class PhysicalDeviceShaderSMBuiltinsPropertiesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderSMBuiltinsPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderSMBuiltinsPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSMBuiltinsPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderSMBuiltinsPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderSMCount !== undefined) this.shaderSMCount = data.shaderSMCount; - if (data.shaderWarpsPerSM !== undefined) this.shaderWarpsPerSM = data.shaderWarpsPerSM; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderSMCount() { - return this.#view.getUint32(16, LE); - } - - set shaderSMCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get shaderWarpsPerSM() { - return this.#view.getUint32(20, LE); - } - - set shaderWarpsPerSM(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderSMBuiltinsFeaturesNV { - pNext?: AnyPointer; - shaderSMBuiltins?: Bool32; -} - -export class PhysicalDeviceShaderSMBuiltinsFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderSMBuiltinsFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderSMBuiltinsFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSMBuiltinsFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderSMBuiltinsFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderSMBuiltinsFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderSMBuiltins !== undefined) this.shaderSMBuiltins = data.shaderSMBuiltins; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderSMBuiltins() { - return this.#view.getUint32(16, LE); - } - - set shaderSMBuiltins(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentShaderInterlockFeaturesEXT { - pNext?: AnyPointer; - fragmentShaderSampleInterlock?: Bool32; - fragmentShaderPixelInterlock?: Bool32; - fragmentShaderShadingRateInterlock?: Bool32; -} - -export class PhysicalDeviceFragmentShaderInterlockFeaturesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentShaderInterlockFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShaderInterlockFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentShaderInterlockFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentShaderSampleInterlock !== undefined) this.fragmentShaderSampleInterlock = data.fragmentShaderSampleInterlock; - if (data.fragmentShaderPixelInterlock !== undefined) this.fragmentShaderPixelInterlock = data.fragmentShaderPixelInterlock; - if (data.fragmentShaderShadingRateInterlock !== undefined) this.fragmentShaderShadingRateInterlock = data.fragmentShaderShadingRateInterlock; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentShaderSampleInterlock() { - return this.#view.getUint32(16, LE); - } - - set fragmentShaderSampleInterlock(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get fragmentShaderPixelInterlock() { - return this.#view.getUint32(20, LE); - } - - set fragmentShaderPixelInterlock(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get fragmentShaderShadingRateInterlock() { - return this.#view.getUint32(24, LE); - } - - set fragmentShaderShadingRateInterlock(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceSeparateDepthStencilLayoutsFeatures { - pNext?: AnyPointer; - separateDepthStencilLayouts?: Bool32; -} - -export class PhysicalDeviceSeparateDepthStencilLayoutsFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSeparateDepthStencilLayoutsFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSeparateDepthStencilLayoutsFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSeparateDepthStencilLayoutsFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.separateDepthStencilLayouts !== undefined) this.separateDepthStencilLayouts = data.separateDepthStencilLayouts; - } - this.sType = StructureType.PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get separateDepthStencilLayouts() { - return this.#view.getUint32(16, LE); - } - - set separateDepthStencilLayouts(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitAttachmentReferenceStencilLayout { - pNext?: AnyPointer; - stencilLayout?: ImageLayout; -} - -export class AttachmentReferenceStencilLayout implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAttachmentReferenceStencilLayout); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentReferenceStencilLayout) { - if (data === undefined) { - this.#data = new Uint8Array(AttachmentReferenceStencilLayout.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentReferenceStencilLayout.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentReferenceStencilLayout.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AttachmentReferenceStencilLayout.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stencilLayout !== undefined) this.stencilLayout = data.stencilLayout; - } - this.sType = StructureType.ATTACHMENT_REFERENCE_STENCIL_LAYOUT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stencilLayout() { - return this.#view.getUint32(16, LE); - } - - set stencilLayout(value: ImageLayout) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT { - pNext?: AnyPointer; - primitiveTopologyListRestart?: Bool32; - primitiveTopologyPatchListRestart?: Bool32; -} - -export class PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.primitiveTopologyListRestart !== undefined) this.primitiveTopologyListRestart = data.primitiveTopologyListRestart; - if (data.primitiveTopologyPatchListRestart !== undefined) this.primitiveTopologyPatchListRestart = data.primitiveTopologyPatchListRestart; - } - this.sType = StructureType.PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get primitiveTopologyListRestart() { - return this.#view.getUint32(16, LE); - } - - set primitiveTopologyListRestart(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get primitiveTopologyPatchListRestart() { - return this.#view.getUint32(20, LE); - } - - set primitiveTopologyPatchListRestart(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitAttachmentDescriptionStencilLayout { - pNext?: AnyPointer; - stencilInitialLayout?: ImageLayout; - stencilFinalLayout?: ImageLayout; -} - -export class AttachmentDescriptionStencilLayout implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAttachmentDescriptionStencilLayout); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentDescriptionStencilLayout) { - if (data === undefined) { - this.#data = new Uint8Array(AttachmentDescriptionStencilLayout.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentDescriptionStencilLayout.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentDescriptionStencilLayout.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AttachmentDescriptionStencilLayout.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stencilInitialLayout !== undefined) this.stencilInitialLayout = data.stencilInitialLayout; - if (data.stencilFinalLayout !== undefined) this.stencilFinalLayout = data.stencilFinalLayout; - } - this.sType = StructureType.ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stencilInitialLayout() { - return this.#view.getUint32(16, LE); - } - - set stencilInitialLayout(value: ImageLayout) { - this.#view.setUint32(16, Number(value), LE); - } - - get stencilFinalLayout() { - return this.#view.getUint32(20, LE); - } - - set stencilFinalLayout(value: ImageLayout) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDevicePipelineExecutablePropertiesFeaturesKHR { - pNext?: AnyPointer; - pipelineExecutableInfo?: Bool32; -} - -export class PhysicalDevicePipelineExecutablePropertiesFeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePipelineExecutablePropertiesFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineExecutablePropertiesFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePipelineExecutablePropertiesFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipelineExecutableInfo !== undefined) this.pipelineExecutableInfo = data.pipelineExecutableInfo; - } - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipelineExecutableInfo() { - return this.#view.getUint32(16, LE); - } - - set pipelineExecutableInfo(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineInfoKHR { - pNext?: AnyPointer; - pipeline?: Pipeline; -} - -export class PipelineInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipeline !== undefined) this.pipeline = data.pipeline; - } - this.sType = StructureType.PIPELINE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipeline() { - return this.#view.getBigUint64(16, LE); - } - - set pipeline(value: Pipeline) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelineExecutablePropertiesKHR { - pNext?: AnyPointer; - stages?: ShaderStageFlags; - name?: Uint8Array; - description?: Uint8Array; - subgroupSize?: number; -} - -export class PipelineExecutablePropertiesKHR implements BaseStruct { - static size = 536; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineExecutablePropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineExecutablePropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineExecutablePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutablePropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineExecutablePropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineExecutablePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stages !== undefined) this.stages = data.stages; - if (data.name !== undefined) this.name = data.name; - if (data.description !== undefined) this.description = data.description; - if (data.subgroupSize !== undefined) this.subgroupSize = data.subgroupSize; - } - this.sType = StructureType.PIPELINE_EXECUTABLE_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stages() { - return this.#view.getUint32(16, LE); - } - - set stages(value: ShaderStageFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - - set name(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); - } - - set description(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - - get subgroupSize() { - return this.#view.getUint32(532, LE); - } - - set subgroupSize(value: number) { - this.#view.setUint32(532, Number(value), LE); - } -} - -export interface InitPipelineExecutableInfoKHR { - pNext?: AnyPointer; - pipeline?: Pipeline; - executableIndex?: number; -} - -export class PipelineExecutableInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineExecutableInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineExecutableInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineExecutableInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutableInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineExecutableInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineExecutableInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipeline !== undefined) this.pipeline = data.pipeline; - if (data.executableIndex !== undefined) this.executableIndex = data.executableIndex; - } - this.sType = StructureType.PIPELINE_EXECUTABLE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipeline() { - return this.#view.getBigUint64(16, LE); - } - - set pipeline(value: Pipeline) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get executableIndex() { - return this.#view.getUint32(24, LE); - } - - set executableIndex(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPipelineExecutableStatisticKHR { - pNext?: AnyPointer; - name?: Uint8Array; - description?: Uint8Array; - format?: PipelineExecutableStatisticFormatKHR; - value?: PipelineExecutableStatisticValueKHR; -} - -export class PipelineExecutableStatisticKHR implements BaseStruct { - static size = 544; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineExecutableStatisticKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineExecutableStatisticKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineExecutableStatisticKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutableStatisticKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineExecutableStatisticKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineExecutableStatisticKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.name !== undefined) this.name = data.name; - if (data.description !== undefined) this.description = data.description; - if (data.format !== undefined) this.format = data.format; - if (data.value !== undefined) this.value = data.value; - } - this.sType = StructureType.PIPELINE_EXECUTABLE_STATISTIC_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); - } - - set name(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 272, 256); - } - - set description(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 272); - } - - get format() { - return this.#view.getUint32(528, LE); - } - - set format(value: PipelineExecutableStatisticFormatKHR) { - this.#view.setUint32(528, Number(value), LE); - } - - get value() { - throw new Error(`Unknown type: {"union":["u32","i64","u64","f64"]}`); - } - - set value(value: PipelineExecutableStatisticValueKHR) { - throw new Error(`Unknown type: {"union":["u32","i64","u64","f64"]}`); - } -} - -export interface InitPipelineExecutableInternalRepresentationKHR { - pNext?: AnyPointer; - name?: Uint8Array; - description?: Uint8Array; - isText?: Bool32; - dataSize?: Deno.PointerValue; - pData?: AnyPointer; -} - -export class PipelineExecutableInternalRepresentationKHR implements BaseStruct { - static size = 552; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineExecutableInternalRepresentationKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineExecutableInternalRepresentationKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineExecutableInternalRepresentationKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineExecutableInternalRepresentationKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineExecutableInternalRepresentationKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineExecutableInternalRepresentationKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.name !== undefined) this.name = data.name; - if (data.description !== undefined) this.description = data.description; - if (data.isText !== undefined) this.isText = data.isText; - if (data.dataSize !== undefined) this.dataSize = data.dataSize; - if (data.pData !== undefined) this.pData = data.pData; - } - this.sType = StructureType.PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); - } - - set name(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 272, 256); - } - - set description(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 272); - } - - get isText() { - return this.#view.getUint32(528, LE); - } - - set isText(value: Bool32) { - this.#view.setUint32(528, Number(value), LE); - } - - get dataSize() { - return this.#view.getBigUint64(536, LE); - } - - set dataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(536, BigInt(value), LE); - } - - get pData() { - return this.#view.getBigUint64(544, LE); - } - - set pData(value: AnyPointer) { - this.#view.setBigUint64(544, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceShaderDemoteToHelperInvocationFeatures { - pNext?: AnyPointer; - shaderDemoteToHelperInvocation?: Bool32; -} - -export class PhysicalDeviceShaderDemoteToHelperInvocationFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderDemoteToHelperInvocationFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderDemoteToHelperInvocationFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderDemoteToHelperInvocationFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderDemoteToHelperInvocation !== undefined) this.shaderDemoteToHelperInvocation = data.shaderDemoteToHelperInvocation; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderDemoteToHelperInvocation() { - return this.#view.getUint32(16, LE); - } - - set shaderDemoteToHelperInvocation(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceTexelBufferAlignmentFeaturesEXT { - pNext?: AnyPointer; - texelBufferAlignment?: Bool32; -} - -export class PhysicalDeviceTexelBufferAlignmentFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceTexelBufferAlignmentFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTexelBufferAlignmentFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.texelBufferAlignment !== undefined) this.texelBufferAlignment = data.texelBufferAlignment; - } - this.sType = StructureType.PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get texelBufferAlignment() { - return this.#view.getUint32(16, LE); - } - - set texelBufferAlignment(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceTexelBufferAlignmentProperties { - pNext?: AnyPointer; - storageTexelBufferOffsetAlignmentBytes?: DeviceSize; - storageTexelBufferOffsetSingleTexelAlignment?: Bool32; - uniformTexelBufferOffsetAlignmentBytes?: DeviceSize; - uniformTexelBufferOffsetSingleTexelAlignment?: Bool32; -} - -export class PhysicalDeviceTexelBufferAlignmentProperties implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceTexelBufferAlignmentProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTexelBufferAlignmentProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTexelBufferAlignmentProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTexelBufferAlignmentProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceTexelBufferAlignmentProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.storageTexelBufferOffsetAlignmentBytes !== undefined) this.storageTexelBufferOffsetAlignmentBytes = data.storageTexelBufferOffsetAlignmentBytes; - if (data.storageTexelBufferOffsetSingleTexelAlignment !== undefined) this.storageTexelBufferOffsetSingleTexelAlignment = data.storageTexelBufferOffsetSingleTexelAlignment; - if (data.uniformTexelBufferOffsetAlignmentBytes !== undefined) this.uniformTexelBufferOffsetAlignmentBytes = data.uniformTexelBufferOffsetAlignmentBytes; - if (data.uniformTexelBufferOffsetSingleTexelAlignment !== undefined) this.uniformTexelBufferOffsetSingleTexelAlignment = data.uniformTexelBufferOffsetSingleTexelAlignment; - } - this.sType = StructureType.PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get storageTexelBufferOffsetAlignmentBytes() { - return this.#view.getBigUint64(16, LE); - } - - set storageTexelBufferOffsetAlignmentBytes(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get storageTexelBufferOffsetSingleTexelAlignment() { - return this.#view.getUint32(24, LE); - } - - set storageTexelBufferOffsetSingleTexelAlignment(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get uniformTexelBufferOffsetAlignmentBytes() { - return this.#view.getBigUint64(32, LE); - } - - set uniformTexelBufferOffsetAlignmentBytes(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get uniformTexelBufferOffsetSingleTexelAlignment() { - return this.#view.getUint32(40, LE); - } - - set uniformTexelBufferOffsetSingleTexelAlignment(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } -} - -export interface InitPhysicalDeviceSubgroupSizeControlFeatures { - pNext?: AnyPointer; - subgroupSizeControl?: Bool32; - computeFullSubgroups?: Bool32; -} - -export class PhysicalDeviceSubgroupSizeControlFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSubgroupSizeControlFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubgroupSizeControlFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubgroupSizeControlFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubgroupSizeControlFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.subgroupSizeControl !== undefined) this.subgroupSizeControl = data.subgroupSizeControl; - if (data.computeFullSubgroups !== undefined) this.computeFullSubgroups = data.computeFullSubgroups; - } - this.sType = StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get subgroupSizeControl() { - return this.#view.getUint32(16, LE); - } - - set subgroupSizeControl(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get computeFullSubgroups() { - return this.#view.getUint32(20, LE); - } - - set computeFullSubgroups(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceSubgroupSizeControlProperties { - pNext?: AnyPointer; - minSubgroupSize?: number; - maxSubgroupSize?: number; - maxComputeWorkgroupSubgroups?: number; - requiredSubgroupSizeStages?: ShaderStageFlags; -} - -export class PhysicalDeviceSubgroupSizeControlProperties implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSubgroupSizeControlProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubgroupSizeControlProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubgroupSizeControlProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubgroupSizeControlProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSubgroupSizeControlProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minSubgroupSize !== undefined) this.minSubgroupSize = data.minSubgroupSize; - if (data.maxSubgroupSize !== undefined) this.maxSubgroupSize = data.maxSubgroupSize; - if (data.maxComputeWorkgroupSubgroups !== undefined) this.maxComputeWorkgroupSubgroups = data.maxComputeWorkgroupSubgroups; - if (data.requiredSubgroupSizeStages !== undefined) this.requiredSubgroupSizeStages = data.requiredSubgroupSizeStages; - } - this.sType = StructureType.PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minSubgroupSize() { - return this.#view.getUint32(16, LE); - } - - set minSubgroupSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxSubgroupSize() { - return this.#view.getUint32(20, LE); - } - - set maxSubgroupSize(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxComputeWorkgroupSubgroups() { - return this.#view.getUint32(24, LE); - } - - set maxComputeWorkgroupSubgroups(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get requiredSubgroupSizeStages() { - return this.#view.getUint32(28, LE); - } - - set requiredSubgroupSizeStages(value: ShaderStageFlags) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPipelineShaderStageRequiredSubgroupSizeCreateInfo { - pNext?: AnyPointer; - requiredSubgroupSize?: number; -} - -export class PipelineShaderStageRequiredSubgroupSizeCreateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineShaderStageRequiredSubgroupSizeCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineShaderStageRequiredSubgroupSizeCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineShaderStageRequiredSubgroupSizeCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineShaderStageRequiredSubgroupSizeCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineShaderStageRequiredSubgroupSizeCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineShaderStageRequiredSubgroupSizeCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.requiredSubgroupSize !== undefined) this.requiredSubgroupSize = data.requiredSubgroupSize; - } - this.sType = StructureType.PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get requiredSubgroupSize() { - return this.#view.getUint32(16, LE); - } - - set requiredSubgroupSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSubpassShadingPipelineCreateInfoHUAWEI { - pNext?: AnyPointer; - renderPass?: RenderPass; - subpass?: number; -} - -export class SubpassShadingPipelineCreateInfoHUAWEI implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassShadingPipelineCreateInfoHUAWEI); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassShadingPipelineCreateInfoHUAWEI) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassShadingPipelineCreateInfoHUAWEI.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassShadingPipelineCreateInfoHUAWEI.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassShadingPipelineCreateInfoHUAWEI.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassShadingPipelineCreateInfoHUAWEI.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.renderPass !== undefined) this.renderPass = data.renderPass; - if (data.subpass !== undefined) this.subpass = data.subpass; - } - this.sType = StructureType.SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get renderPass() { - return this.#view.getBigUint64(16, LE); - } - - set renderPass(value: RenderPass) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get subpass() { - return this.#view.getUint32(24, LE); - } - - set subpass(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceSubpassShadingPropertiesHUAWEI { - pNext?: AnyPointer; - maxSubpassShadingWorkgroupSizeAspectRatio?: number; -} - -export class PhysicalDeviceSubpassShadingPropertiesHUAWEI implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSubpassShadingPropertiesHUAWEI); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubpassShadingPropertiesHUAWEI) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSubpassShadingPropertiesHUAWEI.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubpassShadingPropertiesHUAWEI.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubpassShadingPropertiesHUAWEI.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSubpassShadingPropertiesHUAWEI.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxSubpassShadingWorkgroupSizeAspectRatio !== undefined) this.maxSubpassShadingWorkgroupSizeAspectRatio = data.maxSubpassShadingWorkgroupSizeAspectRatio; - } - this.sType = StructureType.PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxSubpassShadingWorkgroupSizeAspectRatio() { - return this.#view.getUint32(16, LE); - } - - set maxSubpassShadingWorkgroupSizeAspectRatio(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMemoryOpaqueCaptureAddressAllocateInfo { - pNext?: AnyPointer; - opaqueCaptureAddress?: Deno.PointerValue; -} - -export class MemoryOpaqueCaptureAddressAllocateInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryOpaqueCaptureAddressAllocateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryOpaqueCaptureAddressAllocateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryOpaqueCaptureAddressAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryOpaqueCaptureAddressAllocateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryOpaqueCaptureAddressAllocateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryOpaqueCaptureAddressAllocateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.opaqueCaptureAddress !== undefined) this.opaqueCaptureAddress = data.opaqueCaptureAddress; - } - this.sType = StructureType.MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get opaqueCaptureAddress() { - return this.#view.getBigUint64(16, LE); - } - - set opaqueCaptureAddress(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitDeviceMemoryOpaqueCaptureAddressInfo { - pNext?: AnyPointer; - memory?: DeviceMemory; -} - -export class DeviceMemoryOpaqueCaptureAddressInfo implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceMemoryOpaqueCaptureAddressInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceMemoryOpaqueCaptureAddressInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceMemoryOpaqueCaptureAddressInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceMemoryOpaqueCaptureAddressInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceMemoryOpaqueCaptureAddressInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceMemoryOpaqueCaptureAddressInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memory !== undefined) this.memory = data.memory; - } - this.sType = StructureType.DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(16, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceLineRasterizationFeaturesEXT { - pNext?: AnyPointer; - rectangularLines?: Bool32; - bresenhamLines?: Bool32; - smoothLines?: Bool32; - stippledRectangularLines?: Bool32; - stippledBresenhamLines?: Bool32; - stippledSmoothLines?: Bool32; -} - -export class PhysicalDeviceLineRasterizationFeaturesEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceLineRasterizationFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLineRasterizationFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceLineRasterizationFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLineRasterizationFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLineRasterizationFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceLineRasterizationFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.rectangularLines !== undefined) this.rectangularLines = data.rectangularLines; - if (data.bresenhamLines !== undefined) this.bresenhamLines = data.bresenhamLines; - if (data.smoothLines !== undefined) this.smoothLines = data.smoothLines; - if (data.stippledRectangularLines !== undefined) this.stippledRectangularLines = data.stippledRectangularLines; - if (data.stippledBresenhamLines !== undefined) this.stippledBresenhamLines = data.stippledBresenhamLines; - if (data.stippledSmoothLines !== undefined) this.stippledSmoothLines = data.stippledSmoothLines; - } - this.sType = StructureType.PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get rectangularLines() { - return this.#view.getUint32(16, LE); - } - - set rectangularLines(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get bresenhamLines() { - return this.#view.getUint32(20, LE); - } - - set bresenhamLines(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get smoothLines() { - return this.#view.getUint32(24, LE); - } - - set smoothLines(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get stippledRectangularLines() { - return this.#view.getUint32(28, LE); - } - - set stippledRectangularLines(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get stippledBresenhamLines() { - return this.#view.getUint32(32, LE); - } - - set stippledBresenhamLines(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get stippledSmoothLines() { - return this.#view.getUint32(36, LE); - } - - set stippledSmoothLines(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } -} - -export interface InitPhysicalDeviceLineRasterizationPropertiesEXT { - pNext?: AnyPointer; - lineSubPixelPrecisionBits?: number; -} - -export class PhysicalDeviceLineRasterizationPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceLineRasterizationPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLineRasterizationPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceLineRasterizationPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLineRasterizationPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLineRasterizationPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceLineRasterizationPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.lineSubPixelPrecisionBits !== undefined) this.lineSubPixelPrecisionBits = data.lineSubPixelPrecisionBits; - } - this.sType = StructureType.PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get lineSubPixelPrecisionBits() { - return this.#view.getUint32(16, LE); - } - - set lineSubPixelPrecisionBits(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineRasterizationLineStateCreateInfoEXT { - pNext?: AnyPointer; - lineRasterizationMode?: LineRasterizationModeEXT; - stippledLineEnable?: Bool32; - lineStippleFactor?: number; - lineStipplePattern?: number; -} - -export class PipelineRasterizationLineStateCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRasterizationLineStateCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationLineStateCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRasterizationLineStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationLineStateCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationLineStateCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRasterizationLineStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.lineRasterizationMode !== undefined) this.lineRasterizationMode = data.lineRasterizationMode; - if (data.stippledLineEnable !== undefined) this.stippledLineEnable = data.stippledLineEnable; - if (data.lineStippleFactor !== undefined) this.lineStippleFactor = data.lineStippleFactor; - if (data.lineStipplePattern !== undefined) this.lineStipplePattern = data.lineStipplePattern; - } - this.sType = StructureType.PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get lineRasterizationMode() { - return this.#view.getUint32(16, LE); - } - - set lineRasterizationMode(value: LineRasterizationModeEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get stippledLineEnable() { - return this.#view.getUint32(20, LE); - } - - set stippledLineEnable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get lineStippleFactor() { - return this.#view.getUint32(24, LE); - } - - set lineStippleFactor(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get lineStipplePattern() { - return this.#view.getUint16(28, LE); - } - - set lineStipplePattern(value: number) { - this.#view.setUint16(28, Number(value), LE); - } -} - -export interface InitPhysicalDevicePipelineCreationCacheControlFeatures { - pNext?: AnyPointer; - pipelineCreationCacheControl?: Bool32; -} - -export class PhysicalDevicePipelineCreationCacheControlFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePipelineCreationCacheControlFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineCreationCacheControlFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePipelineCreationCacheControlFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineCreationCacheControlFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineCreationCacheControlFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePipelineCreationCacheControlFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipelineCreationCacheControl !== undefined) this.pipelineCreationCacheControl = data.pipelineCreationCacheControl; - } - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipelineCreationCacheControl() { - return this.#view.getUint32(16, LE); - } - - set pipelineCreationCacheControl(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceVulkan11Features { - pNext?: AnyPointer; - storageBuffer16BitAccess?: Bool32; - uniformAndStorageBuffer16BitAccess?: Bool32; - storagePushConstant16?: Bool32; - storageInputOutput16?: Bool32; - multiview?: Bool32; - multiviewGeometryShader?: Bool32; - multiviewTessellationShader?: Bool32; - variablePointersStorageBuffer?: Bool32; - variablePointers?: Bool32; - protectedMemory?: Bool32; - samplerYcbcrConversion?: Bool32; - shaderDrawParameters?: Bool32; -} - -export class PhysicalDeviceVulkan11Features implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVulkan11Features); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan11Features) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVulkan11Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan11Features.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan11Features.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVulkan11Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.storageBuffer16BitAccess !== undefined) this.storageBuffer16BitAccess = data.storageBuffer16BitAccess; - if (data.uniformAndStorageBuffer16BitAccess !== undefined) this.uniformAndStorageBuffer16BitAccess = data.uniformAndStorageBuffer16BitAccess; - if (data.storagePushConstant16 !== undefined) this.storagePushConstant16 = data.storagePushConstant16; - if (data.storageInputOutput16 !== undefined) this.storageInputOutput16 = data.storageInputOutput16; - if (data.multiview !== undefined) this.multiview = data.multiview; - if (data.multiviewGeometryShader !== undefined) this.multiviewGeometryShader = data.multiviewGeometryShader; - if (data.multiviewTessellationShader !== undefined) this.multiviewTessellationShader = data.multiviewTessellationShader; - if (data.variablePointersStorageBuffer !== undefined) this.variablePointersStorageBuffer = data.variablePointersStorageBuffer; - if (data.variablePointers !== undefined) this.variablePointers = data.variablePointers; - if (data.protectedMemory !== undefined) this.protectedMemory = data.protectedMemory; - if (data.samplerYcbcrConversion !== undefined) this.samplerYcbcrConversion = data.samplerYcbcrConversion; - if (data.shaderDrawParameters !== undefined) this.shaderDrawParameters = data.shaderDrawParameters; - } - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get storageBuffer16BitAccess() { - return this.#view.getUint32(16, LE); - } - - set storageBuffer16BitAccess(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get uniformAndStorageBuffer16BitAccess() { - return this.#view.getUint32(20, LE); - } - - set uniformAndStorageBuffer16BitAccess(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get storagePushConstant16() { - return this.#view.getUint32(24, LE); - } - - set storagePushConstant16(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get storageInputOutput16() { - return this.#view.getUint32(28, LE); - } - - set storageInputOutput16(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get multiview() { - return this.#view.getUint32(32, LE); - } - - set multiview(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get multiviewGeometryShader() { - return this.#view.getUint32(36, LE); - } - - set multiviewGeometryShader(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get multiviewTessellationShader() { - return this.#view.getUint32(40, LE); - } - - set multiviewTessellationShader(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get variablePointersStorageBuffer() { - return this.#view.getUint32(44, LE); - } - - set variablePointersStorageBuffer(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get variablePointers() { - return this.#view.getUint32(48, LE); - } - - set variablePointers(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get protectedMemory() { - return this.#view.getUint32(52, LE); - } - - set protectedMemory(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get samplerYcbcrConversion() { - return this.#view.getUint32(56, LE); - } - - set samplerYcbcrConversion(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get shaderDrawParameters() { - return this.#view.getUint32(60, LE); - } - - set shaderDrawParameters(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } -} - -export interface InitPhysicalDeviceVulkan11Properties { - pNext?: AnyPointer; - deviceUUID?: Uint8Array; - driverUUID?: Uint8Array; - deviceLUID?: Uint8Array; - deviceNodeMask?: number; - deviceLUIDValid?: Bool32; - subgroupSize?: number; - subgroupSupportedStages?: ShaderStageFlags; - subgroupSupportedOperations?: SubgroupFeatureFlags; - subgroupQuadOperationsInAllStages?: Bool32; - pointClippingBehavior?: PointClippingBehavior; - maxMultiviewViewCount?: number; - maxMultiviewInstanceIndex?: number; - protectedNoFault?: Bool32; - maxPerSetDescriptors?: number; - maxMemoryAllocationSize?: DeviceSize; -} - -export class PhysicalDeviceVulkan11Properties implements BaseStruct { - static size = 112; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVulkan11Properties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan11Properties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVulkan11Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan11Properties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan11Properties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVulkan11Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceUUID !== undefined) this.deviceUUID = data.deviceUUID; - if (data.driverUUID !== undefined) this.driverUUID = data.driverUUID; - if (data.deviceLUID !== undefined) this.deviceLUID = data.deviceLUID; - if (data.deviceNodeMask !== undefined) this.deviceNodeMask = data.deviceNodeMask; - if (data.deviceLUIDValid !== undefined) this.deviceLUIDValid = data.deviceLUIDValid; - if (data.subgroupSize !== undefined) this.subgroupSize = data.subgroupSize; - if (data.subgroupSupportedStages !== undefined) this.subgroupSupportedStages = data.subgroupSupportedStages; - if (data.subgroupSupportedOperations !== undefined) this.subgroupSupportedOperations = data.subgroupSupportedOperations; - if (data.subgroupQuadOperationsInAllStages !== undefined) this.subgroupQuadOperationsInAllStages = data.subgroupQuadOperationsInAllStages; - if (data.pointClippingBehavior !== undefined) this.pointClippingBehavior = data.pointClippingBehavior; - if (data.maxMultiviewViewCount !== undefined) this.maxMultiviewViewCount = data.maxMultiviewViewCount; - if (data.maxMultiviewInstanceIndex !== undefined) this.maxMultiviewInstanceIndex = data.maxMultiviewInstanceIndex; - if (data.protectedNoFault !== undefined) this.protectedNoFault = data.protectedNoFault; - if (data.maxPerSetDescriptors !== undefined) this.maxPerSetDescriptors = data.maxPerSetDescriptors; - if (data.maxMemoryAllocationSize !== undefined) this.maxMemoryAllocationSize = data.maxMemoryAllocationSize; - } - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - - set deviceUUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - - get driverUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 32, 16); - } - - set driverUUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 32); - } - - get deviceLUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 48, 8); - } - - set deviceLUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 48); - } - - get deviceNodeMask() { - return this.#view.getUint32(56, LE); - } - - set deviceNodeMask(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get deviceLUIDValid() { - return this.#view.getUint32(60, LE); - } - - set deviceLUIDValid(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get subgroupSize() { - return this.#view.getUint32(64, LE); - } - - set subgroupSize(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get subgroupSupportedStages() { - return this.#view.getUint32(68, LE); - } - - set subgroupSupportedStages(value: ShaderStageFlags) { - this.#view.setUint32(68, Number(value), LE); - } - - get subgroupSupportedOperations() { - return this.#view.getUint32(72, LE); - } - - set subgroupSupportedOperations(value: SubgroupFeatureFlags) { - this.#view.setUint32(72, Number(value), LE); - } - - get subgroupQuadOperationsInAllStages() { - return this.#view.getUint32(76, LE); - } - - set subgroupQuadOperationsInAllStages(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } - - get pointClippingBehavior() { - return this.#view.getUint32(80, LE); - } - - set pointClippingBehavior(value: PointClippingBehavior) { - this.#view.setUint32(80, Number(value), LE); - } - - get maxMultiviewViewCount() { - return this.#view.getUint32(84, LE); - } - - set maxMultiviewViewCount(value: number) { - this.#view.setUint32(84, Number(value), LE); - } - - get maxMultiviewInstanceIndex() { - return this.#view.getUint32(88, LE); - } - - set maxMultiviewInstanceIndex(value: number) { - this.#view.setUint32(88, Number(value), LE); - } - - get protectedNoFault() { - return this.#view.getUint32(92, LE); - } - - set protectedNoFault(value: Bool32) { - this.#view.setUint32(92, Number(value), LE); - } - - get maxPerSetDescriptors() { - return this.#view.getUint32(96, LE); - } - - set maxPerSetDescriptors(value: number) { - this.#view.setUint32(96, Number(value), LE); - } - - get maxMemoryAllocationSize() { - return this.#view.getBigUint64(104, LE); - } - - set maxMemoryAllocationSize(value: DeviceSize) { - this.#view.setBigUint64(104, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceVulkan12Features { - pNext?: AnyPointer; - samplerMirrorClampToEdge?: Bool32; - drawIndirectCount?: Bool32; - storageBuffer8BitAccess?: Bool32; - uniformAndStorageBuffer8BitAccess?: Bool32; - storagePushConstant8?: Bool32; - shaderBufferInt64Atomics?: Bool32; - shaderSharedInt64Atomics?: Bool32; - shaderFloat16?: Bool32; - shaderInt8?: Bool32; - descriptorIndexing?: Bool32; - shaderInputAttachmentArrayDynamicIndexing?: Bool32; - shaderUniformTexelBufferArrayDynamicIndexing?: Bool32; - shaderStorageTexelBufferArrayDynamicIndexing?: Bool32; - shaderUniformBufferArrayNonUniformIndexing?: Bool32; - shaderSampledImageArrayNonUniformIndexing?: Bool32; - shaderStorageBufferArrayNonUniformIndexing?: Bool32; - shaderStorageImageArrayNonUniformIndexing?: Bool32; - shaderInputAttachmentArrayNonUniformIndexing?: Bool32; - shaderUniformTexelBufferArrayNonUniformIndexing?: Bool32; - shaderStorageTexelBufferArrayNonUniformIndexing?: Bool32; - descriptorBindingUniformBufferUpdateAfterBind?: Bool32; - descriptorBindingSampledImageUpdateAfterBind?: Bool32; - descriptorBindingStorageImageUpdateAfterBind?: Bool32; - descriptorBindingStorageBufferUpdateAfterBind?: Bool32; - descriptorBindingUniformTexelBufferUpdateAfterBind?: Bool32; - descriptorBindingStorageTexelBufferUpdateAfterBind?: Bool32; - descriptorBindingUpdateUnusedWhilePending?: Bool32; - descriptorBindingPartiallyBound?: Bool32; - descriptorBindingVariableDescriptorCount?: Bool32; - runtimeDescriptorArray?: Bool32; - samplerFilterMinmax?: Bool32; - scalarBlockLayout?: Bool32; - imagelessFramebuffer?: Bool32; - uniformBufferStandardLayout?: Bool32; - shaderSubgroupExtendedTypes?: Bool32; - separateDepthStencilLayouts?: Bool32; - hostQueryReset?: Bool32; - timelineSemaphore?: Bool32; - bufferDeviceAddress?: Bool32; - bufferDeviceAddressCaptureReplay?: Bool32; - bufferDeviceAddressMultiDevice?: Bool32; - vulkanMemoryModel?: Bool32; - vulkanMemoryModelDeviceScope?: Bool32; - vulkanMemoryModelAvailabilityVisibilityChains?: Bool32; - shaderOutputViewportIndex?: Bool32; - shaderOutputLayer?: Bool32; - subgroupBroadcastDynamicId?: Bool32; -} - -export class PhysicalDeviceVulkan12Features implements BaseStruct { - static size = 208; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVulkan12Features); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan12Features) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVulkan12Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan12Features.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan12Features.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVulkan12Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.samplerMirrorClampToEdge !== undefined) this.samplerMirrorClampToEdge = data.samplerMirrorClampToEdge; - if (data.drawIndirectCount !== undefined) this.drawIndirectCount = data.drawIndirectCount; - if (data.storageBuffer8BitAccess !== undefined) this.storageBuffer8BitAccess = data.storageBuffer8BitAccess; - if (data.uniformAndStorageBuffer8BitAccess !== undefined) this.uniformAndStorageBuffer8BitAccess = data.uniformAndStorageBuffer8BitAccess; - if (data.storagePushConstant8 !== undefined) this.storagePushConstant8 = data.storagePushConstant8; - if (data.shaderBufferInt64Atomics !== undefined) this.shaderBufferInt64Atomics = data.shaderBufferInt64Atomics; - if (data.shaderSharedInt64Atomics !== undefined) this.shaderSharedInt64Atomics = data.shaderSharedInt64Atomics; - if (data.shaderFloat16 !== undefined) this.shaderFloat16 = data.shaderFloat16; - if (data.shaderInt8 !== undefined) this.shaderInt8 = data.shaderInt8; - if (data.descriptorIndexing !== undefined) this.descriptorIndexing = data.descriptorIndexing; - if (data.shaderInputAttachmentArrayDynamicIndexing !== undefined) this.shaderInputAttachmentArrayDynamicIndexing = data.shaderInputAttachmentArrayDynamicIndexing; - if (data.shaderUniformTexelBufferArrayDynamicIndexing !== undefined) this.shaderUniformTexelBufferArrayDynamicIndexing = data.shaderUniformTexelBufferArrayDynamicIndexing; - if (data.shaderStorageTexelBufferArrayDynamicIndexing !== undefined) this.shaderStorageTexelBufferArrayDynamicIndexing = data.shaderStorageTexelBufferArrayDynamicIndexing; - if (data.shaderUniformBufferArrayNonUniformIndexing !== undefined) this.shaderUniformBufferArrayNonUniformIndexing = data.shaderUniformBufferArrayNonUniformIndexing; - if (data.shaderSampledImageArrayNonUniformIndexing !== undefined) this.shaderSampledImageArrayNonUniformIndexing = data.shaderSampledImageArrayNonUniformIndexing; - if (data.shaderStorageBufferArrayNonUniformIndexing !== undefined) this.shaderStorageBufferArrayNonUniformIndexing = data.shaderStorageBufferArrayNonUniformIndexing; - if (data.shaderStorageImageArrayNonUniformIndexing !== undefined) this.shaderStorageImageArrayNonUniformIndexing = data.shaderStorageImageArrayNonUniformIndexing; - if (data.shaderInputAttachmentArrayNonUniformIndexing !== undefined) this.shaderInputAttachmentArrayNonUniformIndexing = data.shaderInputAttachmentArrayNonUniformIndexing; - if (data.shaderUniformTexelBufferArrayNonUniformIndexing !== undefined) this.shaderUniformTexelBufferArrayNonUniformIndexing = data.shaderUniformTexelBufferArrayNonUniformIndexing; - if (data.shaderStorageTexelBufferArrayNonUniformIndexing !== undefined) this.shaderStorageTexelBufferArrayNonUniformIndexing = data.shaderStorageTexelBufferArrayNonUniformIndexing; - if (data.descriptorBindingUniformBufferUpdateAfterBind !== undefined) this.descriptorBindingUniformBufferUpdateAfterBind = data.descriptorBindingUniformBufferUpdateAfterBind; - if (data.descriptorBindingSampledImageUpdateAfterBind !== undefined) this.descriptorBindingSampledImageUpdateAfterBind = data.descriptorBindingSampledImageUpdateAfterBind; - if (data.descriptorBindingStorageImageUpdateAfterBind !== undefined) this.descriptorBindingStorageImageUpdateAfterBind = data.descriptorBindingStorageImageUpdateAfterBind; - if (data.descriptorBindingStorageBufferUpdateAfterBind !== undefined) this.descriptorBindingStorageBufferUpdateAfterBind = data.descriptorBindingStorageBufferUpdateAfterBind; - if (data.descriptorBindingUniformTexelBufferUpdateAfterBind !== undefined) this.descriptorBindingUniformTexelBufferUpdateAfterBind = data.descriptorBindingUniformTexelBufferUpdateAfterBind; - if (data.descriptorBindingStorageTexelBufferUpdateAfterBind !== undefined) this.descriptorBindingStorageTexelBufferUpdateAfterBind = data.descriptorBindingStorageTexelBufferUpdateAfterBind; - if (data.descriptorBindingUpdateUnusedWhilePending !== undefined) this.descriptorBindingUpdateUnusedWhilePending = data.descriptorBindingUpdateUnusedWhilePending; - if (data.descriptorBindingPartiallyBound !== undefined) this.descriptorBindingPartiallyBound = data.descriptorBindingPartiallyBound; - if (data.descriptorBindingVariableDescriptorCount !== undefined) this.descriptorBindingVariableDescriptorCount = data.descriptorBindingVariableDescriptorCount; - if (data.runtimeDescriptorArray !== undefined) this.runtimeDescriptorArray = data.runtimeDescriptorArray; - if (data.samplerFilterMinmax !== undefined) this.samplerFilterMinmax = data.samplerFilterMinmax; - if (data.scalarBlockLayout !== undefined) this.scalarBlockLayout = data.scalarBlockLayout; - if (data.imagelessFramebuffer !== undefined) this.imagelessFramebuffer = data.imagelessFramebuffer; - if (data.uniformBufferStandardLayout !== undefined) this.uniformBufferStandardLayout = data.uniformBufferStandardLayout; - if (data.shaderSubgroupExtendedTypes !== undefined) this.shaderSubgroupExtendedTypes = data.shaderSubgroupExtendedTypes; - if (data.separateDepthStencilLayouts !== undefined) this.separateDepthStencilLayouts = data.separateDepthStencilLayouts; - if (data.hostQueryReset !== undefined) this.hostQueryReset = data.hostQueryReset; - if (data.timelineSemaphore !== undefined) this.timelineSemaphore = data.timelineSemaphore; - if (data.bufferDeviceAddress !== undefined) this.bufferDeviceAddress = data.bufferDeviceAddress; - if (data.bufferDeviceAddressCaptureReplay !== undefined) this.bufferDeviceAddressCaptureReplay = data.bufferDeviceAddressCaptureReplay; - if (data.bufferDeviceAddressMultiDevice !== undefined) this.bufferDeviceAddressMultiDevice = data.bufferDeviceAddressMultiDevice; - if (data.vulkanMemoryModel !== undefined) this.vulkanMemoryModel = data.vulkanMemoryModel; - if (data.vulkanMemoryModelDeviceScope !== undefined) this.vulkanMemoryModelDeviceScope = data.vulkanMemoryModelDeviceScope; - if (data.vulkanMemoryModelAvailabilityVisibilityChains !== undefined) this.vulkanMemoryModelAvailabilityVisibilityChains = data.vulkanMemoryModelAvailabilityVisibilityChains; - if (data.shaderOutputViewportIndex !== undefined) this.shaderOutputViewportIndex = data.shaderOutputViewportIndex; - if (data.shaderOutputLayer !== undefined) this.shaderOutputLayer = data.shaderOutputLayer; - if (data.subgroupBroadcastDynamicId !== undefined) this.subgroupBroadcastDynamicId = data.subgroupBroadcastDynamicId; - } - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_2_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get samplerMirrorClampToEdge() { - return this.#view.getUint32(16, LE); - } - - set samplerMirrorClampToEdge(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get drawIndirectCount() { - return this.#view.getUint32(20, LE); - } - - set drawIndirectCount(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get storageBuffer8BitAccess() { - return this.#view.getUint32(24, LE); - } - - set storageBuffer8BitAccess(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get uniformAndStorageBuffer8BitAccess() { - return this.#view.getUint32(28, LE); - } - - set uniformAndStorageBuffer8BitAccess(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get storagePushConstant8() { - return this.#view.getUint32(32, LE); - } - - set storagePushConstant8(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get shaderBufferInt64Atomics() { - return this.#view.getUint32(36, LE); - } - - set shaderBufferInt64Atomics(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get shaderSharedInt64Atomics() { - return this.#view.getUint32(40, LE); - } - - set shaderSharedInt64Atomics(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get shaderFloat16() { - return this.#view.getUint32(44, LE); - } - - set shaderFloat16(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get shaderInt8() { - return this.#view.getUint32(48, LE); - } - - set shaderInt8(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get descriptorIndexing() { - return this.#view.getUint32(52, LE); - } - - set descriptorIndexing(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get shaderInputAttachmentArrayDynamicIndexing() { - return this.#view.getUint32(56, LE); - } - - set shaderInputAttachmentArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get shaderUniformTexelBufferArrayDynamicIndexing() { - return this.#view.getUint32(60, LE); - } - - set shaderUniformTexelBufferArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get shaderStorageTexelBufferArrayDynamicIndexing() { - return this.#view.getUint32(64, LE); - } - - set shaderStorageTexelBufferArrayDynamicIndexing(value: Bool32) { - this.#view.setUint32(64, Number(value), LE); - } - - get shaderUniformBufferArrayNonUniformIndexing() { - return this.#view.getUint32(68, LE); - } - - set shaderUniformBufferArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get shaderSampledImageArrayNonUniformIndexing() { - return this.#view.getUint32(72, LE); - } - - set shaderSampledImageArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } - - get shaderStorageBufferArrayNonUniformIndexing() { - return this.#view.getUint32(76, LE); - } - - set shaderStorageBufferArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } - - get shaderStorageImageArrayNonUniformIndexing() { - return this.#view.getUint32(80, LE); - } - - set shaderStorageImageArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(80, Number(value), LE); - } - - get shaderInputAttachmentArrayNonUniformIndexing() { - return this.#view.getUint32(84, LE); - } - - set shaderInputAttachmentArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(84, Number(value), LE); - } - - get shaderUniformTexelBufferArrayNonUniformIndexing() { - return this.#view.getUint32(88, LE); - } - - set shaderUniformTexelBufferArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(88, Number(value), LE); - } - - get shaderStorageTexelBufferArrayNonUniformIndexing() { - return this.#view.getUint32(92, LE); - } - - set shaderStorageTexelBufferArrayNonUniformIndexing(value: Bool32) { - this.#view.setUint32(92, Number(value), LE); - } - - get descriptorBindingUniformBufferUpdateAfterBind() { - return this.#view.getUint32(96, LE); - } - - set descriptorBindingUniformBufferUpdateAfterBind(value: Bool32) { - this.#view.setUint32(96, Number(value), LE); - } - - get descriptorBindingSampledImageUpdateAfterBind() { - return this.#view.getUint32(100, LE); - } - - set descriptorBindingSampledImageUpdateAfterBind(value: Bool32) { - this.#view.setUint32(100, Number(value), LE); - } - - get descriptorBindingStorageImageUpdateAfterBind() { - return this.#view.getUint32(104, LE); - } - - set descriptorBindingStorageImageUpdateAfterBind(value: Bool32) { - this.#view.setUint32(104, Number(value), LE); - } - - get descriptorBindingStorageBufferUpdateAfterBind() { - return this.#view.getUint32(108, LE); - } - - set descriptorBindingStorageBufferUpdateAfterBind(value: Bool32) { - this.#view.setUint32(108, Number(value), LE); - } - - get descriptorBindingUniformTexelBufferUpdateAfterBind() { - return this.#view.getUint32(112, LE); - } - - set descriptorBindingUniformTexelBufferUpdateAfterBind(value: Bool32) { - this.#view.setUint32(112, Number(value), LE); - } - - get descriptorBindingStorageTexelBufferUpdateAfterBind() { - return this.#view.getUint32(116, LE); - } - - set descriptorBindingStorageTexelBufferUpdateAfterBind(value: Bool32) { - this.#view.setUint32(116, Number(value), LE); - } - - get descriptorBindingUpdateUnusedWhilePending() { - return this.#view.getUint32(120, LE); - } - - set descriptorBindingUpdateUnusedWhilePending(value: Bool32) { - this.#view.setUint32(120, Number(value), LE); - } - - get descriptorBindingPartiallyBound() { - return this.#view.getUint32(124, LE); - } - - set descriptorBindingPartiallyBound(value: Bool32) { - this.#view.setUint32(124, Number(value), LE); - } - - get descriptorBindingVariableDescriptorCount() { - return this.#view.getUint32(128, LE); - } - - set descriptorBindingVariableDescriptorCount(value: Bool32) { - this.#view.setUint32(128, Number(value), LE); - } - - get runtimeDescriptorArray() { - return this.#view.getUint32(132, LE); - } - - set runtimeDescriptorArray(value: Bool32) { - this.#view.setUint32(132, Number(value), LE); - } - - get samplerFilterMinmax() { - return this.#view.getUint32(136, LE); - } - - set samplerFilterMinmax(value: Bool32) { - this.#view.setUint32(136, Number(value), LE); - } - - get scalarBlockLayout() { - return this.#view.getUint32(140, LE); - } - - set scalarBlockLayout(value: Bool32) { - this.#view.setUint32(140, Number(value), LE); - } - - get imagelessFramebuffer() { - return this.#view.getUint32(144, LE); - } - - set imagelessFramebuffer(value: Bool32) { - this.#view.setUint32(144, Number(value), LE); - } - - get uniformBufferStandardLayout() { - return this.#view.getUint32(148, LE); - } - - set uniformBufferStandardLayout(value: Bool32) { - this.#view.setUint32(148, Number(value), LE); - } - - get shaderSubgroupExtendedTypes() { - return this.#view.getUint32(152, LE); - } - - set shaderSubgroupExtendedTypes(value: Bool32) { - this.#view.setUint32(152, Number(value), LE); - } - - get separateDepthStencilLayouts() { - return this.#view.getUint32(156, LE); - } - - set separateDepthStencilLayouts(value: Bool32) { - this.#view.setUint32(156, Number(value), LE); - } - - get hostQueryReset() { - return this.#view.getUint32(160, LE); - } - - set hostQueryReset(value: Bool32) { - this.#view.setUint32(160, Number(value), LE); - } - - get timelineSemaphore() { - return this.#view.getUint32(164, LE); - } - - set timelineSemaphore(value: Bool32) { - this.#view.setUint32(164, Number(value), LE); - } - - get bufferDeviceAddress() { - return this.#view.getUint32(168, LE); - } - - set bufferDeviceAddress(value: Bool32) { - this.#view.setUint32(168, Number(value), LE); - } - - get bufferDeviceAddressCaptureReplay() { - return this.#view.getUint32(172, LE); - } - - set bufferDeviceAddressCaptureReplay(value: Bool32) { - this.#view.setUint32(172, Number(value), LE); - } - - get bufferDeviceAddressMultiDevice() { - return this.#view.getUint32(176, LE); - } - - set bufferDeviceAddressMultiDevice(value: Bool32) { - this.#view.setUint32(176, Number(value), LE); - } - - get vulkanMemoryModel() { - return this.#view.getUint32(180, LE); - } - - set vulkanMemoryModel(value: Bool32) { - this.#view.setUint32(180, Number(value), LE); - } - - get vulkanMemoryModelDeviceScope() { - return this.#view.getUint32(184, LE); - } - - set vulkanMemoryModelDeviceScope(value: Bool32) { - this.#view.setUint32(184, Number(value), LE); - } - - get vulkanMemoryModelAvailabilityVisibilityChains() { - return this.#view.getUint32(188, LE); - } - - set vulkanMemoryModelAvailabilityVisibilityChains(value: Bool32) { - this.#view.setUint32(188, Number(value), LE); - } - - get shaderOutputViewportIndex() { - return this.#view.getUint32(192, LE); - } - - set shaderOutputViewportIndex(value: Bool32) { - this.#view.setUint32(192, Number(value), LE); - } - - get shaderOutputLayer() { - return this.#view.getUint32(196, LE); - } - - set shaderOutputLayer(value: Bool32) { - this.#view.setUint32(196, Number(value), LE); - } - - get subgroupBroadcastDynamicId() { - return this.#view.getUint32(200, LE); - } - - set subgroupBroadcastDynamicId(value: Bool32) { - this.#view.setUint32(200, Number(value), LE); - } -} - -export interface InitPhysicalDeviceVulkan12Properties { - pNext?: AnyPointer; - driverID?: DriverId; - driverName?: Uint8Array; - driverInfo?: Uint8Array; - conformanceVersion?: ConformanceVersion; - denormBehaviorIndependence?: ShaderFloatControlsIndependence; - roundingModeIndependence?: ShaderFloatControlsIndependence; - shaderSignedZeroInfNanPreserveFloat16?: Bool32; - shaderSignedZeroInfNanPreserveFloat32?: Bool32; - shaderSignedZeroInfNanPreserveFloat64?: Bool32; - shaderDenormPreserveFloat16?: Bool32; - shaderDenormPreserveFloat32?: Bool32; - shaderDenormPreserveFloat64?: Bool32; - shaderDenormFlushToZeroFloat16?: Bool32; - shaderDenormFlushToZeroFloat32?: Bool32; - shaderDenormFlushToZeroFloat64?: Bool32; - shaderRoundingModeRTEFloat16?: Bool32; - shaderRoundingModeRTEFloat32?: Bool32; - shaderRoundingModeRTEFloat64?: Bool32; - shaderRoundingModeRTZFloat16?: Bool32; - shaderRoundingModeRTZFloat32?: Bool32; - shaderRoundingModeRTZFloat64?: Bool32; - maxUpdateAfterBindDescriptorsInAllPools?: number; - shaderUniformBufferArrayNonUniformIndexingNative?: Bool32; - shaderSampledImageArrayNonUniformIndexingNative?: Bool32; - shaderStorageBufferArrayNonUniformIndexingNative?: Bool32; - shaderStorageImageArrayNonUniformIndexingNative?: Bool32; - shaderInputAttachmentArrayNonUniformIndexingNative?: Bool32; - robustBufferAccessUpdateAfterBind?: Bool32; - quadDivergentImplicitLod?: Bool32; - maxPerStageDescriptorUpdateAfterBindSamplers?: number; - maxPerStageDescriptorUpdateAfterBindUniformBuffers?: number; - maxPerStageDescriptorUpdateAfterBindStorageBuffers?: number; - maxPerStageDescriptorUpdateAfterBindSampledImages?: number; - maxPerStageDescriptorUpdateAfterBindStorageImages?: number; - maxPerStageDescriptorUpdateAfterBindInputAttachments?: number; - maxPerStageUpdateAfterBindResources?: number; - maxDescriptorSetUpdateAfterBindSamplers?: number; - maxDescriptorSetUpdateAfterBindUniformBuffers?: number; - maxDescriptorSetUpdateAfterBindUniformBuffersDynamic?: number; - maxDescriptorSetUpdateAfterBindStorageBuffers?: number; - maxDescriptorSetUpdateAfterBindStorageBuffersDynamic?: number; - maxDescriptorSetUpdateAfterBindSampledImages?: number; - maxDescriptorSetUpdateAfterBindStorageImages?: number; - maxDescriptorSetUpdateAfterBindInputAttachments?: number; - supportedDepthResolveModes?: ResolveModeFlags; - supportedStencilResolveModes?: ResolveModeFlags; - independentResolveNone?: Bool32; - independentResolve?: Bool32; - filterMinmaxSingleComponentFormats?: Bool32; - filterMinmaxImageComponentMapping?: Bool32; - maxTimelineSemaphoreValueDifference?: Deno.PointerValue; - framebufferIntegerColorSampleCounts?: SampleCountFlags; -} - -export class PhysicalDeviceVulkan12Properties implements BaseStruct { - static size = 736; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVulkan12Properties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan12Properties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVulkan12Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan12Properties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan12Properties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVulkan12Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.driverID !== undefined) this.driverID = data.driverID; - if (data.driverName !== undefined) this.driverName = data.driverName; - if (data.driverInfo !== undefined) this.driverInfo = data.driverInfo; - if (data.conformanceVersion !== undefined) this.conformanceVersion = data.conformanceVersion; - if (data.denormBehaviorIndependence !== undefined) this.denormBehaviorIndependence = data.denormBehaviorIndependence; - if (data.roundingModeIndependence !== undefined) this.roundingModeIndependence = data.roundingModeIndependence; - if (data.shaderSignedZeroInfNanPreserveFloat16 !== undefined) this.shaderSignedZeroInfNanPreserveFloat16 = data.shaderSignedZeroInfNanPreserveFloat16; - if (data.shaderSignedZeroInfNanPreserveFloat32 !== undefined) this.shaderSignedZeroInfNanPreserveFloat32 = data.shaderSignedZeroInfNanPreserveFloat32; - if (data.shaderSignedZeroInfNanPreserveFloat64 !== undefined) this.shaderSignedZeroInfNanPreserveFloat64 = data.shaderSignedZeroInfNanPreserveFloat64; - if (data.shaderDenormPreserveFloat16 !== undefined) this.shaderDenormPreserveFloat16 = data.shaderDenormPreserveFloat16; - if (data.shaderDenormPreserveFloat32 !== undefined) this.shaderDenormPreserveFloat32 = data.shaderDenormPreserveFloat32; - if (data.shaderDenormPreserveFloat64 !== undefined) this.shaderDenormPreserveFloat64 = data.shaderDenormPreserveFloat64; - if (data.shaderDenormFlushToZeroFloat16 !== undefined) this.shaderDenormFlushToZeroFloat16 = data.shaderDenormFlushToZeroFloat16; - if (data.shaderDenormFlushToZeroFloat32 !== undefined) this.shaderDenormFlushToZeroFloat32 = data.shaderDenormFlushToZeroFloat32; - if (data.shaderDenormFlushToZeroFloat64 !== undefined) this.shaderDenormFlushToZeroFloat64 = data.shaderDenormFlushToZeroFloat64; - if (data.shaderRoundingModeRTEFloat16 !== undefined) this.shaderRoundingModeRTEFloat16 = data.shaderRoundingModeRTEFloat16; - if (data.shaderRoundingModeRTEFloat32 !== undefined) this.shaderRoundingModeRTEFloat32 = data.shaderRoundingModeRTEFloat32; - if (data.shaderRoundingModeRTEFloat64 !== undefined) this.shaderRoundingModeRTEFloat64 = data.shaderRoundingModeRTEFloat64; - if (data.shaderRoundingModeRTZFloat16 !== undefined) this.shaderRoundingModeRTZFloat16 = data.shaderRoundingModeRTZFloat16; - if (data.shaderRoundingModeRTZFloat32 !== undefined) this.shaderRoundingModeRTZFloat32 = data.shaderRoundingModeRTZFloat32; - if (data.shaderRoundingModeRTZFloat64 !== undefined) this.shaderRoundingModeRTZFloat64 = data.shaderRoundingModeRTZFloat64; - if (data.maxUpdateAfterBindDescriptorsInAllPools !== undefined) this.maxUpdateAfterBindDescriptorsInAllPools = data.maxUpdateAfterBindDescriptorsInAllPools; - if (data.shaderUniformBufferArrayNonUniformIndexingNative !== undefined) this.shaderUniformBufferArrayNonUniformIndexingNative = data.shaderUniformBufferArrayNonUniformIndexingNative; - if (data.shaderSampledImageArrayNonUniformIndexingNative !== undefined) this.shaderSampledImageArrayNonUniformIndexingNative = data.shaderSampledImageArrayNonUniformIndexingNative; - if (data.shaderStorageBufferArrayNonUniformIndexingNative !== undefined) this.shaderStorageBufferArrayNonUniformIndexingNative = data.shaderStorageBufferArrayNonUniformIndexingNative; - if (data.shaderStorageImageArrayNonUniformIndexingNative !== undefined) this.shaderStorageImageArrayNonUniformIndexingNative = data.shaderStorageImageArrayNonUniformIndexingNative; - if (data.shaderInputAttachmentArrayNonUniformIndexingNative !== undefined) this.shaderInputAttachmentArrayNonUniformIndexingNative = data.shaderInputAttachmentArrayNonUniformIndexingNative; - if (data.robustBufferAccessUpdateAfterBind !== undefined) this.robustBufferAccessUpdateAfterBind = data.robustBufferAccessUpdateAfterBind; - if (data.quadDivergentImplicitLod !== undefined) this.quadDivergentImplicitLod = data.quadDivergentImplicitLod; - if (data.maxPerStageDescriptorUpdateAfterBindSamplers !== undefined) this.maxPerStageDescriptorUpdateAfterBindSamplers = data.maxPerStageDescriptorUpdateAfterBindSamplers; - if (data.maxPerStageDescriptorUpdateAfterBindUniformBuffers !== undefined) this.maxPerStageDescriptorUpdateAfterBindUniformBuffers = data.maxPerStageDescriptorUpdateAfterBindUniformBuffers; - if (data.maxPerStageDescriptorUpdateAfterBindStorageBuffers !== undefined) this.maxPerStageDescriptorUpdateAfterBindStorageBuffers = data.maxPerStageDescriptorUpdateAfterBindStorageBuffers; - if (data.maxPerStageDescriptorUpdateAfterBindSampledImages !== undefined) this.maxPerStageDescriptorUpdateAfterBindSampledImages = data.maxPerStageDescriptorUpdateAfterBindSampledImages; - if (data.maxPerStageDescriptorUpdateAfterBindStorageImages !== undefined) this.maxPerStageDescriptorUpdateAfterBindStorageImages = data.maxPerStageDescriptorUpdateAfterBindStorageImages; - if (data.maxPerStageDescriptorUpdateAfterBindInputAttachments !== undefined) this.maxPerStageDescriptorUpdateAfterBindInputAttachments = data.maxPerStageDescriptorUpdateAfterBindInputAttachments; - if (data.maxPerStageUpdateAfterBindResources !== undefined) this.maxPerStageUpdateAfterBindResources = data.maxPerStageUpdateAfterBindResources; - if (data.maxDescriptorSetUpdateAfterBindSamplers !== undefined) this.maxDescriptorSetUpdateAfterBindSamplers = data.maxDescriptorSetUpdateAfterBindSamplers; - if (data.maxDescriptorSetUpdateAfterBindUniformBuffers !== undefined) this.maxDescriptorSetUpdateAfterBindUniformBuffers = data.maxDescriptorSetUpdateAfterBindUniformBuffers; - if (data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic !== undefined) this.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = data.maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; - if (data.maxDescriptorSetUpdateAfterBindStorageBuffers !== undefined) this.maxDescriptorSetUpdateAfterBindStorageBuffers = data.maxDescriptorSetUpdateAfterBindStorageBuffers; - if (data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic !== undefined) this.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = data.maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; - if (data.maxDescriptorSetUpdateAfterBindSampledImages !== undefined) this.maxDescriptorSetUpdateAfterBindSampledImages = data.maxDescriptorSetUpdateAfterBindSampledImages; - if (data.maxDescriptorSetUpdateAfterBindStorageImages !== undefined) this.maxDescriptorSetUpdateAfterBindStorageImages = data.maxDescriptorSetUpdateAfterBindStorageImages; - if (data.maxDescriptorSetUpdateAfterBindInputAttachments !== undefined) this.maxDescriptorSetUpdateAfterBindInputAttachments = data.maxDescriptorSetUpdateAfterBindInputAttachments; - if (data.supportedDepthResolveModes !== undefined) this.supportedDepthResolveModes = data.supportedDepthResolveModes; - if (data.supportedStencilResolveModes !== undefined) this.supportedStencilResolveModes = data.supportedStencilResolveModes; - if (data.independentResolveNone !== undefined) this.independentResolveNone = data.independentResolveNone; - if (data.independentResolve !== undefined) this.independentResolve = data.independentResolve; - if (data.filterMinmaxSingleComponentFormats !== undefined) this.filterMinmaxSingleComponentFormats = data.filterMinmaxSingleComponentFormats; - if (data.filterMinmaxImageComponentMapping !== undefined) this.filterMinmaxImageComponentMapping = data.filterMinmaxImageComponentMapping; - if (data.maxTimelineSemaphoreValueDifference !== undefined) this.maxTimelineSemaphoreValueDifference = data.maxTimelineSemaphoreValueDifference; - if (data.framebufferIntegerColorSampleCounts !== undefined) this.framebufferIntegerColorSampleCounts = data.framebufferIntegerColorSampleCounts; - } - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get driverID() { - return this.#view.getUint32(16, LE); - } - - set driverID(value: DriverId) { - this.#view.setUint32(16, Number(value), LE); - } - - get driverName() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 256); - } - - set driverName(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - - get driverInfo() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 276, 256); - } - - set driverInfo(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 276); - } - - get conformanceVersion() { - return new ConformanceVersion(this.#data.subarray(532, 532 + ConformanceVersion.size)); - } - - set conformanceVersion(value: ConformanceVersion) { - if (value[BUFFER].byteLength < ConformanceVersion.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 532); - } - - get denormBehaviorIndependence() { - return this.#view.getUint32(536, LE); - } - - set denormBehaviorIndependence(value: ShaderFloatControlsIndependence) { - this.#view.setUint32(536, Number(value), LE); - } - - get roundingModeIndependence() { - return this.#view.getUint32(540, LE); - } - - set roundingModeIndependence(value: ShaderFloatControlsIndependence) { - this.#view.setUint32(540, Number(value), LE); - } - - get shaderSignedZeroInfNanPreserveFloat16() { - return this.#view.getUint32(544, LE); - } - - set shaderSignedZeroInfNanPreserveFloat16(value: Bool32) { - this.#view.setUint32(544, Number(value), LE); - } - - get shaderSignedZeroInfNanPreserveFloat32() { - return this.#view.getUint32(548, LE); - } - - set shaderSignedZeroInfNanPreserveFloat32(value: Bool32) { - this.#view.setUint32(548, Number(value), LE); - } - - get shaderSignedZeroInfNanPreserveFloat64() { - return this.#view.getUint32(552, LE); - } - - set shaderSignedZeroInfNanPreserveFloat64(value: Bool32) { - this.#view.setUint32(552, Number(value), LE); - } - - get shaderDenormPreserveFloat16() { - return this.#view.getUint32(556, LE); - } - - set shaderDenormPreserveFloat16(value: Bool32) { - this.#view.setUint32(556, Number(value), LE); - } - - get shaderDenormPreserveFloat32() { - return this.#view.getUint32(560, LE); - } - - set shaderDenormPreserveFloat32(value: Bool32) { - this.#view.setUint32(560, Number(value), LE); - } - - get shaderDenormPreserveFloat64() { - return this.#view.getUint32(564, LE); - } - - set shaderDenormPreserveFloat64(value: Bool32) { - this.#view.setUint32(564, Number(value), LE); - } - - get shaderDenormFlushToZeroFloat16() { - return this.#view.getUint32(568, LE); - } - - set shaderDenormFlushToZeroFloat16(value: Bool32) { - this.#view.setUint32(568, Number(value), LE); - } - - get shaderDenormFlushToZeroFloat32() { - return this.#view.getUint32(572, LE); - } - - set shaderDenormFlushToZeroFloat32(value: Bool32) { - this.#view.setUint32(572, Number(value), LE); - } - - get shaderDenormFlushToZeroFloat64() { - return this.#view.getUint32(576, LE); - } - - set shaderDenormFlushToZeroFloat64(value: Bool32) { - this.#view.setUint32(576, Number(value), LE); - } - - get shaderRoundingModeRTEFloat16() { - return this.#view.getUint32(580, LE); - } - - set shaderRoundingModeRTEFloat16(value: Bool32) { - this.#view.setUint32(580, Number(value), LE); - } - - get shaderRoundingModeRTEFloat32() { - return this.#view.getUint32(584, LE); - } - - set shaderRoundingModeRTEFloat32(value: Bool32) { - this.#view.setUint32(584, Number(value), LE); - } - - get shaderRoundingModeRTEFloat64() { - return this.#view.getUint32(588, LE); - } - - set shaderRoundingModeRTEFloat64(value: Bool32) { - this.#view.setUint32(588, Number(value), LE); - } - - get shaderRoundingModeRTZFloat16() { - return this.#view.getUint32(592, LE); - } - - set shaderRoundingModeRTZFloat16(value: Bool32) { - this.#view.setUint32(592, Number(value), LE); - } - - get shaderRoundingModeRTZFloat32() { - return this.#view.getUint32(596, LE); - } - - set shaderRoundingModeRTZFloat32(value: Bool32) { - this.#view.setUint32(596, Number(value), LE); - } - - get shaderRoundingModeRTZFloat64() { - return this.#view.getUint32(600, LE); - } - - set shaderRoundingModeRTZFloat64(value: Bool32) { - this.#view.setUint32(600, Number(value), LE); - } - - get maxUpdateAfterBindDescriptorsInAllPools() { - return this.#view.getUint32(604, LE); - } - - set maxUpdateAfterBindDescriptorsInAllPools(value: number) { - this.#view.setUint32(604, Number(value), LE); - } - - get shaderUniformBufferArrayNonUniformIndexingNative() { - return this.#view.getUint32(608, LE); - } - - set shaderUniformBufferArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(608, Number(value), LE); - } - - get shaderSampledImageArrayNonUniformIndexingNative() { - return this.#view.getUint32(612, LE); - } - - set shaderSampledImageArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(612, Number(value), LE); - } - - get shaderStorageBufferArrayNonUniformIndexingNative() { - return this.#view.getUint32(616, LE); - } - - set shaderStorageBufferArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(616, Number(value), LE); - } - - get shaderStorageImageArrayNonUniformIndexingNative() { - return this.#view.getUint32(620, LE); - } - - set shaderStorageImageArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(620, Number(value), LE); - } - - get shaderInputAttachmentArrayNonUniformIndexingNative() { - return this.#view.getUint32(624, LE); - } - - set shaderInputAttachmentArrayNonUniformIndexingNative(value: Bool32) { - this.#view.setUint32(624, Number(value), LE); - } - - get robustBufferAccessUpdateAfterBind() { - return this.#view.getUint32(628, LE); - } - - set robustBufferAccessUpdateAfterBind(value: Bool32) { - this.#view.setUint32(628, Number(value), LE); - } - - get quadDivergentImplicitLod() { - return this.#view.getUint32(632, LE); - } - - set quadDivergentImplicitLod(value: Bool32) { - this.#view.setUint32(632, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindSamplers() { - return this.#view.getUint32(636, LE); - } - - set maxPerStageDescriptorUpdateAfterBindSamplers(value: number) { - this.#view.setUint32(636, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindUniformBuffers() { - return this.#view.getUint32(640, LE); - } - - set maxPerStageDescriptorUpdateAfterBindUniformBuffers(value: number) { - this.#view.setUint32(640, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindStorageBuffers() { - return this.#view.getUint32(644, LE); - } - - set maxPerStageDescriptorUpdateAfterBindStorageBuffers(value: number) { - this.#view.setUint32(644, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindSampledImages() { - return this.#view.getUint32(648, LE); - } - - set maxPerStageDescriptorUpdateAfterBindSampledImages(value: number) { - this.#view.setUint32(648, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindStorageImages() { - return this.#view.getUint32(652, LE); - } - - set maxPerStageDescriptorUpdateAfterBindStorageImages(value: number) { - this.#view.setUint32(652, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindInputAttachments() { - return this.#view.getUint32(656, LE); - } - - set maxPerStageDescriptorUpdateAfterBindInputAttachments(value: number) { - this.#view.setUint32(656, Number(value), LE); - } - - get maxPerStageUpdateAfterBindResources() { - return this.#view.getUint32(660, LE); - } - - set maxPerStageUpdateAfterBindResources(value: number) { - this.#view.setUint32(660, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindSamplers() { - return this.#view.getUint32(664, LE); - } - - set maxDescriptorSetUpdateAfterBindSamplers(value: number) { - this.#view.setUint32(664, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindUniformBuffers() { - return this.#view.getUint32(668, LE); - } - - set maxDescriptorSetUpdateAfterBindUniformBuffers(value: number) { - this.#view.setUint32(668, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindUniformBuffersDynamic() { - return this.#view.getUint32(672, LE); - } - - set maxDescriptorSetUpdateAfterBindUniformBuffersDynamic(value: number) { - this.#view.setUint32(672, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindStorageBuffers() { - return this.#view.getUint32(676, LE); - } - - set maxDescriptorSetUpdateAfterBindStorageBuffers(value: number) { - this.#view.setUint32(676, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindStorageBuffersDynamic() { - return this.#view.getUint32(680, LE); - } - - set maxDescriptorSetUpdateAfterBindStorageBuffersDynamic(value: number) { - this.#view.setUint32(680, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindSampledImages() { - return this.#view.getUint32(684, LE); - } - - set maxDescriptorSetUpdateAfterBindSampledImages(value: number) { - this.#view.setUint32(684, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindStorageImages() { - return this.#view.getUint32(688, LE); - } - - set maxDescriptorSetUpdateAfterBindStorageImages(value: number) { - this.#view.setUint32(688, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindInputAttachments() { - return this.#view.getUint32(692, LE); - } - - set maxDescriptorSetUpdateAfterBindInputAttachments(value: number) { - this.#view.setUint32(692, Number(value), LE); - } - - get supportedDepthResolveModes() { - return this.#view.getUint32(696, LE); - } - - set supportedDepthResolveModes(value: ResolveModeFlags) { - this.#view.setUint32(696, Number(value), LE); - } - - get supportedStencilResolveModes() { - return this.#view.getUint32(700, LE); - } - - set supportedStencilResolveModes(value: ResolveModeFlags) { - this.#view.setUint32(700, Number(value), LE); - } - - get independentResolveNone() { - return this.#view.getUint32(704, LE); - } - - set independentResolveNone(value: Bool32) { - this.#view.setUint32(704, Number(value), LE); - } - - get independentResolve() { - return this.#view.getUint32(708, LE); - } - - set independentResolve(value: Bool32) { - this.#view.setUint32(708, Number(value), LE); - } - - get filterMinmaxSingleComponentFormats() { - return this.#view.getUint32(712, LE); - } - - set filterMinmaxSingleComponentFormats(value: Bool32) { - this.#view.setUint32(712, Number(value), LE); - } - - get filterMinmaxImageComponentMapping() { - return this.#view.getUint32(716, LE); - } - - set filterMinmaxImageComponentMapping(value: Bool32) { - this.#view.setUint32(716, Number(value), LE); - } - - get maxTimelineSemaphoreValueDifference() { - return this.#view.getBigUint64(720, LE); - } - - set maxTimelineSemaphoreValueDifference(value: Deno.PointerValue) { - this.#view.setBigUint64(720, BigInt(value), LE); - } - - get framebufferIntegerColorSampleCounts() { - return this.#view.getUint32(728, LE); - } - - set framebufferIntegerColorSampleCounts(value: SampleCountFlags) { - this.#view.setUint32(728, Number(value), LE); - } -} - -export interface InitPhysicalDeviceVulkan13Features { - pNext?: AnyPointer; - robustImageAccess?: Bool32; - inlineUniformBlock?: Bool32; - descriptorBindingInlineUniformBlockUpdateAfterBind?: Bool32; - pipelineCreationCacheControl?: Bool32; - privateData?: Bool32; - shaderDemoteToHelperInvocation?: Bool32; - shaderTerminateInvocation?: Bool32; - subgroupSizeControl?: Bool32; - computeFullSubgroups?: Bool32; - synchronization2?: Bool32; - textureCompressionASTC_HDR?: Bool32; - shaderZeroInitializeWorkgroupMemory?: Bool32; - dynamicRendering?: Bool32; - shaderIntegerDotProduct?: Bool32; - maintenance4?: Bool32; -} - -export class PhysicalDeviceVulkan13Features implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVulkan13Features); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan13Features) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVulkan13Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan13Features.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan13Features.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVulkan13Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.robustImageAccess !== undefined) this.robustImageAccess = data.robustImageAccess; - if (data.inlineUniformBlock !== undefined) this.inlineUniformBlock = data.inlineUniformBlock; - if (data.descriptorBindingInlineUniformBlockUpdateAfterBind !== undefined) this.descriptorBindingInlineUniformBlockUpdateAfterBind = data.descriptorBindingInlineUniformBlockUpdateAfterBind; - if (data.pipelineCreationCacheControl !== undefined) this.pipelineCreationCacheControl = data.pipelineCreationCacheControl; - if (data.privateData !== undefined) this.privateData = data.privateData; - if (data.shaderDemoteToHelperInvocation !== undefined) this.shaderDemoteToHelperInvocation = data.shaderDemoteToHelperInvocation; - if (data.shaderTerminateInvocation !== undefined) this.shaderTerminateInvocation = data.shaderTerminateInvocation; - if (data.subgroupSizeControl !== undefined) this.subgroupSizeControl = data.subgroupSizeControl; - if (data.computeFullSubgroups !== undefined) this.computeFullSubgroups = data.computeFullSubgroups; - if (data.synchronization2 !== undefined) this.synchronization2 = data.synchronization2; - if (data.textureCompressionASTC_HDR !== undefined) this.textureCompressionASTC_HDR = data.textureCompressionASTC_HDR; - if (data.shaderZeroInitializeWorkgroupMemory !== undefined) this.shaderZeroInitializeWorkgroupMemory = data.shaderZeroInitializeWorkgroupMemory; - if (data.dynamicRendering !== undefined) this.dynamicRendering = data.dynamicRendering; - if (data.shaderIntegerDotProduct !== undefined) this.shaderIntegerDotProduct = data.shaderIntegerDotProduct; - if (data.maintenance4 !== undefined) this.maintenance4 = data.maintenance4; - } - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_3_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get robustImageAccess() { - return this.#view.getUint32(16, LE); - } - - set robustImageAccess(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get inlineUniformBlock() { - return this.#view.getUint32(20, LE); - } - - set inlineUniformBlock(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get descriptorBindingInlineUniformBlockUpdateAfterBind() { - return this.#view.getUint32(24, LE); - } - - set descriptorBindingInlineUniformBlockUpdateAfterBind(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get pipelineCreationCacheControl() { - return this.#view.getUint32(28, LE); - } - - set pipelineCreationCacheControl(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get privateData() { - return this.#view.getUint32(32, LE); - } - - set privateData(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get shaderDemoteToHelperInvocation() { - return this.#view.getUint32(36, LE); - } - - set shaderDemoteToHelperInvocation(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get shaderTerminateInvocation() { - return this.#view.getUint32(40, LE); - } - - set shaderTerminateInvocation(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get subgroupSizeControl() { - return this.#view.getUint32(44, LE); - } - - set subgroupSizeControl(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get computeFullSubgroups() { - return this.#view.getUint32(48, LE); - } - - set computeFullSubgroups(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get synchronization2() { - return this.#view.getUint32(52, LE); - } - - set synchronization2(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get textureCompressionASTC_HDR() { - return this.#view.getUint32(56, LE); - } - - set textureCompressionASTC_HDR(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get shaderZeroInitializeWorkgroupMemory() { - return this.#view.getUint32(60, LE); - } - - set shaderZeroInitializeWorkgroupMemory(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get dynamicRendering() { - return this.#view.getUint32(64, LE); - } - - set dynamicRendering(value: Bool32) { - this.#view.setUint32(64, Number(value), LE); - } - - get shaderIntegerDotProduct() { - return this.#view.getUint32(68, LE); - } - - set shaderIntegerDotProduct(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get maintenance4() { - return this.#view.getUint32(72, LE); - } - - set maintenance4(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } -} - -export interface InitPhysicalDeviceVulkan13Properties { - pNext?: AnyPointer; - minSubgroupSize?: number; - maxSubgroupSize?: number; - maxComputeWorkgroupSubgroups?: number; - requiredSubgroupSizeStages?: ShaderStageFlags; - maxInlineUniformBlockSize?: number; - maxPerStageDescriptorInlineUniformBlocks?: number; - maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks?: number; - maxDescriptorSetInlineUniformBlocks?: number; - maxDescriptorSetUpdateAfterBindInlineUniformBlocks?: number; - maxInlineUniformTotalSize?: number; - integerDotProduct8BitUnsignedAccelerated?: Bool32; - integerDotProduct8BitSignedAccelerated?: Bool32; - integerDotProduct8BitMixedSignednessAccelerated?: Bool32; - integerDotProduct4x8BitPackedUnsignedAccelerated?: Bool32; - integerDotProduct4x8BitPackedSignedAccelerated?: Bool32; - integerDotProduct4x8BitPackedMixedSignednessAccelerated?: Bool32; - integerDotProduct16BitUnsignedAccelerated?: Bool32; - integerDotProduct16BitSignedAccelerated?: Bool32; - integerDotProduct16BitMixedSignednessAccelerated?: Bool32; - integerDotProduct32BitUnsignedAccelerated?: Bool32; - integerDotProduct32BitSignedAccelerated?: Bool32; - integerDotProduct32BitMixedSignednessAccelerated?: Bool32; - integerDotProduct64BitUnsignedAccelerated?: Bool32; - integerDotProduct64BitSignedAccelerated?: Bool32; - integerDotProduct64BitMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating8BitUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating8BitSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating16BitUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating16BitSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating32BitUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating32BitSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating64BitUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating64BitSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated?: Bool32; - storageTexelBufferOffsetAlignmentBytes?: DeviceSize; - storageTexelBufferOffsetSingleTexelAlignment?: Bool32; - uniformTexelBufferOffsetAlignmentBytes?: DeviceSize; - uniformTexelBufferOffsetSingleTexelAlignment?: Bool32; - maxBufferSize?: DeviceSize; -} - -export class PhysicalDeviceVulkan13Properties implements BaseStruct { - static size = 216; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVulkan13Properties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVulkan13Properties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVulkan13Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVulkan13Properties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVulkan13Properties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVulkan13Properties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minSubgroupSize !== undefined) this.minSubgroupSize = data.minSubgroupSize; - if (data.maxSubgroupSize !== undefined) this.maxSubgroupSize = data.maxSubgroupSize; - if (data.maxComputeWorkgroupSubgroups !== undefined) this.maxComputeWorkgroupSubgroups = data.maxComputeWorkgroupSubgroups; - if (data.requiredSubgroupSizeStages !== undefined) this.requiredSubgroupSizeStages = data.requiredSubgroupSizeStages; - if (data.maxInlineUniformBlockSize !== undefined) this.maxInlineUniformBlockSize = data.maxInlineUniformBlockSize; - if (data.maxPerStageDescriptorInlineUniformBlocks !== undefined) this.maxPerStageDescriptorInlineUniformBlocks = data.maxPerStageDescriptorInlineUniformBlocks; - if (data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks !== undefined) this.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks = data.maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks; - if (data.maxDescriptorSetInlineUniformBlocks !== undefined) this.maxDescriptorSetInlineUniformBlocks = data.maxDescriptorSetInlineUniformBlocks; - if (data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks !== undefined) this.maxDescriptorSetUpdateAfterBindInlineUniformBlocks = data.maxDescriptorSetUpdateAfterBindInlineUniformBlocks; - if (data.maxInlineUniformTotalSize !== undefined) this.maxInlineUniformTotalSize = data.maxInlineUniformTotalSize; - if (data.integerDotProduct8BitUnsignedAccelerated !== undefined) this.integerDotProduct8BitUnsignedAccelerated = data.integerDotProduct8BitUnsignedAccelerated; - if (data.integerDotProduct8BitSignedAccelerated !== undefined) this.integerDotProduct8BitSignedAccelerated = data.integerDotProduct8BitSignedAccelerated; - if (data.integerDotProduct8BitMixedSignednessAccelerated !== undefined) this.integerDotProduct8BitMixedSignednessAccelerated = data.integerDotProduct8BitMixedSignednessAccelerated; - if (data.integerDotProduct4x8BitPackedUnsignedAccelerated !== undefined) this.integerDotProduct4x8BitPackedUnsignedAccelerated = data.integerDotProduct4x8BitPackedUnsignedAccelerated; - if (data.integerDotProduct4x8BitPackedSignedAccelerated !== undefined) this.integerDotProduct4x8BitPackedSignedAccelerated = data.integerDotProduct4x8BitPackedSignedAccelerated; - if (data.integerDotProduct4x8BitPackedMixedSignednessAccelerated !== undefined) this.integerDotProduct4x8BitPackedMixedSignednessAccelerated = data.integerDotProduct4x8BitPackedMixedSignednessAccelerated; - if (data.integerDotProduct16BitUnsignedAccelerated !== undefined) this.integerDotProduct16BitUnsignedAccelerated = data.integerDotProduct16BitUnsignedAccelerated; - if (data.integerDotProduct16BitSignedAccelerated !== undefined) this.integerDotProduct16BitSignedAccelerated = data.integerDotProduct16BitSignedAccelerated; - if (data.integerDotProduct16BitMixedSignednessAccelerated !== undefined) this.integerDotProduct16BitMixedSignednessAccelerated = data.integerDotProduct16BitMixedSignednessAccelerated; - if (data.integerDotProduct32BitUnsignedAccelerated !== undefined) this.integerDotProduct32BitUnsignedAccelerated = data.integerDotProduct32BitUnsignedAccelerated; - if (data.integerDotProduct32BitSignedAccelerated !== undefined) this.integerDotProduct32BitSignedAccelerated = data.integerDotProduct32BitSignedAccelerated; - if (data.integerDotProduct32BitMixedSignednessAccelerated !== undefined) this.integerDotProduct32BitMixedSignednessAccelerated = data.integerDotProduct32BitMixedSignednessAccelerated; - if (data.integerDotProduct64BitUnsignedAccelerated !== undefined) this.integerDotProduct64BitUnsignedAccelerated = data.integerDotProduct64BitUnsignedAccelerated; - if (data.integerDotProduct64BitSignedAccelerated !== undefined) this.integerDotProduct64BitSignedAccelerated = data.integerDotProduct64BitSignedAccelerated; - if (data.integerDotProduct64BitMixedSignednessAccelerated !== undefined) this.integerDotProduct64BitMixedSignednessAccelerated = data.integerDotProduct64BitMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating8BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitSignedAccelerated = data.integerDotProductAccumulatingSaturating8BitSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating16BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitSignedAccelerated = data.integerDotProductAccumulatingSaturating16BitSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating32BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitSignedAccelerated = data.integerDotProductAccumulatingSaturating32BitSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating64BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitSignedAccelerated = data.integerDotProductAccumulatingSaturating64BitSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; - if (data.storageTexelBufferOffsetAlignmentBytes !== undefined) this.storageTexelBufferOffsetAlignmentBytes = data.storageTexelBufferOffsetAlignmentBytes; - if (data.storageTexelBufferOffsetSingleTexelAlignment !== undefined) this.storageTexelBufferOffsetSingleTexelAlignment = data.storageTexelBufferOffsetSingleTexelAlignment; - if (data.uniformTexelBufferOffsetAlignmentBytes !== undefined) this.uniformTexelBufferOffsetAlignmentBytes = data.uniformTexelBufferOffsetAlignmentBytes; - if (data.uniformTexelBufferOffsetSingleTexelAlignment !== undefined) this.uniformTexelBufferOffsetSingleTexelAlignment = data.uniformTexelBufferOffsetSingleTexelAlignment; - if (data.maxBufferSize !== undefined) this.maxBufferSize = data.maxBufferSize; - } - this.sType = StructureType.PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minSubgroupSize() { - return this.#view.getUint32(16, LE); - } - - set minSubgroupSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxSubgroupSize() { - return this.#view.getUint32(20, LE); - } - - set maxSubgroupSize(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxComputeWorkgroupSubgroups() { - return this.#view.getUint32(24, LE); - } - - set maxComputeWorkgroupSubgroups(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get requiredSubgroupSizeStages() { - return this.#view.getUint32(28, LE); - } - - set requiredSubgroupSizeStages(value: ShaderStageFlags) { - this.#view.setUint32(28, Number(value), LE); - } - - get maxInlineUniformBlockSize() { - return this.#view.getUint32(32, LE); - } - - set maxInlineUniformBlockSize(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get maxPerStageDescriptorInlineUniformBlocks() { - return this.#view.getUint32(36, LE); - } - - set maxPerStageDescriptorInlineUniformBlocks(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks() { - return this.#view.getUint32(40, LE); - } - - set maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get maxDescriptorSetInlineUniformBlocks() { - return this.#view.getUint32(44, LE); - } - - set maxDescriptorSetInlineUniformBlocks(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get maxDescriptorSetUpdateAfterBindInlineUniformBlocks() { - return this.#view.getUint32(48, LE); - } - - set maxDescriptorSetUpdateAfterBindInlineUniformBlocks(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get maxInlineUniformTotalSize() { - return this.#view.getUint32(52, LE); - } - - set maxInlineUniformTotalSize(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get integerDotProduct8BitUnsignedAccelerated() { - return this.#view.getUint32(56, LE); - } - - set integerDotProduct8BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get integerDotProduct8BitSignedAccelerated() { - return this.#view.getUint32(60, LE); - } - - set integerDotProduct8BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get integerDotProduct8BitMixedSignednessAccelerated() { - return this.#view.getUint32(64, LE); - } - - set integerDotProduct8BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(64, Number(value), LE); - } - - get integerDotProduct4x8BitPackedUnsignedAccelerated() { - return this.#view.getUint32(68, LE); - } - - set integerDotProduct4x8BitPackedUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get integerDotProduct4x8BitPackedSignedAccelerated() { - return this.#view.getUint32(72, LE); - } - - set integerDotProduct4x8BitPackedSignedAccelerated(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } - - get integerDotProduct4x8BitPackedMixedSignednessAccelerated() { - return this.#view.getUint32(76, LE); - } - - set integerDotProduct4x8BitPackedMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } - - get integerDotProduct16BitUnsignedAccelerated() { - return this.#view.getUint32(80, LE); - } - - set integerDotProduct16BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(80, Number(value), LE); - } - - get integerDotProduct16BitSignedAccelerated() { - return this.#view.getUint32(84, LE); - } - - set integerDotProduct16BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(84, Number(value), LE); - } - - get integerDotProduct16BitMixedSignednessAccelerated() { - return this.#view.getUint32(88, LE); - } - - set integerDotProduct16BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(88, Number(value), LE); - } - - get integerDotProduct32BitUnsignedAccelerated() { - return this.#view.getUint32(92, LE); - } - - set integerDotProduct32BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(92, Number(value), LE); - } - - get integerDotProduct32BitSignedAccelerated() { - return this.#view.getUint32(96, LE); - } - - set integerDotProduct32BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(96, Number(value), LE); - } - - get integerDotProduct32BitMixedSignednessAccelerated() { - return this.#view.getUint32(100, LE); - } - - set integerDotProduct32BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(100, Number(value), LE); - } - - get integerDotProduct64BitUnsignedAccelerated() { - return this.#view.getUint32(104, LE); - } - - set integerDotProduct64BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(104, Number(value), LE); - } - - get integerDotProduct64BitSignedAccelerated() { - return this.#view.getUint32(108, LE); - } - - set integerDotProduct64BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(108, Number(value), LE); - } - - get integerDotProduct64BitMixedSignednessAccelerated() { - return this.#view.getUint32(112, LE); - } - - set integerDotProduct64BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(112, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating8BitUnsignedAccelerated() { - return this.#view.getUint32(116, LE); - } - - set integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(116, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating8BitSignedAccelerated() { - return this.#view.getUint32(120, LE); - } - - set integerDotProductAccumulatingSaturating8BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(120, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated() { - return this.#view.getUint32(124, LE); - } - - set integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(124, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated() { - return this.#view.getUint32(128, LE); - } - - set integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(128, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated() { - return this.#view.getUint32(132, LE); - } - - set integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(value: Bool32) { - this.#view.setUint32(132, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated() { - return this.#view.getUint32(136, LE); - } - - set integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(136, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating16BitUnsignedAccelerated() { - return this.#view.getUint32(140, LE); - } - - set integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(140, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating16BitSignedAccelerated() { - return this.#view.getUint32(144, LE); - } - - set integerDotProductAccumulatingSaturating16BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(144, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated() { - return this.#view.getUint32(148, LE); - } - - set integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(148, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating32BitUnsignedAccelerated() { - return this.#view.getUint32(152, LE); - } - - set integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(152, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating32BitSignedAccelerated() { - return this.#view.getUint32(156, LE); - } - - set integerDotProductAccumulatingSaturating32BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(156, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated() { - return this.#view.getUint32(160, LE); - } - - set integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(160, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating64BitUnsignedAccelerated() { - return this.#view.getUint32(164, LE); - } - - set integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(164, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating64BitSignedAccelerated() { - return this.#view.getUint32(168, LE); - } - - set integerDotProductAccumulatingSaturating64BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(168, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated() { - return this.#view.getUint32(172, LE); - } - - set integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(172, Number(value), LE); - } - - get storageTexelBufferOffsetAlignmentBytes() { - return this.#view.getBigUint64(176, LE); - } - - set storageTexelBufferOffsetAlignmentBytes(value: DeviceSize) { - this.#view.setBigUint64(176, BigInt(value), LE); - } - - get storageTexelBufferOffsetSingleTexelAlignment() { - return this.#view.getUint32(184, LE); - } - - set storageTexelBufferOffsetSingleTexelAlignment(value: Bool32) { - this.#view.setUint32(184, Number(value), LE); - } - - get uniformTexelBufferOffsetAlignmentBytes() { - return this.#view.getBigUint64(192, LE); - } - - set uniformTexelBufferOffsetAlignmentBytes(value: DeviceSize) { - this.#view.setBigUint64(192, BigInt(value), LE); - } - - get uniformTexelBufferOffsetSingleTexelAlignment() { - return this.#view.getUint32(200, LE); - } - - set uniformTexelBufferOffsetSingleTexelAlignment(value: Bool32) { - this.#view.setUint32(200, Number(value), LE); - } - - get maxBufferSize() { - return this.#view.getBigUint64(208, LE); - } - - set maxBufferSize(value: DeviceSize) { - this.#view.setBigUint64(208, BigInt(value), LE); - } -} - -export interface InitPipelineCompilerControlCreateInfoAMD { - pNext?: AnyPointer; - compilerControlFlags?: PipelineCompilerControlFlagsAMD; -} - -export class PipelineCompilerControlCreateInfoAMD implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineCompilerControlCreateInfoAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineCompilerControlCreateInfoAMD) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineCompilerControlCreateInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineCompilerControlCreateInfoAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineCompilerControlCreateInfoAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineCompilerControlCreateInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.compilerControlFlags !== undefined) this.compilerControlFlags = data.compilerControlFlags; - } - this.sType = StructureType.PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get compilerControlFlags() { - return this.#view.getUint32(16, LE); - } - - set compilerControlFlags(value: PipelineCompilerControlFlagsAMD) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceCoherentMemoryFeaturesAMD { - pNext?: AnyPointer; - deviceCoherentMemory?: Bool32; -} - -export class PhysicalDeviceCoherentMemoryFeaturesAMD implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceCoherentMemoryFeaturesAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCoherentMemoryFeaturesAMD) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceCoherentMemoryFeaturesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCoherentMemoryFeaturesAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCoherentMemoryFeaturesAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceCoherentMemoryFeaturesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceCoherentMemory !== undefined) this.deviceCoherentMemory = data.deviceCoherentMemory; - } - this.sType = StructureType.PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceCoherentMemory() { - return this.#view.getUint32(16, LE); - } - - set deviceCoherentMemory(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceToolProperties { - pNext?: AnyPointer; - name?: Uint8Array; - version?: Uint8Array; - purposes?: ToolPurposeFlags; - description?: Uint8Array; - layer?: Uint8Array; -} - -export class PhysicalDeviceToolProperties implements BaseStruct { - static size = 1048; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceToolProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceToolProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceToolProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceToolProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceToolProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceToolProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.name !== undefined) this.name = data.name; - if (data.version !== undefined) this.version = data.version; - if (data.purposes !== undefined) this.purposes = data.purposes; - if (data.description !== undefined) this.description = data.description; - if (data.layer !== undefined) this.layer = data.layer; - } - this.sType = StructureType.PHYSICAL_DEVICE_TOOL_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get name() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); - } - - set name(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - - get version() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 272, 256); - } - - set version(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 272); - } - - get purposes() { - return this.#view.getUint32(528, LE); - } - - set purposes(value: ToolPurposeFlags) { - this.#view.setUint32(528, Number(value), LE); - } - - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 532, 256); - } - - set description(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 532); - } - - get layer() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 788, 256); - } - - set layer(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 788); - } -} - -export interface InitSamplerCustomBorderColorCreateInfoEXT { - pNext?: AnyPointer; - customBorderColor?: ClearColorValue; - format?: Format; -} - -export class SamplerCustomBorderColorCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSamplerCustomBorderColorCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerCustomBorderColorCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SamplerCustomBorderColorCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerCustomBorderColorCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerCustomBorderColorCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SamplerCustomBorderColorCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.customBorderColor !== undefined) this.customBorderColor = data.customBorderColor; - if (data.format !== undefined) this.format = data.format; - } - this.sType = StructureType.SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get customBorderColor() { - throw new Error(`Unknown type: {"union":["f32","i32","u32"]}`); - } - - set customBorderColor(value: ClearColorValue) { - throw new Error(`Unknown type: {"union":["f32","i32","u32"]}`); - } - - get format() { - return this.#view.getUint32(20, LE); - } - - set format(value: Format) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceCustomBorderColorPropertiesEXT { - pNext?: AnyPointer; - maxCustomBorderColorSamplers?: number; -} - -export class PhysicalDeviceCustomBorderColorPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceCustomBorderColorPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCustomBorderColorPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCustomBorderColorPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCustomBorderColorPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxCustomBorderColorSamplers !== undefined) this.maxCustomBorderColorSamplers = data.maxCustomBorderColorSamplers; - } - this.sType = StructureType.PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxCustomBorderColorSamplers() { - return this.#view.getUint32(16, LE); - } - - set maxCustomBorderColorSamplers(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceCustomBorderColorFeaturesEXT { - pNext?: AnyPointer; - customBorderColors?: Bool32; - customBorderColorWithoutFormat?: Bool32; -} - -export class PhysicalDeviceCustomBorderColorFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceCustomBorderColorFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceCustomBorderColorFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceCustomBorderColorFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceCustomBorderColorFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceCustomBorderColorFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.customBorderColors !== undefined) this.customBorderColors = data.customBorderColors; - if (data.customBorderColorWithoutFormat !== undefined) this.customBorderColorWithoutFormat = data.customBorderColorWithoutFormat; - } - this.sType = StructureType.PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get customBorderColors() { - return this.#view.getUint32(16, LE); - } - - set customBorderColors(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get customBorderColorWithoutFormat() { - return this.#view.getUint32(20, LE); - } - - set customBorderColorWithoutFormat(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitSamplerBorderColorComponentMappingCreateInfoEXT { - pNext?: AnyPointer; - components?: ComponentMapping; - srgb?: Bool32; -} - -export class SamplerBorderColorComponentMappingCreateInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSamplerBorderColorComponentMappingCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerBorderColorComponentMappingCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SamplerBorderColorComponentMappingCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerBorderColorComponentMappingCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerBorderColorComponentMappingCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SamplerBorderColorComponentMappingCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.components !== undefined) this.components = data.components; - if (data.srgb !== undefined) this.srgb = data.srgb; - } - this.sType = StructureType.SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get components() { - return new ComponentMapping(this.#data.subarray(16, 16 + ComponentMapping.size)); - } - - set components(value: ComponentMapping) { - if (value[BUFFER].byteLength < ComponentMapping.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get srgb() { - return this.#view.getUint32(32, LE); - } - - set srgb(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitPhysicalDeviceBorderColorSwizzleFeaturesEXT { - pNext?: AnyPointer; - borderColorSwizzle?: Bool32; - borderColorSwizzleFromImage?: Bool32; -} - -export class PhysicalDeviceBorderColorSwizzleFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceBorderColorSwizzleFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceBorderColorSwizzleFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceBorderColorSwizzleFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceBorderColorSwizzleFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceBorderColorSwizzleFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceBorderColorSwizzleFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.borderColorSwizzle !== undefined) this.borderColorSwizzle = data.borderColorSwizzle; - if (data.borderColorSwizzleFromImage !== undefined) this.borderColorSwizzleFromImage = data.borderColorSwizzleFromImage; - } - this.sType = StructureType.PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get borderColorSwizzle() { - return this.#view.getUint32(16, LE); - } - - set borderColorSwizzle(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get borderColorSwizzleFromImage() { - return this.#view.getUint32(20, LE); - } - - set borderColorSwizzleFromImage(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitAccelerationStructureGeometryTrianglesDataKHR { - pNext?: AnyPointer; - vertexFormat?: Format; - vertexData?: DeviceOrHostAddressConstKHR; - vertexStride?: DeviceSize; - maxVertex?: number; - indexType?: IndexType; - indexData?: DeviceOrHostAddressConstKHR; - transformData?: DeviceOrHostAddressConstKHR; -} - -export class AccelerationStructureGeometryTrianglesDataKHR implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureGeometryTrianglesDataKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryTrianglesDataKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureGeometryTrianglesDataKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryTrianglesDataKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryTrianglesDataKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureGeometryTrianglesDataKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.vertexFormat !== undefined) this.vertexFormat = data.vertexFormat; - if (data.vertexData !== undefined) this.vertexData = data.vertexData; - if (data.vertexStride !== undefined) this.vertexStride = data.vertexStride; - if (data.maxVertex !== undefined) this.maxVertex = data.maxVertex; - if (data.indexType !== undefined) this.indexType = data.indexType; - if (data.indexData !== undefined) this.indexData = data.indexData; - if (data.transformData !== undefined) this.transformData = data.transformData; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get vertexFormat() { - return this.#view.getUint32(16, LE); - } - - set vertexFormat(value: Format) { - this.#view.setUint32(16, Number(value), LE); - } - - get vertexData() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set vertexData(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get vertexStride() { - return this.#view.getBigUint64(32, LE); - } - - set vertexStride(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get maxVertex() { - return this.#view.getUint32(40, LE); - } - - set maxVertex(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get indexType() { - return this.#view.getUint32(44, LE); - } - - set indexType(value: IndexType) { - this.#view.setUint32(44, Number(value), LE); - } - - get indexData() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set indexData(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get transformData() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set transformData(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } -} - -export interface InitAccelerationStructureGeometryAabbsDataKHR { - pNext?: AnyPointer; - data?: DeviceOrHostAddressConstKHR; - stride?: DeviceSize; -} - -export class AccelerationStructureGeometryAabbsDataKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureGeometryAabbsDataKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryAabbsDataKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureGeometryAabbsDataKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryAabbsDataKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryAabbsDataKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureGeometryAabbsDataKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.data !== undefined) this.data = data.data; - if (data.stride !== undefined) this.stride = data.stride; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get data() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set data(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get stride() { - return this.#view.getBigUint64(24, LE); - } - - set stride(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitAccelerationStructureGeometryInstancesDataKHR { - pNext?: AnyPointer; - arrayOfPointers?: Bool32; - data?: DeviceOrHostAddressConstKHR; -} - -export class AccelerationStructureGeometryInstancesDataKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureGeometryInstancesDataKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryInstancesDataKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureGeometryInstancesDataKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryInstancesDataKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryInstancesDataKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureGeometryInstancesDataKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.arrayOfPointers !== undefined) this.arrayOfPointers = data.arrayOfPointers; - if (data.data !== undefined) this.data = data.data; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get arrayOfPointers() { - return this.#view.getUint32(16, LE); - } - - set arrayOfPointers(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get data() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set data(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } -} - -export interface InitAccelerationStructureGeometryKHR { - pNext?: AnyPointer; - geometryType?: GeometryTypeKHR; - geometry?: AccelerationStructureGeometryDataKHR; - flags?: GeometryFlagsKHR; -} - -export class AccelerationStructureGeometryKHR implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureGeometryKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureGeometryKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureGeometryKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.geometryType !== undefined) this.geometryType = data.geometryType; - if (data.geometry !== undefined) this.geometry = data.geometry; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get geometryType() { - return this.#view.getUint32(16, LE); - } - - set geometryType(value: GeometryTypeKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get geometry() { - throw new Error(`Unknown type: {"union":[{"struct":["u32","buffer","u32",{"union":["u64","buffer"]},"u64","u32","u32",{"union":["u64","buffer"]},{"union":["u64","buffer"]}]},{"struct":["u32","buffer",{"union":["u64","buffer"]},"u64"]},{"struct":["u32","buffer","u32",{"union":["u64","buffer"]}]}]}`); - } - - set geometry(value: AccelerationStructureGeometryDataKHR) { - throw new Error(`Unknown type: {"union":[{"struct":["u32","buffer","u32",{"union":["u64","buffer"]},"u64","u32","u32",{"union":["u64","buffer"]},{"union":["u64","buffer"]}]},{"struct":["u32","buffer",{"union":["u64","buffer"]},"u64"]},{"struct":["u32","buffer","u32",{"union":["u64","buffer"]}]}]}`); - } - - get flags() { - return this.#view.getUint32(84, LE); - } - - set flags(value: GeometryFlagsKHR) { - this.#view.setUint32(84, Number(value), LE); - } -} - -export interface InitAccelerationStructureBuildGeometryInfoKHR { - pNext?: AnyPointer; - type?: AccelerationStructureTypeKHR; - flags?: BuildAccelerationStructureFlagsKHR; - mode?: BuildAccelerationStructureModeKHR; - srcAccelerationStructure?: AccelerationStructureKHR; - dstAccelerationStructure?: AccelerationStructureKHR; - geometryCount?: number; - pGeometries?: AnyPointer; - ppGeometries?: AnyPointer; - scratchData?: DeviceOrHostAddressKHR; -} - -export class AccelerationStructureBuildGeometryInfoKHR implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureBuildGeometryInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureBuildGeometryInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureBuildGeometryInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureBuildGeometryInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureBuildGeometryInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureBuildGeometryInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.type !== undefined) this.type = data.type; - if (data.flags !== undefined) this.flags = data.flags; - if (data.mode !== undefined) this.mode = data.mode; - if (data.srcAccelerationStructure !== undefined) this.srcAccelerationStructure = data.srcAccelerationStructure; - if (data.dstAccelerationStructure !== undefined) this.dstAccelerationStructure = data.dstAccelerationStructure; - if (data.geometryCount !== undefined) this.geometryCount = data.geometryCount; - if (data.pGeometries !== undefined) this.pGeometries = data.pGeometries; - if (data.ppGeometries !== undefined) this.ppGeometries = data.ppGeometries; - if (data.scratchData !== undefined) this.scratchData = data.scratchData; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_BUILD_GEOMETRY_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get type() { - return this.#view.getUint32(16, LE); - } - - set type(value: AccelerationStructureTypeKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(20, LE); - } - - set flags(value: BuildAccelerationStructureFlagsKHR) { - this.#view.setUint32(20, Number(value), LE); - } - - get mode() { - return this.#view.getUint32(24, LE); - } - - set mode(value: BuildAccelerationStructureModeKHR) { - this.#view.setUint32(24, Number(value), LE); - } - - get srcAccelerationStructure() { - return this.#view.getBigUint64(32, LE); - } - - set srcAccelerationStructure(value: AccelerationStructureKHR) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get dstAccelerationStructure() { - return this.#view.getBigUint64(40, LE); - } - - set dstAccelerationStructure(value: AccelerationStructureKHR) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get geometryCount() { - return this.#view.getUint32(48, LE); - } - - set geometryCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pGeometries() { - return this.#view.getBigUint64(56, LE); - } - - set pGeometries(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get ppGeometries() { - return this.#view.getBigUint64(64, LE); - } - - set ppGeometries(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - - get scratchData() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set scratchData(value: DeviceOrHostAddressKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } -} - -export interface InitAccelerationStructureBuildRangeInfoKHR { - primitiveCount?: number; - primitiveOffset?: number; - firstVertex?: number; - transformOffset?: number; -} - -export class AccelerationStructureBuildRangeInfoKHR implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureBuildRangeInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureBuildRangeInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureBuildRangeInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureBuildRangeInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureBuildRangeInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureBuildRangeInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.primitiveCount !== undefined) this.primitiveCount = data.primitiveCount; - if (data.primitiveOffset !== undefined) this.primitiveOffset = data.primitiveOffset; - if (data.firstVertex !== undefined) this.firstVertex = data.firstVertex; - if (data.transformOffset !== undefined) this.transformOffset = data.transformOffset; - } - } - - get primitiveCount() { - return this.#view.getUint32(0, LE); - } - - set primitiveCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get primitiveOffset() { - return this.#view.getUint32(4, LE); - } - - set primitiveOffset(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get firstVertex() { - return this.#view.getUint32(8, LE); - } - - set firstVertex(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get transformOffset() { - return this.#view.getUint32(12, LE); - } - - set transformOffset(value: number) { - this.#view.setUint32(12, Number(value), LE); - } -} - -export interface InitAccelerationStructureCreateInfoKHR { - pNext?: AnyPointer; - createFlags?: AccelerationStructureCreateFlagsKHR; - buffer?: Buffer; - offset?: DeviceSize; - size?: DeviceSize; - type?: AccelerationStructureTypeKHR; - deviceAddress?: DeviceAddress; -} - -export class AccelerationStructureCreateInfoKHR implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.createFlags !== undefined) this.createFlags = data.createFlags; - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.offset !== undefined) this.offset = data.offset; - if (data.size !== undefined) this.size = data.size; - if (data.type !== undefined) this.type = data.type; - if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get createFlags() { - return this.#view.getUint32(16, LE); - } - - set createFlags(value: AccelerationStructureCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get buffer() { - return this.#view.getBigUint64(24, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get offset() { - return this.#view.getBigUint64(32, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(40, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get type() { - return this.#view.getUint32(48, LE); - } - - set type(value: AccelerationStructureTypeKHR) { - this.#view.setUint32(48, Number(value), LE); - } - - get deviceAddress() { - return this.#view.getBigUint64(56, LE); - } - - set deviceAddress(value: DeviceAddress) { - this.#view.setBigUint64(56, BigInt(value), LE); - } -} - -export interface InitAabbPositionsKHR { - minX?: number; - minY?: number; - minZ?: number; - maxX?: number; - maxY?: number; - maxZ?: number; -} - -export class AabbPositionsKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAabbPositionsKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAabbPositionsKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AabbPositionsKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AabbPositionsKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AabbPositionsKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AabbPositionsKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.minX !== undefined) this.minX = data.minX; - if (data.minY !== undefined) this.minY = data.minY; - if (data.minZ !== undefined) this.minZ = data.minZ; - if (data.maxX !== undefined) this.maxX = data.maxX; - if (data.maxY !== undefined) this.maxY = data.maxY; - if (data.maxZ !== undefined) this.maxZ = data.maxZ; - } - } - - get minX() { - return this.#view.getFloat32(0, LE); - } - - set minX(value: number) { - this.#view.setFloat32(0, Number(value), LE); - } - - get minY() { - return this.#view.getFloat32(4, LE); - } - - set minY(value: number) { - this.#view.setFloat32(4, Number(value), LE); - } - - get minZ() { - return this.#view.getFloat32(8, LE); - } - - set minZ(value: number) { - this.#view.setFloat32(8, Number(value), LE); - } - - get maxX() { - return this.#view.getFloat32(12, LE); - } - - set maxX(value: number) { - this.#view.setFloat32(12, Number(value), LE); - } - - get maxY() { - return this.#view.getFloat32(16, LE); - } - - set maxY(value: number) { - this.#view.setFloat32(16, Number(value), LE); - } - - get maxZ() { - return this.#view.getFloat32(20, LE); - } - - set maxZ(value: number) { - this.#view.setFloat32(20, Number(value), LE); - } -} - -export interface InitTransformMatrixKHR { - matrix?: Float32Array; -} - -export class TransformMatrixKHR implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitTransformMatrixKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitTransformMatrixKHR) { - if (data === undefined) { - this.#data = new Uint8Array(TransformMatrixKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TransformMatrixKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < TransformMatrixKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(TransformMatrixKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.matrix !== undefined) this.matrix = data.matrix; - } - } - - get matrix() { - return new Float32Array(this.#data.buffer, this.#data.byteOffset + 0, 3); - } - - set matrix(value: Float32Array) { - this.#data.set(new Uint8Array(value.buffer), 0); - } -} - -export interface InitAccelerationStructureInstanceKHR { - transform?: TransformMatrixKHR; - instanceCustomIndex?: number; - mask?: number; - instanceShaderBindingTableRecordOffset?: number; - flags?: GeometryInstanceFlagsKHR; - accelerationStructureReference?: Deno.PointerValue; -} - -export class AccelerationStructureInstanceKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureInstanceKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureInstanceKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureInstanceKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureInstanceKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureInstanceKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureInstanceKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.transform !== undefined) this.transform = data.transform; - if (data.instanceCustomIndex !== undefined) this.instanceCustomIndex = data.instanceCustomIndex; - if (data.mask !== undefined) this.mask = data.mask; - if (data.instanceShaderBindingTableRecordOffset !== undefined) this.instanceShaderBindingTableRecordOffset = data.instanceShaderBindingTableRecordOffset; - if (data.flags !== undefined) this.flags = data.flags; - if (data.accelerationStructureReference !== undefined) this.accelerationStructureReference = data.accelerationStructureReference; - } - } - - get transform() { - return new TransformMatrixKHR(this.#data.subarray(0, 0 + TransformMatrixKHR.size)); - } - - set transform(value: TransformMatrixKHR) { - if (value[BUFFER].byteLength < TransformMatrixKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get instanceCustomIndex() { - return this.#view.getUint32(4, LE); - } - - set instanceCustomIndex(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get mask() { - return this.#view.getUint32(8, LE); - } - - set mask(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get instanceShaderBindingTableRecordOffset() { - return this.#view.getUint32(12, LE); - } - - set instanceShaderBindingTableRecordOffset(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: GeometryInstanceFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get accelerationStructureReference() { - return this.#view.getBigUint64(24, LE); - } - - set accelerationStructureReference(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitAccelerationStructureDeviceAddressInfoKHR { - pNext?: AnyPointer; - accelerationStructure?: AccelerationStructureKHR; -} - -export class AccelerationStructureDeviceAddressInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureDeviceAddressInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureDeviceAddressInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureDeviceAddressInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureDeviceAddressInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureDeviceAddressInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureDeviceAddressInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_DEVICE_ADDRESS_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get accelerationStructure() { - return this.#view.getBigUint64(16, LE); - } - - set accelerationStructure(value: AccelerationStructureKHR) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitAccelerationStructureVersionInfoKHR { - pNext?: AnyPointer; - pVersionData?: AnyPointer; -} - -export class AccelerationStructureVersionInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureVersionInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureVersionInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureVersionInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureVersionInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureVersionInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureVersionInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pVersionData !== undefined) this.pVersionData = data.pVersionData; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_VERSION_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pVersionData() { - return this.#view.getBigUint64(16, LE); - } - - set pVersionData(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitCopyAccelerationStructureInfoKHR { - pNext?: AnyPointer; - src?: AccelerationStructureKHR; - dst?: AccelerationStructureKHR; - mode?: CopyAccelerationStructureModeKHR; -} - -export class CopyAccelerationStructureInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyAccelerationStructureInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyAccelerationStructureInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(CopyAccelerationStructureInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyAccelerationStructureInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyAccelerationStructureInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyAccelerationStructureInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.src !== undefined) this.src = data.src; - if (data.dst !== undefined) this.dst = data.dst; - if (data.mode !== undefined) this.mode = data.mode; - } - this.sType = StructureType.COPY_ACCELERATION_STRUCTURE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get src() { - return this.#view.getBigUint64(16, LE); - } - - set src(value: AccelerationStructureKHR) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dst() { - return this.#view.getBigUint64(24, LE); - } - - set dst(value: AccelerationStructureKHR) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get mode() { - return this.#view.getUint32(32, LE); - } - - set mode(value: CopyAccelerationStructureModeKHR) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitCopyAccelerationStructureToMemoryInfoKHR { - pNext?: AnyPointer; - src?: AccelerationStructureKHR; - dst?: DeviceOrHostAddressKHR; - mode?: CopyAccelerationStructureModeKHR; -} - -export class CopyAccelerationStructureToMemoryInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyAccelerationStructureToMemoryInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyAccelerationStructureToMemoryInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(CopyAccelerationStructureToMemoryInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyAccelerationStructureToMemoryInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyAccelerationStructureToMemoryInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyAccelerationStructureToMemoryInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.src !== undefined) this.src = data.src; - if (data.dst !== undefined) this.dst = data.dst; - if (data.mode !== undefined) this.mode = data.mode; - } - this.sType = StructureType.COPY_ACCELERATION_STRUCTURE_TO_MEMORY_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get src() { - return this.#view.getBigUint64(16, LE); - } - - set src(value: AccelerationStructureKHR) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dst() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set dst(value: DeviceOrHostAddressKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get mode() { - return this.#view.getUint32(32, LE); - } - - set mode(value: CopyAccelerationStructureModeKHR) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitCopyMemoryToAccelerationStructureInfoKHR { - pNext?: AnyPointer; - src?: DeviceOrHostAddressConstKHR; - dst?: AccelerationStructureKHR; - mode?: CopyAccelerationStructureModeKHR; -} - -export class CopyMemoryToAccelerationStructureInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyMemoryToAccelerationStructureInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMemoryToAccelerationStructureInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(CopyMemoryToAccelerationStructureInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryToAccelerationStructureInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMemoryToAccelerationStructureInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyMemoryToAccelerationStructureInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.src !== undefined) this.src = data.src; - if (data.dst !== undefined) this.dst = data.dst; - if (data.mode !== undefined) this.mode = data.mode; - } - this.sType = StructureType.COPY_MEMORY_TO_ACCELERATION_STRUCTURE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get src() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set src(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get dst() { - return this.#view.getBigUint64(24, LE); - } - - set dst(value: AccelerationStructureKHR) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get mode() { - return this.#view.getUint32(32, LE); - } - - set mode(value: CopyAccelerationStructureModeKHR) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitRayTracingPipelineInterfaceCreateInfoKHR { - pNext?: AnyPointer; - maxPipelineRayPayloadSize?: number; - maxPipelineRayHitAttributeSize?: number; -} - -export class RayTracingPipelineInterfaceCreateInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRayTracingPipelineInterfaceCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRayTracingPipelineInterfaceCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(RayTracingPipelineInterfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RayTracingPipelineInterfaceCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RayTracingPipelineInterfaceCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RayTracingPipelineInterfaceCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxPipelineRayPayloadSize !== undefined) this.maxPipelineRayPayloadSize = data.maxPipelineRayPayloadSize; - if (data.maxPipelineRayHitAttributeSize !== undefined) this.maxPipelineRayHitAttributeSize = data.maxPipelineRayHitAttributeSize; - } - this.sType = StructureType.RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxPipelineRayPayloadSize() { - return this.#view.getUint32(16, LE); - } - - set maxPipelineRayPayloadSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxPipelineRayHitAttributeSize() { - return this.#view.getUint32(20, LE); - } - - set maxPipelineRayHitAttributeSize(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPipelineLibraryCreateInfoKHR { - pNext?: AnyPointer; - libraryCount?: number; - pLibraries?: AnyPointer; -} - -export class PipelineLibraryCreateInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineLibraryCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineLibraryCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineLibraryCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineLibraryCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineLibraryCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineLibraryCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.libraryCount !== undefined) this.libraryCount = data.libraryCount; - if (data.pLibraries !== undefined) this.pLibraries = data.pLibraries; - } - this.sType = StructureType.PIPELINE_LIBRARY_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get libraryCount() { - return this.#view.getUint32(16, LE); - } - - set libraryCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pLibraries() { - return this.#view.getBigUint64(24, LE); - } - - set pLibraries(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceExtendedDynamicStateFeaturesEXT { - pNext?: AnyPointer; - extendedDynamicState?: Bool32; -} - -export class PhysicalDeviceExtendedDynamicStateFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExtendedDynamicStateFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExtendedDynamicStateFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicStateFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicStateFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExtendedDynamicStateFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicStateFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.extendedDynamicState !== undefined) this.extendedDynamicState = data.extendedDynamicState; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get extendedDynamicState() { - return this.#view.getUint32(16, LE); - } - - set extendedDynamicState(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceExtendedDynamicState2FeaturesEXT { - pNext?: AnyPointer; - extendedDynamicState2?: Bool32; - extendedDynamicState2LogicOp?: Bool32; - extendedDynamicState2PatchControlPoints?: Bool32; -} - -export class PhysicalDeviceExtendedDynamicState2FeaturesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExtendedDynamicState2FeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExtendedDynamicState2FeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState2FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicState2FeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExtendedDynamicState2FeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState2FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.extendedDynamicState2 !== undefined) this.extendedDynamicState2 = data.extendedDynamicState2; - if (data.extendedDynamicState2LogicOp !== undefined) this.extendedDynamicState2LogicOp = data.extendedDynamicState2LogicOp; - if (data.extendedDynamicState2PatchControlPoints !== undefined) this.extendedDynamicState2PatchControlPoints = data.extendedDynamicState2PatchControlPoints; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get extendedDynamicState2() { - return this.#view.getUint32(16, LE); - } - - set extendedDynamicState2(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get extendedDynamicState2LogicOp() { - return this.#view.getUint32(20, LE); - } - - set extendedDynamicState2LogicOp(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get extendedDynamicState2PatchControlPoints() { - return this.#view.getUint32(24, LE); - } - - set extendedDynamicState2PatchControlPoints(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceExtendedDynamicState3FeaturesEXT { - pNext?: AnyPointer; - extendedDynamicState3TessellationDomainOrigin?: Bool32; - extendedDynamicState3DepthClampEnable?: Bool32; - extendedDynamicState3PolygonMode?: Bool32; - extendedDynamicState3RasterizationSamples?: Bool32; - extendedDynamicState3SampleMask?: Bool32; - extendedDynamicState3AlphaToCoverageEnable?: Bool32; - extendedDynamicState3AlphaToOneEnable?: Bool32; - extendedDynamicState3LogicOpEnable?: Bool32; - extendedDynamicState3ColorBlendEnable?: Bool32; - extendedDynamicState3ColorBlendEquation?: Bool32; - extendedDynamicState3ColorWriteMask?: Bool32; - extendedDynamicState3RasterizationStream?: Bool32; - extendedDynamicState3ConservativeRasterizationMode?: Bool32; - extendedDynamicState3ExtraPrimitiveOverestimationSize?: Bool32; - extendedDynamicState3DepthClipEnable?: Bool32; - extendedDynamicState3SampleLocationsEnable?: Bool32; - extendedDynamicState3ColorBlendAdvanced?: Bool32; - extendedDynamicState3ProvokingVertexMode?: Bool32; - extendedDynamicState3LineRasterizationMode?: Bool32; - extendedDynamicState3LineStippleEnable?: Bool32; - extendedDynamicState3DepthClipNegativeOneToOne?: Bool32; - extendedDynamicState3ViewportWScalingEnable?: Bool32; - extendedDynamicState3ViewportSwizzle?: Bool32; - extendedDynamicState3CoverageToColorEnable?: Bool32; - extendedDynamicState3CoverageToColorLocation?: Bool32; - extendedDynamicState3CoverageModulationMode?: Bool32; - extendedDynamicState3CoverageModulationTableEnable?: Bool32; - extendedDynamicState3CoverageModulationTable?: Bool32; - extendedDynamicState3CoverageReductionMode?: Bool32; - extendedDynamicState3RepresentativeFragmentTestEnable?: Bool32; - extendedDynamicState3ShadingRateImageEnable?: Bool32; -} - -export class PhysicalDeviceExtendedDynamicState3FeaturesEXT implements BaseStruct { - static size = 144; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExtendedDynamicState3FeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExtendedDynamicState3FeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicState3FeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExtendedDynamicState3FeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.extendedDynamicState3TessellationDomainOrigin !== undefined) this.extendedDynamicState3TessellationDomainOrigin = data.extendedDynamicState3TessellationDomainOrigin; - if (data.extendedDynamicState3DepthClampEnable !== undefined) this.extendedDynamicState3DepthClampEnable = data.extendedDynamicState3DepthClampEnable; - if (data.extendedDynamicState3PolygonMode !== undefined) this.extendedDynamicState3PolygonMode = data.extendedDynamicState3PolygonMode; - if (data.extendedDynamicState3RasterizationSamples !== undefined) this.extendedDynamicState3RasterizationSamples = data.extendedDynamicState3RasterizationSamples; - if (data.extendedDynamicState3SampleMask !== undefined) this.extendedDynamicState3SampleMask = data.extendedDynamicState3SampleMask; - if (data.extendedDynamicState3AlphaToCoverageEnable !== undefined) this.extendedDynamicState3AlphaToCoverageEnable = data.extendedDynamicState3AlphaToCoverageEnable; - if (data.extendedDynamicState3AlphaToOneEnable !== undefined) this.extendedDynamicState3AlphaToOneEnable = data.extendedDynamicState3AlphaToOneEnable; - if (data.extendedDynamicState3LogicOpEnable !== undefined) this.extendedDynamicState3LogicOpEnable = data.extendedDynamicState3LogicOpEnable; - if (data.extendedDynamicState3ColorBlendEnable !== undefined) this.extendedDynamicState3ColorBlendEnable = data.extendedDynamicState3ColorBlendEnable; - if (data.extendedDynamicState3ColorBlendEquation !== undefined) this.extendedDynamicState3ColorBlendEquation = data.extendedDynamicState3ColorBlendEquation; - if (data.extendedDynamicState3ColorWriteMask !== undefined) this.extendedDynamicState3ColorWriteMask = data.extendedDynamicState3ColorWriteMask; - if (data.extendedDynamicState3RasterizationStream !== undefined) this.extendedDynamicState3RasterizationStream = data.extendedDynamicState3RasterizationStream; - if (data.extendedDynamicState3ConservativeRasterizationMode !== undefined) this.extendedDynamicState3ConservativeRasterizationMode = data.extendedDynamicState3ConservativeRasterizationMode; - if (data.extendedDynamicState3ExtraPrimitiveOverestimationSize !== undefined) this.extendedDynamicState3ExtraPrimitiveOverestimationSize = data.extendedDynamicState3ExtraPrimitiveOverestimationSize; - if (data.extendedDynamicState3DepthClipEnable !== undefined) this.extendedDynamicState3DepthClipEnable = data.extendedDynamicState3DepthClipEnable; - if (data.extendedDynamicState3SampleLocationsEnable !== undefined) this.extendedDynamicState3SampleLocationsEnable = data.extendedDynamicState3SampleLocationsEnable; - if (data.extendedDynamicState3ColorBlendAdvanced !== undefined) this.extendedDynamicState3ColorBlendAdvanced = data.extendedDynamicState3ColorBlendAdvanced; - if (data.extendedDynamicState3ProvokingVertexMode !== undefined) this.extendedDynamicState3ProvokingVertexMode = data.extendedDynamicState3ProvokingVertexMode; - if (data.extendedDynamicState3LineRasterizationMode !== undefined) this.extendedDynamicState3LineRasterizationMode = data.extendedDynamicState3LineRasterizationMode; - if (data.extendedDynamicState3LineStippleEnable !== undefined) this.extendedDynamicState3LineStippleEnable = data.extendedDynamicState3LineStippleEnable; - if (data.extendedDynamicState3DepthClipNegativeOneToOne !== undefined) this.extendedDynamicState3DepthClipNegativeOneToOne = data.extendedDynamicState3DepthClipNegativeOneToOne; - if (data.extendedDynamicState3ViewportWScalingEnable !== undefined) this.extendedDynamicState3ViewportWScalingEnable = data.extendedDynamicState3ViewportWScalingEnable; - if (data.extendedDynamicState3ViewportSwizzle !== undefined) this.extendedDynamicState3ViewportSwizzle = data.extendedDynamicState3ViewportSwizzle; - if (data.extendedDynamicState3CoverageToColorEnable !== undefined) this.extendedDynamicState3CoverageToColorEnable = data.extendedDynamicState3CoverageToColorEnable; - if (data.extendedDynamicState3CoverageToColorLocation !== undefined) this.extendedDynamicState3CoverageToColorLocation = data.extendedDynamicState3CoverageToColorLocation; - if (data.extendedDynamicState3CoverageModulationMode !== undefined) this.extendedDynamicState3CoverageModulationMode = data.extendedDynamicState3CoverageModulationMode; - if (data.extendedDynamicState3CoverageModulationTableEnable !== undefined) this.extendedDynamicState3CoverageModulationTableEnable = data.extendedDynamicState3CoverageModulationTableEnable; - if (data.extendedDynamicState3CoverageModulationTable !== undefined) this.extendedDynamicState3CoverageModulationTable = data.extendedDynamicState3CoverageModulationTable; - if (data.extendedDynamicState3CoverageReductionMode !== undefined) this.extendedDynamicState3CoverageReductionMode = data.extendedDynamicState3CoverageReductionMode; - if (data.extendedDynamicState3RepresentativeFragmentTestEnable !== undefined) this.extendedDynamicState3RepresentativeFragmentTestEnable = data.extendedDynamicState3RepresentativeFragmentTestEnable; - if (data.extendedDynamicState3ShadingRateImageEnable !== undefined) this.extendedDynamicState3ShadingRateImageEnable = data.extendedDynamicState3ShadingRateImageEnable; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get extendedDynamicState3TessellationDomainOrigin() { - return this.#view.getUint32(16, LE); - } - - set extendedDynamicState3TessellationDomainOrigin(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get extendedDynamicState3DepthClampEnable() { - return this.#view.getUint32(20, LE); - } - - set extendedDynamicState3DepthClampEnable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get extendedDynamicState3PolygonMode() { - return this.#view.getUint32(24, LE); - } - - set extendedDynamicState3PolygonMode(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get extendedDynamicState3RasterizationSamples() { - return this.#view.getUint32(28, LE); - } - - set extendedDynamicState3RasterizationSamples(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get extendedDynamicState3SampleMask() { - return this.#view.getUint32(32, LE); - } - - set extendedDynamicState3SampleMask(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get extendedDynamicState3AlphaToCoverageEnable() { - return this.#view.getUint32(36, LE); - } - - set extendedDynamicState3AlphaToCoverageEnable(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get extendedDynamicState3AlphaToOneEnable() { - return this.#view.getUint32(40, LE); - } - - set extendedDynamicState3AlphaToOneEnable(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get extendedDynamicState3LogicOpEnable() { - return this.#view.getUint32(44, LE); - } - - set extendedDynamicState3LogicOpEnable(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get extendedDynamicState3ColorBlendEnable() { - return this.#view.getUint32(48, LE); - } - - set extendedDynamicState3ColorBlendEnable(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get extendedDynamicState3ColorBlendEquation() { - return this.#view.getUint32(52, LE); - } - - set extendedDynamicState3ColorBlendEquation(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get extendedDynamicState3ColorWriteMask() { - return this.#view.getUint32(56, LE); - } - - set extendedDynamicState3ColorWriteMask(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get extendedDynamicState3RasterizationStream() { - return this.#view.getUint32(60, LE); - } - - set extendedDynamicState3RasterizationStream(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get extendedDynamicState3ConservativeRasterizationMode() { - return this.#view.getUint32(64, LE); - } - - set extendedDynamicState3ConservativeRasterizationMode(value: Bool32) { - this.#view.setUint32(64, Number(value), LE); - } - - get extendedDynamicState3ExtraPrimitiveOverestimationSize() { - return this.#view.getUint32(68, LE); - } - - set extendedDynamicState3ExtraPrimitiveOverestimationSize(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get extendedDynamicState3DepthClipEnable() { - return this.#view.getUint32(72, LE); - } - - set extendedDynamicState3DepthClipEnable(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } - - get extendedDynamicState3SampleLocationsEnable() { - return this.#view.getUint32(76, LE); - } - - set extendedDynamicState3SampleLocationsEnable(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } - - get extendedDynamicState3ColorBlendAdvanced() { - return this.#view.getUint32(80, LE); - } - - set extendedDynamicState3ColorBlendAdvanced(value: Bool32) { - this.#view.setUint32(80, Number(value), LE); - } - - get extendedDynamicState3ProvokingVertexMode() { - return this.#view.getUint32(84, LE); - } - - set extendedDynamicState3ProvokingVertexMode(value: Bool32) { - this.#view.setUint32(84, Number(value), LE); - } - - get extendedDynamicState3LineRasterizationMode() { - return this.#view.getUint32(88, LE); - } - - set extendedDynamicState3LineRasterizationMode(value: Bool32) { - this.#view.setUint32(88, Number(value), LE); - } - - get extendedDynamicState3LineStippleEnable() { - return this.#view.getUint32(92, LE); - } - - set extendedDynamicState3LineStippleEnable(value: Bool32) { - this.#view.setUint32(92, Number(value), LE); - } - - get extendedDynamicState3DepthClipNegativeOneToOne() { - return this.#view.getUint32(96, LE); - } - - set extendedDynamicState3DepthClipNegativeOneToOne(value: Bool32) { - this.#view.setUint32(96, Number(value), LE); - } - - get extendedDynamicState3ViewportWScalingEnable() { - return this.#view.getUint32(100, LE); - } - - set extendedDynamicState3ViewportWScalingEnable(value: Bool32) { - this.#view.setUint32(100, Number(value), LE); - } - - get extendedDynamicState3ViewportSwizzle() { - return this.#view.getUint32(104, LE); - } - - set extendedDynamicState3ViewportSwizzle(value: Bool32) { - this.#view.setUint32(104, Number(value), LE); - } - - get extendedDynamicState3CoverageToColorEnable() { - return this.#view.getUint32(108, LE); - } - - set extendedDynamicState3CoverageToColorEnable(value: Bool32) { - this.#view.setUint32(108, Number(value), LE); - } - - get extendedDynamicState3CoverageToColorLocation() { - return this.#view.getUint32(112, LE); - } - - set extendedDynamicState3CoverageToColorLocation(value: Bool32) { - this.#view.setUint32(112, Number(value), LE); - } - - get extendedDynamicState3CoverageModulationMode() { - return this.#view.getUint32(116, LE); - } - - set extendedDynamicState3CoverageModulationMode(value: Bool32) { - this.#view.setUint32(116, Number(value), LE); - } - - get extendedDynamicState3CoverageModulationTableEnable() { - return this.#view.getUint32(120, LE); - } - - set extendedDynamicState3CoverageModulationTableEnable(value: Bool32) { - this.#view.setUint32(120, Number(value), LE); - } - - get extendedDynamicState3CoverageModulationTable() { - return this.#view.getUint32(124, LE); - } - - set extendedDynamicState3CoverageModulationTable(value: Bool32) { - this.#view.setUint32(124, Number(value), LE); - } - - get extendedDynamicState3CoverageReductionMode() { - return this.#view.getUint32(128, LE); - } - - set extendedDynamicState3CoverageReductionMode(value: Bool32) { - this.#view.setUint32(128, Number(value), LE); - } - - get extendedDynamicState3RepresentativeFragmentTestEnable() { - return this.#view.getUint32(132, LE); - } - - set extendedDynamicState3RepresentativeFragmentTestEnable(value: Bool32) { - this.#view.setUint32(132, Number(value), LE); - } - - get extendedDynamicState3ShadingRateImageEnable() { - return this.#view.getUint32(136, LE); - } - - set extendedDynamicState3ShadingRateImageEnable(value: Bool32) { - this.#view.setUint32(136, Number(value), LE); - } -} - -export interface InitPhysicalDeviceExtendedDynamicState3PropertiesEXT { - pNext?: AnyPointer; - dynamicPrimitiveTopologyUnrestricted?: Bool32; -} - -export class PhysicalDeviceExtendedDynamicState3PropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExtendedDynamicState3PropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExtendedDynamicState3PropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3PropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExtendedDynamicState3PropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExtendedDynamicState3PropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExtendedDynamicState3PropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.dynamicPrimitiveTopologyUnrestricted !== undefined) this.dynamicPrimitiveTopologyUnrestricted = data.dynamicPrimitiveTopologyUnrestricted; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dynamicPrimitiveTopologyUnrestricted() { - return this.#view.getUint32(16, LE); - } - - set dynamicPrimitiveTopologyUnrestricted(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitColorBlendEquationEXT { - srcColorBlendFactor?: BlendFactor; - dstColorBlendFactor?: BlendFactor; - colorBlendOp?: BlendOp; - srcAlphaBlendFactor?: BlendFactor; - dstAlphaBlendFactor?: BlendFactor; - alphaBlendOp?: BlendOp; -} - -export class ColorBlendEquationEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitColorBlendEquationEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitColorBlendEquationEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ColorBlendEquationEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ColorBlendEquationEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ColorBlendEquationEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ColorBlendEquationEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.srcColorBlendFactor !== undefined) this.srcColorBlendFactor = data.srcColorBlendFactor; - if (data.dstColorBlendFactor !== undefined) this.dstColorBlendFactor = data.dstColorBlendFactor; - if (data.colorBlendOp !== undefined) this.colorBlendOp = data.colorBlendOp; - if (data.srcAlphaBlendFactor !== undefined) this.srcAlphaBlendFactor = data.srcAlphaBlendFactor; - if (data.dstAlphaBlendFactor !== undefined) this.dstAlphaBlendFactor = data.dstAlphaBlendFactor; - if (data.alphaBlendOp !== undefined) this.alphaBlendOp = data.alphaBlendOp; - } - } - - get srcColorBlendFactor() { - return this.#view.getUint32(0, LE); - } - - set srcColorBlendFactor(value: BlendFactor) { - this.#view.setUint32(0, Number(value), LE); - } - - get dstColorBlendFactor() { - return this.#view.getUint32(4, LE); - } - - set dstColorBlendFactor(value: BlendFactor) { - this.#view.setUint32(4, Number(value), LE); - } - - get colorBlendOp() { - return this.#view.getUint32(8, LE); - } - - set colorBlendOp(value: BlendOp) { - this.#view.setUint32(8, Number(value), LE); - } - - get srcAlphaBlendFactor() { - return this.#view.getUint32(12, LE); - } - - set srcAlphaBlendFactor(value: BlendFactor) { - this.#view.setUint32(12, Number(value), LE); - } - - get dstAlphaBlendFactor() { - return this.#view.getUint32(16, LE); - } - - set dstAlphaBlendFactor(value: BlendFactor) { - this.#view.setUint32(16, Number(value), LE); - } - - get alphaBlendOp() { - return this.#view.getUint32(20, LE); - } - - set alphaBlendOp(value: BlendOp) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitColorBlendAdvancedEXT { - advancedBlendOp?: BlendOp; - srcPremultiplied?: Bool32; - dstPremultiplied?: Bool32; - blendOverlap?: BlendOverlapEXT; - clampResults?: Bool32; -} - -export class ColorBlendAdvancedEXT implements BaseStruct { - static size = 20; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitColorBlendAdvancedEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitColorBlendAdvancedEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ColorBlendAdvancedEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ColorBlendAdvancedEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ColorBlendAdvancedEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ColorBlendAdvancedEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.advancedBlendOp !== undefined) this.advancedBlendOp = data.advancedBlendOp; - if (data.srcPremultiplied !== undefined) this.srcPremultiplied = data.srcPremultiplied; - if (data.dstPremultiplied !== undefined) this.dstPremultiplied = data.dstPremultiplied; - if (data.blendOverlap !== undefined) this.blendOverlap = data.blendOverlap; - if (data.clampResults !== undefined) this.clampResults = data.clampResults; - } - } - - get advancedBlendOp() { - return this.#view.getUint32(0, LE); - } - - set advancedBlendOp(value: BlendOp) { - this.#view.setUint32(0, Number(value), LE); - } - - get srcPremultiplied() { - return this.#view.getUint32(4, LE); - } - - set srcPremultiplied(value: Bool32) { - this.#view.setUint32(4, Number(value), LE); - } - - get dstPremultiplied() { - return this.#view.getUint32(8, LE); - } - - set dstPremultiplied(value: Bool32) { - this.#view.setUint32(8, Number(value), LE); - } - - get blendOverlap() { - return this.#view.getUint32(12, LE); - } - - set blendOverlap(value: BlendOverlapEXT) { - this.#view.setUint32(12, Number(value), LE); - } - - get clampResults() { - return this.#view.getUint32(16, LE); - } - - set clampResults(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitRenderPassTransformBeginInfoQCOM { - pNext?: AnyPointer; - transform?: SurfaceTransformFlagBitsKHR; -} - -export class RenderPassTransformBeginInfoQCOM implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassTransformBeginInfoQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassTransformBeginInfoQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassTransformBeginInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassTransformBeginInfoQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassTransformBeginInfoQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassTransformBeginInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.transform !== undefined) this.transform = data.transform; - } - this.sType = StructureType.RENDER_PASS_TRANSFORM_BEGIN_INFO_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get transform() { - return this.#view.getUint32(16, LE); - } - - set transform(value: SurfaceTransformFlagBitsKHR) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitCopyCommandTransformInfoQCOM { - pNext?: AnyPointer; - transform?: SurfaceTransformFlagBitsKHR; -} - -export class CopyCommandTransformInfoQCOM implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyCommandTransformInfoQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyCommandTransformInfoQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(CopyCommandTransformInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyCommandTransformInfoQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyCommandTransformInfoQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyCommandTransformInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.transform !== undefined) this.transform = data.transform; - } - this.sType = StructureType.COPY_COMMAND_TRANSFORM_INFO_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get transform() { - return this.#view.getUint32(16, LE); - } - - set transform(value: SurfaceTransformFlagBitsKHR) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitCommandBufferInheritanceRenderPassTransformInfoQCOM { - pNext?: AnyPointer; - transform?: SurfaceTransformFlagBitsKHR; - renderArea?: Rect2D; -} - -export class CommandBufferInheritanceRenderPassTransformInfoQCOM implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCommandBufferInheritanceRenderPassTransformInfoQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceRenderPassTransformInfoQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(CommandBufferInheritanceRenderPassTransformInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceRenderPassTransformInfoQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceRenderPassTransformInfoQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CommandBufferInheritanceRenderPassTransformInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.transform !== undefined) this.transform = data.transform; - if (data.renderArea !== undefined) this.renderArea = data.renderArea; - } - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_RENDER_PASS_TRANSFORM_INFO_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get transform() { - return this.#view.getUint32(16, LE); - } - - set transform(value: SurfaceTransformFlagBitsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get renderArea() { - return new Rect2D(this.#data.subarray(20, 20 + Rect2D.size)); - } - - set renderArea(value: Rect2D) { - if (value[BUFFER].byteLength < Rect2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } -} - -export interface InitPhysicalDeviceDiagnosticsConfigFeaturesNV { - pNext?: AnyPointer; - diagnosticsConfig?: Bool32; -} - -export class PhysicalDeviceDiagnosticsConfigFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDiagnosticsConfigFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDiagnosticsConfigFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDiagnosticsConfigFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDiagnosticsConfigFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDiagnosticsConfigFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDiagnosticsConfigFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.diagnosticsConfig !== undefined) this.diagnosticsConfig = data.diagnosticsConfig; - } - this.sType = StructureType.PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get diagnosticsConfig() { - return this.#view.getUint32(16, LE); - } - - set diagnosticsConfig(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDeviceDiagnosticsConfigCreateInfoNV { - pNext?: AnyPointer; - flags?: DeviceDiagnosticsConfigFlagsNV; -} - -export class DeviceDiagnosticsConfigCreateInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceDiagnosticsConfigCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceDiagnosticsConfigCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceDiagnosticsConfigCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceDiagnosticsConfigCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceDiagnosticsConfigCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceDiagnosticsConfigCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DeviceDiagnosticsConfigFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures { - pNext?: AnyPointer; - shaderZeroInitializeWorkgroupMemory?: Bool32; -} - -export class PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderZeroInitializeWorkgroupMemory !== undefined) this.shaderZeroInitializeWorkgroupMemory = data.shaderZeroInitializeWorkgroupMemory; - } - this.sType = StructureType.PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderZeroInitializeWorkgroupMemory() { - return this.#view.getUint32(16, LE); - } - - set shaderZeroInitializeWorkgroupMemory(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR { - pNext?: AnyPointer; - shaderSubgroupUniformControlFlow?: Bool32; -} - -export class PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderSubgroupUniformControlFlow !== undefined) this.shaderSubgroupUniformControlFlow = data.shaderSubgroupUniformControlFlow; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderSubgroupUniformControlFlow() { - return this.#view.getUint32(16, LE); - } - - set shaderSubgroupUniformControlFlow(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRobustness2FeaturesEXT { - pNext?: AnyPointer; - robustBufferAccess2?: Bool32; - robustImageAccess2?: Bool32; - nullDescriptor?: Bool32; -} - -export class PhysicalDeviceRobustness2FeaturesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRobustness2FeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRobustness2FeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRobustness2FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRobustness2FeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRobustness2FeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRobustness2FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.robustBufferAccess2 !== undefined) this.robustBufferAccess2 = data.robustBufferAccess2; - if (data.robustImageAccess2 !== undefined) this.robustImageAccess2 = data.robustImageAccess2; - if (data.nullDescriptor !== undefined) this.nullDescriptor = data.nullDescriptor; - } - this.sType = StructureType.PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get robustBufferAccess2() { - return this.#view.getUint32(16, LE); - } - - set robustBufferAccess2(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get robustImageAccess2() { - return this.#view.getUint32(20, LE); - } - - set robustImageAccess2(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get nullDescriptor() { - return this.#view.getUint32(24, LE); - } - - set nullDescriptor(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRobustness2PropertiesEXT { - pNext?: AnyPointer; - robustStorageBufferAccessSizeAlignment?: DeviceSize; - robustUniformBufferAccessSizeAlignment?: DeviceSize; -} - -export class PhysicalDeviceRobustness2PropertiesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRobustness2PropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRobustness2PropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRobustness2PropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRobustness2PropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRobustness2PropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRobustness2PropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.robustStorageBufferAccessSizeAlignment !== undefined) this.robustStorageBufferAccessSizeAlignment = data.robustStorageBufferAccessSizeAlignment; - if (data.robustUniformBufferAccessSizeAlignment !== undefined) this.robustUniformBufferAccessSizeAlignment = data.robustUniformBufferAccessSizeAlignment; - } - this.sType = StructureType.PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get robustStorageBufferAccessSizeAlignment() { - return this.#view.getBigUint64(16, LE); - } - - set robustStorageBufferAccessSizeAlignment(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get robustUniformBufferAccessSizeAlignment() { - return this.#view.getBigUint64(24, LE); - } - - set robustUniformBufferAccessSizeAlignment(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceImageRobustnessFeatures { - pNext?: AnyPointer; - robustImageAccess?: Bool32; -} - -export class PhysicalDeviceImageRobustnessFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImageRobustnessFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageRobustnessFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImageRobustnessFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageRobustnessFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageRobustnessFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImageRobustnessFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.robustImageAccess !== undefined) this.robustImageAccess = data.robustImageAccess; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get robustImageAccess() { - return this.#view.getUint32(16, LE); - } - - set robustImageAccess(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR { - pNext?: AnyPointer; - workgroupMemoryExplicitLayout?: Bool32; - workgroupMemoryExplicitLayoutScalarBlockLayout?: Bool32; - workgroupMemoryExplicitLayout8BitAccess?: Bool32; - workgroupMemoryExplicitLayout16BitAccess?: Bool32; -} - -export class PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.workgroupMemoryExplicitLayout !== undefined) this.workgroupMemoryExplicitLayout = data.workgroupMemoryExplicitLayout; - if (data.workgroupMemoryExplicitLayoutScalarBlockLayout !== undefined) this.workgroupMemoryExplicitLayoutScalarBlockLayout = data.workgroupMemoryExplicitLayoutScalarBlockLayout; - if (data.workgroupMemoryExplicitLayout8BitAccess !== undefined) this.workgroupMemoryExplicitLayout8BitAccess = data.workgroupMemoryExplicitLayout8BitAccess; - if (data.workgroupMemoryExplicitLayout16BitAccess !== undefined) this.workgroupMemoryExplicitLayout16BitAccess = data.workgroupMemoryExplicitLayout16BitAccess; - } - this.sType = StructureType.PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get workgroupMemoryExplicitLayout() { - return this.#view.getUint32(16, LE); - } - - set workgroupMemoryExplicitLayout(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get workgroupMemoryExplicitLayoutScalarBlockLayout() { - return this.#view.getUint32(20, LE); - } - - set workgroupMemoryExplicitLayoutScalarBlockLayout(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get workgroupMemoryExplicitLayout8BitAccess() { - return this.#view.getUint32(24, LE); - } - - set workgroupMemoryExplicitLayout8BitAccess(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get workgroupMemoryExplicitLayout16BitAccess() { - return this.#view.getUint32(28, LE); - } - - set workgroupMemoryExplicitLayout16BitAccess(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDevicePortabilitySubsetFeaturesKHR { - pNext?: AnyPointer; - constantAlphaColorBlendFactors?: Bool32; - events?: Bool32; - imageViewFormatReinterpretation?: Bool32; - imageViewFormatSwizzle?: Bool32; - imageView2DOn3DImage?: Bool32; - multisampleArrayImage?: Bool32; - mutableComparisonSamplers?: Bool32; - pointPolygons?: Bool32; - samplerMipLodBias?: Bool32; - separateStencilMaskRef?: Bool32; - shaderSampleRateInterpolationFunctions?: Bool32; - tessellationIsolines?: Bool32; - tessellationPointMode?: Bool32; - triangleFans?: Bool32; - vertexAttributeAccessBeyondStride?: Bool32; -} - -export class PhysicalDevicePortabilitySubsetFeaturesKHR implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePortabilitySubsetFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePortabilitySubsetFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePortabilitySubsetFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePortabilitySubsetFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.constantAlphaColorBlendFactors !== undefined) this.constantAlphaColorBlendFactors = data.constantAlphaColorBlendFactors; - if (data.events !== undefined) this.events = data.events; - if (data.imageViewFormatReinterpretation !== undefined) this.imageViewFormatReinterpretation = data.imageViewFormatReinterpretation; - if (data.imageViewFormatSwizzle !== undefined) this.imageViewFormatSwizzle = data.imageViewFormatSwizzle; - if (data.imageView2DOn3DImage !== undefined) this.imageView2DOn3DImage = data.imageView2DOn3DImage; - if (data.multisampleArrayImage !== undefined) this.multisampleArrayImage = data.multisampleArrayImage; - if (data.mutableComparisonSamplers !== undefined) this.mutableComparisonSamplers = data.mutableComparisonSamplers; - if (data.pointPolygons !== undefined) this.pointPolygons = data.pointPolygons; - if (data.samplerMipLodBias !== undefined) this.samplerMipLodBias = data.samplerMipLodBias; - if (data.separateStencilMaskRef !== undefined) this.separateStencilMaskRef = data.separateStencilMaskRef; - if (data.shaderSampleRateInterpolationFunctions !== undefined) this.shaderSampleRateInterpolationFunctions = data.shaderSampleRateInterpolationFunctions; - if (data.tessellationIsolines !== undefined) this.tessellationIsolines = data.tessellationIsolines; - if (data.tessellationPointMode !== undefined) this.tessellationPointMode = data.tessellationPointMode; - if (data.triangleFans !== undefined) this.triangleFans = data.triangleFans; - if (data.vertexAttributeAccessBeyondStride !== undefined) this.vertexAttributeAccessBeyondStride = data.vertexAttributeAccessBeyondStride; - } - this.sType = StructureType.PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get constantAlphaColorBlendFactors() { - return this.#view.getUint32(16, LE); - } - - set constantAlphaColorBlendFactors(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get events() { - return this.#view.getUint32(20, LE); - } - - set events(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get imageViewFormatReinterpretation() { - return this.#view.getUint32(24, LE); - } - - set imageViewFormatReinterpretation(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get imageViewFormatSwizzle() { - return this.#view.getUint32(28, LE); - } - - set imageViewFormatSwizzle(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get imageView2DOn3DImage() { - return this.#view.getUint32(32, LE); - } - - set imageView2DOn3DImage(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get multisampleArrayImage() { - return this.#view.getUint32(36, LE); - } - - set multisampleArrayImage(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get mutableComparisonSamplers() { - return this.#view.getUint32(40, LE); - } - - set mutableComparisonSamplers(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get pointPolygons() { - return this.#view.getUint32(44, LE); - } - - set pointPolygons(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get samplerMipLodBias() { - return this.#view.getUint32(48, LE); - } - - set samplerMipLodBias(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get separateStencilMaskRef() { - return this.#view.getUint32(52, LE); - } - - set separateStencilMaskRef(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get shaderSampleRateInterpolationFunctions() { - return this.#view.getUint32(56, LE); - } - - set shaderSampleRateInterpolationFunctions(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get tessellationIsolines() { - return this.#view.getUint32(60, LE); - } - - set tessellationIsolines(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get tessellationPointMode() { - return this.#view.getUint32(64, LE); - } - - set tessellationPointMode(value: Bool32) { - this.#view.setUint32(64, Number(value), LE); - } - - get triangleFans() { - return this.#view.getUint32(68, LE); - } - - set triangleFans(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get vertexAttributeAccessBeyondStride() { - return this.#view.getUint32(72, LE); - } - - set vertexAttributeAccessBeyondStride(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } -} - -export interface InitPhysicalDevicePortabilitySubsetPropertiesKHR { - pNext?: AnyPointer; - minVertexInputBindingStrideAlignment?: number; -} - -export class PhysicalDevicePortabilitySubsetPropertiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePortabilitySubsetPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePortabilitySubsetPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePortabilitySubsetPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePortabilitySubsetPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePortabilitySubsetPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minVertexInputBindingStrideAlignment !== undefined) this.minVertexInputBindingStrideAlignment = data.minVertexInputBindingStrideAlignment; - } - this.sType = StructureType.PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minVertexInputBindingStrideAlignment() { - return this.#view.getUint32(16, LE); - } - - set minVertexInputBindingStrideAlignment(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevice4444FormatsFeaturesEXT { - pNext?: AnyPointer; - formatA4R4G4B4?: Bool32; - formatA4B4G4R4?: Bool32; -} - -export class PhysicalDevice4444FormatsFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevice4444FormatsFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevice4444FormatsFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevice4444FormatsFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevice4444FormatsFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevice4444FormatsFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevice4444FormatsFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.formatA4R4G4B4 !== undefined) this.formatA4R4G4B4 = data.formatA4R4G4B4; - if (data.formatA4B4G4R4 !== undefined) this.formatA4B4G4R4 = data.formatA4B4G4R4; - } - this.sType = StructureType.PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get formatA4R4G4B4() { - return this.#view.getUint32(16, LE); - } - - set formatA4R4G4B4(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get formatA4B4G4R4() { - return this.#view.getUint32(20, LE); - } - - set formatA4B4G4R4(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceSubpassShadingFeaturesHUAWEI { - pNext?: AnyPointer; - subpassShading?: Bool32; -} - -export class PhysicalDeviceSubpassShadingFeaturesHUAWEI implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSubpassShadingFeaturesHUAWEI); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubpassShadingFeaturesHUAWEI) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSubpassShadingFeaturesHUAWEI.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubpassShadingFeaturesHUAWEI.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubpassShadingFeaturesHUAWEI.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSubpassShadingFeaturesHUAWEI.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.subpassShading !== undefined) this.subpassShading = data.subpassShading; - } - this.sType = StructureType.PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get subpassShading() { - return this.#view.getUint32(16, LE); - } - - set subpassShading(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitBufferCopy2 { - pNext?: AnyPointer; - srcOffset?: DeviceSize; - dstOffset?: DeviceSize; - size?: DeviceSize; -} - -export class BufferCopy2 implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferCopy2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCopy2) { - if (data === undefined) { - this.#data = new Uint8Array(BufferCopy2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCopy2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCopy2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferCopy2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; - if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; - if (data.size !== undefined) this.size = data.size; - } - this.sType = StructureType.BUFFER_COPY_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcOffset() { - return this.#view.getBigUint64(16, LE); - } - - set srcOffset(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get dstOffset() { - return this.#view.getBigUint64(24, LE); - } - - set dstOffset(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(32, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitImageCopy2 { - pNext?: AnyPointer; - srcSubresource?: ImageSubresourceLayers; - srcOffset?: Offset3D; - dstSubresource?: ImageSubresourceLayers; - dstOffset?: Offset3D; - extent?: Extent3D; -} - -export class ImageCopy2 implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageCopy2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageCopy2) { - if (data === undefined) { - this.#data = new Uint8Array(ImageCopy2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCopy2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCopy2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageCopy2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; - if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; - if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; - if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; - if (data.extent !== undefined) this.extent = data.extent; - } - this.sType = StructureType.IMAGE_COPY_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - - set srcSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get srcOffset() { - return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); - } - - set srcOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(44, 44 + ImageSubresourceLayers.size)); - } - - set dstSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 44); - } - - get dstOffset() { - return new Offset3D(this.#data.subarray(60, 60 + Offset3D.size)); - } - - set dstOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 60); - } - - get extent() { - return new Extent3D(this.#data.subarray(72, 72 + Extent3D.size)); - } - - set extent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 72); - } -} - -export interface InitImageBlit2 { - pNext?: AnyPointer; - srcSubresource?: ImageSubresourceLayers; - srcOffsets?: Offset3D[]; - dstSubresource?: ImageSubresourceLayers; - dstOffsets?: Offset3D[]; -} - -export class ImageBlit2 implements BaseStruct { - static size = 96; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageBlit2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageBlit2) { - if (data === undefined) { - this.#data = new Uint8Array(ImageBlit2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageBlit2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageBlit2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageBlit2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; - if (data.srcOffsets !== undefined) this.srcOffsets = data.srcOffsets; - if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; - if (data.dstOffsets !== undefined) this.dstOffsets = data.dstOffsets; - } - this.sType = StructureType.IMAGE_BLIT_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - - set srcSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get srcOffsets() { - const result: Offset3D[] = []; - for (let i = 0; i < 2; i++) { - result.push((() => { - return new Offset3D(this.#data.subarray(32 + i * 12, 32 + i * 12 + Offset3D.size)); - })()); - } - return result; - } - - set srcOffsets(value: Offset3D[]) { - for (let i = 0; i < value.length; i++) { - if (value[i][BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[i][BUFFER], 32 + i * 12); - } - } - - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(56, 56 + ImageSubresourceLayers.size)); - } - - set dstSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 56); - } - - get dstOffsets() { - const result: Offset3D[] = []; - for (let i = 0; i < 2; i++) { - result.push((() => { - return new Offset3D(this.#data.subarray(72 + i * 12, 72 + i * 12 + Offset3D.size)); - })()); - } - return result; - } - - set dstOffsets(value: Offset3D[]) { - for (let i = 0; i < value.length; i++) { - if (value[i][BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[i][BUFFER], 72 + i * 12); - } - } -} - -export interface InitBufferImageCopy2 { - pNext?: AnyPointer; - bufferOffset?: DeviceSize; - bufferRowLength?: number; - bufferImageHeight?: number; - imageSubresource?: ImageSubresourceLayers; - imageOffset?: Offset3D; - imageExtent?: Extent3D; -} - -export class BufferImageCopy2 implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferImageCopy2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferImageCopy2) { - if (data === undefined) { - this.#data = new Uint8Array(BufferImageCopy2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferImageCopy2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferImageCopy2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferImageCopy2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.bufferOffset !== undefined) this.bufferOffset = data.bufferOffset; - if (data.bufferRowLength !== undefined) this.bufferRowLength = data.bufferRowLength; - if (data.bufferImageHeight !== undefined) this.bufferImageHeight = data.bufferImageHeight; - if (data.imageSubresource !== undefined) this.imageSubresource = data.imageSubresource; - if (data.imageOffset !== undefined) this.imageOffset = data.imageOffset; - if (data.imageExtent !== undefined) this.imageExtent = data.imageExtent; - } - this.sType = StructureType.BUFFER_IMAGE_COPY_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get bufferOffset() { - return this.#view.getBigUint64(16, LE); - } - - set bufferOffset(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get bufferRowLength() { - return this.#view.getUint32(24, LE); - } - - set bufferRowLength(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get bufferImageHeight() { - return this.#view.getUint32(28, LE); - } - - set bufferImageHeight(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get imageSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(32, 32 + ImageSubresourceLayers.size)); - } - - set imageSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get imageOffset() { - return new Offset3D(this.#data.subarray(48, 48 + Offset3D.size)); - } - - set imageOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 48); - } - - get imageExtent() { - return new Extent3D(this.#data.subarray(60, 60 + Extent3D.size)); - } - - set imageExtent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 60); - } -} - -export interface InitImageResolve2 { - pNext?: AnyPointer; - srcSubresource?: ImageSubresourceLayers; - srcOffset?: Offset3D; - dstSubresource?: ImageSubresourceLayers; - dstOffset?: Offset3D; - extent?: Extent3D; -} - -export class ImageResolve2 implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageResolve2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageResolve2) { - if (data === undefined) { - this.#data = new Uint8Array(ImageResolve2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageResolve2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageResolve2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageResolve2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcSubresource !== undefined) this.srcSubresource = data.srcSubresource; - if (data.srcOffset !== undefined) this.srcOffset = data.srcOffset; - if (data.dstSubresource !== undefined) this.dstSubresource = data.dstSubresource; - if (data.dstOffset !== undefined) this.dstOffset = data.dstOffset; - if (data.extent !== undefined) this.extent = data.extent; - } - this.sType = StructureType.IMAGE_RESOLVE_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(16, 16 + ImageSubresourceLayers.size)); - } - - set srcSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get srcOffset() { - return new Offset3D(this.#data.subarray(32, 32 + Offset3D.size)); - } - - set srcOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get dstSubresource() { - return new ImageSubresourceLayers(this.#data.subarray(44, 44 + ImageSubresourceLayers.size)); - } - - set dstSubresource(value: ImageSubresourceLayers) { - if (value[BUFFER].byteLength < ImageSubresourceLayers.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 44); - } - - get dstOffset() { - return new Offset3D(this.#data.subarray(60, 60 + Offset3D.size)); - } - - set dstOffset(value: Offset3D) { - if (value[BUFFER].byteLength < Offset3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 60); - } - - get extent() { - return new Extent3D(this.#data.subarray(72, 72 + Extent3D.size)); - } - - set extent(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 72); - } -} - -export interface InitCopyBufferInfo2 { - pNext?: AnyPointer; - srcBuffer?: Buffer; - dstBuffer?: Buffer; - regionCount?: number; - pRegions?: AnyPointer; -} - -export class CopyBufferInfo2 implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyBufferInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyBufferInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(CopyBufferInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyBufferInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyBufferInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyBufferInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcBuffer !== undefined) this.srcBuffer = data.srcBuffer; - if (data.dstBuffer !== undefined) this.dstBuffer = data.dstBuffer; - if (data.regionCount !== undefined) this.regionCount = data.regionCount; - if (data.pRegions !== undefined) this.pRegions = data.pRegions; - } - this.sType = StructureType.COPY_BUFFER_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcBuffer() { - return this.#view.getBigUint64(16, LE); - } - - set srcBuffer(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dstBuffer() { - return this.#view.getBigUint64(24, LE); - } - - set dstBuffer(value: Buffer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get regionCount() { - return this.#view.getUint32(32, LE); - } - - set regionCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pRegions() { - return this.#view.getBigUint64(40, LE); - } - - set pRegions(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitCopyImageInfo2 { - pNext?: AnyPointer; - srcImage?: Image; - srcImageLayout?: ImageLayout; - dstImage?: Image; - dstImageLayout?: ImageLayout; - regionCount?: number; - pRegions?: AnyPointer; -} - -export class CopyImageInfo2 implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyImageInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyImageInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(CopyImageInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyImageInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyImageInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyImageInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcImage !== undefined) this.srcImage = data.srcImage; - if (data.srcImageLayout !== undefined) this.srcImageLayout = data.srcImageLayout; - if (data.dstImage !== undefined) this.dstImage = data.dstImage; - if (data.dstImageLayout !== undefined) this.dstImageLayout = data.dstImageLayout; - if (data.regionCount !== undefined) this.regionCount = data.regionCount; - if (data.pRegions !== undefined) this.pRegions = data.pRegions; - } - this.sType = StructureType.COPY_IMAGE_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcImage() { - return this.#view.getBigUint64(16, LE); - } - - set srcImage(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get srcImageLayout() { - return this.#view.getUint32(24, LE); - } - - set srcImageLayout(value: ImageLayout) { - this.#view.setUint32(24, Number(value), LE); - } - - get dstImage() { - return this.#view.getBigUint64(32, LE); - } - - set dstImage(value: Image) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get dstImageLayout() { - return this.#view.getUint32(40, LE); - } - - set dstImageLayout(value: ImageLayout) { - this.#view.setUint32(40, Number(value), LE); - } - - get regionCount() { - return this.#view.getUint32(44, LE); - } - - set regionCount(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get pRegions() { - return this.#view.getBigUint64(48, LE); - } - - set pRegions(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitBlitImageInfo2 { - pNext?: AnyPointer; - srcImage?: Image; - srcImageLayout?: ImageLayout; - dstImage?: Image; - dstImageLayout?: ImageLayout; - regionCount?: number; - pRegions?: AnyPointer; - filter?: Filter; -} - -export class BlitImageInfo2 implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBlitImageInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBlitImageInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(BlitImageInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BlitImageInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BlitImageInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BlitImageInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcImage !== undefined) this.srcImage = data.srcImage; - if (data.srcImageLayout !== undefined) this.srcImageLayout = data.srcImageLayout; - if (data.dstImage !== undefined) this.dstImage = data.dstImage; - if (data.dstImageLayout !== undefined) this.dstImageLayout = data.dstImageLayout; - if (data.regionCount !== undefined) this.regionCount = data.regionCount; - if (data.pRegions !== undefined) this.pRegions = data.pRegions; - if (data.filter !== undefined) this.filter = data.filter; - } - this.sType = StructureType.BLIT_IMAGE_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcImage() { - return this.#view.getBigUint64(16, LE); - } - - set srcImage(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get srcImageLayout() { - return this.#view.getUint32(24, LE); - } - - set srcImageLayout(value: ImageLayout) { - this.#view.setUint32(24, Number(value), LE); - } - - get dstImage() { - return this.#view.getBigUint64(32, LE); - } - - set dstImage(value: Image) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get dstImageLayout() { - return this.#view.getUint32(40, LE); - } - - set dstImageLayout(value: ImageLayout) { - this.#view.setUint32(40, Number(value), LE); - } - - get regionCount() { - return this.#view.getUint32(44, LE); - } - - set regionCount(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get pRegions() { - return this.#view.getBigUint64(48, LE); - } - - set pRegions(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get filter() { - return this.#view.getUint32(56, LE); - } - - set filter(value: Filter) { - this.#view.setUint32(56, Number(value), LE); - } -} - -export interface InitCopyBufferToImageInfo2 { - pNext?: AnyPointer; - srcBuffer?: Buffer; - dstImage?: Image; - dstImageLayout?: ImageLayout; - regionCount?: number; - pRegions?: AnyPointer; -} - -export class CopyBufferToImageInfo2 implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyBufferToImageInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyBufferToImageInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(CopyBufferToImageInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyBufferToImageInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyBufferToImageInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyBufferToImageInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcBuffer !== undefined) this.srcBuffer = data.srcBuffer; - if (data.dstImage !== undefined) this.dstImage = data.dstImage; - if (data.dstImageLayout !== undefined) this.dstImageLayout = data.dstImageLayout; - if (data.regionCount !== undefined) this.regionCount = data.regionCount; - if (data.pRegions !== undefined) this.pRegions = data.pRegions; - } - this.sType = StructureType.COPY_BUFFER_TO_IMAGE_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcBuffer() { - return this.#view.getBigUint64(16, LE); - } - - set srcBuffer(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dstImage() { - return this.#view.getBigUint64(24, LE); - } - - set dstImage(value: Image) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get dstImageLayout() { - return this.#view.getUint32(32, LE); - } - - set dstImageLayout(value: ImageLayout) { - this.#view.setUint32(32, Number(value), LE); - } - - get regionCount() { - return this.#view.getUint32(36, LE); - } - - set regionCount(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get pRegions() { - return this.#view.getBigUint64(40, LE); - } - - set pRegions(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitCopyImageToBufferInfo2 { - pNext?: AnyPointer; - srcImage?: Image; - srcImageLayout?: ImageLayout; - dstBuffer?: Buffer; - regionCount?: number; - pRegions?: AnyPointer; -} - -export class CopyImageToBufferInfo2 implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyImageToBufferInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyImageToBufferInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(CopyImageToBufferInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyImageToBufferInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyImageToBufferInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyImageToBufferInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcImage !== undefined) this.srcImage = data.srcImage; - if (data.srcImageLayout !== undefined) this.srcImageLayout = data.srcImageLayout; - if (data.dstBuffer !== undefined) this.dstBuffer = data.dstBuffer; - if (data.regionCount !== undefined) this.regionCount = data.regionCount; - if (data.pRegions !== undefined) this.pRegions = data.pRegions; - } - this.sType = StructureType.COPY_IMAGE_TO_BUFFER_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcImage() { - return this.#view.getBigUint64(16, LE); - } - - set srcImage(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get srcImageLayout() { - return this.#view.getUint32(24, LE); - } - - set srcImageLayout(value: ImageLayout) { - this.#view.setUint32(24, Number(value), LE); - } - - get dstBuffer() { - return this.#view.getBigUint64(32, LE); - } - - set dstBuffer(value: Buffer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get regionCount() { - return this.#view.getUint32(40, LE); - } - - set regionCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get pRegions() { - return this.#view.getBigUint64(48, LE); - } - - set pRegions(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitResolveImageInfo2 { - pNext?: AnyPointer; - srcImage?: Image; - srcImageLayout?: ImageLayout; - dstImage?: Image; - dstImageLayout?: ImageLayout; - regionCount?: number; - pRegions?: AnyPointer; -} - -export class ResolveImageInfo2 implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitResolveImageInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitResolveImageInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(ResolveImageInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ResolveImageInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ResolveImageInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ResolveImageInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcImage !== undefined) this.srcImage = data.srcImage; - if (data.srcImageLayout !== undefined) this.srcImageLayout = data.srcImageLayout; - if (data.dstImage !== undefined) this.dstImage = data.dstImage; - if (data.dstImageLayout !== undefined) this.dstImageLayout = data.dstImageLayout; - if (data.regionCount !== undefined) this.regionCount = data.regionCount; - if (data.pRegions !== undefined) this.pRegions = data.pRegions; - } - this.sType = StructureType.RESOLVE_IMAGE_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcImage() { - return this.#view.getBigUint64(16, LE); - } - - set srcImage(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get srcImageLayout() { - return this.#view.getUint32(24, LE); - } - - set srcImageLayout(value: ImageLayout) { - this.#view.setUint32(24, Number(value), LE); - } - - get dstImage() { - return this.#view.getBigUint64(32, LE); - } - - set dstImage(value: Image) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get dstImageLayout() { - return this.#view.getUint32(40, LE); - } - - set dstImageLayout(value: ImageLayout) { - this.#view.setUint32(40, Number(value), LE); - } - - get regionCount() { - return this.#view.getUint32(44, LE); - } - - set regionCount(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get pRegions() { - return this.#view.getBigUint64(48, LE); - } - - set pRegions(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceShaderImageAtomicInt64FeaturesEXT { - pNext?: AnyPointer; - shaderImageInt64Atomics?: Bool32; - sparseImageInt64Atomics?: Bool32; -} - -export class PhysicalDeviceShaderImageAtomicInt64FeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderImageAtomicInt64FeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderImageAtomicInt64FeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderImageAtomicInt64FeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderImageInt64Atomics !== undefined) this.shaderImageInt64Atomics = data.shaderImageInt64Atomics; - if (data.sparseImageInt64Atomics !== undefined) this.sparseImageInt64Atomics = data.sparseImageInt64Atomics; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderImageInt64Atomics() { - return this.#view.getUint32(16, LE); - } - - set shaderImageInt64Atomics(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get sparseImageInt64Atomics() { - return this.#view.getUint32(20, LE); - } - - set sparseImageInt64Atomics(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitFragmentShadingRateAttachmentInfoKHR { - pNext?: AnyPointer; - pFragmentShadingRateAttachment?: AnyPointer; - shadingRateAttachmentTexelSize?: Extent2D; -} - -export class FragmentShadingRateAttachmentInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFragmentShadingRateAttachmentInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFragmentShadingRateAttachmentInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(FragmentShadingRateAttachmentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FragmentShadingRateAttachmentInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FragmentShadingRateAttachmentInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FragmentShadingRateAttachmentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pFragmentShadingRateAttachment !== undefined) this.pFragmentShadingRateAttachment = data.pFragmentShadingRateAttachment; - if (data.shadingRateAttachmentTexelSize !== undefined) this.shadingRateAttachmentTexelSize = data.shadingRateAttachmentTexelSize; - } - this.sType = StructureType.FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pFragmentShadingRateAttachment() { - return this.#view.getBigUint64(16, LE); - } - - set pFragmentShadingRateAttachment(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get shadingRateAttachmentTexelSize() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - - set shadingRateAttachmentTexelSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } -} - -export interface InitPipelineFragmentShadingRateStateCreateInfoKHR { - pNext?: AnyPointer; - fragmentSize?: Extent2D; - combinerOps?: Uint32Array; -} - -export class PipelineFragmentShadingRateStateCreateInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineFragmentShadingRateStateCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineFragmentShadingRateStateCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineFragmentShadingRateStateCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineFragmentShadingRateStateCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineFragmentShadingRateStateCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineFragmentShadingRateStateCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentSize !== undefined) this.fragmentSize = data.fragmentSize; - if (data.combinerOps !== undefined) this.combinerOps = data.combinerOps; - } - this.sType = StructureType.PIPELINE_FRAGMENT_SHADING_RATE_STATE_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - - set fragmentSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get combinerOps() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 24, 2); - } - - set combinerOps(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 24); - } -} - -export interface InitPhysicalDeviceFragmentShadingRateFeaturesKHR { - pNext?: AnyPointer; - pipelineFragmentShadingRate?: Bool32; - primitiveFragmentShadingRate?: Bool32; - attachmentFragmentShadingRate?: Bool32; -} - -export class PhysicalDeviceFragmentShadingRateFeaturesKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentShadingRateFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRateFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRateFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipelineFragmentShadingRate !== undefined) this.pipelineFragmentShadingRate = data.pipelineFragmentShadingRate; - if (data.primitiveFragmentShadingRate !== undefined) this.primitiveFragmentShadingRate = data.primitiveFragmentShadingRate; - if (data.attachmentFragmentShadingRate !== undefined) this.attachmentFragmentShadingRate = data.attachmentFragmentShadingRate; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipelineFragmentShadingRate() { - return this.#view.getUint32(16, LE); - } - - set pipelineFragmentShadingRate(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get primitiveFragmentShadingRate() { - return this.#view.getUint32(20, LE); - } - - set primitiveFragmentShadingRate(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get attachmentFragmentShadingRate() { - return this.#view.getUint32(24, LE); - } - - set attachmentFragmentShadingRate(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentShadingRatePropertiesKHR { - pNext?: AnyPointer; - minFragmentShadingRateAttachmentTexelSize?: Extent2D; - maxFragmentShadingRateAttachmentTexelSize?: Extent2D; - maxFragmentShadingRateAttachmentTexelSizeAspectRatio?: number; - primitiveFragmentShadingRateWithMultipleViewports?: Bool32; - layeredShadingRateAttachments?: Bool32; - fragmentShadingRateNonTrivialCombinerOps?: Bool32; - maxFragmentSize?: Extent2D; - maxFragmentSizeAspectRatio?: number; - maxFragmentShadingRateCoverageSamples?: number; - maxFragmentShadingRateRasterizationSamples?: SampleCountFlagBits; - fragmentShadingRateWithShaderDepthStencilWrites?: Bool32; - fragmentShadingRateWithSampleMask?: Bool32; - fragmentShadingRateWithShaderSampleMask?: Bool32; - fragmentShadingRateWithConservativeRasterization?: Bool32; - fragmentShadingRateWithFragmentShaderInterlock?: Bool32; - fragmentShadingRateWithCustomSampleLocations?: Bool32; - fragmentShadingRateStrictMultiplyCombiner?: Bool32; -} - -export class PhysicalDeviceFragmentShadingRatePropertiesKHR implements BaseStruct { - static size = 96; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentShadingRatePropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRatePropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRatePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRatePropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRatePropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRatePropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minFragmentShadingRateAttachmentTexelSize !== undefined) this.minFragmentShadingRateAttachmentTexelSize = data.minFragmentShadingRateAttachmentTexelSize; - if (data.maxFragmentShadingRateAttachmentTexelSize !== undefined) this.maxFragmentShadingRateAttachmentTexelSize = data.maxFragmentShadingRateAttachmentTexelSize; - if (data.maxFragmentShadingRateAttachmentTexelSizeAspectRatio !== undefined) this.maxFragmentShadingRateAttachmentTexelSizeAspectRatio = data.maxFragmentShadingRateAttachmentTexelSizeAspectRatio; - if (data.primitiveFragmentShadingRateWithMultipleViewports !== undefined) this.primitiveFragmentShadingRateWithMultipleViewports = data.primitiveFragmentShadingRateWithMultipleViewports; - if (data.layeredShadingRateAttachments !== undefined) this.layeredShadingRateAttachments = data.layeredShadingRateAttachments; - if (data.fragmentShadingRateNonTrivialCombinerOps !== undefined) this.fragmentShadingRateNonTrivialCombinerOps = data.fragmentShadingRateNonTrivialCombinerOps; - if (data.maxFragmentSize !== undefined) this.maxFragmentSize = data.maxFragmentSize; - if (data.maxFragmentSizeAspectRatio !== undefined) this.maxFragmentSizeAspectRatio = data.maxFragmentSizeAspectRatio; - if (data.maxFragmentShadingRateCoverageSamples !== undefined) this.maxFragmentShadingRateCoverageSamples = data.maxFragmentShadingRateCoverageSamples; - if (data.maxFragmentShadingRateRasterizationSamples !== undefined) this.maxFragmentShadingRateRasterizationSamples = data.maxFragmentShadingRateRasterizationSamples; - if (data.fragmentShadingRateWithShaderDepthStencilWrites !== undefined) this.fragmentShadingRateWithShaderDepthStencilWrites = data.fragmentShadingRateWithShaderDepthStencilWrites; - if (data.fragmentShadingRateWithSampleMask !== undefined) this.fragmentShadingRateWithSampleMask = data.fragmentShadingRateWithSampleMask; - if (data.fragmentShadingRateWithShaderSampleMask !== undefined) this.fragmentShadingRateWithShaderSampleMask = data.fragmentShadingRateWithShaderSampleMask; - if (data.fragmentShadingRateWithConservativeRasterization !== undefined) this.fragmentShadingRateWithConservativeRasterization = data.fragmentShadingRateWithConservativeRasterization; - if (data.fragmentShadingRateWithFragmentShaderInterlock !== undefined) this.fragmentShadingRateWithFragmentShaderInterlock = data.fragmentShadingRateWithFragmentShaderInterlock; - if (data.fragmentShadingRateWithCustomSampleLocations !== undefined) this.fragmentShadingRateWithCustomSampleLocations = data.fragmentShadingRateWithCustomSampleLocations; - if (data.fragmentShadingRateStrictMultiplyCombiner !== undefined) this.fragmentShadingRateStrictMultiplyCombiner = data.fragmentShadingRateStrictMultiplyCombiner; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minFragmentShadingRateAttachmentTexelSize() { - return new Extent2D(this.#data.subarray(16, 16 + Extent2D.size)); - } - - set minFragmentShadingRateAttachmentTexelSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get maxFragmentShadingRateAttachmentTexelSize() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - - set maxFragmentShadingRateAttachmentTexelSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get maxFragmentShadingRateAttachmentTexelSizeAspectRatio() { - return this.#view.getUint32(32, LE); - } - - set maxFragmentShadingRateAttachmentTexelSizeAspectRatio(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get primitiveFragmentShadingRateWithMultipleViewports() { - return this.#view.getUint32(36, LE); - } - - set primitiveFragmentShadingRateWithMultipleViewports(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get layeredShadingRateAttachments() { - return this.#view.getUint32(40, LE); - } - - set layeredShadingRateAttachments(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get fragmentShadingRateNonTrivialCombinerOps() { - return this.#view.getUint32(44, LE); - } - - set fragmentShadingRateNonTrivialCombinerOps(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get maxFragmentSize() { - return new Extent2D(this.#data.subarray(48, 48 + Extent2D.size)); - } - - set maxFragmentSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 48); - } - - get maxFragmentSizeAspectRatio() { - return this.#view.getUint32(56, LE); - } - - set maxFragmentSizeAspectRatio(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get maxFragmentShadingRateCoverageSamples() { - return this.#view.getUint32(60, LE); - } - - set maxFragmentShadingRateCoverageSamples(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get maxFragmentShadingRateRasterizationSamples() { - return this.#view.getUint32(64, LE); - } - - set maxFragmentShadingRateRasterizationSamples(value: SampleCountFlagBits) { - this.#view.setUint32(64, Number(value), LE); - } - - get fragmentShadingRateWithShaderDepthStencilWrites() { - return this.#view.getUint32(68, LE); - } - - set fragmentShadingRateWithShaderDepthStencilWrites(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get fragmentShadingRateWithSampleMask() { - return this.#view.getUint32(72, LE); - } - - set fragmentShadingRateWithSampleMask(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } - - get fragmentShadingRateWithShaderSampleMask() { - return this.#view.getUint32(76, LE); - } - - set fragmentShadingRateWithShaderSampleMask(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } - - get fragmentShadingRateWithConservativeRasterization() { - return this.#view.getUint32(80, LE); - } - - set fragmentShadingRateWithConservativeRasterization(value: Bool32) { - this.#view.setUint32(80, Number(value), LE); - } - - get fragmentShadingRateWithFragmentShaderInterlock() { - return this.#view.getUint32(84, LE); - } - - set fragmentShadingRateWithFragmentShaderInterlock(value: Bool32) { - this.#view.setUint32(84, Number(value), LE); - } - - get fragmentShadingRateWithCustomSampleLocations() { - return this.#view.getUint32(88, LE); - } - - set fragmentShadingRateWithCustomSampleLocations(value: Bool32) { - this.#view.setUint32(88, Number(value), LE); - } - - get fragmentShadingRateStrictMultiplyCombiner() { - return this.#view.getUint32(92, LE); - } - - set fragmentShadingRateStrictMultiplyCombiner(value: Bool32) { - this.#view.setUint32(92, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentShadingRateKHR { - pNext?: AnyPointer; - sampleCounts?: SampleCountFlags; - fragmentSize?: Extent2D; -} - -export class PhysicalDeviceFragmentShadingRateKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentShadingRateKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRateKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRateKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.sampleCounts !== undefined) this.sampleCounts = data.sampleCounts; - if (data.fragmentSize !== undefined) this.fragmentSize = data.fragmentSize; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get sampleCounts() { - return this.#view.getUint32(16, LE); - } - - set sampleCounts(value: SampleCountFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get fragmentSize() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - - set fragmentSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } -} - -export interface InitPhysicalDeviceShaderTerminateInvocationFeatures { - pNext?: AnyPointer; - shaderTerminateInvocation?: Bool32; -} - -export class PhysicalDeviceShaderTerminateInvocationFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderTerminateInvocationFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderTerminateInvocationFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderTerminateInvocationFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderTerminateInvocationFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderTerminateInvocationFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderTerminateInvocationFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderTerminateInvocation !== undefined) this.shaderTerminateInvocation = data.shaderTerminateInvocation; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderTerminateInvocation() { - return this.#view.getUint32(16, LE); - } - - set shaderTerminateInvocation(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentShadingRateEnumsFeaturesNV { - pNext?: AnyPointer; - fragmentShadingRateEnums?: Bool32; - supersampleFragmentShadingRates?: Bool32; - noInvocationFragmentShadingRates?: Bool32; -} - -export class PhysicalDeviceFragmentShadingRateEnumsFeaturesNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentShadingRateEnumsFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRateEnumsFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentShadingRateEnums !== undefined) this.fragmentShadingRateEnums = data.fragmentShadingRateEnums; - if (data.supersampleFragmentShadingRates !== undefined) this.supersampleFragmentShadingRates = data.supersampleFragmentShadingRates; - if (data.noInvocationFragmentShadingRates !== undefined) this.noInvocationFragmentShadingRates = data.noInvocationFragmentShadingRates; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentShadingRateEnums() { - return this.#view.getUint32(16, LE); - } - - set fragmentShadingRateEnums(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get supersampleFragmentShadingRates() { - return this.#view.getUint32(20, LE); - } - - set supersampleFragmentShadingRates(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get noInvocationFragmentShadingRates() { - return this.#view.getUint32(24, LE); - } - - set noInvocationFragmentShadingRates(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentShadingRateEnumsPropertiesNV { - pNext?: AnyPointer; - maxFragmentShadingRateInvocationCount?: SampleCountFlagBits; -} - -export class PhysicalDeviceFragmentShadingRateEnumsPropertiesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentShadingRateEnumsPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShadingRateEnumsPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentShadingRateEnumsPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxFragmentShadingRateInvocationCount !== undefined) this.maxFragmentShadingRateInvocationCount = data.maxFragmentShadingRateInvocationCount; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxFragmentShadingRateInvocationCount() { - return this.#view.getUint32(16, LE); - } - - set maxFragmentShadingRateInvocationCount(value: SampleCountFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineFragmentShadingRateEnumStateCreateInfoNV { - pNext?: AnyPointer; - shadingRateType?: FragmentShadingRateTypeNV; - shadingRate?: FragmentShadingRateNV; - combinerOps?: Uint32Array; -} - -export class PipelineFragmentShadingRateEnumStateCreateInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineFragmentShadingRateEnumStateCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineFragmentShadingRateEnumStateCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineFragmentShadingRateEnumStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineFragmentShadingRateEnumStateCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineFragmentShadingRateEnumStateCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineFragmentShadingRateEnumStateCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shadingRateType !== undefined) this.shadingRateType = data.shadingRateType; - if (data.shadingRate !== undefined) this.shadingRate = data.shadingRate; - if (data.combinerOps !== undefined) this.combinerOps = data.combinerOps; - } - this.sType = StructureType.PIPELINE_FRAGMENT_SHADING_RATE_ENUM_STATE_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shadingRateType() { - return this.#view.getUint32(16, LE); - } - - set shadingRateType(value: FragmentShadingRateTypeNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get shadingRate() { - return this.#view.getUint32(20, LE); - } - - set shadingRate(value: FragmentShadingRateNV) { - this.#view.setUint32(20, Number(value), LE); - } - - get combinerOps() { - return new Uint32Array(this.#data.buffer, this.#data.byteOffset + 24, 2); - } - - set combinerOps(value: Uint32Array) { - this.#data.set(new Uint8Array(value.buffer), 24); - } -} - -export interface InitAccelerationStructureBuildSizesInfoKHR { - pNext?: AnyPointer; - accelerationStructureSize?: DeviceSize; - updateScratchSize?: DeviceSize; - buildScratchSize?: DeviceSize; -} - -export class AccelerationStructureBuildSizesInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureBuildSizesInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureBuildSizesInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureBuildSizesInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureBuildSizesInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureBuildSizesInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureBuildSizesInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.accelerationStructureSize !== undefined) this.accelerationStructureSize = data.accelerationStructureSize; - if (data.updateScratchSize !== undefined) this.updateScratchSize = data.updateScratchSize; - if (data.buildScratchSize !== undefined) this.buildScratchSize = data.buildScratchSize; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_BUILD_SIZES_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get accelerationStructureSize() { - return this.#view.getBigUint64(16, LE); - } - - set accelerationStructureSize(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get updateScratchSize() { - return this.#view.getBigUint64(24, LE); - } - - set updateScratchSize(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get buildScratchSize() { - return this.#view.getBigUint64(32, LE); - } - - set buildScratchSize(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceImage2DViewOf3DFeaturesEXT { - pNext?: AnyPointer; - image2DViewOf3D?: Bool32; - sampler2DViewOf3D?: Bool32; -} - -export class PhysicalDeviceImage2DViewOf3DFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImage2DViewOf3DFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImage2DViewOf3DFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImage2DViewOf3DFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImage2DViewOf3DFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImage2DViewOf3DFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImage2DViewOf3DFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.image2DViewOf3D !== undefined) this.image2DViewOf3D = data.image2DViewOf3D; - if (data.sampler2DViewOf3D !== undefined) this.sampler2DViewOf3D = data.sampler2DViewOf3D; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get image2DViewOf3D() { - return this.#view.getUint32(16, LE); - } - - set image2DViewOf3D(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get sampler2DViewOf3D() { - return this.#view.getUint32(20, LE); - } - - set sampler2DViewOf3D(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMutableDescriptorTypeFeaturesEXT { - pNext?: AnyPointer; - mutableDescriptorType?: Bool32; -} - -export class PhysicalDeviceMutableDescriptorTypeFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMutableDescriptorTypeFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMutableDescriptorTypeFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMutableDescriptorTypeFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.mutableDescriptorType !== undefined) this.mutableDescriptorType = data.mutableDescriptorType; - } - this.sType = StructureType.PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get mutableDescriptorType() { - return this.#view.getUint32(16, LE); - } - - set mutableDescriptorType(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMutableDescriptorTypeListEXT { - descriptorTypeCount?: number; - pDescriptorTypes?: AnyPointer; -} - -export class MutableDescriptorTypeListEXT implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMutableDescriptorTypeListEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMutableDescriptorTypeListEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MutableDescriptorTypeListEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MutableDescriptorTypeListEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MutableDescriptorTypeListEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MutableDescriptorTypeListEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.descriptorTypeCount !== undefined) this.descriptorTypeCount = data.descriptorTypeCount; - if (data.pDescriptorTypes !== undefined) this.pDescriptorTypes = data.pDescriptorTypes; - } - } - - get descriptorTypeCount() { - return this.#view.getUint32(0, LE); - } - - set descriptorTypeCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get pDescriptorTypes() { - return this.#view.getBigUint64(8, LE); - } - - set pDescriptorTypes(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} - -export interface InitMutableDescriptorTypeCreateInfoEXT { - pNext?: AnyPointer; - mutableDescriptorTypeListCount?: number; - pMutableDescriptorTypeLists?: AnyPointer; -} - -export class MutableDescriptorTypeCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMutableDescriptorTypeCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMutableDescriptorTypeCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MutableDescriptorTypeCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MutableDescriptorTypeCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MutableDescriptorTypeCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MutableDescriptorTypeCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.mutableDescriptorTypeListCount !== undefined) this.mutableDescriptorTypeListCount = data.mutableDescriptorTypeListCount; - if (data.pMutableDescriptorTypeLists !== undefined) this.pMutableDescriptorTypeLists = data.pMutableDescriptorTypeLists; - } - this.sType = StructureType.MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get mutableDescriptorTypeListCount() { - return this.#view.getUint32(16, LE); - } - - set mutableDescriptorTypeListCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pMutableDescriptorTypeLists() { - return this.#view.getBigUint64(24, LE); - } - - set pMutableDescriptorTypeLists(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceDepthClipControlFeaturesEXT { - pNext?: AnyPointer; - depthClipControl?: Bool32; -} - -export class PhysicalDeviceDepthClipControlFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDepthClipControlFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDepthClipControlFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDepthClipControlFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthClipControlFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDepthClipControlFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDepthClipControlFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.depthClipControl !== undefined) this.depthClipControl = data.depthClipControl; - } - this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get depthClipControl() { - return this.#view.getUint32(16, LE); - } - - set depthClipControl(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineViewportDepthClipControlCreateInfoEXT { - pNext?: AnyPointer; - negativeOneToOne?: Bool32; -} - -export class PipelineViewportDepthClipControlCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineViewportDepthClipControlCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineViewportDepthClipControlCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineViewportDepthClipControlCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineViewportDepthClipControlCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineViewportDepthClipControlCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineViewportDepthClipControlCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.negativeOneToOne !== undefined) this.negativeOneToOne = data.negativeOneToOne; - } - this.sType = StructureType.PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get negativeOneToOne() { - return this.#view.getUint32(16, LE); - } - - set negativeOneToOne(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceVertexInputDynamicStateFeaturesEXT { - pNext?: AnyPointer; - vertexInputDynamicState?: Bool32; -} - -export class PhysicalDeviceVertexInputDynamicStateFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVertexInputDynamicStateFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVertexInputDynamicStateFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVertexInputDynamicStateFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.vertexInputDynamicState !== undefined) this.vertexInputDynamicState = data.vertexInputDynamicState; - } - this.sType = StructureType.PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get vertexInputDynamicState() { - return this.#view.getUint32(16, LE); - } - - set vertexInputDynamicState(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceExternalMemoryRDMAFeaturesNV { - pNext?: AnyPointer; - externalMemoryRDMA?: Bool32; -} - -export class PhysicalDeviceExternalMemoryRDMAFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceExternalMemoryRDMAFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceExternalMemoryRDMAFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceExternalMemoryRDMAFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceExternalMemoryRDMAFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceExternalMemoryRDMAFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceExternalMemoryRDMAFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.externalMemoryRDMA !== undefined) this.externalMemoryRDMA = data.externalMemoryRDMA; - } - this.sType = StructureType.PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get externalMemoryRDMA() { - return this.#view.getUint32(16, LE); - } - - set externalMemoryRDMA(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVertexInputBindingDescription2EXT { - pNext?: AnyPointer; - binding?: number; - stride?: number; - inputRate?: VertexInputRate; - divisor?: number; -} - -export class VertexInputBindingDescription2EXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVertexInputBindingDescription2EXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputBindingDescription2EXT) { - if (data === undefined) { - this.#data = new Uint8Array(VertexInputBindingDescription2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputBindingDescription2EXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputBindingDescription2EXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VertexInputBindingDescription2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.binding !== undefined) this.binding = data.binding; - if (data.stride !== undefined) this.stride = data.stride; - if (data.inputRate !== undefined) this.inputRate = data.inputRate; - if (data.divisor !== undefined) this.divisor = data.divisor; - } - this.sType = StructureType.VERTEX_INPUT_BINDING_DESCRIPTION_2_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get binding() { - return this.#view.getUint32(16, LE); - } - - set binding(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get stride() { - return this.#view.getUint32(20, LE); - } - - set stride(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get inputRate() { - return this.#view.getUint32(24, LE); - } - - set inputRate(value: VertexInputRate) { - this.#view.setUint32(24, Number(value), LE); - } - - get divisor() { - return this.#view.getUint32(28, LE); - } - - set divisor(value: number) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitVertexInputAttributeDescription2EXT { - pNext?: AnyPointer; - location?: number; - binding?: number; - format?: Format; - offset?: number; -} - -export class VertexInputAttributeDescription2EXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVertexInputAttributeDescription2EXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVertexInputAttributeDescription2EXT) { - if (data === undefined) { - this.#data = new Uint8Array(VertexInputAttributeDescription2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VertexInputAttributeDescription2EXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VertexInputAttributeDescription2EXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VertexInputAttributeDescription2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.location !== undefined) this.location = data.location; - if (data.binding !== undefined) this.binding = data.binding; - if (data.format !== undefined) this.format = data.format; - if (data.offset !== undefined) this.offset = data.offset; - } - this.sType = StructureType.VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get location() { - return this.#view.getUint32(16, LE); - } - - set location(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get binding() { - return this.#view.getUint32(20, LE); - } - - set binding(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get format() { - return this.#view.getUint32(24, LE); - } - - set format(value: Format) { - this.#view.setUint32(24, Number(value), LE); - } - - get offset() { - return this.#view.getUint32(28, LE); - } - - set offset(value: number) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDeviceColorWriteEnableFeaturesEXT { - pNext?: AnyPointer; - colorWriteEnable?: Bool32; -} - -export class PhysicalDeviceColorWriteEnableFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceColorWriteEnableFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceColorWriteEnableFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceColorWriteEnableFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceColorWriteEnableFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceColorWriteEnableFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceColorWriteEnableFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.colorWriteEnable !== undefined) this.colorWriteEnable = data.colorWriteEnable; - } - this.sType = StructureType.PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get colorWriteEnable() { - return this.#view.getUint32(16, LE); - } - - set colorWriteEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineColorWriteCreateInfoEXT { - pNext?: AnyPointer; - attachmentCount?: number; - pColorWriteEnables?: AnyPointer; -} - -export class PipelineColorWriteCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineColorWriteCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineColorWriteCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineColorWriteCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineColorWriteCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineColorWriteCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineColorWriteCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.attachmentCount !== undefined) this.attachmentCount = data.attachmentCount; - if (data.pColorWriteEnables !== undefined) this.pColorWriteEnables = data.pColorWriteEnables; - } - this.sType = StructureType.PIPELINE_COLOR_WRITE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get attachmentCount() { - return this.#view.getUint32(16, LE); - } - - set attachmentCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pColorWriteEnables() { - return this.#view.getBigUint64(24, LE); - } - - set pColorWriteEnables(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitMemoryBarrier2 { - pNext?: AnyPointer; - srcStageMask?: PipelineStageFlags2; - srcAccessMask?: AccessFlags2; - dstStageMask?: PipelineStageFlags2; - dstAccessMask?: AccessFlags2; -} - -export class MemoryBarrier2 implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryBarrier2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryBarrier2) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryBarrier2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryBarrier2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryBarrier2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryBarrier2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; - if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; - if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; - if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; - } - this.sType = StructureType.MEMORY_BARRIER_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcStageMask() { - return this.#view.getBigUint64(16, LE); - } - - set srcStageMask(value: PipelineStageFlags2) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get srcAccessMask() { - return this.#view.getBigUint64(24, LE); - } - - set srcAccessMask(value: AccessFlags2) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get dstStageMask() { - return this.#view.getBigUint64(32, LE); - } - - set dstStageMask(value: PipelineStageFlags2) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get dstAccessMask() { - return this.#view.getBigUint64(40, LE); - } - - set dstAccessMask(value: AccessFlags2) { - this.#view.setBigUint64(40, BigInt(value), LE); - } -} - -export interface InitImageMemoryBarrier2 { - pNext?: AnyPointer; - srcStageMask?: PipelineStageFlags2; - srcAccessMask?: AccessFlags2; - dstStageMask?: PipelineStageFlags2; - dstAccessMask?: AccessFlags2; - oldLayout?: ImageLayout; - newLayout?: ImageLayout; - srcQueueFamilyIndex?: number; - dstQueueFamilyIndex?: number; - image?: Image; - subresourceRange?: ImageSubresourceRange; -} - -export class ImageMemoryBarrier2 implements BaseStruct { - static size = 96; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageMemoryBarrier2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageMemoryBarrier2) { - if (data === undefined) { - this.#data = new Uint8Array(ImageMemoryBarrier2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageMemoryBarrier2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageMemoryBarrier2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageMemoryBarrier2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; - if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; - if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; - if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; - if (data.oldLayout !== undefined) this.oldLayout = data.oldLayout; - if (data.newLayout !== undefined) this.newLayout = data.newLayout; - if (data.srcQueueFamilyIndex !== undefined) this.srcQueueFamilyIndex = data.srcQueueFamilyIndex; - if (data.dstQueueFamilyIndex !== undefined) this.dstQueueFamilyIndex = data.dstQueueFamilyIndex; - if (data.image !== undefined) this.image = data.image; - if (data.subresourceRange !== undefined) this.subresourceRange = data.subresourceRange; - } - this.sType = StructureType.IMAGE_MEMORY_BARRIER_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcStageMask() { - return this.#view.getBigUint64(16, LE); - } - - set srcStageMask(value: PipelineStageFlags2) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get srcAccessMask() { - return this.#view.getBigUint64(24, LE); - } - - set srcAccessMask(value: AccessFlags2) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get dstStageMask() { - return this.#view.getBigUint64(32, LE); - } - - set dstStageMask(value: PipelineStageFlags2) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get dstAccessMask() { - return this.#view.getBigUint64(40, LE); - } - - set dstAccessMask(value: AccessFlags2) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get oldLayout() { - return this.#view.getUint32(48, LE); - } - - set oldLayout(value: ImageLayout) { - this.#view.setUint32(48, Number(value), LE); - } - - get newLayout() { - return this.#view.getUint32(52, LE); - } - - set newLayout(value: ImageLayout) { - this.#view.setUint32(52, Number(value), LE); - } - - get srcQueueFamilyIndex() { - return this.#view.getUint32(56, LE); - } - - set srcQueueFamilyIndex(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get dstQueueFamilyIndex() { - return this.#view.getUint32(60, LE); - } - - set dstQueueFamilyIndex(value: number) { - this.#view.setUint32(60, Number(value), LE); - } - - get image() { - return this.#view.getBigUint64(64, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - - get subresourceRange() { - return new ImageSubresourceRange(this.#data.subarray(72, 72 + ImageSubresourceRange.size)); - } - - set subresourceRange(value: ImageSubresourceRange) { - if (value[BUFFER].byteLength < ImageSubresourceRange.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 72); - } -} - -export interface InitBufferMemoryBarrier2 { - pNext?: AnyPointer; - srcStageMask?: PipelineStageFlags2; - srcAccessMask?: AccessFlags2; - dstStageMask?: PipelineStageFlags2; - dstAccessMask?: AccessFlags2; - srcQueueFamilyIndex?: number; - dstQueueFamilyIndex?: number; - buffer?: Buffer; - offset?: DeviceSize; - size?: DeviceSize; -} - -export class BufferMemoryBarrier2 implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferMemoryBarrier2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferMemoryBarrier2) { - if (data === undefined) { - this.#data = new Uint8Array(BufferMemoryBarrier2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferMemoryBarrier2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferMemoryBarrier2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferMemoryBarrier2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.srcStageMask !== undefined) this.srcStageMask = data.srcStageMask; - if (data.srcAccessMask !== undefined) this.srcAccessMask = data.srcAccessMask; - if (data.dstStageMask !== undefined) this.dstStageMask = data.dstStageMask; - if (data.dstAccessMask !== undefined) this.dstAccessMask = data.dstAccessMask; - if (data.srcQueueFamilyIndex !== undefined) this.srcQueueFamilyIndex = data.srcQueueFamilyIndex; - if (data.dstQueueFamilyIndex !== undefined) this.dstQueueFamilyIndex = data.dstQueueFamilyIndex; - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.offset !== undefined) this.offset = data.offset; - if (data.size !== undefined) this.size = data.size; - } - this.sType = StructureType.BUFFER_MEMORY_BARRIER_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get srcStageMask() { - return this.#view.getBigUint64(16, LE); - } - - set srcStageMask(value: PipelineStageFlags2) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get srcAccessMask() { - return this.#view.getBigUint64(24, LE); - } - - set srcAccessMask(value: AccessFlags2) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get dstStageMask() { - return this.#view.getBigUint64(32, LE); - } - - set dstStageMask(value: PipelineStageFlags2) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get dstAccessMask() { - return this.#view.getBigUint64(40, LE); - } - - set dstAccessMask(value: AccessFlags2) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get srcQueueFamilyIndex() { - return this.#view.getUint32(48, LE); - } - - set srcQueueFamilyIndex(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get dstQueueFamilyIndex() { - return this.#view.getUint32(52, LE); - } - - set dstQueueFamilyIndex(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get buffer() { - return this.#view.getBigUint64(56, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get offset() { - return this.#view.getBigUint64(64, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(64, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(72, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(72, BigInt(value), LE); - } -} - -export interface InitDependencyInfo { - pNext?: AnyPointer; - dependencyFlags?: DependencyFlags; - memoryBarrierCount?: number; - pMemoryBarriers?: AnyPointer; - bufferMemoryBarrierCount?: number; - pBufferMemoryBarriers?: AnyPointer; - imageMemoryBarrierCount?: number; - pImageMemoryBarriers?: AnyPointer; -} - -export class DependencyInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDependencyInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDependencyInfo) { - if (data === undefined) { - this.#data = new Uint8Array(DependencyInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DependencyInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DependencyInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DependencyInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.dependencyFlags !== undefined) this.dependencyFlags = data.dependencyFlags; - if (data.memoryBarrierCount !== undefined) this.memoryBarrierCount = data.memoryBarrierCount; - if (data.pMemoryBarriers !== undefined) this.pMemoryBarriers = data.pMemoryBarriers; - if (data.bufferMemoryBarrierCount !== undefined) this.bufferMemoryBarrierCount = data.bufferMemoryBarrierCount; - if (data.pBufferMemoryBarriers !== undefined) this.pBufferMemoryBarriers = data.pBufferMemoryBarriers; - if (data.imageMemoryBarrierCount !== undefined) this.imageMemoryBarrierCount = data.imageMemoryBarrierCount; - if (data.pImageMemoryBarriers !== undefined) this.pImageMemoryBarriers = data.pImageMemoryBarriers; - } - this.sType = StructureType.DEPENDENCY_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dependencyFlags() { - return this.#view.getUint32(16, LE); - } - - set dependencyFlags(value: DependencyFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get memoryBarrierCount() { - return this.#view.getUint32(20, LE); - } - - set memoryBarrierCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pMemoryBarriers() { - return this.#view.getBigUint64(24, LE); - } - - set pMemoryBarriers(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get bufferMemoryBarrierCount() { - return this.#view.getUint32(32, LE); - } - - set bufferMemoryBarrierCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pBufferMemoryBarriers() { - return this.#view.getBigUint64(40, LE); - } - - set pBufferMemoryBarriers(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get imageMemoryBarrierCount() { - return this.#view.getUint32(48, LE); - } - - set imageMemoryBarrierCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pImageMemoryBarriers() { - return this.#view.getBigUint64(56, LE); - } - - set pImageMemoryBarriers(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSemaphoreSubmitInfo { - pNext?: AnyPointer; - semaphore?: Semaphore; - value?: Deno.PointerValue; - stageMask?: PipelineStageFlags2; - deviceIndex?: number; -} - -export class SemaphoreSubmitInfo implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSemaphoreSubmitInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSemaphoreSubmitInfo) { - if (data === undefined) { - this.#data = new Uint8Array(SemaphoreSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SemaphoreSubmitInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SemaphoreSubmitInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SemaphoreSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.value !== undefined) this.value = data.value; - if (data.stageMask !== undefined) this.stageMask = data.stageMask; - if (data.deviceIndex !== undefined) this.deviceIndex = data.deviceIndex; - } - this.sType = StructureType.SEMAPHORE_SUBMIT_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get value() { - return this.#view.getBigUint64(24, LE); - } - - set value(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get stageMask() { - return this.#view.getBigUint64(32, LE); - } - - set stageMask(value: PipelineStageFlags2) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get deviceIndex() { - return this.#view.getUint32(40, LE); - } - - set deviceIndex(value: number) { - this.#view.setUint32(40, Number(value), LE); - } -} - -export interface InitCommandBufferSubmitInfo { - pNext?: AnyPointer; - commandBuffer?: CommandBuffer; - deviceMask?: number; -} - -export class CommandBufferSubmitInfo implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCommandBufferSubmitInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferSubmitInfo) { - if (data === undefined) { - this.#data = new Uint8Array(CommandBufferSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferSubmitInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferSubmitInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CommandBufferSubmitInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.commandBuffer !== undefined) this.commandBuffer = data.commandBuffer; - if (data.deviceMask !== undefined) this.deviceMask = data.deviceMask; - } - this.sType = StructureType.COMMAND_BUFFER_SUBMIT_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get commandBuffer() { - return this.#view.getBigUint64(16, LE); - } - - set commandBuffer(value: CommandBuffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get deviceMask() { - return this.#view.getUint32(24, LE); - } - - set deviceMask(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitSubmitInfo2 { - pNext?: AnyPointer; - flags?: SubmitFlags; - waitSemaphoreInfoCount?: number; - pWaitSemaphoreInfos?: AnyPointer; - commandBufferInfoCount?: number; - pCommandBufferInfos?: AnyPointer; - signalSemaphoreInfoCount?: number; - pSignalSemaphoreInfos?: AnyPointer; -} - -export class SubmitInfo2 implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubmitInfo2); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubmitInfo2) { - if (data === undefined) { - this.#data = new Uint8Array(SubmitInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubmitInfo2.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubmitInfo2.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubmitInfo2.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.waitSemaphoreInfoCount !== undefined) this.waitSemaphoreInfoCount = data.waitSemaphoreInfoCount; - if (data.pWaitSemaphoreInfos !== undefined) this.pWaitSemaphoreInfos = data.pWaitSemaphoreInfos; - if (data.commandBufferInfoCount !== undefined) this.commandBufferInfoCount = data.commandBufferInfoCount; - if (data.pCommandBufferInfos !== undefined) this.pCommandBufferInfos = data.pCommandBufferInfos; - if (data.signalSemaphoreInfoCount !== undefined) this.signalSemaphoreInfoCount = data.signalSemaphoreInfoCount; - if (data.pSignalSemaphoreInfos !== undefined) this.pSignalSemaphoreInfos = data.pSignalSemaphoreInfos; - } - this.sType = StructureType.SUBMIT_INFO_2; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: SubmitFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get waitSemaphoreInfoCount() { - return this.#view.getUint32(20, LE); - } - - set waitSemaphoreInfoCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pWaitSemaphoreInfos() { - return this.#view.getBigUint64(24, LE); - } - - set pWaitSemaphoreInfos(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get commandBufferInfoCount() { - return this.#view.getUint32(32, LE); - } - - set commandBufferInfoCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pCommandBufferInfos() { - return this.#view.getBigUint64(40, LE); - } - - set pCommandBufferInfos(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get signalSemaphoreInfoCount() { - return this.#view.getUint32(48, LE); - } - - set signalSemaphoreInfoCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pSignalSemaphoreInfos() { - return this.#view.getBigUint64(56, LE); - } - - set pSignalSemaphoreInfos(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitQueueFamilyCheckpointProperties2NV { - pNext?: AnyPointer; - checkpointExecutionStageMask?: PipelineStageFlags2; -} - -export class QueueFamilyCheckpointProperties2NV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueueFamilyCheckpointProperties2NV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyCheckpointProperties2NV) { - if (data === undefined) { - this.#data = new Uint8Array(QueueFamilyCheckpointProperties2NV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyCheckpointProperties2NV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyCheckpointProperties2NV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueueFamilyCheckpointProperties2NV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.checkpointExecutionStageMask !== undefined) this.checkpointExecutionStageMask = data.checkpointExecutionStageMask; - } - this.sType = StructureType.QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get checkpointExecutionStageMask() { - return this.#view.getBigUint64(16, LE); - } - - set checkpointExecutionStageMask(value: PipelineStageFlags2) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitCheckpointData2NV { - pNext?: AnyPointer; - stage?: PipelineStageFlags2; - pCheckpointMarker?: AnyPointer; -} - -export class CheckpointData2NV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCheckpointData2NV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCheckpointData2NV) { - if (data === undefined) { - this.#data = new Uint8Array(CheckpointData2NV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CheckpointData2NV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CheckpointData2NV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CheckpointData2NV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stage !== undefined) this.stage = data.stage; - if (data.pCheckpointMarker !== undefined) this.pCheckpointMarker = data.pCheckpointMarker; - } - this.sType = StructureType.CHECKPOINT_DATA_2_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stage() { - return this.#view.getBigUint64(16, LE); - } - - set stage(value: PipelineStageFlags2) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get pCheckpointMarker() { - return this.#view.getBigUint64(24, LE); - } - - set pCheckpointMarker(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceSynchronization2Features { - pNext?: AnyPointer; - synchronization2?: Bool32; -} - -export class PhysicalDeviceSynchronization2Features implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSynchronization2Features); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSynchronization2Features) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSynchronization2Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSynchronization2Features.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSynchronization2Features.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSynchronization2Features.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.synchronization2 !== undefined) this.synchronization2 = data.synchronization2; - } - this.sType = StructureType.PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get synchronization2() { - return this.#view.getUint32(16, LE); - } - - set synchronization2(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT { - pNext?: AnyPointer; - primitivesGeneratedQuery?: Bool32; - primitivesGeneratedQueryWithRasterizerDiscard?: Bool32; - primitivesGeneratedQueryWithNonZeroStreams?: Bool32; -} - -export class PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.primitivesGeneratedQuery !== undefined) this.primitivesGeneratedQuery = data.primitivesGeneratedQuery; - if (data.primitivesGeneratedQueryWithRasterizerDiscard !== undefined) this.primitivesGeneratedQueryWithRasterizerDiscard = data.primitivesGeneratedQueryWithRasterizerDiscard; - if (data.primitivesGeneratedQueryWithNonZeroStreams !== undefined) this.primitivesGeneratedQueryWithNonZeroStreams = data.primitivesGeneratedQueryWithNonZeroStreams; - } - this.sType = StructureType.PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get primitivesGeneratedQuery() { - return this.#view.getUint32(16, LE); - } - - set primitivesGeneratedQuery(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get primitivesGeneratedQueryWithRasterizerDiscard() { - return this.#view.getUint32(20, LE); - } - - set primitivesGeneratedQueryWithRasterizerDiscard(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get primitivesGeneratedQueryWithNonZeroStreams() { - return this.#view.getUint32(24, LE); - } - - set primitivesGeneratedQueryWithNonZeroStreams(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceLegacyDitheringFeaturesEXT { - pNext?: AnyPointer; - legacyDithering?: Bool32; -} - -export class PhysicalDeviceLegacyDitheringFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceLegacyDitheringFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLegacyDitheringFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceLegacyDitheringFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLegacyDitheringFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLegacyDitheringFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceLegacyDitheringFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.legacyDithering !== undefined) this.legacyDithering = data.legacyDithering; - } - this.sType = StructureType.PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get legacyDithering() { - return this.#view.getUint32(16, LE); - } - - set legacyDithering(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT { - pNext?: AnyPointer; - multisampledRenderToSingleSampled?: Bool32; -} - -export class PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.multisampledRenderToSingleSampled !== undefined) this.multisampledRenderToSingleSampled = data.multisampledRenderToSingleSampled; - } - this.sType = StructureType.PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get multisampledRenderToSingleSampled() { - return this.#view.getUint32(16, LE); - } - - set multisampledRenderToSingleSampled(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitSubpassResolvePerformanceQueryEXT { - pNext?: AnyPointer; - optimal?: Bool32; -} - -export class SubpassResolvePerformanceQueryEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubpassResolvePerformanceQueryEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubpassResolvePerformanceQueryEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SubpassResolvePerformanceQueryEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubpassResolvePerformanceQueryEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubpassResolvePerformanceQueryEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubpassResolvePerformanceQueryEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.optimal !== undefined) this.optimal = data.optimal; - } - this.sType = StructureType.SUBPASS_RESOLVE_PERFORMANCE_QUERY_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get optimal() { - return this.#view.getUint32(16, LE); - } - - set optimal(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMultisampledRenderToSingleSampledInfoEXT { - pNext?: AnyPointer; - multisampledRenderToSingleSampledEnable?: Bool32; - rasterizationSamples?: SampleCountFlagBits; -} - -export class MultisampledRenderToSingleSampledInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMultisampledRenderToSingleSampledInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMultisampledRenderToSingleSampledInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MultisampledRenderToSingleSampledInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultisampledRenderToSingleSampledInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MultisampledRenderToSingleSampledInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MultisampledRenderToSingleSampledInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.multisampledRenderToSingleSampledEnable !== undefined) this.multisampledRenderToSingleSampledEnable = data.multisampledRenderToSingleSampledEnable; - if (data.rasterizationSamples !== undefined) this.rasterizationSamples = data.rasterizationSamples; - } - this.sType = StructureType.MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get multisampledRenderToSingleSampledEnable() { - return this.#view.getUint32(16, LE); - } - - set multisampledRenderToSingleSampledEnable(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get rasterizationSamples() { - return this.#view.getUint32(20, LE); - } - - set rasterizationSamples(value: SampleCountFlagBits) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDevicePipelineProtectedAccessFeaturesEXT { - pNext?: AnyPointer; - pipelineProtectedAccess?: Bool32; -} - -export class PhysicalDevicePipelineProtectedAccessFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePipelineProtectedAccessFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineProtectedAccessFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePipelineProtectedAccessFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineProtectedAccessFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineProtectedAccessFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePipelineProtectedAccessFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipelineProtectedAccess !== undefined) this.pipelineProtectedAccess = data.pipelineProtectedAccess; - } - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipelineProtectedAccess() { - return this.#view.getUint32(16, LE); - } - - set pipelineProtectedAccess(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitQueueFamilyVideoPropertiesKHR { - pNext?: AnyPointer; - videoCodecOperations?: VideoCodecOperationFlagsKHR; -} - -export class QueueFamilyVideoPropertiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueueFamilyVideoPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyVideoPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(QueueFamilyVideoPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyVideoPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyVideoPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueueFamilyVideoPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.videoCodecOperations !== undefined) this.videoCodecOperations = data.videoCodecOperations; - } - this.sType = StructureType.QUEUE_FAMILY_VIDEO_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get videoCodecOperations() { - return this.#view.getUint32(16, LE); - } - - set videoCodecOperations(value: VideoCodecOperationFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitQueueFamilyQueryResultStatusPropertiesKHR { - pNext?: AnyPointer; - queryResultStatusSupport?: Bool32; -} - -export class QueueFamilyQueryResultStatusPropertiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitQueueFamilyQueryResultStatusPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitQueueFamilyQueryResultStatusPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(QueueFamilyQueryResultStatusPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, QueueFamilyQueryResultStatusPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < QueueFamilyQueryResultStatusPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(QueueFamilyQueryResultStatusPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.queryResultStatusSupport !== undefined) this.queryResultStatusSupport = data.queryResultStatusSupport; - } - this.sType = StructureType.QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get queryResultStatusSupport() { - return this.#view.getUint32(16, LE); - } - - set queryResultStatusSupport(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoProfileListInfoKHR { - pNext?: AnyPointer; - profileCount?: number; - pProfiles?: AnyPointer; -} - -export class VideoProfileListInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoProfileListInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoProfileListInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoProfileListInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoProfileListInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoProfileListInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoProfileListInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.profileCount !== undefined) this.profileCount = data.profileCount; - if (data.pProfiles !== undefined) this.pProfiles = data.pProfiles; - } - this.sType = StructureType.VIDEO_PROFILE_LIST_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get profileCount() { - return this.#view.getUint32(16, LE); - } - - set profileCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pProfiles() { - return this.#view.getBigUint64(24, LE); - } - - set pProfiles(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceVideoFormatInfoKHR { - pNext?: AnyPointer; - imageUsage?: ImageUsageFlags; -} - -export class PhysicalDeviceVideoFormatInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceVideoFormatInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceVideoFormatInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceVideoFormatInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceVideoFormatInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceVideoFormatInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceVideoFormatInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageUsage !== undefined) this.imageUsage = data.imageUsage; - } - this.sType = StructureType.PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageUsage() { - return this.#view.getUint32(16, LE); - } - - set imageUsage(value: ImageUsageFlags) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoFormatPropertiesKHR { - pNext?: AnyPointer; - format?: Format; - componentMapping?: ComponentMapping; - imageCreateFlags?: ImageCreateFlags; - imageType?: ImageType; - imageTiling?: ImageTiling; - imageUsageFlags?: ImageUsageFlags; -} - -export class VideoFormatPropertiesKHR implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoFormatPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoFormatPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoFormatPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoFormatPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoFormatPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoFormatPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.format !== undefined) this.format = data.format; - if (data.componentMapping !== undefined) this.componentMapping = data.componentMapping; - if (data.imageCreateFlags !== undefined) this.imageCreateFlags = data.imageCreateFlags; - if (data.imageType !== undefined) this.imageType = data.imageType; - if (data.imageTiling !== undefined) this.imageTiling = data.imageTiling; - if (data.imageUsageFlags !== undefined) this.imageUsageFlags = data.imageUsageFlags; - } - this.sType = StructureType.VIDEO_FORMAT_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get format() { - return this.#view.getUint32(16, LE); - } - - set format(value: Format) { - this.#view.setUint32(16, Number(value), LE); - } - - get componentMapping() { - return new ComponentMapping(this.#data.subarray(20, 20 + ComponentMapping.size)); - } - - set componentMapping(value: ComponentMapping) { - if (value[BUFFER].byteLength < ComponentMapping.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } - - get imageCreateFlags() { - return this.#view.getUint32(36, LE); - } - - set imageCreateFlags(value: ImageCreateFlags) { - this.#view.setUint32(36, Number(value), LE); - } - - get imageType() { - return this.#view.getUint32(40, LE); - } - - set imageType(value: ImageType) { - this.#view.setUint32(40, Number(value), LE); - } - - get imageTiling() { - return this.#view.getUint32(44, LE); - } - - set imageTiling(value: ImageTiling) { - this.#view.setUint32(44, Number(value), LE); - } - - get imageUsageFlags() { - return this.#view.getUint32(48, LE); - } - - set imageUsageFlags(value: ImageUsageFlags) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitVideoProfileInfoKHR { - pNext?: AnyPointer; - videoCodecOperation?: VideoCodecOperationFlagBitsKHR; - chromaSubsampling?: VideoChromaSubsamplingFlagsKHR; - lumaBitDepth?: VideoComponentBitDepthFlagsKHR; - chromaBitDepth?: VideoComponentBitDepthFlagsKHR; -} - -export class VideoProfileInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoProfileInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoProfileInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoProfileInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoProfileInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoProfileInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoProfileInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.videoCodecOperation !== undefined) this.videoCodecOperation = data.videoCodecOperation; - if (data.chromaSubsampling !== undefined) this.chromaSubsampling = data.chromaSubsampling; - if (data.lumaBitDepth !== undefined) this.lumaBitDepth = data.lumaBitDepth; - if (data.chromaBitDepth !== undefined) this.chromaBitDepth = data.chromaBitDepth; - } - this.sType = StructureType.VIDEO_PROFILE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get videoCodecOperation() { - return this.#view.getUint32(16, LE); - } - - set videoCodecOperation(value: VideoCodecOperationFlagBitsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get chromaSubsampling() { - return this.#view.getUint32(20, LE); - } - - set chromaSubsampling(value: VideoChromaSubsamplingFlagsKHR) { - this.#view.setUint32(20, Number(value), LE); - } - - get lumaBitDepth() { - return this.#view.getUint32(24, LE); - } - - set lumaBitDepth(value: VideoComponentBitDepthFlagsKHR) { - this.#view.setUint32(24, Number(value), LE); - } - - get chromaBitDepth() { - return this.#view.getUint32(28, LE); - } - - set chromaBitDepth(value: VideoComponentBitDepthFlagsKHR) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitVideoCapabilitiesKHR { - pNext?: AnyPointer; - flags?: VideoCapabilityFlagsKHR; - minBitstreamBufferOffsetAlignment?: DeviceSize; - minBitstreamBufferSizeAlignment?: DeviceSize; - pictureAccessGranularity?: Extent2D; - minCodedExtent?: Extent2D; - maxCodedExtent?: Extent2D; - maxDpbSlots?: number; - maxActiveReferencePictures?: number; - stdHeaderVersion?: ExtensionProperties; -} - -export class VideoCapabilitiesKHR implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoCapabilitiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoCapabilitiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoCapabilitiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.minBitstreamBufferOffsetAlignment !== undefined) this.minBitstreamBufferOffsetAlignment = data.minBitstreamBufferOffsetAlignment; - if (data.minBitstreamBufferSizeAlignment !== undefined) this.minBitstreamBufferSizeAlignment = data.minBitstreamBufferSizeAlignment; - if (data.pictureAccessGranularity !== undefined) this.pictureAccessGranularity = data.pictureAccessGranularity; - if (data.minCodedExtent !== undefined) this.minCodedExtent = data.minCodedExtent; - if (data.maxCodedExtent !== undefined) this.maxCodedExtent = data.maxCodedExtent; - if (data.maxDpbSlots !== undefined) this.maxDpbSlots = data.maxDpbSlots; - if (data.maxActiveReferencePictures !== undefined) this.maxActiveReferencePictures = data.maxActiveReferencePictures; - if (data.stdHeaderVersion !== undefined) this.stdHeaderVersion = data.stdHeaderVersion; - } - this.sType = StructureType.VIDEO_CAPABILITIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoCapabilityFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get minBitstreamBufferOffsetAlignment() { - return this.#view.getBigUint64(24, LE); - } - - set minBitstreamBufferOffsetAlignment(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get minBitstreamBufferSizeAlignment() { - return this.#view.getBigUint64(32, LE); - } - - set minBitstreamBufferSizeAlignment(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get pictureAccessGranularity() { - return new Extent2D(this.#data.subarray(40, 40 + Extent2D.size)); - } - - set pictureAccessGranularity(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } - - get minCodedExtent() { - return new Extent2D(this.#data.subarray(48, 48 + Extent2D.size)); - } - - set minCodedExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 48); - } - - get maxCodedExtent() { - return new Extent2D(this.#data.subarray(56, 56 + Extent2D.size)); - } - - set maxCodedExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 56); - } - - get maxDpbSlots() { - return this.#view.getUint32(64, LE); - } - - set maxDpbSlots(value: number) { - this.#view.setUint32(64, Number(value), LE); - } - - get maxActiveReferencePictures() { - return this.#view.getUint32(68, LE); - } - - set maxActiveReferencePictures(value: number) { - this.#view.setUint32(68, Number(value), LE); - } - - get stdHeaderVersion() { - return new ExtensionProperties(this.#data.subarray(72, 72 + ExtensionProperties.size)); - } - - set stdHeaderVersion(value: ExtensionProperties) { - if (value[BUFFER].byteLength < ExtensionProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 72); - } -} - -export interface InitVideoSessionMemoryRequirementsKHR { - pNext?: AnyPointer; - memoryBindIndex?: number; - memoryRequirements?: MemoryRequirements; -} - -export class VideoSessionMemoryRequirementsKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoSessionMemoryRequirementsKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoSessionMemoryRequirementsKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoSessionMemoryRequirementsKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionMemoryRequirementsKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoSessionMemoryRequirementsKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoSessionMemoryRequirementsKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryBindIndex !== undefined) this.memoryBindIndex = data.memoryBindIndex; - if (data.memoryRequirements !== undefined) this.memoryRequirements = data.memoryRequirements; - } - this.sType = StructureType.VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryBindIndex() { - return this.#view.getUint32(16, LE); - } - - set memoryBindIndex(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get memoryRequirements() { - return new MemoryRequirements(this.#data.subarray(24, 24 + MemoryRequirements.size)); - } - - set memoryRequirements(value: MemoryRequirements) { - if (value[BUFFER].byteLength < MemoryRequirements.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } -} - -export interface InitBindVideoSessionMemoryInfoKHR { - pNext?: AnyPointer; - memoryBindIndex?: number; - memory?: DeviceMemory; - memoryOffset?: DeviceSize; - memorySize?: DeviceSize; -} - -export class BindVideoSessionMemoryInfoKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBindVideoSessionMemoryInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBindVideoSessionMemoryInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(BindVideoSessionMemoryInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BindVideoSessionMemoryInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BindVideoSessionMemoryInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BindVideoSessionMemoryInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryBindIndex !== undefined) this.memoryBindIndex = data.memoryBindIndex; - if (data.memory !== undefined) this.memory = data.memory; - if (data.memoryOffset !== undefined) this.memoryOffset = data.memoryOffset; - if (data.memorySize !== undefined) this.memorySize = data.memorySize; - } - this.sType = StructureType.BIND_VIDEO_SESSION_MEMORY_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryBindIndex() { - return this.#view.getUint32(16, LE); - } - - set memoryBindIndex(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get memory() { - return this.#view.getBigUint64(24, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get memoryOffset() { - return this.#view.getBigUint64(32, LE); - } - - set memoryOffset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get memorySize() { - return this.#view.getBigUint64(40, LE); - } - - set memorySize(value: DeviceSize) { - this.#view.setBigUint64(40, BigInt(value), LE); - } -} - -export interface InitVideoPictureResourceInfoKHR { - pNext?: AnyPointer; - codedOffset?: Offset2D; - codedExtent?: Extent2D; - baseArrayLayer?: number; - imageViewBinding?: ImageView; -} - -export class VideoPictureResourceInfoKHR implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoPictureResourceInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoPictureResourceInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoPictureResourceInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoPictureResourceInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoPictureResourceInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoPictureResourceInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.codedOffset !== undefined) this.codedOffset = data.codedOffset; - if (data.codedExtent !== undefined) this.codedExtent = data.codedExtent; - if (data.baseArrayLayer !== undefined) this.baseArrayLayer = data.baseArrayLayer; - if (data.imageViewBinding !== undefined) this.imageViewBinding = data.imageViewBinding; - } - this.sType = StructureType.VIDEO_PICTURE_RESOURCE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get codedOffset() { - return new Offset2D(this.#data.subarray(16, 16 + Offset2D.size)); - } - - set codedOffset(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get codedExtent() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - - set codedExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get baseArrayLayer() { - return this.#view.getUint32(32, LE); - } - - set baseArrayLayer(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get imageViewBinding() { - return this.#view.getBigUint64(40, LE); - } - - set imageViewBinding(value: ImageView) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoReferenceSlotInfoKHR { - pNext?: AnyPointer; - slotIndex?: number; - pPictureResource?: AnyPointer; -} - -export class VideoReferenceSlotInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoReferenceSlotInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoReferenceSlotInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoReferenceSlotInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoReferenceSlotInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoReferenceSlotInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoReferenceSlotInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.slotIndex !== undefined) this.slotIndex = data.slotIndex; - if (data.pPictureResource !== undefined) this.pPictureResource = data.pPictureResource; - } - this.sType = StructureType.VIDEO_REFERENCE_SLOT_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get slotIndex() { - return this.#view.getInt32(16, LE); - } - - set slotIndex(value: number) { - this.#view.setInt32(16, Number(value), LE); - } - - get pPictureResource() { - return this.#view.getBigUint64(24, LE); - } - - set pPictureResource(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoDecodeCapabilitiesKHR { - pNext?: AnyPointer; - flags?: VideoDecodeCapabilityFlagsKHR; -} - -export class VideoDecodeCapabilitiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeCapabilitiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeCapabilitiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeCapabilitiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.VIDEO_DECODE_CAPABILITIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoDecodeCapabilityFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoDecodeUsageInfoKHR { - pNext?: AnyPointer; - videoUsageHints?: VideoDecodeUsageFlagsKHR; -} - -export class VideoDecodeUsageInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeUsageInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeUsageInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeUsageInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeUsageInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeUsageInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeUsageInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.videoUsageHints !== undefined) this.videoUsageHints = data.videoUsageHints; - } - this.sType = StructureType.VIDEO_DECODE_USAGE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get videoUsageHints() { - return this.#view.getUint32(16, LE); - } - - set videoUsageHints(value: VideoDecodeUsageFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoDecodeInfoKHR { - pNext?: AnyPointer; - flags?: VideoDecodeFlagsKHR; - srcBuffer?: Buffer; - srcBufferOffset?: DeviceSize; - srcBufferRange?: DeviceSize; - dstPictureResource?: VideoPictureResourceInfoKHR; - pSetupReferenceSlot?: AnyPointer; - referenceSlotCount?: number; - pReferenceSlots?: AnyPointer; -} - -export class VideoDecodeInfoKHR implements BaseStruct { - static size = 120; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.srcBuffer !== undefined) this.srcBuffer = data.srcBuffer; - if (data.srcBufferOffset !== undefined) this.srcBufferOffset = data.srcBufferOffset; - if (data.srcBufferRange !== undefined) this.srcBufferRange = data.srcBufferRange; - if (data.dstPictureResource !== undefined) this.dstPictureResource = data.dstPictureResource; - if (data.pSetupReferenceSlot !== undefined) this.pSetupReferenceSlot = data.pSetupReferenceSlot; - if (data.referenceSlotCount !== undefined) this.referenceSlotCount = data.referenceSlotCount; - if (data.pReferenceSlots !== undefined) this.pReferenceSlots = data.pReferenceSlots; - } - this.sType = StructureType.VIDEO_DECODE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoDecodeFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get srcBuffer() { - return this.#view.getBigUint64(24, LE); - } - - set srcBuffer(value: Buffer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get srcBufferOffset() { - return this.#view.getBigUint64(32, LE); - } - - set srcBufferOffset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get srcBufferRange() { - return this.#view.getBigUint64(40, LE); - } - - set srcBufferRange(value: DeviceSize) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get dstPictureResource() { - return new VideoPictureResourceInfoKHR(this.#data.subarray(48, 48 + VideoPictureResourceInfoKHR.size)); - } - - set dstPictureResource(value: VideoPictureResourceInfoKHR) { - if (value[BUFFER].byteLength < VideoPictureResourceInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 48); - } - - get pSetupReferenceSlot() { - return this.#view.getBigUint64(96, LE); - } - - set pSetupReferenceSlot(value: AnyPointer) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } - - get referenceSlotCount() { - return this.#view.getUint32(104, LE); - } - - set referenceSlotCount(value: number) { - this.#view.setUint32(104, Number(value), LE); - } - - get pReferenceSlots() { - return this.#view.getBigUint64(112, LE); - } - - set pReferenceSlots(value: AnyPointer) { - this.#view.setBigUint64(112, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoDecodeH264ProfileInfoEXT { - pNext?: AnyPointer; - stdProfileIdc?: StdVideoH264ProfileIdc; - pictureLayout?: VideoDecodeH264PictureLayoutFlagBitsEXT; -} - -export class VideoDecodeH264ProfileInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH264ProfileInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264ProfileInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH264ProfileInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264ProfileInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264ProfileInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH264ProfileInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stdProfileIdc !== undefined) this.stdProfileIdc = data.stdProfileIdc; - if (data.pictureLayout !== undefined) this.pictureLayout = data.pictureLayout; - } - this.sType = StructureType.VIDEO_DECODE_H264_PROFILE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stdProfileIdc() { - return this.#view.getUint32(16, LE); - } - - set stdProfileIdc(value: StdVideoH264ProfileIdc) { - this.#view.setUint32(16, Number(value), LE); - } - - get pictureLayout() { - return this.#view.getUint32(20, LE); - } - - set pictureLayout(value: VideoDecodeH264PictureLayoutFlagBitsEXT) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitVideoDecodeH264CapabilitiesEXT { - pNext?: AnyPointer; - maxLevelIdc?: StdVideoH264LevelIdc; - fieldOffsetGranularity?: Offset2D; -} - -export class VideoDecodeH264CapabilitiesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH264CapabilitiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264CapabilitiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH264CapabilitiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264CapabilitiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264CapabilitiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH264CapabilitiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxLevelIdc !== undefined) this.maxLevelIdc = data.maxLevelIdc; - if (data.fieldOffsetGranularity !== undefined) this.fieldOffsetGranularity = data.fieldOffsetGranularity; - } - this.sType = StructureType.VIDEO_DECODE_H264_CAPABILITIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxLevelIdc() { - return this.#view.getUint32(16, LE); - } - - set maxLevelIdc(value: StdVideoH264LevelIdc) { - this.#view.setUint32(16, Number(value), LE); - } - - get fieldOffsetGranularity() { - return new Offset2D(this.#data.subarray(20, 20 + Offset2D.size)); - } - - set fieldOffsetGranularity(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } -} - -export interface InitVideoDecodeH264SessionParametersAddInfoEXT { - pNext?: AnyPointer; - stdSPSCount?: number; - pStdSPSs?: AnyPointer; - stdPPSCount?: number; - pStdPPSs?: AnyPointer; -} - -export class VideoDecodeH264SessionParametersAddInfoEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH264SessionParametersAddInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264SessionParametersAddInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH264SessionParametersAddInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264SessionParametersAddInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264SessionParametersAddInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH264SessionParametersAddInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stdSPSCount !== undefined) this.stdSPSCount = data.stdSPSCount; - if (data.pStdSPSs !== undefined) this.pStdSPSs = data.pStdSPSs; - if (data.stdPPSCount !== undefined) this.stdPPSCount = data.stdPPSCount; - if (data.pStdPPSs !== undefined) this.pStdPPSs = data.pStdPPSs; - } - this.sType = StructureType.VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stdSPSCount() { - return this.#view.getUint32(16, LE); - } - - set stdSPSCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pStdSPSs() { - return this.#view.getBigUint64(24, LE); - } - - set pStdSPSs(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get stdPPSCount() { - return this.#view.getUint32(32, LE); - } - - set stdPPSCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pStdPPSs() { - return this.#view.getBigUint64(40, LE); - } - - set pStdPPSs(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoDecodeH264SessionParametersCreateInfoEXT { - pNext?: AnyPointer; - maxStdSPSCount?: number; - maxStdPPSCount?: number; - pParametersAddInfo?: AnyPointer; -} - -export class VideoDecodeH264SessionParametersCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH264SessionParametersCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264SessionParametersCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH264SessionParametersCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264SessionParametersCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264SessionParametersCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH264SessionParametersCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxStdSPSCount !== undefined) this.maxStdSPSCount = data.maxStdSPSCount; - if (data.maxStdPPSCount !== undefined) this.maxStdPPSCount = data.maxStdPPSCount; - if (data.pParametersAddInfo !== undefined) this.pParametersAddInfo = data.pParametersAddInfo; - } - this.sType = StructureType.VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxStdSPSCount() { - return this.#view.getUint32(16, LE); - } - - set maxStdSPSCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxStdPPSCount() { - return this.#view.getUint32(20, LE); - } - - set maxStdPPSCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pParametersAddInfo() { - return this.#view.getBigUint64(24, LE); - } - - set pParametersAddInfo(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoDecodeH264PictureInfoEXT { - pNext?: AnyPointer; - pStdPictureInfo?: AnyPointer; - sliceCount?: number; - pSliceOffsets?: AnyPointer; -} - -export class VideoDecodeH264PictureInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH264PictureInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264PictureInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH264PictureInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264PictureInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264PictureInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH264PictureInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pStdPictureInfo !== undefined) this.pStdPictureInfo = data.pStdPictureInfo; - if (data.sliceCount !== undefined) this.sliceCount = data.sliceCount; - if (data.pSliceOffsets !== undefined) this.pSliceOffsets = data.pSliceOffsets; - } - this.sType = StructureType.VIDEO_DECODE_H264_PICTURE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pStdPictureInfo() { - return this.#view.getBigUint64(16, LE); - } - - set pStdPictureInfo(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get sliceCount() { - return this.#view.getUint32(24, LE); - } - - set sliceCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pSliceOffsets() { - return this.#view.getBigUint64(32, LE); - } - - set pSliceOffsets(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoDecodeH264DpbSlotInfoEXT { - pNext?: AnyPointer; - pStdReferenceInfo?: AnyPointer; -} - -export class VideoDecodeH264DpbSlotInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH264DpbSlotInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH264DpbSlotInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH264DpbSlotInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH264DpbSlotInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH264DpbSlotInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH264DpbSlotInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pStdReferenceInfo !== undefined) this.pStdReferenceInfo = data.pStdReferenceInfo; - } - this.sType = StructureType.VIDEO_DECODE_H264_DPB_SLOT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pStdReferenceInfo() { - return this.#view.getBigUint64(16, LE); - } - - set pStdReferenceInfo(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoDecodeH265ProfileInfoEXT { - pNext?: AnyPointer; - stdProfileIdc?: StdVideoH265ProfileIdc; -} - -export class VideoDecodeH265ProfileInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH265ProfileInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265ProfileInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH265ProfileInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265ProfileInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265ProfileInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH265ProfileInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stdProfileIdc !== undefined) this.stdProfileIdc = data.stdProfileIdc; - } - this.sType = StructureType.VIDEO_DECODE_H265_PROFILE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stdProfileIdc() { - return this.#view.getUint32(16, LE); - } - - set stdProfileIdc(value: StdVideoH265ProfileIdc) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoDecodeH265CapabilitiesEXT { - pNext?: AnyPointer; - maxLevelIdc?: StdVideoH265LevelIdc; -} - -export class VideoDecodeH265CapabilitiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH265CapabilitiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265CapabilitiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH265CapabilitiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265CapabilitiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265CapabilitiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH265CapabilitiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxLevelIdc !== undefined) this.maxLevelIdc = data.maxLevelIdc; - } - this.sType = StructureType.VIDEO_DECODE_H265_CAPABILITIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxLevelIdc() { - return this.#view.getUint32(16, LE); - } - - set maxLevelIdc(value: StdVideoH265LevelIdc) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoDecodeH265SessionParametersAddInfoEXT { - pNext?: AnyPointer; - stdVPSCount?: number; - pStdVPSs?: AnyPointer; - stdSPSCount?: number; - pStdSPSs?: AnyPointer; - stdPPSCount?: number; - pStdPPSs?: AnyPointer; -} - -export class VideoDecodeH265SessionParametersAddInfoEXT implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH265SessionParametersAddInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265SessionParametersAddInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH265SessionParametersAddInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265SessionParametersAddInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265SessionParametersAddInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH265SessionParametersAddInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stdVPSCount !== undefined) this.stdVPSCount = data.stdVPSCount; - if (data.pStdVPSs !== undefined) this.pStdVPSs = data.pStdVPSs; - if (data.stdSPSCount !== undefined) this.stdSPSCount = data.stdSPSCount; - if (data.pStdSPSs !== undefined) this.pStdSPSs = data.pStdSPSs; - if (data.stdPPSCount !== undefined) this.stdPPSCount = data.stdPPSCount; - if (data.pStdPPSs !== undefined) this.pStdPPSs = data.pStdPPSs; - } - this.sType = StructureType.VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stdVPSCount() { - return this.#view.getUint32(16, LE); - } - - set stdVPSCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pStdVPSs() { - return this.#view.getBigUint64(24, LE); - } - - set pStdVPSs(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get stdSPSCount() { - return this.#view.getUint32(32, LE); - } - - set stdSPSCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pStdSPSs() { - return this.#view.getBigUint64(40, LE); - } - - set pStdSPSs(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get stdPPSCount() { - return this.#view.getUint32(48, LE); - } - - set stdPPSCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pStdPPSs() { - return this.#view.getBigUint64(56, LE); - } - - set pStdPPSs(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoDecodeH265SessionParametersCreateInfoEXT { - pNext?: AnyPointer; - maxStdVPSCount?: number; - maxStdSPSCount?: number; - maxStdPPSCount?: number; - pParametersAddInfo?: AnyPointer; -} - -export class VideoDecodeH265SessionParametersCreateInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH265SessionParametersCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265SessionParametersCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH265SessionParametersCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265SessionParametersCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265SessionParametersCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH265SessionParametersCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxStdVPSCount !== undefined) this.maxStdVPSCount = data.maxStdVPSCount; - if (data.maxStdSPSCount !== undefined) this.maxStdSPSCount = data.maxStdSPSCount; - if (data.maxStdPPSCount !== undefined) this.maxStdPPSCount = data.maxStdPPSCount; - if (data.pParametersAddInfo !== undefined) this.pParametersAddInfo = data.pParametersAddInfo; - } - this.sType = StructureType.VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxStdVPSCount() { - return this.#view.getUint32(16, LE); - } - - set maxStdVPSCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxStdSPSCount() { - return this.#view.getUint32(20, LE); - } - - set maxStdSPSCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxStdPPSCount() { - return this.#view.getUint32(24, LE); - } - - set maxStdPPSCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pParametersAddInfo() { - return this.#view.getBigUint64(32, LE); - } - - set pParametersAddInfo(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoDecodeH265PictureInfoEXT { - pNext?: AnyPointer; - pStdPictureInfo?: AnyPointer; - sliceCount?: number; - pSliceOffsets?: AnyPointer; -} - -export class VideoDecodeH265PictureInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH265PictureInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265PictureInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH265PictureInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265PictureInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265PictureInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH265PictureInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pStdPictureInfo !== undefined) this.pStdPictureInfo = data.pStdPictureInfo; - if (data.sliceCount !== undefined) this.sliceCount = data.sliceCount; - if (data.pSliceOffsets !== undefined) this.pSliceOffsets = data.pSliceOffsets; - } - this.sType = StructureType.VIDEO_DECODE_H265_PICTURE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pStdPictureInfo() { - return this.#view.getBigUint64(16, LE); - } - - set pStdPictureInfo(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get sliceCount() { - return this.#view.getUint32(24, LE); - } - - set sliceCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pSliceOffsets() { - return this.#view.getBigUint64(32, LE); - } - - set pSliceOffsets(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoDecodeH265DpbSlotInfoEXT { - pNext?: AnyPointer; - pStdReferenceInfo?: AnyPointer; -} - -export class VideoDecodeH265DpbSlotInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoDecodeH265DpbSlotInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoDecodeH265DpbSlotInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoDecodeH265DpbSlotInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoDecodeH265DpbSlotInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoDecodeH265DpbSlotInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoDecodeH265DpbSlotInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pStdReferenceInfo !== undefined) this.pStdReferenceInfo = data.pStdReferenceInfo; - } - this.sType = StructureType.VIDEO_DECODE_H265_DPB_SLOT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pStdReferenceInfo() { - return this.#view.getBigUint64(16, LE); - } - - set pStdReferenceInfo(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoSessionCreateInfoKHR { - pNext?: AnyPointer; - queueFamilyIndex?: number; - flags?: VideoSessionCreateFlagsKHR; - pVideoProfile?: AnyPointer; - pictureFormat?: Format; - maxCodedExtent?: Extent2D; - referencePictureFormat?: Format; - maxDpbSlots?: number; - maxActiveReferencePictures?: number; - pStdHeaderVersion?: AnyPointer; -} - -export class VideoSessionCreateInfoKHR implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoSessionCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoSessionCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoSessionCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoSessionCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoSessionCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.queueFamilyIndex !== undefined) this.queueFamilyIndex = data.queueFamilyIndex; - if (data.flags !== undefined) this.flags = data.flags; - if (data.pVideoProfile !== undefined) this.pVideoProfile = data.pVideoProfile; - if (data.pictureFormat !== undefined) this.pictureFormat = data.pictureFormat; - if (data.maxCodedExtent !== undefined) this.maxCodedExtent = data.maxCodedExtent; - if (data.referencePictureFormat !== undefined) this.referencePictureFormat = data.referencePictureFormat; - if (data.maxDpbSlots !== undefined) this.maxDpbSlots = data.maxDpbSlots; - if (data.maxActiveReferencePictures !== undefined) this.maxActiveReferencePictures = data.maxActiveReferencePictures; - if (data.pStdHeaderVersion !== undefined) this.pStdHeaderVersion = data.pStdHeaderVersion; - } - this.sType = StructureType.VIDEO_SESSION_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get queueFamilyIndex() { - return this.#view.getUint32(16, LE); - } - - set queueFamilyIndex(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(20, LE); - } - - set flags(value: VideoSessionCreateFlagsKHR) { - this.#view.setUint32(20, Number(value), LE); - } - - get pVideoProfile() { - return this.#view.getBigUint64(24, LE); - } - - set pVideoProfile(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pictureFormat() { - return this.#view.getUint32(32, LE); - } - - set pictureFormat(value: Format) { - this.#view.setUint32(32, Number(value), LE); - } - - get maxCodedExtent() { - return new Extent2D(this.#data.subarray(36, 36 + Extent2D.size)); - } - - set maxCodedExtent(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 36); - } - - get referencePictureFormat() { - return this.#view.getUint32(44, LE); - } - - set referencePictureFormat(value: Format) { - this.#view.setUint32(44, Number(value), LE); - } - - get maxDpbSlots() { - return this.#view.getUint32(48, LE); - } - - set maxDpbSlots(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get maxActiveReferencePictures() { - return this.#view.getUint32(52, LE); - } - - set maxActiveReferencePictures(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get pStdHeaderVersion() { - return this.#view.getBigUint64(56, LE); - } - - set pStdHeaderVersion(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoSessionParametersCreateInfoKHR { - pNext?: AnyPointer; - flags?: VideoSessionParametersCreateFlagsKHR; - videoSessionParametersTemplate?: VideoSessionParametersKHR; - videoSession?: VideoSessionKHR; -} - -export class VideoSessionParametersCreateInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoSessionParametersCreateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoSessionParametersCreateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoSessionParametersCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionParametersCreateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoSessionParametersCreateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoSessionParametersCreateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.videoSessionParametersTemplate !== undefined) this.videoSessionParametersTemplate = data.videoSessionParametersTemplate; - if (data.videoSession !== undefined) this.videoSession = data.videoSession; - } - this.sType = StructureType.VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoSessionParametersCreateFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get videoSessionParametersTemplate() { - return this.#view.getBigUint64(24, LE); - } - - set videoSessionParametersTemplate(value: VideoSessionParametersKHR) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get videoSession() { - return this.#view.getBigUint64(32, LE); - } - - set videoSession(value: VideoSessionKHR) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoSessionParametersUpdateInfoKHR { - pNext?: AnyPointer; - updateSequenceCount?: number; -} - -export class VideoSessionParametersUpdateInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoSessionParametersUpdateInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoSessionParametersUpdateInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoSessionParametersUpdateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoSessionParametersUpdateInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoSessionParametersUpdateInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoSessionParametersUpdateInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.updateSequenceCount !== undefined) this.updateSequenceCount = data.updateSequenceCount; - } - this.sType = StructureType.VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get updateSequenceCount() { - return this.#view.getUint32(16, LE); - } - - set updateSequenceCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoBeginCodingInfoKHR { - pNext?: AnyPointer; - flags?: VideoBeginCodingFlagsKHR; - videoSession?: VideoSessionKHR; - videoSessionParameters?: VideoSessionParametersKHR; - referenceSlotCount?: number; - pReferenceSlots?: AnyPointer; -} - -export class VideoBeginCodingInfoKHR implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoBeginCodingInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoBeginCodingInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoBeginCodingInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoBeginCodingInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoBeginCodingInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoBeginCodingInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.videoSession !== undefined) this.videoSession = data.videoSession; - if (data.videoSessionParameters !== undefined) this.videoSessionParameters = data.videoSessionParameters; - if (data.referenceSlotCount !== undefined) this.referenceSlotCount = data.referenceSlotCount; - if (data.pReferenceSlots !== undefined) this.pReferenceSlots = data.pReferenceSlots; - } - this.sType = StructureType.VIDEO_BEGIN_CODING_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoBeginCodingFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get videoSession() { - return this.#view.getBigUint64(24, LE); - } - - set videoSession(value: VideoSessionKHR) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get videoSessionParameters() { - return this.#view.getBigUint64(32, LE); - } - - set videoSessionParameters(value: VideoSessionParametersKHR) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get referenceSlotCount() { - return this.#view.getUint32(40, LE); - } - - set referenceSlotCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get pReferenceSlots() { - return this.#view.getBigUint64(48, LE); - } - - set pReferenceSlots(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEndCodingInfoKHR { - pNext?: AnyPointer; - flags?: VideoEndCodingFlagsKHR; -} - -export class VideoEndCodingInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEndCodingInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEndCodingInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEndCodingInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEndCodingInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEndCodingInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEndCodingInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.VIDEO_END_CODING_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoEndCodingFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoCodingControlInfoKHR { - pNext?: AnyPointer; - flags?: VideoCodingControlFlagsKHR; -} - -export class VideoCodingControlInfoKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoCodingControlInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoCodingControlInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoCodingControlInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoCodingControlInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoCodingControlInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoCodingControlInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.VIDEO_CODING_CONTROL_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoCodingControlFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoEncodeUsageInfoKHR { - pNext?: AnyPointer; - videoUsageHints?: VideoEncodeUsageFlagsKHR; - videoContentHints?: VideoEncodeContentFlagsKHR; - tuningMode?: VideoEncodeTuningModeKHR; -} - -export class VideoEncodeUsageInfoKHR implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeUsageInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeUsageInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeUsageInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeUsageInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeUsageInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeUsageInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.videoUsageHints !== undefined) this.videoUsageHints = data.videoUsageHints; - if (data.videoContentHints !== undefined) this.videoContentHints = data.videoContentHints; - if (data.tuningMode !== undefined) this.tuningMode = data.tuningMode; - } - this.sType = StructureType.VIDEO_ENCODE_USAGE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get videoUsageHints() { - return this.#view.getUint32(16, LE); - } - - set videoUsageHints(value: VideoEncodeUsageFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get videoContentHints() { - return this.#view.getUint32(20, LE); - } - - set videoContentHints(value: VideoEncodeContentFlagsKHR) { - this.#view.setUint32(20, Number(value), LE); - } - - get tuningMode() { - return this.#view.getUint32(24, LE); - } - - set tuningMode(value: VideoEncodeTuningModeKHR) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitVideoEncodeInfoKHR { - pNext?: AnyPointer; - flags?: VideoEncodeFlagsKHR; - qualityLevel?: number; - dstBitstreamBuffer?: Buffer; - dstBitstreamBufferOffset?: DeviceSize; - dstBitstreamBufferMaxRange?: DeviceSize; - srcPictureResource?: VideoPictureResourceInfoKHR; - pSetupReferenceSlot?: AnyPointer; - referenceSlotCount?: number; - pReferenceSlots?: AnyPointer; - precedingExternallyEncodedBytes?: number; -} - -export class VideoEncodeInfoKHR implements BaseStruct { - static size = 128; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.qualityLevel !== undefined) this.qualityLevel = data.qualityLevel; - if (data.dstBitstreamBuffer !== undefined) this.dstBitstreamBuffer = data.dstBitstreamBuffer; - if (data.dstBitstreamBufferOffset !== undefined) this.dstBitstreamBufferOffset = data.dstBitstreamBufferOffset; - if (data.dstBitstreamBufferMaxRange !== undefined) this.dstBitstreamBufferMaxRange = data.dstBitstreamBufferMaxRange; - if (data.srcPictureResource !== undefined) this.srcPictureResource = data.srcPictureResource; - if (data.pSetupReferenceSlot !== undefined) this.pSetupReferenceSlot = data.pSetupReferenceSlot; - if (data.referenceSlotCount !== undefined) this.referenceSlotCount = data.referenceSlotCount; - if (data.pReferenceSlots !== undefined) this.pReferenceSlots = data.pReferenceSlots; - if (data.precedingExternallyEncodedBytes !== undefined) this.precedingExternallyEncodedBytes = data.precedingExternallyEncodedBytes; - } - this.sType = StructureType.VIDEO_ENCODE_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoEncodeFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get qualityLevel() { - return this.#view.getUint32(20, LE); - } - - set qualityLevel(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get dstBitstreamBuffer() { - return this.#view.getBigUint64(24, LE); - } - - set dstBitstreamBuffer(value: Buffer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get dstBitstreamBufferOffset() { - return this.#view.getBigUint64(32, LE); - } - - set dstBitstreamBufferOffset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get dstBitstreamBufferMaxRange() { - return this.#view.getBigUint64(40, LE); - } - - set dstBitstreamBufferMaxRange(value: DeviceSize) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get srcPictureResource() { - return new VideoPictureResourceInfoKHR(this.#data.subarray(48, 48 + VideoPictureResourceInfoKHR.size)); - } - - set srcPictureResource(value: VideoPictureResourceInfoKHR) { - if (value[BUFFER].byteLength < VideoPictureResourceInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 48); - } - - get pSetupReferenceSlot() { - return this.#view.getBigUint64(96, LE); - } - - set pSetupReferenceSlot(value: AnyPointer) { - this.#view.setBigUint64(96, BigInt(anyPointer(value)), LE); - } - - get referenceSlotCount() { - return this.#view.getUint32(104, LE); - } - - set referenceSlotCount(value: number) { - this.#view.setUint32(104, Number(value), LE); - } - - get pReferenceSlots() { - return this.#view.getBigUint64(112, LE); - } - - set pReferenceSlots(value: AnyPointer) { - this.#view.setBigUint64(112, BigInt(anyPointer(value)), LE); - } - - get precedingExternallyEncodedBytes() { - return this.#view.getUint32(120, LE); - } - - set precedingExternallyEncodedBytes(value: number) { - this.#view.setUint32(120, Number(value), LE); - } -} - -export interface InitVideoEncodeRateControlInfoKHR { - pNext?: AnyPointer; - flags?: VideoEncodeRateControlFlagsKHR; - rateControlMode?: VideoEncodeRateControlModeFlagBitsKHR; - layerCount?: number; - pLayerConfigs?: AnyPointer; -} - -export class VideoEncodeRateControlInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeRateControlInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeRateControlInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeRateControlInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeRateControlInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeRateControlInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeRateControlInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.rateControlMode !== undefined) this.rateControlMode = data.rateControlMode; - if (data.layerCount !== undefined) this.layerCount = data.layerCount; - if (data.pLayerConfigs !== undefined) this.pLayerConfigs = data.pLayerConfigs; - } - this.sType = StructureType.VIDEO_ENCODE_RATE_CONTROL_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoEncodeRateControlFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get rateControlMode() { - return this.#view.getUint32(20, LE); - } - - set rateControlMode(value: VideoEncodeRateControlModeFlagBitsKHR) { - this.#view.setUint32(20, Number(value), LE); - } - - get layerCount() { - return this.#view.getUint8(24); - } - - set layerCount(value: number) { - this.#view.setUint8(24, Number(value)); - } - - get pLayerConfigs() { - return this.#view.getBigUint64(32, LE); - } - - set pLayerConfigs(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeRateControlLayerInfoKHR { - pNext?: AnyPointer; - averageBitrate?: number; - maxBitrate?: number; - frameRateNumerator?: number; - frameRateDenominator?: number; - virtualBufferSizeInMs?: number; - initialVirtualBufferSizeInMs?: number; -} - -export class VideoEncodeRateControlLayerInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeRateControlLayerInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeRateControlLayerInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeRateControlLayerInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeRateControlLayerInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeRateControlLayerInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeRateControlLayerInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.averageBitrate !== undefined) this.averageBitrate = data.averageBitrate; - if (data.maxBitrate !== undefined) this.maxBitrate = data.maxBitrate; - if (data.frameRateNumerator !== undefined) this.frameRateNumerator = data.frameRateNumerator; - if (data.frameRateDenominator !== undefined) this.frameRateDenominator = data.frameRateDenominator; - if (data.virtualBufferSizeInMs !== undefined) this.virtualBufferSizeInMs = data.virtualBufferSizeInMs; - if (data.initialVirtualBufferSizeInMs !== undefined) this.initialVirtualBufferSizeInMs = data.initialVirtualBufferSizeInMs; - } - this.sType = StructureType.VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get averageBitrate() { - return this.#view.getUint32(16, LE); - } - - set averageBitrate(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxBitrate() { - return this.#view.getUint32(20, LE); - } - - set maxBitrate(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get frameRateNumerator() { - return this.#view.getUint32(24, LE); - } - - set frameRateNumerator(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get frameRateDenominator() { - return this.#view.getUint32(28, LE); - } - - set frameRateDenominator(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get virtualBufferSizeInMs() { - return this.#view.getUint32(32, LE); - } - - set virtualBufferSizeInMs(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get initialVirtualBufferSizeInMs() { - return this.#view.getUint32(36, LE); - } - - set initialVirtualBufferSizeInMs(value: number) { - this.#view.setUint32(36, Number(value), LE); - } -} - -export interface InitVideoEncodeCapabilitiesKHR { - pNext?: AnyPointer; - flags?: VideoEncodeCapabilityFlagsKHR; - rateControlModes?: VideoEncodeRateControlModeFlagsKHR; - rateControlLayerCount?: number; - qualityLevelCount?: number; - inputImageDataFillAlignment?: Extent2D; -} - -export class VideoEncodeCapabilitiesKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeCapabilitiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeCapabilitiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeCapabilitiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeCapabilitiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeCapabilitiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.rateControlModes !== undefined) this.rateControlModes = data.rateControlModes; - if (data.rateControlLayerCount !== undefined) this.rateControlLayerCount = data.rateControlLayerCount; - if (data.qualityLevelCount !== undefined) this.qualityLevelCount = data.qualityLevelCount; - if (data.inputImageDataFillAlignment !== undefined) this.inputImageDataFillAlignment = data.inputImageDataFillAlignment; - } - this.sType = StructureType.VIDEO_ENCODE_CAPABILITIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoEncodeCapabilityFlagsKHR) { - this.#view.setUint32(16, Number(value), LE); - } - - get rateControlModes() { - return this.#view.getUint32(20, LE); - } - - set rateControlModes(value: VideoEncodeRateControlModeFlagsKHR) { - this.#view.setUint32(20, Number(value), LE); - } - - get rateControlLayerCount() { - return this.#view.getUint8(24); - } - - set rateControlLayerCount(value: number) { - this.#view.setUint8(24, Number(value)); - } - - get qualityLevelCount() { - return this.#view.getUint8(25); - } - - set qualityLevelCount(value: number) { - this.#view.setUint8(25, Number(value)); - } - - get inputImageDataFillAlignment() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - - set inputImageDataFillAlignment(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 28); - } -} - -export interface InitVideoEncodeH264CapabilitiesEXT { - pNext?: AnyPointer; - flags?: VideoEncodeH264CapabilityFlagsEXT; - inputModeFlags?: VideoEncodeH264InputModeFlagsEXT; - outputModeFlags?: VideoEncodeH264OutputModeFlagsEXT; - maxPPictureL0ReferenceCount?: number; - maxBPictureL0ReferenceCount?: number; - maxL1ReferenceCount?: number; - motionVectorsOverPicBoundariesFlag?: Bool32; - maxBytesPerPicDenom?: number; - maxBitsPerMbDenom?: number; - log2MaxMvLengthHorizontal?: number; - log2MaxMvLengthVertical?: number; -} - -export class VideoEncodeH264CapabilitiesEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264CapabilitiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264CapabilitiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264CapabilitiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264CapabilitiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264CapabilitiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264CapabilitiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.inputModeFlags !== undefined) this.inputModeFlags = data.inputModeFlags; - if (data.outputModeFlags !== undefined) this.outputModeFlags = data.outputModeFlags; - if (data.maxPPictureL0ReferenceCount !== undefined) this.maxPPictureL0ReferenceCount = data.maxPPictureL0ReferenceCount; - if (data.maxBPictureL0ReferenceCount !== undefined) this.maxBPictureL0ReferenceCount = data.maxBPictureL0ReferenceCount; - if (data.maxL1ReferenceCount !== undefined) this.maxL1ReferenceCount = data.maxL1ReferenceCount; - if (data.motionVectorsOverPicBoundariesFlag !== undefined) this.motionVectorsOverPicBoundariesFlag = data.motionVectorsOverPicBoundariesFlag; - if (data.maxBytesPerPicDenom !== undefined) this.maxBytesPerPicDenom = data.maxBytesPerPicDenom; - if (data.maxBitsPerMbDenom !== undefined) this.maxBitsPerMbDenom = data.maxBitsPerMbDenom; - if (data.log2MaxMvLengthHorizontal !== undefined) this.log2MaxMvLengthHorizontal = data.log2MaxMvLengthHorizontal; - if (data.log2MaxMvLengthVertical !== undefined) this.log2MaxMvLengthVertical = data.log2MaxMvLengthVertical; - } - this.sType = StructureType.VIDEO_ENCODE_H264_CAPABILITIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoEncodeH264CapabilityFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get inputModeFlags() { - return this.#view.getUint32(20, LE); - } - - set inputModeFlags(value: VideoEncodeH264InputModeFlagsEXT) { - this.#view.setUint32(20, Number(value), LE); - } - - get outputModeFlags() { - return this.#view.getUint32(24, LE); - } - - set outputModeFlags(value: VideoEncodeH264OutputModeFlagsEXT) { - this.#view.setUint32(24, Number(value), LE); - } - - get maxPPictureL0ReferenceCount() { - return this.#view.getUint8(28); - } - - set maxPPictureL0ReferenceCount(value: number) { - this.#view.setUint8(28, Number(value)); - } - - get maxBPictureL0ReferenceCount() { - return this.#view.getUint8(29); - } - - set maxBPictureL0ReferenceCount(value: number) { - this.#view.setUint8(29, Number(value)); - } - - get maxL1ReferenceCount() { - return this.#view.getUint8(30); - } - - set maxL1ReferenceCount(value: number) { - this.#view.setUint8(30, Number(value)); - } - - get motionVectorsOverPicBoundariesFlag() { - return this.#view.getUint32(32, LE); - } - - set motionVectorsOverPicBoundariesFlag(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get maxBytesPerPicDenom() { - return this.#view.getUint32(36, LE); - } - - set maxBytesPerPicDenom(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get maxBitsPerMbDenom() { - return this.#view.getUint32(40, LE); - } - - set maxBitsPerMbDenom(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get log2MaxMvLengthHorizontal() { - return this.#view.getUint32(44, LE); - } - - set log2MaxMvLengthHorizontal(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get log2MaxMvLengthVertical() { - return this.#view.getUint32(48, LE); - } - - set log2MaxMvLengthVertical(value: number) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitVideoEncodeH264SessionParametersAddInfoEXT { - pNext?: AnyPointer; - stdSPSCount?: number; - pStdSPSs?: AnyPointer; - stdPPSCount?: number; - pStdPPSs?: AnyPointer; -} - -export class VideoEncodeH264SessionParametersAddInfoEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264SessionParametersAddInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264SessionParametersAddInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264SessionParametersAddInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264SessionParametersAddInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264SessionParametersAddInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264SessionParametersAddInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stdSPSCount !== undefined) this.stdSPSCount = data.stdSPSCount; - if (data.pStdSPSs !== undefined) this.pStdSPSs = data.pStdSPSs; - if (data.stdPPSCount !== undefined) this.stdPPSCount = data.stdPPSCount; - if (data.pStdPPSs !== undefined) this.pStdPPSs = data.pStdPPSs; - } - this.sType = StructureType.VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stdSPSCount() { - return this.#view.getUint32(16, LE); - } - - set stdSPSCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pStdSPSs() { - return this.#view.getBigUint64(24, LE); - } - - set pStdSPSs(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get stdPPSCount() { - return this.#view.getUint32(32, LE); - } - - set stdPPSCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pStdPPSs() { - return this.#view.getBigUint64(40, LE); - } - - set pStdPPSs(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH264SessionParametersCreateInfoEXT { - pNext?: AnyPointer; - maxStdSPSCount?: number; - maxStdPPSCount?: number; - pParametersAddInfo?: AnyPointer; -} - -export class VideoEncodeH264SessionParametersCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264SessionParametersCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264SessionParametersCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264SessionParametersCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264SessionParametersCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264SessionParametersCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264SessionParametersCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxStdSPSCount !== undefined) this.maxStdSPSCount = data.maxStdSPSCount; - if (data.maxStdPPSCount !== undefined) this.maxStdPPSCount = data.maxStdPPSCount; - if (data.pParametersAddInfo !== undefined) this.pParametersAddInfo = data.pParametersAddInfo; - } - this.sType = StructureType.VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxStdSPSCount() { - return this.#view.getUint32(16, LE); - } - - set maxStdSPSCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxStdPPSCount() { - return this.#view.getUint32(20, LE); - } - - set maxStdPPSCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pParametersAddInfo() { - return this.#view.getBigUint64(24, LE); - } - - set pParametersAddInfo(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH264DpbSlotInfoEXT { - pNext?: AnyPointer; - slotIndex?: number; - pStdReferenceInfo?: AnyPointer; -} - -export class VideoEncodeH264DpbSlotInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264DpbSlotInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264DpbSlotInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264DpbSlotInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264DpbSlotInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264DpbSlotInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264DpbSlotInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.slotIndex !== undefined) this.slotIndex = data.slotIndex; - if (data.pStdReferenceInfo !== undefined) this.pStdReferenceInfo = data.pStdReferenceInfo; - } - this.sType = StructureType.VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get slotIndex() { - return this.#view.getInt8(16); - } - - set slotIndex(value: number) { - this.#view.setInt8(16, Number(value)); - } - - get pStdReferenceInfo() { - return this.#view.getBigUint64(24, LE); - } - - set pStdReferenceInfo(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH264VclFrameInfoEXT { - pNext?: AnyPointer; - pReferenceFinalLists?: AnyPointer; - naluSliceEntryCount?: number; - pNaluSliceEntries?: AnyPointer; - pCurrentPictureInfo?: AnyPointer; -} - -export class VideoEncodeH264VclFrameInfoEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264VclFrameInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264VclFrameInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264VclFrameInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264VclFrameInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264VclFrameInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264VclFrameInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pReferenceFinalLists !== undefined) this.pReferenceFinalLists = data.pReferenceFinalLists; - if (data.naluSliceEntryCount !== undefined) this.naluSliceEntryCount = data.naluSliceEntryCount; - if (data.pNaluSliceEntries !== undefined) this.pNaluSliceEntries = data.pNaluSliceEntries; - if (data.pCurrentPictureInfo !== undefined) this.pCurrentPictureInfo = data.pCurrentPictureInfo; - } - this.sType = StructureType.VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pReferenceFinalLists() { - return this.#view.getBigUint64(16, LE); - } - - set pReferenceFinalLists(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get naluSliceEntryCount() { - return this.#view.getUint32(24, LE); - } - - set naluSliceEntryCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pNaluSliceEntries() { - return this.#view.getBigUint64(32, LE); - } - - set pNaluSliceEntries(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get pCurrentPictureInfo() { - return this.#view.getBigUint64(40, LE); - } - - set pCurrentPictureInfo(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH264ReferenceListsInfoEXT { - pNext?: AnyPointer; - referenceList0EntryCount?: number; - pReferenceList0Entries?: AnyPointer; - referenceList1EntryCount?: number; - pReferenceList1Entries?: AnyPointer; - pMemMgmtCtrlOperations?: AnyPointer; -} - -export class VideoEncodeH264ReferenceListsInfoEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264ReferenceListsInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264ReferenceListsInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264ReferenceListsInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264ReferenceListsInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264ReferenceListsInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264ReferenceListsInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.referenceList0EntryCount !== undefined) this.referenceList0EntryCount = data.referenceList0EntryCount; - if (data.pReferenceList0Entries !== undefined) this.pReferenceList0Entries = data.pReferenceList0Entries; - if (data.referenceList1EntryCount !== undefined) this.referenceList1EntryCount = data.referenceList1EntryCount; - if (data.pReferenceList1Entries !== undefined) this.pReferenceList1Entries = data.pReferenceList1Entries; - if (data.pMemMgmtCtrlOperations !== undefined) this.pMemMgmtCtrlOperations = data.pMemMgmtCtrlOperations; - } - this.sType = StructureType.VIDEO_ENCODE_H264_REFERENCE_LISTS_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get referenceList0EntryCount() { - return this.#view.getUint8(16); - } - - set referenceList0EntryCount(value: number) { - this.#view.setUint8(16, Number(value)); - } - - get pReferenceList0Entries() { - return this.#view.getBigUint64(24, LE); - } - - set pReferenceList0Entries(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get referenceList1EntryCount() { - return this.#view.getUint8(32); - } - - set referenceList1EntryCount(value: number) { - this.#view.setUint8(32, Number(value)); - } - - get pReferenceList1Entries() { - return this.#view.getBigUint64(40, LE); - } - - set pReferenceList1Entries(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get pMemMgmtCtrlOperations() { - return this.#view.getBigUint64(48, LE); - } - - set pMemMgmtCtrlOperations(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH264EmitPictureParametersInfoEXT { - pNext?: AnyPointer; - spsId?: number; - emitSpsEnable?: Bool32; - ppsIdEntryCount?: number; - ppsIdEntries?: AnyPointer; -} - -export class VideoEncodeH264EmitPictureParametersInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264EmitPictureParametersInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264EmitPictureParametersInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264EmitPictureParametersInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264EmitPictureParametersInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264EmitPictureParametersInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264EmitPictureParametersInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.spsId !== undefined) this.spsId = data.spsId; - if (data.emitSpsEnable !== undefined) this.emitSpsEnable = data.emitSpsEnable; - if (data.ppsIdEntryCount !== undefined) this.ppsIdEntryCount = data.ppsIdEntryCount; - if (data.ppsIdEntries !== undefined) this.ppsIdEntries = data.ppsIdEntries; - } - this.sType = StructureType.VIDEO_ENCODE_H264_EMIT_PICTURE_PARAMETERS_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get spsId() { - return this.#view.getUint8(16); - } - - set spsId(value: number) { - this.#view.setUint8(16, Number(value)); - } - - get emitSpsEnable() { - return this.#view.getUint32(20, LE); - } - - set emitSpsEnable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get ppsIdEntryCount() { - return this.#view.getUint32(24, LE); - } - - set ppsIdEntryCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get ppsIdEntries() { - return this.#view.getBigUint64(32, LE); - } - - set ppsIdEntries(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH264ProfileInfoEXT { - pNext?: AnyPointer; - stdProfileIdc?: StdVideoH264ProfileIdc; -} - -export class VideoEncodeH264ProfileInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264ProfileInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264ProfileInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264ProfileInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264ProfileInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264ProfileInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264ProfileInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stdProfileIdc !== undefined) this.stdProfileIdc = data.stdProfileIdc; - } - this.sType = StructureType.VIDEO_ENCODE_H264_PROFILE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stdProfileIdc() { - return this.#view.getUint32(16, LE); - } - - set stdProfileIdc(value: StdVideoH264ProfileIdc) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoEncodeH264NaluSliceInfoEXT { - pNext?: AnyPointer; - mbCount?: number; - pReferenceFinalLists?: AnyPointer; - pSliceHeaderStd?: AnyPointer; -} - -export class VideoEncodeH264NaluSliceInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264NaluSliceInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264NaluSliceInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264NaluSliceInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264NaluSliceInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264NaluSliceInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264NaluSliceInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.mbCount !== undefined) this.mbCount = data.mbCount; - if (data.pReferenceFinalLists !== undefined) this.pReferenceFinalLists = data.pReferenceFinalLists; - if (data.pSliceHeaderStd !== undefined) this.pSliceHeaderStd = data.pSliceHeaderStd; - } - this.sType = StructureType.VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get mbCount() { - return this.#view.getUint32(16, LE); - } - - set mbCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pReferenceFinalLists() { - return this.#view.getBigUint64(24, LE); - } - - set pReferenceFinalLists(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pSliceHeaderStd() { - return this.#view.getBigUint64(32, LE); - } - - set pSliceHeaderStd(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH264RateControlInfoEXT { - pNext?: AnyPointer; - gopFrameCount?: number; - idrPeriod?: number; - consecutiveBFrameCount?: number; - rateControlStructure?: VideoEncodeH264RateControlStructureEXT; - temporalLayerCount?: number; -} - -export class VideoEncodeH264RateControlInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264RateControlInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264RateControlInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264RateControlInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264RateControlInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264RateControlInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264RateControlInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.gopFrameCount !== undefined) this.gopFrameCount = data.gopFrameCount; - if (data.idrPeriod !== undefined) this.idrPeriod = data.idrPeriod; - if (data.consecutiveBFrameCount !== undefined) this.consecutiveBFrameCount = data.consecutiveBFrameCount; - if (data.rateControlStructure !== undefined) this.rateControlStructure = data.rateControlStructure; - if (data.temporalLayerCount !== undefined) this.temporalLayerCount = data.temporalLayerCount; - } - this.sType = StructureType.VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get gopFrameCount() { - return this.#view.getUint32(16, LE); - } - - set gopFrameCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get idrPeriod() { - return this.#view.getUint32(20, LE); - } - - set idrPeriod(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get consecutiveBFrameCount() { - return this.#view.getUint32(24, LE); - } - - set consecutiveBFrameCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get rateControlStructure() { - return this.#view.getUint32(28, LE); - } - - set rateControlStructure(value: VideoEncodeH264RateControlStructureEXT) { - this.#view.setUint32(28, Number(value), LE); - } - - get temporalLayerCount() { - return this.#view.getUint8(32); - } - - set temporalLayerCount(value: number) { - this.#view.setUint8(32, Number(value)); - } -} - -export interface InitVideoEncodeH264QpEXT { - qpI?: number; - qpP?: number; - qpB?: number; -} - -export class VideoEncodeH264QpEXT implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264QpEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264QpEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264QpEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264QpEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264QpEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264QpEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.qpI !== undefined) this.qpI = data.qpI; - if (data.qpP !== undefined) this.qpP = data.qpP; - if (data.qpB !== undefined) this.qpB = data.qpB; - } - } - - get qpI() { - return this.#view.getInt32(0, LE); - } - - set qpI(value: number) { - this.#view.setInt32(0, Number(value), LE); - } - - get qpP() { - return this.#view.getInt32(4, LE); - } - - set qpP(value: number) { - this.#view.setInt32(4, Number(value), LE); - } - - get qpB() { - return this.#view.getInt32(8, LE); - } - - set qpB(value: number) { - this.#view.setInt32(8, Number(value), LE); - } -} - -export interface InitVideoEncodeH264FrameSizeEXT { - frameISize?: number; - framePSize?: number; - frameBSize?: number; -} - -export class VideoEncodeH264FrameSizeEXT implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264FrameSizeEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264FrameSizeEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264FrameSizeEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264FrameSizeEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264FrameSizeEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264FrameSizeEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.frameISize !== undefined) this.frameISize = data.frameISize; - if (data.framePSize !== undefined) this.framePSize = data.framePSize; - if (data.frameBSize !== undefined) this.frameBSize = data.frameBSize; - } - } - - get frameISize() { - return this.#view.getUint32(0, LE); - } - - set frameISize(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get framePSize() { - return this.#view.getUint32(4, LE); - } - - set framePSize(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get frameBSize() { - return this.#view.getUint32(8, LE); - } - - set frameBSize(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitVideoEncodeH264RateControlLayerInfoEXT { - pNext?: AnyPointer; - temporalLayerId?: number; - useInitialRcQp?: Bool32; - initialRcQp?: VideoEncodeH264QpEXT; - useMinQp?: Bool32; - minQp?: VideoEncodeH264QpEXT; - useMaxQp?: Bool32; - maxQp?: VideoEncodeH264QpEXT; - useMaxFrameSize?: Bool32; - maxFrameSize?: VideoEncodeH264FrameSizeEXT; -} - -export class VideoEncodeH264RateControlLayerInfoEXT implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH264RateControlLayerInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH264RateControlLayerInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH264RateControlLayerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH264RateControlLayerInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH264RateControlLayerInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH264RateControlLayerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.temporalLayerId !== undefined) this.temporalLayerId = data.temporalLayerId; - if (data.useInitialRcQp !== undefined) this.useInitialRcQp = data.useInitialRcQp; - if (data.initialRcQp !== undefined) this.initialRcQp = data.initialRcQp; - if (data.useMinQp !== undefined) this.useMinQp = data.useMinQp; - if (data.minQp !== undefined) this.minQp = data.minQp; - if (data.useMaxQp !== undefined) this.useMaxQp = data.useMaxQp; - if (data.maxQp !== undefined) this.maxQp = data.maxQp; - if (data.useMaxFrameSize !== undefined) this.useMaxFrameSize = data.useMaxFrameSize; - if (data.maxFrameSize !== undefined) this.maxFrameSize = data.maxFrameSize; - } - this.sType = StructureType.VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get temporalLayerId() { - return this.#view.getUint8(16); - } - - set temporalLayerId(value: number) { - this.#view.setUint8(16, Number(value)); - } - - get useInitialRcQp() { - return this.#view.getUint32(20, LE); - } - - set useInitialRcQp(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get initialRcQp() { - return new VideoEncodeH264QpEXT(this.#data.subarray(24, 24 + VideoEncodeH264QpEXT.size)); - } - - set initialRcQp(value: VideoEncodeH264QpEXT) { - if (value[BUFFER].byteLength < VideoEncodeH264QpEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get useMinQp() { - return this.#view.getUint32(36, LE); - } - - set useMinQp(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get minQp() { - return new VideoEncodeH264QpEXT(this.#data.subarray(40, 40 + VideoEncodeH264QpEXT.size)); - } - - set minQp(value: VideoEncodeH264QpEXT) { - if (value[BUFFER].byteLength < VideoEncodeH264QpEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } - - get useMaxQp() { - return this.#view.getUint32(52, LE); - } - - set useMaxQp(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get maxQp() { - return new VideoEncodeH264QpEXT(this.#data.subarray(56, 56 + VideoEncodeH264QpEXT.size)); - } - - set maxQp(value: VideoEncodeH264QpEXT) { - if (value[BUFFER].byteLength < VideoEncodeH264QpEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 56); - } - - get useMaxFrameSize() { - return this.#view.getUint32(68, LE); - } - - set useMaxFrameSize(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get maxFrameSize() { - return new VideoEncodeH264FrameSizeEXT(this.#data.subarray(72, 72 + VideoEncodeH264FrameSizeEXT.size)); - } - - set maxFrameSize(value: VideoEncodeH264FrameSizeEXT) { - if (value[BUFFER].byteLength < VideoEncodeH264FrameSizeEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 72); - } -} - -export interface InitVideoEncodeH265CapabilitiesEXT { - pNext?: AnyPointer; - flags?: VideoEncodeH265CapabilityFlagsEXT; - inputModeFlags?: VideoEncodeH265InputModeFlagsEXT; - outputModeFlags?: VideoEncodeH265OutputModeFlagsEXT; - ctbSizes?: VideoEncodeH265CtbSizeFlagsEXT; - transformBlockSizes?: VideoEncodeH265TransformBlockSizeFlagsEXT; - maxPPictureL0ReferenceCount?: number; - maxBPictureL0ReferenceCount?: number; - maxL1ReferenceCount?: number; - maxSubLayersCount?: number; - minLog2MinLumaCodingBlockSizeMinus3?: number; - maxLog2MinLumaCodingBlockSizeMinus3?: number; - minLog2MinLumaTransformBlockSizeMinus2?: number; - maxLog2MinLumaTransformBlockSizeMinus2?: number; - minMaxTransformHierarchyDepthInter?: number; - maxMaxTransformHierarchyDepthInter?: number; - minMaxTransformHierarchyDepthIntra?: number; - maxMaxTransformHierarchyDepthIntra?: number; - maxDiffCuQpDeltaDepth?: number; - minMaxNumMergeCand?: number; - maxMaxNumMergeCand?: number; -} - -export class VideoEncodeH265CapabilitiesEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265CapabilitiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265CapabilitiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265CapabilitiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265CapabilitiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265CapabilitiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265CapabilitiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.inputModeFlags !== undefined) this.inputModeFlags = data.inputModeFlags; - if (data.outputModeFlags !== undefined) this.outputModeFlags = data.outputModeFlags; - if (data.ctbSizes !== undefined) this.ctbSizes = data.ctbSizes; - if (data.transformBlockSizes !== undefined) this.transformBlockSizes = data.transformBlockSizes; - if (data.maxPPictureL0ReferenceCount !== undefined) this.maxPPictureL0ReferenceCount = data.maxPPictureL0ReferenceCount; - if (data.maxBPictureL0ReferenceCount !== undefined) this.maxBPictureL0ReferenceCount = data.maxBPictureL0ReferenceCount; - if (data.maxL1ReferenceCount !== undefined) this.maxL1ReferenceCount = data.maxL1ReferenceCount; - if (data.maxSubLayersCount !== undefined) this.maxSubLayersCount = data.maxSubLayersCount; - if (data.minLog2MinLumaCodingBlockSizeMinus3 !== undefined) this.minLog2MinLumaCodingBlockSizeMinus3 = data.minLog2MinLumaCodingBlockSizeMinus3; - if (data.maxLog2MinLumaCodingBlockSizeMinus3 !== undefined) this.maxLog2MinLumaCodingBlockSizeMinus3 = data.maxLog2MinLumaCodingBlockSizeMinus3; - if (data.minLog2MinLumaTransformBlockSizeMinus2 !== undefined) this.minLog2MinLumaTransformBlockSizeMinus2 = data.minLog2MinLumaTransformBlockSizeMinus2; - if (data.maxLog2MinLumaTransformBlockSizeMinus2 !== undefined) this.maxLog2MinLumaTransformBlockSizeMinus2 = data.maxLog2MinLumaTransformBlockSizeMinus2; - if (data.minMaxTransformHierarchyDepthInter !== undefined) this.minMaxTransformHierarchyDepthInter = data.minMaxTransformHierarchyDepthInter; - if (data.maxMaxTransformHierarchyDepthInter !== undefined) this.maxMaxTransformHierarchyDepthInter = data.maxMaxTransformHierarchyDepthInter; - if (data.minMaxTransformHierarchyDepthIntra !== undefined) this.minMaxTransformHierarchyDepthIntra = data.minMaxTransformHierarchyDepthIntra; - if (data.maxMaxTransformHierarchyDepthIntra !== undefined) this.maxMaxTransformHierarchyDepthIntra = data.maxMaxTransformHierarchyDepthIntra; - if (data.maxDiffCuQpDeltaDepth !== undefined) this.maxDiffCuQpDeltaDepth = data.maxDiffCuQpDeltaDepth; - if (data.minMaxNumMergeCand !== undefined) this.minMaxNumMergeCand = data.minMaxNumMergeCand; - if (data.maxMaxNumMergeCand !== undefined) this.maxMaxNumMergeCand = data.maxMaxNumMergeCand; - } - this.sType = StructureType.VIDEO_ENCODE_H265_CAPABILITIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: VideoEncodeH265CapabilityFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get inputModeFlags() { - return this.#view.getUint32(20, LE); - } - - set inputModeFlags(value: VideoEncodeH265InputModeFlagsEXT) { - this.#view.setUint32(20, Number(value), LE); - } - - get outputModeFlags() { - return this.#view.getUint32(24, LE); - } - - set outputModeFlags(value: VideoEncodeH265OutputModeFlagsEXT) { - this.#view.setUint32(24, Number(value), LE); - } - - get ctbSizes() { - return this.#view.getUint32(28, LE); - } - - set ctbSizes(value: VideoEncodeH265CtbSizeFlagsEXT) { - this.#view.setUint32(28, Number(value), LE); - } - - get transformBlockSizes() { - return this.#view.getUint32(32, LE); - } - - set transformBlockSizes(value: VideoEncodeH265TransformBlockSizeFlagsEXT) { - this.#view.setUint32(32, Number(value), LE); - } - - get maxPPictureL0ReferenceCount() { - return this.#view.getUint8(36); - } - - set maxPPictureL0ReferenceCount(value: number) { - this.#view.setUint8(36, Number(value)); - } - - get maxBPictureL0ReferenceCount() { - return this.#view.getUint8(37); - } - - set maxBPictureL0ReferenceCount(value: number) { - this.#view.setUint8(37, Number(value)); - } - - get maxL1ReferenceCount() { - return this.#view.getUint8(38); - } - - set maxL1ReferenceCount(value: number) { - this.#view.setUint8(38, Number(value)); - } - - get maxSubLayersCount() { - return this.#view.getUint8(39); - } - - set maxSubLayersCount(value: number) { - this.#view.setUint8(39, Number(value)); - } - - get minLog2MinLumaCodingBlockSizeMinus3() { - return this.#view.getUint8(40); - } - - set minLog2MinLumaCodingBlockSizeMinus3(value: number) { - this.#view.setUint8(40, Number(value)); - } - - get maxLog2MinLumaCodingBlockSizeMinus3() { - return this.#view.getUint8(41); - } - - set maxLog2MinLumaCodingBlockSizeMinus3(value: number) { - this.#view.setUint8(41, Number(value)); - } - - get minLog2MinLumaTransformBlockSizeMinus2() { - return this.#view.getUint8(42); - } - - set minLog2MinLumaTransformBlockSizeMinus2(value: number) { - this.#view.setUint8(42, Number(value)); - } - - get maxLog2MinLumaTransformBlockSizeMinus2() { - return this.#view.getUint8(43); - } - - set maxLog2MinLumaTransformBlockSizeMinus2(value: number) { - this.#view.setUint8(43, Number(value)); - } - - get minMaxTransformHierarchyDepthInter() { - return this.#view.getUint8(44); - } - - set minMaxTransformHierarchyDepthInter(value: number) { - this.#view.setUint8(44, Number(value)); - } - - get maxMaxTransformHierarchyDepthInter() { - return this.#view.getUint8(45); - } - - set maxMaxTransformHierarchyDepthInter(value: number) { - this.#view.setUint8(45, Number(value)); - } - - get minMaxTransformHierarchyDepthIntra() { - return this.#view.getUint8(46); - } - - set minMaxTransformHierarchyDepthIntra(value: number) { - this.#view.setUint8(46, Number(value)); - } - - get maxMaxTransformHierarchyDepthIntra() { - return this.#view.getUint8(47); - } - - set maxMaxTransformHierarchyDepthIntra(value: number) { - this.#view.setUint8(47, Number(value)); - } - - get maxDiffCuQpDeltaDepth() { - return this.#view.getUint8(48); - } - - set maxDiffCuQpDeltaDepth(value: number) { - this.#view.setUint8(48, Number(value)); - } - - get minMaxNumMergeCand() { - return this.#view.getUint8(49); - } - - set minMaxNumMergeCand(value: number) { - this.#view.setUint8(49, Number(value)); - } - - get maxMaxNumMergeCand() { - return this.#view.getUint8(50); - } - - set maxMaxNumMergeCand(value: number) { - this.#view.setUint8(50, Number(value)); - } -} - -export interface InitVideoEncodeH265SessionParametersAddInfoEXT { - pNext?: AnyPointer; - stdVPSCount?: number; - pStdVPSs?: AnyPointer; - stdSPSCount?: number; - pStdSPSs?: AnyPointer; - stdPPSCount?: number; - pStdPPSs?: AnyPointer; -} - -export class VideoEncodeH265SessionParametersAddInfoEXT implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265SessionParametersAddInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265SessionParametersAddInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265SessionParametersAddInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265SessionParametersAddInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265SessionParametersAddInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265SessionParametersAddInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stdVPSCount !== undefined) this.stdVPSCount = data.stdVPSCount; - if (data.pStdVPSs !== undefined) this.pStdVPSs = data.pStdVPSs; - if (data.stdSPSCount !== undefined) this.stdSPSCount = data.stdSPSCount; - if (data.pStdSPSs !== undefined) this.pStdSPSs = data.pStdSPSs; - if (data.stdPPSCount !== undefined) this.stdPPSCount = data.stdPPSCount; - if (data.pStdPPSs !== undefined) this.pStdPPSs = data.pStdPPSs; - } - this.sType = StructureType.VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stdVPSCount() { - return this.#view.getUint32(16, LE); - } - - set stdVPSCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pStdVPSs() { - return this.#view.getBigUint64(24, LE); - } - - set pStdVPSs(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get stdSPSCount() { - return this.#view.getUint32(32, LE); - } - - set stdSPSCount(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get pStdSPSs() { - return this.#view.getBigUint64(40, LE); - } - - set pStdSPSs(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get stdPPSCount() { - return this.#view.getUint32(48, LE); - } - - set stdPPSCount(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get pStdPPSs() { - return this.#view.getBigUint64(56, LE); - } - - set pStdPPSs(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH265SessionParametersCreateInfoEXT { - pNext?: AnyPointer; - maxStdVPSCount?: number; - maxStdSPSCount?: number; - maxStdPPSCount?: number; - pParametersAddInfo?: AnyPointer; -} - -export class VideoEncodeH265SessionParametersCreateInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265SessionParametersCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265SessionParametersCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265SessionParametersCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265SessionParametersCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265SessionParametersCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265SessionParametersCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxStdVPSCount !== undefined) this.maxStdVPSCount = data.maxStdVPSCount; - if (data.maxStdSPSCount !== undefined) this.maxStdSPSCount = data.maxStdSPSCount; - if (data.maxStdPPSCount !== undefined) this.maxStdPPSCount = data.maxStdPPSCount; - if (data.pParametersAddInfo !== undefined) this.pParametersAddInfo = data.pParametersAddInfo; - } - this.sType = StructureType.VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxStdVPSCount() { - return this.#view.getUint32(16, LE); - } - - set maxStdVPSCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxStdSPSCount() { - return this.#view.getUint32(20, LE); - } - - set maxStdSPSCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get maxStdPPSCount() { - return this.#view.getUint32(24, LE); - } - - set maxStdPPSCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pParametersAddInfo() { - return this.#view.getBigUint64(32, LE); - } - - set pParametersAddInfo(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH265VclFrameInfoEXT { - pNext?: AnyPointer; - pReferenceFinalLists?: AnyPointer; - naluSliceSegmentEntryCount?: number; - pNaluSliceSegmentEntries?: AnyPointer; - pCurrentPictureInfo?: AnyPointer; -} - -export class VideoEncodeH265VclFrameInfoEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265VclFrameInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265VclFrameInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265VclFrameInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265VclFrameInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265VclFrameInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265VclFrameInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pReferenceFinalLists !== undefined) this.pReferenceFinalLists = data.pReferenceFinalLists; - if (data.naluSliceSegmentEntryCount !== undefined) this.naluSliceSegmentEntryCount = data.naluSliceSegmentEntryCount; - if (data.pNaluSliceSegmentEntries !== undefined) this.pNaluSliceSegmentEntries = data.pNaluSliceSegmentEntries; - if (data.pCurrentPictureInfo !== undefined) this.pCurrentPictureInfo = data.pCurrentPictureInfo; - } - this.sType = StructureType.VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pReferenceFinalLists() { - return this.#view.getBigUint64(16, LE); - } - - set pReferenceFinalLists(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get naluSliceSegmentEntryCount() { - return this.#view.getUint32(24, LE); - } - - set naluSliceSegmentEntryCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pNaluSliceSegmentEntries() { - return this.#view.getBigUint64(32, LE); - } - - set pNaluSliceSegmentEntries(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get pCurrentPictureInfo() { - return this.#view.getBigUint64(40, LE); - } - - set pCurrentPictureInfo(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH265EmitPictureParametersInfoEXT { - pNext?: AnyPointer; - vpsId?: number; - spsId?: number; - emitVpsEnable?: Bool32; - emitSpsEnable?: Bool32; - ppsIdEntryCount?: number; - ppsIdEntries?: AnyPointer; -} - -export class VideoEncodeH265EmitPictureParametersInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265EmitPictureParametersInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265EmitPictureParametersInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265EmitPictureParametersInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265EmitPictureParametersInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265EmitPictureParametersInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265EmitPictureParametersInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.vpsId !== undefined) this.vpsId = data.vpsId; - if (data.spsId !== undefined) this.spsId = data.spsId; - if (data.emitVpsEnable !== undefined) this.emitVpsEnable = data.emitVpsEnable; - if (data.emitSpsEnable !== undefined) this.emitSpsEnable = data.emitSpsEnable; - if (data.ppsIdEntryCount !== undefined) this.ppsIdEntryCount = data.ppsIdEntryCount; - if (data.ppsIdEntries !== undefined) this.ppsIdEntries = data.ppsIdEntries; - } - this.sType = StructureType.VIDEO_ENCODE_H265_EMIT_PICTURE_PARAMETERS_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get vpsId() { - return this.#view.getUint8(16); - } - - set vpsId(value: number) { - this.#view.setUint8(16, Number(value)); - } - - get spsId() { - return this.#view.getUint8(17); - } - - set spsId(value: number) { - this.#view.setUint8(17, Number(value)); - } - - get emitVpsEnable() { - return this.#view.getUint32(20, LE); - } - - set emitVpsEnable(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get emitSpsEnable() { - return this.#view.getUint32(24, LE); - } - - set emitSpsEnable(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get ppsIdEntryCount() { - return this.#view.getUint32(28, LE); - } - - set ppsIdEntryCount(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get ppsIdEntries() { - return this.#view.getBigUint64(32, LE); - } - - set ppsIdEntries(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH265NaluSliceSegmentInfoEXT { - pNext?: AnyPointer; - ctbCount?: number; - pReferenceFinalLists?: AnyPointer; - pSliceSegmentHeaderStd?: AnyPointer; -} - -export class VideoEncodeH265NaluSliceSegmentInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265NaluSliceSegmentInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265NaluSliceSegmentInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265NaluSliceSegmentInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265NaluSliceSegmentInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265NaluSliceSegmentInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265NaluSliceSegmentInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.ctbCount !== undefined) this.ctbCount = data.ctbCount; - if (data.pReferenceFinalLists !== undefined) this.pReferenceFinalLists = data.pReferenceFinalLists; - if (data.pSliceSegmentHeaderStd !== undefined) this.pSliceSegmentHeaderStd = data.pSliceSegmentHeaderStd; - } - this.sType = StructureType.VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get ctbCount() { - return this.#view.getUint32(16, LE); - } - - set ctbCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pReferenceFinalLists() { - return this.#view.getBigUint64(24, LE); - } - - set pReferenceFinalLists(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get pSliceSegmentHeaderStd() { - return this.#view.getBigUint64(32, LE); - } - - set pSliceSegmentHeaderStd(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH265RateControlInfoEXT { - pNext?: AnyPointer; - gopFrameCount?: number; - idrPeriod?: number; - consecutiveBFrameCount?: number; - rateControlStructure?: VideoEncodeH265RateControlStructureEXT; - subLayerCount?: number; -} - -export class VideoEncodeH265RateControlInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265RateControlInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265RateControlInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265RateControlInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265RateControlInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265RateControlInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265RateControlInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.gopFrameCount !== undefined) this.gopFrameCount = data.gopFrameCount; - if (data.idrPeriod !== undefined) this.idrPeriod = data.idrPeriod; - if (data.consecutiveBFrameCount !== undefined) this.consecutiveBFrameCount = data.consecutiveBFrameCount; - if (data.rateControlStructure !== undefined) this.rateControlStructure = data.rateControlStructure; - if (data.subLayerCount !== undefined) this.subLayerCount = data.subLayerCount; - } - this.sType = StructureType.VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get gopFrameCount() { - return this.#view.getUint32(16, LE); - } - - set gopFrameCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get idrPeriod() { - return this.#view.getUint32(20, LE); - } - - set idrPeriod(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get consecutiveBFrameCount() { - return this.#view.getUint32(24, LE); - } - - set consecutiveBFrameCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get rateControlStructure() { - return this.#view.getUint32(28, LE); - } - - set rateControlStructure(value: VideoEncodeH265RateControlStructureEXT) { - this.#view.setUint32(28, Number(value), LE); - } - - get subLayerCount() { - return this.#view.getUint8(32); - } - - set subLayerCount(value: number) { - this.#view.setUint8(32, Number(value)); - } -} - -export interface InitVideoEncodeH265QpEXT { - qpI?: number; - qpP?: number; - qpB?: number; -} - -export class VideoEncodeH265QpEXT implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265QpEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265QpEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265QpEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265QpEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265QpEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265QpEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.qpI !== undefined) this.qpI = data.qpI; - if (data.qpP !== undefined) this.qpP = data.qpP; - if (data.qpB !== undefined) this.qpB = data.qpB; - } - } - - get qpI() { - return this.#view.getInt32(0, LE); - } - - set qpI(value: number) { - this.#view.setInt32(0, Number(value), LE); - } - - get qpP() { - return this.#view.getInt32(4, LE); - } - - set qpP(value: number) { - this.#view.setInt32(4, Number(value), LE); - } - - get qpB() { - return this.#view.getInt32(8, LE); - } - - set qpB(value: number) { - this.#view.setInt32(8, Number(value), LE); - } -} - -export interface InitVideoEncodeH265FrameSizeEXT { - frameISize?: number; - framePSize?: number; - frameBSize?: number; -} - -export class VideoEncodeH265FrameSizeEXT implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265FrameSizeEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265FrameSizeEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265FrameSizeEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265FrameSizeEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265FrameSizeEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265FrameSizeEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.frameISize !== undefined) this.frameISize = data.frameISize; - if (data.framePSize !== undefined) this.framePSize = data.framePSize; - if (data.frameBSize !== undefined) this.frameBSize = data.frameBSize; - } - } - - get frameISize() { - return this.#view.getUint32(0, LE); - } - - set frameISize(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get framePSize() { - return this.#view.getUint32(4, LE); - } - - set framePSize(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get frameBSize() { - return this.#view.getUint32(8, LE); - } - - set frameBSize(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitVideoEncodeH265RateControlLayerInfoEXT { - pNext?: AnyPointer; - temporalId?: number; - useInitialRcQp?: Bool32; - initialRcQp?: VideoEncodeH265QpEXT; - useMinQp?: Bool32; - minQp?: VideoEncodeH265QpEXT; - useMaxQp?: Bool32; - maxQp?: VideoEncodeH265QpEXT; - useMaxFrameSize?: Bool32; - maxFrameSize?: VideoEncodeH265FrameSizeEXT; -} - -export class VideoEncodeH265RateControlLayerInfoEXT implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265RateControlLayerInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265RateControlLayerInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265RateControlLayerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265RateControlLayerInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265RateControlLayerInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265RateControlLayerInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.temporalId !== undefined) this.temporalId = data.temporalId; - if (data.useInitialRcQp !== undefined) this.useInitialRcQp = data.useInitialRcQp; - if (data.initialRcQp !== undefined) this.initialRcQp = data.initialRcQp; - if (data.useMinQp !== undefined) this.useMinQp = data.useMinQp; - if (data.minQp !== undefined) this.minQp = data.minQp; - if (data.useMaxQp !== undefined) this.useMaxQp = data.useMaxQp; - if (data.maxQp !== undefined) this.maxQp = data.maxQp; - if (data.useMaxFrameSize !== undefined) this.useMaxFrameSize = data.useMaxFrameSize; - if (data.maxFrameSize !== undefined) this.maxFrameSize = data.maxFrameSize; - } - this.sType = StructureType.VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get temporalId() { - return this.#view.getUint8(16); - } - - set temporalId(value: number) { - this.#view.setUint8(16, Number(value)); - } - - get useInitialRcQp() { - return this.#view.getUint32(20, LE); - } - - set useInitialRcQp(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get initialRcQp() { - return new VideoEncodeH265QpEXT(this.#data.subarray(24, 24 + VideoEncodeH265QpEXT.size)); - } - - set initialRcQp(value: VideoEncodeH265QpEXT) { - if (value[BUFFER].byteLength < VideoEncodeH265QpEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get useMinQp() { - return this.#view.getUint32(36, LE); - } - - set useMinQp(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get minQp() { - return new VideoEncodeH265QpEXT(this.#data.subarray(40, 40 + VideoEncodeH265QpEXT.size)); - } - - set minQp(value: VideoEncodeH265QpEXT) { - if (value[BUFFER].byteLength < VideoEncodeH265QpEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } - - get useMaxQp() { - return this.#view.getUint32(52, LE); - } - - set useMaxQp(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get maxQp() { - return new VideoEncodeH265QpEXT(this.#data.subarray(56, 56 + VideoEncodeH265QpEXT.size)); - } - - set maxQp(value: VideoEncodeH265QpEXT) { - if (value[BUFFER].byteLength < VideoEncodeH265QpEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 56); - } - - get useMaxFrameSize() { - return this.#view.getUint32(68, LE); - } - - set useMaxFrameSize(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get maxFrameSize() { - return new VideoEncodeH265FrameSizeEXT(this.#data.subarray(72, 72 + VideoEncodeH265FrameSizeEXT.size)); - } - - set maxFrameSize(value: VideoEncodeH265FrameSizeEXT) { - if (value[BUFFER].byteLength < VideoEncodeH265FrameSizeEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 72); - } -} - -export interface InitVideoEncodeH265ProfileInfoEXT { - pNext?: AnyPointer; - stdProfileIdc?: StdVideoH265ProfileIdc; -} - -export class VideoEncodeH265ProfileInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265ProfileInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265ProfileInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265ProfileInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265ProfileInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265ProfileInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265ProfileInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.stdProfileIdc !== undefined) this.stdProfileIdc = data.stdProfileIdc; - } - this.sType = StructureType.VIDEO_ENCODE_H265_PROFILE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get stdProfileIdc() { - return this.#view.getUint32(16, LE); - } - - set stdProfileIdc(value: StdVideoH265ProfileIdc) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitVideoEncodeH265DpbSlotInfoEXT { - pNext?: AnyPointer; - slotIndex?: number; - pStdReferenceInfo?: AnyPointer; -} - -export class VideoEncodeH265DpbSlotInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265DpbSlotInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265DpbSlotInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265DpbSlotInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265DpbSlotInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265DpbSlotInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265DpbSlotInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.slotIndex !== undefined) this.slotIndex = data.slotIndex; - if (data.pStdReferenceInfo !== undefined) this.pStdReferenceInfo = data.pStdReferenceInfo; - } - this.sType = StructureType.VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get slotIndex() { - return this.#view.getInt8(16); - } - - set slotIndex(value: number) { - this.#view.setInt8(16, Number(value)); - } - - get pStdReferenceInfo() { - return this.#view.getBigUint64(24, LE); - } - - set pStdReferenceInfo(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitVideoEncodeH265ReferenceListsInfoEXT { - pNext?: AnyPointer; - referenceList0EntryCount?: number; - pReferenceList0Entries?: AnyPointer; - referenceList1EntryCount?: number; - pReferenceList1Entries?: AnyPointer; - pReferenceModifications?: AnyPointer; -} - -export class VideoEncodeH265ReferenceListsInfoEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitVideoEncodeH265ReferenceListsInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitVideoEncodeH265ReferenceListsInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(VideoEncodeH265ReferenceListsInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, VideoEncodeH265ReferenceListsInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < VideoEncodeH265ReferenceListsInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(VideoEncodeH265ReferenceListsInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.referenceList0EntryCount !== undefined) this.referenceList0EntryCount = data.referenceList0EntryCount; - if (data.pReferenceList0Entries !== undefined) this.pReferenceList0Entries = data.pReferenceList0Entries; - if (data.referenceList1EntryCount !== undefined) this.referenceList1EntryCount = data.referenceList1EntryCount; - if (data.pReferenceList1Entries !== undefined) this.pReferenceList1Entries = data.pReferenceList1Entries; - if (data.pReferenceModifications !== undefined) this.pReferenceModifications = data.pReferenceModifications; - } - this.sType = StructureType.VIDEO_ENCODE_H265_REFERENCE_LISTS_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get referenceList0EntryCount() { - return this.#view.getUint8(16); - } - - set referenceList0EntryCount(value: number) { - this.#view.setUint8(16, Number(value)); - } - - get pReferenceList0Entries() { - return this.#view.getBigUint64(24, LE); - } - - set pReferenceList0Entries(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get referenceList1EntryCount() { - return this.#view.getUint8(32); - } - - set referenceList1EntryCount(value: number) { - this.#view.setUint8(32, Number(value)); - } - - get pReferenceList1Entries() { - return this.#view.getBigUint64(40, LE); - } - - set pReferenceList1Entries(value: AnyPointer) { - this.#view.setBigUint64(40, BigInt(anyPointer(value)), LE); - } - - get pReferenceModifications() { - return this.#view.getBigUint64(48, LE); - } - - set pReferenceModifications(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceInheritedViewportScissorFeaturesNV { - pNext?: AnyPointer; - inheritedViewportScissor2D?: Bool32; -} - -export class PhysicalDeviceInheritedViewportScissorFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceInheritedViewportScissorFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceInheritedViewportScissorFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceInheritedViewportScissorFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceInheritedViewportScissorFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceInheritedViewportScissorFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceInheritedViewportScissorFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.inheritedViewportScissor2D !== undefined) this.inheritedViewportScissor2D = data.inheritedViewportScissor2D; - } - this.sType = StructureType.PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get inheritedViewportScissor2D() { - return this.#view.getUint32(16, LE); - } - - set inheritedViewportScissor2D(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitCommandBufferInheritanceViewportScissorInfoNV { - pNext?: AnyPointer; - viewportScissor2D?: Bool32; - viewportDepthCount?: number; - pViewportDepths?: AnyPointer; -} - -export class CommandBufferInheritanceViewportScissorInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCommandBufferInheritanceViewportScissorInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceViewportScissorInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(CommandBufferInheritanceViewportScissorInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceViewportScissorInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceViewportScissorInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CommandBufferInheritanceViewportScissorInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.viewportScissor2D !== undefined) this.viewportScissor2D = data.viewportScissor2D; - if (data.viewportDepthCount !== undefined) this.viewportDepthCount = data.viewportDepthCount; - if (data.pViewportDepths !== undefined) this.pViewportDepths = data.pViewportDepths; - } - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get viewportScissor2D() { - return this.#view.getUint32(16, LE); - } - - set viewportScissor2D(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get viewportDepthCount() { - return this.#view.getUint32(20, LE); - } - - set viewportDepthCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pViewportDepths() { - return this.#view.getBigUint64(24, LE); - } - - set pViewportDepths(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT { - pNext?: AnyPointer; - ycbcr2plane444Formats?: Bool32; -} - -export class PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.ycbcr2plane444Formats !== undefined) this.ycbcr2plane444Formats = data.ycbcr2plane444Formats; - } - this.sType = StructureType.PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get ycbcr2plane444Formats() { - return this.#view.getUint32(16, LE); - } - - set ycbcr2plane444Formats(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceProvokingVertexFeaturesEXT { - pNext?: AnyPointer; - provokingVertexLast?: Bool32; - transformFeedbackPreservesProvokingVertex?: Bool32; -} - -export class PhysicalDeviceProvokingVertexFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceProvokingVertexFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProvokingVertexFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceProvokingVertexFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProvokingVertexFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProvokingVertexFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceProvokingVertexFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.provokingVertexLast !== undefined) this.provokingVertexLast = data.provokingVertexLast; - if (data.transformFeedbackPreservesProvokingVertex !== undefined) this.transformFeedbackPreservesProvokingVertex = data.transformFeedbackPreservesProvokingVertex; - } - this.sType = StructureType.PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get provokingVertexLast() { - return this.#view.getUint32(16, LE); - } - - set provokingVertexLast(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get transformFeedbackPreservesProvokingVertex() { - return this.#view.getUint32(20, LE); - } - - set transformFeedbackPreservesProvokingVertex(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceProvokingVertexPropertiesEXT { - pNext?: AnyPointer; - provokingVertexModePerPipeline?: Bool32; - transformFeedbackPreservesTriangleFanProvokingVertex?: Bool32; -} - -export class PhysicalDeviceProvokingVertexPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceProvokingVertexPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceProvokingVertexPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceProvokingVertexPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceProvokingVertexPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceProvokingVertexPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceProvokingVertexPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.provokingVertexModePerPipeline !== undefined) this.provokingVertexModePerPipeline = data.provokingVertexModePerPipeline; - if (data.transformFeedbackPreservesTriangleFanProvokingVertex !== undefined) this.transformFeedbackPreservesTriangleFanProvokingVertex = data.transformFeedbackPreservesTriangleFanProvokingVertex; - } - this.sType = StructureType.PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get provokingVertexModePerPipeline() { - return this.#view.getUint32(16, LE); - } - - set provokingVertexModePerPipeline(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get transformFeedbackPreservesTriangleFanProvokingVertex() { - return this.#view.getUint32(20, LE); - } - - set transformFeedbackPreservesTriangleFanProvokingVertex(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPipelineRasterizationProvokingVertexStateCreateInfoEXT { - pNext?: AnyPointer; - provokingVertexMode?: ProvokingVertexModeEXT; -} - -export class PipelineRasterizationProvokingVertexStateCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRasterizationProvokingVertexStateCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRasterizationProvokingVertexStateCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRasterizationProvokingVertexStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRasterizationProvokingVertexStateCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRasterizationProvokingVertexStateCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRasterizationProvokingVertexStateCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.provokingVertexMode !== undefined) this.provokingVertexMode = data.provokingVertexMode; - } - this.sType = StructureType.PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get provokingVertexMode() { - return this.#view.getUint32(16, LE); - } - - set provokingVertexMode(value: ProvokingVertexModeEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitCuModuleCreateInfoNVX { - pNext?: AnyPointer; - dataSize?: Deno.PointerValue; - pData?: AnyPointer; -} - -export class CuModuleCreateInfoNVX implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCuModuleCreateInfoNVX); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCuModuleCreateInfoNVX) { - if (data === undefined) { - this.#data = new Uint8Array(CuModuleCreateInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CuModuleCreateInfoNVX.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CuModuleCreateInfoNVX.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CuModuleCreateInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.dataSize !== undefined) this.dataSize = data.dataSize; - if (data.pData !== undefined) this.pData = data.pData; - } - this.sType = StructureType.CU_MODULE_CREATE_INFO_NVX; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dataSize() { - return this.#view.getBigUint64(16, LE); - } - - set dataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get pData() { - return this.#view.getBigUint64(24, LE); - } - - set pData(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitCuFunctionCreateInfoNVX { - pNext?: AnyPointer; - module?: CuModuleNVX; - pName?: AnyPointer; -} - -export class CuFunctionCreateInfoNVX implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCuFunctionCreateInfoNVX); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCuFunctionCreateInfoNVX) { - if (data === undefined) { - this.#data = new Uint8Array(CuFunctionCreateInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CuFunctionCreateInfoNVX.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CuFunctionCreateInfoNVX.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CuFunctionCreateInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.module !== undefined) this.module = data.module; - if (data.pName !== undefined) this.pName = data.pName; - } - this.sType = StructureType.CU_FUNCTION_CREATE_INFO_NVX; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get module() { - return this.#view.getBigUint64(16, LE); - } - - set module(value: CuModuleNVX) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get pName() { - return this.#view.getBigUint64(24, LE); - } - - set pName(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitCuLaunchInfoNVX { - pNext?: AnyPointer; - vk_function?: CuFunctionNVX; - gridDimX?: number; - gridDimY?: number; - gridDimZ?: number; - blockDimX?: number; - blockDimY?: number; - blockDimZ?: number; - sharedMemBytes?: number; - paramCount?: Deno.PointerValue; - pParams?: AnyPointer; - extraCount?: Deno.PointerValue; - pExtras?: AnyPointer; -} - -export class CuLaunchInfoNVX implements BaseStruct { - static size = 88; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCuLaunchInfoNVX); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCuLaunchInfoNVX) { - if (data === undefined) { - this.#data = new Uint8Array(CuLaunchInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CuLaunchInfoNVX.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CuLaunchInfoNVX.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CuLaunchInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.vk_function !== undefined) this.vk_function = data.vk_function; - if (data.gridDimX !== undefined) this.gridDimX = data.gridDimX; - if (data.gridDimY !== undefined) this.gridDimY = data.gridDimY; - if (data.gridDimZ !== undefined) this.gridDimZ = data.gridDimZ; - if (data.blockDimX !== undefined) this.blockDimX = data.blockDimX; - if (data.blockDimY !== undefined) this.blockDimY = data.blockDimY; - if (data.blockDimZ !== undefined) this.blockDimZ = data.blockDimZ; - if (data.sharedMemBytes !== undefined) this.sharedMemBytes = data.sharedMemBytes; - if (data.paramCount !== undefined) this.paramCount = data.paramCount; - if (data.pParams !== undefined) this.pParams = data.pParams; - if (data.extraCount !== undefined) this.extraCount = data.extraCount; - if (data.pExtras !== undefined) this.pExtras = data.pExtras; - } - this.sType = StructureType.CU_LAUNCH_INFO_NVX; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get vk_function() { - return this.#view.getBigUint64(16, LE); - } - - set vk_function(value: CuFunctionNVX) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get gridDimX() { - return this.#view.getUint32(24, LE); - } - - set gridDimX(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get gridDimY() { - return this.#view.getUint32(28, LE); - } - - set gridDimY(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get gridDimZ() { - return this.#view.getUint32(32, LE); - } - - set gridDimZ(value: number) { - this.#view.setUint32(32, Number(value), LE); - } - - get blockDimX() { - return this.#view.getUint32(36, LE); - } - - set blockDimX(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get blockDimY() { - return this.#view.getUint32(40, LE); - } - - set blockDimY(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get blockDimZ() { - return this.#view.getUint32(44, LE); - } - - set blockDimZ(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get sharedMemBytes() { - return this.#view.getUint32(48, LE); - } - - set sharedMemBytes(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get paramCount() { - return this.#view.getBigUint64(56, LE); - } - - set paramCount(value: Deno.PointerValue) { - this.#view.setBigUint64(56, BigInt(value), LE); - } - - get pParams() { - return this.#view.getBigUint64(64, LE); - } - - set pParams(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } - - get extraCount() { - return this.#view.getBigUint64(72, LE); - } - - set extraCount(value: Deno.PointerValue) { - this.#view.setBigUint64(72, BigInt(value), LE); - } - - get pExtras() { - return this.#view.getBigUint64(80, LE); - } - - set pExtras(value: AnyPointer) { - this.#view.setBigUint64(80, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceDescriptorBufferFeaturesEXT { - pNext?: AnyPointer; - descriptorBuffer?: Bool32; - descriptorBufferCaptureReplay?: Bool32; - descriptorBufferImageLayoutIgnored?: Bool32; - descriptorBufferPushDescriptors?: Bool32; -} - -export class PhysicalDeviceDescriptorBufferFeaturesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDescriptorBufferFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorBufferFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorBufferFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorBufferFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.descriptorBuffer !== undefined) this.descriptorBuffer = data.descriptorBuffer; - if (data.descriptorBufferCaptureReplay !== undefined) this.descriptorBufferCaptureReplay = data.descriptorBufferCaptureReplay; - if (data.descriptorBufferImageLayoutIgnored !== undefined) this.descriptorBufferImageLayoutIgnored = data.descriptorBufferImageLayoutIgnored; - if (data.descriptorBufferPushDescriptors !== undefined) this.descriptorBufferPushDescriptors = data.descriptorBufferPushDescriptors; - } - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get descriptorBuffer() { - return this.#view.getUint32(16, LE); - } - - set descriptorBuffer(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get descriptorBufferCaptureReplay() { - return this.#view.getUint32(20, LE); - } - - set descriptorBufferCaptureReplay(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get descriptorBufferImageLayoutIgnored() { - return this.#view.getUint32(24, LE); - } - - set descriptorBufferImageLayoutIgnored(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get descriptorBufferPushDescriptors() { - return this.#view.getUint32(28, LE); - } - - set descriptorBufferPushDescriptors(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDescriptorBufferPropertiesEXT { - pNext?: AnyPointer; - combinedImageSamplerDescriptorSingleArray?: Bool32; - bufferlessPushDescriptors?: Bool32; - allowSamplerImageViewPostSubmitCreation?: Bool32; - descriptorBufferOffsetAlignment?: DeviceSize; - maxDescriptorBufferBindings?: number; - maxResourceDescriptorBufferBindings?: number; - maxSamplerDescriptorBufferBindings?: number; - maxEmbeddedImmutableSamplerBindings?: number; - maxEmbeddedImmutableSamplers?: number; - bufferCaptureReplayDescriptorDataSize?: Deno.PointerValue; - imageCaptureReplayDescriptorDataSize?: Deno.PointerValue; - imageViewCaptureReplayDescriptorDataSize?: Deno.PointerValue; - samplerCaptureReplayDescriptorDataSize?: Deno.PointerValue; - accelerationStructureCaptureReplayDescriptorDataSize?: Deno.PointerValue; - samplerDescriptorSize?: Deno.PointerValue; - combinedImageSamplerDescriptorSize?: Deno.PointerValue; - sampledImageDescriptorSize?: Deno.PointerValue; - storageImageDescriptorSize?: Deno.PointerValue; - uniformTexelBufferDescriptorSize?: Deno.PointerValue; - robustUniformTexelBufferDescriptorSize?: Deno.PointerValue; - storageTexelBufferDescriptorSize?: Deno.PointerValue; - robustStorageTexelBufferDescriptorSize?: Deno.PointerValue; - uniformBufferDescriptorSize?: Deno.PointerValue; - robustUniformBufferDescriptorSize?: Deno.PointerValue; - storageBufferDescriptorSize?: Deno.PointerValue; - robustStorageBufferDescriptorSize?: Deno.PointerValue; - inputAttachmentDescriptorSize?: Deno.PointerValue; - accelerationStructureDescriptorSize?: Deno.PointerValue; - maxSamplerDescriptorBufferRange?: DeviceSize; - maxResourceDescriptorBufferRange?: DeviceSize; - samplerDescriptorBufferAddressSpaceSize?: DeviceSize; - resourceDescriptorBufferAddressSpaceSize?: DeviceSize; - descriptorBufferAddressSpaceSize?: DeviceSize; -} - -export class PhysicalDeviceDescriptorBufferPropertiesEXT implements BaseStruct { - static size = 256; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDescriptorBufferPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorBufferPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorBufferPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorBufferPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.combinedImageSamplerDescriptorSingleArray !== undefined) this.combinedImageSamplerDescriptorSingleArray = data.combinedImageSamplerDescriptorSingleArray; - if (data.bufferlessPushDescriptors !== undefined) this.bufferlessPushDescriptors = data.bufferlessPushDescriptors; - if (data.allowSamplerImageViewPostSubmitCreation !== undefined) this.allowSamplerImageViewPostSubmitCreation = data.allowSamplerImageViewPostSubmitCreation; - if (data.descriptorBufferOffsetAlignment !== undefined) this.descriptorBufferOffsetAlignment = data.descriptorBufferOffsetAlignment; - if (data.maxDescriptorBufferBindings !== undefined) this.maxDescriptorBufferBindings = data.maxDescriptorBufferBindings; - if (data.maxResourceDescriptorBufferBindings !== undefined) this.maxResourceDescriptorBufferBindings = data.maxResourceDescriptorBufferBindings; - if (data.maxSamplerDescriptorBufferBindings !== undefined) this.maxSamplerDescriptorBufferBindings = data.maxSamplerDescriptorBufferBindings; - if (data.maxEmbeddedImmutableSamplerBindings !== undefined) this.maxEmbeddedImmutableSamplerBindings = data.maxEmbeddedImmutableSamplerBindings; - if (data.maxEmbeddedImmutableSamplers !== undefined) this.maxEmbeddedImmutableSamplers = data.maxEmbeddedImmutableSamplers; - if (data.bufferCaptureReplayDescriptorDataSize !== undefined) this.bufferCaptureReplayDescriptorDataSize = data.bufferCaptureReplayDescriptorDataSize; - if (data.imageCaptureReplayDescriptorDataSize !== undefined) this.imageCaptureReplayDescriptorDataSize = data.imageCaptureReplayDescriptorDataSize; - if (data.imageViewCaptureReplayDescriptorDataSize !== undefined) this.imageViewCaptureReplayDescriptorDataSize = data.imageViewCaptureReplayDescriptorDataSize; - if (data.samplerCaptureReplayDescriptorDataSize !== undefined) this.samplerCaptureReplayDescriptorDataSize = data.samplerCaptureReplayDescriptorDataSize; - if (data.accelerationStructureCaptureReplayDescriptorDataSize !== undefined) this.accelerationStructureCaptureReplayDescriptorDataSize = data.accelerationStructureCaptureReplayDescriptorDataSize; - if (data.samplerDescriptorSize !== undefined) this.samplerDescriptorSize = data.samplerDescriptorSize; - if (data.combinedImageSamplerDescriptorSize !== undefined) this.combinedImageSamplerDescriptorSize = data.combinedImageSamplerDescriptorSize; - if (data.sampledImageDescriptorSize !== undefined) this.sampledImageDescriptorSize = data.sampledImageDescriptorSize; - if (data.storageImageDescriptorSize !== undefined) this.storageImageDescriptorSize = data.storageImageDescriptorSize; - if (data.uniformTexelBufferDescriptorSize !== undefined) this.uniformTexelBufferDescriptorSize = data.uniformTexelBufferDescriptorSize; - if (data.robustUniformTexelBufferDescriptorSize !== undefined) this.robustUniformTexelBufferDescriptorSize = data.robustUniformTexelBufferDescriptorSize; - if (data.storageTexelBufferDescriptorSize !== undefined) this.storageTexelBufferDescriptorSize = data.storageTexelBufferDescriptorSize; - if (data.robustStorageTexelBufferDescriptorSize !== undefined) this.robustStorageTexelBufferDescriptorSize = data.robustStorageTexelBufferDescriptorSize; - if (data.uniformBufferDescriptorSize !== undefined) this.uniformBufferDescriptorSize = data.uniformBufferDescriptorSize; - if (data.robustUniformBufferDescriptorSize !== undefined) this.robustUniformBufferDescriptorSize = data.robustUniformBufferDescriptorSize; - if (data.storageBufferDescriptorSize !== undefined) this.storageBufferDescriptorSize = data.storageBufferDescriptorSize; - if (data.robustStorageBufferDescriptorSize !== undefined) this.robustStorageBufferDescriptorSize = data.robustStorageBufferDescriptorSize; - if (data.inputAttachmentDescriptorSize !== undefined) this.inputAttachmentDescriptorSize = data.inputAttachmentDescriptorSize; - if (data.accelerationStructureDescriptorSize !== undefined) this.accelerationStructureDescriptorSize = data.accelerationStructureDescriptorSize; - if (data.maxSamplerDescriptorBufferRange !== undefined) this.maxSamplerDescriptorBufferRange = data.maxSamplerDescriptorBufferRange; - if (data.maxResourceDescriptorBufferRange !== undefined) this.maxResourceDescriptorBufferRange = data.maxResourceDescriptorBufferRange; - if (data.samplerDescriptorBufferAddressSpaceSize !== undefined) this.samplerDescriptorBufferAddressSpaceSize = data.samplerDescriptorBufferAddressSpaceSize; - if (data.resourceDescriptorBufferAddressSpaceSize !== undefined) this.resourceDescriptorBufferAddressSpaceSize = data.resourceDescriptorBufferAddressSpaceSize; - if (data.descriptorBufferAddressSpaceSize !== undefined) this.descriptorBufferAddressSpaceSize = data.descriptorBufferAddressSpaceSize; - } - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get combinedImageSamplerDescriptorSingleArray() { - return this.#view.getUint32(16, LE); - } - - set combinedImageSamplerDescriptorSingleArray(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get bufferlessPushDescriptors() { - return this.#view.getUint32(20, LE); - } - - set bufferlessPushDescriptors(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get allowSamplerImageViewPostSubmitCreation() { - return this.#view.getUint32(24, LE); - } - - set allowSamplerImageViewPostSubmitCreation(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get descriptorBufferOffsetAlignment() { - return this.#view.getBigUint64(32, LE); - } - - set descriptorBufferOffsetAlignment(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get maxDescriptorBufferBindings() { - return this.#view.getUint32(40, LE); - } - - set maxDescriptorBufferBindings(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get maxResourceDescriptorBufferBindings() { - return this.#view.getUint32(44, LE); - } - - set maxResourceDescriptorBufferBindings(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get maxSamplerDescriptorBufferBindings() { - return this.#view.getUint32(48, LE); - } - - set maxSamplerDescriptorBufferBindings(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get maxEmbeddedImmutableSamplerBindings() { - return this.#view.getUint32(52, LE); - } - - set maxEmbeddedImmutableSamplerBindings(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get maxEmbeddedImmutableSamplers() { - return this.#view.getUint32(56, LE); - } - - set maxEmbeddedImmutableSamplers(value: number) { - this.#view.setUint32(56, Number(value), LE); - } - - get bufferCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(64, LE); - } - - set bufferCaptureReplayDescriptorDataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(64, BigInt(value), LE); - } - - get imageCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(72, LE); - } - - set imageCaptureReplayDescriptorDataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(72, BigInt(value), LE); - } - - get imageViewCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(80, LE); - } - - set imageViewCaptureReplayDescriptorDataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(80, BigInt(value), LE); - } - - get samplerCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(88, LE); - } - - set samplerCaptureReplayDescriptorDataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(88, BigInt(value), LE); - } - - get accelerationStructureCaptureReplayDescriptorDataSize() { - return this.#view.getBigUint64(96, LE); - } - - set accelerationStructureCaptureReplayDescriptorDataSize(value: Deno.PointerValue) { - this.#view.setBigUint64(96, BigInt(value), LE); - } - - get samplerDescriptorSize() { - return this.#view.getBigUint64(104, LE); - } - - set samplerDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(104, BigInt(value), LE); - } - - get combinedImageSamplerDescriptorSize() { - return this.#view.getBigUint64(112, LE); - } - - set combinedImageSamplerDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(112, BigInt(value), LE); - } - - get sampledImageDescriptorSize() { - return this.#view.getBigUint64(120, LE); - } - - set sampledImageDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(120, BigInt(value), LE); - } - - get storageImageDescriptorSize() { - return this.#view.getBigUint64(128, LE); - } - - set storageImageDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(128, BigInt(value), LE); - } - - get uniformTexelBufferDescriptorSize() { - return this.#view.getBigUint64(136, LE); - } - - set uniformTexelBufferDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(136, BigInt(value), LE); - } - - get robustUniformTexelBufferDescriptorSize() { - return this.#view.getBigUint64(144, LE); - } - - set robustUniformTexelBufferDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(144, BigInt(value), LE); - } - - get storageTexelBufferDescriptorSize() { - return this.#view.getBigUint64(152, LE); - } - - set storageTexelBufferDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(152, BigInt(value), LE); - } - - get robustStorageTexelBufferDescriptorSize() { - return this.#view.getBigUint64(160, LE); - } - - set robustStorageTexelBufferDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(160, BigInt(value), LE); - } - - get uniformBufferDescriptorSize() { - return this.#view.getBigUint64(168, LE); - } - - set uniformBufferDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(168, BigInt(value), LE); - } - - get robustUniformBufferDescriptorSize() { - return this.#view.getBigUint64(176, LE); - } - - set robustUniformBufferDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(176, BigInt(value), LE); - } - - get storageBufferDescriptorSize() { - return this.#view.getBigUint64(184, LE); - } - - set storageBufferDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(184, BigInt(value), LE); - } - - get robustStorageBufferDescriptorSize() { - return this.#view.getBigUint64(192, LE); - } - - set robustStorageBufferDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(192, BigInt(value), LE); - } - - get inputAttachmentDescriptorSize() { - return this.#view.getBigUint64(200, LE); - } - - set inputAttachmentDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(200, BigInt(value), LE); - } - - get accelerationStructureDescriptorSize() { - return this.#view.getBigUint64(208, LE); - } - - set accelerationStructureDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(208, BigInt(value), LE); - } - - get maxSamplerDescriptorBufferRange() { - return this.#view.getBigUint64(216, LE); - } - - set maxSamplerDescriptorBufferRange(value: DeviceSize) { - this.#view.setBigUint64(216, BigInt(value), LE); - } - - get maxResourceDescriptorBufferRange() { - return this.#view.getBigUint64(224, LE); - } - - set maxResourceDescriptorBufferRange(value: DeviceSize) { - this.#view.setBigUint64(224, BigInt(value), LE); - } - - get samplerDescriptorBufferAddressSpaceSize() { - return this.#view.getBigUint64(232, LE); - } - - set samplerDescriptorBufferAddressSpaceSize(value: DeviceSize) { - this.#view.setBigUint64(232, BigInt(value), LE); - } - - get resourceDescriptorBufferAddressSpaceSize() { - return this.#view.getBigUint64(240, LE); - } - - set resourceDescriptorBufferAddressSpaceSize(value: DeviceSize) { - this.#view.setBigUint64(240, BigInt(value), LE); - } - - get descriptorBufferAddressSpaceSize() { - return this.#view.getBigUint64(248, LE); - } - - set descriptorBufferAddressSpaceSize(value: DeviceSize) { - this.#view.setBigUint64(248, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT { - pNext?: AnyPointer; - combinedImageSamplerDensityMapDescriptorSize?: Deno.PointerValue; -} - -export class PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDescriptorBufferDensityMapPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.combinedImageSamplerDensityMapDescriptorSize !== undefined) this.combinedImageSamplerDensityMapDescriptorSize = data.combinedImageSamplerDensityMapDescriptorSize; - } - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_DENSITY_MAP_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get combinedImageSamplerDensityMapDescriptorSize() { - return this.#view.getBigUint64(16, LE); - } - - set combinedImageSamplerDensityMapDescriptorSize(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitDescriptorAddressInfoEXT { - pNext?: AnyPointer; - address?: DeviceAddress; - range?: DeviceSize; - format?: Format; -} - -export class DescriptorAddressInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorAddressInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorAddressInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorAddressInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorAddressInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorAddressInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorAddressInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.address !== undefined) this.address = data.address; - if (data.range !== undefined) this.range = data.range; - if (data.format !== undefined) this.format = data.format; - } - this.sType = StructureType.DESCRIPTOR_ADDRESS_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get address() { - return this.#view.getBigUint64(16, LE); - } - - set address(value: DeviceAddress) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get range() { - return this.#view.getBigUint64(24, LE); - } - - set range(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get format() { - return this.#view.getUint32(32, LE); - } - - set format(value: Format) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitDescriptorBufferBindingInfoEXT { - pNext?: AnyPointer; - address?: DeviceAddress; - usage?: BufferUsageFlags; -} - -export class DescriptorBufferBindingInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorBufferBindingInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorBufferBindingInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorBufferBindingInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorBufferBindingInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorBufferBindingInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorBufferBindingInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.address !== undefined) this.address = data.address; - if (data.usage !== undefined) this.usage = data.usage; - } - this.sType = StructureType.DESCRIPTOR_BUFFER_BINDING_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get address() { - return this.#view.getBigUint64(16, LE); - } - - set address(value: DeviceAddress) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get usage() { - return this.#view.getUint32(24, LE); - } - - set usage(value: BufferUsageFlags) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitDescriptorBufferBindingPushDescriptorBufferHandleEXT { - pNext?: AnyPointer; - buffer?: Buffer; -} - -export class DescriptorBufferBindingPushDescriptorBufferHandleEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorBufferBindingPushDescriptorBufferHandleEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorBufferBindingPushDescriptorBufferHandleEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorBufferBindingPushDescriptorBufferHandleEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorBufferBindingPushDescriptorBufferHandleEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorBufferBindingPushDescriptorBufferHandleEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorBufferBindingPushDescriptorBufferHandleEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.buffer !== undefined) this.buffer = data.buffer; - } - this.sType = StructureType.DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get buffer() { - return this.#view.getBigUint64(16, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDescriptorGetInfoEXT { - pNext?: AnyPointer; - type?: DescriptorType; - data?: DescriptorDataEXT; -} - -export class DescriptorGetInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorGetInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorGetInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorGetInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorGetInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorGetInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorGetInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.type !== undefined) this.type = data.type; - if (data.data !== undefined) this.data = data.data; - } - this.sType = StructureType.DESCRIPTOR_GET_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get type() { - return this.#view.getUint32(16, LE); - } - - set type(value: DescriptorType) { - this.#view.setUint32(16, Number(value), LE); - } - - get data() { - throw new Error(`Unknown type: {"union":["buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","u64"]}`); - } - - set data(value: DescriptorDataEXT) { - throw new Error(`Unknown type: {"union":["buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","buffer","u64"]}`); - } -} - -export interface InitBufferCaptureDescriptorDataInfoEXT { - pNext?: AnyPointer; - buffer?: Buffer; -} - -export class BufferCaptureDescriptorDataInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferCaptureDescriptorDataInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCaptureDescriptorDataInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(BufferCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCaptureDescriptorDataInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCaptureDescriptorDataInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.buffer !== undefined) this.buffer = data.buffer; - } - this.sType = StructureType.BUFFER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get buffer() { - return this.#view.getBigUint64(16, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageCaptureDescriptorDataInfoEXT { - pNext?: AnyPointer; - image?: Image; -} - -export class ImageCaptureDescriptorDataInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageCaptureDescriptorDataInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageCaptureDescriptorDataInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCaptureDescriptorDataInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCaptureDescriptorDataInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.image !== undefined) this.image = data.image; - } - this.sType = StructureType.IMAGE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get image() { - return this.#view.getBigUint64(16, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageViewCaptureDescriptorDataInfoEXT { - pNext?: AnyPointer; - imageView?: ImageView; -} - -export class ImageViewCaptureDescriptorDataInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageViewCaptureDescriptorDataInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewCaptureDescriptorDataInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageViewCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewCaptureDescriptorDataInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewCaptureDescriptorDataInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageViewCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageView !== undefined) this.imageView = data.imageView; - } - this.sType = StructureType.IMAGE_VIEW_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageView() { - return this.#view.getBigUint64(16, LE); - } - - set imageView(value: ImageView) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitSamplerCaptureDescriptorDataInfoEXT { - pNext?: AnyPointer; - sampler?: Sampler; -} - -export class SamplerCaptureDescriptorDataInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSamplerCaptureDescriptorDataInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSamplerCaptureDescriptorDataInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(SamplerCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SamplerCaptureDescriptorDataInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SamplerCaptureDescriptorDataInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SamplerCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.sampler !== undefined) this.sampler = data.sampler; - } - this.sType = StructureType.SAMPLER_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get sampler() { - return this.#view.getBigUint64(16, LE); - } - - set sampler(value: Sampler) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitAccelerationStructureCaptureDescriptorDataInfoEXT { - pNext?: AnyPointer; - accelerationStructure?: AccelerationStructureKHR; - accelerationStructureNV?: AccelerationStructureNV; -} - -export class AccelerationStructureCaptureDescriptorDataInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureCaptureDescriptorDataInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureCaptureDescriptorDataInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureCaptureDescriptorDataInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureCaptureDescriptorDataInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureCaptureDescriptorDataInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.accelerationStructure !== undefined) this.accelerationStructure = data.accelerationStructure; - if (data.accelerationStructureNV !== undefined) this.accelerationStructureNV = data.accelerationStructureNV; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_CAPTURE_DESCRIPTOR_DATA_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get accelerationStructure() { - return this.#view.getBigUint64(16, LE); - } - - set accelerationStructure(value: AccelerationStructureKHR) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get accelerationStructureNV() { - return this.#view.getBigUint64(24, LE); - } - - set accelerationStructureNV(value: AccelerationStructureNV) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitOpaqueCaptureDescriptorDataCreateInfoEXT { - pNext?: AnyPointer; - opaqueCaptureDescriptorData?: AnyPointer; -} - -export class OpaqueCaptureDescriptorDataCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitOpaqueCaptureDescriptorDataCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitOpaqueCaptureDescriptorDataCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(OpaqueCaptureDescriptorDataCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpaqueCaptureDescriptorDataCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < OpaqueCaptureDescriptorDataCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(OpaqueCaptureDescriptorDataCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.opaqueCaptureDescriptorData !== undefined) this.opaqueCaptureDescriptorData = data.opaqueCaptureDescriptorData; - } - this.sType = StructureType.OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get opaqueCaptureDescriptorData() { - return this.#view.getBigUint64(16, LE); - } - - set opaqueCaptureDescriptorData(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceShaderIntegerDotProductFeatures { - pNext?: AnyPointer; - shaderIntegerDotProduct?: Bool32; -} - -export class PhysicalDeviceShaderIntegerDotProductFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderIntegerDotProductFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderIntegerDotProductFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderIntegerDotProductFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderIntegerDotProductFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderIntegerDotProduct !== undefined) this.shaderIntegerDotProduct = data.shaderIntegerDotProduct; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderIntegerDotProduct() { - return this.#view.getUint32(16, LE); - } - - set shaderIntegerDotProduct(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderIntegerDotProductProperties { - pNext?: AnyPointer; - integerDotProduct8BitUnsignedAccelerated?: Bool32; - integerDotProduct8BitSignedAccelerated?: Bool32; - integerDotProduct8BitMixedSignednessAccelerated?: Bool32; - integerDotProduct4x8BitPackedUnsignedAccelerated?: Bool32; - integerDotProduct4x8BitPackedSignedAccelerated?: Bool32; - integerDotProduct4x8BitPackedMixedSignednessAccelerated?: Bool32; - integerDotProduct16BitUnsignedAccelerated?: Bool32; - integerDotProduct16BitSignedAccelerated?: Bool32; - integerDotProduct16BitMixedSignednessAccelerated?: Bool32; - integerDotProduct32BitUnsignedAccelerated?: Bool32; - integerDotProduct32BitSignedAccelerated?: Bool32; - integerDotProduct32BitMixedSignednessAccelerated?: Bool32; - integerDotProduct64BitUnsignedAccelerated?: Bool32; - integerDotProduct64BitSignedAccelerated?: Bool32; - integerDotProduct64BitMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating8BitUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating8BitSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating16BitUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating16BitSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating32BitUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating32BitSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated?: Bool32; - integerDotProductAccumulatingSaturating64BitUnsignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating64BitSignedAccelerated?: Bool32; - integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated?: Bool32; -} - -export class PhysicalDeviceShaderIntegerDotProductProperties implements BaseStruct { - static size = 136; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderIntegerDotProductProperties); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderIntegerDotProductProperties) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderIntegerDotProductProperties.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderIntegerDotProductProperties.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderIntegerDotProductProperties.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.integerDotProduct8BitUnsignedAccelerated !== undefined) this.integerDotProduct8BitUnsignedAccelerated = data.integerDotProduct8BitUnsignedAccelerated; - if (data.integerDotProduct8BitSignedAccelerated !== undefined) this.integerDotProduct8BitSignedAccelerated = data.integerDotProduct8BitSignedAccelerated; - if (data.integerDotProduct8BitMixedSignednessAccelerated !== undefined) this.integerDotProduct8BitMixedSignednessAccelerated = data.integerDotProduct8BitMixedSignednessAccelerated; - if (data.integerDotProduct4x8BitPackedUnsignedAccelerated !== undefined) this.integerDotProduct4x8BitPackedUnsignedAccelerated = data.integerDotProduct4x8BitPackedUnsignedAccelerated; - if (data.integerDotProduct4x8BitPackedSignedAccelerated !== undefined) this.integerDotProduct4x8BitPackedSignedAccelerated = data.integerDotProduct4x8BitPackedSignedAccelerated; - if (data.integerDotProduct4x8BitPackedMixedSignednessAccelerated !== undefined) this.integerDotProduct4x8BitPackedMixedSignednessAccelerated = data.integerDotProduct4x8BitPackedMixedSignednessAccelerated; - if (data.integerDotProduct16BitUnsignedAccelerated !== undefined) this.integerDotProduct16BitUnsignedAccelerated = data.integerDotProduct16BitUnsignedAccelerated; - if (data.integerDotProduct16BitSignedAccelerated !== undefined) this.integerDotProduct16BitSignedAccelerated = data.integerDotProduct16BitSignedAccelerated; - if (data.integerDotProduct16BitMixedSignednessAccelerated !== undefined) this.integerDotProduct16BitMixedSignednessAccelerated = data.integerDotProduct16BitMixedSignednessAccelerated; - if (data.integerDotProduct32BitUnsignedAccelerated !== undefined) this.integerDotProduct32BitUnsignedAccelerated = data.integerDotProduct32BitUnsignedAccelerated; - if (data.integerDotProduct32BitSignedAccelerated !== undefined) this.integerDotProduct32BitSignedAccelerated = data.integerDotProduct32BitSignedAccelerated; - if (data.integerDotProduct32BitMixedSignednessAccelerated !== undefined) this.integerDotProduct32BitMixedSignednessAccelerated = data.integerDotProduct32BitMixedSignednessAccelerated; - if (data.integerDotProduct64BitUnsignedAccelerated !== undefined) this.integerDotProduct64BitUnsignedAccelerated = data.integerDotProduct64BitUnsignedAccelerated; - if (data.integerDotProduct64BitSignedAccelerated !== undefined) this.integerDotProduct64BitSignedAccelerated = data.integerDotProduct64BitSignedAccelerated; - if (data.integerDotProduct64BitMixedSignednessAccelerated !== undefined) this.integerDotProduct64BitMixedSignednessAccelerated = data.integerDotProduct64BitMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating8BitUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating8BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitSignedAccelerated = data.integerDotProductAccumulatingSaturating8BitSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating16BitUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating16BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitSignedAccelerated = data.integerDotProductAccumulatingSaturating16BitSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating32BitUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating32BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitSignedAccelerated = data.integerDotProductAccumulatingSaturating32BitSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated; - if (data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated = data.integerDotProductAccumulatingSaturating64BitUnsignedAccelerated; - if (data.integerDotProductAccumulatingSaturating64BitSignedAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitSignedAccelerated = data.integerDotProductAccumulatingSaturating64BitSignedAccelerated; - if (data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated !== undefined) this.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = data.integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get integerDotProduct8BitUnsignedAccelerated() { - return this.#view.getUint32(16, LE); - } - - set integerDotProduct8BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get integerDotProduct8BitSignedAccelerated() { - return this.#view.getUint32(20, LE); - } - - set integerDotProduct8BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get integerDotProduct8BitMixedSignednessAccelerated() { - return this.#view.getUint32(24, LE); - } - - set integerDotProduct8BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get integerDotProduct4x8BitPackedUnsignedAccelerated() { - return this.#view.getUint32(28, LE); - } - - set integerDotProduct4x8BitPackedUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get integerDotProduct4x8BitPackedSignedAccelerated() { - return this.#view.getUint32(32, LE); - } - - set integerDotProduct4x8BitPackedSignedAccelerated(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get integerDotProduct4x8BitPackedMixedSignednessAccelerated() { - return this.#view.getUint32(36, LE); - } - - set integerDotProduct4x8BitPackedMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get integerDotProduct16BitUnsignedAccelerated() { - return this.#view.getUint32(40, LE); - } - - set integerDotProduct16BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(40, Number(value), LE); - } - - get integerDotProduct16BitSignedAccelerated() { - return this.#view.getUint32(44, LE); - } - - set integerDotProduct16BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(44, Number(value), LE); - } - - get integerDotProduct16BitMixedSignednessAccelerated() { - return this.#view.getUint32(48, LE); - } - - set integerDotProduct16BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(48, Number(value), LE); - } - - get integerDotProduct32BitUnsignedAccelerated() { - return this.#view.getUint32(52, LE); - } - - set integerDotProduct32BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(52, Number(value), LE); - } - - get integerDotProduct32BitSignedAccelerated() { - return this.#view.getUint32(56, LE); - } - - set integerDotProduct32BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(56, Number(value), LE); - } - - get integerDotProduct32BitMixedSignednessAccelerated() { - return this.#view.getUint32(60, LE); - } - - set integerDotProduct32BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(60, Number(value), LE); - } - - get integerDotProduct64BitUnsignedAccelerated() { - return this.#view.getUint32(64, LE); - } - - set integerDotProduct64BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(64, Number(value), LE); - } - - get integerDotProduct64BitSignedAccelerated() { - return this.#view.getUint32(68, LE); - } - - set integerDotProduct64BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(68, Number(value), LE); - } - - get integerDotProduct64BitMixedSignednessAccelerated() { - return this.#view.getUint32(72, LE); - } - - set integerDotProduct64BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(72, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating8BitUnsignedAccelerated() { - return this.#view.getUint32(76, LE); - } - - set integerDotProductAccumulatingSaturating8BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(76, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating8BitSignedAccelerated() { - return this.#view.getUint32(80, LE); - } - - set integerDotProductAccumulatingSaturating8BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(80, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated() { - return this.#view.getUint32(84, LE); - } - - set integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(84, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated() { - return this.#view.getUint32(88, LE); - } - - set integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(88, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated() { - return this.#view.getUint32(92, LE); - } - - set integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated(value: Bool32) { - this.#view.setUint32(92, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated() { - return this.#view.getUint32(96, LE); - } - - set integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(96, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating16BitUnsignedAccelerated() { - return this.#view.getUint32(100, LE); - } - - set integerDotProductAccumulatingSaturating16BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(100, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating16BitSignedAccelerated() { - return this.#view.getUint32(104, LE); - } - - set integerDotProductAccumulatingSaturating16BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(104, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated() { - return this.#view.getUint32(108, LE); - } - - set integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(108, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating32BitUnsignedAccelerated() { - return this.#view.getUint32(112, LE); - } - - set integerDotProductAccumulatingSaturating32BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(112, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating32BitSignedAccelerated() { - return this.#view.getUint32(116, LE); - } - - set integerDotProductAccumulatingSaturating32BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(116, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated() { - return this.#view.getUint32(120, LE); - } - - set integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(120, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating64BitUnsignedAccelerated() { - return this.#view.getUint32(124, LE); - } - - set integerDotProductAccumulatingSaturating64BitUnsignedAccelerated(value: Bool32) { - this.#view.setUint32(124, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating64BitSignedAccelerated() { - return this.#view.getUint32(128, LE); - } - - set integerDotProductAccumulatingSaturating64BitSignedAccelerated(value: Bool32) { - this.#view.setUint32(128, Number(value), LE); - } - - get integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated() { - return this.#view.getUint32(132, LE); - } - - set integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated(value: Bool32) { - this.#view.setUint32(132, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDrmPropertiesEXT { - pNext?: AnyPointer; - hasPrimary?: Bool32; - hasRender?: Bool32; - primaryMajor?: Deno.PointerValue; - primaryMinor?: Deno.PointerValue; - renderMajor?: Deno.PointerValue; - renderMinor?: Deno.PointerValue; -} - -export class PhysicalDeviceDrmPropertiesEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDrmPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDrmPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDrmPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDrmPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDrmPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDrmPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.hasPrimary !== undefined) this.hasPrimary = data.hasPrimary; - if (data.hasRender !== undefined) this.hasRender = data.hasRender; - if (data.primaryMajor !== undefined) this.primaryMajor = data.primaryMajor; - if (data.primaryMinor !== undefined) this.primaryMinor = data.primaryMinor; - if (data.renderMajor !== undefined) this.renderMajor = data.renderMajor; - if (data.renderMinor !== undefined) this.renderMinor = data.renderMinor; - } - this.sType = StructureType.PHYSICAL_DEVICE_DRM_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get hasPrimary() { - return this.#view.getUint32(16, LE); - } - - set hasPrimary(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get hasRender() { - return this.#view.getUint32(20, LE); - } - - set hasRender(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get primaryMajor() { - return this.#view.getBigInt64(24, LE); - } - - set primaryMajor(value: Deno.PointerValue) { - this.#view.setBigInt64(24, BigInt(value), LE); - } - - get primaryMinor() { - return this.#view.getBigInt64(32, LE); - } - - set primaryMinor(value: Deno.PointerValue) { - this.#view.setBigInt64(32, BigInt(value), LE); - } - - get renderMajor() { - return this.#view.getBigInt64(40, LE); - } - - set renderMajor(value: Deno.PointerValue) { - this.#view.setBigInt64(40, BigInt(value), LE); - } - - get renderMinor() { - return this.#view.getBigInt64(48, LE); - } - - set renderMinor(value: Deno.PointerValue) { - this.#view.setBigInt64(48, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentShaderBarycentricFeaturesKHR { - pNext?: AnyPointer; - fragmentShaderBarycentric?: Bool32; -} - -export class PhysicalDeviceFragmentShaderBarycentricFeaturesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentShaderBarycentricFeaturesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShaderBarycentricFeaturesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricFeaturesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.fragmentShaderBarycentric !== undefined) this.fragmentShaderBarycentric = data.fragmentShaderBarycentric; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get fragmentShaderBarycentric() { - return this.#view.getUint32(16, LE); - } - - set fragmentShaderBarycentric(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceFragmentShaderBarycentricPropertiesKHR { - pNext?: AnyPointer; - triStripVertexOrderIndependentOfProvokingVertex?: Bool32; -} - -export class PhysicalDeviceFragmentShaderBarycentricPropertiesKHR implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFragmentShaderBarycentricPropertiesKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFragmentShaderBarycentricPropertiesKHR) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFragmentShaderBarycentricPropertiesKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.triStripVertexOrderIndependentOfProvokingVertex !== undefined) this.triStripVertexOrderIndependentOfProvokingVertex = data.triStripVertexOrderIndependentOfProvokingVertex; - } - this.sType = StructureType.PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_PROPERTIES_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get triStripVertexOrderIndependentOfProvokingVertex() { - return this.#view.getUint32(16, LE); - } - - set triStripVertexOrderIndependentOfProvokingVertex(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRayTracingMotionBlurFeaturesNV { - pNext?: AnyPointer; - rayTracingMotionBlur?: Bool32; - rayTracingMotionBlurPipelineTraceRaysIndirect?: Bool32; -} - -export class PhysicalDeviceRayTracingMotionBlurFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRayTracingMotionBlurFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingMotionBlurFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRayTracingMotionBlurFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingMotionBlurFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingMotionBlurFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRayTracingMotionBlurFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.rayTracingMotionBlur !== undefined) this.rayTracingMotionBlur = data.rayTracingMotionBlur; - if (data.rayTracingMotionBlurPipelineTraceRaysIndirect !== undefined) this.rayTracingMotionBlurPipelineTraceRaysIndirect = data.rayTracingMotionBlurPipelineTraceRaysIndirect; - } - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get rayTracingMotionBlur() { - return this.#view.getUint32(16, LE); - } - - set rayTracingMotionBlur(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get rayTracingMotionBlurPipelineTraceRaysIndirect() { - return this.#view.getUint32(20, LE); - } - - set rayTracingMotionBlurPipelineTraceRaysIndirect(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitAccelerationStructureGeometryMotionTrianglesDataNV { - pNext?: AnyPointer; - vertexData?: DeviceOrHostAddressConstKHR; -} - -export class AccelerationStructureGeometryMotionTrianglesDataNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureGeometryMotionTrianglesDataNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureGeometryMotionTrianglesDataNV) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureGeometryMotionTrianglesDataNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureGeometryMotionTrianglesDataNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryMotionTrianglesDataNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureGeometryMotionTrianglesDataNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.vertexData !== undefined) this.vertexData = data.vertexData; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_GEOMETRY_MOTION_TRIANGLES_DATA_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get vertexData() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set vertexData(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } -} - -export interface InitAccelerationStructureMotionInfoNV { - pNext?: AnyPointer; - maxInstances?: number; - flags?: AccelerationStructureMotionInfoFlagsNV; -} - -export class AccelerationStructureMotionInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureMotionInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureMotionInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureMotionInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMotionInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureMotionInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureMotionInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxInstances !== undefined) this.maxInstances = data.maxInstances; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_MOTION_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxInstances() { - return this.#view.getUint32(16, LE); - } - - set maxInstances(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(20, LE); - } - - set flags(value: AccelerationStructureMotionInfoFlagsNV) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitSRTDataNV { - sx?: number; - a?: number; - b?: number; - pvx?: number; - sy?: number; - c?: number; - pvy?: number; - sz?: number; - pvz?: number; - qx?: number; - qy?: number; - qz?: number; - qw?: number; - tx?: number; - ty?: number; - tz?: number; -} - -export class SRTDataNV implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSRTDataNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSRTDataNV) { - if (data === undefined) { - this.#data = new Uint8Array(SRTDataNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SRTDataNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SRTDataNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SRTDataNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.sx !== undefined) this.sx = data.sx; - if (data.a !== undefined) this.a = data.a; - if (data.b !== undefined) this.b = data.b; - if (data.pvx !== undefined) this.pvx = data.pvx; - if (data.sy !== undefined) this.sy = data.sy; - if (data.c !== undefined) this.c = data.c; - if (data.pvy !== undefined) this.pvy = data.pvy; - if (data.sz !== undefined) this.sz = data.sz; - if (data.pvz !== undefined) this.pvz = data.pvz; - if (data.qx !== undefined) this.qx = data.qx; - if (data.qy !== undefined) this.qy = data.qy; - if (data.qz !== undefined) this.qz = data.qz; - if (data.qw !== undefined) this.qw = data.qw; - if (data.tx !== undefined) this.tx = data.tx; - if (data.ty !== undefined) this.ty = data.ty; - if (data.tz !== undefined) this.tz = data.tz; - } - } - - get sx() { - return this.#view.getFloat32(0, LE); - } - - set sx(value: number) { - this.#view.setFloat32(0, Number(value), LE); - } - - get a() { - return this.#view.getFloat32(4, LE); - } - - set a(value: number) { - this.#view.setFloat32(4, Number(value), LE); - } - - get b() { - return this.#view.getFloat32(8, LE); - } - - set b(value: number) { - this.#view.setFloat32(8, Number(value), LE); - } - - get pvx() { - return this.#view.getFloat32(12, LE); - } - - set pvx(value: number) { - this.#view.setFloat32(12, Number(value), LE); - } - - get sy() { - return this.#view.getFloat32(16, LE); - } - - set sy(value: number) { - this.#view.setFloat32(16, Number(value), LE); - } - - get c() { - return this.#view.getFloat32(20, LE); - } - - set c(value: number) { - this.#view.setFloat32(20, Number(value), LE); - } - - get pvy() { - return this.#view.getFloat32(24, LE); - } - - set pvy(value: number) { - this.#view.setFloat32(24, Number(value), LE); - } - - get sz() { - return this.#view.getFloat32(28, LE); - } - - set sz(value: number) { - this.#view.setFloat32(28, Number(value), LE); - } - - get pvz() { - return this.#view.getFloat32(32, LE); - } - - set pvz(value: number) { - this.#view.setFloat32(32, Number(value), LE); - } - - get qx() { - return this.#view.getFloat32(36, LE); - } - - set qx(value: number) { - this.#view.setFloat32(36, Number(value), LE); - } - - get qy() { - return this.#view.getFloat32(40, LE); - } - - set qy(value: number) { - this.#view.setFloat32(40, Number(value), LE); - } - - get qz() { - return this.#view.getFloat32(44, LE); - } - - set qz(value: number) { - this.#view.setFloat32(44, Number(value), LE); - } - - get qw() { - return this.#view.getFloat32(48, LE); - } - - set qw(value: number) { - this.#view.setFloat32(48, Number(value), LE); - } - - get tx() { - return this.#view.getFloat32(52, LE); - } - - set tx(value: number) { - this.#view.setFloat32(52, Number(value), LE); - } - - get ty() { - return this.#view.getFloat32(56, LE); - } - - set ty(value: number) { - this.#view.setFloat32(56, Number(value), LE); - } - - get tz() { - return this.#view.getFloat32(60, LE); - } - - set tz(value: number) { - this.#view.setFloat32(60, Number(value), LE); - } -} - -export interface InitAccelerationStructureSRTMotionInstanceNV { - transformT0?: SRTDataNV; - transformT1?: SRTDataNV; - instanceCustomIndex?: number; - mask?: number; - instanceShaderBindingTableRecordOffset?: number; - flags?: GeometryInstanceFlagsKHR; - accelerationStructureReference?: Deno.PointerValue; -} - -export class AccelerationStructureSRTMotionInstanceNV implements BaseStruct { - static size = 152; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureSRTMotionInstanceNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureSRTMotionInstanceNV) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureSRTMotionInstanceNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureSRTMotionInstanceNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureSRTMotionInstanceNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureSRTMotionInstanceNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.transformT0 !== undefined) this.transformT0 = data.transformT0; - if (data.transformT1 !== undefined) this.transformT1 = data.transformT1; - if (data.instanceCustomIndex !== undefined) this.instanceCustomIndex = data.instanceCustomIndex; - if (data.mask !== undefined) this.mask = data.mask; - if (data.instanceShaderBindingTableRecordOffset !== undefined) this.instanceShaderBindingTableRecordOffset = data.instanceShaderBindingTableRecordOffset; - if (data.flags !== undefined) this.flags = data.flags; - if (data.accelerationStructureReference !== undefined) this.accelerationStructureReference = data.accelerationStructureReference; - } - } - - get transformT0() { - return new SRTDataNV(this.#data.subarray(0, 0 + SRTDataNV.size)); - } - - set transformT0(value: SRTDataNV) { - if (value[BUFFER].byteLength < SRTDataNV.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get transformT1() { - return new SRTDataNV(this.#data.subarray(64, 64 + SRTDataNV.size)); - } - - set transformT1(value: SRTDataNV) { - if (value[BUFFER].byteLength < SRTDataNV.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 64); - } - - get instanceCustomIndex() { - return this.#view.getUint32(128, LE); - } - - set instanceCustomIndex(value: number) { - this.#view.setUint32(128, Number(value), LE); - } - - get mask() { - return this.#view.getUint32(132, LE); - } - - set mask(value: number) { - this.#view.setUint32(132, Number(value), LE); - } - - get instanceShaderBindingTableRecordOffset() { - return this.#view.getUint32(136, LE); - } - - set instanceShaderBindingTableRecordOffset(value: number) { - this.#view.setUint32(136, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(140, LE); - } - - set flags(value: GeometryInstanceFlagsKHR) { - this.#view.setUint32(140, Number(value), LE); - } - - get accelerationStructureReference() { - return this.#view.getBigUint64(144, LE); - } - - set accelerationStructureReference(value: Deno.PointerValue) { - this.#view.setBigUint64(144, BigInt(value), LE); - } -} - -export interface InitAccelerationStructureMatrixMotionInstanceNV { - transformT0?: TransformMatrixKHR; - transformT1?: TransformMatrixKHR; - instanceCustomIndex?: number; - mask?: number; - instanceShaderBindingTableRecordOffset?: number; - flags?: GeometryInstanceFlagsKHR; - accelerationStructureReference?: Deno.PointerValue; -} - -export class AccelerationStructureMatrixMotionInstanceNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureMatrixMotionInstanceNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureMatrixMotionInstanceNV) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureMatrixMotionInstanceNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMatrixMotionInstanceNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureMatrixMotionInstanceNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureMatrixMotionInstanceNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.transformT0 !== undefined) this.transformT0 = data.transformT0; - if (data.transformT1 !== undefined) this.transformT1 = data.transformT1; - if (data.instanceCustomIndex !== undefined) this.instanceCustomIndex = data.instanceCustomIndex; - if (data.mask !== undefined) this.mask = data.mask; - if (data.instanceShaderBindingTableRecordOffset !== undefined) this.instanceShaderBindingTableRecordOffset = data.instanceShaderBindingTableRecordOffset; - if (data.flags !== undefined) this.flags = data.flags; - if (data.accelerationStructureReference !== undefined) this.accelerationStructureReference = data.accelerationStructureReference; - } - } - - get transformT0() { - return new TransformMatrixKHR(this.#data.subarray(0, 0 + TransformMatrixKHR.size)); - } - - set transformT0(value: TransformMatrixKHR) { - if (value[BUFFER].byteLength < TransformMatrixKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 0); - } - - get transformT1() { - return new TransformMatrixKHR(this.#data.subarray(4, 4 + TransformMatrixKHR.size)); - } - - set transformT1(value: TransformMatrixKHR) { - if (value[BUFFER].byteLength < TransformMatrixKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 4); - } - - get instanceCustomIndex() { - return this.#view.getUint32(8, LE); - } - - set instanceCustomIndex(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get mask() { - return this.#view.getUint32(12, LE); - } - - set mask(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get instanceShaderBindingTableRecordOffset() { - return this.#view.getUint32(16, LE); - } - - set instanceShaderBindingTableRecordOffset(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(20, LE); - } - - set flags(value: GeometryInstanceFlagsKHR) { - this.#view.setUint32(20, Number(value), LE); - } - - get accelerationStructureReference() { - return this.#view.getBigUint64(24, LE); - } - - set accelerationStructureReference(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitAccelerationStructureMotionInstanceNV { - type?: AccelerationStructureMotionInstanceTypeNV; - flags?: AccelerationStructureMotionInstanceFlagsNV; - data?: AccelerationStructureMotionInstanceDataNV; -} - -export class AccelerationStructureMotionInstanceNV implements BaseStruct { - static size = 160; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureMotionInstanceNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureMotionInstanceNV) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureMotionInstanceNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureMotionInstanceNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureMotionInstanceNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureMotionInstanceNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.type !== undefined) this.type = data.type; - if (data.flags !== undefined) this.flags = data.flags; - if (data.data !== undefined) this.data = data.data; - } - } - - get type() { - return this.#view.getUint32(0, LE); - } - - set type(value: AccelerationStructureMotionInstanceTypeNV) { - this.#view.setUint32(0, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(4, LE); - } - - set flags(value: AccelerationStructureMotionInstanceFlagsNV) { - this.#view.setUint32(4, Number(value), LE); - } - - get data() { - throw new Error(`Unknown type: {"union":[{"struct":[{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32"]},{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},"u32","u32","u32","u32","u64"]}]}`); - } - - set data(value: AccelerationStructureMotionInstanceDataNV) { - throw new Error(`Unknown type: {"union":[{"struct":[{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32"]},{"struct":["f32"]},"u32","u32","u32","u32","u64"]},{"struct":[{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},{"struct":["f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32","f32"]},"u32","u32","u32","u32","u64"]}]}`); - } -} - -export interface InitMemoryGetRemoteAddressInfoNV { - pNext?: AnyPointer; - memory?: DeviceMemory; - handleType?: ExternalMemoryHandleTypeFlagBits; -} - -export class MemoryGetRemoteAddressInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMemoryGetRemoteAddressInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMemoryGetRemoteAddressInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(MemoryGetRemoteAddressInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MemoryGetRemoteAddressInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MemoryGetRemoteAddressInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MemoryGetRemoteAddressInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memory !== undefined) this.memory = data.memory; - if (data.handleType !== undefined) this.handleType = data.handleType; - } - this.sType = StructureType.MEMORY_GET_REMOTE_ADDRESS_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(16, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get handleType() { - return this.#view.getUint32(24, LE); - } - - set handleType(value: ExternalMemoryHandleTypeFlagBits) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitImportMemoryBufferCollectionFUCHSIA { - pNext?: AnyPointer; - collection?: BufferCollectionFUCHSIA; - index?: number; -} - -export class ImportMemoryBufferCollectionFUCHSIA implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMemoryBufferCollectionFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMemoryBufferCollectionFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMemoryBufferCollectionFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMemoryBufferCollectionFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMemoryBufferCollectionFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMemoryBufferCollectionFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.collection !== undefined) this.collection = data.collection; - if (data.index !== undefined) this.index = data.index; - } - this.sType = StructureType.IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get collection() { - return this.#view.getBigUint64(16, LE); - } - - set collection(value: BufferCollectionFUCHSIA) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get index() { - return this.#view.getUint32(24, LE); - } - - set index(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitBufferCollectionImageCreateInfoFUCHSIA { - pNext?: AnyPointer; - collection?: BufferCollectionFUCHSIA; - index?: number; -} - -export class BufferCollectionImageCreateInfoFUCHSIA implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferCollectionImageCreateInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionImageCreateInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(BufferCollectionImageCreateInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionImageCreateInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionImageCreateInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferCollectionImageCreateInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.collection !== undefined) this.collection = data.collection; - if (data.index !== undefined) this.index = data.index; - } - this.sType = StructureType.BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get collection() { - return this.#view.getBigUint64(16, LE); - } - - set collection(value: BufferCollectionFUCHSIA) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get index() { - return this.#view.getUint32(24, LE); - } - - set index(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitBufferCollectionBufferCreateInfoFUCHSIA { - pNext?: AnyPointer; - collection?: BufferCollectionFUCHSIA; - index?: number; -} - -export class BufferCollectionBufferCreateInfoFUCHSIA implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferCollectionBufferCreateInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionBufferCreateInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(BufferCollectionBufferCreateInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionBufferCreateInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionBufferCreateInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferCollectionBufferCreateInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.collection !== undefined) this.collection = data.collection; - if (data.index !== undefined) this.index = data.index; - } - this.sType = StructureType.BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get collection() { - return this.#view.getBigUint64(16, LE); - } - - set collection(value: BufferCollectionFUCHSIA) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get index() { - return this.#view.getUint32(24, LE); - } - - set index(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitBufferCollectionCreateInfoFUCHSIA { - pNext?: AnyPointer; - collectionToken?: Deno.PointerValue; -} - -export class BufferCollectionCreateInfoFUCHSIA implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferCollectionCreateInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionCreateInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(BufferCollectionCreateInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionCreateInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionCreateInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferCollectionCreateInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.collectionToken !== undefined) this.collectionToken = data.collectionToken; - } - this.sType = StructureType.BUFFER_COLLECTION_CREATE_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get collectionToken() { - return this.#view.getBigUint64(16, LE); - } - - set collectionToken(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitBufferCollectionPropertiesFUCHSIA { - pNext?: AnyPointer; - memoryTypeBits?: number; - bufferCount?: number; - createInfoIndex?: number; - sysmemPixelFormat?: Deno.PointerValue; - formatFeatures?: FormatFeatureFlags; - sysmemColorSpaceIndex?: SysmemColorSpaceFUCHSIA; - samplerYcbcrConversionComponents?: ComponentMapping; - suggestedYcbcrModel?: SamplerYcbcrModelConversion; - suggestedYcbcrRange?: SamplerYcbcrRange; - suggestedXChromaOffset?: ChromaLocation; - suggestedYChromaOffset?: ChromaLocation; -} - -export class BufferCollectionPropertiesFUCHSIA implements BaseStruct { - static size = 104; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferCollectionPropertiesFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionPropertiesFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(BufferCollectionPropertiesFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionPropertiesFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionPropertiesFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferCollectionPropertiesFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memoryTypeBits !== undefined) this.memoryTypeBits = data.memoryTypeBits; - if (data.bufferCount !== undefined) this.bufferCount = data.bufferCount; - if (data.createInfoIndex !== undefined) this.createInfoIndex = data.createInfoIndex; - if (data.sysmemPixelFormat !== undefined) this.sysmemPixelFormat = data.sysmemPixelFormat; - if (data.formatFeatures !== undefined) this.formatFeatures = data.formatFeatures; - if (data.sysmemColorSpaceIndex !== undefined) this.sysmemColorSpaceIndex = data.sysmemColorSpaceIndex; - if (data.samplerYcbcrConversionComponents !== undefined) this.samplerYcbcrConversionComponents = data.samplerYcbcrConversionComponents; - if (data.suggestedYcbcrModel !== undefined) this.suggestedYcbcrModel = data.suggestedYcbcrModel; - if (data.suggestedYcbcrRange !== undefined) this.suggestedYcbcrRange = data.suggestedYcbcrRange; - if (data.suggestedXChromaOffset !== undefined) this.suggestedXChromaOffset = data.suggestedXChromaOffset; - if (data.suggestedYChromaOffset !== undefined) this.suggestedYChromaOffset = data.suggestedYChromaOffset; - } - this.sType = StructureType.BUFFER_COLLECTION_PROPERTIES_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memoryTypeBits() { - return this.#view.getUint32(16, LE); - } - - set memoryTypeBits(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get bufferCount() { - return this.#view.getUint32(20, LE); - } - - set bufferCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get createInfoIndex() { - return this.#view.getUint32(24, LE); - } - - set createInfoIndex(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get sysmemPixelFormat() { - return this.#view.getBigUint64(32, LE); - } - - set sysmemPixelFormat(value: Deno.PointerValue) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get formatFeatures() { - return this.#view.getUint32(40, LE); - } - - set formatFeatures(value: FormatFeatureFlags) { - this.#view.setUint32(40, Number(value), LE); - } - - get sysmemColorSpaceIndex() { - return new SysmemColorSpaceFUCHSIA(this.#data.subarray(44, 44 + SysmemColorSpaceFUCHSIA.size)); - } - - set sysmemColorSpaceIndex(value: SysmemColorSpaceFUCHSIA) { - if (value[BUFFER].byteLength < SysmemColorSpaceFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 44); - } - - get samplerYcbcrConversionComponents() { - return new ComponentMapping(this.#data.subarray(68, 68 + ComponentMapping.size)); - } - - set samplerYcbcrConversionComponents(value: ComponentMapping) { - if (value[BUFFER].byteLength < ComponentMapping.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 68); - } - - get suggestedYcbcrModel() { - return this.#view.getUint32(84, LE); - } - - set suggestedYcbcrModel(value: SamplerYcbcrModelConversion) { - this.#view.setUint32(84, Number(value), LE); - } - - get suggestedYcbcrRange() { - return this.#view.getUint32(88, LE); - } - - set suggestedYcbcrRange(value: SamplerYcbcrRange) { - this.#view.setUint32(88, Number(value), LE); - } - - get suggestedXChromaOffset() { - return this.#view.getUint32(92, LE); - } - - set suggestedXChromaOffset(value: ChromaLocation) { - this.#view.setUint32(92, Number(value), LE); - } - - get suggestedYChromaOffset() { - return this.#view.getUint32(96, LE); - } - - set suggestedYChromaOffset(value: ChromaLocation) { - this.#view.setUint32(96, Number(value), LE); - } -} - -export interface InitBufferConstraintsInfoFUCHSIA { - pNext?: AnyPointer; - createInfo?: BufferCreateInfo; - requiredFormatFeatures?: FormatFeatureFlags; - bufferCollectionConstraints?: BufferCollectionConstraintsInfoFUCHSIA; -} - -export class BufferConstraintsInfoFUCHSIA implements BaseStruct { - static size = 120; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferConstraintsInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferConstraintsInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(BufferConstraintsInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferConstraintsInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferConstraintsInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferConstraintsInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.createInfo !== undefined) this.createInfo = data.createInfo; - if (data.requiredFormatFeatures !== undefined) this.requiredFormatFeatures = data.requiredFormatFeatures; - if (data.bufferCollectionConstraints !== undefined) this.bufferCollectionConstraints = data.bufferCollectionConstraints; - } - this.sType = StructureType.BUFFER_CONSTRAINTS_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get createInfo() { - return new BufferCreateInfo(this.#data.subarray(16, 16 + BufferCreateInfo.size)); - } - - set createInfo(value: BufferCreateInfo) { - if (value[BUFFER].byteLength < BufferCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get requiredFormatFeatures() { - return this.#view.getUint32(72, LE); - } - - set requiredFormatFeatures(value: FormatFeatureFlags) { - this.#view.setUint32(72, Number(value), LE); - } - - get bufferCollectionConstraints() { - return new BufferCollectionConstraintsInfoFUCHSIA(this.#data.subarray(76, 76 + BufferCollectionConstraintsInfoFUCHSIA.size)); - } - - set bufferCollectionConstraints(value: BufferCollectionConstraintsInfoFUCHSIA) { - if (value[BUFFER].byteLength < BufferCollectionConstraintsInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 76); - } -} - -export interface InitSysmemColorSpaceFUCHSIA { - pNext?: AnyPointer; - colorSpace?: number; -} - -export class SysmemColorSpaceFUCHSIA implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSysmemColorSpaceFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSysmemColorSpaceFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(SysmemColorSpaceFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SysmemColorSpaceFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SysmemColorSpaceFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SysmemColorSpaceFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.colorSpace !== undefined) this.colorSpace = data.colorSpace; - } - this.sType = StructureType.SYSMEM_COLOR_SPACE_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get colorSpace() { - return this.#view.getUint32(16, LE); - } - - set colorSpace(value: number) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImageFormatConstraintsInfoFUCHSIA { - pNext?: AnyPointer; - imageCreateInfo?: ImageCreateInfo; - requiredFormatFeatures?: FormatFeatureFlags; - flags?: ImageFormatConstraintsFlagsFUCHSIA; - sysmemPixelFormat?: Deno.PointerValue; - colorSpaceCount?: number; - pColorSpaces?: AnyPointer; -} - -export class ImageFormatConstraintsInfoFUCHSIA implements BaseStruct { - static size = 136; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageFormatConstraintsInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageFormatConstraintsInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(ImageFormatConstraintsInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageFormatConstraintsInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageFormatConstraintsInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageFormatConstraintsInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageCreateInfo !== undefined) this.imageCreateInfo = data.imageCreateInfo; - if (data.requiredFormatFeatures !== undefined) this.requiredFormatFeatures = data.requiredFormatFeatures; - if (data.flags !== undefined) this.flags = data.flags; - if (data.sysmemPixelFormat !== undefined) this.sysmemPixelFormat = data.sysmemPixelFormat; - if (data.colorSpaceCount !== undefined) this.colorSpaceCount = data.colorSpaceCount; - if (data.pColorSpaces !== undefined) this.pColorSpaces = data.pColorSpaces; - } - this.sType = StructureType.IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageCreateInfo() { - return new ImageCreateInfo(this.#data.subarray(16, 16 + ImageCreateInfo.size)); - } - - set imageCreateInfo(value: ImageCreateInfo) { - if (value[BUFFER].byteLength < ImageCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get requiredFormatFeatures() { - return this.#view.getUint32(104, LE); - } - - set requiredFormatFeatures(value: FormatFeatureFlags) { - this.#view.setUint32(104, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(108, LE); - } - - set flags(value: ImageFormatConstraintsFlagsFUCHSIA) { - this.#view.setUint32(108, Number(value), LE); - } - - get sysmemPixelFormat() { - return this.#view.getBigUint64(112, LE); - } - - set sysmemPixelFormat(value: Deno.PointerValue) { - this.#view.setBigUint64(112, BigInt(value), LE); - } - - get colorSpaceCount() { - return this.#view.getUint32(120, LE); - } - - set colorSpaceCount(value: number) { - this.#view.setUint32(120, Number(value), LE); - } - - get pColorSpaces() { - return this.#view.getBigUint64(128, LE); - } - - set pColorSpaces(value: AnyPointer) { - this.#view.setBigUint64(128, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImageConstraintsInfoFUCHSIA { - pNext?: AnyPointer; - formatConstraintsCount?: number; - pFormatConstraints?: AnyPointer; - bufferCollectionConstraints?: BufferCollectionConstraintsInfoFUCHSIA; - flags?: ImageConstraintsInfoFlagsFUCHSIA; -} - -export class ImageConstraintsInfoFUCHSIA implements BaseStruct { - static size = 80; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageConstraintsInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageConstraintsInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(ImageConstraintsInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageConstraintsInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageConstraintsInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageConstraintsInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.formatConstraintsCount !== undefined) this.formatConstraintsCount = data.formatConstraintsCount; - if (data.pFormatConstraints !== undefined) this.pFormatConstraints = data.pFormatConstraints; - if (data.bufferCollectionConstraints !== undefined) this.bufferCollectionConstraints = data.bufferCollectionConstraints; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.IMAGE_CONSTRAINTS_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get formatConstraintsCount() { - return this.#view.getUint32(16, LE); - } - - set formatConstraintsCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pFormatConstraints() { - return this.#view.getBigUint64(24, LE); - } - - set pFormatConstraints(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get bufferCollectionConstraints() { - return new BufferCollectionConstraintsInfoFUCHSIA(this.#data.subarray(32, 32 + BufferCollectionConstraintsInfoFUCHSIA.size)); - } - - set bufferCollectionConstraints(value: BufferCollectionConstraintsInfoFUCHSIA) { - if (value[BUFFER].byteLength < BufferCollectionConstraintsInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 32); - } - - get flags() { - return this.#view.getUint32(72, LE); - } - - set flags(value: ImageConstraintsInfoFlagsFUCHSIA) { - this.#view.setUint32(72, Number(value), LE); - } -} - -export interface InitBufferCollectionConstraintsInfoFUCHSIA { - pNext?: AnyPointer; - minBufferCount?: number; - maxBufferCount?: number; - minBufferCountForCamping?: number; - minBufferCountForDedicatedSlack?: number; - minBufferCountForSharedSlack?: number; -} - -export class BufferCollectionConstraintsInfoFUCHSIA implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitBufferCollectionConstraintsInfoFUCHSIA); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitBufferCollectionConstraintsInfoFUCHSIA) { - if (data === undefined) { - this.#data = new Uint8Array(BufferCollectionConstraintsInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, BufferCollectionConstraintsInfoFUCHSIA.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < BufferCollectionConstraintsInfoFUCHSIA.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(BufferCollectionConstraintsInfoFUCHSIA.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minBufferCount !== undefined) this.minBufferCount = data.minBufferCount; - if (data.maxBufferCount !== undefined) this.maxBufferCount = data.maxBufferCount; - if (data.minBufferCountForCamping !== undefined) this.minBufferCountForCamping = data.minBufferCountForCamping; - if (data.minBufferCountForDedicatedSlack !== undefined) this.minBufferCountForDedicatedSlack = data.minBufferCountForDedicatedSlack; - if (data.minBufferCountForSharedSlack !== undefined) this.minBufferCountForSharedSlack = data.minBufferCountForSharedSlack; - } - this.sType = StructureType.BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minBufferCount() { - return this.#view.getUint32(16, LE); - } - - set minBufferCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxBufferCount() { - return this.#view.getUint32(20, LE); - } - - set maxBufferCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get minBufferCountForCamping() { - return this.#view.getUint32(24, LE); - } - - set minBufferCountForCamping(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get minBufferCountForDedicatedSlack() { - return this.#view.getUint32(28, LE); - } - - set minBufferCountForDedicatedSlack(value: number) { - this.#view.setUint32(28, Number(value), LE); - } - - get minBufferCountForSharedSlack() { - return this.#view.getUint32(32, LE); - } - - set minBufferCountForSharedSlack(value: number) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRGBA10X6FormatsFeaturesEXT { - pNext?: AnyPointer; - formatRgba10x6WithoutYCbCrSampler?: Bool32; -} - -export class PhysicalDeviceRGBA10X6FormatsFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRGBA10X6FormatsFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRGBA10X6FormatsFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRGBA10X6FormatsFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.formatRgba10x6WithoutYCbCrSampler !== undefined) this.formatRgba10x6WithoutYCbCrSampler = data.formatRgba10x6WithoutYCbCrSampler; - } - this.sType = StructureType.PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get formatRgba10x6WithoutYCbCrSampler() { - return this.#view.getUint32(16, LE); - } - - set formatRgba10x6WithoutYCbCrSampler(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitFormatProperties3 { - pNext?: AnyPointer; - linearTilingFeatures?: FormatFeatureFlags2; - optimalTilingFeatures?: FormatFeatureFlags2; - bufferFeatures?: FormatFeatureFlags2; -} - -export class FormatProperties3 implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitFormatProperties3); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitFormatProperties3) { - if (data === undefined) { - this.#data = new Uint8Array(FormatProperties3.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, FormatProperties3.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < FormatProperties3.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(FormatProperties3.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.linearTilingFeatures !== undefined) this.linearTilingFeatures = data.linearTilingFeatures; - if (data.optimalTilingFeatures !== undefined) this.optimalTilingFeatures = data.optimalTilingFeatures; - if (data.bufferFeatures !== undefined) this.bufferFeatures = data.bufferFeatures; - } - this.sType = StructureType.FORMAT_PROPERTIES_3; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get linearTilingFeatures() { - return this.#view.getBigUint64(16, LE); - } - - set linearTilingFeatures(value: FormatFeatureFlags2) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get optimalTilingFeatures() { - return this.#view.getBigUint64(24, LE); - } - - set optimalTilingFeatures(value: FormatFeatureFlags2) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get bufferFeatures() { - return this.#view.getBigUint64(32, LE); - } - - set bufferFeatures(value: FormatFeatureFlags2) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitDrmFormatModifierPropertiesList2EXT { - pNext?: AnyPointer; - drmFormatModifierCount?: number; - pDrmFormatModifierProperties?: AnyPointer; -} - -export class DrmFormatModifierPropertiesList2EXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDrmFormatModifierPropertiesList2EXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDrmFormatModifierPropertiesList2EXT) { - if (data === undefined) { - this.#data = new Uint8Array(DrmFormatModifierPropertiesList2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierPropertiesList2EXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DrmFormatModifierPropertiesList2EXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DrmFormatModifierPropertiesList2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.drmFormatModifierCount !== undefined) this.drmFormatModifierCount = data.drmFormatModifierCount; - if (data.pDrmFormatModifierProperties !== undefined) this.pDrmFormatModifierProperties = data.pDrmFormatModifierProperties; - } - this.sType = StructureType.DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get drmFormatModifierCount() { - return this.#view.getUint32(16, LE); - } - - set drmFormatModifierCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pDrmFormatModifierProperties() { - return this.#view.getBigUint64(24, LE); - } - - set pDrmFormatModifierProperties(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDrmFormatModifierProperties2EXT { - drmFormatModifier?: Deno.PointerValue; - drmFormatModifierPlaneCount?: number; - drmFormatModifierTilingFeatures?: FormatFeatureFlags2; -} - -export class DrmFormatModifierProperties2EXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDrmFormatModifierProperties2EXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDrmFormatModifierProperties2EXT) { - if (data === undefined) { - this.#data = new Uint8Array(DrmFormatModifierProperties2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DrmFormatModifierProperties2EXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DrmFormatModifierProperties2EXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DrmFormatModifierProperties2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.drmFormatModifier !== undefined) this.drmFormatModifier = data.drmFormatModifier; - if (data.drmFormatModifierPlaneCount !== undefined) this.drmFormatModifierPlaneCount = data.drmFormatModifierPlaneCount; - if (data.drmFormatModifierTilingFeatures !== undefined) this.drmFormatModifierTilingFeatures = data.drmFormatModifierTilingFeatures; - } - } - - get drmFormatModifier() { - return this.#view.getBigUint64(0, LE); - } - - set drmFormatModifier(value: Deno.PointerValue) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get drmFormatModifierPlaneCount() { - return this.#view.getUint32(8, LE); - } - - set drmFormatModifierPlaneCount(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get drmFormatModifierTilingFeatures() { - return this.#view.getBigUint64(16, LE); - } - - set drmFormatModifierTilingFeatures(value: FormatFeatureFlags2) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitAndroidHardwareBufferFormatProperties2ANDROID { - pNext?: AnyPointer; - format?: Format; - externalFormat?: Deno.PointerValue; - formatFeatures?: FormatFeatureFlags2; - samplerYcbcrConversionComponents?: ComponentMapping; - suggestedYcbcrModel?: SamplerYcbcrModelConversion; - suggestedYcbcrRange?: SamplerYcbcrRange; - suggestedXChromaOffset?: ChromaLocation; - suggestedYChromaOffset?: ChromaLocation; -} - -export class AndroidHardwareBufferFormatProperties2ANDROID implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAndroidHardwareBufferFormatProperties2ANDROID); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAndroidHardwareBufferFormatProperties2ANDROID) { - if (data === undefined) { - this.#data = new Uint8Array(AndroidHardwareBufferFormatProperties2ANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AndroidHardwareBufferFormatProperties2ANDROID.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AndroidHardwareBufferFormatProperties2ANDROID.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AndroidHardwareBufferFormatProperties2ANDROID.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.format !== undefined) this.format = data.format; - if (data.externalFormat !== undefined) this.externalFormat = data.externalFormat; - if (data.formatFeatures !== undefined) this.formatFeatures = data.formatFeatures; - if (data.samplerYcbcrConversionComponents !== undefined) this.samplerYcbcrConversionComponents = data.samplerYcbcrConversionComponents; - if (data.suggestedYcbcrModel !== undefined) this.suggestedYcbcrModel = data.suggestedYcbcrModel; - if (data.suggestedYcbcrRange !== undefined) this.suggestedYcbcrRange = data.suggestedYcbcrRange; - if (data.suggestedXChromaOffset !== undefined) this.suggestedXChromaOffset = data.suggestedXChromaOffset; - if (data.suggestedYChromaOffset !== undefined) this.suggestedYChromaOffset = data.suggestedYChromaOffset; - } - this.sType = StructureType.ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get format() { - return this.#view.getUint32(16, LE); - } - - set format(value: Format) { - this.#view.setUint32(16, Number(value), LE); - } - - get externalFormat() { - return this.#view.getBigUint64(24, LE); - } - - set externalFormat(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get formatFeatures() { - return this.#view.getBigUint64(32, LE); - } - - set formatFeatures(value: FormatFeatureFlags2) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get samplerYcbcrConversionComponents() { - return new ComponentMapping(this.#data.subarray(40, 40 + ComponentMapping.size)); - } - - set samplerYcbcrConversionComponents(value: ComponentMapping) { - if (value[BUFFER].byteLength < ComponentMapping.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 40); - } - - get suggestedYcbcrModel() { - return this.#view.getUint32(56, LE); - } - - set suggestedYcbcrModel(value: SamplerYcbcrModelConversion) { - this.#view.setUint32(56, Number(value), LE); - } - - get suggestedYcbcrRange() { - return this.#view.getUint32(60, LE); - } - - set suggestedYcbcrRange(value: SamplerYcbcrRange) { - this.#view.setUint32(60, Number(value), LE); - } - - get suggestedXChromaOffset() { - return this.#view.getUint32(64, LE); - } - - set suggestedXChromaOffset(value: ChromaLocation) { - this.#view.setUint32(64, Number(value), LE); - } - - get suggestedYChromaOffset() { - return this.#view.getUint32(68, LE); - } - - set suggestedYChromaOffset(value: ChromaLocation) { - this.#view.setUint32(68, Number(value), LE); - } -} - -export interface InitPipelineRenderingCreateInfo { - pNext?: AnyPointer; - viewMask?: number; - colorAttachmentCount?: number; - pColorAttachmentFormats?: AnyPointer; - depthAttachmentFormat?: Format; - stencilAttachmentFormat?: Format; -} - -export class PipelineRenderingCreateInfo implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRenderingCreateInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRenderingCreateInfo) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRenderingCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRenderingCreateInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRenderingCreateInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRenderingCreateInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.viewMask !== undefined) this.viewMask = data.viewMask; - if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; - if (data.pColorAttachmentFormats !== undefined) this.pColorAttachmentFormats = data.pColorAttachmentFormats; - if (data.depthAttachmentFormat !== undefined) this.depthAttachmentFormat = data.depthAttachmentFormat; - if (data.stencilAttachmentFormat !== undefined) this.stencilAttachmentFormat = data.stencilAttachmentFormat; - } - this.sType = StructureType.PIPELINE_RENDERING_CREATE_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get viewMask() { - return this.#view.getUint32(16, LE); - } - - set viewMask(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get colorAttachmentCount() { - return this.#view.getUint32(20, LE); - } - - set colorAttachmentCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pColorAttachmentFormats() { - return this.#view.getBigUint64(24, LE); - } - - set pColorAttachmentFormats(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get depthAttachmentFormat() { - return this.#view.getUint32(32, LE); - } - - set depthAttachmentFormat(value: Format) { - this.#view.setUint32(32, Number(value), LE); - } - - get stencilAttachmentFormat() { - return this.#view.getUint32(36, LE); - } - - set stencilAttachmentFormat(value: Format) { - this.#view.setUint32(36, Number(value), LE); - } -} - -export interface InitRenderingInfo { - pNext?: AnyPointer; - flags?: RenderingFlags; - renderArea?: Rect2D; - layerCount?: number; - viewMask?: number; - colorAttachmentCount?: number; - pColorAttachments?: AnyPointer; - pDepthAttachment?: AnyPointer; - pStencilAttachment?: AnyPointer; -} - -export class RenderingInfo implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderingInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderingInfo) { - if (data === undefined) { - this.#data = new Uint8Array(RenderingInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderingInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderingInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.renderArea !== undefined) this.renderArea = data.renderArea; - if (data.layerCount !== undefined) this.layerCount = data.layerCount; - if (data.viewMask !== undefined) this.viewMask = data.viewMask; - if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; - if (data.pColorAttachments !== undefined) this.pColorAttachments = data.pColorAttachments; - if (data.pDepthAttachment !== undefined) this.pDepthAttachment = data.pDepthAttachment; - if (data.pStencilAttachment !== undefined) this.pStencilAttachment = data.pStencilAttachment; - } - this.sType = StructureType.RENDERING_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: RenderingFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get renderArea() { - return new Rect2D(this.#data.subarray(20, 20 + Rect2D.size)); - } - - set renderArea(value: Rect2D) { - if (value[BUFFER].byteLength < Rect2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } - - get layerCount() { - return this.#view.getUint32(36, LE); - } - - set layerCount(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get viewMask() { - return this.#view.getUint32(40, LE); - } - - set viewMask(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get colorAttachmentCount() { - return this.#view.getUint32(44, LE); - } - - set colorAttachmentCount(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get pColorAttachments() { - return this.#view.getBigUint64(48, LE); - } - - set pColorAttachments(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get pDepthAttachment() { - return this.#view.getBigUint64(56, LE); - } - - set pDepthAttachment(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get pStencilAttachment() { - return this.#view.getBigUint64(64, LE); - } - - set pStencilAttachment(value: AnyPointer) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} - -export interface InitRenderingAttachmentInfo { - pNext?: AnyPointer; - imageView?: ImageView; - imageLayout?: ImageLayout; - resolveMode?: ResolveModeFlagBits; - resolveImageView?: ImageView; - resolveImageLayout?: ImageLayout; - loadOp?: AttachmentLoadOp; - storeOp?: AttachmentStoreOp; - clearValue?: ClearValue; -} - -export class RenderingAttachmentInfo implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderingAttachmentInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderingAttachmentInfo) { - if (data === undefined) { - this.#data = new Uint8Array(RenderingAttachmentInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingAttachmentInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderingAttachmentInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderingAttachmentInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageView !== undefined) this.imageView = data.imageView; - if (data.imageLayout !== undefined) this.imageLayout = data.imageLayout; - if (data.resolveMode !== undefined) this.resolveMode = data.resolveMode; - if (data.resolveImageView !== undefined) this.resolveImageView = data.resolveImageView; - if (data.resolveImageLayout !== undefined) this.resolveImageLayout = data.resolveImageLayout; - if (data.loadOp !== undefined) this.loadOp = data.loadOp; - if (data.storeOp !== undefined) this.storeOp = data.storeOp; - if (data.clearValue !== undefined) this.clearValue = data.clearValue; - } - this.sType = StructureType.RENDERING_ATTACHMENT_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageView() { - return this.#view.getBigUint64(16, LE); - } - - set imageView(value: ImageView) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get imageLayout() { - return this.#view.getUint32(24, LE); - } - - set imageLayout(value: ImageLayout) { - this.#view.setUint32(24, Number(value), LE); - } - - get resolveMode() { - return this.#view.getUint32(28, LE); - } - - set resolveMode(value: ResolveModeFlagBits) { - this.#view.setUint32(28, Number(value), LE); - } - - get resolveImageView() { - return this.#view.getBigUint64(32, LE); - } - - set resolveImageView(value: ImageView) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get resolveImageLayout() { - return this.#view.getUint32(40, LE); - } - - set resolveImageLayout(value: ImageLayout) { - this.#view.setUint32(40, Number(value), LE); - } - - get loadOp() { - return this.#view.getUint32(44, LE); - } - - set loadOp(value: AttachmentLoadOp) { - this.#view.setUint32(44, Number(value), LE); - } - - get storeOp() { - return this.#view.getUint32(48, LE); - } - - set storeOp(value: AttachmentStoreOp) { - this.#view.setUint32(48, Number(value), LE); - } - - get clearValue() { - throw new Error(`Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}`); - } - - set clearValue(value: ClearValue) { - throw new Error(`Unknown type: {"union":[{"union":["f32","i32","u32"]},{"struct":["f32","u32"]}]}`); - } -} - -export interface InitRenderingFragmentShadingRateAttachmentInfoKHR { - pNext?: AnyPointer; - imageView?: ImageView; - imageLayout?: ImageLayout; - shadingRateAttachmentTexelSize?: Extent2D; -} - -export class RenderingFragmentShadingRateAttachmentInfoKHR implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderingFragmentShadingRateAttachmentInfoKHR); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderingFragmentShadingRateAttachmentInfoKHR) { - if (data === undefined) { - this.#data = new Uint8Array(RenderingFragmentShadingRateAttachmentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingFragmentShadingRateAttachmentInfoKHR.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderingFragmentShadingRateAttachmentInfoKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderingFragmentShadingRateAttachmentInfoKHR.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageView !== undefined) this.imageView = data.imageView; - if (data.imageLayout !== undefined) this.imageLayout = data.imageLayout; - if (data.shadingRateAttachmentTexelSize !== undefined) this.shadingRateAttachmentTexelSize = data.shadingRateAttachmentTexelSize; - } - this.sType = StructureType.RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageView() { - return this.#view.getBigUint64(16, LE); - } - - set imageView(value: ImageView) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get imageLayout() { - return this.#view.getUint32(24, LE); - } - - set imageLayout(value: ImageLayout) { - this.#view.setUint32(24, Number(value), LE); - } - - get shadingRateAttachmentTexelSize() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - - set shadingRateAttachmentTexelSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 28); - } -} - -export interface InitRenderingFragmentDensityMapAttachmentInfoEXT { - pNext?: AnyPointer; - imageView?: ImageView; - imageLayout?: ImageLayout; -} - -export class RenderingFragmentDensityMapAttachmentInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderingFragmentDensityMapAttachmentInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderingFragmentDensityMapAttachmentInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(RenderingFragmentDensityMapAttachmentInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderingFragmentDensityMapAttachmentInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderingFragmentDensityMapAttachmentInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderingFragmentDensityMapAttachmentInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageView !== undefined) this.imageView = data.imageView; - if (data.imageLayout !== undefined) this.imageLayout = data.imageLayout; - } - this.sType = StructureType.RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageView() { - return this.#view.getBigUint64(16, LE); - } - - set imageView(value: ImageView) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get imageLayout() { - return this.#view.getUint32(24, LE); - } - - set imageLayout(value: ImageLayout) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDynamicRenderingFeatures { - pNext?: AnyPointer; - dynamicRendering?: Bool32; -} - -export class PhysicalDeviceDynamicRenderingFeatures implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDynamicRenderingFeatures); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDynamicRenderingFeatures) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDynamicRenderingFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDynamicRenderingFeatures.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDynamicRenderingFeatures.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDynamicRenderingFeatures.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.dynamicRendering !== undefined) this.dynamicRendering = data.dynamicRendering; - } - this.sType = StructureType.PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get dynamicRendering() { - return this.#view.getUint32(16, LE); - } - - set dynamicRendering(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitCommandBufferInheritanceRenderingInfo { - pNext?: AnyPointer; - flags?: RenderingFlags; - viewMask?: number; - colorAttachmentCount?: number; - pColorAttachmentFormats?: AnyPointer; - depthAttachmentFormat?: Format; - stencilAttachmentFormat?: Format; - rasterizationSamples?: SampleCountFlagBits; -} - -export class CommandBufferInheritanceRenderingInfo implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCommandBufferInheritanceRenderingInfo); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCommandBufferInheritanceRenderingInfo) { - if (data === undefined) { - this.#data = new Uint8Array(CommandBufferInheritanceRenderingInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CommandBufferInheritanceRenderingInfo.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CommandBufferInheritanceRenderingInfo.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CommandBufferInheritanceRenderingInfo.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.viewMask !== undefined) this.viewMask = data.viewMask; - if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; - if (data.pColorAttachmentFormats !== undefined) this.pColorAttachmentFormats = data.pColorAttachmentFormats; - if (data.depthAttachmentFormat !== undefined) this.depthAttachmentFormat = data.depthAttachmentFormat; - if (data.stencilAttachmentFormat !== undefined) this.stencilAttachmentFormat = data.stencilAttachmentFormat; - if (data.rasterizationSamples !== undefined) this.rasterizationSamples = data.rasterizationSamples; - } - this.sType = StructureType.COMMAND_BUFFER_INHERITANCE_RENDERING_INFO; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: RenderingFlags) { - this.#view.setUint32(16, Number(value), LE); - } - - get viewMask() { - return this.#view.getUint32(20, LE); - } - - set viewMask(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get colorAttachmentCount() { - return this.#view.getUint32(24, LE); - } - - set colorAttachmentCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get pColorAttachmentFormats() { - return this.#view.getBigUint64(32, LE); - } - - set pColorAttachmentFormats(value: AnyPointer) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get depthAttachmentFormat() { - return this.#view.getUint32(40, LE); - } - - set depthAttachmentFormat(value: Format) { - this.#view.setUint32(40, Number(value), LE); - } - - get stencilAttachmentFormat() { - return this.#view.getUint32(44, LE); - } - - set stencilAttachmentFormat(value: Format) { - this.#view.setUint32(44, Number(value), LE); - } - - get rasterizationSamples() { - return this.#view.getUint32(48, LE); - } - - set rasterizationSamples(value: SampleCountFlagBits) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitAttachmentSampleCountInfoAMD { - pNext?: AnyPointer; - colorAttachmentCount?: number; - pColorAttachmentSamples?: AnyPointer; - depthStencilAttachmentSamples?: SampleCountFlagBits; -} - -export class AttachmentSampleCountInfoAMD implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAttachmentSampleCountInfoAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAttachmentSampleCountInfoAMD) { - if (data === undefined) { - this.#data = new Uint8Array(AttachmentSampleCountInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AttachmentSampleCountInfoAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AttachmentSampleCountInfoAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AttachmentSampleCountInfoAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.colorAttachmentCount !== undefined) this.colorAttachmentCount = data.colorAttachmentCount; - if (data.pColorAttachmentSamples !== undefined) this.pColorAttachmentSamples = data.pColorAttachmentSamples; - if (data.depthStencilAttachmentSamples !== undefined) this.depthStencilAttachmentSamples = data.depthStencilAttachmentSamples; - } - this.sType = StructureType.ATTACHMENT_SAMPLE_COUNT_INFO_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get colorAttachmentCount() { - return this.#view.getUint32(16, LE); - } - - set colorAttachmentCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pColorAttachmentSamples() { - return this.#view.getBigUint64(24, LE); - } - - set pColorAttachmentSamples(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get depthStencilAttachmentSamples() { - return this.#view.getUint32(32, LE); - } - - set depthStencilAttachmentSamples(value: SampleCountFlagBits) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitMultiviewPerViewAttributesInfoNVX { - pNext?: AnyPointer; - perViewAttributes?: Bool32; - perViewAttributesPositionXOnly?: Bool32; -} - -export class MultiviewPerViewAttributesInfoNVX implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMultiviewPerViewAttributesInfoNVX); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMultiviewPerViewAttributesInfoNVX) { - if (data === undefined) { - this.#data = new Uint8Array(MultiviewPerViewAttributesInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MultiviewPerViewAttributesInfoNVX.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MultiviewPerViewAttributesInfoNVX.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MultiviewPerViewAttributesInfoNVX.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.perViewAttributes !== undefined) this.perViewAttributes = data.perViewAttributes; - if (data.perViewAttributesPositionXOnly !== undefined) this.perViewAttributesPositionXOnly = data.perViewAttributesPositionXOnly; - } - this.sType = StructureType.MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get perViewAttributes() { - return this.#view.getUint32(16, LE); - } - - set perViewAttributes(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get perViewAttributesPositionXOnly() { - return this.#view.getUint32(20, LE); - } - - set perViewAttributesPositionXOnly(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceImageViewMinLodFeaturesEXT { - pNext?: AnyPointer; - minLod?: Bool32; -} - -export class PhysicalDeviceImageViewMinLodFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImageViewMinLodFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageViewMinLodFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImageViewMinLodFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageViewMinLodFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageViewMinLodFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImageViewMinLodFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minLod !== undefined) this.minLod = data.minLod; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minLod() { - return this.#view.getUint32(16, LE); - } - - set minLod(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImageViewMinLodCreateInfoEXT { - pNext?: AnyPointer; - minLod?: number; -} - -export class ImageViewMinLodCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageViewMinLodCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewMinLodCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageViewMinLodCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewMinLodCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewMinLodCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageViewMinLodCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.minLod !== undefined) this.minLod = data.minLod; - } - this.sType = StructureType.IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get minLod() { - return this.#view.getFloat32(16, LE); - } - - set minLod(value: number) { - this.#view.setFloat32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT { - pNext?: AnyPointer; - rasterizationOrderColorAttachmentAccess?: Bool32; - rasterizationOrderDepthAttachmentAccess?: Bool32; - rasterizationOrderStencilAttachmentAccess?: Bool32; -} - -export class PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.rasterizationOrderColorAttachmentAccess !== undefined) this.rasterizationOrderColorAttachmentAccess = data.rasterizationOrderColorAttachmentAccess; - if (data.rasterizationOrderDepthAttachmentAccess !== undefined) this.rasterizationOrderDepthAttachmentAccess = data.rasterizationOrderDepthAttachmentAccess; - if (data.rasterizationOrderStencilAttachmentAccess !== undefined) this.rasterizationOrderStencilAttachmentAccess = data.rasterizationOrderStencilAttachmentAccess; - } - this.sType = StructureType.PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get rasterizationOrderColorAttachmentAccess() { - return this.#view.getUint32(16, LE); - } - - set rasterizationOrderColorAttachmentAccess(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get rasterizationOrderDepthAttachmentAccess() { - return this.#view.getUint32(20, LE); - } - - set rasterizationOrderDepthAttachmentAccess(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get rasterizationOrderStencilAttachmentAccess() { - return this.#view.getUint32(24, LE); - } - - set rasterizationOrderStencilAttachmentAccess(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceLinearColorAttachmentFeaturesNV { - pNext?: AnyPointer; - linearColorAttachment?: Bool32; -} - -export class PhysicalDeviceLinearColorAttachmentFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceLinearColorAttachmentFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceLinearColorAttachmentFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceLinearColorAttachmentFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceLinearColorAttachmentFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceLinearColorAttachmentFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceLinearColorAttachmentFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.linearColorAttachment !== undefined) this.linearColorAttachment = data.linearColorAttachment; - } - this.sType = StructureType.PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get linearColorAttachment() { - return this.#view.getUint32(16, LE); - } - - set linearColorAttachment(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT { - pNext?: AnyPointer; - graphicsPipelineLibrary?: Bool32; -} - -export class PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.graphicsPipelineLibrary !== undefined) this.graphicsPipelineLibrary = data.graphicsPipelineLibrary; - } - this.sType = StructureType.PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get graphicsPipelineLibrary() { - return this.#view.getUint32(16, LE); - } - - set graphicsPipelineLibrary(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT { - pNext?: AnyPointer; - graphicsPipelineLibraryFastLinking?: Bool32; - graphicsPipelineLibraryIndependentInterpolationDecoration?: Bool32; -} - -export class PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceGraphicsPipelineLibraryPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.graphicsPipelineLibraryFastLinking !== undefined) this.graphicsPipelineLibraryFastLinking = data.graphicsPipelineLibraryFastLinking; - if (data.graphicsPipelineLibraryIndependentInterpolationDecoration !== undefined) this.graphicsPipelineLibraryIndependentInterpolationDecoration = data.graphicsPipelineLibraryIndependentInterpolationDecoration; - } - this.sType = StructureType.PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get graphicsPipelineLibraryFastLinking() { - return this.#view.getUint32(16, LE); - } - - set graphicsPipelineLibraryFastLinking(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get graphicsPipelineLibraryIndependentInterpolationDecoration() { - return this.#view.getUint32(20, LE); - } - - set graphicsPipelineLibraryIndependentInterpolationDecoration(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitGraphicsPipelineLibraryCreateInfoEXT { - pNext?: AnyPointer; - flags?: GraphicsPipelineLibraryFlagsEXT; -} - -export class GraphicsPipelineLibraryCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitGraphicsPipelineLibraryCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitGraphicsPipelineLibraryCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(GraphicsPipelineLibraryCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, GraphicsPipelineLibraryCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < GraphicsPipelineLibraryCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(GraphicsPipelineLibraryCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: GraphicsPipelineLibraryFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE { - pNext?: AnyPointer; - descriptorSetHostMapping?: Bool32; -} - -export class PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.descriptorSetHostMapping !== undefined) this.descriptorSetHostMapping = data.descriptorSetHostMapping; - } - this.sType = StructureType.PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get descriptorSetHostMapping() { - return this.#view.getUint32(16, LE); - } - - set descriptorSetHostMapping(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDescriptorSetBindingReferenceVALVE { - pNext?: AnyPointer; - descriptorSetLayout?: DescriptorSetLayout; - binding?: number; -} - -export class DescriptorSetBindingReferenceVALVE implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorSetBindingReferenceVALVE); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetBindingReferenceVALVE) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorSetBindingReferenceVALVE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetBindingReferenceVALVE.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetBindingReferenceVALVE.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorSetBindingReferenceVALVE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.descriptorSetLayout !== undefined) this.descriptorSetLayout = data.descriptorSetLayout; - if (data.binding !== undefined) this.binding = data.binding; - } - this.sType = StructureType.DESCRIPTOR_SET_BINDING_REFERENCE_VALVE; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get descriptorSetLayout() { - return this.#view.getBigUint64(16, LE); - } - - set descriptorSetLayout(value: DescriptorSetLayout) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get binding() { - return this.#view.getUint32(24, LE); - } - - set binding(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitDescriptorSetLayoutHostMappingInfoVALVE { - pNext?: AnyPointer; - descriptorOffset?: Deno.PointerValue; - descriptorSize?: number; -} - -export class DescriptorSetLayoutHostMappingInfoVALVE implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDescriptorSetLayoutHostMappingInfoVALVE); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDescriptorSetLayoutHostMappingInfoVALVE) { - if (data === undefined) { - this.#data = new Uint8Array(DescriptorSetLayoutHostMappingInfoVALVE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DescriptorSetLayoutHostMappingInfoVALVE.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DescriptorSetLayoutHostMappingInfoVALVE.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DescriptorSetLayoutHostMappingInfoVALVE.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.descriptorOffset !== undefined) this.descriptorOffset = data.descriptorOffset; - if (data.descriptorSize !== undefined) this.descriptorSize = data.descriptorSize; - } - this.sType = StructureType.DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get descriptorOffset() { - return this.#view.getBigUint64(16, LE); - } - - set descriptorOffset(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get descriptorSize() { - return this.#view.getUint32(24, LE); - } - - set descriptorSize(value: number) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderModuleIdentifierFeaturesEXT { - pNext?: AnyPointer; - shaderModuleIdentifier?: Bool32; -} - -export class PhysicalDeviceShaderModuleIdentifierFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderModuleIdentifierFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderModuleIdentifierFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderModuleIdentifier !== undefined) this.shaderModuleIdentifier = data.shaderModuleIdentifier; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderModuleIdentifier() { - return this.#view.getUint32(16, LE); - } - - set shaderModuleIdentifier(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderModuleIdentifierPropertiesEXT { - pNext?: AnyPointer; - shaderModuleIdentifierAlgorithmUUID?: Uint8Array; -} - -export class PhysicalDeviceShaderModuleIdentifierPropertiesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderModuleIdentifierPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderModuleIdentifierPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderModuleIdentifierPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderModuleIdentifierAlgorithmUUID !== undefined) this.shaderModuleIdentifierAlgorithmUUID = data.shaderModuleIdentifierAlgorithmUUID; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderModuleIdentifierAlgorithmUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - - set shaderModuleIdentifierAlgorithmUUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } -} - -export interface InitPipelineShaderStageModuleIdentifierCreateInfoEXT { - pNext?: AnyPointer; - identifierSize?: number; - pIdentifier?: AnyPointer; -} - -export class PipelineShaderStageModuleIdentifierCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineShaderStageModuleIdentifierCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineShaderStageModuleIdentifierCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineShaderStageModuleIdentifierCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineShaderStageModuleIdentifierCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineShaderStageModuleIdentifierCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineShaderStageModuleIdentifierCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.identifierSize !== undefined) this.identifierSize = data.identifierSize; - if (data.pIdentifier !== undefined) this.pIdentifier = data.pIdentifier; - } - this.sType = StructureType.PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get identifierSize() { - return this.#view.getUint32(16, LE); - } - - set identifierSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pIdentifier() { - return this.#view.getBigUint64(24, LE); - } - - set pIdentifier(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitShaderModuleIdentifierEXT { - pNext?: AnyPointer; - identifierSize?: number; - identifier?: Uint8Array; -} - -export class ShaderModuleIdentifierEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitShaderModuleIdentifierEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitShaderModuleIdentifierEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ShaderModuleIdentifierEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ShaderModuleIdentifierEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ShaderModuleIdentifierEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ShaderModuleIdentifierEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.identifierSize !== undefined) this.identifierSize = data.identifierSize; - if (data.identifier !== undefined) this.identifier = data.identifier; - } - this.sType = StructureType.SHADER_MODULE_IDENTIFIER_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get identifierSize() { - return this.#view.getUint32(16, LE); - } - - set identifierSize(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get identifier() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 32); - } - - set identifier(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } -} - -export interface InitImageCompressionControlEXT { - pNext?: AnyPointer; - flags?: ImageCompressionFlagsEXT; - compressionControlPlaneCount?: number; - pFixedRateFlags?: AnyPointer; -} - -export class ImageCompressionControlEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageCompressionControlEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageCompressionControlEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageCompressionControlEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCompressionControlEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCompressionControlEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageCompressionControlEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.compressionControlPlaneCount !== undefined) this.compressionControlPlaneCount = data.compressionControlPlaneCount; - if (data.pFixedRateFlags !== undefined) this.pFixedRateFlags = data.pFixedRateFlags; - } - this.sType = StructureType.IMAGE_COMPRESSION_CONTROL_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: ImageCompressionFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get compressionControlPlaneCount() { - return this.#view.getUint32(20, LE); - } - - set compressionControlPlaneCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pFixedRateFlags() { - return this.#view.getBigUint64(24, LE); - } - - set pFixedRateFlags(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceImageCompressionControlFeaturesEXT { - pNext?: AnyPointer; - imageCompressionControl?: Bool32; -} - -export class PhysicalDeviceImageCompressionControlFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImageCompressionControlFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageCompressionControlFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageCompressionControlFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageCompressionControlFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageCompressionControl !== undefined) this.imageCompressionControl = data.imageCompressionControl; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageCompressionControl() { - return this.#view.getUint32(16, LE); - } - - set imageCompressionControl(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImageCompressionPropertiesEXT { - pNext?: AnyPointer; - imageCompressionFlags?: ImageCompressionFlagsEXT; - imageCompressionFixedRateFlags?: ImageCompressionFixedRateFlagsEXT; -} - -export class ImageCompressionPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageCompressionPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageCompressionPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageCompressionPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageCompressionPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageCompressionPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageCompressionPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageCompressionFlags !== undefined) this.imageCompressionFlags = data.imageCompressionFlags; - if (data.imageCompressionFixedRateFlags !== undefined) this.imageCompressionFixedRateFlags = data.imageCompressionFixedRateFlags; - } - this.sType = StructureType.IMAGE_COMPRESSION_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageCompressionFlags() { - return this.#view.getUint32(16, LE); - } - - set imageCompressionFlags(value: ImageCompressionFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get imageCompressionFixedRateFlags() { - return this.#view.getUint32(20, LE); - } - - set imageCompressionFixedRateFlags(value: ImageCompressionFixedRateFlagsEXT) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT { - pNext?: AnyPointer; - imageCompressionControlSwapchain?: Bool32; -} - -export class PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageCompressionControlSwapchain !== undefined) this.imageCompressionControlSwapchain = data.imageCompressionControlSwapchain; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageCompressionControlSwapchain() { - return this.#view.getUint32(16, LE); - } - - set imageCompressionControlSwapchain(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitImageSubresource2EXT { - pNext?: AnyPointer; - imageSubresource?: ImageSubresource; -} - -export class ImageSubresource2EXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageSubresource2EXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageSubresource2EXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImageSubresource2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageSubresource2EXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageSubresource2EXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageSubresource2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.imageSubresource !== undefined) this.imageSubresource = data.imageSubresource; - } - this.sType = StructureType.IMAGE_SUBRESOURCE_2_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get imageSubresource() { - return new ImageSubresource(this.#data.subarray(16, 16 + ImageSubresource.size)); - } - - set imageSubresource(value: ImageSubresource) { - if (value[BUFFER].byteLength < ImageSubresource.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitSubresourceLayout2EXT { - pNext?: AnyPointer; - subresourceLayout?: SubresourceLayout; -} - -export class SubresourceLayout2EXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitSubresourceLayout2EXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitSubresourceLayout2EXT) { - if (data === undefined) { - this.#data = new Uint8Array(SubresourceLayout2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, SubresourceLayout2EXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < SubresourceLayout2EXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(SubresourceLayout2EXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.subresourceLayout !== undefined) this.subresourceLayout = data.subresourceLayout; - } - this.sType = StructureType.SUBRESOURCE_LAYOUT_2_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get subresourceLayout() { - return new SubresourceLayout(this.#data.subarray(16, 16 + SubresourceLayout.size)); - } - - set subresourceLayout(value: SubresourceLayout) { - if (value[BUFFER].byteLength < SubresourceLayout.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } -} - -export interface InitRenderPassCreationControlEXT { - pNext?: AnyPointer; - disallowMerging?: Bool32; -} - -export class RenderPassCreationControlEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassCreationControlEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreationControlEXT) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassCreationControlEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreationControlEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreationControlEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassCreationControlEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.disallowMerging !== undefined) this.disallowMerging = data.disallowMerging; - } - this.sType = StructureType.RENDER_PASS_CREATION_CONTROL_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get disallowMerging() { - return this.#view.getUint32(16, LE); - } - - set disallowMerging(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitRenderPassCreationFeedbackInfoEXT { - postMergeSubpassCount?: number; -} - -export class RenderPassCreationFeedbackInfoEXT implements BaseStruct { - static size = 4; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassCreationFeedbackInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreationFeedbackInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassCreationFeedbackInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreationFeedbackInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreationFeedbackInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassCreationFeedbackInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.postMergeSubpassCount !== undefined) this.postMergeSubpassCount = data.postMergeSubpassCount; - } - } - - get postMergeSubpassCount() { - return this.#view.getUint32(0, LE); - } - - set postMergeSubpassCount(value: number) { - this.#view.setUint32(0, Number(value), LE); - } -} - -export interface InitRenderPassCreationFeedbackCreateInfoEXT { - pNext?: AnyPointer; - pRenderPassFeedback?: AnyPointer; -} - -export class RenderPassCreationFeedbackCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassCreationFeedbackCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassCreationFeedbackCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassCreationFeedbackCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassCreationFeedbackCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassCreationFeedbackCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassCreationFeedbackCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pRenderPassFeedback !== undefined) this.pRenderPassFeedback = data.pRenderPassFeedback; - } - this.sType = StructureType.RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pRenderPassFeedback() { - return this.#view.getBigUint64(16, LE); - } - - set pRenderPassFeedback(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitRenderPassSubpassFeedbackInfoEXT { - subpassMergeStatus?: SubpassMergeStatusEXT; - description?: Uint8Array; - postMergeIndex?: number; -} - -export class RenderPassSubpassFeedbackInfoEXT implements BaseStruct { - static size = 264; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassSubpassFeedbackInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassSubpassFeedbackInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassSubpassFeedbackInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassSubpassFeedbackInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassSubpassFeedbackInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassSubpassFeedbackInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.subpassMergeStatus !== undefined) this.subpassMergeStatus = data.subpassMergeStatus; - if (data.description !== undefined) this.description = data.description; - if (data.postMergeIndex !== undefined) this.postMergeIndex = data.postMergeIndex; - } - } - - get subpassMergeStatus() { - return this.#view.getUint32(0, LE); - } - - set subpassMergeStatus(value: SubpassMergeStatusEXT) { - this.#view.setUint32(0, Number(value), LE); - } - - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 4, 256); - } - - set description(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 4); - } - - get postMergeIndex() { - return this.#view.getUint32(260, LE); - } - - set postMergeIndex(value: number) { - this.#view.setUint32(260, Number(value), LE); - } -} - -export interface InitRenderPassSubpassFeedbackCreateInfoEXT { - pNext?: AnyPointer; - pSubpassFeedback?: AnyPointer; -} - -export class RenderPassSubpassFeedbackCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitRenderPassSubpassFeedbackCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitRenderPassSubpassFeedbackCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(RenderPassSubpassFeedbackCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, RenderPassSubpassFeedbackCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < RenderPassSubpassFeedbackCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(RenderPassSubpassFeedbackCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pSubpassFeedback !== undefined) this.pSubpassFeedback = data.pSubpassFeedback; - } - this.sType = StructureType.RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pSubpassFeedback() { - return this.#view.getBigUint64(16, LE); - } - - set pSubpassFeedback(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceSubpassMergeFeedbackFeaturesEXT { - pNext?: AnyPointer; - subpassMergeFeedback?: Bool32; -} - -export class PhysicalDeviceSubpassMergeFeedbackFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceSubpassMergeFeedbackFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceSubpassMergeFeedbackFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceSubpassMergeFeedbackFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.subpassMergeFeedback !== undefined) this.subpassMergeFeedback = data.subpassMergeFeedback; - } - this.sType = StructureType.PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get subpassMergeFeedback() { - return this.#view.getUint32(16, LE); - } - - set subpassMergeFeedback(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitMicromapBuildInfoEXT { - pNext?: AnyPointer; - type?: MicromapTypeEXT; - flags?: BuildMicromapFlagsEXT; - mode?: BuildMicromapModeEXT; - dstMicromap?: MicromapEXT; - usageCountsCount?: number; - pUsageCounts?: AnyPointer; - ppUsageCounts?: AnyPointer; - data?: DeviceOrHostAddressConstKHR; - scratchData?: DeviceOrHostAddressKHR; - triangleArray?: DeviceOrHostAddressConstKHR; - triangleArrayStride?: DeviceSize; -} - -export class MicromapBuildInfoEXT implements BaseStruct { - static size = 96; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMicromapBuildInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapBuildInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MicromapBuildInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapBuildInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapBuildInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MicromapBuildInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.type !== undefined) this.type = data.type; - if (data.flags !== undefined) this.flags = data.flags; - if (data.mode !== undefined) this.mode = data.mode; - if (data.dstMicromap !== undefined) this.dstMicromap = data.dstMicromap; - if (data.usageCountsCount !== undefined) this.usageCountsCount = data.usageCountsCount; - if (data.pUsageCounts !== undefined) this.pUsageCounts = data.pUsageCounts; - if (data.ppUsageCounts !== undefined) this.ppUsageCounts = data.ppUsageCounts; - if (data.data !== undefined) this.data = data.data; - if (data.scratchData !== undefined) this.scratchData = data.scratchData; - if (data.triangleArray !== undefined) this.triangleArray = data.triangleArray; - if (data.triangleArrayStride !== undefined) this.triangleArrayStride = data.triangleArrayStride; - } - this.sType = StructureType.MICROMAP_BUILD_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get type() { - return this.#view.getUint32(16, LE); - } - - set type(value: MicromapTypeEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(20, LE); - } - - set flags(value: BuildMicromapFlagsEXT) { - this.#view.setUint32(20, Number(value), LE); - } - - get mode() { - return this.#view.getUint32(24, LE); - } - - set mode(value: BuildMicromapModeEXT) { - this.#view.setUint32(24, Number(value), LE); - } - - get dstMicromap() { - return this.#view.getBigUint64(32, LE); - } - - set dstMicromap(value: MicromapEXT) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get usageCountsCount() { - return this.#view.getUint32(40, LE); - } - - set usageCountsCount(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get pUsageCounts() { - return this.#view.getBigUint64(48, LE); - } - - set pUsageCounts(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get ppUsageCounts() { - return this.#view.getBigUint64(56, LE); - } - - set ppUsageCounts(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get data() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set data(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get scratchData() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set scratchData(value: DeviceOrHostAddressKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get triangleArray() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set triangleArray(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get triangleArrayStride() { - return this.#view.getBigUint64(88, LE); - } - - set triangleArrayStride(value: DeviceSize) { - this.#view.setBigUint64(88, BigInt(value), LE); - } -} - -export interface InitMicromapCreateInfoEXT { - pNext?: AnyPointer; - createFlags?: MicromapCreateFlagsEXT; - buffer?: Buffer; - offset?: DeviceSize; - size?: DeviceSize; - type?: MicromapTypeEXT; - deviceAddress?: DeviceAddress; -} - -export class MicromapCreateInfoEXT implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMicromapCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MicromapCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MicromapCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.createFlags !== undefined) this.createFlags = data.createFlags; - if (data.buffer !== undefined) this.buffer = data.buffer; - if (data.offset !== undefined) this.offset = data.offset; - if (data.size !== undefined) this.size = data.size; - if (data.type !== undefined) this.type = data.type; - if (data.deviceAddress !== undefined) this.deviceAddress = data.deviceAddress; - } - this.sType = StructureType.MICROMAP_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get createFlags() { - return this.#view.getUint32(16, LE); - } - - set createFlags(value: MicromapCreateFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get buffer() { - return this.#view.getBigUint64(24, LE); - } - - set buffer(value: Buffer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get offset() { - return this.#view.getBigUint64(32, LE); - } - - set offset(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(40, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(40, BigInt(value), LE); - } - - get type() { - return this.#view.getUint32(48, LE); - } - - set type(value: MicromapTypeEXT) { - this.#view.setUint32(48, Number(value), LE); - } - - get deviceAddress() { - return this.#view.getBigUint64(56, LE); - } - - set deviceAddress(value: DeviceAddress) { - this.#view.setBigUint64(56, BigInt(value), LE); - } -} - -export interface InitMicromapVersionInfoEXT { - pNext?: AnyPointer; - pVersionData?: AnyPointer; -} - -export class MicromapVersionInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMicromapVersionInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapVersionInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MicromapVersionInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapVersionInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapVersionInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MicromapVersionInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pVersionData !== undefined) this.pVersionData = data.pVersionData; - } - this.sType = StructureType.MICROMAP_VERSION_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pVersionData() { - return this.#view.getBigUint64(16, LE); - } - - set pVersionData(value: AnyPointer) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitCopyMicromapInfoEXT { - pNext?: AnyPointer; - src?: MicromapEXT; - dst?: MicromapEXT; - mode?: CopyMicromapModeEXT; -} - -export class CopyMicromapInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyMicromapInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMicromapInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(CopyMicromapInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMicromapInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMicromapInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyMicromapInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.src !== undefined) this.src = data.src; - if (data.dst !== undefined) this.dst = data.dst; - if (data.mode !== undefined) this.mode = data.mode; - } - this.sType = StructureType.COPY_MICROMAP_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get src() { - return this.#view.getBigUint64(16, LE); - } - - set src(value: MicromapEXT) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dst() { - return this.#view.getBigUint64(24, LE); - } - - set dst(value: MicromapEXT) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get mode() { - return this.#view.getUint32(32, LE); - } - - set mode(value: CopyMicromapModeEXT) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitCopyMicromapToMemoryInfoEXT { - pNext?: AnyPointer; - src?: MicromapEXT; - dst?: DeviceOrHostAddressKHR; - mode?: CopyMicromapModeEXT; -} - -export class CopyMicromapToMemoryInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyMicromapToMemoryInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMicromapToMemoryInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(CopyMicromapToMemoryInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMicromapToMemoryInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMicromapToMemoryInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyMicromapToMemoryInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.src !== undefined) this.src = data.src; - if (data.dst !== undefined) this.dst = data.dst; - if (data.mode !== undefined) this.mode = data.mode; - } - this.sType = StructureType.COPY_MICROMAP_TO_MEMORY_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get src() { - return this.#view.getBigUint64(16, LE); - } - - set src(value: MicromapEXT) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get dst() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set dst(value: DeviceOrHostAddressKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get mode() { - return this.#view.getUint32(32, LE); - } - - set mode(value: CopyMicromapModeEXT) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitCopyMemoryToMicromapInfoEXT { - pNext?: AnyPointer; - src?: DeviceOrHostAddressConstKHR; - dst?: MicromapEXT; - mode?: CopyMicromapModeEXT; -} - -export class CopyMemoryToMicromapInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitCopyMemoryToMicromapInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitCopyMemoryToMicromapInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(CopyMemoryToMicromapInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, CopyMemoryToMicromapInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < CopyMemoryToMicromapInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(CopyMemoryToMicromapInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.src !== undefined) this.src = data.src; - if (data.dst !== undefined) this.dst = data.dst; - if (data.mode !== undefined) this.mode = data.mode; - } - this.sType = StructureType.COPY_MEMORY_TO_MICROMAP_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get src() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set src(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get dst() { - return this.#view.getBigUint64(24, LE); - } - - set dst(value: MicromapEXT) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get mode() { - return this.#view.getUint32(32, LE); - } - - set mode(value: CopyMicromapModeEXT) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitMicromapBuildSizesInfoEXT { - pNext?: AnyPointer; - micromapSize?: DeviceSize; - buildScratchSize?: DeviceSize; - discardable?: Bool32; -} - -export class MicromapBuildSizesInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMicromapBuildSizesInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapBuildSizesInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MicromapBuildSizesInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapBuildSizesInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapBuildSizesInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MicromapBuildSizesInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.micromapSize !== undefined) this.micromapSize = data.micromapSize; - if (data.buildScratchSize !== undefined) this.buildScratchSize = data.buildScratchSize; - if (data.discardable !== undefined) this.discardable = data.discardable; - } - this.sType = StructureType.MICROMAP_BUILD_SIZES_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get micromapSize() { - return this.#view.getBigUint64(16, LE); - } - - set micromapSize(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get buildScratchSize() { - return this.#view.getBigUint64(24, LE); - } - - set buildScratchSize(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get discardable() { - return this.#view.getUint32(32, LE); - } - - set discardable(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitMicromapUsageEXT { - count?: number; - subdivisionLevel?: number; - format?: number; -} - -export class MicromapUsageEXT implements BaseStruct { - static size = 12; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMicromapUsageEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapUsageEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MicromapUsageEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapUsageEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapUsageEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MicromapUsageEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.count !== undefined) this.count = data.count; - if (data.subdivisionLevel !== undefined) this.subdivisionLevel = data.subdivisionLevel; - if (data.format !== undefined) this.format = data.format; - } - } - - get count() { - return this.#view.getUint32(0, LE); - } - - set count(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get subdivisionLevel() { - return this.#view.getUint32(4, LE); - } - - set subdivisionLevel(value: number) { - this.#view.setUint32(4, Number(value), LE); - } - - get format() { - return this.#view.getUint32(8, LE); - } - - set format(value: number) { - this.#view.setUint32(8, Number(value), LE); - } -} - -export interface InitMicromapTriangleEXT { - dataOffset?: number; - subdivisionLevel?: number; - format?: number; -} - -export class MicromapTriangleEXT implements BaseStruct { - static size = 8; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitMicromapTriangleEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitMicromapTriangleEXT) { - if (data === undefined) { - this.#data = new Uint8Array(MicromapTriangleEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, MicromapTriangleEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < MicromapTriangleEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(MicromapTriangleEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.dataOffset !== undefined) this.dataOffset = data.dataOffset; - if (data.subdivisionLevel !== undefined) this.subdivisionLevel = data.subdivisionLevel; - if (data.format !== undefined) this.format = data.format; - } - } - - get dataOffset() { - return this.#view.getUint32(0, LE); - } - - set dataOffset(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get subdivisionLevel() { - return this.#view.getUint16(4, LE); - } - - set subdivisionLevel(value: number) { - this.#view.setUint16(4, Number(value), LE); - } - - get format() { - return this.#view.getUint16(6, LE); - } - - set format(value: number) { - this.#view.setUint16(6, Number(value), LE); - } -} - -export interface InitPhysicalDeviceOpacityMicromapFeaturesEXT { - pNext?: AnyPointer; - micromap?: Bool32; - micromapCaptureReplay?: Bool32; - micromapHostCommands?: Bool32; -} - -export class PhysicalDeviceOpacityMicromapFeaturesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceOpacityMicromapFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceOpacityMicromapFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpacityMicromapFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceOpacityMicromapFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.micromap !== undefined) this.micromap = data.micromap; - if (data.micromapCaptureReplay !== undefined) this.micromapCaptureReplay = data.micromapCaptureReplay; - if (data.micromapHostCommands !== undefined) this.micromapHostCommands = data.micromapHostCommands; - } - this.sType = StructureType.PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get micromap() { - return this.#view.getUint32(16, LE); - } - - set micromap(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get micromapCaptureReplay() { - return this.#view.getUint32(20, LE); - } - - set micromapCaptureReplay(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get micromapHostCommands() { - return this.#view.getUint32(24, LE); - } - - set micromapHostCommands(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceOpacityMicromapPropertiesEXT { - pNext?: AnyPointer; - maxOpacity2StateSubdivisionLevel?: number; - maxOpacity4StateSubdivisionLevel?: number; -} - -export class PhysicalDeviceOpacityMicromapPropertiesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceOpacityMicromapPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceOpacityMicromapPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpacityMicromapPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceOpacityMicromapPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceOpacityMicromapPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxOpacity2StateSubdivisionLevel !== undefined) this.maxOpacity2StateSubdivisionLevel = data.maxOpacity2StateSubdivisionLevel; - if (data.maxOpacity4StateSubdivisionLevel !== undefined) this.maxOpacity4StateSubdivisionLevel = data.maxOpacity4StateSubdivisionLevel; - } - this.sType = StructureType.PHYSICAL_DEVICE_OPACITY_MICROMAP_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxOpacity2StateSubdivisionLevel() { - return this.#view.getUint32(16, LE); - } - - set maxOpacity2StateSubdivisionLevel(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxOpacity4StateSubdivisionLevel() { - return this.#view.getUint32(20, LE); - } - - set maxOpacity4StateSubdivisionLevel(value: number) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitAccelerationStructureTrianglesOpacityMicromapEXT { - pNext?: AnyPointer; - indexType?: IndexType; - indexBuffer?: DeviceOrHostAddressConstKHR; - indexStride?: DeviceSize; - baseTriangle?: number; - usageCountsCount?: number; - pUsageCounts?: AnyPointer; - ppUsageCounts?: AnyPointer; - micromap?: MicromapEXT; -} - -export class AccelerationStructureTrianglesOpacityMicromapEXT implements BaseStruct { - static size = 72; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAccelerationStructureTrianglesOpacityMicromapEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAccelerationStructureTrianglesOpacityMicromapEXT) { - if (data === undefined) { - this.#data = new Uint8Array(AccelerationStructureTrianglesOpacityMicromapEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AccelerationStructureTrianglesOpacityMicromapEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AccelerationStructureTrianglesOpacityMicromapEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AccelerationStructureTrianglesOpacityMicromapEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.indexType !== undefined) this.indexType = data.indexType; - if (data.indexBuffer !== undefined) this.indexBuffer = data.indexBuffer; - if (data.indexStride !== undefined) this.indexStride = data.indexStride; - if (data.baseTriangle !== undefined) this.baseTriangle = data.baseTriangle; - if (data.usageCountsCount !== undefined) this.usageCountsCount = data.usageCountsCount; - if (data.pUsageCounts !== undefined) this.pUsageCounts = data.pUsageCounts; - if (data.ppUsageCounts !== undefined) this.ppUsageCounts = data.ppUsageCounts; - if (data.micromap !== undefined) this.micromap = data.micromap; - } - this.sType = StructureType.ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get indexType() { - return this.#view.getUint32(16, LE); - } - - set indexType(value: IndexType) { - this.#view.setUint32(16, Number(value), LE); - } - - get indexBuffer() { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - set indexBuffer(value: DeviceOrHostAddressConstKHR) { - throw new Error(`Unknown type: {"union":["u64","buffer"]}`); - } - - get indexStride() { - return this.#view.getBigUint64(32, LE); - } - - set indexStride(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get baseTriangle() { - return this.#view.getUint32(40, LE); - } - - set baseTriangle(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get usageCountsCount() { - return this.#view.getUint32(44, LE); - } - - set usageCountsCount(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get pUsageCounts() { - return this.#view.getBigUint64(48, LE); - } - - set pUsageCounts(value: AnyPointer) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } - - get ppUsageCounts() { - return this.#view.getBigUint64(56, LE); - } - - set ppUsageCounts(value: AnyPointer) { - this.#view.setBigUint64(56, BigInt(anyPointer(value)), LE); - } - - get micromap() { - return this.#view.getBigUint64(64, LE); - } - - set micromap(value: MicromapEXT) { - this.#view.setBigUint64(64, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPipelinePropertiesIdentifierEXT { - pNext?: AnyPointer; - pipelineIdentifier?: Uint8Array; -} - -export class PipelinePropertiesIdentifierEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelinePropertiesIdentifierEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelinePropertiesIdentifierEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelinePropertiesIdentifierEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelinePropertiesIdentifierEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelinePropertiesIdentifierEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelinePropertiesIdentifierEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipelineIdentifier !== undefined) this.pipelineIdentifier = data.pipelineIdentifier; - } - this.sType = StructureType.PIPELINE_PROPERTIES_IDENTIFIER_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipelineIdentifier() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 16); - } - - set pipelineIdentifier(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } -} - -export interface InitPhysicalDevicePipelinePropertiesFeaturesEXT { - pNext?: AnyPointer; - pipelinePropertiesIdentifier?: Bool32; -} - -export class PhysicalDevicePipelinePropertiesFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePipelinePropertiesFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelinePropertiesFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePipelinePropertiesFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelinePropertiesFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelinePropertiesFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePipelinePropertiesFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipelinePropertiesIdentifier !== undefined) this.pipelinePropertiesIdentifier = data.pipelinePropertiesIdentifier; - } - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipelinePropertiesIdentifier() { - return this.#view.getUint32(16, LE); - } - - set pipelinePropertiesIdentifier(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD { - pNext?: AnyPointer; - shaderEarlyAndLateFragmentTests?: Bool32; -} - -export class PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderEarlyAndLateFragmentTests !== undefined) this.shaderEarlyAndLateFragmentTests = data.shaderEarlyAndLateFragmentTests; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderEarlyAndLateFragmentTests() { - return this.#view.getUint32(16, LE); - } - - set shaderEarlyAndLateFragmentTests(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitExportMetalObjectCreateInfoEXT { - pNext?: AnyPointer; - exportObjectType?: ExportMetalObjectTypeFlagBitsEXT; -} - -export class ExportMetalObjectCreateInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMetalObjectCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalObjectCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMetalObjectCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalObjectCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalObjectCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMetalObjectCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.exportObjectType !== undefined) this.exportObjectType = data.exportObjectType; - } - this.sType = StructureType.EXPORT_METAL_OBJECT_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get exportObjectType() { - return this.#view.getUint32(16, LE); - } - - set exportObjectType(value: ExportMetalObjectTypeFlagBitsEXT) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitExportMetalObjectsInfoEXT { - pNext?: AnyPointer; -} - -export class ExportMetalObjectsInfoEXT implements BaseStruct { - static size = 16; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMetalObjectsInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalObjectsInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMetalObjectsInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalObjectsInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalObjectsInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMetalObjectsInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - } - this.sType = StructureType.EXPORT_METAL_OBJECTS_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportMetalDeviceInfoEXT { - pNext?: AnyPointer; - mtlDevice?: MTLDevice_id; -} - -export class ExportMetalDeviceInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMetalDeviceInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalDeviceInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMetalDeviceInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalDeviceInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalDeviceInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMetalDeviceInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.mtlDevice !== undefined) this.mtlDevice = data.mtlDevice; - } - this.sType = StructureType.EXPORT_METAL_DEVICE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get mtlDevice() { - return this.#view.getBigUint64(16, LE); - } - - set mtlDevice(value: MTLDevice_id) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportMetalCommandQueueInfoEXT { - pNext?: AnyPointer; - queue?: Queue; - mtlCommandQueue?: MTLCommandQueue_id; -} - -export class ExportMetalCommandQueueInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMetalCommandQueueInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalCommandQueueInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMetalCommandQueueInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalCommandQueueInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalCommandQueueInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMetalCommandQueueInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.queue !== undefined) this.queue = data.queue; - if (data.mtlCommandQueue !== undefined) this.mtlCommandQueue = data.mtlCommandQueue; - } - this.sType = StructureType.EXPORT_METAL_COMMAND_QUEUE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get queue() { - return this.#view.getBigUint64(16, LE); - } - - set queue(value: Queue) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get mtlCommandQueue() { - return this.#view.getBigUint64(24, LE); - } - - set mtlCommandQueue(value: MTLCommandQueue_id) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportMetalBufferInfoEXT { - pNext?: AnyPointer; - memory?: DeviceMemory; - mtlBuffer?: MTLBuffer_id; -} - -export class ExportMetalBufferInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMetalBufferInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalBufferInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMetalBufferInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalBufferInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalBufferInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMetalBufferInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.memory !== undefined) this.memory = data.memory; - if (data.mtlBuffer !== undefined) this.mtlBuffer = data.mtlBuffer; - } - this.sType = StructureType.EXPORT_METAL_BUFFER_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get memory() { - return this.#view.getBigUint64(16, LE); - } - - set memory(value: DeviceMemory) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get mtlBuffer() { - return this.#view.getBigUint64(24, LE); - } - - set mtlBuffer(value: MTLBuffer_id) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImportMetalBufferInfoEXT { - pNext?: AnyPointer; - mtlBuffer?: MTLBuffer_id; -} - -export class ImportMetalBufferInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMetalBufferInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMetalBufferInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMetalBufferInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalBufferInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMetalBufferInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMetalBufferInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.mtlBuffer !== undefined) this.mtlBuffer = data.mtlBuffer; - } - this.sType = StructureType.IMPORT_METAL_BUFFER_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get mtlBuffer() { - return this.#view.getBigUint64(16, LE); - } - - set mtlBuffer(value: MTLBuffer_id) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportMetalTextureInfoEXT { - pNext?: AnyPointer; - image?: Image; - imageView?: ImageView; - bufferView?: BufferView; - plane?: ImageAspectFlagBits; - mtlTexture?: MTLTexture_id; -} - -export class ExportMetalTextureInfoEXT implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMetalTextureInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalTextureInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMetalTextureInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalTextureInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalTextureInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMetalTextureInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.image !== undefined) this.image = data.image; - if (data.imageView !== undefined) this.imageView = data.imageView; - if (data.bufferView !== undefined) this.bufferView = data.bufferView; - if (data.plane !== undefined) this.plane = data.plane; - if (data.mtlTexture !== undefined) this.mtlTexture = data.mtlTexture; - } - this.sType = StructureType.EXPORT_METAL_TEXTURE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get image() { - return this.#view.getBigUint64(16, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get imageView() { - return this.#view.getBigUint64(24, LE); - } - - set imageView(value: ImageView) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get bufferView() { - return this.#view.getBigUint64(32, LE); - } - - set bufferView(value: BufferView) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } - - get plane() { - return this.#view.getUint32(40, LE); - } - - set plane(value: ImageAspectFlagBits) { - this.#view.setUint32(40, Number(value), LE); - } - - get mtlTexture() { - return this.#view.getBigUint64(48, LE); - } - - set mtlTexture(value: MTLTexture_id) { - this.#view.setBigUint64(48, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImportMetalTextureInfoEXT { - pNext?: AnyPointer; - plane?: ImageAspectFlagBits; - mtlTexture?: MTLTexture_id; -} - -export class ImportMetalTextureInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMetalTextureInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMetalTextureInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMetalTextureInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalTextureInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMetalTextureInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMetalTextureInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.plane !== undefined) this.plane = data.plane; - if (data.mtlTexture !== undefined) this.mtlTexture = data.mtlTexture; - } - this.sType = StructureType.IMPORT_METAL_TEXTURE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get plane() { - return this.#view.getUint32(16, LE); - } - - set plane(value: ImageAspectFlagBits) { - this.#view.setUint32(16, Number(value), LE); - } - - get mtlTexture() { - return this.#view.getBigUint64(24, LE); - } - - set mtlTexture(value: MTLTexture_id) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportMetalIOSurfaceInfoEXT { - pNext?: AnyPointer; - image?: Image; - ioSurface?: IOSurfaceRef; -} - -export class ExportMetalIOSurfaceInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMetalIOSurfaceInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalIOSurfaceInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMetalIOSurfaceInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalIOSurfaceInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalIOSurfaceInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMetalIOSurfaceInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.image !== undefined) this.image = data.image; - if (data.ioSurface !== undefined) this.ioSurface = data.ioSurface; - } - this.sType = StructureType.EXPORT_METAL_IO_SURFACE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get image() { - return this.#view.getBigUint64(16, LE); - } - - set image(value: Image) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get ioSurface() { - return this.#view.getBigUint64(24, LE); - } - - set ioSurface(value: IOSurfaceRef) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImportMetalIOSurfaceInfoEXT { - pNext?: AnyPointer; - ioSurface?: IOSurfaceRef; -} - -export class ImportMetalIOSurfaceInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMetalIOSurfaceInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMetalIOSurfaceInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMetalIOSurfaceInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalIOSurfaceInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMetalIOSurfaceInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMetalIOSurfaceInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.ioSurface !== undefined) this.ioSurface = data.ioSurface; - } - this.sType = StructureType.IMPORT_METAL_IO_SURFACE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get ioSurface() { - return this.#view.getBigUint64(16, LE); - } - - set ioSurface(value: IOSurfaceRef) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitExportMetalSharedEventInfoEXT { - pNext?: AnyPointer; - semaphore?: Semaphore; - event?: Event; - mtlSharedEvent?: MTLSharedEvent_id; -} - -export class ExportMetalSharedEventInfoEXT implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitExportMetalSharedEventInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitExportMetalSharedEventInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ExportMetalSharedEventInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ExportMetalSharedEventInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ExportMetalSharedEventInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ExportMetalSharedEventInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.semaphore !== undefined) this.semaphore = data.semaphore; - if (data.event !== undefined) this.event = data.event; - if (data.mtlSharedEvent !== undefined) this.mtlSharedEvent = data.mtlSharedEvent; - } - this.sType = StructureType.EXPORT_METAL_SHARED_EVENT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get semaphore() { - return this.#view.getBigUint64(16, LE); - } - - set semaphore(value: Semaphore) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } - - get event() { - return this.#view.getBigUint64(24, LE); - } - - set event(value: Event) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } - - get mtlSharedEvent() { - return this.#view.getBigUint64(32, LE); - } - - set mtlSharedEvent(value: MTLSharedEvent_id) { - this.#view.setBigUint64(32, BigInt(anyPointer(value)), LE); - } -} - -export interface InitImportMetalSharedEventInfoEXT { - pNext?: AnyPointer; - mtlSharedEvent?: MTLSharedEvent_id; -} - -export class ImportMetalSharedEventInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImportMetalSharedEventInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImportMetalSharedEventInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(ImportMetalSharedEventInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImportMetalSharedEventInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImportMetalSharedEventInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImportMetalSharedEventInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.mtlSharedEvent !== undefined) this.mtlSharedEvent = data.mtlSharedEvent; - } - this.sType = StructureType.IMPORT_METAL_SHARED_EVENT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get mtlSharedEvent() { - return this.#view.getBigUint64(16, LE); - } - - set mtlSharedEvent(value: MTLSharedEvent_id) { - this.#view.setBigUint64(16, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceNonSeamlessCubeMapFeaturesEXT { - pNext?: AnyPointer; - nonSeamlessCubeMap?: Bool32; -} - -export class PhysicalDeviceNonSeamlessCubeMapFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceNonSeamlessCubeMapFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceNonSeamlessCubeMapFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceNonSeamlessCubeMapFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.nonSeamlessCubeMap !== undefined) this.nonSeamlessCubeMap = data.nonSeamlessCubeMap; - } - this.sType = StructureType.PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get nonSeamlessCubeMap() { - return this.#view.getUint32(16, LE); - } - - set nonSeamlessCubeMap(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDevicePipelineRobustnessFeaturesEXT { - pNext?: AnyPointer; - pipelineRobustness?: Bool32; -} - -export class PhysicalDevicePipelineRobustnessFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePipelineRobustnessFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineRobustnessFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineRobustnessFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineRobustnessFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.pipelineRobustness !== undefined) this.pipelineRobustness = data.pipelineRobustness; - } - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get pipelineRobustness() { - return this.#view.getUint32(16, LE); - } - - set pipelineRobustness(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPipelineRobustnessCreateInfoEXT { - pNext?: AnyPointer; - storageBuffers?: PipelineRobustnessBufferBehaviorEXT; - uniformBuffers?: PipelineRobustnessBufferBehaviorEXT; - vertexInputs?: PipelineRobustnessBufferBehaviorEXT; - images?: PipelineRobustnessImageBehaviorEXT; -} - -export class PipelineRobustnessCreateInfoEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPipelineRobustnessCreateInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPipelineRobustnessCreateInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PipelineRobustnessCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PipelineRobustnessCreateInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PipelineRobustnessCreateInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PipelineRobustnessCreateInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.storageBuffers !== undefined) this.storageBuffers = data.storageBuffers; - if (data.uniformBuffers !== undefined) this.uniformBuffers = data.uniformBuffers; - if (data.vertexInputs !== undefined) this.vertexInputs = data.vertexInputs; - if (data.images !== undefined) this.images = data.images; - } - this.sType = StructureType.PIPELINE_ROBUSTNESS_CREATE_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get storageBuffers() { - return this.#view.getUint32(16, LE); - } - - set storageBuffers(value: PipelineRobustnessBufferBehaviorEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get uniformBuffers() { - return this.#view.getUint32(20, LE); - } - - set uniformBuffers(value: PipelineRobustnessBufferBehaviorEXT) { - this.#view.setUint32(20, Number(value), LE); - } - - get vertexInputs() { - return this.#view.getUint32(24, LE); - } - - set vertexInputs(value: PipelineRobustnessBufferBehaviorEXT) { - this.#view.setUint32(24, Number(value), LE); - } - - get images() { - return this.#view.getUint32(28, LE); - } - - set images(value: PipelineRobustnessImageBehaviorEXT) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDevicePipelineRobustnessPropertiesEXT { - pNext?: AnyPointer; - defaultRobustnessStorageBuffers?: PipelineRobustnessBufferBehaviorEXT; - defaultRobustnessUniformBuffers?: PipelineRobustnessBufferBehaviorEXT; - defaultRobustnessVertexInputs?: PipelineRobustnessBufferBehaviorEXT; - defaultRobustnessImages?: PipelineRobustnessImageBehaviorEXT; -} - -export class PhysicalDevicePipelineRobustnessPropertiesEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDevicePipelineRobustnessPropertiesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDevicePipelineRobustnessPropertiesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDevicePipelineRobustnessPropertiesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDevicePipelineRobustnessPropertiesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDevicePipelineRobustnessPropertiesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.defaultRobustnessStorageBuffers !== undefined) this.defaultRobustnessStorageBuffers = data.defaultRobustnessStorageBuffers; - if (data.defaultRobustnessUniformBuffers !== undefined) this.defaultRobustnessUniformBuffers = data.defaultRobustnessUniformBuffers; - if (data.defaultRobustnessVertexInputs !== undefined) this.defaultRobustnessVertexInputs = data.defaultRobustnessVertexInputs; - if (data.defaultRobustnessImages !== undefined) this.defaultRobustnessImages = data.defaultRobustnessImages; - } - this.sType = StructureType.PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get defaultRobustnessStorageBuffers() { - return this.#view.getUint32(16, LE); - } - - set defaultRobustnessStorageBuffers(value: PipelineRobustnessBufferBehaviorEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get defaultRobustnessUniformBuffers() { - return this.#view.getUint32(20, LE); - } - - set defaultRobustnessUniformBuffers(value: PipelineRobustnessBufferBehaviorEXT) { - this.#view.setUint32(20, Number(value), LE); - } - - get defaultRobustnessVertexInputs() { - return this.#view.getUint32(24, LE); - } - - set defaultRobustnessVertexInputs(value: PipelineRobustnessBufferBehaviorEXT) { - this.#view.setUint32(24, Number(value), LE); - } - - get defaultRobustnessImages() { - return this.#view.getUint32(28, LE); - } - - set defaultRobustnessImages(value: PipelineRobustnessImageBehaviorEXT) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitImageViewSampleWeightCreateInfoQCOM { - pNext?: AnyPointer; - filterCenter?: Offset2D; - filterSize?: Extent2D; - numPhases?: number; -} - -export class ImageViewSampleWeightCreateInfoQCOM implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitImageViewSampleWeightCreateInfoQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitImageViewSampleWeightCreateInfoQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(ImageViewSampleWeightCreateInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ImageViewSampleWeightCreateInfoQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < ImageViewSampleWeightCreateInfoQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(ImageViewSampleWeightCreateInfoQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.filterCenter !== undefined) this.filterCenter = data.filterCenter; - if (data.filterSize !== undefined) this.filterSize = data.filterSize; - if (data.numPhases !== undefined) this.numPhases = data.numPhases; - } - this.sType = StructureType.IMAGE_VIEW_SAMPLE_WEIGHT_CREATE_INFO_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get filterCenter() { - return new Offset2D(this.#data.subarray(16, 16 + Offset2D.size)); - } - - set filterCenter(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get filterSize() { - return new Extent2D(this.#data.subarray(24, 24 + Extent2D.size)); - } - - set filterSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 24); - } - - get numPhases() { - return this.#view.getUint32(32, LE); - } - - set numPhases(value: number) { - this.#view.setUint32(32, Number(value), LE); - } -} - -export interface InitPhysicalDeviceImageProcessingFeaturesQCOM { - pNext?: AnyPointer; - textureSampleWeighted?: Bool32; - textureBoxFilter?: Bool32; - textureBlockMatch?: Bool32; -} - -export class PhysicalDeviceImageProcessingFeaturesQCOM implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImageProcessingFeaturesQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageProcessingFeaturesQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImageProcessingFeaturesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageProcessingFeaturesQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageProcessingFeaturesQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImageProcessingFeaturesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.textureSampleWeighted !== undefined) this.textureSampleWeighted = data.textureSampleWeighted; - if (data.textureBoxFilter !== undefined) this.textureBoxFilter = data.textureBoxFilter; - if (data.textureBlockMatch !== undefined) this.textureBlockMatch = data.textureBlockMatch; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get textureSampleWeighted() { - return this.#view.getUint32(16, LE); - } - - set textureSampleWeighted(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get textureBoxFilter() { - return this.#view.getUint32(20, LE); - } - - set textureBoxFilter(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } - - get textureBlockMatch() { - return this.#view.getUint32(24, LE); - } - - set textureBlockMatch(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } -} - -export interface InitPhysicalDeviceImageProcessingPropertiesQCOM { - pNext?: AnyPointer; - maxWeightFilterPhases?: number; - maxWeightFilterDimension?: Extent2D; - maxBlockMatchRegion?: Extent2D; - maxBoxFilterBlockSize?: Extent2D; -} - -export class PhysicalDeviceImageProcessingPropertiesQCOM implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceImageProcessingPropertiesQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceImageProcessingPropertiesQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceImageProcessingPropertiesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceImageProcessingPropertiesQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceImageProcessingPropertiesQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceImageProcessingPropertiesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.maxWeightFilterPhases !== undefined) this.maxWeightFilterPhases = data.maxWeightFilterPhases; - if (data.maxWeightFilterDimension !== undefined) this.maxWeightFilterDimension = data.maxWeightFilterDimension; - if (data.maxBlockMatchRegion !== undefined) this.maxBlockMatchRegion = data.maxBlockMatchRegion; - if (data.maxBoxFilterBlockSize !== undefined) this.maxBoxFilterBlockSize = data.maxBoxFilterBlockSize; - } - this.sType = StructureType.PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get maxWeightFilterPhases() { - return this.#view.getUint32(16, LE); - } - - set maxWeightFilterPhases(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get maxWeightFilterDimension() { - return new Extent2D(this.#data.subarray(20, 20 + Extent2D.size)); - } - - set maxWeightFilterDimension(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 20); - } - - get maxBlockMatchRegion() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - - set maxBlockMatchRegion(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 28); - } - - get maxBoxFilterBlockSize() { - return new Extent2D(this.#data.subarray(36, 36 + Extent2D.size)); - } - - set maxBoxFilterBlockSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 36); - } -} - -export interface InitPhysicalDeviceTilePropertiesFeaturesQCOM { - pNext?: AnyPointer; - tileProperties?: Bool32; -} - -export class PhysicalDeviceTilePropertiesFeaturesQCOM implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceTilePropertiesFeaturesQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceTilePropertiesFeaturesQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceTilePropertiesFeaturesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceTilePropertiesFeaturesQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceTilePropertiesFeaturesQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceTilePropertiesFeaturesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.tileProperties !== undefined) this.tileProperties = data.tileProperties; - } - this.sType = StructureType.PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get tileProperties() { - return this.#view.getUint32(16, LE); - } - - set tileProperties(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitTilePropertiesQCOM { - pNext?: AnyPointer; - tileSize?: Extent3D; - apronSize?: Extent2D; - origin?: Offset2D; -} - -export class TilePropertiesQCOM implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitTilePropertiesQCOM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitTilePropertiesQCOM) { - if (data === undefined) { - this.#data = new Uint8Array(TilePropertiesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, TilePropertiesQCOM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < TilePropertiesQCOM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(TilePropertiesQCOM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.tileSize !== undefined) this.tileSize = data.tileSize; - if (data.apronSize !== undefined) this.apronSize = data.apronSize; - if (data.origin !== undefined) this.origin = data.origin; - } - this.sType = StructureType.TILE_PROPERTIES_QCOM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get tileSize() { - return new Extent3D(this.#data.subarray(16, 16 + Extent3D.size)); - } - - set tileSize(value: Extent3D) { - if (value[BUFFER].byteLength < Extent3D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 16); - } - - get apronSize() { - return new Extent2D(this.#data.subarray(28, 28 + Extent2D.size)); - } - - set apronSize(value: Extent2D) { - if (value[BUFFER].byteLength < Extent2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 28); - } - - get origin() { - return new Offset2D(this.#data.subarray(36, 36 + Offset2D.size)); - } - - set origin(value: Offset2D) { - if (value[BUFFER].byteLength < Offset2D.size) { - throw new Error("Data buffer too small"); - } - this.#data.set(value[BUFFER], 36); - } -} - -export interface InitPhysicalDeviceAmigoProfilingFeaturesSEC { - pNext?: AnyPointer; - amigoProfiling?: Bool32; -} - -export class PhysicalDeviceAmigoProfilingFeaturesSEC implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceAmigoProfilingFeaturesSEC); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAmigoProfilingFeaturesSEC) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceAmigoProfilingFeaturesSEC.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAmigoProfilingFeaturesSEC.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAmigoProfilingFeaturesSEC.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceAmigoProfilingFeaturesSEC.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.amigoProfiling !== undefined) this.amigoProfiling = data.amigoProfiling; - } - this.sType = StructureType.PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get amigoProfiling() { - return this.#view.getUint32(16, LE); - } - - set amigoProfiling(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitAmigoProfilingSubmitInfoSEC { - pNext?: AnyPointer; - firstDrawTimestamp?: Deno.PointerValue; - swapBufferTimestamp?: Deno.PointerValue; -} - -export class AmigoProfilingSubmitInfoSEC implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitAmigoProfilingSubmitInfoSEC); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitAmigoProfilingSubmitInfoSEC) { - if (data === undefined) { - this.#data = new Uint8Array(AmigoProfilingSubmitInfoSEC.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, AmigoProfilingSubmitInfoSEC.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < AmigoProfilingSubmitInfoSEC.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(AmigoProfilingSubmitInfoSEC.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.firstDrawTimestamp !== undefined) this.firstDrawTimestamp = data.firstDrawTimestamp; - if (data.swapBufferTimestamp !== undefined) this.swapBufferTimestamp = data.swapBufferTimestamp; - } - this.sType = StructureType.AMIGO_PROFILING_SUBMIT_INFO_SEC; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get firstDrawTimestamp() { - return this.#view.getBigUint64(16, LE); - } - - set firstDrawTimestamp(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get swapBufferTimestamp() { - return this.#view.getBigUint64(24, LE); - } - - set swapBufferTimestamp(value: Deno.PointerValue) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT { - pNext?: AnyPointer; - attachmentFeedbackLoopLayout?: Bool32; -} - -export class PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.attachmentFeedbackLoopLayout !== undefined) this.attachmentFeedbackLoopLayout = data.attachmentFeedbackLoopLayout; - } - this.sType = StructureType.PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get attachmentFeedbackLoopLayout() { - return this.#view.getUint32(16, LE); - } - - set attachmentFeedbackLoopLayout(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceDepthClampZeroOneFeaturesEXT { - pNext?: AnyPointer; - depthClampZeroOne?: Bool32; -} - -export class PhysicalDeviceDepthClampZeroOneFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceDepthClampZeroOneFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceDepthClampZeroOneFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceDepthClampZeroOneFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceDepthClampZeroOneFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceDepthClampZeroOneFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceDepthClampZeroOneFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.depthClampZeroOne !== undefined) this.depthClampZeroOne = data.depthClampZeroOne; - } - this.sType = StructureType.PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get depthClampZeroOne() { - return this.#view.getUint32(16, LE); - } - - set depthClampZeroOne(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceAddressBindingReportFeaturesEXT { - pNext?: AnyPointer; - reportAddressBinding?: Bool32; -} - -export class PhysicalDeviceAddressBindingReportFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceAddressBindingReportFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceAddressBindingReportFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceAddressBindingReportFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceAddressBindingReportFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceAddressBindingReportFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceAddressBindingReportFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.reportAddressBinding !== undefined) this.reportAddressBinding = data.reportAddressBinding; - } - this.sType = StructureType.PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get reportAddressBinding() { - return this.#view.getUint32(16, LE); - } - - set reportAddressBinding(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitDeviceAddressBindingCallbackDataEXT { - pNext?: AnyPointer; - flags?: DeviceAddressBindingFlagsEXT; - baseAddress?: DeviceAddress; - size?: DeviceSize; - bindingType?: DeviceAddressBindingTypeEXT; -} - -export class DeviceAddressBindingCallbackDataEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceAddressBindingCallbackDataEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceAddressBindingCallbackDataEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceAddressBindingCallbackDataEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceAddressBindingCallbackDataEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceAddressBindingCallbackDataEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceAddressBindingCallbackDataEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.baseAddress !== undefined) this.baseAddress = data.baseAddress; - if (data.size !== undefined) this.size = data.size; - if (data.bindingType !== undefined) this.bindingType = data.bindingType; - } - this.sType = StructureType.DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: DeviceAddressBindingFlagsEXT) { - this.#view.setUint32(16, Number(value), LE); - } - - get baseAddress() { - return this.#view.getBigUint64(24, LE); - } - - set baseAddress(value: DeviceAddress) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get size() { - return this.#view.getBigUint64(32, LE); - } - - set size(value: DeviceSize) { - this.#view.setBigUint64(32, BigInt(value), LE); - } - - get bindingType() { - return this.#view.getUint32(40, LE); - } - - set bindingType(value: DeviceAddressBindingTypeEXT) { - this.#view.setUint32(40, Number(value), LE); - } -} - -export interface InitPhysicalDeviceOpticalFlowFeaturesNV { - pNext?: AnyPointer; - opticalFlow?: Bool32; -} - -export class PhysicalDeviceOpticalFlowFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceOpticalFlowFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceOpticalFlowFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceOpticalFlowFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpticalFlowFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceOpticalFlowFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceOpticalFlowFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.opticalFlow !== undefined) this.opticalFlow = data.opticalFlow; - } - this.sType = StructureType.PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get opticalFlow() { - return this.#view.getUint32(16, LE); - } - - set opticalFlow(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceOpticalFlowPropertiesNV { - pNext?: AnyPointer; - supportedOutputGridSizes?: OpticalFlowGridSizeFlagsNV; - supportedHintGridSizes?: OpticalFlowGridSizeFlagsNV; - hintSupported?: Bool32; - costSupported?: Bool32; - bidirectionalFlowSupported?: Bool32; - globalFlowSupported?: Bool32; - minWidth?: number; - minHeight?: number; - maxWidth?: number; - maxHeight?: number; - maxNumRegionsOfInterest?: number; -} - -export class PhysicalDeviceOpticalFlowPropertiesNV implements BaseStruct { - static size = 64; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceOpticalFlowPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceOpticalFlowPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceOpticalFlowPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceOpticalFlowPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceOpticalFlowPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceOpticalFlowPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.supportedOutputGridSizes !== undefined) this.supportedOutputGridSizes = data.supportedOutputGridSizes; - if (data.supportedHintGridSizes !== undefined) this.supportedHintGridSizes = data.supportedHintGridSizes; - if (data.hintSupported !== undefined) this.hintSupported = data.hintSupported; - if (data.costSupported !== undefined) this.costSupported = data.costSupported; - if (data.bidirectionalFlowSupported !== undefined) this.bidirectionalFlowSupported = data.bidirectionalFlowSupported; - if (data.globalFlowSupported !== undefined) this.globalFlowSupported = data.globalFlowSupported; - if (data.minWidth !== undefined) this.minWidth = data.minWidth; - if (data.minHeight !== undefined) this.minHeight = data.minHeight; - if (data.maxWidth !== undefined) this.maxWidth = data.maxWidth; - if (data.maxHeight !== undefined) this.maxHeight = data.maxHeight; - if (data.maxNumRegionsOfInterest !== undefined) this.maxNumRegionsOfInterest = data.maxNumRegionsOfInterest; - } - this.sType = StructureType.PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get supportedOutputGridSizes() { - return this.#view.getUint32(16, LE); - } - - set supportedOutputGridSizes(value: OpticalFlowGridSizeFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get supportedHintGridSizes() { - return this.#view.getUint32(20, LE); - } - - set supportedHintGridSizes(value: OpticalFlowGridSizeFlagsNV) { - this.#view.setUint32(20, Number(value), LE); - } - - get hintSupported() { - return this.#view.getUint32(24, LE); - } - - set hintSupported(value: Bool32) { - this.#view.setUint32(24, Number(value), LE); - } - - get costSupported() { - return this.#view.getUint32(28, LE); - } - - set costSupported(value: Bool32) { - this.#view.setUint32(28, Number(value), LE); - } - - get bidirectionalFlowSupported() { - return this.#view.getUint32(32, LE); - } - - set bidirectionalFlowSupported(value: Bool32) { - this.#view.setUint32(32, Number(value), LE); - } - - get globalFlowSupported() { - return this.#view.getUint32(36, LE); - } - - set globalFlowSupported(value: Bool32) { - this.#view.setUint32(36, Number(value), LE); - } - - get minWidth() { - return this.#view.getUint32(40, LE); - } - - set minWidth(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get minHeight() { - return this.#view.getUint32(44, LE); - } - - set minHeight(value: number) { - this.#view.setUint32(44, Number(value), LE); - } - - get maxWidth() { - return this.#view.getUint32(48, LE); - } - - set maxWidth(value: number) { - this.#view.setUint32(48, Number(value), LE); - } - - get maxHeight() { - return this.#view.getUint32(52, LE); - } - - set maxHeight(value: number) { - this.#view.setUint32(52, Number(value), LE); - } - - get maxNumRegionsOfInterest() { - return this.#view.getUint32(56, LE); - } - - set maxNumRegionsOfInterest(value: number) { - this.#view.setUint32(56, Number(value), LE); - } -} - -export interface InitOpticalFlowImageFormatInfoNV { - pNext?: AnyPointer; - usage?: OpticalFlowUsageFlagsNV; -} - -export class OpticalFlowImageFormatInfoNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitOpticalFlowImageFormatInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowImageFormatInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(OpticalFlowImageFormatInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowImageFormatInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowImageFormatInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(OpticalFlowImageFormatInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.usage !== undefined) this.usage = data.usage; - } - this.sType = StructureType.OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get usage() { - return this.#view.getUint32(16, LE); - } - - set usage(value: OpticalFlowUsageFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitOpticalFlowImageFormatPropertiesNV { - pNext?: AnyPointer; - format?: Format; -} - -export class OpticalFlowImageFormatPropertiesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitOpticalFlowImageFormatPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowImageFormatPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(OpticalFlowImageFormatPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowImageFormatPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowImageFormatPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(OpticalFlowImageFormatPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.format !== undefined) this.format = data.format; - } - this.sType = StructureType.OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get format() { - return this.#view.getUint32(16, LE); - } - - set format(value: Format) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitOpticalFlowSessionCreateInfoNV { - pNext?: AnyPointer; - width?: number; - height?: number; - imageFormat?: Format; - flowVectorFormat?: Format; - costFormat?: Format; - outputGridSize?: OpticalFlowGridSizeFlagsNV; - hintGridSize?: OpticalFlowGridSizeFlagsNV; - performanceLevel?: OpticalFlowPerformanceLevelNV; - flags?: OpticalFlowSessionCreateFlagsNV; -} - -export class OpticalFlowSessionCreateInfoNV implements BaseStruct { - static size = 56; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitOpticalFlowSessionCreateInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowSessionCreateInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(OpticalFlowSessionCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowSessionCreateInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowSessionCreateInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(OpticalFlowSessionCreateInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.width !== undefined) this.width = data.width; - if (data.height !== undefined) this.height = data.height; - if (data.imageFormat !== undefined) this.imageFormat = data.imageFormat; - if (data.flowVectorFormat !== undefined) this.flowVectorFormat = data.flowVectorFormat; - if (data.costFormat !== undefined) this.costFormat = data.costFormat; - if (data.outputGridSize !== undefined) this.outputGridSize = data.outputGridSize; - if (data.hintGridSize !== undefined) this.hintGridSize = data.hintGridSize; - if (data.performanceLevel !== undefined) this.performanceLevel = data.performanceLevel; - if (data.flags !== undefined) this.flags = data.flags; - } - this.sType = StructureType.OPTICAL_FLOW_SESSION_CREATE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get width() { - return this.#view.getUint32(16, LE); - } - - set width(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get height() { - return this.#view.getUint32(20, LE); - } - - set height(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get imageFormat() { - return this.#view.getUint32(24, LE); - } - - set imageFormat(value: Format) { - this.#view.setUint32(24, Number(value), LE); - } - - get flowVectorFormat() { - return this.#view.getUint32(28, LE); - } - - set flowVectorFormat(value: Format) { - this.#view.setUint32(28, Number(value), LE); - } - - get costFormat() { - return this.#view.getUint32(32, LE); - } - - set costFormat(value: Format) { - this.#view.setUint32(32, Number(value), LE); - } - - get outputGridSize() { - return this.#view.getUint32(36, LE); - } - - set outputGridSize(value: OpticalFlowGridSizeFlagsNV) { - this.#view.setUint32(36, Number(value), LE); - } - - get hintGridSize() { - return this.#view.getUint32(40, LE); - } - - set hintGridSize(value: OpticalFlowGridSizeFlagsNV) { - this.#view.setUint32(40, Number(value), LE); - } - - get performanceLevel() { - return this.#view.getUint32(44, LE); - } - - set performanceLevel(value: OpticalFlowPerformanceLevelNV) { - this.#view.setUint32(44, Number(value), LE); - } - - get flags() { - return this.#view.getUint32(48, LE); - } - - set flags(value: OpticalFlowSessionCreateFlagsNV) { - this.#view.setUint32(48, Number(value), LE); - } -} - -export interface InitOpticalFlowSessionCreatePrivateDataInfoNV { - pNext?: AnyPointer; - id?: number; - size?: number; - pPrivateData?: AnyPointer; -} - -export class OpticalFlowSessionCreatePrivateDataInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitOpticalFlowSessionCreatePrivateDataInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowSessionCreatePrivateDataInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(OpticalFlowSessionCreatePrivateDataInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowSessionCreatePrivateDataInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowSessionCreatePrivateDataInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(OpticalFlowSessionCreatePrivateDataInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.id !== undefined) this.id = data.id; - if (data.size !== undefined) this.size = data.size; - if (data.pPrivateData !== undefined) this.pPrivateData = data.pPrivateData; - } - this.sType = StructureType.OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get id() { - return this.#view.getUint32(16, LE); - } - - set id(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get size() { - return this.#view.getUint32(20, LE); - } - - set size(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pPrivateData() { - return this.#view.getBigUint64(24, LE); - } - - set pPrivateData(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitOpticalFlowExecuteInfoNV { - pNext?: AnyPointer; - flags?: OpticalFlowExecuteFlagsNV; - regionCount?: number; - pRegions?: AnyPointer; -} - -export class OpticalFlowExecuteInfoNV implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitOpticalFlowExecuteInfoNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitOpticalFlowExecuteInfoNV) { - if (data === undefined) { - this.#data = new Uint8Array(OpticalFlowExecuteInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, OpticalFlowExecuteInfoNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < OpticalFlowExecuteInfoNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(OpticalFlowExecuteInfoNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.flags !== undefined) this.flags = data.flags; - if (data.regionCount !== undefined) this.regionCount = data.regionCount; - if (data.pRegions !== undefined) this.pRegions = data.pRegions; - } - this.sType = StructureType.OPTICAL_FLOW_EXECUTE_INFO_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get flags() { - return this.#view.getUint32(16, LE); - } - - set flags(value: OpticalFlowExecuteFlagsNV) { - this.#view.setUint32(16, Number(value), LE); - } - - get regionCount() { - return this.#view.getUint32(20, LE); - } - - set regionCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get pRegions() { - return this.#view.getBigUint64(24, LE); - } - - set pRegions(value: AnyPointer) { - this.#view.setBigUint64(24, BigInt(anyPointer(value)), LE); - } -} - -export interface InitPhysicalDeviceFaultFeaturesEXT { - pNext?: AnyPointer; - deviceFault?: Bool32; - deviceFaultVendorBinary?: Bool32; -} - -export class PhysicalDeviceFaultFeaturesEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceFaultFeaturesEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceFaultFeaturesEXT) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceFaultFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceFaultFeaturesEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceFaultFeaturesEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceFaultFeaturesEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.deviceFault !== undefined) this.deviceFault = data.deviceFault; - if (data.deviceFaultVendorBinary !== undefined) this.deviceFaultVendorBinary = data.deviceFaultVendorBinary; - } - this.sType = StructureType.PHYSICAL_DEVICE_FAULT_FEATURES_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get deviceFault() { - return this.#view.getUint32(16, LE); - } - - set deviceFault(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } - - get deviceFaultVendorBinary() { - return this.#view.getUint32(20, LE); - } - - set deviceFaultVendorBinary(value: Bool32) { - this.#view.setUint32(20, Number(value), LE); - } -} - -export interface InitDeviceFaultAddressInfoEXT { - addressType?: DeviceFaultAddressTypeEXT; - reportedAddress?: DeviceAddress; - addressPrecision?: DeviceSize; -} - -export class DeviceFaultAddressInfoEXT implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceFaultAddressInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultAddressInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceFaultAddressInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultAddressInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultAddressInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceFaultAddressInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.addressType !== undefined) this.addressType = data.addressType; - if (data.reportedAddress !== undefined) this.reportedAddress = data.reportedAddress; - if (data.addressPrecision !== undefined) this.addressPrecision = data.addressPrecision; - } - } - - get addressType() { - return this.#view.getUint32(0, LE); - } - - set addressType(value: DeviceFaultAddressTypeEXT) { - this.#view.setUint32(0, Number(value), LE); - } - - get reportedAddress() { - return this.#view.getBigUint64(8, LE); - } - - set reportedAddress(value: DeviceAddress) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get addressPrecision() { - return this.#view.getBigUint64(16, LE); - } - - set addressPrecision(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } -} - -export interface InitDeviceFaultVendorInfoEXT { - description?: Uint8Array; - vendorFaultCode?: Deno.PointerValue; - vendorFaultData?: Deno.PointerValue; -} - -export class DeviceFaultVendorInfoEXT implements BaseStruct { - static size = 272; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceFaultVendorInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultVendorInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceFaultVendorInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultVendorInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultVendorInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceFaultVendorInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.description !== undefined) this.description = data.description; - if (data.vendorFaultCode !== undefined) this.vendorFaultCode = data.vendorFaultCode; - if (data.vendorFaultData !== undefined) this.vendorFaultData = data.vendorFaultData; - } - } - - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 0, 256); - } - - set description(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 0); - } - - get vendorFaultCode() { - return this.#view.getBigUint64(256, LE); - } - - set vendorFaultCode(value: Deno.PointerValue) { - this.#view.setBigUint64(256, BigInt(value), LE); - } - - get vendorFaultData() { - return this.#view.getBigUint64(264, LE); - } - - set vendorFaultData(value: Deno.PointerValue) { - this.#view.setBigUint64(264, BigInt(value), LE); - } -} - -export interface InitDeviceFaultCountsEXT { - pNext?: AnyPointer; - addressInfoCount?: number; - vendorInfoCount?: number; - vendorBinarySize?: DeviceSize; -} - -export class DeviceFaultCountsEXT implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceFaultCountsEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultCountsEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceFaultCountsEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultCountsEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultCountsEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceFaultCountsEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.addressInfoCount !== undefined) this.addressInfoCount = data.addressInfoCount; - if (data.vendorInfoCount !== undefined) this.vendorInfoCount = data.vendorInfoCount; - if (data.vendorBinarySize !== undefined) this.vendorBinarySize = data.vendorBinarySize; - } - this.sType = StructureType.DEVICE_FAULT_COUNTS_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get addressInfoCount() { - return this.#view.getUint32(16, LE); - } - - set addressInfoCount(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get vendorInfoCount() { - return this.#view.getUint32(20, LE); - } - - set vendorInfoCount(value: number) { - this.#view.setUint32(20, Number(value), LE); - } - - get vendorBinarySize() { - return this.#view.getBigUint64(24, LE); - } - - set vendorBinarySize(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } -} - -export interface InitDeviceFaultInfoEXT { - pNext?: AnyPointer; - description?: Uint8Array; - pAddressInfos?: AnyPointer; - pVendorInfos?: AnyPointer; - pVendorBinaryData?: AnyPointer; -} - -export class DeviceFaultInfoEXT implements BaseStruct { - static size = 296; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceFaultInfoEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultInfoEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceFaultInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultInfoEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultInfoEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceFaultInfoEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.description !== undefined) this.description = data.description; - if (data.pAddressInfos !== undefined) this.pAddressInfos = data.pAddressInfos; - if (data.pVendorInfos !== undefined) this.pVendorInfos = data.pVendorInfos; - if (data.pVendorBinaryData !== undefined) this.pVendorBinaryData = data.pVendorBinaryData; - } - this.sType = StructureType.DEVICE_FAULT_INFO_EXT; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get description() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 16, 256); - } - - set description(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 16); - } - - get pAddressInfos() { - return this.#view.getBigUint64(272, LE); - } - - set pAddressInfos(value: AnyPointer) { - this.#view.setBigUint64(272, BigInt(anyPointer(value)), LE); - } - - get pVendorInfos() { - return this.#view.getBigUint64(280, LE); - } - - set pVendorInfos(value: AnyPointer) { - this.#view.setBigUint64(280, BigInt(anyPointer(value)), LE); - } - - get pVendorBinaryData() { - return this.#view.getBigUint64(288, LE); - } - - set pVendorBinaryData(value: AnyPointer) { - this.#view.setBigUint64(288, BigInt(anyPointer(value)), LE); - } -} - -export interface InitDeviceFaultVendorBinaryHeaderVersionOneEXT { - headerSize?: number; - headerVersion?: DeviceFaultVendorBinaryHeaderVersionEXT; - vendorID?: number; - deviceID?: number; - driverVersion?: number; - pipelineCacheUUID?: Uint8Array; - applicationNameOffset?: number; - applicationVersion?: number; - engineNameOffset?: number; -} - -export class DeviceFaultVendorBinaryHeaderVersionOneEXT implements BaseStruct { - static size = 48; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDeviceFaultVendorBinaryHeaderVersionOneEXT); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDeviceFaultVendorBinaryHeaderVersionOneEXT) { - if (data === undefined) { - this.#data = new Uint8Array(DeviceFaultVendorBinaryHeaderVersionOneEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DeviceFaultVendorBinaryHeaderVersionOneEXT.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DeviceFaultVendorBinaryHeaderVersionOneEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DeviceFaultVendorBinaryHeaderVersionOneEXT.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.headerSize !== undefined) this.headerSize = data.headerSize; - if (data.headerVersion !== undefined) this.headerVersion = data.headerVersion; - if (data.vendorID !== undefined) this.vendorID = data.vendorID; - if (data.deviceID !== undefined) this.deviceID = data.deviceID; - if (data.driverVersion !== undefined) this.driverVersion = data.driverVersion; - if (data.pipelineCacheUUID !== undefined) this.pipelineCacheUUID = data.pipelineCacheUUID; - if (data.applicationNameOffset !== undefined) this.applicationNameOffset = data.applicationNameOffset; - if (data.applicationVersion !== undefined) this.applicationVersion = data.applicationVersion; - if (data.engineNameOffset !== undefined) this.engineNameOffset = data.engineNameOffset; - } - } - - get headerSize() { - return this.#view.getUint32(0, LE); - } - - set headerSize(value: number) { - this.#view.setUint32(0, Number(value), LE); - } - - get headerVersion() { - return this.#view.getUint32(4, LE); - } - - set headerVersion(value: DeviceFaultVendorBinaryHeaderVersionEXT) { - this.#view.setUint32(4, Number(value), LE); - } - - get vendorID() { - return this.#view.getUint32(8, LE); - } - - set vendorID(value: number) { - this.#view.setUint32(8, Number(value), LE); - } - - get deviceID() { - return this.#view.getUint32(12, LE); - } - - set deviceID(value: number) { - this.#view.setUint32(12, Number(value), LE); - } - - get driverVersion() { - return this.#view.getUint32(16, LE); - } - - set driverVersion(value: number) { - this.#view.setUint32(16, Number(value), LE); - } - - get pipelineCacheUUID() { - return new Uint8Array(this.#data.buffer, this.#data.byteOffset + 20, 16); - } - - set pipelineCacheUUID(value: Uint8Array) { - this.#data.set(new Uint8Array(value.buffer), 20); - } - - get applicationNameOffset() { - return this.#view.getUint32(36, LE); - } - - set applicationNameOffset(value: number) { - this.#view.setUint32(36, Number(value), LE); - } - - get applicationVersion() { - return this.#view.getUint32(40, LE); - } - - set applicationVersion(value: number) { - this.#view.setUint32(40, Number(value), LE); - } - - get engineNameOffset() { - return this.#view.getUint32(44, LE); - } - - set engineNameOffset(value: number) { - this.#view.setUint32(44, Number(value), LE); - } -} - -export interface InitDecompressMemoryRegionNV { - srcAddress?: DeviceAddress; - dstAddress?: DeviceAddress; - compressedSize?: DeviceSize; - decompressedSize?: DeviceSize; - decompressionMethod?: MemoryDecompressionMethodFlagsNV; -} - -export class DecompressMemoryRegionNV implements BaseStruct { - static size = 40; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitDecompressMemoryRegionNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitDecompressMemoryRegionNV) { - if (data === undefined) { - this.#data = new Uint8Array(DecompressMemoryRegionNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, DecompressMemoryRegionNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < DecompressMemoryRegionNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(DecompressMemoryRegionNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.srcAddress !== undefined) this.srcAddress = data.srcAddress; - if (data.dstAddress !== undefined) this.dstAddress = data.dstAddress; - if (data.compressedSize !== undefined) this.compressedSize = data.compressedSize; - if (data.decompressedSize !== undefined) this.decompressedSize = data.decompressedSize; - if (data.decompressionMethod !== undefined) this.decompressionMethod = data.decompressionMethod; - } - } - - get srcAddress() { - return this.#view.getBigUint64(0, LE); - } - - set srcAddress(value: DeviceAddress) { - this.#view.setBigUint64(0, BigInt(value), LE); - } - - get dstAddress() { - return this.#view.getBigUint64(8, LE); - } - - set dstAddress(value: DeviceAddress) { - this.#view.setBigUint64(8, BigInt(value), LE); - } - - get compressedSize() { - return this.#view.getBigUint64(16, LE); - } - - set compressedSize(value: DeviceSize) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get decompressedSize() { - return this.#view.getBigUint64(24, LE); - } - - set decompressedSize(value: DeviceSize) { - this.#view.setBigUint64(24, BigInt(value), LE); - } - - get decompressionMethod() { - return this.#view.getBigUint64(32, LE); - } - - set decompressionMethod(value: MemoryDecompressionMethodFlagsNV) { - this.#view.setBigUint64(32, BigInt(value), LE); - } -} - -export interface InitPhysicalDeviceShaderCoreBuiltinsPropertiesARM { - pNext?: AnyPointer; - shaderCoreMask?: Deno.PointerValue; - shaderCoreCount?: number; - shaderWarpsPerCore?: number; -} - -export class PhysicalDeviceShaderCoreBuiltinsPropertiesARM implements BaseStruct { - static size = 32; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderCoreBuiltinsPropertiesARM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderCoreBuiltinsPropertiesARM) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsPropertiesARM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderCoreMask !== undefined) this.shaderCoreMask = data.shaderCoreMask; - if (data.shaderCoreCount !== undefined) this.shaderCoreCount = data.shaderCoreCount; - if (data.shaderWarpsPerCore !== undefined) this.shaderWarpsPerCore = data.shaderWarpsPerCore; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_PROPERTIES_ARM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderCoreMask() { - return this.#view.getBigUint64(16, LE); - } - - set shaderCoreMask(value: Deno.PointerValue) { - this.#view.setBigUint64(16, BigInt(value), LE); - } - - get shaderCoreCount() { - return this.#view.getUint32(24, LE); - } - - set shaderCoreCount(value: number) { - this.#view.setUint32(24, Number(value), LE); - } - - get shaderWarpsPerCore() { - return this.#view.getUint32(28, LE); - } - - set shaderWarpsPerCore(value: number) { - this.#view.setUint32(28, Number(value), LE); - } -} - -export interface InitPhysicalDeviceShaderCoreBuiltinsFeaturesARM { - pNext?: AnyPointer; - shaderCoreBuiltins?: Bool32; -} - -export class PhysicalDeviceShaderCoreBuiltinsFeaturesARM implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceShaderCoreBuiltinsFeaturesARM); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceShaderCoreBuiltinsFeaturesARM) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceShaderCoreBuiltinsFeaturesARM.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.shaderCoreBuiltins !== undefined) this.shaderCoreBuiltins = data.shaderCoreBuiltins; - } - this.sType = StructureType.PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get shaderCoreBuiltins() { - return this.#view.getUint32(16, LE); - } - - set shaderCoreBuiltins(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRayTracingInvocationReorderFeaturesNV { - pNext?: AnyPointer; - rayTracingInvocationReorder?: Bool32; -} - -export class PhysicalDeviceRayTracingInvocationReorderFeaturesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRayTracingInvocationReorderFeaturesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingInvocationReorderFeaturesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderFeaturesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.rayTracingInvocationReorder !== undefined) this.rayTracingInvocationReorder = data.rayTracingInvocationReorder; - } - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get rayTracingInvocationReorder() { - return this.#view.getUint32(16, LE); - } - - set rayTracingInvocationReorder(value: Bool32) { - this.#view.setUint32(16, Number(value), LE); - } -} - -export interface InitPhysicalDeviceRayTracingInvocationReorderPropertiesNV { - pNext?: AnyPointer; - rayTracingInvocationReorderReorderingHint?: RayTracingInvocationReorderModeNV; -} - -export class PhysicalDeviceRayTracingInvocationReorderPropertiesNV implements BaseStruct { - static size = 24; - - #data!: Uint8Array; - #view!: DataView; - - get [BUFFER]() { return this.#data; } - get [DATAVIEW]() { return this.#view; } - - constructor(); - constructor(ptr: Deno.PointerValue); - constructor(init: InitPhysicalDeviceRayTracingInvocationReorderPropertiesNV); - constructor(data: Uint8Array); - constructor(data?: Deno.PointerValue | Uint8Array | InitPhysicalDeviceRayTracingInvocationReorderPropertiesNV) { - if (data === undefined) { - this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (typeof data === "number" || typeof data === "bigint") { - this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size)); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - } else if (data instanceof Uint8Array) { - if (data.byteLength < PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer, data.byteOffset); - } else { - this.#data = new Uint8Array(PhysicalDeviceRayTracingInvocationReorderPropertiesNV.size); - this.#view = new DataView(this.#data.buffer, this.#data.byteOffset); - if (data.pNext !== undefined) this.pNext = data.pNext; - if (data.rayTracingInvocationReorderReorderingHint !== undefined) this.rayTracingInvocationReorderReorderingHint = data.rayTracingInvocationReorderReorderingHint; - } - this.sType = StructureType.PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_PROPERTIES_NV; - } - - get sType() { - return this.#view.getUint32(0, LE); - } - - set sType(value: StructureType) { - this.#view.setUint32(0, Number(value), LE); - } - - get pNext() { - return this.#view.getBigUint64(8, LE); - } - - set pNext(value: AnyPointer) { - this.#view.setBigUint64(8, BigInt(anyPointer(value)), LE); - } - - get rayTracingInvocationReorderReorderingHint() { - return this.#view.getUint32(16, LE); - } - - set rayTracingInvocationReorderReorderingHint(value: RayTracingInvocationReorderModeNV) { - this.#view.setUint32(16, Number(value), LE); - } -} - -/// Unions - -/** // Union allowing specification of floating point, integer, or unsigned integer color data. Actual value selected is based on image/attachment being cleared. */ -export class ClearColorValue { - static size = 4; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < ClearColorValue.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -/** // Union allowing specification of color or depth and stencil values. Actual value selected is based on attachment being cleared. */ -export class ClearValue { - static size = 8; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < ClearValue.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -/** // Union of all the possible return types a counter result could return */ -export class PerformanceCounterResultKHR { - static size = 8; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < PerformanceCounterResultKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -export class PerformanceValueDataINTEL { - static size = 8; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < PerformanceValueDataINTEL.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -export class PipelineExecutableStatisticValueKHR { - static size = 8; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < PipelineExecutableStatisticValueKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -export class DeviceOrHostAddressKHR { - static size = 8; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < DeviceOrHostAddressKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -export class DeviceOrHostAddressConstKHR { - static size = 8; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < DeviceOrHostAddressConstKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -export class AccelerationStructureGeometryDataKHR { - static size = 64; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < AccelerationStructureGeometryDataKHR.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -export class DescriptorDataEXT { - static size = 8; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < DescriptorDataEXT.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -export class AccelerationStructureMotionInstanceDataNV { - static size = 152; - - #data: Uint8Array; - #view: DataView; - - constructor(data: Uint8Array) { - if (data.byteLength < AccelerationStructureMotionInstanceDataNV.size) { - throw new Error("Data buffer too small"); - } - this.#data = data; - this.#view = new DataView(data.buffer); - } -} - -/// FFI Library -const lib = Deno.dlopen(Deno.build.os === "windows" ? "vulkan-1" : Deno.build.os === "darwin" ? "libvulkan.dylib.1" : "libvulkan.so.1", { - "vkCreateInstance": { - "parameters": [ - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyInstance": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkEnumeratePhysicalDevices": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkGetDeviceProcAddr": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "function" - }, - "vkGetInstanceProcAddr": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "function" - }, - "vkGetPhysicalDeviceProperties": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceQueueFamilyProperties": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceMemoryProperties": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceFeatures": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceFormatProperties": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceImageFormatProperties": { - "parameters": [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "u32", - "buffer" - ], - "result": "u32" - }, - "vkCreateDevice": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyDevice": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkEnumerateInstanceVersion": { - "parameters": [ - "buffer" - ], - "result": "u32" - }, - "vkEnumerateInstanceLayerProperties": { - "parameters": [ - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkEnumerateInstanceExtensionProperties": { - "parameters": [ - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkEnumerateDeviceLayerProperties": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkEnumerateDeviceExtensionProperties": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkGetDeviceQueue": { - "parameters": [ - "pointer", - "u32", - "u32", - "buffer" - ], - "result": "void" - }, - "vkQueueSubmit": { - "parameters": [ - "pointer", - "u32", - "buffer", - "pointer" - ], - "result": "u32" - }, - "vkQueueWaitIdle": { - "parameters": [ - "pointer" - ], - "result": "u32" - }, - "vkDeviceWaitIdle": { - "parameters": [ - "pointer" - ], - "result": "u32" - }, - "vkAllocateMemory": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkFreeMemory": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkMapMemory": { - "parameters": [ - "pointer", - "pointer", - "u64", - "u64", - "u32", - "buffer" - ], - "result": "u32" - }, - "vkUnmapMemory": { - "parameters": [ - "pointer", - "pointer" - ], - "result": "void" - }, - "vkFlushMappedMemoryRanges": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "u32" - }, - "vkInvalidateMappedMemoryRanges": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "u32" - }, - "vkGetDeviceMemoryCommitment": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetBufferMemoryRequirements": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkBindBufferMemory": { - "parameters": [ - "pointer", - "pointer", - "pointer", - "u64" - ], - "result": "u32" - }, - "vkGetImageMemoryRequirements": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkBindImageMemory": { - "parameters": [ - "pointer", - "pointer", - "pointer", - "u64" - ], - "result": "u32" - }, - "vkGetImageSparseMemoryRequirements": { - "parameters": [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceSparseImageFormatProperties": { - "parameters": [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "u32", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkQueueBindSparse": { - "parameters": [ - "pointer", - "u32", - "buffer", - "pointer" - ], - "result": "u32" - }, - "vkCreateFence": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyFence": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkResetFences": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "u32" - }, - "vkGetFenceStatus": { - "parameters": [ - "pointer", - "pointer" - ], - "result": "u32" - }, - "vkWaitForFences": { - "parameters": [ - "pointer", - "u32", - "buffer", - "u32", - "u64" - ], - "result": "u32" - }, - "vkCreateSemaphore": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroySemaphore": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreateEvent": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyEvent": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetEventStatus": { - "parameters": [ - "pointer", - "pointer" - ], - "result": "u32" - }, - "vkSetEvent": { - "parameters": [ - "pointer", - "pointer" - ], - "result": "u32" - }, - "vkResetEvent": { - "parameters": [ - "pointer", - "pointer" - ], - "result": "u32" - }, - "vkCreateQueryPool": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyQueryPool": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetQueryPoolResults": { - "parameters": [ - "pointer", - "pointer", - "u32", - "u32", - "usize", - "buffer", - "u64", - "u32" - ], - "result": "u32" - }, - "vkResetQueryPool": { - "parameters": [ - "pointer", - "pointer", - "u32", - "u32" - ], - "result": "void" - }, - "vkCreateBuffer": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyBuffer": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreateBufferView": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyBufferView": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreateImage": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyImage": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetImageSubresourceLayout": { - "parameters": [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkCreateImageView": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyImageView": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreateShaderModule": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyShaderModule": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreatePipelineCache": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyPipelineCache": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetPipelineCacheData": { - "parameters": [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkMergePipelineCaches": { - "parameters": [ - "pointer", - "pointer", - "u32", - "buffer" - ], - "result": "u32" - }, - "vkCreateGraphicsPipelines": { - "parameters": [ - "pointer", - "pointer", - "u32", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkCreateComputePipelines": { - "parameters": [ - "pointer", - "pointer", - "u32", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyPipeline": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreatePipelineLayout": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyPipelineLayout": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreateSampler": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroySampler": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreateDescriptorSetLayout": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyDescriptorSetLayout": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreateDescriptorPool": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyDescriptorPool": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkResetDescriptorPool": { - "parameters": [ - "pointer", - "pointer", - "u32" - ], - "result": "u32" - }, - "vkAllocateDescriptorSets": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkFreeDescriptorSets": { - "parameters": [ - "pointer", - "pointer", - "u32", - "buffer" - ], - "result": "u32" - }, - "vkUpdateDescriptorSets": { - "parameters": [ - "pointer", - "u32", - "buffer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCreateFramebuffer": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyFramebuffer": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreateRenderPass": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyRenderPass": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetRenderAreaGranularity": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCreateCommandPool": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyCommandPool": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkResetCommandPool": { - "parameters": [ - "pointer", - "pointer", - "u32" - ], - "result": "u32" - }, - "vkAllocateCommandBuffers": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkFreeCommandBuffers": { - "parameters": [ - "pointer", - "pointer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkBeginCommandBuffer": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "u32" - }, - "vkEndCommandBuffer": { - "parameters": [ - "pointer" - ], - "result": "u32" - }, - "vkResetCommandBuffer": { - "parameters": [ - "pointer", - "u32" - ], - "result": "u32" - }, - "vkCmdBindPipeline": { - "parameters": [ - "pointer", - "u32", - "pointer" - ], - "result": "void" - }, - "vkCmdSetViewport": { - "parameters": [ - "pointer", - "u32", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdSetScissor": { - "parameters": [ - "pointer", - "u32", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdSetLineWidth": { - "parameters": [ - "pointer", - "f32" - ], - "result": "void" - }, - "vkCmdSetDepthBias": { - "parameters": [ - "pointer", - "f32", - "f32", - "f32" - ], - "result": "void" - }, - "vkCmdSetBlendConstants": { - "parameters": [ - "pointer", - "f32" - ], - "result": "void" - }, - "vkCmdSetDepthBounds": { - "parameters": [ - "pointer", - "f32", - "f32" - ], - "result": "void" - }, - "vkCmdSetStencilCompareMask": { - "parameters": [ - "pointer", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdSetStencilWriteMask": { - "parameters": [ - "pointer", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdSetStencilReference": { - "parameters": [ - "pointer", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdBindDescriptorSets": { - "parameters": [ - "pointer", - "u32", - "pointer", - "u32", - "u32", - "buffer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdBindIndexBuffer": { - "parameters": [ - "pointer", - "pointer", - "u64", - "u32" - ], - "result": "void" - }, - "vkCmdBindVertexBuffers": { - "parameters": [ - "pointer", - "u32", - "u32", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkCmdDraw": { - "parameters": [ - "pointer", - "u32", - "u32", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdDrawIndexed": { - "parameters": [ - "pointer", - "u32", - "u32", - "u32", - "i32", - "u32" - ], - "result": "void" - }, - "vkCmdDrawIndirect": { - "parameters": [ - "pointer", - "pointer", - "u64", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdDrawIndexedIndirect": { - "parameters": [ - "pointer", - "pointer", - "u64", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdDispatch": { - "parameters": [ - "pointer", - "u32", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdDispatchIndirect": { - "parameters": [ - "pointer", - "pointer", - "u64" - ], - "result": "void" - }, - "vkCmdCopyBuffer": { - "parameters": [ - "pointer", - "pointer", - "pointer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdCopyImage": { - "parameters": [ - "pointer", - "pointer", - "u32", - "pointer", - "u32", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdBlitImage": { - "parameters": [ - "pointer", - "pointer", - "u32", - "pointer", - "u32", - "u32", - "buffer", - "u32" - ], - "result": "void" - }, - "vkCmdCopyBufferToImage": { - "parameters": [ - "pointer", - "pointer", - "pointer", - "u32", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdCopyImageToBuffer": { - "parameters": [ - "pointer", - "pointer", - "u32", - "pointer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdUpdateBuffer": { - "parameters": [ - "pointer", - "pointer", - "u64", - "u64", - "buffer" - ], - "result": "void" - }, - "vkCmdFillBuffer": { - "parameters": [ - "pointer", - "pointer", - "u64", - "u64", - "u32" - ], - "result": "void" - }, - "vkCmdClearColorImage": { - "parameters": [ - "pointer", - "pointer", - "u32", - "buffer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdClearDepthStencilImage": { - "parameters": [ - "pointer", - "pointer", - "u32", - "buffer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdClearAttachments": { - "parameters": [ - "pointer", - "u32", - "buffer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdResolveImage": { - "parameters": [ - "pointer", - "pointer", - "u32", - "pointer", - "u32", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdSetEvent": { - "parameters": [ - "pointer", - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdResetEvent": { - "parameters": [ - "pointer", - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdWaitEvents": { - "parameters": [ - "pointer", - "u32", - "buffer", - "u32", - "u32", - "u32", - "buffer", - "u32", - "buffer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdPipelineBarrier": { - "parameters": [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "buffer", - "u32", - "buffer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdBeginQuery": { - "parameters": [ - "pointer", - "pointer", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdEndQuery": { - "parameters": [ - "pointer", - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdResetQueryPool": { - "parameters": [ - "pointer", - "pointer", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdWriteTimestamp": { - "parameters": [ - "pointer", - "u32", - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdCopyQueryPoolResults": { - "parameters": [ - "pointer", - "pointer", - "u32", - "u32", - "pointer", - "u64", - "u64", - "u32" - ], - "result": "void" - }, - "vkCmdPushConstants": { - "parameters": [ - "pointer", - "pointer", - "u32", - "u32", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdBeginRenderPass": { - "parameters": [ - "pointer", - "buffer", - "u32" - ], - "result": "void" - }, - "vkCmdNextSubpass": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdEndRenderPass": { - "parameters": [ - "pointer" - ], - "result": "void" - }, - "vkCmdExecuteCommands": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkDestroySurfaceKHR": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceSurfaceSupportKHR": { - "parameters": [ - "pointer", - "u32", - "pointer", - "buffer" - ], - "result": "u32" - }, - "vkGetPhysicalDeviceSurfaceCapabilitiesKHR": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "u32" - }, - "vkGetPhysicalDeviceSurfaceFormatsKHR": { - "parameters": [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkGetPhysicalDeviceSurfacePresentModesKHR": { - "parameters": [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkCreateSwapchainKHR": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroySwapchainKHR": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetSwapchainImagesKHR": { - "parameters": [ - "pointer", - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkAcquireNextImageKHR": { - "parameters": [ - "pointer", - "pointer", - "u64", - "pointer", - "pointer", - "buffer" - ], - "result": "u32" - }, - "vkQueuePresentKHR": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "u32" - }, - "vkGetPhysicalDeviceFeatures2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceProperties2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceFormatProperties2": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceImageFormatProperties2": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkGetPhysicalDeviceQueueFamilyProperties2": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceMemoryProperties2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceSparseImageFormatProperties2": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkTrimCommandPool": { - "parameters": [ - "pointer", - "pointer", - "u32" - ], - "result": "void" - }, - "vkGetPhysicalDeviceExternalBufferProperties": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceExternalSemaphoreProperties": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetPhysicalDeviceExternalFenceProperties": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkEnumeratePhysicalDeviceGroups": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkGetDeviceGroupPeerMemoryFeatures": { - "parameters": [ - "pointer", - "u32", - "u32", - "u32", - "buffer" - ], - "result": "void" - }, - "vkBindBufferMemory2": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "u32" - }, - "vkBindImageMemory2": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "u32" - }, - "vkCmdSetDeviceMask": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdDispatchBase": { - "parameters": [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "u32", - "u32" - ], - "result": "void" - }, - "vkCreateDescriptorUpdateTemplate": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyDescriptorUpdateTemplate": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkUpdateDescriptorSetWithTemplate": { - "parameters": [ - "pointer", - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetBufferMemoryRequirements2": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetImageMemoryRequirements2": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetImageSparseMemoryRequirements2": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetDeviceBufferMemoryRequirements": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetDeviceImageMemoryRequirements": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetDeviceImageSparseMemoryRequirements": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkCreateSamplerYcbcrConversion": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroySamplerYcbcrConversion": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetDeviceQueue2": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkGetDescriptorSetLayoutSupport": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkCreateRenderPass2": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkCmdBeginRenderPass2": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkCmdNextSubpass2": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkCmdEndRenderPass2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkGetSemaphoreCounterValue": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "u32" - }, - "vkWaitSemaphores": { - "parameters": [ - "pointer", - "buffer", - "u64" - ], - "result": "u32" - }, - "vkSignalSemaphore": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "u32" - }, - "vkCmdDrawIndirectCount": { - "parameters": [ - "pointer", - "pointer", - "u64", - "pointer", - "u64", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdDrawIndexedIndirectCount": { - "parameters": [ - "pointer", - "pointer", - "u64", - "pointer", - "u64", - "u32", - "u32" - ], - "result": "void" - }, - "vkGetBufferOpaqueCaptureAddress": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "u64" - }, - "vkGetBufferDeviceAddress": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "u64" - }, - "vkGetDeviceMemoryOpaqueCaptureAddress": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "u64" - }, - "vkGetPhysicalDeviceToolProperties": { - "parameters": [ - "pointer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkCmdSetCullMode": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetFrontFace": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetPrimitiveTopology": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetViewportWithCount": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdSetScissorWithCount": { - "parameters": [ - "pointer", - "u32", - "buffer" - ], - "result": "void" - }, - "vkCmdBindVertexBuffers2": { - "parameters": [ - "pointer", - "u32", - "u32", - "buffer", - "buffer", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkCmdSetDepthTestEnable": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetDepthWriteEnable": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetDepthCompareOp": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetDepthBoundsTestEnable": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetStencilTestEnable": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetStencilOp": { - "parameters": [ - "pointer", - "u32", - "u32", - "u32", - "u32", - "u32" - ], - "result": "void" - }, - "vkCmdSetRasterizerDiscardEnable": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetDepthBiasEnable": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdSetPrimitiveRestartEnable": { - "parameters": [ - "pointer", - "u32" - ], - "result": "void" - }, - "vkCreatePrivateDataSlot": { - "parameters": [ - "pointer", - "buffer", - "buffer", - "buffer" - ], - "result": "u32" - }, - "vkDestroyPrivateDataSlot": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkSetPrivateData": { - "parameters": [ - "pointer", - "u32", - "u64", - "pointer", - "u64" - ], - "result": "u32" - }, - "vkGetPrivateData": { - "parameters": [ - "pointer", - "u32", - "u64", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCmdCopyBuffer2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCmdCopyImage2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCmdBlitImage2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCmdCopyBufferToImage2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCmdCopyImageToBuffer2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCmdResolveImage2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCmdSetEvent2": { - "parameters": [ - "pointer", - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCmdResetEvent2": { - "parameters": [ - "pointer", - "pointer", - "u64" - ], - "result": "void" - }, - "vkCmdWaitEvents2": { - "parameters": [ - "pointer", - "u32", - "buffer", - "buffer" - ], - "result": "void" - }, - "vkCmdPipelineBarrier2": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkQueueSubmit2": { - "parameters": [ - "pointer", - "u32", - "buffer", - "pointer" - ], - "result": "u32" - }, - "vkCmdWriteTimestamp2": { - "parameters": [ - "pointer", - "u64", - "pointer", - "u32" - ], - "result": "void" - }, - "vkCmdBeginRendering": { - "parameters": [ - "pointer", - "buffer" - ], - "result": "void" - }, - "vkCmdEndRendering": { - "parameters": [ - "pointer" - ], - "result": "void" - }, -} as const).symbols; - -export class VulkanError extends Error { - constructor(public code: Result) { - super(`Vulkan error: ${code} (${Result[code]})`); - } -} - -/// Commands - -export function CreateInstance( - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pInstance: AnyBuffer, -): Result { - const ret = lib.vkCreateInstance( - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pInstance), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyInstance( - instance: Instance, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyInstance( - instance, - anyBuffer(pAllocator), - ); -} - -export function EnumeratePhysicalDevices( - instance: Instance, - pPhysicalDeviceCount: AnyBuffer, - pPhysicalDevices: AnyBuffer, -): Result { - const ret = lib.vkEnumeratePhysicalDevices( - instance, - anyBuffer(pPhysicalDeviceCount), - anyBuffer(pPhysicalDevices), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetDeviceProcAddr( - device: Device, - pName: AnyBuffer, -): Deno.PointerValue { - const ret = lib.vkGetDeviceProcAddr( - device, - anyBuffer(pName), - ); - return ret; -} - -export function GetInstanceProcAddr( - instance: Instance, - pName: AnyBuffer, -): Deno.PointerValue { - const ret = lib.vkGetInstanceProcAddr( - instance, - anyBuffer(pName), - ); - return ret; -} - -export function GetPhysicalDeviceProperties( - physicalDevice: PhysicalDevice, - pProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceProperties( - physicalDevice, - anyBuffer(pProperties), - ); -} - -export function GetPhysicalDeviceQueueFamilyProperties( - physicalDevice: PhysicalDevice, - pQueueFamilyPropertyCount: AnyBuffer, - pQueueFamilyProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceQueueFamilyProperties( - physicalDevice, - anyBuffer(pQueueFamilyPropertyCount), - anyBuffer(pQueueFamilyProperties), - ); -} - -export function GetPhysicalDeviceMemoryProperties( - physicalDevice: PhysicalDevice, - pMemoryProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceMemoryProperties( - physicalDevice, - anyBuffer(pMemoryProperties), - ); -} - -export function GetPhysicalDeviceFeatures( - physicalDevice: PhysicalDevice, - pFeatures: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceFeatures( - physicalDevice, - anyBuffer(pFeatures), - ); -} - -export function GetPhysicalDeviceFormatProperties( - physicalDevice: PhysicalDevice, - format: Format, - pFormatProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceFormatProperties( - physicalDevice, - format, - anyBuffer(pFormatProperties), - ); -} - -export function GetPhysicalDeviceImageFormatProperties( - physicalDevice: PhysicalDevice, - format: Format, - type: ImageType, - tiling: ImageTiling, - usage: ImageUsageFlags, - flags: ImageCreateFlags, - pImageFormatProperties: AnyBuffer, -): Result { - const ret = lib.vkGetPhysicalDeviceImageFormatProperties( - physicalDevice, - format, - type, - tiling, - usage, - flags, - anyBuffer(pImageFormatProperties), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CreateDevice( - physicalDevice: PhysicalDevice, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pDevice: AnyBuffer, -): Result { - const ret = lib.vkCreateDevice( - physicalDevice, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pDevice), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyDevice( - device: Device, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyDevice( - device, - anyBuffer(pAllocator), - ); -} - -export function EnumerateInstanceVersion( - pApiVersion: AnyBuffer, -): Result { - const ret = lib.vkEnumerateInstanceVersion( - anyBuffer(pApiVersion), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function EnumerateInstanceLayerProperties( - pPropertyCount: AnyBuffer, - pProperties: AnyBuffer, -): Result { - const ret = lib.vkEnumerateInstanceLayerProperties( - anyBuffer(pPropertyCount), - anyBuffer(pProperties), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function EnumerateInstanceExtensionProperties( - pLayerName: AnyBuffer, - pPropertyCount: AnyBuffer, - pProperties: AnyBuffer, -): Result { - const ret = lib.vkEnumerateInstanceExtensionProperties( - anyBuffer(pLayerName), - anyBuffer(pPropertyCount), - anyBuffer(pProperties), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function EnumerateDeviceLayerProperties( - physicalDevice: PhysicalDevice, - pPropertyCount: AnyBuffer, - pProperties: AnyBuffer, -): Result { - const ret = lib.vkEnumerateDeviceLayerProperties( - physicalDevice, - anyBuffer(pPropertyCount), - anyBuffer(pProperties), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function EnumerateDeviceExtensionProperties( - physicalDevice: PhysicalDevice, - pLayerName: AnyBuffer, - pPropertyCount: AnyBuffer, - pProperties: AnyBuffer, -): Result { - const ret = lib.vkEnumerateDeviceExtensionProperties( - physicalDevice, - anyBuffer(pLayerName), - anyBuffer(pPropertyCount), - anyBuffer(pProperties), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetDeviceQueue( - device: Device, - queueFamilyIndex: number, - queueIndex: number, - pQueue: AnyBuffer, -): void { - lib.vkGetDeviceQueue( - device, - queueFamilyIndex, - queueIndex, - anyBuffer(pQueue), - ); -} - -export function QueueSubmit( - queue: Queue, - submitCount: number, - pSubmits: AnyBuffer, - fence: Fence, -): Result { - const ret = lib.vkQueueSubmit( - queue, - submitCount, - anyBuffer(pSubmits), - fence, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function QueueWaitIdle( - queue: Queue, -): Result { - const ret = lib.vkQueueWaitIdle( - queue, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DeviceWaitIdle( - device: Device, -): Result { - const ret = lib.vkDeviceWaitIdle( - device, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function AllocateMemory( - device: Device, - pAllocateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pMemory: AnyBuffer, -): Result { - const ret = lib.vkAllocateMemory( - device, - anyBuffer(pAllocateInfo), - anyBuffer(pAllocator), - anyBuffer(pMemory), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function FreeMemory( - device: Device, - memory: DeviceMemory, - pAllocator: AnyBuffer, -): void { - lib.vkFreeMemory( - device, - memory, - anyBuffer(pAllocator), - ); -} - -export function MapMemory( - device: Device, - memory: DeviceMemory, - offset: DeviceSize, - size: DeviceSize, - flags: MemoryMapFlags, - ppData: AnyBuffer, -): Result { - const ret = lib.vkMapMemory( - device, - memory, - offset, - size, - flags, - anyBuffer(ppData), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function UnmapMemory( - device: Device, - memory: DeviceMemory, -): void { - lib.vkUnmapMemory( - device, - memory, - ); -} - -export function FlushMappedMemoryRanges( - device: Device, - memoryRangeCount: number, - pMemoryRanges: AnyBuffer, -): Result { - const ret = lib.vkFlushMappedMemoryRanges( - device, - memoryRangeCount, - anyBuffer(pMemoryRanges), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function InvalidateMappedMemoryRanges( - device: Device, - memoryRangeCount: number, - pMemoryRanges: AnyBuffer, -): Result { - const ret = lib.vkInvalidateMappedMemoryRanges( - device, - memoryRangeCount, - anyBuffer(pMemoryRanges), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetDeviceMemoryCommitment( - device: Device, - memory: DeviceMemory, - pCommittedMemoryInBytes: AnyBuffer, -): void { - lib.vkGetDeviceMemoryCommitment( - device, - memory, - anyBuffer(pCommittedMemoryInBytes), - ); -} - -export function GetBufferMemoryRequirements( - device: Device, - buffer: Buffer, - pMemoryRequirements: AnyBuffer, -): void { - lib.vkGetBufferMemoryRequirements( - device, - buffer, - anyBuffer(pMemoryRequirements), - ); -} - -export function BindBufferMemory( - device: Device, - buffer: Buffer, - memory: DeviceMemory, - memoryOffset: DeviceSize, -): Result { - const ret = lib.vkBindBufferMemory( - device, - buffer, - memory, - memoryOffset, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetImageMemoryRequirements( - device: Device, - image: Image, - pMemoryRequirements: AnyBuffer, -): void { - lib.vkGetImageMemoryRequirements( - device, - image, - anyBuffer(pMemoryRequirements), - ); -} - -export function BindImageMemory( - device: Device, - image: Image, - memory: DeviceMemory, - memoryOffset: DeviceSize, -): Result { - const ret = lib.vkBindImageMemory( - device, - image, - memory, - memoryOffset, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetImageSparseMemoryRequirements( - device: Device, - image: Image, - pSparseMemoryRequirementCount: AnyBuffer, - pSparseMemoryRequirements: AnyBuffer, -): void { - lib.vkGetImageSparseMemoryRequirements( - device, - image, - anyBuffer(pSparseMemoryRequirementCount), - anyBuffer(pSparseMemoryRequirements), - ); -} - -export function GetPhysicalDeviceSparseImageFormatProperties( - physicalDevice: PhysicalDevice, - format: Format, - type: ImageType, - samples: SampleCountFlagBits, - usage: ImageUsageFlags, - tiling: ImageTiling, - pPropertyCount: AnyBuffer, - pProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceSparseImageFormatProperties( - physicalDevice, - format, - type, - samples, - usage, - tiling, - anyBuffer(pPropertyCount), - anyBuffer(pProperties), - ); -} - -export function QueueBindSparse( - queue: Queue, - bindInfoCount: number, - pBindInfo: AnyBuffer, - fence: Fence, -): Result { - const ret = lib.vkQueueBindSparse( - queue, - bindInfoCount, - anyBuffer(pBindInfo), - fence, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CreateFence( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pFence: AnyBuffer, -): Result { - const ret = lib.vkCreateFence( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pFence), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyFence( - device: Device, - fence: Fence, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyFence( - device, - fence, - anyBuffer(pAllocator), - ); -} - -export function ResetFences( - device: Device, - fenceCount: number, - pFences: AnyBuffer, -): Result { - const ret = lib.vkResetFences( - device, - fenceCount, - anyBuffer(pFences), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetFenceStatus( - device: Device, - fence: Fence, -): Result { - const ret = lib.vkGetFenceStatus( - device, - fence, - ); - if (ret === Result.SUCCESS || ret === Result.NOT_READY) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function WaitForFences( - device: Device, - fenceCount: number, - pFences: AnyBuffer, - waitAll: Bool32, - timeout: Deno.PointerValue, -): Result { - const ret = lib.vkWaitForFences( - device, - fenceCount, - anyBuffer(pFences), - waitAll, - timeout, - ); - if (ret === Result.SUCCESS || ret === Result.TIMEOUT) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CreateSemaphore( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pSemaphore: AnyBuffer, -): Result { - const ret = lib.vkCreateSemaphore( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pSemaphore), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroySemaphore( - device: Device, - semaphore: Semaphore, - pAllocator: AnyBuffer, -): void { - lib.vkDestroySemaphore( - device, - semaphore, - anyBuffer(pAllocator), - ); -} - -export function CreateEvent( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pEvent: AnyBuffer, -): Result { - const ret = lib.vkCreateEvent( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pEvent), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyEvent( - device: Device, - event: Event, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyEvent( - device, - event, - anyBuffer(pAllocator), - ); -} - -export function GetEventStatus( - device: Device, - event: Event, -): Result { - const ret = lib.vkGetEventStatus( - device, - event, - ); - if (ret === Result.EVENT_SET || ret === Result.EVENT_RESET) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function SetEvent( - device: Device, - event: Event, -): Result { - const ret = lib.vkSetEvent( - device, - event, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function ResetEvent( - device: Device, - event: Event, -): Result { - const ret = lib.vkResetEvent( - device, - event, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CreateQueryPool( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pQueryPool: AnyBuffer, -): Result { - const ret = lib.vkCreateQueryPool( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pQueryPool), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyQueryPool( - device: Device, - queryPool: QueryPool, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyQueryPool( - device, - queryPool, - anyBuffer(pAllocator), - ); -} - -export function GetQueryPoolResults( - device: Device, - queryPool: QueryPool, - firstQuery: number, - queryCount: number, - dataSize: Deno.PointerValue, - pData: AnyBuffer, - stride: DeviceSize, - flags: QueryResultFlags, -): Result { - const ret = lib.vkGetQueryPoolResults( - device, - queryPool, - firstQuery, - queryCount, - dataSize, - anyBuffer(pData), - stride, - flags, - ); - if (ret === Result.SUCCESS || ret === Result.NOT_READY) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function ResetQueryPool( - device: Device, - queryPool: QueryPool, - firstQuery: number, - queryCount: number, -): void { - lib.vkResetQueryPool( - device, - queryPool, - firstQuery, - queryCount, - ); -} - -export function CreateBuffer( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pBuffer: AnyBuffer, -): Result { - const ret = lib.vkCreateBuffer( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pBuffer), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyBuffer( - device: Device, - buffer: Buffer, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyBuffer( - device, - buffer, - anyBuffer(pAllocator), - ); -} - -export function CreateBufferView( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pView: AnyBuffer, -): Result { - const ret = lib.vkCreateBufferView( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pView), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyBufferView( - device: Device, - bufferView: BufferView, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyBufferView( - device, - bufferView, - anyBuffer(pAllocator), - ); -} - -export function CreateImage( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pImage: AnyBuffer, -): Result { - const ret = lib.vkCreateImage( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pImage), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyImage( - device: Device, - image: Image, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyImage( - device, - image, - anyBuffer(pAllocator), - ); -} - -export function GetImageSubresourceLayout( - device: Device, - image: Image, - pSubresource: AnyBuffer, - pLayout: AnyBuffer, -): void { - lib.vkGetImageSubresourceLayout( - device, - image, - anyBuffer(pSubresource), - anyBuffer(pLayout), - ); -} - -export function CreateImageView( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pView: AnyBuffer, -): Result { - const ret = lib.vkCreateImageView( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pView), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyImageView( - device: Device, - imageView: ImageView, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyImageView( - device, - imageView, - anyBuffer(pAllocator), - ); -} - -export function CreateShaderModule( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pShaderModule: AnyBuffer, -): Result { - const ret = lib.vkCreateShaderModule( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pShaderModule), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyShaderModule( - device: Device, - shaderModule: ShaderModule, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyShaderModule( - device, - shaderModule, - anyBuffer(pAllocator), - ); -} - -export function CreatePipelineCache( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pPipelineCache: AnyBuffer, -): Result { - const ret = lib.vkCreatePipelineCache( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pPipelineCache), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyPipelineCache( - device: Device, - pipelineCache: PipelineCache, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyPipelineCache( - device, - pipelineCache, - anyBuffer(pAllocator), - ); -} - -export function GetPipelineCacheData( - device: Device, - pipelineCache: PipelineCache, - pDataSize: AnyBuffer, - pData: AnyBuffer, -): Result { - const ret = lib.vkGetPipelineCacheData( - device, - pipelineCache, - anyBuffer(pDataSize), - anyBuffer(pData), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function MergePipelineCaches( - device: Device, - dstCache: PipelineCache, - srcCacheCount: number, - pSrcCaches: AnyBuffer, -): Result { - const ret = lib.vkMergePipelineCaches( - device, - dstCache, - srcCacheCount, - anyBuffer(pSrcCaches), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CreateGraphicsPipelines( - device: Device, - pipelineCache: PipelineCache, - createInfoCount: number, - pCreateInfos: AnyBuffer, - pAllocator: AnyBuffer, - pPipelines: AnyBuffer, -): Result { - const ret = lib.vkCreateGraphicsPipelines( - device, - pipelineCache, - createInfoCount, - anyBuffer(pCreateInfos), - anyBuffer(pAllocator), - anyBuffer(pPipelines), - ); - if (ret === Result.SUCCESS || ret === Result.PIPELINE_COMPILE_REQUIRED_EXT) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CreateComputePipelines( - device: Device, - pipelineCache: PipelineCache, - createInfoCount: number, - pCreateInfos: AnyBuffer, - pAllocator: AnyBuffer, - pPipelines: AnyBuffer, -): Result { - const ret = lib.vkCreateComputePipelines( - device, - pipelineCache, - createInfoCount, - anyBuffer(pCreateInfos), - anyBuffer(pAllocator), - anyBuffer(pPipelines), - ); - if (ret === Result.SUCCESS || ret === Result.PIPELINE_COMPILE_REQUIRED_EXT) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyPipeline( - device: Device, - pipeline: Pipeline, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyPipeline( - device, - pipeline, - anyBuffer(pAllocator), - ); -} - -export function CreatePipelineLayout( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pPipelineLayout: AnyBuffer, -): Result { - const ret = lib.vkCreatePipelineLayout( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pPipelineLayout), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyPipelineLayout( - device: Device, - pipelineLayout: PipelineLayout, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyPipelineLayout( - device, - pipelineLayout, - anyBuffer(pAllocator), - ); -} - -export function CreateSampler( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pSampler: AnyBuffer, -): Result { - const ret = lib.vkCreateSampler( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pSampler), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroySampler( - device: Device, - sampler: Sampler, - pAllocator: AnyBuffer, -): void { - lib.vkDestroySampler( - device, - sampler, - anyBuffer(pAllocator), - ); -} - -export function CreateDescriptorSetLayout( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pSetLayout: AnyBuffer, -): Result { - const ret = lib.vkCreateDescriptorSetLayout( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pSetLayout), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyDescriptorSetLayout( - device: Device, - descriptorSetLayout: DescriptorSetLayout, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyDescriptorSetLayout( - device, - descriptorSetLayout, - anyBuffer(pAllocator), - ); -} - -export function CreateDescriptorPool( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pDescriptorPool: AnyBuffer, -): Result { - const ret = lib.vkCreateDescriptorPool( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pDescriptorPool), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyDescriptorPool( - device: Device, - descriptorPool: DescriptorPool, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyDescriptorPool( - device, - descriptorPool, - anyBuffer(pAllocator), - ); -} - -export function ResetDescriptorPool( - device: Device, - descriptorPool: DescriptorPool, - flags: DescriptorPoolResetFlags, -): Result { - const ret = lib.vkResetDescriptorPool( - device, - descriptorPool, - flags, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function AllocateDescriptorSets( - device: Device, - pAllocateInfo: AnyBuffer, - pDescriptorSets: AnyBuffer, -): Result { - const ret = lib.vkAllocateDescriptorSets( - device, - anyBuffer(pAllocateInfo), - anyBuffer(pDescriptorSets), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function FreeDescriptorSets( - device: Device, - descriptorPool: DescriptorPool, - descriptorSetCount: number, - pDescriptorSets: AnyBuffer, -): Result { - const ret = lib.vkFreeDescriptorSets( - device, - descriptorPool, - descriptorSetCount, - anyBuffer(pDescriptorSets), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function UpdateDescriptorSets( - device: Device, - descriptorWriteCount: number, - pDescriptorWrites: AnyBuffer, - descriptorCopyCount: number, - pDescriptorCopies: AnyBuffer, -): void { - lib.vkUpdateDescriptorSets( - device, - descriptorWriteCount, - anyBuffer(pDescriptorWrites), - descriptorCopyCount, - anyBuffer(pDescriptorCopies), - ); -} - -export function CreateFramebuffer( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pFramebuffer: AnyBuffer, -): Result { - const ret = lib.vkCreateFramebuffer( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pFramebuffer), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyFramebuffer( - device: Device, - framebuffer: Framebuffer, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyFramebuffer( - device, - framebuffer, - anyBuffer(pAllocator), - ); -} - -export function CreateRenderPass( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pRenderPass: AnyBuffer, -): Result { - const ret = lib.vkCreateRenderPass( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pRenderPass), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyRenderPass( - device: Device, - renderPass: RenderPass, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyRenderPass( - device, - renderPass, - anyBuffer(pAllocator), - ); -} - -export function GetRenderAreaGranularity( - device: Device, - renderPass: RenderPass, - pGranularity: AnyBuffer, -): void { - lib.vkGetRenderAreaGranularity( - device, - renderPass, - anyBuffer(pGranularity), - ); -} - -export function CreateCommandPool( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pCommandPool: AnyBuffer, -): Result { - const ret = lib.vkCreateCommandPool( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pCommandPool), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyCommandPool( - device: Device, - commandPool: CommandPool, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyCommandPool( - device, - commandPool, - anyBuffer(pAllocator), - ); -} - -export function ResetCommandPool( - device: Device, - commandPool: CommandPool, - flags: CommandPoolResetFlags, -): Result { - const ret = lib.vkResetCommandPool( - device, - commandPool, - flags, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function AllocateCommandBuffers( - device: Device, - pAllocateInfo: AnyBuffer, - pCommandBuffers: AnyBuffer, -): Result { - const ret = lib.vkAllocateCommandBuffers( - device, - anyBuffer(pAllocateInfo), - anyBuffer(pCommandBuffers), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function FreeCommandBuffers( - device: Device, - commandPool: CommandPool, - commandBufferCount: number, - pCommandBuffers: AnyBuffer, -): void { - lib.vkFreeCommandBuffers( - device, - commandPool, - commandBufferCount, - anyBuffer(pCommandBuffers), - ); -} - -export function BeginCommandBuffer( - commandBuffer: CommandBuffer, - pBeginInfo: AnyBuffer, -): Result { - const ret = lib.vkBeginCommandBuffer( - commandBuffer, - anyBuffer(pBeginInfo), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function EndCommandBuffer( - commandBuffer: CommandBuffer, -): Result { - const ret = lib.vkEndCommandBuffer( - commandBuffer, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function ResetCommandBuffer( - commandBuffer: CommandBuffer, - flags: CommandBufferResetFlags, -): Result { - const ret = lib.vkResetCommandBuffer( - commandBuffer, - flags, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CmdBindPipeline( - commandBuffer: CommandBuffer, - pipelineBindPoint: PipelineBindPoint, - pipeline: Pipeline, -): void { - lib.vkCmdBindPipeline( - commandBuffer, - pipelineBindPoint, - pipeline, - ); -} - -export function CmdSetViewport( - commandBuffer: CommandBuffer, - firstViewport: number, - viewportCount: number, - pViewports: AnyBuffer, -): void { - lib.vkCmdSetViewport( - commandBuffer, - firstViewport, - viewportCount, - anyBuffer(pViewports), - ); -} - -export function CmdSetScissor( - commandBuffer: CommandBuffer, - firstScissor: number, - scissorCount: number, - pScissors: AnyBuffer, -): void { - lib.vkCmdSetScissor( - commandBuffer, - firstScissor, - scissorCount, - anyBuffer(pScissors), - ); -} - -export function CmdSetLineWidth( - commandBuffer: CommandBuffer, - lineWidth: number, -): void { - lib.vkCmdSetLineWidth( - commandBuffer, - lineWidth, - ); -} - -export function CmdSetDepthBias( - commandBuffer: CommandBuffer, - depthBiasConstantFactor: number, - depthBiasClamp: number, - depthBiasSlopeFactor: number, -): void { - lib.vkCmdSetDepthBias( - commandBuffer, - depthBiasConstantFactor, - depthBiasClamp, - depthBiasSlopeFactor, - ); -} - -export function CmdSetBlendConstants( - commandBuffer: CommandBuffer, - blendConstants: number, -): void { - lib.vkCmdSetBlendConstants( - commandBuffer, - blendConstants, - ); -} - -export function CmdSetDepthBounds( - commandBuffer: CommandBuffer, - minDepthBounds: number, - maxDepthBounds: number, -): void { - lib.vkCmdSetDepthBounds( - commandBuffer, - minDepthBounds, - maxDepthBounds, - ); -} - -export function CmdSetStencilCompareMask( - commandBuffer: CommandBuffer, - faceMask: StencilFaceFlags, - compareMask: number, -): void { - lib.vkCmdSetStencilCompareMask( - commandBuffer, - faceMask, - compareMask, - ); -} - -export function CmdSetStencilWriteMask( - commandBuffer: CommandBuffer, - faceMask: StencilFaceFlags, - writeMask: number, -): void { - lib.vkCmdSetStencilWriteMask( - commandBuffer, - faceMask, - writeMask, - ); -} - -export function CmdSetStencilReference( - commandBuffer: CommandBuffer, - faceMask: StencilFaceFlags, - reference: number, -): void { - lib.vkCmdSetStencilReference( - commandBuffer, - faceMask, - reference, - ); -} - -export function CmdBindDescriptorSets( - commandBuffer: CommandBuffer, - pipelineBindPoint: PipelineBindPoint, - layout: PipelineLayout, - firstSet: number, - descriptorSetCount: number, - pDescriptorSets: AnyBuffer, - dynamicOffsetCount: number, - pDynamicOffsets: AnyBuffer, -): void { - lib.vkCmdBindDescriptorSets( - commandBuffer, - pipelineBindPoint, - layout, - firstSet, - descriptorSetCount, - anyBuffer(pDescriptorSets), - dynamicOffsetCount, - anyBuffer(pDynamicOffsets), - ); -} - -export function CmdBindIndexBuffer( - commandBuffer: CommandBuffer, - buffer: Buffer, - offset: DeviceSize, - indexType: IndexType, -): void { - lib.vkCmdBindIndexBuffer( - commandBuffer, - buffer, - offset, - indexType, - ); -} - -export function CmdBindVertexBuffers( - commandBuffer: CommandBuffer, - firstBinding: number, - bindingCount: number, - pBuffers: AnyBuffer, - pOffsets: AnyBuffer, -): void { - lib.vkCmdBindVertexBuffers( - commandBuffer, - firstBinding, - bindingCount, - anyBuffer(pBuffers), - anyBuffer(pOffsets), - ); -} - -export function CmdDraw( - commandBuffer: CommandBuffer, - vertexCount: number, - instanceCount: number, - firstVertex: number, - firstInstance: number, -): void { - lib.vkCmdDraw( - commandBuffer, - vertexCount, - instanceCount, - firstVertex, - firstInstance, - ); -} - -export function CmdDrawIndexed( - commandBuffer: CommandBuffer, - indexCount: number, - instanceCount: number, - firstIndex: number, - vertexOffset: number, - firstInstance: number, -): void { - lib.vkCmdDrawIndexed( - commandBuffer, - indexCount, - instanceCount, - firstIndex, - vertexOffset, - firstInstance, - ); -} - -export function CmdDrawIndirect( - commandBuffer: CommandBuffer, - buffer: Buffer, - offset: DeviceSize, - drawCount: number, - stride: number, -): void { - lib.vkCmdDrawIndirect( - commandBuffer, - buffer, - offset, - drawCount, - stride, - ); -} - -export function CmdDrawIndexedIndirect( - commandBuffer: CommandBuffer, - buffer: Buffer, - offset: DeviceSize, - drawCount: number, - stride: number, -): void { - lib.vkCmdDrawIndexedIndirect( - commandBuffer, - buffer, - offset, - drawCount, - stride, - ); -} - -export function CmdDispatch( - commandBuffer: CommandBuffer, - groupCountX: number, - groupCountY: number, - groupCountZ: number, -): void { - lib.vkCmdDispatch( - commandBuffer, - groupCountX, - groupCountY, - groupCountZ, - ); -} - -export function CmdDispatchIndirect( - commandBuffer: CommandBuffer, - buffer: Buffer, - offset: DeviceSize, -): void { - lib.vkCmdDispatchIndirect( - commandBuffer, - buffer, - offset, - ); -} - -export function CmdCopyBuffer( - commandBuffer: CommandBuffer, - srcBuffer: Buffer, - dstBuffer: Buffer, - regionCount: number, - pRegions: AnyBuffer, -): void { - lib.vkCmdCopyBuffer( - commandBuffer, - srcBuffer, - dstBuffer, - regionCount, - anyBuffer(pRegions), - ); -} - -export function CmdCopyImage( - commandBuffer: CommandBuffer, - srcImage: Image, - srcImageLayout: ImageLayout, - dstImage: Image, - dstImageLayout: ImageLayout, - regionCount: number, - pRegions: AnyBuffer, -): void { - lib.vkCmdCopyImage( - commandBuffer, - srcImage, - srcImageLayout, - dstImage, - dstImageLayout, - regionCount, - anyBuffer(pRegions), - ); -} - -export function CmdBlitImage( - commandBuffer: CommandBuffer, - srcImage: Image, - srcImageLayout: ImageLayout, - dstImage: Image, - dstImageLayout: ImageLayout, - regionCount: number, - pRegions: AnyBuffer, - filter: Filter, -): void { - lib.vkCmdBlitImage( - commandBuffer, - srcImage, - srcImageLayout, - dstImage, - dstImageLayout, - regionCount, - anyBuffer(pRegions), - filter, - ); -} - -export function CmdCopyBufferToImage( - commandBuffer: CommandBuffer, - srcBuffer: Buffer, - dstImage: Image, - dstImageLayout: ImageLayout, - regionCount: number, - pRegions: AnyBuffer, -): void { - lib.vkCmdCopyBufferToImage( - commandBuffer, - srcBuffer, - dstImage, - dstImageLayout, - regionCount, - anyBuffer(pRegions), - ); -} - -export function CmdCopyImageToBuffer( - commandBuffer: CommandBuffer, - srcImage: Image, - srcImageLayout: ImageLayout, - dstBuffer: Buffer, - regionCount: number, - pRegions: AnyBuffer, -): void { - lib.vkCmdCopyImageToBuffer( - commandBuffer, - srcImage, - srcImageLayout, - dstBuffer, - regionCount, - anyBuffer(pRegions), - ); -} - -export function CmdUpdateBuffer( - commandBuffer: CommandBuffer, - dstBuffer: Buffer, - dstOffset: DeviceSize, - dataSize: DeviceSize, - pData: AnyBuffer, -): void { - lib.vkCmdUpdateBuffer( - commandBuffer, - dstBuffer, - dstOffset, - dataSize, - anyBuffer(pData), - ); -} - -/** transfer support is only available when VK_KHR_maintenance1 is enabled, as documented in valid usage language in the specification */ -export function CmdFillBuffer( - commandBuffer: CommandBuffer, - dstBuffer: Buffer, - dstOffset: DeviceSize, - size: DeviceSize, - data: number, -): void { - lib.vkCmdFillBuffer( - commandBuffer, - dstBuffer, - dstOffset, - size, - data, - ); -} - -export function CmdClearColorImage( - commandBuffer: CommandBuffer, - image: Image, - imageLayout: ImageLayout, - pColor: AnyBuffer, - rangeCount: number, - pRanges: AnyBuffer, -): void { - lib.vkCmdClearColorImage( - commandBuffer, - image, - imageLayout, - anyBuffer(pColor), - rangeCount, - anyBuffer(pRanges), - ); -} - -export function CmdClearDepthStencilImage( - commandBuffer: CommandBuffer, - image: Image, - imageLayout: ImageLayout, - pDepthStencil: AnyBuffer, - rangeCount: number, - pRanges: AnyBuffer, -): void { - lib.vkCmdClearDepthStencilImage( - commandBuffer, - image, - imageLayout, - anyBuffer(pDepthStencil), - rangeCount, - anyBuffer(pRanges), - ); -} - -export function CmdClearAttachments( - commandBuffer: CommandBuffer, - attachmentCount: number, - pAttachments: AnyBuffer, - rectCount: number, - pRects: AnyBuffer, -): void { - lib.vkCmdClearAttachments( - commandBuffer, - attachmentCount, - anyBuffer(pAttachments), - rectCount, - anyBuffer(pRects), - ); -} - -export function CmdResolveImage( - commandBuffer: CommandBuffer, - srcImage: Image, - srcImageLayout: ImageLayout, - dstImage: Image, - dstImageLayout: ImageLayout, - regionCount: number, - pRegions: AnyBuffer, -): void { - lib.vkCmdResolveImage( - commandBuffer, - srcImage, - srcImageLayout, - dstImage, - dstImageLayout, - regionCount, - anyBuffer(pRegions), - ); -} - -export function CmdSetEvent( - commandBuffer: CommandBuffer, - event: Event, - stageMask: PipelineStageFlags, -): void { - lib.vkCmdSetEvent( - commandBuffer, - event, - stageMask, - ); -} - -export function CmdResetEvent( - commandBuffer: CommandBuffer, - event: Event, - stageMask: PipelineStageFlags, -): void { - lib.vkCmdResetEvent( - commandBuffer, - event, - stageMask, - ); -} - -export function CmdWaitEvents( - commandBuffer: CommandBuffer, - eventCount: number, - pEvents: AnyBuffer, - srcStageMask: PipelineStageFlags, - dstStageMask: PipelineStageFlags, - memoryBarrierCount: number, - pMemoryBarriers: AnyBuffer, - bufferMemoryBarrierCount: number, - pBufferMemoryBarriers: AnyBuffer, - imageMemoryBarrierCount: number, - pImageMemoryBarriers: AnyBuffer, -): void { - lib.vkCmdWaitEvents( - commandBuffer, - eventCount, - anyBuffer(pEvents), - srcStageMask, - dstStageMask, - memoryBarrierCount, - anyBuffer(pMemoryBarriers), - bufferMemoryBarrierCount, - anyBuffer(pBufferMemoryBarriers), - imageMemoryBarrierCount, - anyBuffer(pImageMemoryBarriers), - ); -} - -export function CmdPipelineBarrier( - commandBuffer: CommandBuffer, - srcStageMask: PipelineStageFlags, - dstStageMask: PipelineStageFlags, - dependencyFlags: DependencyFlags, - memoryBarrierCount: number, - pMemoryBarriers: AnyBuffer, - bufferMemoryBarrierCount: number, - pBufferMemoryBarriers: AnyBuffer, - imageMemoryBarrierCount: number, - pImageMemoryBarriers: AnyBuffer, -): void { - lib.vkCmdPipelineBarrier( - commandBuffer, - srcStageMask, - dstStageMask, - dependencyFlags, - memoryBarrierCount, - anyBuffer(pMemoryBarriers), - bufferMemoryBarrierCount, - anyBuffer(pBufferMemoryBarriers), - imageMemoryBarrierCount, - anyBuffer(pImageMemoryBarriers), - ); -} - -export function CmdBeginQuery( - commandBuffer: CommandBuffer, - queryPool: QueryPool, - query: number, - flags: QueryControlFlags, -): void { - lib.vkCmdBeginQuery( - commandBuffer, - queryPool, - query, - flags, - ); -} - -export function CmdEndQuery( - commandBuffer: CommandBuffer, - queryPool: QueryPool, - query: number, -): void { - lib.vkCmdEndQuery( - commandBuffer, - queryPool, - query, - ); -} - -export function CmdResetQueryPool( - commandBuffer: CommandBuffer, - queryPool: QueryPool, - firstQuery: number, - queryCount: number, -): void { - lib.vkCmdResetQueryPool( - commandBuffer, - queryPool, - firstQuery, - queryCount, - ); -} - -export function CmdWriteTimestamp( - commandBuffer: CommandBuffer, - pipelineStage: PipelineStageFlagBits, - queryPool: QueryPool, - query: number, -): void { - lib.vkCmdWriteTimestamp( - commandBuffer, - pipelineStage, - queryPool, - query, - ); -} - -export function CmdCopyQueryPoolResults( - commandBuffer: CommandBuffer, - queryPool: QueryPool, - firstQuery: number, - queryCount: number, - dstBuffer: Buffer, - dstOffset: DeviceSize, - stride: DeviceSize, - flags: QueryResultFlags, -): void { - lib.vkCmdCopyQueryPoolResults( - commandBuffer, - queryPool, - firstQuery, - queryCount, - dstBuffer, - dstOffset, - stride, - flags, - ); -} - -export function CmdPushConstants( - commandBuffer: CommandBuffer, - layout: PipelineLayout, - stageFlags: ShaderStageFlags, - offset: number, - size: number, - pValues: AnyBuffer, -): void { - lib.vkCmdPushConstants( - commandBuffer, - layout, - stageFlags, - offset, - size, - anyBuffer(pValues), - ); -} - -export function CmdBeginRenderPass( - commandBuffer: CommandBuffer, - pRenderPassBegin: AnyBuffer, - contents: SubpassContents, -): void { - lib.vkCmdBeginRenderPass( - commandBuffer, - anyBuffer(pRenderPassBegin), - contents, - ); -} - -export function CmdNextSubpass( - commandBuffer: CommandBuffer, - contents: SubpassContents, -): void { - lib.vkCmdNextSubpass( - commandBuffer, - contents, - ); -} - -export function CmdEndRenderPass( - commandBuffer: CommandBuffer, -): void { - lib.vkCmdEndRenderPass( - commandBuffer, - ); -} - -export function CmdExecuteCommands( - commandBuffer: CommandBuffer, - commandBufferCount: number, - pCommandBuffers: AnyBuffer, -): void { - lib.vkCmdExecuteCommands( - commandBuffer, - commandBufferCount, - anyBuffer(pCommandBuffers), - ); -} - -export function DestroySurfaceKHR( - instance: Instance, - surface: SurfaceKHR, - pAllocator: AnyBuffer, -): void { - lib.vkDestroySurfaceKHR( - instance, - surface, - anyBuffer(pAllocator), - ); -} - -export function GetPhysicalDeviceSurfaceSupportKHR( - physicalDevice: PhysicalDevice, - queueFamilyIndex: number, - surface: SurfaceKHR, - pSupported: AnyBuffer, -): Result { - const ret = lib.vkGetPhysicalDeviceSurfaceSupportKHR( - physicalDevice, - queueFamilyIndex, - surface, - anyBuffer(pSupported), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetPhysicalDeviceSurfaceCapabilitiesKHR( - physicalDevice: PhysicalDevice, - surface: SurfaceKHR, - pSurfaceCapabilities: AnyBuffer, -): Result { - const ret = lib.vkGetPhysicalDeviceSurfaceCapabilitiesKHR( - physicalDevice, - surface, - anyBuffer(pSurfaceCapabilities), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetPhysicalDeviceSurfaceFormatsKHR( - physicalDevice: PhysicalDevice, - surface: SurfaceKHR, - pSurfaceFormatCount: AnyBuffer, - pSurfaceFormats: AnyBuffer, -): Result { - const ret = lib.vkGetPhysicalDeviceSurfaceFormatsKHR( - physicalDevice, - surface, - anyBuffer(pSurfaceFormatCount), - anyBuffer(pSurfaceFormats), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetPhysicalDeviceSurfacePresentModesKHR( - physicalDevice: PhysicalDevice, - surface: SurfaceKHR, - pPresentModeCount: AnyBuffer, - pPresentModes: AnyBuffer, -): Result { - const ret = lib.vkGetPhysicalDeviceSurfacePresentModesKHR( - physicalDevice, - surface, - anyBuffer(pPresentModeCount), - anyBuffer(pPresentModes), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CreateSwapchainKHR( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pSwapchain: AnyBuffer, -): Result { - const ret = lib.vkCreateSwapchainKHR( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pSwapchain), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroySwapchainKHR( - device: Device, - swapchain: SwapchainKHR, - pAllocator: AnyBuffer, -): void { - lib.vkDestroySwapchainKHR( - device, - swapchain, - anyBuffer(pAllocator), - ); -} - -export function GetSwapchainImagesKHR( - device: Device, - swapchain: SwapchainKHR, - pSwapchainImageCount: AnyBuffer, - pSwapchainImages: AnyBuffer, -): Result { - const ret = lib.vkGetSwapchainImagesKHR( - device, - swapchain, - anyBuffer(pSwapchainImageCount), - anyBuffer(pSwapchainImages), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function AcquireNextImageKHR( - device: Device, - swapchain: SwapchainKHR, - timeout: Deno.PointerValue, - semaphore: Semaphore, - fence: Fence, - pImageIndex: AnyBuffer, -): Result { - const ret = lib.vkAcquireNextImageKHR( - device, - swapchain, - timeout, - semaphore, - fence, - anyBuffer(pImageIndex), - ); - if (ret === Result.SUCCESS || ret === Result.TIMEOUT || ret === Result.NOT_READY || ret === Result.SUBOPTIMAL_KHR) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function QueuePresentKHR( - queue: Queue, - pPresentInfo: AnyBuffer, -): Result { - const ret = lib.vkQueuePresentKHR( - queue, - anyBuffer(pPresentInfo), - ); - if (ret === Result.SUCCESS || ret === Result.SUBOPTIMAL_KHR) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetPhysicalDeviceFeatures2( - physicalDevice: PhysicalDevice, - pFeatures: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceFeatures2( - physicalDevice, - anyBuffer(pFeatures), - ); -} - -export function GetPhysicalDeviceProperties2( - physicalDevice: PhysicalDevice, - pProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceProperties2( - physicalDevice, - anyBuffer(pProperties), - ); -} - -export function GetPhysicalDeviceFormatProperties2( - physicalDevice: PhysicalDevice, - format: Format, - pFormatProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceFormatProperties2( - physicalDevice, - format, - anyBuffer(pFormatProperties), - ); -} - -export function GetPhysicalDeviceImageFormatProperties2( - physicalDevice: PhysicalDevice, - pImageFormatInfo: AnyBuffer, - pImageFormatProperties: AnyBuffer, -): Result { - const ret = lib.vkGetPhysicalDeviceImageFormatProperties2( - physicalDevice, - anyBuffer(pImageFormatInfo), - anyBuffer(pImageFormatProperties), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetPhysicalDeviceQueueFamilyProperties2( - physicalDevice: PhysicalDevice, - pQueueFamilyPropertyCount: AnyBuffer, - pQueueFamilyProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceQueueFamilyProperties2( - physicalDevice, - anyBuffer(pQueueFamilyPropertyCount), - anyBuffer(pQueueFamilyProperties), - ); -} - -export function GetPhysicalDeviceMemoryProperties2( - physicalDevice: PhysicalDevice, - pMemoryProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceMemoryProperties2( - physicalDevice, - anyBuffer(pMemoryProperties), - ); -} - -export function GetPhysicalDeviceSparseImageFormatProperties2( - physicalDevice: PhysicalDevice, - pFormatInfo: AnyBuffer, - pPropertyCount: AnyBuffer, - pProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceSparseImageFormatProperties2( - physicalDevice, - anyBuffer(pFormatInfo), - anyBuffer(pPropertyCount), - anyBuffer(pProperties), - ); -} - -export function TrimCommandPool( - device: Device, - commandPool: CommandPool, - flags: CommandPoolTrimFlags, -): void { - lib.vkTrimCommandPool( - device, - commandPool, - flags, - ); -} - -export function GetPhysicalDeviceExternalBufferProperties( - physicalDevice: PhysicalDevice, - pExternalBufferInfo: AnyBuffer, - pExternalBufferProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceExternalBufferProperties( - physicalDevice, - anyBuffer(pExternalBufferInfo), - anyBuffer(pExternalBufferProperties), - ); -} - -export function GetPhysicalDeviceExternalSemaphoreProperties( - physicalDevice: PhysicalDevice, - pExternalSemaphoreInfo: AnyBuffer, - pExternalSemaphoreProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceExternalSemaphoreProperties( - physicalDevice, - anyBuffer(pExternalSemaphoreInfo), - anyBuffer(pExternalSemaphoreProperties), - ); -} - -export function GetPhysicalDeviceExternalFenceProperties( - physicalDevice: PhysicalDevice, - pExternalFenceInfo: AnyBuffer, - pExternalFenceProperties: AnyBuffer, -): void { - lib.vkGetPhysicalDeviceExternalFenceProperties( - physicalDevice, - anyBuffer(pExternalFenceInfo), - anyBuffer(pExternalFenceProperties), - ); -} - -export function EnumeratePhysicalDeviceGroups( - instance: Instance, - pPhysicalDeviceGroupCount: AnyBuffer, - pPhysicalDeviceGroupProperties: AnyBuffer, -): Result { - const ret = lib.vkEnumeratePhysicalDeviceGroups( - instance, - anyBuffer(pPhysicalDeviceGroupCount), - anyBuffer(pPhysicalDeviceGroupProperties), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetDeviceGroupPeerMemoryFeatures( - device: Device, - heapIndex: number, - localDeviceIndex: number, - remoteDeviceIndex: number, - pPeerMemoryFeatures: AnyBuffer, -): void { - lib.vkGetDeviceGroupPeerMemoryFeatures( - device, - heapIndex, - localDeviceIndex, - remoteDeviceIndex, - anyBuffer(pPeerMemoryFeatures), - ); -} - -export function BindBufferMemory2( - device: Device, - bindInfoCount: number, - pBindInfos: AnyBuffer, -): Result { - const ret = lib.vkBindBufferMemory2( - device, - bindInfoCount, - anyBuffer(pBindInfos), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function BindImageMemory2( - device: Device, - bindInfoCount: number, - pBindInfos: AnyBuffer, -): Result { - const ret = lib.vkBindImageMemory2( - device, - bindInfoCount, - anyBuffer(pBindInfos), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CmdSetDeviceMask( - commandBuffer: CommandBuffer, - deviceMask: number, -): void { - lib.vkCmdSetDeviceMask( - commandBuffer, - deviceMask, - ); -} - -export function CmdDispatchBase( - commandBuffer: CommandBuffer, - baseGroupX: number, - baseGroupY: number, - baseGroupZ: number, - groupCountX: number, - groupCountY: number, - groupCountZ: number, -): void { - lib.vkCmdDispatchBase( - commandBuffer, - baseGroupX, - baseGroupY, - baseGroupZ, - groupCountX, - groupCountY, - groupCountZ, - ); -} - -export function CreateDescriptorUpdateTemplate( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pDescriptorUpdateTemplate: AnyBuffer, -): Result { - const ret = lib.vkCreateDescriptorUpdateTemplate( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pDescriptorUpdateTemplate), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyDescriptorUpdateTemplate( - device: Device, - descriptorUpdateTemplate: DescriptorUpdateTemplate, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyDescriptorUpdateTemplate( - device, - descriptorUpdateTemplate, - anyBuffer(pAllocator), - ); -} - -export function UpdateDescriptorSetWithTemplate( - device: Device, - descriptorSet: DescriptorSet, - descriptorUpdateTemplate: DescriptorUpdateTemplate, - pData: AnyBuffer, -): void { - lib.vkUpdateDescriptorSetWithTemplate( - device, - descriptorSet, - descriptorUpdateTemplate, - anyBuffer(pData), - ); -} - -export function GetBufferMemoryRequirements2( - device: Device, - pInfo: AnyBuffer, - pMemoryRequirements: AnyBuffer, -): void { - lib.vkGetBufferMemoryRequirements2( - device, - anyBuffer(pInfo), - anyBuffer(pMemoryRequirements), - ); -} - -export function GetImageMemoryRequirements2( - device: Device, - pInfo: AnyBuffer, - pMemoryRequirements: AnyBuffer, -): void { - lib.vkGetImageMemoryRequirements2( - device, - anyBuffer(pInfo), - anyBuffer(pMemoryRequirements), - ); -} - -export function GetImageSparseMemoryRequirements2( - device: Device, - pInfo: AnyBuffer, - pSparseMemoryRequirementCount: AnyBuffer, - pSparseMemoryRequirements: AnyBuffer, -): void { - lib.vkGetImageSparseMemoryRequirements2( - device, - anyBuffer(pInfo), - anyBuffer(pSparseMemoryRequirementCount), - anyBuffer(pSparseMemoryRequirements), - ); -} - -export function GetDeviceBufferMemoryRequirements( - device: Device, - pInfo: AnyBuffer, - pMemoryRequirements: AnyBuffer, -): void { - lib.vkGetDeviceBufferMemoryRequirements( - device, - anyBuffer(pInfo), - anyBuffer(pMemoryRequirements), - ); -} - -export function GetDeviceImageMemoryRequirements( - device: Device, - pInfo: AnyBuffer, - pMemoryRequirements: AnyBuffer, -): void { - lib.vkGetDeviceImageMemoryRequirements( - device, - anyBuffer(pInfo), - anyBuffer(pMemoryRequirements), - ); -} - -export function GetDeviceImageSparseMemoryRequirements( - device: Device, - pInfo: AnyBuffer, - pSparseMemoryRequirementCount: AnyBuffer, - pSparseMemoryRequirements: AnyBuffer, -): void { - lib.vkGetDeviceImageSparseMemoryRequirements( - device, - anyBuffer(pInfo), - anyBuffer(pSparseMemoryRequirementCount), - anyBuffer(pSparseMemoryRequirements), - ); -} - -export function CreateSamplerYcbcrConversion( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pYcbcrConversion: AnyBuffer, -): Result { - const ret = lib.vkCreateSamplerYcbcrConversion( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pYcbcrConversion), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroySamplerYcbcrConversion( - device: Device, - ycbcrConversion: SamplerYcbcrConversion, - pAllocator: AnyBuffer, -): void { - lib.vkDestroySamplerYcbcrConversion( - device, - ycbcrConversion, - anyBuffer(pAllocator), - ); -} - -export function GetDeviceQueue2( - device: Device, - pQueueInfo: AnyBuffer, - pQueue: AnyBuffer, -): void { - lib.vkGetDeviceQueue2( - device, - anyBuffer(pQueueInfo), - anyBuffer(pQueue), - ); -} - -export function GetDescriptorSetLayoutSupport( - device: Device, - pCreateInfo: AnyBuffer, - pSupport: AnyBuffer, -): void { - lib.vkGetDescriptorSetLayoutSupport( - device, - anyBuffer(pCreateInfo), - anyBuffer(pSupport), - ); -} - -export function CreateRenderPass2( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pRenderPass: AnyBuffer, -): Result { - const ret = lib.vkCreateRenderPass2( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pRenderPass), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CmdBeginRenderPass2( - commandBuffer: CommandBuffer, - pRenderPassBegin: AnyBuffer, - pSubpassBeginInfo: AnyBuffer, -): void { - lib.vkCmdBeginRenderPass2( - commandBuffer, - anyBuffer(pRenderPassBegin), - anyBuffer(pSubpassBeginInfo), - ); -} - -export function CmdNextSubpass2( - commandBuffer: CommandBuffer, - pSubpassBeginInfo: AnyBuffer, - pSubpassEndInfo: AnyBuffer, -): void { - lib.vkCmdNextSubpass2( - commandBuffer, - anyBuffer(pSubpassBeginInfo), - anyBuffer(pSubpassEndInfo), - ); -} - -export function CmdEndRenderPass2( - commandBuffer: CommandBuffer, - pSubpassEndInfo: AnyBuffer, -): void { - lib.vkCmdEndRenderPass2( - commandBuffer, - anyBuffer(pSubpassEndInfo), - ); -} - -export function GetSemaphoreCounterValue( - device: Device, - semaphore: Semaphore, - pValue: AnyBuffer, -): Result { - const ret = lib.vkGetSemaphoreCounterValue( - device, - semaphore, - anyBuffer(pValue), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function WaitSemaphores( - device: Device, - pWaitInfo: AnyBuffer, - timeout: Deno.PointerValue, -): Result { - const ret = lib.vkWaitSemaphores( - device, - anyBuffer(pWaitInfo), - timeout, - ); - if (ret === Result.SUCCESS || ret === Result.TIMEOUT) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function SignalSemaphore( - device: Device, - pSignalInfo: AnyBuffer, -): Result { - const ret = lib.vkSignalSemaphore( - device, - anyBuffer(pSignalInfo), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CmdDrawIndirectCount( - commandBuffer: CommandBuffer, - buffer: Buffer, - offset: DeviceSize, - countBuffer: Buffer, - countBufferOffset: DeviceSize, - maxDrawCount: number, - stride: number, -): void { - lib.vkCmdDrawIndirectCount( - commandBuffer, - buffer, - offset, - countBuffer, - countBufferOffset, - maxDrawCount, - stride, - ); -} - -export function CmdDrawIndexedIndirectCount( - commandBuffer: CommandBuffer, - buffer: Buffer, - offset: DeviceSize, - countBuffer: Buffer, - countBufferOffset: DeviceSize, - maxDrawCount: number, - stride: number, -): void { - lib.vkCmdDrawIndexedIndirectCount( - commandBuffer, - buffer, - offset, - countBuffer, - countBufferOffset, - maxDrawCount, - stride, - ); -} - -export function GetBufferOpaqueCaptureAddress( - device: Device, - pInfo: AnyBuffer, -): Deno.PointerValue { - const ret = lib.vkGetBufferOpaqueCaptureAddress( - device, - anyBuffer(pInfo), - ); - return ret; -} - -export function GetBufferDeviceAddress( - device: Device, - pInfo: AnyBuffer, -): DeviceAddress { - const ret = lib.vkGetBufferDeviceAddress( - device, - anyBuffer(pInfo), - ); - return ret; -} - -export function GetDeviceMemoryOpaqueCaptureAddress( - device: Device, - pInfo: AnyBuffer, -): Deno.PointerValue { - const ret = lib.vkGetDeviceMemoryOpaqueCaptureAddress( - device, - anyBuffer(pInfo), - ); - return ret; -} - -export function GetPhysicalDeviceToolProperties( - physicalDevice: PhysicalDevice, - pToolCount: AnyBuffer, - pToolProperties: AnyBuffer, -): Result { - const ret = lib.vkGetPhysicalDeviceToolProperties( - physicalDevice, - anyBuffer(pToolCount), - anyBuffer(pToolProperties), - ); - if (ret === Result.SUCCESS || ret === Result.INCOMPLETE) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CmdSetCullMode( - commandBuffer: CommandBuffer, - cullMode: CullModeFlags, -): void { - lib.vkCmdSetCullMode( - commandBuffer, - cullMode, - ); -} - -export function CmdSetFrontFace( - commandBuffer: CommandBuffer, - frontFace: FrontFace, -): void { - lib.vkCmdSetFrontFace( - commandBuffer, - frontFace, - ); -} - -export function CmdSetPrimitiveTopology( - commandBuffer: CommandBuffer, - primitiveTopology: PrimitiveTopology, -): void { - lib.vkCmdSetPrimitiveTopology( - commandBuffer, - primitiveTopology, - ); -} - -export function CmdSetViewportWithCount( - commandBuffer: CommandBuffer, - viewportCount: number, - pViewports: AnyBuffer, -): void { - lib.vkCmdSetViewportWithCount( - commandBuffer, - viewportCount, - anyBuffer(pViewports), - ); -} - -export function CmdSetScissorWithCount( - commandBuffer: CommandBuffer, - scissorCount: number, - pScissors: AnyBuffer, -): void { - lib.vkCmdSetScissorWithCount( - commandBuffer, - scissorCount, - anyBuffer(pScissors), - ); -} - -export function CmdBindVertexBuffers2( - commandBuffer: CommandBuffer, - firstBinding: number, - bindingCount: number, - pBuffers: AnyBuffer, - pOffsets: AnyBuffer, - pSizes: AnyBuffer, - pStrides: AnyBuffer, -): void { - lib.vkCmdBindVertexBuffers2( - commandBuffer, - firstBinding, - bindingCount, - anyBuffer(pBuffers), - anyBuffer(pOffsets), - anyBuffer(pSizes), - anyBuffer(pStrides), - ); -} - -export function CmdSetDepthTestEnable( - commandBuffer: CommandBuffer, - depthTestEnable: Bool32, -): void { - lib.vkCmdSetDepthTestEnable( - commandBuffer, - depthTestEnable, - ); -} - -export function CmdSetDepthWriteEnable( - commandBuffer: CommandBuffer, - depthWriteEnable: Bool32, -): void { - lib.vkCmdSetDepthWriteEnable( - commandBuffer, - depthWriteEnable, - ); -} - -export function CmdSetDepthCompareOp( - commandBuffer: CommandBuffer, - depthCompareOp: CompareOp, -): void { - lib.vkCmdSetDepthCompareOp( - commandBuffer, - depthCompareOp, - ); -} - -export function CmdSetDepthBoundsTestEnable( - commandBuffer: CommandBuffer, - depthBoundsTestEnable: Bool32, -): void { - lib.vkCmdSetDepthBoundsTestEnable( - commandBuffer, - depthBoundsTestEnable, - ); -} - -export function CmdSetStencilTestEnable( - commandBuffer: CommandBuffer, - stencilTestEnable: Bool32, -): void { - lib.vkCmdSetStencilTestEnable( - commandBuffer, - stencilTestEnable, - ); -} - -export function CmdSetStencilOp( - commandBuffer: CommandBuffer, - faceMask: StencilFaceFlags, - failOp: StencilOp, - passOp: StencilOp, - depthFailOp: StencilOp, - compareOp: CompareOp, -): void { - lib.vkCmdSetStencilOp( - commandBuffer, - faceMask, - failOp, - passOp, - depthFailOp, - compareOp, - ); -} - -export function CmdSetRasterizerDiscardEnable( - commandBuffer: CommandBuffer, - rasterizerDiscardEnable: Bool32, -): void { - lib.vkCmdSetRasterizerDiscardEnable( - commandBuffer, - rasterizerDiscardEnable, - ); -} - -export function CmdSetDepthBiasEnable( - commandBuffer: CommandBuffer, - depthBiasEnable: Bool32, -): void { - lib.vkCmdSetDepthBiasEnable( - commandBuffer, - depthBiasEnable, - ); -} - -export function CmdSetPrimitiveRestartEnable( - commandBuffer: CommandBuffer, - primitiveRestartEnable: Bool32, -): void { - lib.vkCmdSetPrimitiveRestartEnable( - commandBuffer, - primitiveRestartEnable, - ); -} - -export function CreatePrivateDataSlot( - device: Device, - pCreateInfo: AnyBuffer, - pAllocator: AnyBuffer, - pPrivateDataSlot: AnyBuffer, -): Result { - const ret = lib.vkCreatePrivateDataSlot( - device, - anyBuffer(pCreateInfo), - anyBuffer(pAllocator), - anyBuffer(pPrivateDataSlot), - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function DestroyPrivateDataSlot( - device: Device, - privateDataSlot: PrivateDataSlot, - pAllocator: AnyBuffer, -): void { - lib.vkDestroyPrivateDataSlot( - device, - privateDataSlot, - anyBuffer(pAllocator), - ); -} - -export function SetPrivateData( - device: Device, - objectType: ObjectType, - objectHandle: Deno.PointerValue, - privateDataSlot: PrivateDataSlot, - data: Deno.PointerValue, -): Result { - const ret = lib.vkSetPrivateData( - device, - objectType, - objectHandle, - privateDataSlot, - data, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function GetPrivateData( - device: Device, - objectType: ObjectType, - objectHandle: Deno.PointerValue, - privateDataSlot: PrivateDataSlot, - pData: AnyBuffer, -): void { - lib.vkGetPrivateData( - device, - objectType, - objectHandle, - privateDataSlot, - anyBuffer(pData), - ); -} - -export function CmdCopyBuffer2( - commandBuffer: CommandBuffer, - pCopyBufferInfo: AnyBuffer, -): void { - lib.vkCmdCopyBuffer2( - commandBuffer, - anyBuffer(pCopyBufferInfo), - ); -} - -export function CmdCopyImage2( - commandBuffer: CommandBuffer, - pCopyImageInfo: AnyBuffer, -): void { - lib.vkCmdCopyImage2( - commandBuffer, - anyBuffer(pCopyImageInfo), - ); -} - -export function CmdBlitImage2( - commandBuffer: CommandBuffer, - pBlitImageInfo: AnyBuffer, -): void { - lib.vkCmdBlitImage2( - commandBuffer, - anyBuffer(pBlitImageInfo), - ); -} - -export function CmdCopyBufferToImage2( - commandBuffer: CommandBuffer, - pCopyBufferToImageInfo: AnyBuffer, -): void { - lib.vkCmdCopyBufferToImage2( - commandBuffer, - anyBuffer(pCopyBufferToImageInfo), - ); -} - -export function CmdCopyImageToBuffer2( - commandBuffer: CommandBuffer, - pCopyImageToBufferInfo: AnyBuffer, -): void { - lib.vkCmdCopyImageToBuffer2( - commandBuffer, - anyBuffer(pCopyImageToBufferInfo), - ); -} - -export function CmdResolveImage2( - commandBuffer: CommandBuffer, - pResolveImageInfo: AnyBuffer, -): void { - lib.vkCmdResolveImage2( - commandBuffer, - anyBuffer(pResolveImageInfo), - ); -} - -export function CmdSetEvent2( - commandBuffer: CommandBuffer, - event: Event, - pDependencyInfo: AnyBuffer, -): void { - lib.vkCmdSetEvent2( - commandBuffer, - event, - anyBuffer(pDependencyInfo), - ); -} - -export function CmdResetEvent2( - commandBuffer: CommandBuffer, - event: Event, - stageMask: PipelineStageFlags2, -): void { - lib.vkCmdResetEvent2( - commandBuffer, - event, - stageMask, - ); -} - -export function CmdWaitEvents2( - commandBuffer: CommandBuffer, - eventCount: number, - pEvents: AnyBuffer, - pDependencyInfos: AnyBuffer, -): void { - lib.vkCmdWaitEvents2( - commandBuffer, - eventCount, - anyBuffer(pEvents), - anyBuffer(pDependencyInfos), - ); -} - -export function CmdPipelineBarrier2( - commandBuffer: CommandBuffer, - pDependencyInfo: AnyBuffer, -): void { - lib.vkCmdPipelineBarrier2( - commandBuffer, - anyBuffer(pDependencyInfo), - ); -} - -export function QueueSubmit2( - queue: Queue, - submitCount: number, - pSubmits: AnyBuffer, - fence: Fence, -): Result { - const ret = lib.vkQueueSubmit2( - queue, - submitCount, - anyBuffer(pSubmits), - fence, - ); - if (ret === Result.SUCCESS) { - return ret; - } else { - throw new VulkanError(ret as Result); - } -} - -export function CmdWriteTimestamp2( - commandBuffer: CommandBuffer, - stage: PipelineStageFlags2, - queryPool: QueryPool, - query: number, -): void { - lib.vkCmdWriteTimestamp2( - commandBuffer, - stage, - queryPool, - query, - ); -} - -export function CmdBeginRendering( - commandBuffer: CommandBuffer, - pRenderingInfo: AnyBuffer, -): void { - lib.vkCmdBeginRendering( - commandBuffer, - anyBuffer(pRenderingInfo), - ); -} - -export function CmdEndRendering( - commandBuffer: CommandBuffer, -): void { - lib.vkCmdEndRendering( - commandBuffer, - ); -} - -export * from "./util.ts"; diff --git a/data/vk.json b/data/vk.json index f6a2018..beb48cd 100644 --- a/data/vk.json +++ b/data/vk.json @@ -132355,4 +132355,4 @@ "$comment": "SPIR-V Capabilities allowed in Vulkan and what is required to use it" } } -} +} \ No newline at end of file diff --git a/examples/compute/build_shader.ts b/examples/compute/build_shader.ts new file mode 100644 index 0000000..a5bfcaa --- /dev/null +++ b/examples/compute/build_shader.ts @@ -0,0 +1,29 @@ +// test command +try { + new Deno.Command("glslc", { + args: ["--help"], + }).outputSync(); +} catch (error) { + if (error instanceof Deno.errors.NotFound) { + console.error("glslc not found."); + } else { + console.error(error); + } + Deno.exit(1); +} + +import { join, parse } from "https://deno.land/std@0.180.0/path/mod.ts"; + +function buildShader(filePath: string) { + const pathInfo = parse(filePath); + const outFileName = `${pathInfo.base}.spv`; + const outFilePath = join(pathInfo.dir, outFileName); + + const { stdout, stderr } = new Deno.Command("glslc", { + args: ["-o", outFilePath, "-g", filePath], + }).outputSync(); + const decoder = new TextDecoder(); + console.log(decoder.decode(stdout) + decoder.decode(stderr)); +} + +buildShader("./examples/compute/shaders/compute.comp"); diff --git a/examples/compute/main.ts b/examples/compute/main.ts index efbc13b..ac2e944 100644 --- a/examples/compute/main.ts +++ b/examples/compute/main.ts @@ -1,259 +1,885 @@ -import * as vk from "../../mod.ts"; - -export class ComputeApp { - instance!: vk.Instance; - physicalDevice!: vk.PhysicalDevice; - device!: vk.Device; - queueFamilyIndex!: number; - queue!: vk.Queue; - descriptorPool!: vk.DescriptorPool; - descriptorSetLayout!: vk.DescriptorSetLayout; - descriptorSet!: vk.DescriptorSet; - buffers!: vk.Buffer[]; - bufferSizes!: number[]; - pipelineLayout!: vk.PipelineLayout; - - constructor() { - this.createInstance(); - this.pickPhysicalDevice(); - this.findQueueFamily(); - this.createDevice(); - this.createPipeline(); +import { assert } from "https://deno.land/std@0.180.0/testing/asserts.ts"; +import * as vk from "../../api/mod.ts"; +import { + CString, + CStringArray, + jsString, + PointerArray, + PointerRef, + StructArray, + TypedArray, +} from "../../api/util.ts"; + +function getInstanceLayers() { + const count = Uint32Array.of(0); + vk.EnumerateInstanceLayerProperties(count, null); + const size = vk.LayerProperties.size; + const buffer = new Uint8Array(size * count[0]); + vk.EnumerateInstanceLayerProperties(count, buffer); + const ret = [] as vk.LayerProperties[]; + for (let i = 0; i < count[0]; i++) { + ret.push(new vk.LayerProperties(buffer.subarray(i * size, (i + 1) * size))); } + return ret; +} - createInstance() { - const instOut = new vk.PointerRef(); - vk.CreateInstance( - new vk.InstanceCreateInfo({ - pApplicationInfo: new vk.ApplicationInfo({ - pApplicationName: new vk.CString("Vulkan Compute"), - applicationVersion: vk.makeVersion(1, 0, 0), - pEngineName: new vk.CString("Deno Vulkan"), - engineVersion: vk.makeVersion(1, 0, 0), - apiVersion: vk.makeVersion(1, 2, 0), - }), - enabledLayerCount: 1, - ppEnabledLayerNames: new vk.CStringArray([ - "VK_LAYER_KHRONOS_validation", - ]), - }), - null, - instOut, +function getInstanceExtensions(layerName?: string) { + const _layerName = layerName === undefined ? null : new CString(layerName); + const count = Uint32Array.of(0); + vk.EnumerateInstanceExtensionProperties(_layerName, count, null); + const size = vk.ExtensionProperties.size; + const buffer = new Uint8Array(size * count[0]); + vk.EnumerateInstanceExtensionProperties(_layerName, count, buffer); + const ret = [] as vk.ExtensionProperties[]; + for (let i = 0; i < count[0]; i++) { + ret.push( + new vk.ExtensionProperties(buffer.subarray(i * size, (i + 1) * size)), ); - this.instance = instOut.value; } + return ret; +} - pickPhysicalDevice() { - const physicalDeviceCount = new Uint32Array(1); - vk.EnumeratePhysicalDevices(this.instance, physicalDeviceCount, null); +function getPhysicalDevicesAndProperties( + instance: NonNullable, +) { + const physicalDeviceCount = new Uint32Array(1); + vk.EnumeratePhysicalDevices(instance, physicalDeviceCount, null); + const physicalDevicesBuffer = new PointerArray(physicalDeviceCount[0]); + vk.EnumeratePhysicalDevices( + instance, + physicalDeviceCount, + physicalDevicesBuffer, + ); + const physicalDevices = physicalDevicesBuffer.toList(); + + const properties: vk.PhysicalDeviceProperties[] = []; + for (let i = 0; i < physicalDevices.length; i++) { + const physicalDevice = physicalDevices[i]; + const property = new vk.PhysicalDeviceProperties(); + vk.GetPhysicalDeviceProperties(physicalDevice, property); + properties.push(property); + } + return { physicalDevices, properties }; +} - const physicalDevices = new vk.PointerArray(physicalDeviceCount[0]); - vk.EnumeratePhysicalDevices( - this.instance, - physicalDeviceCount, - physicalDevices, +function getQueueFamiliyProperties( + physicalDevice: NonNullable, +) { + const queueFamilyCount = new Uint32Array(1); + vk.GetPhysicalDeviceQueueFamilyProperties( + physicalDevice, + queueFamilyCount, + null, + ); + if (queueFamilyCount[0] == 0) return []; + + const queuesBuffer = new Uint8Array( + vk.QueueFamilyProperties.size * queueFamilyCount[0], + ); + vk.GetPhysicalDeviceQueueFamilyProperties( + physicalDevice, + queueFamilyCount, + queuesBuffer, + ); + const queues = [] as vk.QueueFamilyProperties[]; + for (let i = 0; i < queueFamilyCount[0]; i++) { + const size = vk.QueueFamilyProperties.size; + queues.push( + new vk.QueueFamilyProperties( + queuesBuffer.slice(i * size, (i + 1) * size), + ), ); + } + return queues; +} - const properties: vk.PhysicalDeviceProperties[] = []; +function createInstance( + appInfo: vk.ApplicationInfo, + layers: string[], + extensions: string[], + enableDebugLayer = false, + debugCreateInfo?: vk.DebugUtilsMessengerCreateInfoEXT, +) { + const _layers = [...layers]; + const _extensions = [...extensions]; + if (enableDebugLayer && debugCreateInfo) { + if (!_layers.includes("VK_LAYER_KHRONOS_validation")) { + _layers.push("VK_LAYER_KHRONOS_validation"); + } + if (!_extensions.includes(vk.EXT_DEBUG_UTILS_EXTENSION_NAME)) { + _extensions.push(vk.EXT_DEBUG_UTILS_EXTENSION_NAME); + } + } - for (let i = 0; i < physicalDevices.length; i++) { - const physicalDevice = physicalDevices[i]; - const property = new vk.PhysicalDeviceProperties(); - vk.GetPhysicalDeviceProperties(physicalDevice, property); - properties.push(property); + const availableLayers = getInstanceLayers(); + const availableExtensions = getInstanceExtensions(); + + const unsupportLayers = [] as string[]; + const unsupportExtensions = [] as string[]; + for (const layer of layers) { + let support = false; + for (const availableLayer of availableLayers) { + if (jsString(availableLayer.layerName) == layer) { + support = true; + break; + } + } + if (!support) { + unsupportLayers.push(layer); } + } + for (const extension of extensions) { + let support = false; + for (const availableExtension of availableExtensions) { + if (jsString(availableExtension.extensionName) == extension) { + support = true; + break; + } + } + if (!support) { + unsupportExtensions.push(extension); + } + } - const names = properties.map((p) => { - const buf = new Uint8Array(p.deviceName); - const name = new TextDecoder().decode(buf.subarray(0, buf.indexOf(0))); - return name; - }); + if (unsupportLayers.length !== 0 || unsupportExtensions.length !== 0) { + return { instance: null, unsupportLayers, unsupportExtensions }; + } + + const instOut = new vk.PointerRef(); + const instanceCreateInfo = new vk.InstanceCreateInfo({ + pApplicationInfo: appInfo, + ppEnabledLayerNames: new vk.CStringArray(_layers), + enabledLayerCount: _layers.length, + ppEnabledExtensionNames: new vk.CStringArray(_extensions), + enabledExtensionCount: _extensions.length, + }); + + if (enableDebugLayer && debugCreateInfo) { + instanceCreateInfo.pNext = debugCreateInfo; + } + + vk.CreateInstance(instanceCreateInfo, null, instOut); + const instance = instOut.checkedValue; + + if (enableDebugLayer && debugCreateInfo) { + const loadCreateDebugUtilsMessengerEXT = () => { + const p = vk.GetInstanceProcAddr( + instance, + new CString("vkCreateDebugUtilsMessengerEXT"), + ); + assert(p !== null); + return new Deno.UnsafeFnPointer(p, { + "parameters": [ + "pointer", + "buffer", + "buffer", + "buffer", + ], + "result": "u32", + }); + }; + + const loadDestroyDebugUtilsMessengerEXT = () => { + const p = vk.GetInstanceProcAddr( + instance, + new CString("vkDestroyDebugUtilsMessengerEXT"), + ); + assert(p !== null); + return new Deno.UnsafeFnPointer(p, { + "parameters": [ + "pointer", + "pointer", + "buffer", + ], + "result": "void", + }); + }; + + const createDebugUtilsMessengerEXT = loadCreateDebugUtilsMessengerEXT(); + const destroyDebugUtilsMessengerEXT = loadDestroyDebugUtilsMessengerEXT(); + + const createDebugMessenger = () => { + const _debugMessengerRef = new PointerRef(); + createDebugUtilsMessengerEXT.call( + instance, + vk.anyBuffer(debugCreateInfo), + null, + vk.anyBuffer(_debugMessengerRef), + ); + return _debugMessengerRef.checkedValue; + }; + const debugMessenger = createDebugMessenger(); + const destroyDebugMessenger = () => { + destroyDebugUtilsMessengerEXT.call(instance, debugMessenger, null); + }; + return { instance, debugMessenger, destroyDebugMessenger }; + } else { + return { instance }; + } +} + +function selelcPhysicalDevice( + instance: NonNullable, + select: (properties: vk.PhysicalDeviceProperties[]) => number, +) { + const { + physicalDevices, + properties, + } = getPhysicalDevicesAndProperties(instance); + assert(physicalDevices.length > 0, "no physical device found."); + + const index = select(properties); + assert(index >= 0 && index < physicalDevices.length, "index out of range."); + + const physicalDevice = physicalDevices[index]; + assert(physicalDevice !== null); + + const memoryProperties = new vk.PhysicalDeviceMemoryProperties(); + vk.GetPhysicalDeviceMemoryProperties(physicalDevice, memoryProperties); + + return { + physicalDevice, + deviceProperties: properties[index], + memoryProperties, + }; +} + +function createDeviceAndQueue( + physicalDevice: NonNullable, + extensions: string[] = [], +) { + // queue familiy + const queueFamilies = getQueueFamiliyProperties(physicalDevice); + const select = () => { + for (const [index, queueFamily] of queueFamilies.entries()) { + const isCompute = queueFamily.queueFlags & vk.QueueFlagBits.COMPUTE; + const isGraphic = queueFamily.queueFlags & vk.QueueFlagBits.GRAPHICS; + const isTransfer = queueFamily.queueFlags & vk.QueueFlagBits.TRANSFER; + if (isCompute && isGraphic && isTransfer && queueFamily.queueCount > 0) { + return index; + } + } + /** + * From vulkan spec, + * "If an implementation exposes any queue family that supports + * graphics operations, at least one queue family of at least one + * physical device exposed by the implementation must support both + * graphics and compute operations." + * + * Also, + * "All commands that are allowed on a queue that supports transfer + * operations are also allowed on a queue that supports either graphics + * or compute operations. Thus, if the capabilities of a queue family + * include VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, then + * reporting the VK_QUEUE_TRANSFER_BIT capability separately for + * that queue family is optional." + */ + throw Error("versatile queue not found"); + }; + const queueFamilyIndex = select(); + + // device + + const _deviceRef = new PointerRef(); + vk.CreateDevice( + physicalDevice, + new vk.DeviceCreateInfo({ + enabledExtensionCount: extensions.length, + ppEnabledExtensionNames: new CStringArray(extensions), + queueCreateInfoCount: 1, + pQueueCreateInfos: new vk.DeviceQueueCreateInfo({ + queueFamilyIndex, + queueCount: 1, + pQueuePriorities: Float32Array.of(1), + }), + }), + null, + _deviceRef, + ); + const device = _deviceRef.checkedValue; + + const queueRef = new PointerRef(); + const queueIndex = 0; + vk.GetDeviceQueue( + device, + queueFamilyIndex, + queueIndex, + queueRef, + ); + const queue = queueRef.checkedValue; + return { device, queue, queueFamilyIndex }; +} - if (names.length === 0) { - console.log("No physical devices found"); - Deno.exit(1); +function getMemoryType( + memoryProperties: vk.PhysicalDeviceMemoryProperties, + typeBits: number, + properties: vk.Flags, +) { + for (let i = 0; i < vk.MAX_MEMORY_TYPES; i++) { + if ((typeBits & 1) === 1) { + const flags = memoryProperties.memoryTypes[i].propertyFlags; + if ((flags & properties) === properties) { + return i; + } + } + typeBits >>= 1; + } + throw Error("no proper memory type found."); +} + +function createBuffer( + device: NonNullable, + physicalMemoryProperties: vk.PhysicalDeviceMemoryProperties, + byteLength: number, + usage: vk.BufferUsageFlags, + requiredMemoryProperties: vk.MemoryPropertyFlags, +) { + const buffer = new PointerRef(); + vk.CreateBuffer( + device, + new vk.BufferCreateInfo({ + size: byteLength, + usage: usage, + }), + null, + buffer, + ); + + const memReqs = new vk.MemoryRequirements(); + vk.GetBufferMemoryRequirements( + device, + buffer.checkedValue, + memReqs, + ); + + const memory = new PointerRef(); + const memroyType = getMemoryType( + physicalMemoryProperties, + memReqs.memoryTypeBits, + requiredMemoryProperties, + ); + vk.AllocateMemory( + device, + new vk.MemoryAllocateInfo({ + allocationSize: memReqs.size, + memoryTypeIndex: memroyType, + }), + null, + memory, + ); + vk.BindBufferMemory(device, buffer.checkedValue, memory.checkedValue, 0); + return { buffer: buffer.checkedValue, memory: memory.checkedValue }; +} +const debugCallback = new Deno.UnsafeCallback( + { + parameters: ["i32", "i32", "pointer", "pointer"], + result: "u32", + } as const, + ( + messageSeverity: vk.DebugUtilsMessageSeverityFlagBitsEXT, + _messageType: vk.DebugUtilsMessageTypeFlagBitsEXT, + pCallbackData: Deno.PointerValue, + _pUserData: Deno.PointerValue, + ) => { + const data = new vk.DebugUtilsMessengerCallbackDataEXT(pCallbackData); + const message = vk.jsString(data.pMessage); + switch (messageSeverity) { + case vk.DebugUtilsMessageSeverityFlagBitsEXT + .DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT: + console.error(message); + break; + case vk.DebugUtilsMessageSeverityFlagBitsEXT + .DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT: + console.warn(message); + break; + case vk.DebugUtilsMessageSeverityFlagBitsEXT + .DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT: + console.info(message); + break; + case vk.DebugUtilsMessageSeverityFlagBitsEXT + .DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT: + console.debug(message); + break; } + return 0; + }, +); + +interface BufferInfo { + memory: NonNullable; + buffer: NonNullable; + usage: vk.BufferUsageFlags; + memoryProperties: vk.MemoryPropertyFlags; + byteLength: number; +} - let physicalDevice: vk.PhysicalDevice; +class ComputeApp { + instance!: NonNullable; + debugMessenger!: vk.DebugUtilsMessengerEXT; + physicalDevice!: NonNullable; + memoryProperties!: vk.PhysicalDeviceMemoryProperties; + device!: NonNullable; + computeQueue!: NonNullable; + queueFamilyIndex!: number; + + descriptorSetLayout!: NonNullable; + pipelineLayout!: NonNullable; + pipeline!: NonNullable; + + descriptorPool!: NonNullable; + commandPool!: NonNullable; + inputBuffer!: BufferInfo; + outputBuffer!: BufferInfo; + uniformBuffer!: BufferInfo; + descriptorSet!: NonNullable; + inputData = new Float32Array(16).fill(1); + uniformData = Int32Array.of(this.inputData.length); + + #cleanupCallbacks: (() => void)[] = []; + + constructor(enableDebug: boolean) { + const appInfo = new vk.ApplicationInfo({ + pApplicationName: new vk.CString("Deno"), + applicationVersion: vk.makeVersion(1, 0, 0), + pEngineName: new vk.CString("Deno"), + engineVersion: vk.makeVersion(1, 0, 0), + apiVersion: vk.makeVersion(1, 3, 0), + }); + + const debugInfo = new vk.DebugUtilsMessengerCreateInfoEXT({ + messageSeverity: + // vk.DebugUtilsMessageSeverityFlagBitsEXT + // .DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT | + // vk.DebugUtilsMessageSeverityFlagBitsEXT + // .DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT | + vk.DebugUtilsMessageSeverityFlagBitsEXT + .DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT | + vk.DebugUtilsMessageSeverityFlagBitsEXT + .DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT, + messageType: vk.DebugUtilsMessageTypeFlagBitsEXT + .DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT | + vk.DebugUtilsMessageTypeFlagBitsEXT + .DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT | + vk.DebugUtilsMessageTypeFlagBitsEXT + .DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT, + pfnUserCallback: debugCallback.pointer, + }); - if (names.length === 1) { - console.log("Using physical device:", names[0]); - physicalDevice = physicalDevices[0]; + const result = createInstance(appInfo, [], [], enableDebug, debugInfo); + if (result.instance === null) { + console.error(`unsurppot layers: ${result.unsupportLayers}`); + console.error(`unsurppot extensions: ${result.unsupportExtensions}`); + throw Error("instance create failed."); } else { - console.log("Multiple physical devices found:"); - for (let i = 0; i < names.length; i++) { - console.log(` - ${i}: ${names[i]}`); + this.instance = result.instance; + this.#cleanupCallbacks.push(() => + vk.DestroyInstance(this.instance, null) + ); + if (enableDebug) { + assert(result.debugMessenger); + this.debugMessenger = result.debugMessenger; + if (this.debugMessenger == null) { + console.warn("debug layer init faild."); + } else { + this.#cleanupCallbacks.push(() => result.destroyDebugMessenger()); + } } + } - const index = prompt("Select physical device: "); - physicalDevice = physicalDevices[parseInt(index!)]; - if (!physicalDevice) { - console.log("Invalid physical device"); - Deno.exit(1); + const { + physicalDevice, + memoryProperties, + } = selelcPhysicalDevice(this.instance, (properties) => { + for (const [index, device] of properties.entries()) { + if (device.deviceType == vk.PhysicalDeviceType.DISCRETE_GPU) { + return index; + } } - } + return 0; + }); - this.physicalDevice = physicalDevice; + // this.physicalDevice = physicalDevice; + // this.memoryProperties = memoryProperties; + + // const { + // device, + // queue, + // queueFamilyIndex, + // } = createDeviceAndQueue(this.physicalDevice); + // this.device = device; + // this.#cleanupCallbacks.push(() => vk.DestroyDevice(this.device, null)); + // this.computeQueue = queue; + // this.queueFamilyIndex = queueFamilyIndex; + + // this.createPipline(); + // this.createResources(); } - findQueueFamily() { - const queueFamilyCount = new Uint32Array(1); - vk.GetPhysicalDeviceQueueFamilyProperties( - this.physicalDevice, - queueFamilyCount, + cleanup() { + if (this.device) { + vk.DeviceWaitIdle(this.device); + } + const callbacks = this.#cleanupCallbacks.toReversed(); + for (const callback of callbacks) { + callback(); + } + } + + createResources() { + // pools + const descriptorPool = new PointerRef(); + const poolSizes = [ + new vk.DescriptorPoolSize({ + type: vk.DescriptorType.STORAGE_BUFFER, + descriptorCount: 20, + }), + ]; + vk.CreateDescriptorPool( + this.device, + new vk.DescriptorPoolCreateInfo({ + pPoolSizes: new StructArray(poolSizes, vk.DescriptorPoolSize), + poolSizeCount: poolSizes.length, + maxSets: 100, + }), null, + descriptorPool, ); + this.#cleanupCallbacks.push(() => + vk.DestroyDescriptorPool(this.device, descriptorPool.checkedValue, null) + ); + this.descriptorPool = descriptorPool.checkedValue; - const queueFamilies = new vk.StructArray( - queueFamilyCount[0], - vk.QueueFamilyProperties, + const commandPool = new PointerRef(); + vk.CreateCommandPool( + this.device, + new vk.CommandPoolCreateInfo({ + queueFamilyIndex: this.queueFamilyIndex, + }), + null, + commandPool, ); - vk.GetPhysicalDeviceQueueFamilyProperties( - this.physicalDevice, - queueFamilyCount, - queueFamilies, + this.#cleanupCallbacks.push(() => + vk.DestroyCommandPool(this.device, commandPool.checkedValue, null) ); + this.commandPool = commandPool.checkedValue; + + // buffers + // const inputData = new Float32Array(16); + this.inputBuffer = this.createBuffer( + this.inputData.byteLength, + vk.BufferUsageFlagBits.STORAGE_BUFFER, + vk.MemoryPropertyFlagBits.HOST_VISIBLE | + vk.MemoryPropertyFlagBits.HOST_COHERENT, + ); + this.writeBuffer(this.inputBuffer, this.inputData); - let queueFamilyIndex = 0; - let found = false; - for (const props of queueFamilies) { - if (props.queueFlags & vk.QueueFlagBits.QUEUE_COMPUTE_BIT) { - found = true; - break; - } - queueFamilyIndex++; - } - - if (!found) { - throw new Error("No compute queue family found"); - } + this.outputBuffer = this.createBuffer( + this.inputData.byteLength, + vk.BufferUsageFlagBits.STORAGE_BUFFER, + vk.MemoryPropertyFlagBits.HOST_VISIBLE | + vk.MemoryPropertyFlagBits.HOST_COHERENT, + ); - this.queueFamilyIndex = queueFamilyIndex; - } + this.uniformBuffer = this.createBuffer( + this.uniformData.byteLength, + vk.BufferUsageFlagBits.UNIFORM_BUFFER, + vk.MemoryPropertyFlagBits.HOST_VISIBLE | + vk.MemoryPropertyFlagBits.HOST_COHERENT, + ); + this.writeBuffer(this.uniformBuffer, this.uniformData); - createDevice() { - const deviceOut = new vk.PointerRef(); - vk.CreateDevice( - this.physicalDevice, - new vk.DeviceCreateInfo({ - queueCreateInfoCount: 1, - pQueueCreateInfos: new vk.StructArray([ - new vk.DeviceQueueCreateInfo({ - queueFamilyIndex: this.queueFamilyIndex, - queueCount: 1, - pQueuePriorities: new Float32Array([1.0]), - }), - ], vk.DeviceQueueCreateInfo), + // descriptor set + const descriptorSetRef = new PointerRef(); + vk.AllocateDescriptorSets( + this.device, + new vk.DescriptorSetAllocateInfo({ + descriptorPool: this.descriptorPool, + descriptorSetCount: 1, + pSetLayouts: PointerRef.ofPointer(this.descriptorSetLayout), }), - null, - deviceOut, + descriptorSetRef, ); - this.device = deviceOut.value; + this.descriptorSet = descriptorSetRef.checkedValue; + + const descriptorWrites = [ + new vk.WriteDescriptorSet({ + dstSet: descriptorSetRef.checkedValue, + dstBinding: 0, + descriptorCount: 1, + descriptorType: vk.DescriptorType.UNIFORM_BUFFER, + pBufferInfo: new vk.DescriptorBufferInfo({ + buffer: this.uniformBuffer.buffer, + offset: 0, + range: vk.WHOLE_SIZE, + }), + }), + new vk.WriteDescriptorSet({ + dstSet: descriptorSetRef.checkedValue, + dstBinding: 1, + descriptorCount: 1, + descriptorType: vk.DescriptorType.STORAGE_BUFFER, + pBufferInfo: new vk.DescriptorBufferInfo({ + buffer: this.inputBuffer.buffer, + offset: 0, + range: vk.WHOLE_SIZE, + }), + }), + new vk.WriteDescriptorSet({ + dstSet: descriptorSetRef.checkedValue, + dstBinding: 2, + descriptorCount: 1, + descriptorType: vk.DescriptorType.STORAGE_BUFFER, + pBufferInfo: new vk.DescriptorBufferInfo({ + buffer: this.outputBuffer.buffer, + offset: 0, + range: vk.WHOLE_SIZE, + }), + }), + ]; - const queueOut = new vk.PointerRef(); - vk.GetDeviceQueue(this.device, this.queueFamilyIndex, 0, queueOut); - this.queue = queueOut.value; + vk.UpdateDescriptorSets( + this.device, + descriptorWrites.length, + new StructArray(descriptorWrites, vk.WriteDescriptorSet), + 0, + null, + ); } - createPipeline() { - const descriptorCount = 2; - - const descriptorPoolSize = new vk.DescriptorPoolSize({ - type: vk.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER, - descriptorCount, + createBuffer( + byteLength: number, + usage: vk.BufferUsageFlags, + memoryProperties: vk.MemoryPropertyFlags, + ) { + const { buffer, memory } = createBuffer( + this.device, + this.memoryProperties, + byteLength, + usage, + memoryProperties, + ); + this.#cleanupCallbacks.push(() => { + vk.DestroyBuffer(this.device, buffer, null); + vk.FreeMemory(this.device, memory, null); }); + return { buffer, memory, byteLength, usage, memoryProperties }; + } - const descriptorPoolOut = new vk.PointerRef(); - vk.CreateDescriptorPool( + createPipline() { + const shaderModuleRef = new PointerRef(); + const code = Deno.readFileSync( + "./examples/compute/shaders/compute.comp.spv", + ); + vk.CreateShaderModule( this.device, - new vk.DescriptorPoolCreateInfo({ - maxSets: 1, - poolSizeCount: 1, - pPoolSizes: descriptorPoolSize, + new vk.ShaderModuleCreateInfo({ + codeSize: code.length, + pCode: code, }), null, - descriptorPoolOut, + shaderModuleRef, ); - this.descriptorPool = descriptorPoolOut.value; - - const descriptorSetLayoutBindings = new vk.StructArray( - descriptorCount, - vk.DescriptorSetLayoutBinding, + this.#cleanupCallbacks.push(() => + vk.DestroyShaderModule( + this.device, + shaderModuleRef.checkedValue, + null, + ) ); - for (let i = 0; i < descriptorCount; i++) { - const desc = descriptorSetLayoutBindings.get(i); - desc.binding = i; - desc.descriptorType = vk.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER; - desc.descriptorCount = 1; - desc.stageFlags = vk.ShaderStageFlagBits.SHADER_STAGE_COMPUTE_BIT; - } - const descriptorSetLayoutOut = new vk.PointerRef(); + const shaderStageInfo = new vk.PipelineShaderStageCreateInfo({ + module: shaderModuleRef.checkedValue, + pName: new CString("main"), + stage: vk.ShaderStageFlagBits.COMPUTE, + }); + + const bindings = [ + new vk.DescriptorSetLayoutBinding({ + binding: 0, + descriptorCount: 1, + descriptorType: vk.DescriptorType.UNIFORM_BUFFER, + stageFlags: vk.ShaderStageFlagBits.COMPUTE, + }), + new vk.DescriptorSetLayoutBinding({ + binding: 1, + descriptorCount: 1, + descriptorType: vk.DescriptorType.STORAGE_BUFFER, + stageFlags: vk.ShaderStageFlagBits.COMPUTE, + }), + new vk.DescriptorSetLayoutBinding({ + binding: 2, + descriptorCount: 1, + descriptorType: vk.DescriptorType.STORAGE_BUFFER, + stageFlags: vk.ShaderStageFlagBits.COMPUTE, + }), + ]; + + const descriptorSetLayoutRef = new PointerRef(); vk.CreateDescriptorSetLayout( this.device, new vk.DescriptorSetLayoutCreateInfo({ - bindingCount: descriptorCount, - pBindings: descriptorSetLayoutBindings, + pBindings: new StructArray(bindings, vk.DescriptorSetLayoutBinding), + bindingCount: bindings.length, + }), + null, + descriptorSetLayoutRef, + ); + this.#cleanupCallbacks.push(() => + vk.DestroyDescriptorSetLayout( + this.device, + descriptorSetLayoutRef.checkedValue, + null, + ) + ); + this.descriptorSetLayout = descriptorSetLayoutRef.checkedValue; + + const pipelineLayoutRef = new PointerRef(); + vk.CreatePipelineLayout( + this.device, + new vk.PipelineLayoutCreateInfo({ + setLayoutCount: 1, + pSetLayouts: descriptorSetLayoutRef, }), null, - descriptorSetLayoutOut, + pipelineLayoutRef, + ); + this.#cleanupCallbacks.push(() => + vk.DestroyPipelineLayout( + this.device, + pipelineLayoutRef.checkedValue, + null, + ) ); - this.descriptorSetLayout = descriptorSetLayoutOut.value; + this.pipelineLayout = pipelineLayoutRef.checkedValue; - const descriptorSetAllocateInfo = new vk.DescriptorSetAllocateInfo({ - descriptorPool: descriptorPoolOut.value, - descriptorSetCount: 1, - pSetLayouts: new vk.PointerArray([descriptorSetLayoutOut.value]), + const pipelineRef = new PointerRef(); + const infos = new vk.ComputePipelineCreateInfo({ + stage: shaderStageInfo, + layout: pipelineLayoutRef.checkedValue, }); + vk.CreateComputePipelines( + this.device, + null, + 1, + infos, + null, + pipelineRef, + ); + this.#cleanupCallbacks.push(() => + vk.DestroyPipeline(this.device, pipelineRef.checkedValue, null) + ); - const descriptorSetOut = new vk.PointerRef(); - vk.AllocateDescriptorSets( + this.pipeline = pipelineRef.checkedValue; + } + + writeBuffer(buffer: BufferInfo, data: TypedArray) { + assert(buffer.memoryProperties & vk.MemoryPropertyFlagBits.HOST_VISIBLE); + assert(data.byteLength <= buffer.byteLength); + const byteView = data instanceof Uint8Array + ? data + : new Uint8Array(data.buffer, data.byteOffset, data.byteLength); + const outPointer = new vk.PointerRef(); + const byteLength = byteView.byteLength; + vk.MapMemory(this.device, buffer.memory, 0, byteLength, 0, outPointer); + const outBuffer = new Uint8Array( + Deno.UnsafePointerView.getArrayBuffer( + outPointer.checkedValue, + byteLength, + ), + ); + outBuffer.set(byteView, 0); + vk.UnmapMemory(this.device, buffer.memory); + } + + readBuffer(buffer: BufferInfo) { + assert(buffer.memoryProperties & vk.MemoryPropertyFlagBits.HOST_VISIBLE); + const outPointer = new vk.PointerRef(); + const byteLength = buffer.byteLength; + vk.MapMemory(this.device, buffer.memory, 0, byteLength, 0, outPointer); + const outBuffer = Deno.UnsafePointerView.getArrayBuffer( + outPointer.checkedValue, + byteLength, + ); + const copy = outBuffer.slice(0); + vk.UnmapMemory(this.device, buffer.memory); + return copy; + } + + run() { + console.log("input"); + console.log(this.inputData); + + const fenceRef = new PointerRef(); + vk.CreateFence(this.device, new vk.FenceCreateInfo(), null, fenceRef); + this.#cleanupCallbacks.push(() => + vk.DestroyFence(this.device, fenceRef.checkedValue, null) + ); + const fence = fenceRef.checkedValue; + + const cmdRef = new PointerRef(); + vk.AllocateCommandBuffers( + this.device, + new vk.CommandBufferAllocateInfo({ + commandPool: this.commandPool, + commandBufferCount: 1, + level: vk.CommandBufferLevel.PRIMARY, + }), + cmdRef, + ); + const cmd = cmdRef.checkedValue; + + vk.BeginCommandBuffer( + cmd, + new vk.CommandBufferBeginInfo({ + flags: vk.CommandBufferUsageFlagBits.ONE_TIME_SUBMIT, + }), + ); + + vk.CmdBindDescriptorSets( + cmd, + vk.PipelineBindPoint.COMPUTE, + this.pipelineLayout, + 0, + 1, + PointerRef.ofPointer(this.descriptorSet), + 0, + null, + ); + vk.CmdBindPipeline(cmd, vk.PipelineBindPoint.COMPUTE, this.pipeline); + vk.CmdDispatch(cmd, 1, 1, 1); + + vk.EndCommandBuffer(cmd); + vk.QueueSubmit( + this.computeQueue, + 1, + new vk.SubmitInfo({ commandBufferCount: 1, pCommandBuffers: cmdRef }), + fence, + ); + + vk.WaitForFences( this.device, - descriptorSetAllocateInfo, - descriptorSetOut, + 1, + fenceRef, + 1, /** VKBool */ + 5 * 1000 * 1000, /** ns */ ); - this.descriptorSet = descriptorSetOut.value; - - // for (let i = 0; i < descriptorCount; i++) { - // const descriptorBufferInfo = new vk.DescriptorBufferInfo({ - // buffer: this.buffers[i], - // offset: 0, - // range: this.bufferSizes[i], - // }); - - // const writeDescriptorSet = new vk.WriteDescriptorSet({ - // dstSet: descriptorSetOut.value, - // dstBinding: i, - // dstArrayElement: 0, - // descriptorCount: 1, - // descriptorType: vk.DescriptorType.DESCRIPTOR_TYPE_STORAGE_BUFFER, - // pBufferInfo: descriptorBufferInfo, - // }); - - // vk.UpdateDescriptorSets(this.device, 1, writeDescriptorSet, 0, null); - // } - - // const pushConstantRange = new vk.PushConstantRange({ - // stageFlags: vk.ShaderStageFlagBits.SHADER_STAGE_COMPUTE_BIT, - // offset: 0, - // size: 4, - // }); - - // const pipelineLayoutOut = new vk.PointerRef(); - // vk.CreatePipelineLayout( - // this.device, - // new vk.PipelineLayoutCreateInfo({ - // setLayoutCount: 1, - // pSetLayouts: new vk.PointerArray([descriptorSetLayoutOut.value]), - // pushConstantRangeCount: 1, - // pPushConstantRanges: pushConstantRange, - // }), - // null, - // pipelineLayoutOut, - // ); - // this.pipelineLayout = pipelineLayoutOut.value; + console.log("output"); + const copy = new Float32Array(this.readBuffer(this.outputBuffer)); + console.log(copy); } } -const app = new ComputeApp(); -console.log(app); +console.time("creations"); +const app = new ComputeApp(true); +console.timeEnd("creations"); + +// console.time("run"); +// app.run(); +// console.timeEnd("run"); + +console.time("cleanup"); +app.cleanup(); +console.timeEnd("cleanup"); + +debugCallback.close(); +Deno.exit(0); diff --git a/examples/compute/shaders/compute.comp b/examples/compute/shaders/compute.comp new file mode 100644 index 0000000..a4cb60b --- /dev/null +++ b/examples/compute/shaders/compute.comp @@ -0,0 +1,28 @@ +#version 450 + +layout (local_size_x = 256, local_size_y = 1, local_size_z = 1) in; + +layout(set = 0, binding = 0) uniform Config{ + int numberCount; +}; + +layout(set = 0, binding = 1) readonly buffer InputBuffer{ + float numbers[]; +} inputData; + +layout(set = 0, binding = 2) buffer OutputBuffer{ + float numbers[]; +} outputData; + + +void main() +{ + //grab global ID + uint gID = gl_GlobalInvocationID.x; + //make sure we don't access past the buffer size + if(gID < numberCount) + { + // do math + outputData.numbers[gID] = inputData.numbers[gID] + 1; + } +} diff --git a/examples/compute/shaders/compute.comp.spv b/examples/compute/shaders/compute.comp.spv new file mode 100644 index 0000000..22c326b Binary files /dev/null and b/examples/compute/shaders/compute.comp.spv differ diff --git a/examples/triangle/main.ts b/examples/triangle/main.ts index 1620b94..9c2847c 100644 --- a/examples/triangle/main.ts +++ b/examples/triangle/main.ts @@ -1,5 +1,6 @@ -import * as vk from "../../api/vk.ts"; -import * as dwm from "https://deno.land/x/dwm@0.2.1/mod.ts"; +import * as vk from "../../api/mod.ts"; +import * as dwm from "https://deno.land/x/dwm@0.3.2/mod.ts"; +import { PointerArray } from "../../api/mod.ts"; export class TriangleApplication { window!: dwm.DwmWindow; @@ -38,16 +39,16 @@ export class TriangleApplication { swapChainFormat!: vk.Format; oldSwapChain!: vk.SwapchainKHR; swapChain!: vk.SwapchainKHR; - swapChainImages!: BigUint64Array; - swapChainImageViews!: BigUint64Array; - swapChainFramebuffers!: BigUint64Array; + swapChainImages!: Deno.PointerValue[]; + swapChainImageViews!: Deno.PointerValue[]; + swapChainFramebuffers!: Deno.PointerValue[]; renderPass!: vk.RenderPass; graphicsPipeline!: vk.Pipeline; pipelineLayout!: vk.PipelineLayout; commandPool!: vk.CommandPool; - graphicsCommandBuffers!: BigUint64Array; + graphicsCommandBuffers!: Deno.PointerValue[]; graphicsQueueFamily!: number; presentQueueFamily!: number; @@ -79,7 +80,7 @@ export class TriangleApplication { } async setupVulkan() { - this.oldSwapChain = 0; + this.oldSwapChain = null; this.createInstance(); this.createDebugCallback(); @@ -135,7 +136,7 @@ export class TriangleApplication { this.device, this.commandPool, this.graphicsCommandBuffers.length, - this.graphicsCommandBuffers, + new PointerArray(this.graphicsCommandBuffers), ); vk.DestroyPipeline(this.device, this.graphicsPipeline, null); @@ -474,7 +475,7 @@ export class TriangleApplication { 0, dataOut, ); - vk.getBuffer(dataOut.value, vertices.byteLength, Float32Array).set( + vk.getBuffer(dataOut.checkedValue, vertices.byteLength, Float32Array).set( vertices, ); vk.UnmapMemory(this.device, vertexBufferMemory); @@ -557,7 +558,9 @@ export class TriangleApplication { 0, dataOut, ); - vk.getBuffer(dataOut.value, indices.byteLength, Uint16Array).set(indices); + vk.getBuffer(dataOut.checkedValue, indices.byteLength, Uint16Array).set( + indices, + ); vk.UnmapMemory(this.device, indexBufferMemory); vk.BindBufferMemory( this.device, @@ -631,7 +634,7 @@ export class TriangleApplication { pCommandBuffers: new vk.PointerArray([copyCommandBuffer]), }); - vk.QueueSubmit(this.graphicsQueue, 1, submitInfo, 0); + vk.QueueSubmit(this.graphicsQueue, 1, submitInfo, null); vk.QueueWaitIdle(this.graphicsQueue); vk.FreeCommandBuffers( @@ -733,7 +736,11 @@ export class TriangleApplication { 0, dataOut, ); - vk.getBuffer(dataOut.value, this.uniformBufferData.byteLength, Float32Array) + vk.getBuffer( + dataOut.checkedValue, + this.uniformBufferData.byteLength, + Float32Array, + ) .set(this.uniformBufferData); vk.UnmapMemory(this.device, this.uniformBufferMemory); } @@ -834,7 +841,7 @@ export class TriangleApplication { imageUsage: vk.ImageUsageFlagBits.COLOR_ATTACHMENT, imageSharingMode: vk.SharingMode.EXCLUSIVE, queueFamilyIndexCount: 0, - pQueueFamilyIndices: 0, + pQueueFamilyIndices: null, preTransform: surfaceTransform, compositeAlpha: vk.CompositeAlphaFlagBitsKHR.COMPOSITE_ALPHA_OPAQUE_BIT_KHR, @@ -868,13 +875,14 @@ export class TriangleApplication { null, ); - this.swapChainImages = new BigUint64Array(actualImageCount[0]); + const _imageArray = new PointerArray(actualImageCount[0]); vk.GetSwapchainImagesKHR( this.device, this.swapChain, actualImageCount, - this.swapChainImages, + _imageArray, ); + this.swapChainImages = _imageArray.toList(); } chooseSurfaceFormat(availableFormats: vk.SurfaceFormatKHR[]) { @@ -974,7 +982,7 @@ export class TriangleApplication { } createImageViews() { - this.swapChainImageViews = new BigUint64Array(this.swapChainImages.length); + this.swapChainImageViews = Array(this.swapChainImages.length).fill(null); for (let i = 0; i < this.swapChainImages.length; i++) { const components = new vk.ComponentMapping({ @@ -1007,14 +1015,12 @@ export class TriangleApplication { null, imageViewOut, ); - this.swapChainImageViews[i] = BigInt(imageViewOut.value); + this.swapChainImageViews[i] = imageViewOut.value; } } createFramebuffers() { - this.swapChainFramebuffers = new BigUint64Array( - this.swapChainImages.length, - ); + this.swapChainFramebuffers = Array(this.swapChainImages.length).fill(null); for (let i = 0; i < this.swapChainImages.length; i++) { const createInfo = new vk.FramebufferCreateInfo({ @@ -1034,7 +1040,7 @@ export class TriangleApplication { framebufferOut, ); - this.swapChainFramebuffers[i] = BigInt(framebufferOut.value); + this.swapChainFramebuffers[i] = framebufferOut.value; } } @@ -1215,14 +1221,14 @@ export class TriangleApplication { layout: this.pipelineLayout, renderPass: this.renderPass, subpass: 0, - basePipelineHandle: 0, + basePipelineHandle: null, basePipelineIndex: -1, }); const pipelineOut = new vk.PointerRef(); vk.CreateGraphicsPipelines( this.device, - 0, + null, 1, pipelineCreateInfo, null, @@ -1295,21 +1301,22 @@ export class TriangleApplication { } createCommandBuffers() { - this.graphicsCommandBuffers = new BigUint64Array( - this.swapChainImages.length, - ); - + this.graphicsCommandBuffers = Array(this.swapChainImages.length).fill(null); const allocInfo = new vk.CommandBufferAllocateInfo({ commandPool: this.commandPool, level: vk.CommandBufferLevel.PRIMARY, commandBufferCount: this.graphicsCommandBuffers.length, }); + const _commandBuffers = new PointerArray( + this.graphicsCommandBuffers.length, + ); vk.AllocateCommandBuffers( this.device, allocInfo, - this.graphicsCommandBuffers, + _commandBuffers, ); + this.graphicsCommandBuffers = _commandBuffers.toList(); const beginInfo = new vk.CommandBufferBeginInfo({ flags: vk.CommandBufferUsageFlagBits.SIMULTANEOUS_USE, @@ -1453,7 +1460,7 @@ export class TriangleApplication { this.swapChain, 1000000000, this.imageAvailableSemaphore, - 0, + null, imageIndex, ); // deno-lint-ignore no-explicit-any @@ -1480,7 +1487,7 @@ export class TriangleApplication { ]), }); - vk.QueueSubmit(this.graphicsQueue, 1, submitInfo, 0); + vk.QueueSubmit(this.graphicsQueue, 1, submitInfo, null); const presentInfo = new vk.PresentInfoKHR({ waitSemaphoreCount: 1, diff --git a/generator/emitter.ts b/generator/emitter.ts index cefd5d4..63729ce 100644 --- a/generator/emitter.ts +++ b/generator/emitter.ts @@ -1,24 +1,56 @@ -import { transform } from "https://deno.land/x/swc@0.2.1/mod.ts"; +// deno-lint-ignore-file no-inner-declarations no-explicit-any import { - block, commands, constants, - emit, enums, Field, - getIdent, - getTypeSize, + FileBuilder, + getTypeRequirement, isArray, isStruct, jsify, - newline, - output, structs, tymap, typedefs, typeToJS, unions, + vendors, } from "./process_xml.ts"; +import { parse } from "https://deno.land/std@0.179.0/path/mod.ts"; + +const nameSetEnums = new Set(enums.map((it) => it.name)); +const nameSetStrucs = new Set(structs.map((it) => it.name)); +const nameSetUnions = new Set(unions.map((it) => it.name)); +const nameSetDefs = new Set(); + +/** + * without alias + */ +const pureTypeDefs = []; +const aliasTypeDefs = []; +for (const def of typedefs) { + if (!def.alias) { + pureTypeDefs.push(def); + nameSetDefs.add(def.name); + } else { + aliasTypeDefs.push(def); + if (nameSetStrucs.has(def.type)) { + nameSetStrucs.add(def.name); + } else if (nameSetEnums.has(def.type)) { + // FlagBits + nameSetEnums.add(def.name); + } else { + // Flags + nameSetDefs.add(def.name); + } + } +} + +function writeFile(path: string, text: string, append = false) { + const info = parse(path); + Deno.mkdirSync(info.dir, { recursive: true }); + Deno.writeTextFileSync(path, text, { append: append }); +} function stripVk(name: any) { if (typeof name !== "string") return name; @@ -34,419 +66,613 @@ function toConstCase(name: string) { .join("_"); } -console.log("Emitting..."); - -newline(); +{ + const b = new FileBuilder(); + b.emit("/// Type definitions"); -emit( - `import { AnyBuffer, AnyPointer, anyBuffer, anyPointer, BUFFER, DATAVIEW, LE, BaseStruct } from "./util.ts";`, -); - -newline(); -emit("/// Type definitions"); + for (const ty of pureTypeDefs) { + b.newline(); + b.emit(`export type ${stripVk(ty.name)} = ${stripVk(ty.type)};`); + } -for (const ty of typedefs) { - newline(); - emit(`export type ${stripVk(ty.name)} = ${stripVk(ty.type)};`); + const alias = aliasTypeDefs.filter((def) => nameSetDefs.has(def.name)); + for (const ty of alias) { + b.newline(); + b.emit(`export type ${stripVk(ty.name)} = ${stripVk(ty.type)};`); + } + writeFile("api/def.ts", b.output()); } -newline(); -emit("/// Constants"); - -for (const e of constants) { - newline(); - emit(`/// ${e.name}`); - if (e.comment) emit(`/// ${e.comment}`); - newline(); - for (const c of e.constants) { - if (c.name.includes("_SPEC_VERSION")) continue; - if (c.comment) emit(`/** ${c.comment} */`); - emit(`export const ${stripVk(c.name)} = ${stripVk(c.value)};`); +{ + const builder = new FileBuilder(); + builder.emit("/// Constants"); + + for (const e of constants) { + builder.newline(); + builder.emit(`/// ${e.name}`); + if (e.comment) builder.emit(`/// ${e.comment}`); + builder.newline(); + for (const c of e.constants) { + if (c.name.includes("_SPEC_VERSION")) continue; + if (c.comment) builder.emit(`/** ${c.comment} */`); + builder.emit(`export const ${stripVk(c.name)} = ${stripVk(c.value)};`); + } } + writeFile("api/constant.ts", builder.output()); } -newline(); -emit("/// Enums"); - -for (const e of enums) { - newline(); - if (e.comment) emit(`/** ${e.comment} */`); - emit(`export enum ${stripVk(e.name)} {`); - const ec = toConstCase(stripVk(e.name)).replace("_FLAG_BITS", ""); - block(() => { - const pushed: string[] = []; - for (const c of e.enums) { - if (c.comment) emit(`/** ${c.comment} */`); - const n = stripVk(c.name); - function maybeSlice(x: string, vkOnly = false) { - if (typeof x !== "string") return x; - if (vkOnly && !x.startsWith("VK_")) return x; - x = stripVk(x); - let sliced = x.startsWith?.(ec + "_") ? x.slice(ec.length + 1) : x; - if (e.name.endsWith("FlagBits") && sliced.endsWith("_BIT")) { - sliced = sliced.slice(0, -4); +{ + const b = new FileBuilder(); + b.emit("// deno-lint-ignore-file no-empty-enum"); + + for (const e of enums) { + b.newline(); + if (e.comment) b.emit(`/** ${e.comment} */`); + + const enumClassName = stripVk(e.name); + b.emit(`export enum ${enumClassName} {`); + const ec = toConstCase(enumClassName).replace("_FLAG_BITS", ""); + b.block(() => { + const pushed: string[] = []; + for (const c of e.enums) { + if (c.comment) b.emit(`/** ${c.comment} */`); + const n = stripVk(c.name); + function maybeSlice(x: string, vkOnly = false) { + if (typeof x !== "string") return x; + if (vkOnly && !x.startsWith("VK_")) return x; + x = stripVk(x); + let sliced = x.startsWith?.(ec + "_") ? x.slice(ec.length + 1) : x; + if (e.name.endsWith("FlagBits") && sliced.endsWith("_BIT")) { + sliced = sliced.slice(0, -4); + } + if (sliced.match?.(/^[0-9]/)) sliced = "VK_" + sliced; + return sliced; } - if (sliced.match?.(/^[0-9]/)) sliced = "VK_" + sliced; - return sliced; - } - const final = maybeSlice(n); - if (pushed.includes(final)) continue; - pushed.push(final); - emit( - `${final} = ${ + const finalName = maybeSlice(n); + if (pushed.includes(finalName)) continue; + pushed.push(finalName); + + const finalValue = typeof c.value === "string" && c.value.startsWith("VK") ? maybeSlice( e.enums.find((x) => x.name === c.value)?.value ?? c.value, true, ) - : c.value - },`, - ); + : c.value; + b.emit(`${finalName} = ${finalValue},`); + } + }); + b.emit(`}`); + } + const enumAlias = aliasTypeDefs.filter((def) => nameSetEnums.has(def.name)); + for (const def of enumAlias) { + b.newline(); + b.emit(`export type ${stripVk(def.name)} = ${stripVk(def.type)}`); + } + writeFile("api/enum.ts", b.output()); +} + +function addImports(types: string[]) { + const _structs = new Set(); + const _unions = new Set(); + const _enums = new Set(); + const _defs = new Set(); + + for (const type of types) { + if (nameSetStrucs.has(type)) { + _structs.add(stripVk(type)); + } else if (nameSetUnions.has(type)) { + _unions.add(stripVk(type)); + } else if (nameSetEnums.has(type)) { + _enums.add(stripVk(type)); + } else if (nameSetDefs.has(type)) { + _defs.add(stripVk(type)); } - }); - emit(`}`); + } + + return { + structs: [..._structs], + unions: [..._unions], + enums: [..._enums], + defs: [..._defs], + }; } -newline(); -emit("/// Structs"); - -for (const s of structs) { - newline(); - emit(`export interface Init${stripVk(s.name)} {`); - block(() => { - for (const f of s.fields) { - if (f.name === "sType" && f.values?.length === 1) continue; - const nativearr = isArray(f.ffi) && (f.ffi.array in tymap); - emit( - `${jsify(f.name)}?: ${ - nativearr - ? tymap[f.ffi.array as keyof typeof tymap] - : f.text?.endsWith("*") - ? "AnyPointer" - : stripVk(typeToJS(f.type)) - }${f.len && !nativearr ? "[]" : ""};`, +{ + const classNames = [] as string[]; + for (const s of structs) { + const b = new FileBuilder(); + b.emit("// deno-lint-ignore-file no-unused-vars"); + // imports + b.emit([ + `import {`, + [ + "AnyBuffer,", + "AnyPointer,", + "anyBuffer,", + "anyPointer,", + "BUFFER,", + "DATAVIEW,", + "LE,", + "BaseStruct,", + "pointerFromView,", + "notPointerObject,", + ], + `} from "../util.ts";`, + ], true); + + const imports = addImports(s.fields.map((f) => f.type)); + if (imports.structs.length > 0) { + imports.structs.forEach((name) => { + if (name != "BaseInStructure" && name != "BaseOutStructure") { + b.emit(`import {${name}} from "./${name}.ts";`); + } + }); + } + if (imports.enums.length > 0) { + b.emit(`import { ${[...imports.enums].join(", ")} } from "../enum.ts";`); + } + if (imports.defs.length > 0) { + b.emit(`import { ${[...imports.defs].join(", ")} } from "../def.ts";`); + } + if (imports.unions.length > 0) { + b.emit( + `import { ${[...imports.unions].join(", ")} } from "../union.ts";`, ); } - }); - emit("}"); - newline(); - if (s.comment) emit(`/** ${s.comment} */`); - emit(`export class ${stripVk(s.name)} implements BaseStruct {`); - block(() => { - emit(`static size = ${s.size};`); - newline(); + b.newline(); + b.emit(`export interface Init${stripVk(s.name)} {`); + b.block(() => { + for (const f of s.fields) { + if (f.name === "sType" && f.values?.length === 1) continue; + const nativearr = isArray(f.ffi) && (f.ffi.array in tymap); + b.emit( + `${jsify(f.name)}?: ${ + nativearr + ? tymap[f.ffi.array as keyof typeof tymap] + : f.text?.endsWith("*") + ? "AnyPointer" + : stripVk(typeToJS(f.type)) + }${f.len && !nativearr ? "[]" : ""};`, + ); + } + }); + b.emit("}"); + b.newline(); + if (s.comment) b.emit(`/** ${s.comment} */`); - emit("#data!: Uint8Array;"); - emit("#view!: DataView;"); + const className = stripVk(s.name); + classNames.push(className); + b.emit(`export class ${className} implements BaseStruct {`); + b.block(() => { + b.emit(`static size = ${s.size};`); - newline(); + b.newline(); - emit(`get [BUFFER]() { return this.#data; }`); - emit(`get [DATAVIEW]() { return this.#view; }`); + b.emit("#data!: Uint8Array;"); + b.emit("#view!: DataView;"); - newline(); + b.newline(); - emit(`constructor();`); - emit(`constructor(ptr: Deno.PointerValue);`); - emit(`constructor(init: Init${stripVk(s.name)});`); - emit(`constructor(data: Uint8Array);`); - emit( - `constructor(data?: Deno.PointerValue | Uint8Array | Init${ - stripVk(s.name) - }) {`, - ); - block(() => { - emit(`if (data === undefined) {`); - block(() => { - emit(`this.#data = new Uint8Array(${stripVk(s.name)}.size);`); - emit( - "this.#view = new DataView(this.#data.buffer, this.#data.byteOffset);", - ); - }); - emit( - `} else if (typeof data === "number" || typeof data === "bigint") {`, + b.emit(`get [BUFFER]() { return this.#data; }`); + b.emit(`get [DATAVIEW]() { return this.#view; }`); + + b.newline(); + + b.emit(`constructor();`); + b.emit(`constructor(ptr: Deno.PointerValue);`); + b.emit(`constructor(init: Init${className});`); + b.emit(`constructor(data: Uint8Array);`); + b.emit( + `constructor(data?: Deno.PointerValue | Uint8Array | Init${className}) {`, ); - block(() => { - emit( - `this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ${ - stripVk(s.name) - }.size));`, - ); - emit( - "this.#view = new DataView(this.#data.buffer, this.#data.byteOffset);", - ); - }); - emit("} else if (data instanceof Uint8Array) {"); - block(() => { - emit(`if (data.byteLength < ${stripVk(s.name)}.size) {`); - block(() => { - emit(`throw new Error("Data buffer too small");`); - }); - emit("}"); - emit("this.#data = data;"); - emit("this.#view = new DataView(data.buffer, data.byteOffset);"); - }); - emit("} else {"); - block(() => { - emit(`this.#data = new Uint8Array(${stripVk(s.name)}.size);`); - emit( - "this.#view = new DataView(this.#data.buffer, this.#data.byteOffset);", - ); + + b.block(() => { + b.emit([ + `if (data === undefined || data === null) {`, + [ + `this.#data = new Uint8Array(${className}.size);`, + "this.#view = new DataView(this.#data.buffer, this.#data.byteOffset);", + ], + "} else if (data instanceof Uint8Array) {", + [ + `if (data.byteLength < ${className}.size) {`, + [ + `throw new Error("Data buffer too small");`, + ], + "}", + "this.#data = data;", + "this.#view = new DataView(data.buffer, data.byteOffset);", + ], + "} else if(notPointerObject(data)) {", + [ + `this.#data = new Uint8Array(${className}.size);`, + "this.#view = new DataView(this.#data.buffer, this.#data.byteOffset);", + () => { + for (const f of s.fields) { + if (f.name === "sType" && f.values?.length === 1) { + continue; + } else { + const name = jsify(f.name); + b.emit( + `if (data.${name} !== undefined) this.${name} = data.${name};`, + ); + } + } + }, + ], + `} else {`, + [ + `this.#data = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(data, ${className}.size));`, + "this.#view = new DataView(this.#data.buffer, this.#data.byteOffset);", + ], + "}", + ], true); for (const f of s.fields) { if (f.name === "sType" && f.values?.length === 1) { - continue; - } else { - const name = jsify(f.name); - emit( - `if (data.${name} !== undefined) this.${name} = data.${name};`, + b.emit( + `this.sType = StructureType.${ + stripVk(f.values?.[0]).slice("STRUCTURE_TYPE_".length) + };`, ); } } }); - emit("}"); + b.emit("}"); + for (const f of s.fields) { - if (f.name === "sType" && f.values?.length === 1) { - emit( - `this.sType = StructureType.${ - stripVk(f.values?.[0]).slice("STRUCTURE_TYPE_".length) - };`, - ); + b.newline(); + if (f.comment) b.emit(`/** ${f.comment} */`); + const isptr = f.text?.endsWith("*"); + function getGetterType(f: Field) { + if (isptr) { + return "Deno.PointerValue"; + } else { + switch (f.ffi) { + case "i8": + case "u8": + case "i16": + case "u16": + case "i32": + case "u32": + case "f32": + case "f64": + return "number"; + case "isize": + case "i64": + case "usize": + case "u64": + return "bigint"; + case "buffer": + case "pointer": + case "function": + return "Deno.PointerValue"; + default: { + if (isStruct(f.ffi)) { + const name = f.type; + return stripVk(name); + } + if (isArray(f.ffi)) { + if (tymap[f.ffi.array as keyof typeof tymap]) { + return tymap[f.ffi.array as keyof typeof tymap]; + } else { + return `${stripVk(typeToJS(f.type))}[]`; + } + } + return "unknown"; + } + } + } } - } - }); - emit("}"); - - for (const f of s.fields) { - newline(); - if (f.comment) emit(`/** ${f.comment} */`); - const isptr = f.text?.endsWith("*"); - emit(`get ${jsify(f.name)}() {`); - function emitFieldGetter(f: Field) { - if (isptr) { - emit(`return this.#view.getBigUint64(${f.offset}, LE);`); - } else { - switch (f.ffi) { - case "i8": - emit(`return this.#view.getInt8(${f.offset});`); - break; - case "u8": - emit(`return this.#view.getUint8(${f.offset});`); - break; - case "i16": - emit(`return this.#view.getInt16(${f.offset}, LE);`); - break; - case "u16": - emit(`return this.#view.getUint16(${f.offset}, LE);`); - break; - case "i32": - emit(`return this.#view.getInt32(${f.offset}, LE);`); - break; - case "u32": - emit(`return this.#view.getUint32(${f.offset}, LE);`); - break; - case "isize": - case "i64": - emit(`return this.#view.getBigInt64(${f.offset}, LE);`); - break; - case "usize": - case "buffer": - case "pointer": - case "u64": - emit(`return this.#view.getBigUint64(${f.offset}, LE);`); - break; - case "f32": - emit(`return this.#view.getFloat32(${f.offset}, LE);`); - break; - case "f64": - emit(`return this.#view.getFloat64(${f.offset}, LE);`); - break; - default: { - if (isStruct(f.ffi)) { - const name = f.type; - emit( - `return new ${ - stripVk(name) - }(this.#data.subarray(${f.offset}, ${f.offset} + ${ - stripVk(name) - }.size));`, - ); + b.emit(`get ${jsify(f.name)}(): ${getGetterType(f)} {`); + function emitFieldGetter(f: Field) { + if (isptr) { + b.emit(`return pointerFromView(this.#view, ${f.offset}, LE);`); + } else { + switch (f.ffi) { + case "i8": + b.emit(`return this.#view.getInt8(${f.offset});`); break; - } - if (isArray(f.ffi)) { - if (tymap[f.ffi.array as keyof typeof tymap]) { - emit( + case "u8": + b.emit(`return this.#view.getUint8(${f.offset});`); + break; + case "i16": + b.emit(`return this.#view.getInt16(${f.offset}, LE);`); + break; + case "u16": + b.emit(`return this.#view.getUint16(${f.offset}, LE);`); + break; + case "i32": + b.emit(`return this.#view.getInt32(${f.offset}, LE);`); + break; + case "u32": + b.emit(`return this.#view.getUint32(${f.offset}, LE);`); + break; + case "isize": + case "i64": + b.emit(`return this.#view.getBigInt64(${f.offset}, LE);`); + break; + case "usize": + case "u64": + b.emit(`return this.#view.getBigUint64(${f.offset}, LE);`); + break; + case "buffer": + case "pointer": + case "function": + b.emit(`return pointerFromView(this.#view, ${f.offset}, LE);`); + break; + case "f32": + b.emit(`return this.#view.getFloat32(${f.offset}, LE);`); + break; + case "f64": + b.emit(`return this.#view.getFloat64(${f.offset}, LE);`); + break; + default: { + if (isStruct(f.ffi)) { + const name = f.type; + b.emit( `return new ${ - tymap[f.ffi.array as keyof typeof tymap] - }(this.#data.buffer, this.#data.byteOffset + ${f.offset}, ${f.ffi.len});`, + stripVk(name) + }(this.#data.subarray(${f.offset}, ${f.offset} + ${ + stripVk(name) + }.size));`, ); - } else { - emit(`const result: ${stripVk(typeToJS(f.type))}[] = [];`); - emit(`for (let i = 0; i < ${f.ffi.len}; i++) {`); - block(() => { - emit(`result.push((() => {`); - block(() => { - const tysize = getTypeSize(f.ffi.array); - emitFieldGetter({ - name: f.name, - offset: `${f.offset} + i * ${tysize}` as any, - type: f.type, - ffi: f.ffi.array, - } as any); + break; + } + if (isArray(f.ffi)) { + if (tymap[f.ffi.array as keyof typeof tymap]) { + b.emit( + `return new ${ + tymap[f.ffi.array as keyof typeof tymap] + }(this.#data.buffer, this.#data.byteOffset + ${f.offset}, ${f.ffi.len});`, + ); + } else { + b.emit( + `const result: ${stripVk(typeToJS(f.type))}[] = [];`, + ); + b.emit(`for (let i = 0; i < ${f.ffi.len}; i++) {`); + b.block(() => { + b.emit(`result.push((() => {`); + b.block(() => { + const tysize = getTypeRequirement(f.ffi.array).typeSize; + emitFieldGetter({ + name: f.name, + offset: `${f.offset} + i * ${tysize}` as any, + type: f.type, + ffi: f.ffi.array, + } as any); + }); + b.emit(`})());`); }); - emit(`})());`); - }); - emit(`}`); - emit(`return result;`); + b.emit(`}`); + b.emit(`return result;`); + } + break; } + b.emit( + `throw new Error(\`Unknown type: ${ + JSON.stringify(f.ffi) + }\`);`, + ); break; } - emit( - `throw new Error(\`Unknown type: ${JSON.stringify(f.ffi)}\`);`, - ); - break; } } } - } - block(() => { - emitFieldGetter(f); - }); - emit(`}`); - newline(); - const nativearr = isArray(f.ffi) && (f.ffi.array in tymap); - emit( - `set ${jsify(f.name)}(value: ${ - nativearr - ? `${tymap[f.ffi.array as keyof typeof tymap]}` - : (isptr ? "AnyPointer" : stripVk(typeToJS(f.type))) - }${f.len && !nativearr ? "[]" : ""}) {`, - ); - function emitFieldSetter(f: Field, vname = "value") { - if (isptr) { - emit( - `this.#view.setBigUint64(${f.offset}, BigInt(anyPointer(${vname})), LE);`, - ); - } else if (nativearr) { - emit(`this.#data.set(new Uint8Array(${vname}.buffer), ${f.offset});`); - } else { - switch (f.ffi) { - case "i8": - emit(`this.#view.setInt8(${f.offset}, Number(${vname}));`); - break; - case "u8": - emit(`this.#view.setUint8(${f.offset}, Number(${vname}));`); - break; - case "i16": - emit(`this.#view.setInt16(${f.offset}, Number(${vname}), LE);`); - break; - case "u16": - emit(`this.#view.setUint16(${f.offset}, Number(${vname}), LE);`); - break; - case "i32": - emit(`this.#view.setInt32(${f.offset}, Number(${vname}), LE);`); - break; - case "u32": - emit(`this.#view.setUint32(${f.offset}, Number(${vname}), LE);`); - break; - case "isize": - case "i64": - emit( - `this.#view.setBigInt64(${f.offset}, BigInt(${vname}), LE);`, - ); - break; - case "usize": - case "u64": - emit( - `this.#view.setBigUint64(${f.offset}, BigInt(${vname}), LE);`, - ); - break; - case "buffer": - case "pointer": - emit( - `this.#view.setBigUint64(${f.offset}, BigInt(anyPointer(${vname})), LE);`, - ); - break; - case "f32": - emit(`this.#view.setFloat32(${f.offset}, Number(${vname}), LE);`); - break; - case "f64": - emit(`this.#view.setFloat64(${f.offset}, Number(${vname}), LE);`); - break; - default: { - if (isStruct(f.ffi)) { - const name = f.type; - emit( - `if (${vname}[BUFFER].byteLength < ${stripVk(name)}.size) {`, + b.block(() => { + emitFieldGetter(f); + }); + b.emit(`}`); + b.newline(); + const nativearr = isArray(f.ffi) && (f.ffi.array in tymap); + b.emit( + `set ${jsify(f.name)}(value: ${ + nativearr + ? `${tymap[f.ffi.array as keyof typeof tymap]}` + : (isptr ? "AnyPointer" : stripVk(typeToJS(f.type))) + }${f.len && !nativearr ? "[]" : ""}) {`, + ); + function emitFieldSetter(f: Field, vname = "value") { + if (isptr) { + b.emit( + `this.#view.setBigUint64(${f.offset}, BigInt(anyPointer(${vname})), LE);`, + ); + } else if (nativearr) { + b.emit( + `this.#data.set(new Uint8Array(${vname}.buffer), ${f.offset});`, + ); + } else { + switch (f.ffi) { + case "i8": + b.emit( + `this.#view.setInt8(${f.offset}, Number(${vname}));`, ); - block(() => { - emit(`throw new Error("Data buffer too small");`); - }); - emit("}"); - emit(`this.#data.set(${vname}[BUFFER], ${f.offset});`); break; - } - if (isArray(f.ffi)) { - const tysize = getTypeSize(f.ffi.array); - emit(`for (let i = 0; i < ${vname}.length; i++) {`); - block(() => { - emitFieldSetter({ - name: f.name, - offset: `${f.offset} + i * ${tysize}` as any, - type: f.type, - ffi: f.ffi.array, - } as any, `${vname}[i]`); - }); - emit("}"); + case "u8": + b.emit( + `this.#view.setUint8(${f.offset}, Number(${vname}));`, + ); + break; + case "i16": + b.emit( + `this.#view.setInt16(${f.offset}, Number(${vname}), LE);`, + ); + break; + case "u16": + b.emit( + `this.#view.setUint16(${f.offset}, Number(${vname}), LE);`, + ); + break; + case "i32": + b.emit( + `this.#view.setInt32(${f.offset}, Number(${vname}), LE);`, + ); + break; + case "u32": + b.emit( + `this.#view.setUint32(${f.offset}, Number(${vname}), LE);`, + ); + break; + case "isize": + case "i64": + b.emit( + `this.#view.setBigInt64(${f.offset}, BigInt(${vname}), LE);`, + ); + break; + case "usize": + case "u64": + b.emit( + `this.#view.setBigUint64(${f.offset}, BigInt(${vname}), LE);`, + ); + break; + case "buffer": + case "pointer": + case "function": + b.emit( + `this.#view.setBigUint64(${f.offset}, BigInt(anyPointer(${vname})), LE);`, + ); + break; + case "f32": + b.emit( + `this.#view.setFloat32(${f.offset}, Number(${vname}), LE);`, + ); + break; + case "f64": + b.emit( + `this.#view.setFloat64(${f.offset}, Number(${vname}), LE);`, + ); + break; + default: { + if (isStruct(f.ffi)) { + const name = f.type; + b.emit( + `if (${vname}[BUFFER].byteLength < ${ + stripVk(name) + }.size) {`, + ); + b.block(() => { + b.emit(`throw new Error("Data buffer too small");`); + }); + b.emit("}"); + b.emit( + `this.#data.set(${vname}[BUFFER], ${f.offset});`, + ); + break; + } + if (isArray(f.ffi)) { + const tysize = getTypeRequirement(f.ffi.array).typeSize; + b.emit(`for (let i = 0; i < ${vname}.length; i++) {`); + b.block(() => { + emitFieldSetter({ + name: f.name, + offset: `${f.offset} + i * ${tysize}` as any, + type: f.type, + ffi: f.ffi.array, + } as any, `${vname}[i]`); + }); + b.emit("}"); + break; + } + b.emit( + `throw new Error(\`Unknown type: ${ + JSON.stringify(f.ffi) + }\`);`, + ); break; } - emit( - `throw new Error(\`Unknown type: ${JSON.stringify(f.ffi)}\`);`, - ); - break; } } } + b.block(() => { + emitFieldSetter(f); + }); + b.emit(`}`); } - block(() => { - emitFieldSetter(f); - }); - emit(`}`); + }); + b.emit(`}`); + + writeFile(`api/struct/${className}.ts`, b.output()); + } + { + // alias + const structAlias = aliasTypeDefs.filter((def) => + nameSetStrucs.has(def.name) + ); + for (const def of structAlias) { + const b = new FileBuilder(); + const className = stripVk(def.name); + classNames.push(className); + b.emit([ + `import { ${stripVk(def.type)} } from "./${stripVk(def.type)}.ts";`, + `export type ${className} = ${stripVk(def.type)};`, + ]); + writeFile(`api/struct/${className}.ts`, b.output()); } - }); - emit(`}`); + } + { + // complete re-export + const b = new FileBuilder(); + classNames.forEach((name) => b.emit(`export * from "./${name}.ts";`)); + writeFile(`api/struct/mod.ts`, b.output()); + } + { + // common re-export + const b = new FileBuilder(); + const commonStructs = classNames.filter((name) => { + for (const vendor of vendors) { + if (name.endsWith(vendor.name)) return false; + } + if (name.startsWith("StdVideo")) return false; + return true; + }); + commonStructs.push( + "DebugUtilsMessengerCallbackDataEXT", + "DebugUtilsMessengerCreateInfoEXT", + "SurfaceFormatKHR", + "SurfaceCapabilitiesKHR", + "SwapchainCreateInfoKHR", + "PresentInfoKHR", + ); + commonStructs.forEach((name) => b.emit(`export * from "./${name}.ts";`)); + writeFile(`api/struct/common.ts`, b.output()); + } } -newline(); -emit("/// Unions"); +{ + const b = new FileBuilder(); + b.newline(); + b.emit("/// Unions"); -for (const s of unions) { - newline(); - if (s.comment) emit(`/** ${s.comment} */`); - emit(`export class ${stripVk(s.name)} {`); - block(() => { - emit(`static size = ${s.size};`); + for (const s of unions) { + b.newline(); + if (s.comment) b.emit(`/** ${s.comment} */`); + b.emit(`export class ${stripVk(s.name)} {`); + b.block(() => { + b.emit(`static size = ${s.size};`); - newline(); + b.newline(); - emit("#data: Uint8Array;"); - emit("#view: DataView;"); + b.emit("#data: Uint8Array;"); + b.emit("#view: DataView;"); - newline(); + b.newline(); - emit("constructor(data: Uint8Array) {"); - block(() => { - emit(`if (data.byteLength < ${stripVk(s.name)}.size) {`); - block(() => { - emit(`throw new Error("Data buffer too small");`); + b.emit("constructor(data: Uint8Array) {"); + b.block(() => { + b.emit(`if (data.byteLength < ${stripVk(s.name)}.size) {`); + b.block(() => { + b.emit(`throw new Error("Data buffer too small");`); + }); + b.emit("}"); + b.emit("this.#data = data;"); + b.emit("this.#view = new DataView(data.buffer);"); }); - emit("}"); - emit("this.#data = data;"); - emit("this.#view = new DataView(data.buffer);"); + b.emit("}"); }); - emit("}"); - }); - emit(`}`); + b.emit(`}`); + } + writeFile(`api/union.ts`, b.output()); } function toSkipCMD(name: string) { @@ -480,119 +706,154 @@ function toSkipCMD(name: string) { return false; } -newline(); -emit("/// FFI Library"); - -emit( - `const lib = Deno.dlopen(Deno.build.os === "windows" ? "vulkan-1" : Deno.build.os === "darwin" ? "libvulkan.dylib.1" : "libvulkan.so.1", {`, -); -block(() => { +{ + const b = new FileBuilder(); + b.emit("// deno-lint-ignore-file no-unused-vars"); + b.emit(`import { AnyBuffer, anyBuffer } from "./util.ts";`); + // import + const _types = new Set(); for (const cmd of commands) { - if (toSkipCMD(cmd.name)) continue; - emit( - `"${cmd.name}": ${ - JSON.stringify(cmd.ffi, null, 2).split("\n").map(( - e, - i, - ) => (i === 0 ? e : `${" ".repeat(getIdent())}${e}`)).join("\n") - },`, - ); + for (const param of cmd.params) { + _types.add(param.type); + } + } + const imports = addImports([..._types]); + if (imports.enums.length > 0) { + b.emit([ + `import {`, + [ + "Result,", + ...imports.enums.map((name) => name + ","), + ], + `} from "./enum.ts";`, + ], true); + } + if (imports.defs.length > 0) { + b.emit([ + `import {`, + [ + ...imports.defs.map((name) => name + ","), + ], + `} from "./def.ts";`, + ], true); } -}); -emit(`} as const).symbols;`); - -newline(); -emit(`export class VulkanError extends Error {`); -block(() => { - emit(`constructor(public code: Result) {`); - block(() => { - emit(`super(\`Vulkan error: \${code} (\${Result[code]})\`);`); - }); - emit(`}`); -}); -emit(`}`); - -newline(); -emit("/// Commands"); - -for (const cmd of commands) { - if (toSkipCMD(cmd.name)) continue; - newline(); - if (cmd.comment) emit(`/** ${cmd.comment} */`); - emit(`export function ${stripVk(cmd.name)}(`); - block(() => { - for (const p of cmd.params) { - emit( - `${jsify(p.name)}: ${ - p.text?.endsWith("*") ? `AnyBuffer` : stripVk(typeToJS(p.type)) + b.emit( + `const lib = Deno.dlopen(Deno.build.os === "windows" ? "vulkan-1" : Deno.build.os === "darwin" ? "libvulkan.dylib.1" : "libvulkan.so.1", {`, + ); + b.block(() => { + for (const cmd of commands) { + if (toSkipCMD(cmd.name)) continue; + b.emit( + `"${cmd.name}": ${ + JSON.stringify(cmd.ffi, null, 2).split("\n").map(( + e, + i, + ) => (i === 0 ? e : `${" ".repeat(b.getIdent())}${e}`)).join( + "\n", + ) },`, ); } }); - emit(`): ${stripVk(typeToJS(cmd.type))} {`); - block(() => { - emit(`${cmd.type !== "void" ? "const ret = " : ""}lib.${cmd.name}(`); - block(() => { + b.emit(`} as const).symbols;`); + + b.newline(); + + b.emit(`export class VulkanError extends Error {`); + b.block(() => { + b.emit(`constructor(public code: Result) {`); + b.block(() => { + b.emit(`super(\`Vulkan error: \${code} (\${Result[code]})\`);`); + }); + b.emit(`}`); + }); + b.emit(`}`); + + b.newline(); + b.emit("/// Commands"); + + for (const cmd of commands) { + if (toSkipCMD(cmd.name)) continue; + b.newline(); + if (cmd.comment) b.emit(`/** ${cmd.comment} */`); + b.emit(`export function ${stripVk(cmd.name)}(`); + b.block(() => { for (const p of cmd.params) { - const jsn = jsify(p.name); - emit( - `${p.text?.endsWith("*") ? `anyBuffer(${jsn})` : jsn},`, + b.emit( + `${jsify(p.name)}: ${ + p.text?.endsWith("*") ? `AnyBuffer` : stripVk(typeToJS(p.type)) + },`, ); } }); - emit(`);`); - if (cmd.type !== "void") { - if (cmd.type === "VkResult") { - emit( - `if (${ - cmd.successCodes.map((e) => `ret === Result.${stripVk(e)}`).join( - " || ", - ) - }) {`, - ); - block(() => { - emit("return ret;"); - }); - emit(`} else {`); - block(() => { - emit( - `throw new VulkanError(ret as Result);`, + b.emit(`): ${stripVk(typeToJS(cmd.type))} {`); + b.block(() => { + b.emit( + `${cmd.type !== "void" ? "const ret = " : ""}lib.${cmd.name}(`, + ); + b.block(() => { + for (const p of cmd.params) { + const jsn = jsify(p.name); + b.emit( + `${p.text?.endsWith("*") ? `anyBuffer(${jsn})` : jsn},`, ); - }); - emit("}"); - } else { - emit(`return ret;`); + } + }); + b.emit(`);`); + if (cmd.type !== "void") { + if (cmd.type === "VkResult") { + b.emit( + `if (${ + cmd.successCodes.map((e) => `ret === Result.${stripVk(e)}`).join( + " || ", + ) + }) {`, + ); + b.block(() => { + b.emit("return ret;"); + }); + b.emit(`} else {`); + b.block(() => { + b.emit( + `throw new VulkanError(ret as Result);`, + ); + }); + b.emit("}"); + } else { + b.emit(`return ret;`); + } } - } - }); - emit(`}`); -} + }); + b.emit(`}`); + } -newline(); + writeFile(`api/cmd.ts`, b.output()); +} +// builder.newline(); -emit(`export * from "./util.ts";`); +// builder.emit(`export * from "./util.ts";`); -const src = output(); +// const src = builder.output(); -Deno.writeTextFileSync(new URL("../api/vk.ts", import.meta.url), src); +// Deno.writeTextFileSync(new URL("../api/vk.ts", import.meta.url), src); -console.log("Generated api/vk.ts"); +// console.log("Generated api/vk.ts"); -const { code } = transform(src, { - "jsc": { - "target": "es2022", - "minify": { - "compress": { - "unused": true, - }, - }, - "parser": { - "syntax": "typescript", - }, - }, -}); +// const { code } = transform(src, { +// "jsc": { +// "target": "es2022", +// "minify": { +// "compress": { +// "unused": true, +// }, +// }, +// "parser": { +// "syntax": "typescript", +// }, +// }, +// }); -Deno.writeTextFileSync(new URL("../api/vk.min.js", import.meta.url), code); +// Deno.writeTextFileSync(new URL("../api/vk.min.js", import.meta.url), code); -console.log("Generated api/vk.min.js"); +// console.log("Generated api/vk.min.js"); diff --git a/generator/process_xml.ts b/generator/process_xml.ts index 97fc645..6242017 100644 --- a/generator/process_xml.ts +++ b/generator/process_xml.ts @@ -1,30 +1,44 @@ +// deno-lint-ignore-file no-explicit-any const api = JSON.parse( Deno.readTextFileSync(new URL("../data/vk.json", import.meta.url)), ); -let src = `/// This file is auto-generated. Do not edit.\n`; -let ident = 0; +type Content = string | Block | (() => void); +type Block = Content[]; -export function output() { - return src; -} +export class FileBuilder { + lines = [] as string[]; + ident = 0; -export function getIdent() { - return ident; -} + output() { + return this.lines.join("\n"); + } -export function newline() { - emit(""); -} + getIdent() { + return this.ident; + } -export function emit(line: string, newline = "\n") { - src += (" ".repeat(ident)) + line + newline; -} + newline() { + this.lines.push(""); + } + + emit(content: Content, noIdent = false) { + if (Array.isArray(content)) { + this.ident += noIdent ? 0 : 1; + content.forEach((c) => this.emit(c)); + this.ident -= noIdent ? 0 : 1; + } else if (typeof content == "string") { + this.lines.push(" ".repeat(this.ident) + content); + } else { + content(); + } + } -export function block(fn: CallableFunction) { - ident += 1; - fn(); - ident -= 1; + block(fn: CallableFunction) { + this.ident += 1; + fn(); + this.ident -= 1; + } } export function jsify(name: string) { @@ -54,16 +68,16 @@ const C_TYPES = { "uint8_t": "number", "uint16_t": "number", "uint32_t": "number", - "uint64_t": "Deno.PointerValue", + "uint64_t": "number | bigint", "int8_t": "number", "int16_t": "number", "int32_t": "number", - "int64_t": "Deno.PointerValue", + "int64_t": "number | bigint", "float": "number", "double": "number", "char": "number", - "size_t": "Deno.PointerValue", - "ssize_t": "Deno.PointerValue", + "size_t": "number | bigint", + "ssize_t": "number | bigint", "HINSTANCE": "Deno.PointerValue", "HWND": "Deno.PointerValue", "Window": "Deno.PointerValue", @@ -74,7 +88,7 @@ const C_TYPES = { "DWORD": "number", "LPCWSTR": "Deno.PointerValue", "int": "number", - "GgpFrameToken": "Deno.PointerValue", + "GgpFrameToken": "number | bigint", "HMONITOR": "Deno.PointerValue", "VisualID": "number", "xcb_visualid_t": "number", @@ -182,6 +196,7 @@ export function typeToFFI(ty: string): any { export interface Typedef { name: string; type: string; + alias?: boolean; ffi: any; } @@ -259,12 +274,17 @@ export interface Command { ffi: any; } +export interface Vender { + name: string; +} + export const typedefs: Typedef[] = []; export const constants: Constants[] = []; export const enums: Enums[] = []; export const structs: Struct[] = []; export const unions: Union[] = []; export const commands: Command[] = []; +export const vendors: Vender[] = []; for (const data of api.registry.enums) { if (data.$type === "bitmask" || data.$type === "enum") { @@ -315,25 +335,30 @@ export function isArray(type: any) { return typeof type === "object" && type !== null && ("array" in type); } -export function getAlignSize( - type: any, - cache?: WeakMap, -): number { - if (isStruct(type)) { - return getAlignSize(type.struct[0], cache); - } else if (isUnion(type)) { - return getAlignSize(type.union[0], cache); - } else if (isArray(type)) { - return getAlignSize(type.array, cache); - } else { - return getTypeSize(type, cache); - } +// export function getAlignSize( +// type: any, +// cache?: WeakMap, +// ): number { +// if (isStruct(type)) { +// return getAlignSize(type.struct[0], cache); +// } else if (isUnion(type)) { +// return getAlignSize(type.union[0], cache); +// } else if (isArray(type)) { +// return getAlignSize(type.array, cache); +// } else { +// return getTypeSize(type, cache); +// } +// } + +interface TypeRequirement { + typeSize: number; + alignSize: number; } -export function getTypeSize( +export function getTypeRequirement( type: any, - cache = new WeakMap(), -) { + cache = new WeakMap(), +): TypeRequirement { if (isStruct(type)) { const cached = cache.get(type); if (cached !== undefined) { @@ -346,15 +371,15 @@ export function getTypeSize( let size = 0; let alignment = 1; for (const field of type.struct) { - const fieldSize = getTypeSize(field, cache); - const alignSize = getAlignSize(field, cache); + const { typeSize, alignSize } = getTypeRequirement(field, cache); alignment = Math.max(alignment, alignSize); size = Math.ceil(size / alignSize) * alignSize; - size += fieldSize; + size += typeSize; } size = Math.ceil(size / alignment) * alignment; - cache.set(type, size); - return size; + const requirement = { typeSize: size, alignSize: alignment }; + cache.set(type, requirement); + return requirement; } if (isArray(type)) { @@ -369,14 +394,15 @@ export function getTypeSize( let size = 0; let alignment = 1; for (let i = 0; i < type.len; i++) { - const fieldSize = getTypeSize(type.array, cache); - alignment = Math.max(alignment, fieldSize); - size = Math.ceil(size / fieldSize) * fieldSize; - size += fieldSize; + const { typeSize, alignSize } = getTypeRequirement(type.array, cache); + alignment = Math.max(alignment, alignSize); + size = Math.ceil(size / typeSize) * typeSize; + size += typeSize; } size = Math.ceil(size / alignment) * alignment; - cache.set(type, size); - return size; + const requirement = { typeSize: size, alignSize: alignment }; + cache.set(type, requirement); + return requirement; } if (isUnion(type)) { @@ -389,25 +415,29 @@ export function getTypeSize( } cache.set(type, null); let size = 0; + let alignment = 1; for (const field of type.union) { - size = Math.max(size, getTypeSize(field, cache)); + const { typeSize, alignSize } = getTypeRequirement(field, cache); + size = Math.max(size, typeSize); + alignment = Math.max(size, alignSize); } - cache.set(type, size); - return size; + const requirement = { typeSize: size, alignSize: alignment }; + cache.set(type, requirement); + return requirement; } switch (type) { case "bool": case "u8": case "i8": - return 1; + return { typeSize: 1, alignSize: 1 }; case "u16": case "i16": - return 2; + return { typeSize: 2, alignSize: 2 }; case "u32": case "i32": case "f32": - return 4; + return { typeSize: 4, alignSize: 4 }; case "u64": case "i64": case "f64": @@ -416,7 +446,7 @@ export function getTypeSize( case "function": case "usize": case "isize": - return 8; + return { typeSize: 8, alignSize: 8 }; default: throw new TypeError(`Unsupported type: ${Deno.inspect(type)}`); } @@ -541,7 +571,7 @@ for (const ty of api.registry.types.type) { let size = 0; let alignment = 1; struct.fields = ty.member.map((member: any) => { - let field: Field = { + const field: Field = { name: member.name["#text"], type: member.type["#text"], offset: size, @@ -592,14 +622,13 @@ for (const ty of api.registry.types.type) { }; } - const fieldSize = getTypeSize(field.ffi); - const alignSize = getAlignSize(field.ffi); + const { typeSize, alignSize } = getTypeRequirement(field.ffi); alignment = Math.max(alignment, alignSize); size = Math.ceil(size / alignSize) * alignSize; field.offset = size; - size += fieldSize; + size += typeSize; return field; }); size = Math.ceil(size / alignment) * alignment; @@ -620,13 +649,14 @@ for (const ty of api.registry.types.type) { comment: member.$comment, text: member["#text"], })); - union.size = getTypeSize({ + union.size = getTypeRequirement({ union: union.types.map((e) => e.text?.endsWith("*") ? "pointer" : e.ffi), - }); + }).typeSize; } else if (ty.$name && ty.$alias) { typedefs.push({ name: ty.$name, type: ty.$alias, + alias: true, ffi: typeToFFI(ty.$alias), }); } @@ -670,3 +700,8 @@ for (const cmd of api.registry.commands.command) { }, }); } + +for (const vendor of api.registry.tags.tag) { + const name = vendor.$name; + vendors.push({ name }); +}